@e-llm-studio/instant-learning 0.1.1-alpha.4 → 0.1.1-alpha.5

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"),t=require("react/jsx-runtime"),r=require("react"),n=require("@mui/material"),a=require("@mui/icons-material/Close"),i=require("../../../plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js"),s=require("../../../plugins/valueTypes/Default/DefaultTeachMeRenderer.js"),o=require("../../LearningManagement/store/useAuthStore.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(a),c=function(t,r){return e.__awaiter(void 0,void 0,void 0,function(){var n,a;return e.__generator(this,function(e){switch(e.label){case 0:return[4,fetch("".concat("https://devllmstudio.creativeworkspace.ai","/instant_learning/ilotj/application/getValueType/").concat(t),{headers:{Authorization:"Bearer ".concat(r)}})];case 1:if(!(n=e.sent()).ok)throw new Error("Failed to fetch value type");return[4,n.json()];case 2:return[2,(a=e.sent()).value_type_name||a.valueTypeName||a.templateName]}})})},d=function(){var a=r.useState(!0),i=a[0],s=a[1];return t.jsxs(n.Dialog,e.__assign({open:i,onClose:function(){return s(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[t.jsxs(n.DialogTitle,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[t.jsx(n.Typography,e.__assign({variant:"h6",fontWeight:600},{children:"Teach Me"})),t.jsx(n.IconButton,e.__assign({onClick:function(){return s(!1)}},{children:t.jsx(l.default,{})}))]})),t.jsx(n.DialogContent,e.__assign({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},f=function(e){switch(e){case"DefaultTeachMe":return t.jsx(s.default,{});case"RadioTrafficTeachMe":return t.jsx(i.default,{});default:return t.jsx(d,{})}};exports.default=function(a){var i=a.app_integration_id,s=o.default(function(e){var t;return null===(t=e.user)||void 0===t?void 0:t.accessToken}),u=r.useState(null),l=u[0],h=u[1],p=r.useState(!0),g=p[0],v=p[1],x=r.useState(!1),_=x[0],j=x[1];return r.useEffect(function(){e.__awaiter(void 0,void 0,void 0,function(){var t,r;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),v(!0),[4,c(i,s||"")];case 1:return t=e.sent(),h(t),[3,4];case 2:return r=e.sent(),console.error("Failed to fetch value type:",r),j(!0),[3,4];case 3:return v(!1),[7];case 4:return[2]}})})},[i]),console.log("hi hello",i),g?t.jsx(n.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:t.jsx(n.CircularProgress,{size:32})})):_||!l?t.jsx(d,{}):t.jsx(t.Fragment,{children:f(l)})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),t=require("react"),l=require("@mui/material"),a=require("@mui/icons-material/Close"),n=require("../../../plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js"),r=require("../../../plugins/valueTypes/Default/DefaultTeachMeRenderer.js");function s(i){return i&&"object"==typeof i&&"default"in i?i:{default:i}}var I=s(a),u=function(e,t){return i.__awaiter(void 0,void 0,void 0,function(){var l,a;return i.__generator(this,function(i){switch(i.label){case 0:return[4,fetch("".concat("https://devllmstudio.creativeworkspace.ai","/instant_learning/ilotj/application/getValueType/").concat(e),{headers:{Authorization:"Bearer ".concat(t)}})];case 1:if(!(l=i.sent()).ok)throw new Error("Failed to fetch value type");return[4,l.json()];case 2:return[2,(a=i.sent()).value_type_name||a.valueTypeName||a.templateName]}})})},c=function(){var a=t.useState(!0),n=a[0],r=a[1];return e.jsxs(l.Dialog,i.__assign({open:n,onClose:function(){return r(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[e.jsxs(l.DialogTitle,i.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[e.jsx(l.Typography,i.__assign({variant:"h6",fontWeight:600},{children:"Teach Me"})),e.jsx(l.IconButton,i.__assign({onClick:function(){return r(!1)}},{children:e.jsx(I.default,{})}))]})),e.jsx(l.DialogContent,i.__assign({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},o=function(i){switch(i){case"DefaultTeachMe":return e.jsx(r.default,{});case"RadioTrafficTeachMe":return e.jsx(n.default,{});default:return e.jsx(c,{})}};exports.default=function(a){var n=a.app_integration_id,r=t.useState(null),s=r[0],I=r[1],h=t.useState(!0),W=h[0],j=h[1],Z=t.useState(!1),d=Z[0],M=Z[1];return t.useEffect(function(){i.__awaiter(void 0,void 0,void 0,function(){var e,t;return i.__generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),j(!0),[4,u(n,"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXBhcnRtZW50cyI6W10sImNvbm5lY3Rvck1hcCI6e30sIl9pZCI6IjY2NzAyYjI2MDU1ZDlhODkxNDBlZDQ1MyIsImVtYWlsIjoibWFkdW1idS5rYXRoeWF5YW5pQHRlY2hvbHV0aW9uLmNvbSIsInJvbGUiOlsiNjVlNzFlYzM5ZmQ5NGNlOTAwZjA2NTg2IiwiNjg5ZGVmMzBmYmExMjg2NGM0NDdhMmYwIiwiNjgxZGQzN2QzMmI2ZWI5OGJkMjA4ZTJiIiwiNjZjZGM0ODFjZDM2NDkxMGE4MzZlOTRmIiwiNjg5OWJjMmNhZDlkMDhkYWRkMWM1ODE0IiwiNjg5OWMxZTZhZDlkMDhkYWRkMWM1ZTlhIiwiNjg5YjNkODA4MTk4YzNiOTdkMzhkOWFhIiwiNj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gR2VuZXJhdGlvbiBNb2RlIFVzZXIiLCJBcHBTZWNBdXRoX0FkbWluIiwiY3ctYWRtaW4iLCJSZXF1aXJlbWVudCBBSSBBZG1pbiIsIkRhdGFJbmdlc3QuQUkgTG9jYWwgVXNlciIsIkFnZW50IEdlbmllIE1vZGUgQWRtaW4iLCJLYXRoeWF5YW5pRGVtbyBVc2VyIiwiQ29kaW5nX1N0YW5kYXJkX1VzZXIiLCJBZ2VudCBHZW5pZSBNb2RlIE1hbmFnZXIiLCJza3l3YXRlci11c2VyIiwiSW5zdGFudCBMZWFybmluZyBNb2RlIEFkbWluIiwiRGF0YW1vZC5BSSBNb2RlIEFkbWluIiwiQXVkaW8gSGlnaGxpZ2h0IEdlbmVyYXRpb24gTW9kZSBNYW5hZ2VyIiwiT3JnIEFkbWluIiwiQXBwTW9kX1Byb2RfdXNlciJdLCJpYXQiOjE3Nzg3NzM1ODEsImV4cCI6MTc3ODk0NjM4MX0.ECul2A9bsM9_vYyHxIpDshTPy-baBEktPh2WAu5sSAs")];case 1:return e=i.sent(),I(e),[3,4];case 2:return t=i.sent(),console.error("Failed to fetch value type:",t),M(!0),[3,4];case 3:return j(!1),[7];case 4:return[2]}})})},[n]),console.log("hi hello",n),W?e.jsx(l.Box,i.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:e.jsx(l.CircularProgress,{size:32})})):d||!s?e.jsx(c,{}):e.jsx(e.Fragment,{children:o(s)})};
2
2
  //# sourceMappingURL=TeachMeWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as r}from"tslib";import{jsx as n,Fragment as i,jsxs as a}from"react/jsx-runtime";import{useState as o,useEffect as s}from"react";import{Box as c,CircularProgress as l,Dialog as u,DialogTitle as f,Typography as d,IconButton as h,DialogContent as p}from"@mui/material";import m from"@mui/icons-material/Close";import v from"../../../plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js";import g from"../../../plugins/valueTypes/Default/DefaultTeachMeRenderer.js";import y from"../../LearningManagement/store/useAuthStore.js";var T=function(e,n){return t(void 0,void 0,void 0,function(){var t,i;return r(this,function(r){switch(r.label){case 0:return[4,fetch("".concat("https://devllmstudio.creativeworkspace.ai","/instant_learning/ilotj/application/getValueType/").concat(e),{headers:{Authorization:"Bearer ".concat(n)}})];case 1:if(!(t=r.sent()).ok)throw new Error("Failed to fetch value type");return[4,t.json()];case 2:return[2,(i=r.sent()).value_type_name||i.valueTypeName||i.templateName]}})})},x=function(){var t=o(!0),r=t[0],i=t[1];return a(u,e({open:r,onClose:function(){return i(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[a(f,e({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[n(d,e({variant:"h6",fontWeight:600},{children:"Teach Me"})),n(h,e({onClick:function(){return i(!1)}},{children:n(m,{})}))]})),n(p,e({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},w=function(e){switch(e){case"DefaultTeachMe":return n(g,{});case"RadioTrafficTeachMe":return n(v,{});default:return n(x,{})}},j=function(a){var u=a.app_integration_id,f=y(function(e){var t;return null===(t=e.user)||void 0===t?void 0:t.accessToken}),d=o(null),h=d[0],p=d[1],m=o(!0),v=m[0],g=m[1],j=o(!1),b=j[0],k=j[1];return s(function(){t(void 0,void 0,void 0,function(){var e,t;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,3,4]),g(!0),[4,T(u,f||"")];case 1:return e=r.sent(),p(e),[3,4];case 2:return t=r.sent(),console.error("Failed to fetch value type:",t),k(!0),[3,4];case 3:return g(!1),[7];case 4:return[2]}})})},[u]),console.log("hi hello",u),v?n(c,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:n(l,{size:32})})):b||!h?n(x,{}):n(i,{children:w(h)})};export{j as default};
1
+ import{__assign as i,__awaiter as e,__generator as l}from"tslib";import{jsx as t,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useState as a,useEffect as I}from"react";import{Box as o,CircularProgress as c,Dialog as s,DialogTitle as W,Typography as h,IconButton as Z,DialogContent as u}from"@mui/material";import d from"@mui/icons-material/Close";import M from"../../../plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js";import m from"../../../plugins/valueTypes/Default/DefaultTeachMeRenderer.js";var N=function(i,t){return e(void 0,void 0,void 0,function(){var e,n;return l(this,function(l){switch(l.label){case 0:return[4,fetch("".concat("https://devllmstudio.creativeworkspace.ai","/instant_learning/ilotj/application/getValueType/").concat(i),{headers:{Authorization:"Bearer ".concat(t)}})];case 1:if(!(e=l.sent()).ok)throw new Error("Failed to fetch value type");return[4,e.json()];case 2:return[2,(n=l.sent()).value_type_name||n.valueTypeName||n.templateName]}})})},k=function(){var e=a(!0),l=e[0],n=e[1];return r(s,i({open:l,onClose:function(){return n(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[r(W,i({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[t(h,i({variant:"h6",fontWeight:600},{children:"Teach Me"})),t(Z,i({onClick:function(){return n(!1)}},{children:t(d,{})}))]})),t(u,i({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},j=function(i){switch(i){case"DefaultTeachMe":return t(m,{});case"RadioTrafficTeachMe":return t(M,{});default:return t(k,{})}},b=function(r){var s=r.app_integration_id,W=a(null),h=W[0],Z=W[1],u=a(!0),d=u[0],M=u[1],m=a(!1),b=m[0],p=m[1];return I(function(){e(void 0,void 0,void 0,function(){var i,e;return l(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,3,4]),M(!0),[4,N(s,"eyJhbGciOiJIUzI1Ni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[3,4];case 3:return M(!1),[7];case 4:return[2]}})})},[s]),console.log("hi hello",s),d?t(o,i({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:t(c,{size:32})})):b||!h?t(k,{}):t(n,{children:j(h)})};export{b as default};
2
2
  //# sourceMappingURL=TeachMeWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TeachMeWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.tsx"],"names":[],"mappings":"AA8IA,UAAU,mBAAmB;IAC3B,kBAAkB,EAAE,GAAG,CAAC;CACzB;AAED,QAAA,MAAM,cAAc,2BAA4B,mBAAmB,4CAwClE,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"TeachMeWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.tsx"],"names":[],"mappings":"AA8IA,UAAU,mBAAmB;IAC3B,kBAAkB,EAAE,GAAG,CAAC;CACzB;AAED,QAAA,MAAM,cAAc,2BAA4B,mBAAmB,4CAyClE,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/instant-learning",
3
- "version": "0.1.1-alpha.4",
3
+ "version": "0.1.1-alpha.5",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",