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

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"),r=require("@tanstack/react-query"),t=require("../store/useAuthStore.js"),n=require("../store/useEnvStore.js"),o=require("../apis/scopeApis.js"),u=require("../store/useLMSConfigStore.js"),i=require("../store/useLearningTemplateStore.js");exports.useLMSConfigQuery=function(s,a,l,c){var f=this;void 0===l&&(l=!0);var g=t.default(function(e){var r,t;return null!==(t=null===(r=e.user)||void 0===r?void 0:r.accessToken)&&void 0!==t?t:""}),v=n.default(function(e){var r;return null!==(r=e.llmStudioUrl)&&void 0!==r?r:""}),d=u.useLMSConfigStore(function(e){return e.setLMSConfig}),C=u.useTeachMeConfigStore(function(e){return e.setTeachMeConfig}),S=i.useLearningTemplateStore(function(e){return e.setTemplateData});return r.useQuery({queryKey:["lms-config",s,null!=c?c:null],queryFn:function(){return e.__awaiter(f,void 0,void 0,function(){var r,t,n,u;return e.__generator(this,function(e){switch(e.label){case 0:return[4,o.fetchLMSConfig(v,s,g,c)];case 1:return r=e.sent(),t=r.lmsConfig,n=r.teachMeConfig,u=r.template,console.log("Fetched LMS Config:",{lmsConfig:t,teachMeConfig:n,template:u}),t&&d(t),n&&C(n),u&&S(s,u),[2,{lmsConfig:t,teachMeConfig:n,template:u}]}})})},enabled:l&&!!s&&!!g&&!!v&&!a,staleTime:6e5})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@tanstack/react-query"),r=require("../store/useAuthStore.js"),n=require("../store/useEnvStore.js"),o=require("../apis/scopeApis.js"),u=require("../store/useLMSConfigStore.js"),i=require("../store/useLearningTemplateStore.js");exports.useLMSConfigQuery=function(s,a,l,c){var f=this;void 0===l&&(l=!0);var g=r.default(function(e){var t,r;return null!==(r=null===(t=e.user)||void 0===t?void 0:t.accessToken)&&void 0!==r?r:""}),d=n.default(function(e){var t;return null!==(t=e.llmStudioUrl)&&void 0!==t?t:""}),v=u.useLMSConfigStore(function(e){return e.setLMSConfig}),C=u.useTeachMeConfigStore(function(e){return e.setTeachMeConfig}),S=i.useLearningTemplateStore(function(e){return e.setTemplateData});return t.useQuery({queryKey:["lms-config",s,null!=c?c:null],queryFn:function(){return e.__awaiter(f,void 0,void 0,function(){var t,r,n,u;return e.__generator(this,function(e){switch(e.label){case 0:return[4,o.fetchLMSConfig(d,s,g,c)];case 1:return t=e.sent(),r=t.lmsConfig,n=t.teachMeConfig,u=t.template,console.log("Fetched LMS Config:",{lmsConfig:r,teachMeConfig:n,template:u}),r&&v(r),n&&C(n),u&&S(s,u),[2,{lmsConfig:r,teachMeConfig:n,template:u}]}})})},enabled:l&&!!s&&!!g&&!!d&&!a,staleTime:6e5,refetchOnWindowFocus:!1,refetchOnReconnect:!1})};
2
2
  //# sourceMappingURL=useLMSConfigQuery.js.map
@@ -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){return{teachMeConfig:null,setTeachMeConfig:function(t){return e({teachMeConfig:t})},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:"",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