@e-llm-studio/instant-learning 0.1.1-alpha.12 → 0.1.1-alpha.13

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/README.md CHANGED
@@ -10,4 +10,4 @@ becomes 0.0.0-alpha.0
10
10
 
11
11
  3. during publish : npm publish --tag alpha
12
12
 
13
- 4. installation : npm install @e-llm-studio/instant-learning@0.1.0-alpha.1
13
+ 4. installation : npm install @e-llm-studio/instant-learning@0.1.0-alpha.12
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),t=require("../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js"),l=require("../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js"),a=require("react"),I=require("@mui/material");function r(i){return i&&"object"==typeof i&&"default"in i?i:{default:i}}var N=r(require("@mui/icons-material/Close")),n=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 a=i.sent(),console.log("Fetched value type data:",a),!a||Array.isArray(a.data)&&0===a.data.length?[2,null]:[2,a.data[0].value_type_name||a.valueTypeName||a.templateName]}})})},j=function(){var t=a.useState(!0),l=t[0],r=t[1];return e.jsxs(I.Dialog,i.__assign({open:l,onClose:function(){return r(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[e.jsxs(I.DialogTitle,i.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[e.jsx(I.Typography,i.__assign({variant:"h6",fontWeight:600},{children:"Teach Me"})),e.jsx(I.IconButton,i.__assign({onClick:function(){return r(!1)}},{children:e.jsx(N.default,{})}))]})),e.jsx(I.DialogContent,i.__assign({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},s=function(i){switch(console.log("Switching to template: ".concat(i)),i){case"Default":return e.jsx(l.default,{});case"Radio Traffic Learning":return e.jsx(t.default,{});default:return e.jsx(j,{})}};exports.default=function(t){var l=t.app_integration_id,r=a.useState(null),N=r[0],c=r[1],h=a.useState(!0),M=h[0],o=h[1],Z=a.useState(!1),u=Z[0],Y=Z[1];return a.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]),o(!0),[4,n(l,"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXBhcnRtZW50cyI6W10sIm9yZ2FuaXphdGlvbiI6W10sImdyb3VwcyI6W10sImNvbm5lY3Rvck1hcCI6e30sIl9pZCI6IjY3MzFmY2NjMDhiYmRjYjViYTM1MWQ4MSIsImVtYWlsIjoiYWtzaGF5LmtvbWFrdWxhQHRlY2hvbHV0aW9uLmNvbSIsInJvbGUiOlsiNjhkNTI3YmNiOTQ1YTFjY2Q5MTUyZTU0IiwiNjhkNmI3OGQ5NTA3MGIwNDkzNmYxMDdjIiwiNjg5OWJkMmFhZDlkMDhkYWRkMWM1OTYzIiwiNjhlN2EyNWVmNmExODgyZTg1M2M4MGFlIiwiNjhlM2I3M2MwMjE2NzhkYmY2M2RiYjY0IiwiNjhkZDA2NjljMjAyYmJjYjkwYmZhMjA1IiwiNjc3ZmYwMzQzMjkwNGIwMmYxZTcyYmQ2IiwiNjg5OWMwMTdhZDlkMDhkYWRkMWM1YzcxIiwiNjZjZGM0ODFjZDM2NDkxMGE4MzZlOTRmIiwiNjhkNTUwMzFiOTQ1YTFjY2Q5MTUzOTkxIiwiNjhkZDExMTNjMjA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return t=i.sent(),console.error("Failed to fetch value type:",t),Y(!0),[3,4];case 3:return o(!1),[7];case 4:return[2]}})})},[l]),console.log("hi hello",l),M?e.jsx(I.Box,i.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:e.jsx(I.CircularProgress,{size:32})})):u?e.jsx(j,{}):e.jsx(e.Fragment,{children:s(N)})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js"),a=require("../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js"),r=require("react"),n=require("@mui/material");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(require("@mui/icons-material/Close")),l=function(i,t){return e.__awaiter(void 0,void 0,void 0,function(){var a,r;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(i),{headers:{Authorization:"Bearer ".concat(t)}})];case 1:if(!(a=e.sent()).ok)throw new Error("Failed to fetch value type");return[4,a.json()];case 2:return r=e.sent(),console.log("Fetched value type data:",r),!r||Array.isArray(r.data)&&0===r.data.length?[2,null]:[2,r.data[0].value_type_name||r.valueTypeName||r.templateName]}})})},I=function(){var t=r.useState(!0),a=t[0],s=t[1];return i.jsxs(n.Dialog,e.__assign({open:a,onClose:function(){return s(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[i.jsxs(n.DialogTitle,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[i.jsx(n.Typography,e.__assign({variant:"h6",fontWeight:600},{children:"Teach Me"})),i.jsx(n.IconButton,e.__assign({onClick:function(){return s(!1)}},{children:i.jsx(c.default,{})}))]})),i.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."}))]}))},o=function(e){switch(console.log("Switching to template: ".concat(e)),e){case"Default":return i.jsx(a.default,{});case"Radio Traffic Learning":return i.jsx(t.default,{});default:return i.jsx(I,{})}};exports.default=function(t){var a=t.app_integration_id,s=r.useState(null),c=s[0],u=s[1],j=r.useState(!0),d=j[0],h=j[1],N=r.useState(!1),M=N[0],Y=N[1];return r.useEffect(function(){e.__awaiter(void 0,void 0,void 0,function(){var i,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),h(!0),[4,l(a,"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXBhcnRtZW50cyI6W10sIm9yZ2FuaXphdGlvbiI6W10sImdyb3VwcyI6W10sImNvbm5lY3Rvck1hcCI6e30sIl9pZCI6IjY2M2NjNzhkODNkY2MwYjdmMzMwMjY3ZiIsImVtYWlsIjoic2FiaXRoQHRlY2hvbHV0aW9uLmNvbSIsInJvbGUiOlsiNjYyMGU1NWIyMTA3ZmVmODA0NzgxMDU5IiwiNjY4N2E4YTVmN2U4M2Y0OTY3ZGQ2OGJhIiwiNjYzY2U5Y2I4M2RjYzBiN2YzMzAzNzE5IiwiNjZjNDk1NzI4ZjA2N2ZkZDFjODI0YzkzIiwiNjc3ZmYwMzQzMjkwNGIwMmYxZTcyYmQ2IiwiNjVkZGQ2ZWE0M2Y3OTg2YzZiYTc0Yjk1IiwiNjVlNzFlYzM5ZmQ5NGNlOTAwZjA2NTg2IiwiNjVjNjFhNWQ2NzA1M2YyYWYzZjdhZDYxIiwiNjc5YmJjYjhiMTc0Y2I4MTE3YWU0ZGY4IiwiNjg5OWMzM2FlOWZkNDFmM2Y5MDhlZGQwIiwiNjY3OTEzOWY5NGJhMzYxNGRmODFjNjAzIiwiNjgxZGQzN2QzMmI2ZWI5OGJkMjA4ZTJiIiwiNjg5OWM1MjI0ZDZkYzQxY2QxZmI3OTVhIiwiNjgxZGQzNjYzMmI2ZWI5OGJkMjA4ZTIxIiwiNjg5OWMwMTdhZDlkMDhkYWRkMWM1YzZkIl0sInN0YXR1cyI6IkFDVElWRSIsInJlc2V0X3Rva2VuIjpudWxsLCJjcmVhdGVkQXQiOiIyMDI0LTA1LTA2VDA2OjQ0OjAyLjI4OFoiLCJmaXJzdG5hbWUiOiJTYWJpdGgiLCJqb2luZWRPbiI6IjIwMjQtMDUtMDlUMTI6NTU6NDMuNjkzWiIsImxhc3RuYW1lIjoiUG9ja2VyIiwicGhvbmUiOjk4NDY0MzEzODIsInVzZXJWYWxpZGl0eSI6IjIwMjUtMDktMTBUMTE6MzM6NTQuNjAyWiIsInJvbGVuYW1lIjpbIkhDLVByb2QtQ2xpZW50IiwiT3JnIFVzZXIiLCJBcHBtb2RfQWRtaW4iLCJIQ19FZGl0b3JfVGVzdCIsIkhpcmVBcHAgTW9kZSBVc2VyIiwiQXBwbW9kX1NNRSIsIkFwcFNlY0F1dGhfQWRtaW4iLCJjdy1hZG1pbiIsImN3LXVzZXIiLCJTdGFja21vZF9Vc2VyIiwiQWRtaW5pc3RyYXRvciIsIkVkaXRvciIsIk9yZyBBZG1pbiIsIkhDIENsaWVudCAtIFByb2QgJiBRQSIsIkFwcE1vZF9Qcm9kX3VzZXIiXSwiaWF0IjoxNzc4OTQ5MzA4LCJleHAiOjE3NzkxMjIxMDh9.PSkfTnhgIm2LCkiY57ZicNPrgCKrx3dmanw_Q86GcxU")];case 1:return i=e.sent(),u(i),[3,4];case 2:return t=e.sent(),console.error("Failed to fetch value type:",t),Y(!0),[3,4];case 3:return h(!1),[7];case 4:return[2]}})})},[a]),console.log("hi hello",a),d?i.jsx(n.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:i.jsx(n.CircularProgress,{size:32})})):M?i.jsx(I,{}):i.jsx(i.Fragment,{children:o(c)})};
2
2
  //# sourceMappingURL=TeachMeWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i,__awaiter as e,__generator as l}from"tslib";import{jsx as I,Fragment as t,jsxs as N}from"react/jsx-runtime";import a from"../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js";import n from"../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js";import{useState as r,useEffect as j}from"react";import{Box as c,CircularProgress as h,Dialog as M,DialogTitle as m,Typography as Z,IconButton as o,DialogContent as Y}from"@mui/material";import W from"@mui/icons-material/Close";var s=function(i,I){return e(void 0,void 0,void 0,function(){var e,t;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(I)}})];case 1:if(!(e=l.sent()).ok)throw new Error("Failed to fetch value type");return[4,e.json()];case 2:return t=l.sent(),console.log("Fetched value type data:",t),!t||Array.isArray(t.data)&&0===t.data.length?[2,null]:[2,t.data[0].value_type_name||t.valueTypeName||t.templateName]}})})},d=function(){var e=r(!0),l=e[0],t=e[1];return N(M,i({open:l,onClose:function(){return t(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[N(m,i({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[I(Z,i({variant:"h6",fontWeight:600},{children:"Teach Me"})),I(o,i({onClick:function(){return t(!1)}},{children:I(W,{})}))]})),I(Y,i({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},w=function(i){switch(console.log("Switching to template: ".concat(i)),i){case"Default":return I(n,{});case"Radio Traffic Learning":return I(a,{});default:return I(d,{})}},k=function(N){var a=N.app_integration_id,n=r(null),M=n[0],m=n[1],Z=r(!0),o=Z[0],Y=Z[1],W=r(!1),k=W[0],u=W[1];return j(function(){e(void 0,void 0,void 0,function(){var i,e;return l(this,function(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IkF1ZGFjeXRlc3QwMSBBZG1pbiIsIlN0YWNrbW9kX1VzZXIiLCJBZ2VudCBHZW5pZSBNb2RlIE1hbmFnZXIiLCJhdWRhY3l0ZXN0MDUgQWRtaW4iLCJhdWRhY3l0ZXN0MyBBZG1pbiBDb25maWdBY2Nlc3MgZWRpdCIsImF1ZGFjeXRlc3QwNyBBZG1pbiIsIkthdGh5YXlhbmlEZW1vSUwgQWRtaW4iLCJhdWRhY3l0ZXN0MDIgQWRtaW4iLCJhdWRhY3l0ZXN0MDMgQWRtaW4iLCJhdWRhY3l0ZXN0MyBBZG1pbiBVc2VyQWNjZXNzIGVkaXQiLCJUcmFmZmljIE1hbmFnZXIgTW9kZSBBZG1pbiIsImF1ZGFjeXRlc3QgQWRtaW4gVXNlckFjY2VzcyB2aWV3IiwiYXVkYWN5dGVzdDA2IEFkbWluIFVzZXJBY2Nlc3MgZWRpdCIsIkFjY291bnRzIFBheWFibGUgTW9kZSBBZG1pbiIsIkFwcE1vZF9Qcm9kX3VzZXIiXSwiaWF0IjoxNzc4MTgzMTgwLCJleHAiOjE3NzgzNTU5ODB9.1hTN5aMIc_6S4ob7ZWZo1mjKllJ8TxwB-dQTJ-Y8rqI")];case 1:return i=l.sent(),m(i),[3,4];case 2:return e=l.sent(),console.error("Failed to fetch value type:",e),u(!0),[3,4];case 3:return Y(!1),[7];case 4:return[2]}})})},[a]),console.log("hi hello",a),o?I(c,i({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:I(h,{size:32})})):k?I(d,{}):I(t,{children:w(M)})};export{k as default};
1
+ import{__assign as i,__awaiter as e,__generator as t}from"tslib";import{jsx as r,Fragment as n,jsxs as a}from"react/jsx-runtime";import I from"../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js";import c from"../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js";import{useState as l,useEffect as o}from"react";import{Box as s,CircularProgress as u,Dialog as h,DialogTitle as j,Typography as d,IconButton as m,DialogContent as N}from"@mui/material";import M from"@mui/icons-material/Close";var Y=function(i,r){return e(void 0,void 0,void 0,function(){var e,n;return t(this,function(t){switch(t.label){case 0:return[4,fetch("".concat("https://devllmstudio.creativeworkspace.ai","/instant_learning/ilotj/application/getValueType/").concat(i),{headers:{Authorization:"Bearer ".concat(r)}})];case 1:if(!(e=t.sent()).ok)throw new Error("Failed to fetch value type");return[4,e.json()];case 2:return n=t.sent(),console.log("Fetched value type data:",n),!n||Array.isArray(n.data)&&0===n.data.length?[2,null]:[2,n.data[0].value_type_name||n.valueTypeName||n.templateName]}})})},p=function(){var e=l(!0),t=e[0],n=e[1];return a(h,i({open:t,onClose:function(){return n(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[a(j,i({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[r(d,i({variant:"h6",fontWeight:600},{children:"Teach Me"})),r(m,i({onClick:function(){return n(!1)}},{children:r(M,{})}))]})),r(N,i({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},Z=function(i){switch(console.log("Switching to template: ".concat(i)),i){case"Default":return r(c,{});case"Radio Traffic Learning":return r(I,{});default:return r(p,{})}},f=function(a){var I=a.app_integration_id,c=l(null),h=c[0],j=c[1],d=l(!0),m=d[0],N=d[1],M=l(!1),f=M[0],z=M[1];return o(function(){e(void 0,void 0,void 0,function(){var i,e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,3,4]),N(!0),[4,Y(I,"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXBhcnRtZW50cyI6W10sIm9yZ2FuaXphdGlvbiI6W10sImdyb3VwcyI6W10sImNvbm5lY3Rvck1hcCI6e30sIl9pZCI6IjY2M2NjNzhkODNkY2MwYjdmMzMwMjY3ZiIsImVtYWlsIjoic2F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NlY0F1dGhfQWRtaW4iLCJjdy1hZG1pbiIsImN3LXVzZXIiLCJTdGFja21vZF9Vc2VyIiwiQWRtaW5pc3RyYXRvciIsIkVkaXRvciIsIk9yZyBBZG1pbiIsIkhDIENsaWVudCAtIFByb2QgJiBRQSIsIkFwcE1vZF9Qcm9kX3VzZXIiXSwiaWF0IjoxNzc4OTQ5MzA4LCJleHAiOjE3NzkxMjIxMDh9.PSkfTnhgIm2LCkiY57ZicNPrgCKrx3dmanw_Q86GcxU")];case 1:return i=t.sent(),j(i),[3,4];case 2:return e=t.sent(),console.error("Failed to fetch value type:",e),z(!0),[3,4];case 3:return N(!1),[7];case 4:return[2]}})})},[I]),console.log("hi hello",I),m?r(s,i({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:r(u,{size:32})})):f?r(p,{}):r(n,{children:Z(h)})};export{f as default};
2
2
  //# sourceMappingURL=TeachMeWrapper.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/instant-learning",
3
- "version": "0.1.1-alpha.12",
3
+ "version": "0.1.1-alpha.13",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",