@e-llm-studio/instant-learning 1.3.0-alpha.218 → 1.3.0-alpha.219

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("zustand"),t=require("./useLearningTemplateStore.js"),n={pageTitle:"",middleDrawer:{scope:"",addScope:"",addSubScope:"",addScopeDialog:{title:"",globalTitle:"",subScopeTitle:"",subtitle:"",globalSubtitle:"",subScopeSubtitle:"",scopeName:"",subScopeName:"",learningApprovalSettings:{title:"",approvalRequired:{title:"",subtitle:""},publishWithoutApproval:{title:"",subtitle:""}},submitButton:"",cancel:""},treeMenu:{search:"",submenu:{learnings:"",access:"",changeHistory:""},contextMenu:{addScope:"",rename:"",delete:"",addSubScope:""}},scopeDisplayLimit:{enabled:"",count:"",compactView:"false",applyToLevels:"",viewMoreText:"",title:"",description:"",searchPlaceholder:"",onboardBtn:"",viewText:""}},learnings:{header:{title:"",exportButton:"",addNewLearningButton:""},tier:{showTierHeader:!0,tierHeader:"",subtitle:"",tierHeaderNoOfLearnings:"",deleteDialog:{title:"",description:"",cancel:"",submit:""},learning:{inheritance:"",actions:{disable:"",enable:"",approve:"",reject:"",delete:""},approveDialog:{title:"",desc:"",footer:"",cancel:"",approveLearning:""},rejectDialog:{title:"",desc:"",feedbackTitle:"",feedbackPlaceholder:"",deleteCheckboxLabel:"",cancel:"",rejectLearning:""},deleteDialog:{title:"",desc:"",warningText:"",cancelText:"",deleteText:""}}}},emptyStateLearning:{title:"",desc:"",createNewLearning:"",createGlobalScope:"",noAccessTitle:"",noAccessDesc:"",requestAccessButton:"",requestSentButton:""},agents:{LearningTerm:""},externalWorkflowMetaData:{enableExternalWorkflow:!0,current_mode:"",sub_mode:"",next_mode:"",externalWorkflowModal:{heading:"",options:{saveDraft:{title:"",desc:"",footerDesc:""},configureNow:{title:"",desc:"",footerDesc:""}}}}},o={showScope:!1,showConfiguration:!1,variantFlow:!0,welcomeMessage:"Hi! 👋 I'm your Instant Learning Concierge.",welcomeMessageSubtitle:"How would you like to get started? You can select an option below or describe the rule you'd like to create.",actions:[{label:"Separation rule",value:"I would want to add a separation rule"},{label:"Max priority rule",value:"I would want to set a max priority rule"},{label:"Break code matching",value:"I would want to add a break code matching rule"},{label:"Inventory code matching",value:"I would want to add a inventory window matching rule"},{label:"Enter a rule description",value:"I want to add a rule description"},{label:"Tester Genie",value:"Loading prompt..."}],chatTitle:"Teach Me OTJ - {scope} - Add Learning",chatTitleEdit:"Teach Me OTJ - {scope} - Edit Learning",formTitle:"Rule setup",setupLabel:"Configure your IL",ruleTitle:"Main Rule Name",ruleTitleInformation:"Give a concise title which isn't too specific",scopeLabel:"Define Scope",tierLabel:"Select Tiers",variantPillLabel:"Variant",ruleDescriptionTitle:"Learning Explanation",ruleDescriptionInformation:"A short summary of the intent of the guideline",promptDescriptionInformation:"Provides the detailed instructions the AI should follow",wtaInformation:"Specifies the use case when the learning should be used",wntaInformation:"Specifies the use case when the learning should not be used",whenToApplyTitle:"Trigger Events (When to Apply)",addWhenToApplyBtnLabel:"Add WTA",whenNotToApplyTitle:"Exclusion Events (When NOT to Apply)",addWhenNotToApplyBtnLabel:"Add WNTA",configTitle:"Advanced Settings",saveBtnLabel:"Save Rule",saveBtnLoadingLabel:"Saving Rule...",chatTextareaPlaceholder:"Tell me more about this learning.."},a=e.create(function(e){return{lmsConfig:n,setLMSConfig:function(t){return e({lmsConfig:t})},clearLMSConfig:function(){return e({lmsConfig:n})}}});var i=e.create(function(e,t){return{teachMeConfig:null,setTeachMeConfig:function(n){var o=t().teachMeConfig;o&&function(e,t){if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch(e){return!1}}(o,n)||e({teachMeConfig:n})},clearTeachMeConfig:function(){return e({teachMeConfig:null})}}});function l(e,t){var n=i.getState().teachMeConfig,o=e.split(".").reduce(function(e,t){return null==e?void 0:e[t]},n);return null==o?t:o}exports.defaultLMSConfig=n,exports.defaultTeachMeConfig=o,exports.dt=function(e,n,o){if(t.useLearningTemplateStore.getState().backwardCompatibility)return null!=n?n:"";var i=a.getState().lmsConfig,l=e.split(".").reduce(function(e,t){return null==e?void 0:e[t]},i);return"string"!=typeof l||""===l?null!=n?n:e:l.replace(/\{(\w+)\}/g,function(e,t){var n;return String(null!==(n=null==o?void 0:o[t])&&void 0!==n?n:"{".concat(t,"}"))})},exports.dtt=function(e,t,n){var o=i.getState().teachMeConfig,a=e.split(".").reduce(function(e,t){return null==e?void 0:e[t]},o);return"string"!=typeof a?null!=t?t:e:a.replace(/\{(\w+)\}/g,function(e,t){var o;return String(null!==(o=null==n?void 0:n[t])&&void 0!==o?o:"{".concat(t,"}"))})},exports.dttValue=l,exports.dttWelcomeMessageParts=function(){var e,t,n=null!==(e=i.getState().teachMeConfig)&&void 0!==e?e:o;return{greeting:n.welcomeMessage||o.welcomeMessage,subtitle:n.welcomeMessageSubtitle||o.welcomeMessageSubtitle,actions:(null===(t=n.actions)||void 0===t?void 0:t.length)?n.actions:o.actions}},exports.interpolate=function(e,t){return e.replace(/\{(\w+)\}/g,function(e,n){var o;return String(null!==(o=null==t?void 0:t[n])&&void 0!==o?o:"{".concat(n,"}"))})},exports.resolveEnableChatLogs=function(e){if("boolean"==typeof e)return e;var n=t.useLearningTemplateStore.getState().enableChatLogs;return"boolean"==typeof n?n:!0===l("enableChatLogs",!1)},exports.useLMSConfigStore=a,exports.useTeachMeConfigStore=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("zustand"),t=require("./useLearningTemplateStore.js"),n={pageTitle:"",globalScopeInfo:"",middleDrawer:{scope:"",addScope:"",addSubScope:"",addScopeDialog:{title:"",globalTitle:"",subScopeTitle:"",subtitle:"",globalSubtitle:"",subScopeSubtitle:"",scopeName:"",subScopeName:"",learningApprovalSettings:{title:"",approvalRequired:{title:"",subtitle:""},publishWithoutApproval:{title:"",subtitle:""}},submitButton:"",cancel:""},treeMenu:{search:"",submenu:{learnings:"",access:"",changeHistory:""},contextMenu:{addScope:"",rename:"",delete:"",addSubScope:""}},scopeDisplayLimit:{enabled:"",count:"",compactView:"false",applyToLevels:"",viewMoreText:"",title:"",description:"",searchPlaceholder:"",onboardBtn:"",viewText:""}},learnings:{header:{title:"",exportButton:"",addNewLearningButton:""},tier:{showTierHeader:!0,tierHeader:"",subtitle:"",tierHeaderNoOfLearnings:"",deleteDialog:{title:"",description:"",cancel:"",submit:""},learning:{inheritance:"",actions:{disable:"",enable:"",approve:"",reject:"",delete:""},approveDialog:{title:"",desc:"",footer:"",cancel:"",approveLearning:""},rejectDialog:{title:"",desc:"",feedbackTitle:"",feedbackPlaceholder:"",deleteCheckboxLabel:"",cancel:"",rejectLearning:""},deleteDialog:{title:"",desc:"",warningText:"",cancelText:"",deleteText:""}}}},emptyStateLearning:{title:"",desc:"",createNewLearning:"",createGlobalScope:"",noAccessTitle:"",noAccessDesc:"",requestAccessButton:"",requestSentButton:""},agents:{LearningTerm:""},externalWorkflowMetaData:{enableExternalWorkflow:!0,current_mode:"",sub_mode:"",next_mode:"",externalWorkflowModal:{heading:"",options:{saveDraft:{title:"",desc:"",footerDesc:""},configureNow:{title:"",desc:"",footerDesc:""}}}}},o={showScope:!1,showConfiguration:!1,variantFlow:!0,welcomeMessage:"Hi! 👋 I'm your Instant Learning Concierge.",welcomeMessageSubtitle:"How would you like to get started? You can select an option below or describe the rule you'd like to create.",actions:[{label:"Separation rule",value:"I would want to add a separation rule"},{label:"Max priority rule",value:"I would want to set a max priority rule"},{label:"Break code matching",value:"I would want to add a break code matching rule"},{label:"Inventory code matching",value:"I would want to add a inventory window matching rule"},{label:"Enter a rule description",value:"I want to add a rule description"},{label:"Tester Genie",value:"Loading prompt..."}],chatTitle:"Teach Me OTJ - {scope} - Add Learning",chatTitleEdit:"Teach Me OTJ - {scope} - Edit Learning",formTitle:"Rule setup",setupLabel:"Configure your IL",ruleTitle:"Main Rule Name",ruleTitleInformation:"Give a concise title which isn't too specific",scopeLabel:"Define Scope",tierLabel:"Select Tiers",variantPillLabel:"Variant",ruleDescriptionTitle:"Learning Explanation",ruleDescriptionInformation:"A short summary of the intent of the guideline",promptDescriptionInformation:"Provides the detailed instructions the AI should follow",wtaInformation:"Specifies the use case when the learning should be used",wntaInformation:"Specifies the use case when the learning should not be used",whenToApplyTitle:"Trigger Events (When to Apply)",addWhenToApplyBtnLabel:"Add WTA",whenNotToApplyTitle:"Exclusion Events (When NOT to Apply)",addWhenNotToApplyBtnLabel:"Add WNTA",configTitle:"Advanced Settings",saveBtnLabel:"Save Rule",saveBtnLoadingLabel:"Saving Rule...",chatTextareaPlaceholder:"Tell me more about this learning.."},a=e.create(function(e){return{lmsConfig:n,setLMSConfig:function(t){return e({lmsConfig:t})},clearLMSConfig:function(){return e({lmsConfig:n})}}});var i=e.create(function(e,t){return{teachMeConfig:null,setTeachMeConfig:function(n){var o=t().teachMeConfig;o&&function(e,t){if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch(e){return!1}}(o,n)||e({teachMeConfig:n})},clearTeachMeConfig:function(){return e({teachMeConfig:null})}}});function l(e,t){var n=i.getState().teachMeConfig,o=e.split(".").reduce(function(e,t){return null==e?void 0:e[t]},n);return null==o?t:o}exports.defaultLMSConfig=n,exports.defaultTeachMeConfig=o,exports.dt=function(e,n,o){if(t.useLearningTemplateStore.getState().backwardCompatibility)return null!=n?n:"";var i=a.getState().lmsConfig,l=e.split(".").reduce(function(e,t){return null==e?void 0:e[t]},i);return"string"!=typeof l||""===l?null!=n?n:e:l.replace(/\{(\w+)\}/g,function(e,t){var n;return String(null!==(n=null==o?void 0:o[t])&&void 0!==n?n:"{".concat(t,"}"))})},exports.dtt=function(e,t,n){var o=i.getState().teachMeConfig,a=e.split(".").reduce(function(e,t){return null==e?void 0:e[t]},o);return"string"!=typeof a?null!=t?t:e:a.replace(/\{(\w+)\}/g,function(e,t){var o;return String(null!==(o=null==n?void 0:n[t])&&void 0!==o?o:"{".concat(t,"}"))})},exports.dttValue=l,exports.dttWelcomeMessageParts=function(){var e,t,n=null!==(e=i.getState().teachMeConfig)&&void 0!==e?e:o;return{greeting:n.welcomeMessage||o.welcomeMessage,subtitle:n.welcomeMessageSubtitle||o.welcomeMessageSubtitle,actions:(null===(t=n.actions)||void 0===t?void 0:t.length)?n.actions:o.actions}},exports.interpolate=function(e,t){return e.replace(/\{(\w+)\}/g,function(e,n){var o;return String(null!==(o=null==t?void 0:t[n])&&void 0!==o?o:"{".concat(n,"}"))})},exports.resolveEnableChatLogs=function(e){if("boolean"==typeof e)return e;var n=t.useLearningTemplateStore.getState().enableChatLogs;return"boolean"==typeof n?n:!0===l("enableChatLogs",!1)},exports.useLMSConfigStore=a,exports.useTeachMeConfigStore=i;
2
2
  //# sourceMappingURL=useLMSConfigStore.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as e,__generator as t,__assign as r}from"tslib";import{jsx as i,jsxs as n,Fragment as o}from"react/jsx-runtime";import{useMemo as l,useCallback as a}from"react";import{Loader2 as s,Lock as u}from"lucide-react";import{useLearningTemplateStore as d}from"../store/useLearningTemplateStore.js";import{findNodeById as c}from"../utils/treeUtils.js";import m from"./RuleHeader.js";import f from"../components/EmptyLearningState.js";import p from"./RuleTierList.js";import{getRuleOverrideHistory as g}from"../apis/scopeApis.js";import{usePermissionsStore as h}from"../store/usePermissionsStore.js";import{dt as v}from"../store/useLMSConfigStore.js";var S=function(S){var y,x=S.onAddRule,R=S.onDeleteRule,b=S.onEditRule,D=S.onEditVariant,E=S.onDeleteVariant,j=S.onExportRule,C=S.isExporting,T=S.emptyStateTitle,L=void 0===T?v("emptyStateLearning.title","No learnings have been added !"):T,w=S.emptyStateDesc,I=void 0===w?v("emptyStateLearning.desc","Start by adding learnings that should apply across all stations."):w,N=S.emptyStateButtonText,A=void 0===N?v("emptyStateLearning.createNewLearning","Create New Learning"):N,V=S.onToggleSuccess,B=S.onReorderRules,F=S.onRefreshRuleSets,G=S.setDeleteConfirmationUsedFor,H=S.onCopyToTier,z=d(function(e){return e.currentRules}),k=d(function(e){return e.toggleRuleTier}),U=d(function(e){return e.scopeTreeData}),W=d(function(e){return e.selectedRuleSetId}),M=d(function(e){return e.createdVariantInfo}),O=d(function(e){return e.urlVariantId}),P=h(function(e){return e.isLoading}),_=h(function(e){return e.hasPermission}),Y=W?c((null==U?void 0:U.data)||null,W):null,q=null==Y?void 0:Y.id,J="GLOBAL"===(null==Y?void 0:Y.type)||"Global"===(null==Y?void 0:Y.name),K=Y?{ruleSetId:Y.id,ruleSetName:Y.name,ruleSetDesc:"",ruleCount:null===(y=null==Y?void 0:Y.metrics)||void 0===y?void 0:y.learningsCount}:void 0,Q=_("ilotj.rule.create",q)||_("ilotj.rule.variant.create",q),X=_("ilotj.rule.view",q),Z=l(function(){var e=new Map;return M&&M.forEach(function(t){t.variants.forEach(function(t){return e.set(t.id,t.action)})}),O&&e.set(O,"existing"),e.size>0?e:void 0},[M,O]),$=l(function(){if(M&&z){var e={tier1:"1",tier2:"2",tier_1:"1",tier_2:"2"},t={};return z.forEach(function(e){t[e.id]=e.name}),M.map(function(r){return t[e[r.tierName]]}).filter(Boolean)}},[M,z]),ee=a(function(r,i){return e(void 0,void 0,void 0,function(){var e,r;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,g(i||"")];case 1:return(e=t.sent())&&e.data?[2,e.data]:[2,null];case 2:throw r=t.sent(),console.error("Failed to fetch override history",r),r;case 3:return[2]}})})},[]);return P?i("div",r({style:{display:"flex",height:"100vh",alignItems:"center",justifyContent:"center",backgroundColor:"#f9fafb",fontFamily:"Helvetica, Arial, sans-serif"}},{children:n("div",r({style:{display:"flex",flexDirection:"column",alignItems:"center",color:"#4b5563"}},{children:[i(s,{style:{marginBottom:"1rem",height:"3rem",width:"3rem",color:"#007aff",animation:"spin 1s linear infinite"}}),i("p",r({style:{fontSize:"1rem",fontWeight:500,color:"#4b5563"}},{children:"Loading your permissions…"}))]}))})):X?z&&0!==(null==z?void 0:z.length)?n(o,{children:[i(m,{onAddRule:x,onExport:j,isExporting:C,ruleSetName:null==K?void 0:K.ruleSetName,ruleSetDescription:null==K?void 0:K.ruleSetDesc,isGlobal:J,ruleSetId:q}),i(p,{tiers:z,ruleSetId:(null==K?void 0:K.ruleSetId)||"",onToggleTier:k,onDeleteRule:R,isGlobalScope:J,onFetchOverrideHistory:ee,onEditRule:b,onEditVariant:D,onDeleteVariant:E,highlightedVariants:Z,highlightedTierNames:$,onToggleSuccess:V,onReorderRules:B,onRefreshRuleSets:F,setDeleteConfirmationUsedFor:G,onCopyToTier:H})]}):n(o,{children:[i(m,{onAddRule:x,onExport:j,isExporting:C,ruleSetName:null==K?void 0:K.ruleSetName,ruleSetDescription:null==K?void 0:K.ruleSetDesc,isGlobal:J}),i(f,{onCreate:x,title:L,desc:I,button:A,canCreateRule:Q})]}):n(o,{children:[i(m,{onAddRule:x,onExport:j,isExporting:C,ruleSetName:null==K?void 0:K.ruleSetName,ruleSetDescription:null==K?void 0:K.ruleSetDesc,isGlobal:J,ruleSetId:q}),n("div",r({style:{display:"flex",height:"80vh",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem",textAlign:"center",backgroundColor:"#f0f2f5",fontFamily:"Helvetica, Arial, sans-serif"}},{children:[i("div",r({style:{marginBottom:"1.5rem",height:"4rem",width:"4rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",background:"linear-gradient(145deg, #e0e0e0, #ffffff)",boxShadow:"4px 4px 12px rgba(0,0,0,0.05), -4px -4px 12px rgba(255,255,255,0.7)"}},{children:i(u,{style:{height:"2rem",width:"2rem",color:"#8e8e93"}})})),i("h3",r({style:{fontSize:"1.25rem",fontWeight:600,color:"#1c1c1e"}},{children:"Access Denied"})),i("p",r({style:{maxWidth:"22rem",fontSize:"1rem",color:"#636366",lineHeight:1.6,marginBottom:"1rem"}},{children:"You do not have permission to view learnings for this scope."}))]}))]})};export{S as default};
1
+ import{__awaiter as e,__generator as t,__assign as r}from"tslib";import{jsx as i,jsxs as n,Fragment as o}from"react/jsx-runtime";import{useMemo as l,useCallback as a}from"react";import{Loader2 as s,Lock as u}from"lucide-react";import{useLearningTemplateStore as d}from"../store/useLearningTemplateStore.js";import{findNodeById as c}from"../utils/treeUtils.js";import m from"./RuleHeader.js";import f from"../components/EmptyLearningState.js";import p from"./RuleTierList.js";import{getRuleOverrideHistory as h}from"../apis/scopeApis.js";import{usePermissionsStore as g}from"../store/usePermissionsStore.js";import{dt as v}from"../store/useLMSConfigStore.js";var S=function(S){var y,x,R=S.onAddRule,b=S.onDeleteRule,D=S.onEditRule,E=S.onEditVariant,j=S.onDeleteVariant,w=S.onExportRule,C=S.isExporting,I=S.emptyStateTitle,T=void 0===I?v("emptyStateLearning.title","No learnings have been added !"):I,L=S.emptyStateDesc,N=void 0===L?v("emptyStateLearning.desc","Start by adding learnings that should apply across all stations."):L,A=S.emptyStateButtonText,G=void 0===A?v("emptyStateLearning.createNewLearning","Create New Learning"):A,B=S.onToggleSuccess,V=S.onReorderRules,F=S.onRefreshRuleSets,H=S.setDeleteConfirmationUsedFor,z=S.onCopyToTier,k=d(function(e){return e.currentRules}),U=d(function(e){return e.toggleRuleTier}),W=d(function(e){return e.scopeTreeData}),M=d(function(e){return e.selectedRuleSetId}),O=d(function(e){return e.createdVariantInfo}),P=d(function(e){return e.urlVariantId}),_=g(function(e){return e.isLoading}),Y=g(function(e){return e.hasPermission}),q=M?c((null==W?void 0:W.data)||null,M):null,J=null==q?void 0:q.id,K="GLOBAL"===(null==q?void 0:q.type)||"Global"===(null==q?void 0:q.name),Q=Boolean((null===(y=null==W?void 0:W.data)||void 0===y?void 0:y.id)&&M===W.data.id),X=q?{ruleSetId:q.id,ruleSetName:q.name,ruleSetDesc:"",ruleCount:null===(x=null==q?void 0:q.metrics)||void 0===x?void 0:x.learningsCount}:void 0,Z=Y("ilotj.rule.create",J)||Y("ilotj.rule.variant.create",J),$=Y("ilotj.rule.view",J),ee=l(function(){var e=new Map;return O&&O.forEach(function(t){t.variants.forEach(function(t){return e.set(t.id,t.action)})}),P&&e.set(P,"existing"),e.size>0?e:void 0},[O,P]),te=l(function(){if(O&&k){var e={tier1:"1",tier2:"2",tier_1:"1",tier_2:"2"},t={};return k.forEach(function(e){t[e.id]=e.name}),O.map(function(r){return t[e[r.tierName]]}).filter(Boolean)}},[O,k]),re=a(function(r,i){return e(void 0,void 0,void 0,function(){var e,r;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,h(i||"")];case 1:return(e=t.sent())&&e.data?[2,e.data]:[2,null];case 2:throw r=t.sent(),console.error("Failed to fetch override history",r),r;case 3:return[2]}})})},[]);return _?i("div",r({style:{display:"flex",height:"100vh",alignItems:"center",justifyContent:"center",backgroundColor:"#f9fafb",fontFamily:"Helvetica, Arial, sans-serif"}},{children:n("div",r({style:{display:"flex",flexDirection:"column",alignItems:"center",color:"#4b5563"}},{children:[i(s,{style:{marginBottom:"1rem",height:"3rem",width:"3rem",color:"#007aff",animation:"spin 1s linear infinite"}}),i("p",r({style:{fontSize:"1rem",fontWeight:500,color:"#4b5563"}},{children:"Loading your permissions…"}))]}))})):$?k&&0!==(null==k?void 0:k.length)?n(o,{children:[i(m,{onAddRule:R,onExport:w,isExporting:C,ruleSetName:null==X?void 0:X.ruleSetName,ruleSetDescription:null==X?void 0:X.ruleSetDesc,isGlobal:K,showGlobalScopeInfo:Q,ruleSetId:J}),i(p,{tiers:k,ruleSetId:(null==X?void 0:X.ruleSetId)||"",onToggleTier:U,onDeleteRule:b,isGlobalScope:K,onFetchOverrideHistory:re,onEditRule:D,onEditVariant:E,onDeleteVariant:j,highlightedVariants:ee,highlightedTierNames:te,onToggleSuccess:B,onReorderRules:V,onRefreshRuleSets:F,setDeleteConfirmationUsedFor:H,onCopyToTier:z})]}):n(o,{children:[i(m,{onAddRule:R,onExport:w,isExporting:C,ruleSetName:null==X?void 0:X.ruleSetName,ruleSetDescription:null==X?void 0:X.ruleSetDesc,isGlobal:K,showGlobalScopeInfo:Q}),i(f,{onCreate:R,title:T,desc:N,button:G,canCreateRule:Z})]}):n(o,{children:[i(m,{onAddRule:R,onExport:w,isExporting:C,ruleSetName:null==X?void 0:X.ruleSetName,ruleSetDescription:null==X?void 0:X.ruleSetDesc,isGlobal:K,showGlobalScopeInfo:Q,ruleSetId:J}),n("div",r({style:{display:"flex",height:"80vh",width:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem",textAlign:"center",backgroundColor:"#f0f2f5",fontFamily:"Helvetica, Arial, sans-serif"}},{children:[i("div",r({style:{marginBottom:"1.5rem",height:"4rem",width:"4rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",background:"linear-gradient(145deg, #e0e0e0, #ffffff)",boxShadow:"4px 4px 12px rgba(0,0,0,0.05), -4px -4px 12px rgba(255,255,255,0.7)"}},{children:i(u,{style:{height:"2rem",width:"2rem",color:"#8e8e93"}})})),i("h3",r({style:{fontSize:"1.25rem",fontWeight:600,color:"#1c1c1e"}},{children:"Access Denied"})),i("p",r({style:{maxWidth:"22rem",fontSize:"1rem",color:"#636366",lineHeight:1.6,marginBottom:"1rem"}},{children:"You do not have permission to view learnings for this scope."}))]}))]})};export{S as default};
2
2
  //# sourceMappingURL=ContentLogic.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import{Download as i,Plus as a}from"lucide-react";import t from"../styles/RuleHeader.module.css.js";import{usePermissionsStore as n}from"../store/usePermissionsStore.js";import{dt as l}from"../store/useLMSConfigStore.js";var s=function(s){var d=s.onAddRule,c=s.onOnboardStation,u=s.onExport,m=s.isExporting,p=void 0!==m&&m,b=s.ruleSetId,v=s.ruleSetName,f=s.ruleSetDescription,g=s.isGlobal,h=void 0!==g&&g,x=s.globalLabel,L=void 0===x?l("learnings.globalLearning.globalLabel","Global Learnings ( Default )"):x;s.addExemptionLabel;var N=s.addNewRuleLabel,S=void 0===N?l("learnings.header.addNewLearningButton","Add New Learning"):N,j=s.onboardStationLabel,B=void 0===j?l("middleDrawer.scopeDisplayLimit.onboardBtn","Onboard a station"):j,E=n(function(e){return e.hasPermission});if(!v&&!h)return null;var R=h?L:v,w=E("ilotj.rule.create",b||void 0),y=E("ilotj.rule.variant.create",b||void 0),C=w||y;return o("div",e({className:t.container},{children:[o("div",e({className:t.info},{children:[r("h1",{children:R}),f&&r("p",e({className:t.description},{children:f}))]})),o("div",e({className:t.actions,style:{display:"flex",gap:"8px"}},{children:[u&&o("button",e({onClick:u,disabled:p,className:t.exportButton},{children:[r(i,{size:14}),p?"Exporting...":l("learnings.header.exportButton","Export")]})),C&&d&&o("button",e({onClick:d,className:t.addRuleButton},{children:[r(a,{size:14}),S]})),c&&o("button",e({onClick:c,className:t.addRuleButton},{children:[r(a,{size:14}),B]}))]}))]}))};export{s as default};
1
+ import{__assign as e}from"tslib";import{jsxs as o,jsx as i}from"react/jsx-runtime";import{Download as r,Plus as a}from"lucide-react";import n from"../styles/RuleHeader.module.css.js";import{usePermissionsStore as l}from"../store/usePermissionsStore.js";import{dt as t}from"../store/useLMSConfigStore.js";var s=function(s){var d=s.onAddRule,c=s.onOnboardStation,u=s.onExport,m=s.isExporting,p=void 0!==m&&m,b=s.ruleSetId,f=s.ruleSetName,h=s.ruleSetDescription,g=s.isGlobal,v=void 0!==g&&g,N=s.showGlobalScopeInfo,x=void 0!==N&&N,L=s.globalLabel,S=void 0===L?t("learnings.globalLearning.globalLabel","Global Learnings ( Default )"):L;s.addExemptionLabel;var j=s.addNewRuleLabel,w=void 0===j?t("learnings.header.addNewLearningButton","Add New Learning"):j,B=s.onboardStationLabel,E=void 0===B?t("middleDrawer.scopeDisplayLimit.onboardBtn","Onboard a station"):B,R=l(function(e){return e.hasPermission});if(!f&&!v)return null;var y=v?S:f,C=x?t("globalScopeInfo","The scope under which all sub scopes and learnings fall under"):"",D=R("ilotj.rule.create",b||void 0),k=R("ilotj.rule.variant.create",b||void 0),z=D||k;return o("div",e({className:n.container},{children:[o("div",e({className:n.info},{children:[i("h1",{children:y}),h&&i("p",e({className:n.description},{children:h})),C&&i("p",e({className:n.description},{children:C}))]})),o("div",e({className:n.actions,style:{display:"flex",gap:"8px"}},{children:[u&&o("button",e({onClick:u,disabled:p,className:n.exportButton},{children:[i(r,{size:14}),p?"Exporting...":t("learnings.header.exportButton","Export")]})),z&&d&&o("button",e({onClick:d,className:n.addRuleButton},{children:[i(a,{size:14}),w]})),c&&o("button",e({onClick:c,className:n.addRuleButton},{children:[i(a,{size:14}),E]}))]}))]}))};export{s as default};
2
2
  //# sourceMappingURL=RuleHeader.js.map