@e-llm-studio/instant-learning 1.3.0-alpha.96 → 1.3.0-alpha.97
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/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +1 -0
- package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/api.js +1 -1
- package/dist/cjs/features/LSCGuidelinesCart/endpoints.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagementTest.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
- package/dist/cjs/features/LearningManagement/RBAC/AccessPanel.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/cjs/features/LearningManagement/Sidebar.js +1 -1
- package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js +2 -0
- package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js.map +1 -0
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js +2 -0
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js.map +1 -0
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +2 -0
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +1 -0
- package/dist/cjs/features/LearningManagement/styles/CreateLearningSetModal.module.css.js +2 -0
- package/dist/cjs/features/LearningManagement/styles/CreateLearningSetModal.module.css.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +2 -0
- package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +1 -0
- package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +2 -0
- package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +1 -0
- package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +2 -0
- package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +1 -0
- package/dist/features/LSCGuidelinesCart/Cart/Cart.js +1 -1
- package/dist/features/LSCGuidelinesCart/GuidelineCard.js +1 -1
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js +1 -1
- package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +1 -1
- package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js +1 -1
- package/dist/features/LSCGuidelinesCart/api.js +1 -1
- package/dist/features/LSCGuidelinesCart/endpoints.js +1 -1
- package/dist/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/features/LearningManagement/LearningManagementTest.js +1 -1
- package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
- package/dist/features/LearningManagement/RBAC/AccessPanel.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/features/LearningManagement/Sidebar.js +1 -1
- package/dist/features/LearningManagement/assets/Search-result(add new).svg.js +2 -0
- package/dist/features/LearningManagement/assets/Search-result(add new).svg.js.map +1 -0
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js +2 -0
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js.map +1 -0
- package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +2 -0
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +1 -0
- package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js +2 -0
- package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/features/IL-OTJ/_components/index.d.ts +0 -1
- package/dist/types/src/features/IL-OTJ/_components/index.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts +1 -7
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts +1 -6
- package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/api.d.ts +0 -1
- package/dist/types/src/features/LSCGuidelinesCart/api.d.ts.map +1 -1
- package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts +0 -1
- package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts +3 -0
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +0 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts +0 -2
- package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.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/StationOnboarding/BackwardStationOnboardModal.d.ts +12 -0
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/store/types.d.ts +0 -25
- package/dist/types/src/features/LearningManagement/store/types.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/types.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/types.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__spreadArray as n,__assign as r}from"tslib";import{jsx as o,jsxs as i,Fragment as l}from"react/jsx-runtime";import{useRef as a,useState as s,useEffect as u}from"react";import{useLearningTemplateStore as c}from"../store/useLearningTemplateStore.js";import d from"../components/EmptyLearningState.js";import{getRulesInRuleSetById as p,exportRuleSet as m,deleteRule as f,deleteQuestion as v,alterQuestionPriority as g}from"../apis/scopeApis.js";import h from"../components/RuleContentSkeleton.js";import{Toast as T}from"primereact/toast";import y from"./ContentLogic.js";import w from"../components/ErrorStateDisplay.js";import S from"../shared/SuccessToastContent.js";import C from"../shared/ErrorToastContent.js";import{findNodeById as j}from"../utils/treeUtils.js";import R from"../styles/LearningContent.module.css.js";import b from"../components/ConfirmationModal.js";import{dt as I}from"../store/useLMSConfigStore.js";import"../../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"lucide-react";import"../../IL-OTJ/_components/InputDataReasoningCard.js";import"../../IL-OTJ/_components/TooltipComponent.js";import"../../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import{CitationProvider as D}from"../../IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import x from"../../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import{LEARNING_DT_PATH as _,VARIANT_DT_PATH as L,TIER_DT_PATH as k}from"../constants.js";import{useConfigStore as O}from"../store/useConfigStore.js";import"../store/usePermissionsStore.js";import"appsec-ui";import"../store/useAuthStore.js";import"../store/useEnvStore.js";import"@radix-ui/react-tooltip";import"../components/StationOnboarding/InputField.js";import"../config.js";import"../store/useAppSecRolesStore.js";import"@tanstack/react-query";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"../AuditLog/ChangeLogDiff.js";import"../components/ToolTip.js";import"react-router-dom";import"../../LSCGuidelinesCart/LearningManagementWrapper.js";import"../LearningManagementTest.js";var M=function(M){var A,N=M.noRulesTitle,E=void 0===N?"No rules have been added !":N,V=M.noRulesDesc,F=void 0===V?"Start by adding rules that should apply across all stations.":V,P=M.noRulesButtonText,B=void 0===P?"Create New Rule":P,J=M.deleteRuleSuccessMessage,U=void 0===J?"Rule deleted successfully!":J,W=M.deleteVariantSuccessMessage,G=void 0===W?"Variant deleted successfully!":W,q=M.deleteRuleErrorMessage,H=void 0===q?"Failed to delete rule. Please try again.":q,$=M.deleteVariantErrorMessage,z=void 0===$?"Failed to delete variant. Please try again.":$,K=M.deleteModalTitle,Q=void 0===K?"Delete":K,X=M.deleteRuleModalWarning,Y=void 0===X?"This will permanently delete the rule configuration.":X,Z=M.deleteVariantModalWarning,ee=void 0===Z?"This will permanently delete the variant configuration.":Z,te=M.deleteConfirmText,ne=void 0===te?"Delete":te,re=M.onRefreshRuleSets,oe=M.app_integration_id,ie=M.token,le=M.modeId,ae=c(function(e){return e.selectedRuleSetId}),se=c(function(e){return e.scopeTreeData}),ue=c(function(e){return e.sidebarTab}),ce=c(function(e){return e.setInitialRules}),de=c(function(e){return e.currentRules}),pe=c(function(e){return e.setRawAuditRuleData});c(function(e){return e.createdVariantInfo});var me=c(function(e){return e.resetCreatedVariantInfo}),fe=c(function(e){return e.isILModalTriggered}),ve=c(function(e){return e.setIsILModalTriggered}),ge=a(null),he=O.getState().configuration,Te=s(!1),ye=Te[0],we=Te[1],Se=s(null),Ce=Se[0],je=Se[1],Re=s(null),be=Re[0],Ie=Re[1],De=s(null),xe=De[0],_e=De[1],Le=s(null),ke=Le[0],Oe=Le[1],Me=s(!1),Ae=Me[0],Ne=Me[1],Ee=s(null),Ve=Ee[0],Fe=Ee[1],Pe=s(!1),Be=Pe[0],Je=Pe[1],Ue=s(""),We=Ue[0],Ge=Ue[1],qe=s(null),He=qe[0],$e=qe[1],ze=s(!1),Ke=ze[0],Qe=ze[1],Xe=s(!1),Ye=Xe[0],Ze=Xe[1],et=s("ruleDeletion"),tt=et[0],nt=et[1],rt=s(null),ot=rt[0],it=rt[1],lt=s(!1),at=lt[0],st=lt[1],ut=s(!1),ct=ut[0],dt=ut[1],pt=c.getState().tiers,mt=s(null),ft=mt[0],vt=mt[1],gt=s(null),ht=gt[0],Tt=gt[1],yt=s(null),wt=yt[0],St=yt[1],Ct=function(){je(null),Ie(null),we(!0),Oe(0)},jt=function(){we(!1),ve(!1),je(null),Ie(null),_e(null),Oe(null),Ze(!1),dt(!1),Rt(),vt(null),Tt(null),St(null),re&&re(!1,ae||void 0)};u(function(){Rt()},[ae,ce]),u(function(){fe&&we(!0)},[fe]);var Rt=function(o){return void 0===o&&(o=!1),e(void 0,void 0,void 0,function(){var e,i,l,a,s,u,d,m,f,v,g,h,T,y,w,S,C,j,R;return t(this,function(t){switch(t.label){case 0:if(!ae)return ce([]),[2];o||Ne(!0),Fe(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,p(ae,ie)];case 2:return e=t.sent(),console.log("response==",e),(null==e?void 0:e.data)&&0!==Object.keys(e.data).length?(pe(e),i=e.data,console.log("rulesData==",i),l=new Set(["ruleSetName","ruleSetDesc","created_at","updated_at","created_by","updated_by"]),a=Array.isArray(i.tiers)?n([],i.tiers,!0).sort(function(e,t){var n,r;return(null!==(n=e.tier_priority)&&void 0!==n?n:0)-(null!==(r=t.tier_priority)&&void 0!==r?r:0)}).map(function(e){return[e.name,e.value]}):Object.entries(i).filter(function(e){var t=e[0],n=e[1];return!l.has(t)&&Array.isArray(n)}),s=a.map(function(e){var t=e[1];return new Set(t.flatMap(function(e){var t,n;return null!==(n=null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return e.link_id}).filter(Boolean))&&void 0!==n?n:[]}))}),u=s.flatMap(function(e){return Array.from(e)}),d=u.reduce(function(e,t){var n;return e[t]=(null!==(n=e[t])&&void 0!==n?n:0)+1,e},{}),m=new Set(Object.entries(d).filter(function(e){return e[1]>1}).map(function(e){return e[0]})),f=function(e){return e.map(function(e){var t;return r(r({},e),{variants:null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return r(r({},e),{isLinked:!!e.link_id&&m.has(e.link_id)})})})})},v=a.map(function(e,t){var n,r=e[0],o=e[1],i=pt.find(function(e){return e.tier_name===r}),l=r.replace(/tier(\d+)/i,"tier_$1");return{id:null!==(n=null==i?void 0:i.tier_id)&&void 0!==n?n:String(t+1),name:l.replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),ruleCount:o.length,description:0===t?"".concat(I("tier.subtitle","These are the system-wide learnings applied across all stations.")):"These learnings apply after higher-priority tiers and may refine or relax default behavior.",isOpen:0===t,rules:f(o)}}),(g=c.getState().createdVariantInfo)&&g.length>0?(h=Object.fromEntries(a.map(function(e,t){return[e[0],String(t+1)]})),T=new Set(g.map(function(e){return h[e.tierName]}).filter(Boolean)),y=v.map(function(e){return r(r({},e),{isOpen:e.isOpen||T.has(e.id)})}),ce(y),(w=null===(R=null===(j=null===(C=g[0])||void 0===C?void 0:C.variants)||void 0===j?void 0:j[0])||void 0===R?void 0:R.id)?setTimeout(function(){var e=document.querySelector('[data-variant-id="'.concat(w,'"]'));e&&e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(function(){return me()},1e4)},500):me()):ce(v),[3,5]):(ce([]),[2]);case 3:return S=t.sent(),console.error("Failed to fetch rule details",S),404!==(null==S?void 0:S.status)&&Fe((null==S?void 0:S.message)||"Failed to load rules. Please try again."),ce([]),[3,5];case 4:return o||Ne(!1),[7];case 5:return[2]}})})},bt=ae?j((null==se?void 0:se.data)||null,ae):null,It=bt?{ruleSetId:bt.id,ruleSetName:bt.name,ruleSetDesc:"",ruleCount:null===(A=null==bt?void 0:bt.metrics)||void 0===A?void 0:A.learningsCount}:void 0,Dt=Boolean(null==se?void 0:se.data),xt=Boolean(ae&&!bt&&Dt),_t=function(){if("stations"===ue)return"custom";if(!bt)return"global";switch(bt.type){case"GLOBAL":default:return"global";case"SCOPE":return"genre";case"SUBSCOPE":case"Custom":return"custom"}},Lt=function(e){var t;if(!e)return o("p",{children:I("".concat(k,".deleteDialog.description"),"Are you sure you want to delete this rule? This action cannot be undone.")});var n=null==de?void 0:de.flatMap(function(e){var t;return null!==(t=e.rules)&&void 0!==t?t:[]}).find(function(t){return t.ruleId===e});return o("p",{children:I("".concat(k,".deleteDialog.description"),"Are you sure you want to delete ".concat(null==n?void 0:n.ruleTitle," rule? This action cannot be undone."),{rule_title:null!==(t=null==n?void 0:n.ruleTitle)&&void 0!==t?t:""})})},kt={editingRule:Ce,editingTier:be,editingVariants:xe,focusedVariantIndex:ke,setFocusedVariantIndex:Oe,triggerAddVariant:Ye,triggerFixGaps:ct,copiedRule:ft,copiedSourceTier:ht,copiedTargetTier:wt,initialDraftMessage:We,app_integration_id:oe,modeId:le};return It?i(l,{children:[o(T,{ref:ge}),o("div",r({className:R.container},{children:Ae?o(h,{}):Ve?o(w,{errorMessage:Ve,onRetry:Rt}):o(y,{onAddRule:Ct,onDeleteRule:function(e){$e(e)},onEditRule:function(e,t){je(e),Ie(t||null),_e(e.variants||null),Oe(null),Ze(!0),we(!0)},onEditVariant:function(e,t,n,r){var o,i,l,a,s=null!==(l=null===(i=null===(o=null==de?void 0:de.find(function(e){return e.name===n}))||void 0===o?void 0:o.rules)||void 0===i?void 0:i.find(function(e){return e.ruleId===t}))&&void 0!==l?l:null==de?void 0:de.flatMap(function(e){return e.rules}).find(function(e){return e.ruleId===t});if(s){var u=null===(a=s.variants)||void 0===a?void 0:a.findIndex(function(t){return t.variantId===e.variantId}),c=void 0!==u&&-1!==u?u:0;je(s),Ie(n||null),_e(s.variants||null),Oe(c),we(!0),"resolve_gaps"===r&&dt(!0)}},onDeleteVariant:function(e,t){it({variantId:e,ruleId:t})},onExportRule:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l,a,s;return t(this,function(t){switch(t.label){case 0:if(!ae)return[2];Je(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,m(ae)];case 2:return e=t.sent(),n=window.URL.createObjectURL(e),(r=document.createElement("a")).href=n,i=(null==It?void 0:It.ruleSetName)?"".concat(It.ruleSetName.replace(/\s+/g,"_"),"_rules.csv"):"ruleset_".concat(ae,".csv"),r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n),null===(a=ge.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:"Ruleset exported successfully!"})}),[3,5];case 3:return l=t.sent(),console.error("Export error:",l),null===(s=ge.current)||void 0===s||s.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:l.message||"Failed to export ruleset. Please try again."})}),[3,5];case 4:return Je(!1),[7];case 5:return[2]}})})},isExporting:Be,onToggleSuccess:function(){return Rt(!0)},onReorderRules:function(n,r,i,l,a){return e(void 0,void 0,void 0,function(){var e,s,u;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,g(n,r,i,l,a)];case 1:return t.sent(),Rt(!0),null===(s=ge.current)||void 0===s||s.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:"Rule order changed successfully. Future rule applications will follow the updated order."})}),[3,3];case 2:return e=t.sent(),console.error("Failed to reorder rules:",e),Rt(!0),null===(u=ge.current)||void 0===u||u.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:"Failed to update rule order. Please try again."})}),[3,3];case 3:return[2]}})})},onRefreshRuleSets:re,setDeleteConfirmationUsedFor:nt,onCopyToTier:function(e,t,n,r,o){var i,l,a=null===(l=null===(i=null==de?void 0:de.find(function(e){return e.name===r}))||void 0===i?void 0:i.rules)||void 0===l?void 0:l.find(function(e){return e.ruleId===t});if(a){var s=["Add a new learning with the following details:","- Rule Title: ".concat(n),"- Description: ".concat(e.description),"- When to apply: ".concat(e.whenToApply),"- When NOT to apply: ".concat(e.whenNotToApply),"- Tier information: ".concat(o)].join("\n");Ge(s),vt(a),Tt(r),St(o),je(null),Ie(null),_e(null),Oe(null),we(!0)}}})})),ye&&o(D,{children:o(x,{isOpen:ye,onClose:jt,app_integration_id:oe,token:ie,mode:"ADD",config:he,pluginPayload:r(r({},kt),{initialScope:_t(),ruleSet:It})})}),o(b,{isOpen:!!He,title:I("".concat(_,".deleteDialog.title"),Q),description:Lt(He),warning:I("".concat(_,".deleteDialog.warningText"),Y),confirmText:I("".concat(_,".deleteDialog.deleteText"),ne),cancelText:I("".concat(_,".deleteDialog.cancelText"),"Cancel"),loadingText:I("".concat(_,".deleteDialog.loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!He)return[2];Qe(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,f(He)];case 2:return t.sent(),$e(null),null===(n=ge.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:U})}),Rt(),re&&re(!1,ae||void 0),[3,5];case 3:return e=t.sent(),console.error("Failed to delete rule",e),null===(r=ge.current)||void 0===r||r.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||H})}),[3,5];case 4:return Qe(!1),[7];case 5:return[2]}})})},onCancel:function(){return $e(null)},isLoading:Ke}),o(b,{isOpen:!!ot,title:I("".concat(L,".deleteVariant.title"),Q),description:"variantDeletion"===tt?o("span",{children:I("".concat(L,".deleteVariant.desc"),"Are you sure you want to delete this variant? This action cannot be undone.")}):Lt((null==ot?void 0:ot.ruleId)||null),warning:I("".concat(L,".deleteVariant.warningText"),"ruleDeletion"===tt?Y:ee),confirmText:I("".concat(L,".deleteDialog.deleteText"),ne),cancelText:I("".concat(L,".cancelText"),"Cancel"),loadingText:I("".concat(L,".loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!ot)return[2];st(!0),t.label=1;case 1:return t.trys.push([1,6,7,8]),"ruleDeletion"!==tt?[3,3]:[4,v(ot.ruleId)];case 2:return t.sent(),[3,5];case 3:return[4,f(ot.variantId)];case 4:t.sent(),t.label=5;case 5:return it(null),null===(n=ge.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:"ruleDeletion"===tt?U:G})}),Rt(),re&&re(!1,ae||void 0),[3,8];case 6:return e=t.sent(),console.error("Failed to delete variant",e),null===(r=ge.current)||void 0===r||r.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||("ruleDeletion"===tt?H:z)})}),[3,8];case 7:return st(!1),[7];case 8:return[2]}})})},onCancel:function(){return it(null)},isLoading:at})]}):xt?o(w,{title:"Scope Not Found",errorMessage:"The selected scope does not exist. Please refresh the page or choose a valid scope.",onRetry:function(){return null==re?void 0:re(!0)},retryButtonText:"Refresh"}):i(l,{children:[o(d,{onCreate:Ct,title:E,desc:F,button:B}),ye&&o(D,{children:o(x,{isOpen:ye,onClose:jt,app_integration_id:oe,token:ie,mode:"ADD",config:he,pluginPayload:r(r({},kt),{initialScope:_t(),ruleSet:It})})})]})};export{M as default};
|
|
1
|
+
import{__awaiter as e,__generator as t,__spreadArray as n,__assign as r}from"tslib";import{jsx as o,jsxs as i,Fragment as l}from"react/jsx-runtime";import{useRef as a,useState as s,useEffect as u}from"react";import{useLearningTemplateStore as c}from"../store/useLearningTemplateStore.js";import d from"../components/EmptyLearningState.js";import{getRulesInRuleSetById as p,exportRuleSet as m,deleteRule as f,deleteQuestion as v,alterQuestionPriority as g}from"../apis/scopeApis.js";import h from"../components/RuleContentSkeleton.js";import{Toast as T}from"primereact/toast";import y from"./ContentLogic.js";import w from"../components/ErrorStateDisplay.js";import S from"../shared/SuccessToastContent.js";import C from"../shared/ErrorToastContent.js";import{findNodeById as j}from"../utils/treeUtils.js";import R from"../styles/LearningContent.module.css.js";import b from"../components/ConfirmationModal.js";import{dt as I}from"../store/useLMSConfigStore.js";import"../../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"lucide-react";import"../../IL-OTJ/_components/InputDataReasoningCard.js";import"../../IL-OTJ/_components/TooltipComponent.js";import"../../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import{CitationProvider as D}from"../../IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import x from"../../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import{LEARNING_DT_PATH as _,VARIANT_DT_PATH as L,TIER_DT_PATH as k}from"../constants.js";import{useConfigStore as O}from"../store/useConfigStore.js";import"../store/usePermissionsStore.js";import"appsec-ui";import"../store/useAuthStore.js";import"../store/useEnvStore.js";import"@radix-ui/react-tooltip";import"../components/StationOnboarding/InputField.js";import"../config.js";import"../store/useAppSecRolesStore.js";import"@tanstack/react-query";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"../AuditLog/ChangeLogDiff.js";import"../components/ToolTip.js";import"react-router-dom";import"../LearningManagementTest.js";var M=function(M){var A,N=M.noRulesTitle,E=void 0===N?"No rules have been added !":N,V=M.noRulesDesc,F=void 0===V?"Start by adding rules that should apply across all stations.":V,P=M.noRulesButtonText,B=void 0===P?"Create New Rule":P,J=M.deleteRuleSuccessMessage,U=void 0===J?"Rule deleted successfully!":J,W=M.deleteVariantSuccessMessage,q=void 0===W?"Variant deleted successfully!":W,G=M.deleteRuleErrorMessage,H=void 0===G?"Failed to delete rule. Please try again.":G,$=M.deleteVariantErrorMessage,z=void 0===$?"Failed to delete variant. Please try again.":$,K=M.deleteModalTitle,Q=void 0===K?"Delete":K,X=M.deleteRuleModalWarning,Y=void 0===X?"This will permanently delete the rule configuration.":X,Z=M.deleteVariantModalWarning,ee=void 0===Z?"This will permanently delete the variant configuration.":Z,te=M.deleteConfirmText,ne=void 0===te?"Delete":te,re=M.onRefreshRuleSets,oe=M.app_integration_id,ie=M.token,le=M.modeId,ae=c(function(e){return e.selectedRuleSetId}),se=c(function(e){return e.scopeTreeData}),ue=c(function(e){return e.sidebarTab}),ce=c(function(e){return e.setInitialRules}),de=c(function(e){return e.currentRules}),pe=c(function(e){return e.setRawAuditRuleData});c(function(e){return e.createdVariantInfo});var me=c(function(e){return e.resetCreatedVariantInfo}),fe=c(function(e){return e.isILModalTriggered}),ve=c(function(e){return e.setIsILModalTriggered}),ge=a(null),he=O.getState().configuration,Te=s(!1),ye=Te[0],we=Te[1],Se=s(null),Ce=Se[0],je=Se[1],Re=s(null),be=Re[0],Ie=Re[1],De=s(null),xe=De[0],_e=De[1],Le=s(null),ke=Le[0],Oe=Le[1],Me=s(!1),Ae=Me[0],Ne=Me[1],Ee=s(null),Ve=Ee[0],Fe=Ee[1],Pe=s(!1),Be=Pe[0],Je=Pe[1],Ue=s(""),We=Ue[0],qe=Ue[1],Ge=s(null),He=Ge[0],$e=Ge[1],ze=s(!1),Ke=ze[0],Qe=ze[1],Xe=s(!1),Ye=Xe[0],Ze=Xe[1],et=s("ruleDeletion"),tt=et[0],nt=et[1],rt=s(null),ot=rt[0],it=rt[1],lt=s(!1),at=lt[0],st=lt[1],ut=s(!1),ct=ut[0],dt=ut[1],pt=c.getState().tiers,mt=s(null),ft=mt[0],vt=mt[1],gt=s(null),ht=gt[0],Tt=gt[1],yt=s(null),wt=yt[0],St=yt[1],Ct=function(){je(null),Ie(null),we(!0),Oe(0)},jt=function(){we(!1),ve(!1),je(null),Ie(null),_e(null),Oe(null),Ze(!1),dt(!1),Rt(),vt(null),Tt(null),St(null),re&&re(!1,ae||void 0)};u(function(){Rt()},[ae,ce]),u(function(){fe&&we(!0)},[fe]);var Rt=function(o){return void 0===o&&(o=!1),e(void 0,void 0,void 0,function(){var e,i,l,a,s,u,d,m,f,v,g,h,T,y,w,S,C,j,R;return t(this,function(t){switch(t.label){case 0:if(!ae)return ce([]),[2];o||Ne(!0),Fe(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,p(ae,ie)];case 2:return e=t.sent(),console.log("response==",e),(null==e?void 0:e.data)&&0!==Object.keys(e.data).length?(pe(e),i=e.data,console.log("rulesData==",i),l=new Set(["ruleSetName","ruleSetDesc","created_at","updated_at","created_by","updated_by"]),a=Array.isArray(i.tiers)?n([],i.tiers,!0).sort(function(e,t){var n,r;return(null!==(n=e.tier_priority)&&void 0!==n?n:0)-(null!==(r=t.tier_priority)&&void 0!==r?r:0)}).map(function(e){return[e.name,e.value]}):Object.entries(i).filter(function(e){var t=e[0],n=e[1];return!l.has(t)&&Array.isArray(n)}),s=a.map(function(e){var t=e[1];return new Set(t.flatMap(function(e){var t,n;return null!==(n=null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return e.link_id}).filter(Boolean))&&void 0!==n?n:[]}))}),u=s.flatMap(function(e){return Array.from(e)}),d=u.reduce(function(e,t){var n;return e[t]=(null!==(n=e[t])&&void 0!==n?n:0)+1,e},{}),m=new Set(Object.entries(d).filter(function(e){return e[1]>1}).map(function(e){return e[0]})),f=function(e){return e.map(function(e){var t;return r(r({},e),{variants:null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return r(r({},e),{isLinked:!!e.link_id&&m.has(e.link_id)})})})})},v=a.map(function(e,t){var n,r=e[0],o=e[1],i=pt.find(function(e){return e.tier_name===r}),l=r.replace(/tier(\d+)/i,"tier_$1");return{id:null!==(n=null==i?void 0:i.tier_id)&&void 0!==n?n:String(t+1),name:l.replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),ruleCount:o.length,description:0===t?"".concat(I("tier.subtitle","These are the system-wide learnings applied across all stations.")):"These learnings apply after higher-priority tiers and may refine or relax default behavior.",isOpen:0===t,rules:f(o)}}),(g=c.getState().createdVariantInfo)&&g.length>0?(h=Object.fromEntries(a.map(function(e,t){return[e[0],String(t+1)]})),T=new Set(g.map(function(e){return h[e.tierName]}).filter(Boolean)),y=v.map(function(e){return r(r({},e),{isOpen:e.isOpen||T.has(e.id)})}),ce(y),(w=null===(R=null===(j=null===(C=g[0])||void 0===C?void 0:C.variants)||void 0===j?void 0:j[0])||void 0===R?void 0:R.id)?setTimeout(function(){var e=document.querySelector('[data-variant-id="'.concat(w,'"]'));e&&e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(function(){return me()},1e4)},500):me()):ce(v),[3,5]):(ce([]),[2]);case 3:return S=t.sent(),console.error("Failed to fetch rule details",S),404!==(null==S?void 0:S.status)&&Fe((null==S?void 0:S.message)||"Failed to load rules. Please try again."),ce([]),[3,5];case 4:return o||Ne(!1),[7];case 5:return[2]}})})},bt=ae?j((null==se?void 0:se.data)||null,ae):null,It=bt?{ruleSetId:bt.id,ruleSetName:bt.name,ruleSetDesc:"",ruleCount:null===(A=null==bt?void 0:bt.metrics)||void 0===A?void 0:A.learningsCount}:void 0,Dt=Boolean(null==se?void 0:se.data),xt=Boolean(ae&&!bt&&Dt),_t=function(){if("stations"===ue)return"custom";if(!bt)return"global";switch(bt.type){case"GLOBAL":default:return"global";case"SCOPE":return"genre";case"SUBSCOPE":case"Custom":return"custom"}},Lt=function(e){var t;if(!e)return o("p",{children:I("".concat(k,".deleteDialog.description"),"Are you sure you want to delete this rule? This action cannot be undone.")});var n=null==de?void 0:de.flatMap(function(e){var t;return null!==(t=e.rules)&&void 0!==t?t:[]}).find(function(t){return t.ruleId===e});return o("p",{children:I("".concat(k,".deleteDialog.description"),"Are you sure you want to delete ".concat(null==n?void 0:n.ruleTitle," rule? This action cannot be undone."),{rule_title:null!==(t=null==n?void 0:n.ruleTitle)&&void 0!==t?t:""})})},kt={editingRule:Ce,editingTier:be,editingVariants:xe,focusedVariantIndex:ke,setFocusedVariantIndex:Oe,triggerAddVariant:Ye,triggerFixGaps:ct,copiedRule:ft,copiedSourceTier:ht,copiedTargetTier:wt,initialDraftMessage:We,app_integration_id:oe,modeId:le};return It?i(l,{children:[o(T,{ref:ge}),o("div",r({className:R.container},{children:Ae?o(h,{}):Ve?o(w,{errorMessage:Ve,onRetry:Rt}):o(y,{onAddRule:Ct,onDeleteRule:function(e){$e(e)},onEditRule:function(e,t){je(e),Ie(t||null),_e(e.variants||null),Oe(null),Ze(!0),we(!0)},onEditVariant:function(e,t,n,r){var o,i,l,a,s=null!==(l=null===(i=null===(o=null==de?void 0:de.find(function(e){return e.name===n}))||void 0===o?void 0:o.rules)||void 0===i?void 0:i.find(function(e){return e.ruleId===t}))&&void 0!==l?l:null==de?void 0:de.flatMap(function(e){return e.rules}).find(function(e){return e.ruleId===t});if(s){var u=null===(a=s.variants)||void 0===a?void 0:a.findIndex(function(t){return t.variantId===e.variantId}),c=void 0!==u&&-1!==u?u:0;je(s),Ie(n||null),_e(s.variants||null),Oe(c),we(!0),"resolve_gaps"===r&&dt(!0)}},onDeleteVariant:function(e,t){it({variantId:e,ruleId:t})},onExportRule:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l,a,s;return t(this,function(t){switch(t.label){case 0:if(!ae)return[2];Je(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,m(ae)];case 2:return e=t.sent(),n=window.URL.createObjectURL(e),(r=document.createElement("a")).href=n,i=(null==It?void 0:It.ruleSetName)?"".concat(It.ruleSetName.replace(/\s+/g,"_"),"_rules.csv"):"ruleset_".concat(ae,".csv"),r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n),null===(a=ge.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:"Ruleset exported successfully!"})}),[3,5];case 3:return l=t.sent(),console.error("Export error:",l),null===(s=ge.current)||void 0===s||s.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:l.message||"Failed to export ruleset. Please try again."})}),[3,5];case 4:return Je(!1),[7];case 5:return[2]}})})},isExporting:Be,onToggleSuccess:function(){return Rt(!0)},onReorderRules:function(n,r,i,l,a){return e(void 0,void 0,void 0,function(){var e,s,u;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,g(n,r,i,l,a)];case 1:return t.sent(),Rt(!0),null===(s=ge.current)||void 0===s||s.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:"Rule order changed successfully. Future rule applications will follow the updated order."})}),[3,3];case 2:return e=t.sent(),console.error("Failed to reorder rules:",e),Rt(!0),null===(u=ge.current)||void 0===u||u.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:"Failed to update rule order. Please try again."})}),[3,3];case 3:return[2]}})})},onRefreshRuleSets:re,setDeleteConfirmationUsedFor:nt,onCopyToTier:function(e,t,n,r,o){var i,l,a=null===(l=null===(i=null==de?void 0:de.find(function(e){return e.name===r}))||void 0===i?void 0:i.rules)||void 0===l?void 0:l.find(function(e){return e.ruleId===t});if(a){var s=["Add a new learning with the following details:","- Rule Title: ".concat(n),"- Description: ".concat(e.description),"- When to apply: ".concat(e.whenToApply),"- When NOT to apply: ".concat(e.whenNotToApply),"- Tier information: ".concat(o)].join("\n");qe(s),vt(a),Tt(r),St(o),je(null),Ie(null),_e(null),Oe(null),we(!0)}}})})),ye&&o(D,{children:o(x,{isOpen:ye,onClose:jt,app_integration_id:oe,token:ie,mode:"ADD",config:he,pluginPayload:r(r({},kt),{initialScope:_t(),ruleSet:It})})}),o(b,{isOpen:!!He,title:I("".concat(_,".deleteDialog.title"),Q),description:Lt(He),warning:I("".concat(_,".deleteDialog.warningText"),Y),confirmText:I("".concat(_,".deleteDialog.deleteText"),ne),cancelText:I("".concat(_,".deleteDialog.cancelText"),"Cancel"),loadingText:I("".concat(_,".deleteDialog.loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!He)return[2];Qe(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,f(He)];case 2:return t.sent(),$e(null),null===(n=ge.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:U})}),Rt(),re&&re(!1,ae||void 0),[3,5];case 3:return e=t.sent(),console.error("Failed to delete rule",e),null===(r=ge.current)||void 0===r||r.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||H})}),[3,5];case 4:return Qe(!1),[7];case 5:return[2]}})})},onCancel:function(){return $e(null)},isLoading:Ke}),o(b,{isOpen:!!ot,title:I("".concat(L,".deleteVariant.title"),Q),description:"variantDeletion"===tt?o("span",{children:I("".concat(L,".deleteVariant.desc"),"Are you sure you want to delete this variant? This action cannot be undone.")}):Lt((null==ot?void 0:ot.ruleId)||null),warning:I("".concat(L,".deleteVariant.warningText"),"ruleDeletion"===tt?Y:ee),confirmText:I("".concat(L,".deleteDialog.deleteText"),ne),cancelText:I("".concat(L,".cancelText"),"Cancel"),loadingText:I("".concat(L,".loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!ot)return[2];st(!0),t.label=1;case 1:return t.trys.push([1,6,7,8]),"ruleDeletion"!==tt?[3,3]:[4,v(ot.ruleId)];case 2:return t.sent(),[3,5];case 3:return[4,f(ot.variantId)];case 4:t.sent(),t.label=5;case 5:return it(null),null===(n=ge.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:R.successToast,content:o(S,{message:"ruleDeletion"===tt?U:q})}),Rt(),re&&re(!1,ae||void 0),[3,8];case 6:return e=t.sent(),console.error("Failed to delete variant",e),null===(r=ge.current)||void 0===r||r.show({severity:"error",sticky:!1,className:R.errorToast,content:o(C,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||("ruleDeletion"===tt?H:z)})}),[3,8];case 7:return st(!1),[7];case 8:return[2]}})})},onCancel:function(){return it(null)},isLoading:at})]}):xt?o(w,{title:"Scope Not Found",errorMessage:"The selected scope does not exist. Please refresh the page or choose a valid scope.",onRetry:function(){return null==re?void 0:re(!0)},retryButtonText:"Refresh"}):i(l,{children:[o(d,{onCreate:Ct,title:E,desc:F,button:B}),ye&&o(D,{children:o(x,{isOpen:ye,onClose:jt,app_integration_id:oe,token:ie,mode:"ADD",config:he,pluginPayload:r(r({},kt),{initialScope:_t(),ruleSet:It})})})]})};export{M as default};
|
|
2
2
|
//# sourceMappingURL=RuleContent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as o,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as a}from"react";import n from"./styles/Sidebar.module.css.js";import c from"./components/SidebarSearch.js";import{TreeSidebar as i}from"./components/ScopeTree/TreeSidebar.js";import{dt as s}from"./store/useLMSConfigStore.js";import{MIDDLE_DRAWER_DT_PATH as d}from"./constants.js";import{useLearningTemplateStore as l}from"./store/useLearningTemplateStore.js";var m=function(m){var S=m.scopeTreeData,p=m.selectedRuleSetId,h=m.onAddChild,C=m.onRenameChild,f=m.onDeleteChild,u=m.canDeleteScope,v=m.canEditScope,g=m.canCreateScope,b=m.onSectionSelect,j=m.activeSectionId;m.onOnboardStation;var T=m.sectionsConfig,y=m.nodeTypesConfig,D=m.searchPlaceholder,I=void 0===D?s("".concat(d,".treeMenu.search"),"Search for Scopes.."):D,R=a(""),N=R[0],x=R[1],A=a(0),E=A[0],L=A[1];return l.getState().backwardCompatibility,o("div",e({className:n.sidebar},{children:t(r,{children:[o(c,{value:N,onChange:x,placeholder:I,searchCount:E}),o("div",{className:n.divider}),o("div",e({className:n.content},{children:S&&o(i,{data:S.data,onAddChild:h,onRenameChild:C,onDeleteChild:f,canDeleteScope:u,canEditScope:v,canCreateScope:g,onSectionSelect:b,selectedRuleSetId:p,activeSectionId:j,searchQuery:N,onSearchCountChange:L,sectionsConfig:T,nodeTypesConfig:y})}))]})}))};export{m as default};
|
|
2
2
|
//# sourceMappingURL=Sidebar.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"react";var t="data:image/svg+xml,%3Csvg%20width%3D%22160%22%20height%3D%22153%22%20viewBox%3D%220%200%20160%20153%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M79.2744%20143.735C116.627%20143.735%20146.909%20113.508%20146.909%2076.223C146.909%2038.9359%20116.627%208.71106%2079.2744%208.71106C41.9192%208.71106%2011.6367%2038.9359%2011.6367%2076.223C11.6367%20113.508%2041.9192%20143.735%2079.2744%20143.735Z%22%20fill%3D%22%23F8FAFC%22%2F%3E%3Cpath%20d%3D%22M116.902%2030.8984H43.3269C38.7417%2030.8984%2035.0234%2034.7993%2035.0234%2039.6097H125.205C125.205%2034.7993%20121.489%2030.8984%20116.902%2030.8984Z%22%20fill%3D%22%23D0D9E4%22%2F%3E%3Cpath%20d%3D%22M35.0234%2039.6094H125.205V109.239C125.205%20112.335%20123.994%20115.304%20121.834%20117.494C119.674%20119.684%20116.745%20120.914%20113.692%20120.914H46.5394C43.4834%20120.914%2040.555%20119.684%2038.3973%20117.494C36.2372%20115.304%2035.0234%20112.335%2035.0234%20109.239V39.6094Z%22%20fill%3D%22%23F1F5F9%22%2F%3E%3Cpath%20d%3D%22M125.155%2039.6592V109.239C125.155%20112.322%20123.949%20115.279%20121.798%20117.459C119.647%20119.639%20116.731%20120.864%20113.691%20120.864H46.5391C43.4967%20120.864%2040.5809%20119.639%2038.4326%20117.459C36.2818%20115.279%2035.0732%20112.322%2035.0732%20109.239V39.6592H125.155Z%22%20stroke%3D%22%2364748B%22%20stroke-opacity%3D%220.1%22%20stroke-width%3D%220.1%22%2F%3E%3Cpath%20d%3D%22M70.571%2048.3203H48.9307C48.4799%2048.3203%2048.1133%2049.295%2048.1133%2050.4981C48.1133%2051.7012%2048.4799%2052.6759%2048.9307%2052.6759H70.571C71.0218%2052.6759%2071.386%2051.7012%2071.386%2050.4981C71.386%2049.295%2071.0218%2048.3203%2070.571%2048.3203Z%22%20fill%3D%22url%28%23paint0_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M70.571%2067.1953H48.9307C48.4799%2067.1953%2048.1133%2068.17%2048.1133%2069.3731C48.1133%2070.5762%2048.4799%2071.5509%2048.9307%2071.5509H70.571C71.0218%2071.5509%2071.386%2070.5762%2071.386%2069.3731C71.386%2068.17%2071.0218%2067.1953%2070.571%2067.1953Z%22%20fill%3D%22url%28%23paint1_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M70.571%2086.0703H48.9307C48.4799%2086.0703%2048.1133%2087.0468%2048.1133%2088.2493C48.1133%2089.4517%2048.4799%2090.4259%2048.9307%2090.4259H70.571C71.0218%2090.4259%2071.386%2089.4517%2071.386%2088.2493C71.386%2087.0468%2071.0218%2086.0703%2070.571%2086.0703Z%22%20fill%3D%22url%28%23paint2_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M70.571%20104.945H48.9307C48.4799%20104.945%2048.1133%20105.922%2048.1133%20107.124C48.1133%20108.327%2048.4799%20109.301%2048.9307%20109.301H70.571C71.0218%20109.301%2071.386%20108.327%2071.386%20107.124C71.386%20105.922%2071.0218%20104.945%2070.571%20104.945Z%22%20fill%3D%22url%28%23paint3_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%2048.3203H78.6367C77.8481%2048.3203%2077.207%2049.295%2077.207%2050.4981C77.207%2051.7012%2077.8481%2052.6759%2078.6367%2052.6759H116.507C117.296%2052.6759%20117.934%2051.7012%20117.934%2050.4981C117.934%2049.295%20117.296%2048.3203%20116.507%2048.3203Z%22%20fill%3D%22url%28%23paint4_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%2086.0703H78.6367C77.8481%2086.0703%2077.207%2087.045%2077.207%2088.2481C77.207%2089.4512%2077.8481%2090.4259%2078.6367%2090.4259H116.507C117.296%2090.4259%20117.934%2089.4512%20117.934%2088.2481C117.934%2087.045%20117.296%2086.0703%20116.507%2086.0703Z%22%20fill%3D%22url%28%23paint5_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%2067.1953H78.6367C77.8481%2067.1953%2077.207%2068.17%2077.207%2069.3731C77.207%2070.5762%2077.8481%2071.5509%2078.6367%2071.5509H116.507C117.296%2071.5509%20117.934%2070.5762%20117.934%2069.3731C117.934%2068.17%20117.296%2067.1953%20116.507%2067.1953Z%22%20fill%3D%22url%28%23paint6_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%20104.945H78.6367C77.8481%20104.945%2077.207%20105.92%2077.207%20107.123C77.207%20108.326%2077.8481%20109.301%2078.6367%20109.301H116.507C117.296%20109.301%20117.934%20108.326%20117.934%20107.123C117.934%20105.92%20117.296%20104.945%20116.507%20104.945Z%22%20fill%3D%22url%28%23paint7_linear_1020_82405%29%22%2F%3E%3CforeignObject%20x%3D%2270.7116%22%20y%3D%2260.6843%22%20width%3D%2279.8961%22%20height%3D%2279.81%22%3E%3Cdiv%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%20style%3D%22backdrop-filter%3Ablur%288.34px%29%3Bclip-path%3Aurl%28%23bgblur_0_1020_82405_clip_path%29%3Bheight%3A100%25%3Bwidth%3A100%25%22%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3Cpath%20data-figma-bg-blur-radius%3D%2216.6751%22%20d%3D%22M110.659%20123.819C123.513%20123.819%20133.932%20113.419%20133.932%20100.589C133.932%2087.7597%20123.513%2077.3594%20110.659%2077.3594C97.8062%2077.3594%2087.3867%2087.7597%2087.3867%20100.589C87.3867%20113.419%2097.8062%20123.819%20110.659%20123.819Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M110.659%2085.3419C111.63%2085.3458%20112.413%2086.1299%20112.411%2087.0961L112.395%2098.2651L123.584%2098.2817C124.555%2098.2856%20125.338%2099.0696%20125.339%20100.038C125.335%20101.007%20124.55%20101.789%20123.579%20101.79L112.39%20101.773L112.373%20112.942C112.372%20113.908%20111.586%20114.69%20110.615%20114.691C109.645%20114.687%20108.862%20113.903%20108.861%20112.935L108.877%20101.766L97.6878%20101.749C96.7198%20101.748%2095.9366%20100.964%2095.9355%2099.9948C95.9395%2099.0261%2096.725%2098.2443%2097.693%2098.2458L108.883%2098.2623L108.899%2087.0934C108.903%2086.1247%20109.689%2085.3429%20110.659%2085.3419Z%22%20fill%3D%22%23CBD5E1%22%2F%3E%3Cdefs%3E%3CclipPath%20id%3D%22bgblur_0_1020_82405_clip_path%22%20transform%3D%22translate%28-70.7116%20-60.6843%29%22%3E%3Cpath%20d%3D%22M110.659%20123.819C123.513%20123.819%20133.932%20113.419%20133.932%20100.589C133.932%2087.7597%20123.513%2077.3594%20110.659%2077.3594C97.8062%2077.3594%2087.3867%2087.7597%2087.3867%20100.589C87.3867%20113.419%2097.8062%20123.819%20110.659%20123.819Z%22%2F%3E%3C%2FclipPath%3E%3ClinearGradient%20id%3D%22paint0_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%2252.497%22%20x2%3D%2272.7628%22%20y2%3D%2252.497%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint1_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%2271.372%22%20x2%3D%2272.7628%22%20y2%3D%2271.372%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint2_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%2290.247%22%20x2%3D%2272.7628%22%20y2%3D%2290.247%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint3_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%22109.122%22%20x2%3D%2272.7628%22%20y2%3D%22109.122%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint4_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%2252.497%22%20x2%3D%22120.344%22%20y2%3D%2252.497%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint5_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%2290.247%22%20x2%3D%22120.344%22%20y2%3D%2290.247%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint6_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%2271.372%22%20x2%3D%22120.344%22%20y2%3D%2271.372%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint7_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%22109.122%22%20x2%3D%22120.344%22%20y2%3D%22109.122%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E";export{t as default};
|
|
2
|
+
//# sourceMappingURL=Search-result(add new).svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Search-result(add new).svg.js","sources":["../../../../src/features/LearningManagement/assets/Search-result(add new).svg"],"sourcesContent":["export default \"data:image/svg+xml,%3Csvg%20width%3D%22160%22%20height%3D%22153%22%20viewBox%3D%220%200%20160%20153%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M79.2744%20143.735C116.627%20143.735%20146.909%20113.508%20146.909%2076.223C146.909%2038.9359%20116.627%208.71106%2079.2744%208.71106C41.9192%208.71106%2011.6367%2038.9359%2011.6367%2076.223C11.6367%20113.508%2041.9192%20143.735%2079.2744%20143.735Z%22%20fill%3D%22%23F8FAFC%22%2F%3E%3Cpath%20d%3D%22M116.902%2030.8984H43.3269C38.7417%2030.8984%2035.0234%2034.7993%2035.0234%2039.6097H125.205C125.205%2034.7993%20121.489%2030.8984%20116.902%2030.8984Z%22%20fill%3D%22%23D0D9E4%22%2F%3E%3Cpath%20d%3D%22M35.0234%2039.6094H125.205V109.239C125.205%20112.335%20123.994%20115.304%20121.834%20117.494C119.674%20119.684%20116.745%20120.914%20113.692%20120.914H46.5394C43.4834%20120.914%2040.555%20119.684%2038.3973%20117.494C36.2372%20115.304%2035.0234%20112.335%2035.0234%20109.239V39.6094Z%22%20fill%3D%22%23F1F5F9%22%2F%3E%3Cpath%20d%3D%22M125.155%2039.6592V109.239C125.155%20112.322%20123.949%20115.279%20121.798%20117.459C119.647%20119.639%20116.731%20120.864%20113.691%20120.864H46.5391C43.4967%20120.864%2040.5809%20119.639%2038.4326%20117.459C36.2818%20115.279%2035.0732%20112.322%2035.0732%20109.239V39.6592H125.155Z%22%20stroke%3D%22%2364748B%22%20stroke-opacity%3D%220.1%22%20stroke-width%3D%220.1%22%2F%3E%3Cpath%20d%3D%22M70.571%2048.3203H48.9307C48.4799%2048.3203%2048.1133%2049.295%2048.1133%2050.4981C48.1133%2051.7012%2048.4799%2052.6759%2048.9307%2052.6759H70.571C71.0218%2052.6759%2071.386%2051.7012%2071.386%2050.4981C71.386%2049.295%2071.0218%2048.3203%2070.571%2048.3203Z%22%20fill%3D%22url%28%23paint0_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M70.571%2067.1953H48.9307C48.4799%2067.1953%2048.1133%2068.17%2048.1133%2069.3731C48.1133%2070.5762%2048.4799%2071.5509%2048.9307%2071.5509H70.571C71.0218%2071.5509%2071.386%2070.5762%2071.386%2069.3731C71.386%2068.17%2071.0218%2067.1953%2070.571%2067.1953Z%22%20fill%3D%22url%28%23paint1_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M70.571%2086.0703H48.9307C48.4799%2086.0703%2048.1133%2087.0468%2048.1133%2088.2493C48.1133%2089.4517%2048.4799%2090.4259%2048.9307%2090.4259H70.571C71.0218%2090.4259%2071.386%2089.4517%2071.386%2088.2493C71.386%2087.0468%2071.0218%2086.0703%2070.571%2086.0703Z%22%20fill%3D%22url%28%23paint2_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M70.571%20104.945H48.9307C48.4799%20104.945%2048.1133%20105.922%2048.1133%20107.124C48.1133%20108.327%2048.4799%20109.301%2048.9307%20109.301H70.571C71.0218%20109.301%2071.386%20108.327%2071.386%20107.124C71.386%20105.922%2071.0218%20104.945%2070.571%20104.945Z%22%20fill%3D%22url%28%23paint3_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%2048.3203H78.6367C77.8481%2048.3203%2077.207%2049.295%2077.207%2050.4981C77.207%2051.7012%2077.8481%2052.6759%2078.6367%2052.6759H116.507C117.296%2052.6759%20117.934%2051.7012%20117.934%2050.4981C117.934%2049.295%20117.296%2048.3203%20116.507%2048.3203Z%22%20fill%3D%22url%28%23paint4_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%2086.0703H78.6367C77.8481%2086.0703%2077.207%2087.045%2077.207%2088.2481C77.207%2089.4512%2077.8481%2090.4259%2078.6367%2090.4259H116.507C117.296%2090.4259%20117.934%2089.4512%20117.934%2088.2481C117.934%2087.045%20117.296%2086.0703%20116.507%2086.0703Z%22%20fill%3D%22url%28%23paint5_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%2067.1953H78.6367C77.8481%2067.1953%2077.207%2068.17%2077.207%2069.3731C77.207%2070.5762%2077.8481%2071.5509%2078.6367%2071.5509H116.507C117.296%2071.5509%20117.934%2070.5762%20117.934%2069.3731C117.934%2068.17%20117.296%2067.1953%20116.507%2067.1953Z%22%20fill%3D%22url%28%23paint6_linear_1020_82405%29%22%2F%3E%3Cpath%20d%3D%22M116.507%20104.945H78.6367C77.8481%20104.945%2077.207%20105.92%2077.207%20107.123C77.207%20108.326%2077.8481%20109.301%2078.6367%20109.301H116.507C117.296%20109.301%20117.934%20108.326%20117.934%20107.123C117.934%20105.92%20117.296%20104.945%20116.507%20104.945Z%22%20fill%3D%22url%28%23paint7_linear_1020_82405%29%22%2F%3E%3CforeignObject%20x%3D%2270.7116%22%20y%3D%2260.6843%22%20width%3D%2279.8961%22%20height%3D%2279.81%22%3E%3Cdiv%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%20style%3D%22backdrop-filter%3Ablur%288.34px%29%3Bclip-path%3Aurl%28%23bgblur_0_1020_82405_clip_path%29%3Bheight%3A100%25%3Bwidth%3A100%25%22%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3Cpath%20data-figma-bg-blur-radius%3D%2216.6751%22%20d%3D%22M110.659%20123.819C123.513%20123.819%20133.932%20113.419%20133.932%20100.589C133.932%2087.7597%20123.513%2077.3594%20110.659%2077.3594C97.8062%2077.3594%2087.3867%2087.7597%2087.3867%20100.589C87.3867%20113.419%2097.8062%20123.819%20110.659%20123.819Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M110.659%2085.3419C111.63%2085.3458%20112.413%2086.1299%20112.411%2087.0961L112.395%2098.2651L123.584%2098.2817C124.555%2098.2856%20125.338%2099.0696%20125.339%20100.038C125.335%20101.007%20124.55%20101.789%20123.579%20101.79L112.39%20101.773L112.373%20112.942C112.372%20113.908%20111.586%20114.69%20110.615%20114.691C109.645%20114.687%20108.862%20113.903%20108.861%20112.935L108.877%20101.766L97.6878%20101.749C96.7198%20101.748%2095.9366%20100.964%2095.9355%2099.9948C95.9395%2099.0261%2096.725%2098.2443%2097.693%2098.2458L108.883%2098.2623L108.899%2087.0934C108.903%2086.1247%20109.689%2085.3429%20110.659%2085.3419Z%22%20fill%3D%22%23CBD5E1%22%2F%3E%3Cdefs%3E%3CclipPath%20id%3D%22bgblur_0_1020_82405_clip_path%22%20transform%3D%22translate%28-70.7116%20-60.6843%29%22%3E%3Cpath%20d%3D%22M110.659%20123.819C123.513%20123.819%20133.932%20113.419%20133.932%20100.589C133.932%2087.7597%20123.513%2077.3594%20110.659%2077.3594C97.8062%2077.3594%2087.3867%2087.7597%2087.3867%20100.589C87.3867%20113.419%2097.8062%20123.819%20110.659%20123.819Z%22%2F%3E%3C%2FclipPath%3E%3ClinearGradient%20id%3D%22paint0_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%2252.497%22%20x2%3D%2272.7628%22%20y2%3D%2252.497%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint1_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%2271.372%22%20x2%3D%2272.7628%22%20y2%3D%2271.372%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint2_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%2290.247%22%20x2%3D%2272.7628%22%20y2%3D%2290.247%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint3_linear_1020_82405%22%20x1%3D%2247.1291%22%20y1%3D%22109.122%22%20x2%3D%2272.7628%22%20y2%3D%22109.122%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint4_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%2252.497%22%20x2%3D%22120.344%22%20y2%3D%2252.497%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint5_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%2290.247%22%20x2%3D%22120.344%22%20y2%3D%2290.247%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint6_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%2271.372%22%20x2%3D%22120.344%22%20y2%3D%2271.372%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint7_linear_1020_82405%22%20x1%3D%2275.4847%22%20y1%3D%22109.122%22%20x2%3D%22120.344%22%20y2%3D%22109.122%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23CBD5E1%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F8F9FB%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E\""],"names":["EmptyResultIconSVG"],"mappings":"cA0KA,IAAAA,EAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__awaiter as l,__generator as r}from"tslib";import{jsx as i,jsxs as a,Fragment as n}from"react/jsx-runtime";import{useState as s,useEffect as t}from"react";import{X as c,Loader2 as o}from"lucide-react";import d from"../styles/CreateLearningSetModal.module.css.js";var u=function(u){var m=u.isOpen,v=u.onClose,h=u.onSubmit,p=u.title,f=u.description,b=u.inputLabel,N=u.submitLabel,g=u.placeholder,C=void 0===g?"":g,y=u.initialValue,k=void 0===y?"":y,x=u.isLoading,L=void 0!==x&&x,S=s(""),B=S[0],M=S[1],j=s(null),w=j[0],E=j[1];if(t(function(){m&&(M(k),E(null))},[m,k]),!m)return null;return i("div",e({className:d.overlay},{children:a("div",e({className:d.modal},{children:[a("div",e({className:d.header},{children:[a("div",e({className:d.headerContent},{children:[i("h2",e({className:d.title},{children:p})),f&&i("p",e({className:d.description},{children:f}))]})),i("button",e({onClick:v,className:d.closeBtn,disabled:L},{children:i(c,{size:24})}))]})),i("div",e({className:d.form},{children:a("div",e({className:d.formGroup},{children:[a("label",e({className:d.label},{children:[i("span",e({className:d.asterisk},{children:"*"})),b]})),i("input",{type:"text",value:B,onChange:function(e){var l=e.target.value;if(l.length>50)return M(l.slice(0,50)),void E("Maximum 50 characters allowed");M(l),w&&E(null)},className:"".concat(d.inputField," ").concat(w?d.inputError:""),placeholder:C,disabled:L}),w&&i("p",e({className:d.errorMessage},{children:w}))]}))})),a("div",e({className:d.footer},{children:[i("button",e({onClick:v,className:d.cancelBtn,disabled:L},{children:"Cancel"})),i("button",e({onClick:function(){return l(void 0,void 0,void 0,function(){var e,l,i;return r(this,function(r){switch(r.label){case 0:if(!(B.trim()?(E(null),1):(E("".concat(b.replace("*","").trim()," is required")),0)))return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,h(B)];case 2:return r.sent(),v(),[3,4];case 3:return e=r.sent(),console.error("Error in submission",e),409===(null==e?void 0:e.status)?(E(null===(i=null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.data)||void 0===i?void 0:i.message),[2]):(E((null==e?void 0:e.message)||"An error occurred. Please try again."),[3,4]);case 4:return[2]}})})},className:d.confirmBtn,disabled:L},{children:L?a(n,{children:[i(o,{className:d.spinner}),"Save"===N?"Saving...":"Creating..."]}):N}))]}))]}))}))};export{u as default};
|
|
2
|
+
//# sourceMappingURL=CreateLearningSetModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateLearningSetModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|