@e-llm-studio/instant-learning 0.1.1-alpha.1 → 0.1.1-alpha.3
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 +1 -13
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
- 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/TemplatesMap/templatesMap.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.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/TemplatesMap/templatesMap.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +3 -0
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +1 -0
- 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/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.d.ts +73 -0
- package/dist/types/src/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.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/dist/types/src/plugins/valueTypes/Default/DefaultTeachMeRenderer.d.ts +28 -0
- package/dist/types/src/plugins/valueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -0
- package/dist/types/src/plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.d.ts +28 -0
- package/dist/types/src/plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.d.ts.map +1 -0
- package/package.json +7 -21
package/README.md
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
# Instant Learning Library
|
|
2
|
-
|
|
3
|
-
Alpha Release Commands -
|
|
4
|
-
|
|
5
|
-
1. npm version prerelease --preid=alpha
|
|
6
|
-
|
|
7
|
-
becomes 0.0.0-alpha.0
|
|
8
|
-
|
|
9
|
-
2. run this again to bump it : npm version prerelease --preid=alpha
|
|
10
|
-
|
|
11
|
-
3. during publish : npm publish --tag alpha
|
|
12
|
-
|
|
13
|
-
4. installation : npm install @e-llm-studio/instant-learning@0.1.0-alpha.1
|
|
1
|
+
# Instant Learning Library
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),s=require("react"),n=require("../_svg/InfoIcon.js");exports.default=function(t){var l=t.validationType,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),s=require("react"),n=require("../_svg/InfoIcon.js");exports.default=function(t){var l=t.validationType,o=t.decisionStrength,r=t.ruleId,a=t.title,d=t.tier,x=t.descriptionText,p=t.reasoningNode,g=t.customStyles,c=t.onViewComparison,u=t.disabled,h=s.useState(!1),_=h[0],f=h[1],y="100%"===o?"Exact Rule Found":"duplicate"===l?"Existing Rule Found":"Similar Rule Found",j=e.__assign({display:"flex",flexDirection:"column",border:"1px solid #E3E6EA",borderRadius:"8px",padding:"14px 16px",gap:"8px",backgroundColor:"#fff"},null==g?void 0:g.container),v=e.__assign({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#E0F2FE80",color:"#0369A1",padding:"0.5px 9px",borderRadius:"9999px",fontSize:"12px",fontWeight:500},null==g?void 0:g.headerTag),F=e.__assign({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#FEE2E2",color:"#B91C1C",padding:"0.5px 7px",borderRadius:"6px",fontSize:"12px",fontWeight:500},null==g?void 0:g.strengthBadgeStyle),b=e.__assign({display:"flex",flexDirection:"row",alignItems:"center",padding:"8px",gap:"8px",width:"100%",maxWidth:"140px",height:"44px",backgroundColor:u?"#F2F4F7":_?"#EFF4FF":"transparent",border:u?"1px solid #D0D5DD":_?"1px solid #B2CCFF":"1px solid transparent",borderRadius:"8px",cursor:u?"not-allowed":"pointer",opacity:u?.6:1,boxSizing:"border-box",transition:"all 0.2s ease"},null==g?void 0:g.button);return i.jsxs("div",e.__assign({style:j},{children:[i.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[i.jsxs("div",e.__assign({style:v},{children:[i.jsx(n.default,{})," ",y]})),o&&i.jsx("div",e.__assign({style:F},{children:i.jsx("span",{children:o})}))]})),i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"6px"}},{children:[i.jsxs("h3",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:500,color:"#19213D",margin:0},null==g?void 0:g.title)},{children:[a," ",d?"— ".concat(d):""]})),i.jsxs("div",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:400,color:"#666F8D",lineHeight:"1.5"},null==g?void 0:g.description)},{children:[i.jsx("span",{children:x}),p]}))]})),i.jsxs("button",e.__assign({style:b,onClick:function(){f(!0),c(r,o)},disabled:u},{children:[i.jsxs("svg",e.__assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i.jsx("rect",{x:"0.5",y:"0.5",width:"27",height:"27",rx:"13.5",fill:_?"#D1E0FF":"transparent",stroke:_?"#D1E0FF":"#D0D5DD",style:{transition:"all 0.2s ease"}}),i.jsx("path",{d:"M9.33399 13.9974L18.6673 13.9974M18.6673 13.9974L14.0007 18.6641M18.6673 13.9974L14.0007 9.33073",stroke:_?"#004EEB":"#667085",strokeWidth:"1.52381",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"stroke 0.2s ease"}})]})),i.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,fontFamily:"'Inter', sans-serif",color:"#1D2939",lineHeight:"20px",display:"flex",alignItems:"center"}},{children:"Compare"}))]}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=RuleValidationCard.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),t=require("react"),n=require("../../organisms/TextSection/TextSection.js"),o=require("../../organisms/ScopeSection/ScopeSection.js"),s=require("../../organisms/ConditionSection/ConditionSection.js"),d=require("../../organisms/ConfigSection/ConfigSection.js"),a=require("../../InputDataReasoningCard.js"),l=require("../../_svg/ButtonCognitiveIcon.js");exports.BaseTemplate=function(r){var c,p,g,h,v,u,I,E,m,f,b,S,y,x,C,A,_,j,T,N,w,W,D,L,O,M,q,P,R,V,H,B,K,z=r.state,k=r.handlers,F=r.uiState,G=r.customNodes,J=void 0===G?{}:G,Q=t.useState({}),U=Q[0],X=Q[1],Y=t.useState(new Set),Z=Y[0],$=Y[1],ii=function(e){X(function(t){var n;return i.__assign(i.__assign({},t),((n={})[e]=!t[e],n))})},ei=function(i){var e,t=null===(e=z.fieldCitations)||void 0===e?void 0:e[i];return Array.isArray(t)&&t.length>0?t:z.citations||[]},ti={marginTop:"-17px",position:"relative",zIndex:1},ni=function(i){return!!F.isAiStreaming||(!!F.isReadOnly||!(!F.activeEditId||F.activeEditId.startsWith(i)))};return e.jsxs("div",i.__assign({className:"base-template-container",style:{display:"flex",flexDirection:"column",gap:"16px",width:"100%"}},{children:[J.top&&e.jsx("div",i.__assign({className:"custom-slot-top"},{children:J.top})),e.jsxs("div",i.__assign({className:"template-section"},{children:[e.jsx(n.TextSection,{id:"base-title",title:F.titleLabel||"Title",fieldName:F.titleLabel||"Title",rows:1,placeholder:"Enter a descriptive title",required:!0,value:z.title||"",onChange:k.onTitleChange,readOnly:ni("base-title"),isOpen:U.title,onToggle:function(){return ii("title")},isHighlighted:(null===(c=F.highlights)||void 0===c?void 0:c.get("title"))||!1,showCognitiveIcon:!!(null===(p=z.citation)||void 0===p?void 0:p.title),tooltipDescription:"Why this ".concat(F.titleLabel||"Title","?"),errorMessage:null===(g=F.validationErrors)||void 0===g?void 0:g.title,enableInlineEdit:!0,setSendMessageInChat:F.setSendMessageInChat,activeEditId:null!==(h=F.activeEditId)&&void 0!==h?h:null,setActiveEditId:F.setActiveEditId,pendingEditId:null!==(v=F.pendingEditId)&&void 0!==v?v:null,setPendingEditId:F.setPendingEditId}),(null===(u=z.citation)||void 0===u?void 0:u.title)&&e.jsx("div",i.__assign({style:ti},{children:e.jsx(a.InputDataReasoningCard,{isVisible:U.title,citation:z.citation.title,citations:ei("title"),fieldName:F.titleLabel||"Title",fieldValue:z.title||""})}))]})),J.afterTitle&&e.jsx("div",i.__assign({className:"custom-slot"},{children:J.afterTitle})),F.showScope&&e.jsxs("div",i.__assign({className:"template-section"},{children:[e.jsx(o.ScopeSection,{id:"base-scope",title:F.scopeLabel||"",required:!1,scopeData:z.scopeData||{},onScopeChange:k.onScopeChange,openSections:Z,setOpenSections:$,stationOptions:F.stationOptions||[],tierOptions:F.tierOptions||[],tierLabel:F.tierLabel||"Where should this apply?",stationLabel:F.stationLabel||"Which scope should this belong to?",highlights:(null===(I=F.highlights)||void 0===I?void 0:I.get("scope"))||{},isOpen:U.scope,onToggle:function(){return ii("scope")},showCognitiveIcon:!!(null===(E=z.citation)||void 0===E?void 0:E.scope),cognitiveIcon:e.jsx(l.ButtonCognitiveIcon,{}),tooltipDescription:"Why this Scope?",errorMessage:(null===(m=F.validationErrors)||void 0===m?void 0:m.station)||(null===(f=F.validationErrors)||void 0===f?void 0:f.tiers),stationErrorMessage:null===(b=F.validationErrors)||void 0===b?void 0:b.station,tierErrorMessage:null===(S=F.validationErrors)||void 0===S?void 0:S.tiers,readOnly:ni("base-scope")}),(null===(y=z.citation)||void 0===y?void 0:y.scope)&&e.jsx("div",i.__assign({style:ti},{children:e.jsx(a.InputDataReasoningCard,{isVisible:U.scope,citation:z.citation.scope,citations:ei("scope"),fieldName:"Scope",fieldValue:(null===(C=null===(x=z.scopeData)||void 0===x?void 0:x.tiers)||void 0===C?void 0:C.join(", "))||""})}))]})),J.afterScope&&e.jsx("div",i.__assign({className:"custom-slot"},{children:J.afterScope})),e.jsxs("div",i.__assign({className:"template-section"},{children:[e.jsx(n.TextSection,{id:"base-description",title:F.descriptionLabel||"Description",fieldName:F.descriptionLabel||"Description",rows:3,placeholder:"Explain the behaviour or learning",required:!0,value:z.description||"",onChange:k.onDescriptionChange,readOnly:ni("base-description"),isOpen:U.description,onToggle:function(){return ii("description")},isHighlighted:(null===(A=F.highlights)||void 0===A?void 0:A.get("description"))||!1,showCognitiveIcon:!!(null===(_=z.citation)||void 0===_?void 0:_.description),tooltipDescription:"Why this ".concat(F.descriptionLabel||"Description","?"),errorMessage:null===(j=F.validationErrors)||void 0===j?void 0:j.description,enableInlineEdit:!0,setSendMessageInChat:F.setSendMessageInChat,activeEditId:null!==(T=F.activeEditId)&&void 0!==T?T:null,setActiveEditId:F.setActiveEditId,pendingEditId:null!==(N=F.pendingEditId)&&void 0!==N?N:null,setPendingEditId:F.setPendingEditId}),(null===(w=z.citation)||void 0===w?void 0:w.description)&&e.jsx("div",i.__assign({style:ti},{children:e.jsx(a.InputDataReasoningCard,{isVisible:U.description,citation:z.citation.description,citations:ei("description"),fieldName:F.descriptionLabel||"Description",fieldValue:z.description||""})}))]})),J.afterDescription&&e.jsx("div",i.__assign({className:"custom-slot"},{children:J.afterDescription})),e.jsx("div",i.__assign({className:"template-section"},{children:e.jsx(s.ConditionSection,{id:"condition-wta-base",idPrefix:"condition-wta",title:F.whenToApplyLabel||"When to apply",required:!0,dividerRequired:!0,readOnly:ni("condition-wta"),conditions:z.whenToApplyConditions||[],onAdd:k.onAddWhenToApply,onRemove:function(i,e,t){return k.onRemoveWhenToApply(t)},onEdit:function(i,e,t,n){return k.onEditWhenToApply(t,n)},isHighlighted:(null===(W=F.highlights)||void 0===W?void 0:W.get("wta"))||!1,highlightedIds:F.highlightedIds,tooltipDescription:"Why this Condition?",citations:ei("whenToApply"),bordered:!0,addLabel:"Add ".concat(F.whenToApplyLabel||"When to apply"),isAiStreaming:F.isAiStreaming,errorMessage:(null===(D=F.validationErrors)||void 0===D?void 0:D.whenToApply)||F.conflictReason,index:0,tierKey:"base",activeEditId:null!==(L=F.activeEditId)&&void 0!==L?L:null,setActiveEditId:F.setActiveEditId,pendingEditId:null!==(O=F.pendingEditId)&&void 0!==O?O:null,setPendingEditId:F.setPendingEditId,setSendMessageInChat:F.setSendMessageInChat})})),J.afterWhenToApply&&e.jsx("div",i.__assign({className:"custom-slot"},{children:J.afterWhenToApply})),e.jsx("div",i.__assign({className:"template-section"},{children:e.jsx(s.ConditionSection,{id:"condition-wnta-base",idPrefix:"condition-wnta",title:F.whenNotToApplyLabel||"When NOT to apply",required:!1,dividerRequired:!0,readOnly:ni("condition-wnta"),conditions:z.whenNotToApplyConditions||[],onAdd:k.onAddWhenNotToApply,onRemove:function(i,e,t){return k.onRemoveWhenToApply(t)},onEdit:function(i,e,t,n){return k.onEditWhenNotToApply(t,n)},isHighlighted:(null===(M=F.highlights)||void 0===M?void 0:M.get("wnta"))||!1,highlightedIds:F.highlightedIds,tooltipDescription:"Why this Condition?",citations:ei("whenNotToApply"),bordered:!0,addLabel:"Add ".concat(F.whenNotToApplyLabel||"When NOT to apply"),isAiStreaming:F.isAiStreaming,errorMessage:null===(q=F.validationErrors)||void 0===q?void 0:q.whenNotToApply,index:0,tierKey:"base",activeEditId:null!==(P=F.activeEditId)&&void 0!==P?P:null,setActiveEditId:F.setActiveEditId,pendingEditId:null!==(R=F.pendingEditId)&&void 0!==R?R:null,setPendingEditId:F.setPendingEditId,setSendMessageInChat:F.setSendMessageInChat})})),J.afterWhenNotToApply&&e.jsx("div",i.__assign({className:"custom-slot"},{children:J.afterWhenNotToApply})),F.showConfiguration&&e.jsxs("div",i.__assign({className:"template-section"},{children:[e.jsx(d.ConfigSection,{id:"base-config",title:F.configLabel||"Configuration",required:!1,highlights:(null===(V=F.highlights)||void 0===V?void 0:V.get("config"))||{},bordered:!0,readOnly:ni("base-config"),onConfigChange:function(i,e){var t;return null===(t=k.onConfigChange)||void 0===t?void 0:t.call(k,i,e)},separationItems:F.separationItems||[],toggles:F.toggles||[],index:0,openSections:Z,setOpenSections:$,activeEditId:null!==(H=F.activeEditId)&&void 0!==H?H:null,setActiveEditId:F.setActiveEditId,pendingEditId:null!==(B=F.pendingEditId)&&void 0!==B?B:null,setPendingEditId:F.setPendingEditId,isAiStreaming:F.isAiStreaming,setSendMessageInChat:F.setSendMessageInChat}),(null===(K=z.citation)||void 0===K?void 0:K.config)&&e.jsx("div",i.__assign({style:ti},{children:e.jsx(a.InputDataReasoningCard,{isVisible:U.config,citation:z.citation.config,citations:ei("config"),fieldName:F.configLabel||"Configuration",fieldValue:"Proposed Configuration"})}))]})),J.bottom&&e.jsx("div",i.__assign({className:"custom-slot-bottom"},{children:J.bottom}))]}))};
|
|
2
|
+
//# sourceMappingURL=BaseTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseTemplate.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,t=require("../CreateCategory/CreateCategory.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,t=require("../BaseTemplate/BaseTemplate.js"),a=require("../CreateCategory/CreateCategory.js"),s=require("../Testing/Testing.js"),o=require("../TrafficManager/CreateRule.js"),p=require("../TrafficManager/TrafficManagerTemplate.js"),T=require("../WorkflowComposer/WorkflowComposer.js");exports.TemplateList=void 0,(r=exports.TemplateList||(exports.TemplateList={})).BaseTemplate="BASE_TEMPLATE",r.TrafficManager="TRAFFIC_MANAGER",r.testing="TESTING",r.CreateRule="CREATE_RULE",r.WorkflowComposer="WORKFLOW_COMPOSER",r.CreateCategory="CREATE_CATEGORY";var i=((e={})[exports.TemplateList.BaseTemplate]=t.BaseTemplate,e[exports.TemplateList.TrafficManager]=p.TrafficManagerTemplate,e[exports.TemplateList.testing]=s.Testing,e[exports.TemplateList.CreateRule]=o.CreateRule,e[exports.TemplateList.WorkflowComposer]=T.WorkflowComposer,e[exports.TemplateList.CreateCategory]=a.CreateCategory,e);exports.TemplateMap=i;
|
|
2
2
|
//# sourceMappingURL=templatesMap.js.map
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/InstantLearning/InstantLearning.js"),t=require("./features/WtaWnta/WtaWnta.js"),r=require("./features/DocumentLearning/DocumentLearning.js"),o=require("./features/IL-OTJ/ILOTJ.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/InstantLearning/InstantLearning.js"),t=require("./features/WtaWnta/WtaWnta.js"),r=require("./features/DocumentLearning/DocumentLearning.js"),o=require("./features/IL-OTJ/ILOTJ.js"),s=require("./features/IL-OTJ/_components/atoms/Button/Button.js"),n=require("./features/IL-OTJ/_components/atoms/Dropdown/Dropdown.js"),a=require("./features/IL-OTJ/_components/atoms/Toggle/Toggle.js"),i=require("./features/IL-OTJ/_components/atoms/Textarea/Textarea.js"),p=require("./features/IL-OTJ/_components/molecules/Condition/ConditionList.js"),u=require("./features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js"),c=require("./features/IL-OTJ/_components/molecules/SeperationRow/SeparationRow.js"),T=require("./features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.js"),x=require("./features/IL-OTJ/_components/organisms/TextSection/TextSection.js"),f=require("./features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js"),m=require("./features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js"),l=require("./features/IL-OTJ/_components/templates/TrafficManager/TrafficManagerTemplate.js"),d=require("./features/IL-OTJ/_components/templates/Testing/Testing.js"),g=require("./features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js"),L=require("./features/IL-OTJ/helpers/utils.js"),I=require("./features/IL-OTJ/store/CitationsContext.js"),S=require("./features/IL-OTJ/ILOTJTest.js");exports.InstantLearning=e.default,exports.WtaWnta=t.default,exports.BookLearning=r.default,exports.ILOTJ=o.default,exports.Button=s.Button,exports.Dropdown=n.Dropdown,exports.Toggle=a.Toggle,exports.Textarea=i.Textarea,exports.ConditionList=p.ConditionList,exports.SectionWrapper=u.SectionWrapper,exports.SeparationRow=c.SeparationRow,exports.ConfigSection=T.ConfigSection,exports.TextSection=x.TextSection,exports.ScopeSection=f.ScopeSection,exports.ConditionSection=m.ConditionSection,exports.TrafficManagerTemplate=l.TrafficManagerTemplate,exports.Testing=d.Testing,Object.defineProperty(exports,"TemplateList",{enumerable:!0,get:function(){return g.TemplateList}}),exports.TemplateMap=g.TemplateMap,exports.extractAndParseResponse=L.extractAndParseResponse,exports.extractAndParseWithProperty=L.extractAndParseWithProperty,exports.extractTextFromChildren=L.extractTextFromChildren,exports.extractVariantIds=L.extractVariantIds,exports.parseValidationData=L.parseValidationData,exports.useHeaderObserver=L.useHeaderObserver,exports.CitationProvider=I.CitationProvider,exports.useCitations=I.useCitations,exports.getVariantInfo=S.getVariantInfo;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import o from"../_svg/InfoIcon.js";var l=function(l){var r=l.validationType,d=l.decisionStrength,
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import o from"../_svg/InfoIcon.js";var l=function(l){var r=l.validationType,d=l.decisionStrength,s=l.ruleId,a=l.title,p=l.tier,c=l.descriptionText,x=l.reasoningNode,g=l.customStyles,f=l.onViewComparison,h=l.disabled,u=n(!1),y=u[0],m=u[1],F="100%"===d?"Exact Rule Found":"duplicate"===r?"Existing Rule Found":"Similar Rule Found",v=e({display:"flex",flexDirection:"column",border:"1px solid #E3E6EA",borderRadius:"8px",padding:"14px 16px",gap:"8px",backgroundColor:"#fff"},null==g?void 0:g.container),b=e({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#E0F2FE80",color:"#0369A1",padding:"0.5px 9px",borderRadius:"9999px",fontSize:"12px",fontWeight:500},null==g?void 0:g.headerTag),D=e({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#FEE2E2",color:"#B91C1C",padding:"0.5px 7px",borderRadius:"6px",fontSize:"12px",fontWeight:500},null==g?void 0:g.strengthBadgeStyle),E=e({display:"flex",flexDirection:"row",alignItems:"center",padding:"8px",gap:"8px",width:"100%",maxWidth:"140px",height:"44px",backgroundColor:h?"#F2F4F7":y?"#EFF4FF":"transparent",border:h?"1px solid #D0D5DD":y?"1px solid #B2CCFF":"1px solid transparent",borderRadius:"8px",cursor:h?"not-allowed":"pointer",opacity:h?.6:1,boxSizing:"border-box",transition:"all 0.2s ease"},null==g?void 0:g.button);return i("div",e({style:v},{children:[i("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[i("div",e({style:b},{children:[t(o,{})," ",F]})),d&&t("div",e({style:D},{children:t("span",{children:d})}))]})),i("div",e({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[i("div",e({style:{display:"flex",flexDirection:"column",gap:"6px"}},{children:[i("h3",e({style:e({fontSize:"14px",fontWeight:500,color:"#19213D",margin:0},null==g?void 0:g.title)},{children:[a," ",p?"— ".concat(p):""]})),i("div",e({style:e({fontSize:"14px",fontWeight:400,color:"#666F8D",lineHeight:"1.5"},null==g?void 0:g.description)},{children:[t("span",{children:c}),x]}))]})),i("button",e({style:E,onClick:function(){m(!0),f(s,d)},disabled:h},{children:[i("svg",e({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("rect",{x:"0.5",y:"0.5",width:"27",height:"27",rx:"13.5",fill:y?"#D1E0FF":"transparent",stroke:y?"#D1E0FF":"#D0D5DD",style:{transition:"all 0.2s ease"}}),t("path",{d:"M9.33399 13.9974L18.6673 13.9974M18.6673 13.9974L14.0007 18.6641M18.6673 13.9974L14.0007 9.33073",stroke:y?"#004EEB":"#667085",strokeWidth:"1.52381",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"stroke 0.2s ease"}})]})),t("span",e({style:{fontSize:"14px",fontWeight:500,fontFamily:"'Inter', sans-serif",color:"#1D2939",lineHeight:"20px",display:"flex",alignItems:"center"}},{children:"Compare"}))]}))]}))]}))};export{l as default};
|
|
2
2
|
//# sourceMappingURL=RuleValidationCard.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import{TextSection as o}from"../../organisms/TextSection/TextSection.js";import{ScopeSection as d}from"../../organisms/ScopeSection/ScopeSection.js";import{ConditionSection as l}from"../../organisms/ConditionSection/ConditionSection.js";import{ConfigSection as s}from"../../organisms/ConfigSection/ConfigSection.js";import{InputDataReasoningCard as a}from"../../InputDataReasoningCard.js";import{ButtonCognitiveIcon as r}from"../../_svg/ButtonCognitiveIcon.js";var c=function(c){var p,h,g,v,u,m,I,f,E,b,y,A,S,C,T,N,w,W,L,O,D,M,x,P,R,j,q,V,H,K,z,B,_,k=c.state,F=c.handlers,G=c.uiState,J=c.customNodes,Q=void 0===J?{}:J,U=n({}),X=U[0],Y=U[1],Z=n(new Set),$=Z[0],ii=Z[1],ei=function(e){Y(function(t){var n;return i(i({},t),((n={})[e]=!t[e],n))})},ti=function(i){var e,t=null===(e=k.fieldCitations)||void 0===e?void 0:e[i];return Array.isArray(t)&&t.length>0?t:k.citations||[]},ni={marginTop:"-17px",position:"relative",zIndex:1},oi=function(i){return!!G.isAiStreaming||(!!G.isReadOnly||!(!G.activeEditId||G.activeEditId.startsWith(i)))};return e("div",i({className:"base-template-container",style:{display:"flex",flexDirection:"column",gap:"16px",width:"100%"}},{children:[Q.top&&t("div",i({className:"custom-slot-top"},{children:Q.top})),e("div",i({className:"template-section"},{children:[t(o,{id:"base-title",title:G.titleLabel||"Title",fieldName:G.titleLabel||"Title",rows:1,placeholder:"Enter a descriptive title",required:!0,value:k.title||"",onChange:F.onTitleChange,readOnly:oi("base-title"),isOpen:X.title,onToggle:function(){return ei("title")},isHighlighted:(null===(p=G.highlights)||void 0===p?void 0:p.get("title"))||!1,showCognitiveIcon:!!(null===(h=k.citation)||void 0===h?void 0:h.title),tooltipDescription:"Why this ".concat(G.titleLabel||"Title","?"),errorMessage:null===(g=G.validationErrors)||void 0===g?void 0:g.title,enableInlineEdit:!0,setSendMessageInChat:G.setSendMessageInChat,activeEditId:null!==(v=G.activeEditId)&&void 0!==v?v:null,setActiveEditId:G.setActiveEditId,pendingEditId:null!==(u=G.pendingEditId)&&void 0!==u?u:null,setPendingEditId:G.setPendingEditId}),(null===(m=k.citation)||void 0===m?void 0:m.title)&&t("div",i({style:ni},{children:t(a,{isVisible:X.title,citation:k.citation.title,citations:ti("title"),fieldName:G.titleLabel||"Title",fieldValue:k.title||""})}))]})),Q.afterTitle&&t("div",i({className:"custom-slot"},{children:Q.afterTitle})),G.showScope&&e("div",i({className:"template-section"},{children:[t(d,{id:"base-scope",title:G.scopeLabel||"",required:!1,scopeData:k.scopeData||{},onScopeChange:F.onScopeChange,openSections:$,setOpenSections:ii,stationOptions:G.stationOptions||[],tierOptions:G.tierOptions||[],tierLabel:G.tierLabel||"Where should this apply?",stationLabel:G.stationLabel||"Which scope should this belong to?",highlights:(null===(I=G.highlights)||void 0===I?void 0:I.get("scope"))||{},isOpen:X.scope,onToggle:function(){return ei("scope")},showCognitiveIcon:!!(null===(f=k.citation)||void 0===f?void 0:f.scope),cognitiveIcon:t(r,{}),tooltipDescription:"Why this Scope?",errorMessage:(null===(E=G.validationErrors)||void 0===E?void 0:E.station)||(null===(b=G.validationErrors)||void 0===b?void 0:b.tiers),stationErrorMessage:null===(y=G.validationErrors)||void 0===y?void 0:y.station,tierErrorMessage:null===(A=G.validationErrors)||void 0===A?void 0:A.tiers,readOnly:oi("base-scope")}),(null===(S=k.citation)||void 0===S?void 0:S.scope)&&t("div",i({style:ni},{children:t(a,{isVisible:X.scope,citation:k.citation.scope,citations:ti("scope"),fieldName:"Scope",fieldValue:(null===(T=null===(C=k.scopeData)||void 0===C?void 0:C.tiers)||void 0===T?void 0:T.join(", "))||""})}))]})),Q.afterScope&&t("div",i({className:"custom-slot"},{children:Q.afterScope})),e("div",i({className:"template-section"},{children:[t(o,{id:"base-description",title:G.descriptionLabel||"Description",fieldName:G.descriptionLabel||"Description",rows:3,placeholder:"Explain the behaviour or learning",required:!0,value:k.description||"",onChange:F.onDescriptionChange,readOnly:oi("base-description"),isOpen:X.description,onToggle:function(){return ei("description")},isHighlighted:(null===(N=G.highlights)||void 0===N?void 0:N.get("description"))||!1,showCognitiveIcon:!!(null===(w=k.citation)||void 0===w?void 0:w.description),tooltipDescription:"Why this ".concat(G.descriptionLabel||"Description","?"),errorMessage:null===(W=G.validationErrors)||void 0===W?void 0:W.description,enableInlineEdit:!0,setSendMessageInChat:G.setSendMessageInChat,activeEditId:null!==(L=G.activeEditId)&&void 0!==L?L:null,setActiveEditId:G.setActiveEditId,pendingEditId:null!==(O=G.pendingEditId)&&void 0!==O?O:null,setPendingEditId:G.setPendingEditId}),(null===(D=k.citation)||void 0===D?void 0:D.description)&&t("div",i({style:ni},{children:t(a,{isVisible:X.description,citation:k.citation.description,citations:ti("description"),fieldName:G.descriptionLabel||"Description",fieldValue:k.description||""})}))]})),Q.afterDescription&&t("div",i({className:"custom-slot"},{children:Q.afterDescription})),t("div",i({className:"template-section"},{children:t(l,{id:"condition-wta-base",idPrefix:"condition-wta",title:G.whenToApplyLabel||"When to apply",required:!0,dividerRequired:!0,readOnly:oi("condition-wta"),conditions:k.whenToApplyConditions||[],onAdd:F.onAddWhenToApply,onRemove:function(i,e,t){return F.onRemoveWhenToApply(t)},onEdit:function(i,e,t,n){return F.onEditWhenToApply(t,n)},isHighlighted:(null===(M=G.highlights)||void 0===M?void 0:M.get("wta"))||!1,highlightedIds:G.highlightedIds,tooltipDescription:"Why this Condition?",citations:ti("whenToApply"),bordered:!0,addLabel:"Add ".concat(G.whenToApplyLabel||"When to apply"),isAiStreaming:G.isAiStreaming,errorMessage:(null===(x=G.validationErrors)||void 0===x?void 0:x.whenToApply)||G.conflictReason,index:0,tierKey:"base",activeEditId:null!==(P=G.activeEditId)&&void 0!==P?P:null,setActiveEditId:G.setActiveEditId,pendingEditId:null!==(R=G.pendingEditId)&&void 0!==R?R:null,setPendingEditId:G.setPendingEditId,setSendMessageInChat:G.setSendMessageInChat})})),Q.afterWhenToApply&&t("div",i({className:"custom-slot"},{children:Q.afterWhenToApply})),t("div",i({className:"template-section"},{children:t(l,{id:"condition-wnta-base",idPrefix:"condition-wnta",title:G.whenNotToApplyLabel||"When NOT to apply",required:!1,dividerRequired:!0,readOnly:oi("condition-wnta"),conditions:k.whenNotToApplyConditions||[],onAdd:F.onAddWhenNotToApply,onRemove:function(i,e,t){return F.onRemoveWhenToApply(t)},onEdit:function(i,e,t,n){return F.onEditWhenNotToApply(t,n)},isHighlighted:(null===(j=G.highlights)||void 0===j?void 0:j.get("wnta"))||!1,highlightedIds:G.highlightedIds,tooltipDescription:"Why this Condition?",citations:ti("whenNotToApply"),bordered:!0,addLabel:"Add ".concat(G.whenNotToApplyLabel||"When NOT to apply"),isAiStreaming:G.isAiStreaming,errorMessage:null===(q=G.validationErrors)||void 0===q?void 0:q.whenNotToApply,index:0,tierKey:"base",activeEditId:null!==(V=G.activeEditId)&&void 0!==V?V:null,setActiveEditId:G.setActiveEditId,pendingEditId:null!==(H=G.pendingEditId)&&void 0!==H?H:null,setPendingEditId:G.setPendingEditId,setSendMessageInChat:G.setSendMessageInChat})})),Q.afterWhenNotToApply&&t("div",i({className:"custom-slot"},{children:Q.afterWhenNotToApply})),G.showConfiguration&&e("div",i({className:"template-section"},{children:[t(s,{id:"base-config",title:G.configLabel||"Configuration",required:!1,highlights:(null===(K=G.highlights)||void 0===K?void 0:K.get("config"))||{},bordered:!0,readOnly:oi("base-config"),onConfigChange:function(i,e){var t;return null===(t=F.onConfigChange)||void 0===t?void 0:t.call(F,i,e)},separationItems:G.separationItems||[],toggles:G.toggles||[],index:0,openSections:$,setOpenSections:ii,activeEditId:null!==(z=G.activeEditId)&&void 0!==z?z:null,setActiveEditId:G.setActiveEditId,pendingEditId:null!==(B=G.pendingEditId)&&void 0!==B?B:null,setPendingEditId:G.setPendingEditId,isAiStreaming:G.isAiStreaming,setSendMessageInChat:G.setSendMessageInChat}),(null===(_=k.citation)||void 0===_?void 0:_.config)&&t("div",i({style:ni},{children:t(a,{isVisible:X.config,citation:k.citation.config,citations:ti("config"),fieldName:G.configLabel||"Configuration",fieldValue:"Proposed Configuration"})}))]})),Q.bottom&&t("div",i({className:"custom-slot-bottom"},{children:Q.bottom}))]}))};export{c as BaseTemplate};
|
|
2
|
+
//# sourceMappingURL=BaseTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseTemplate.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CreateCategory as r}from"../CreateCategory/CreateCategory.js";import{Testing as
|
|
1
|
+
import{BaseTemplate as e}from"../BaseTemplate/BaseTemplate.js";import{CreateCategory as r}from"../CreateCategory/CreateCategory.js";import{Testing as a}from"../Testing/Testing.js";import{CreateRule as o}from"../TrafficManager/CreateRule.js";import{TrafficManagerTemplate as t}from"../TrafficManager/TrafficManagerTemplate.js";import{WorkflowComposer as f}from"../WorkflowComposer/WorkflowComposer.js";var m,C;!function(e){e.BaseTemplate="BASE_TEMPLATE",e.TrafficManager="TRAFFIC_MANAGER",e.testing="TESTING",e.CreateRule="CREATE_RULE",e.WorkflowComposer="WORKFLOW_COMPOSER",e.CreateCategory="CREATE_CATEGORY"}(C||(C={}));var T=((m={})[C.BaseTemplate]=e,m[C.TrafficManager]=t,m[C.testing]=a,m[C.CreateRule]=o,m[C.WorkflowComposer]=f,m[C.CreateCategory]=r,m);export{C as TemplateList,T as TemplateMap};
|
|
2
2
|
//# sourceMappingURL=templatesMap.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as InstantLearning}from"./features/InstantLearning/InstantLearning.js";export{default as WtaWnta}from"./features/WtaWnta/WtaWnta.js";export{default as BookLearning}from"./features/DocumentLearning/DocumentLearning.js";export{default as ILOTJ}from"./features/IL-OTJ/ILOTJ.js";export{Button}from"./features/IL-OTJ/_components/atoms/Button/Button.js";export{Dropdown}from"./features/IL-OTJ/_components/atoms/Dropdown/Dropdown.js";export{Toggle}from"./features/IL-OTJ/_components/atoms/Toggle/Toggle.js";export{Textarea}from"./features/IL-OTJ/_components/atoms/Textarea/Textarea.js";export{ConditionList}from"./features/IL-OTJ/_components/molecules/Condition/ConditionList.js";export{SectionWrapper}from"./features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js";export{SeparationRow}from"./features/IL-OTJ/_components/molecules/SeperationRow/SeparationRow.js";export{ConfigSection}from"./features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.js";export{TextSection}from"./features/IL-OTJ/_components/organisms/TextSection/TextSection.js";export{ScopeSection}from"./features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js";export{ConditionSection}from"./features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js";export{TrafficManagerTemplate}from"./features/IL-OTJ/_components/templates/TrafficManager/TrafficManagerTemplate.js";export{Testing}from"./features/IL-OTJ/_components/templates/Testing/Testing.js";export{TemplateList,TemplateMap}from"./features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";export{extractAndParseResponse,extractAndParseWithProperty,extractTextFromChildren,extractVariantIds,parseValidationData,useHeaderObserver}from"./features/IL-OTJ/helpers/utils.js";export{CitationProvider,useCitations}from"./features/IL-OTJ/store/CitationsContext.js";export{getVariantInfo}from"./features/IL-OTJ/ILOTJTest.js";
|
|
1
|
+
export{default as InstantLearning}from"./features/InstantLearning/InstantLearning.js";export{default as WtaWnta}from"./features/WtaWnta/WtaWnta.js";export{default as BookLearning}from"./features/DocumentLearning/DocumentLearning.js";export{default as ILOTJ}from"./features/IL-OTJ/ILOTJ.js";export{Button}from"./features/IL-OTJ/_components/atoms/Button/Button.js";export{Dropdown}from"./features/IL-OTJ/_components/atoms/Dropdown/Dropdown.js";export{Toggle}from"./features/IL-OTJ/_components/atoms/Toggle/Toggle.js";export{Textarea}from"./features/IL-OTJ/_components/atoms/Textarea/Textarea.js";export{ConditionList}from"./features/IL-OTJ/_components/molecules/Condition/ConditionList.js";export{SectionWrapper}from"./features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js";export{SeparationRow}from"./features/IL-OTJ/_components/molecules/SeperationRow/SeparationRow.js";export{ConfigSection}from"./features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.js";export{TextSection}from"./features/IL-OTJ/_components/organisms/TextSection/TextSection.js";export{ScopeSection}from"./features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js";export{ConditionSection}from"./features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js";export{TrafficManagerTemplate}from"./features/IL-OTJ/_components/templates/TrafficManager/TrafficManagerTemplate.js";export{Testing}from"./features/IL-OTJ/_components/templates/Testing/Testing.js";export{TemplateList,TemplateMap}from"./features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";export{extractAndParseResponse,extractAndParseWithProperty,extractTextFromChildren,extractVariantIds,parseValidationData,useHeaderObserver}from"./features/IL-OTJ/helpers/utils.js";export{CitationProvider,useCitations}from"./features/IL-OTJ/store/CitationsContext.js";export{getVariantInfo}from"./features/IL-OTJ/ILOTJTest.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../src/App.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../src/App.tsx"],"names":[],"mappings":"AAgBA,iBAAS,GAAG,4CAEX;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeachMeWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.tsx"],"names":[],"mappings":"AA2DA,QAAA,MAAM,cAAc,+CA+BnB,CAAA;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/index.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAKjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAI1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAI7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,cAAc,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/index.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAKjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAI1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAI7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface BaseTemplateState {
|
|
3
|
+
title?: string;
|
|
4
|
+
scopeData?: {
|
|
5
|
+
station?: string;
|
|
6
|
+
tiers?: string[];
|
|
7
|
+
};
|
|
8
|
+
description?: string;
|
|
9
|
+
whenToApplyConditions?: any[];
|
|
10
|
+
whenNotToApplyConditions?: any[];
|
|
11
|
+
configData?: any;
|
|
12
|
+
citations?: any[];
|
|
13
|
+
fieldCitations?: Record<string, any[]>;
|
|
14
|
+
citation?: Record<string, any>;
|
|
15
|
+
}
|
|
16
|
+
export interface BaseTemplateHandlers {
|
|
17
|
+
onTitleChange: (value: string) => void;
|
|
18
|
+
onScopeChange: (field: string, value: any) => void;
|
|
19
|
+
onDescriptionChange: (value: string) => void;
|
|
20
|
+
onAddWhenToApply: () => void;
|
|
21
|
+
onRemoveWhenToApply: (id: number | string) => void;
|
|
22
|
+
onEditWhenToApply: (id: number | string, text: string) => void;
|
|
23
|
+
onAddWhenNotToApply: () => void;
|
|
24
|
+
onRemoveWhenNotToApply: (id: number | string) => void;
|
|
25
|
+
onEditWhenNotToApply: (id: number | string, text: string) => void;
|
|
26
|
+
onConfigChange?: (key: string, value: any) => void;
|
|
27
|
+
}
|
|
28
|
+
export interface BaseTemplateUiState {
|
|
29
|
+
showScope?: boolean;
|
|
30
|
+
showConfiguration?: boolean;
|
|
31
|
+
titleLabel?: string;
|
|
32
|
+
scopeLabel?: string;
|
|
33
|
+
tierLabel?: string;
|
|
34
|
+
descriptionLabel?: string;
|
|
35
|
+
whenToApplyLabel?: string;
|
|
36
|
+
whenNotToApplyLabel?: string;
|
|
37
|
+
stationLabel?: string;
|
|
38
|
+
configLabel?: string;
|
|
39
|
+
stationOptions?: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[];
|
|
43
|
+
tierOptions?: string[];
|
|
44
|
+
separationItems?: any[];
|
|
45
|
+
toggles?: any[];
|
|
46
|
+
isAiStreaming?: boolean;
|
|
47
|
+
isReadOnly?: boolean;
|
|
48
|
+
activeEditId?: string | null;
|
|
49
|
+
setActiveEditId?: (id: string | null) => void;
|
|
50
|
+
pendingEditId?: string | null;
|
|
51
|
+
setPendingEditId?: (id: string | null) => void;
|
|
52
|
+
validationErrors?: Record<string, string>;
|
|
53
|
+
highlights?: Map<string, any>;
|
|
54
|
+
highlightedIds?: string[];
|
|
55
|
+
conflictReason?: string;
|
|
56
|
+
setSendMessageInChat?: (message: string) => void;
|
|
57
|
+
}
|
|
58
|
+
export interface BaseTemplateProps {
|
|
59
|
+
state: BaseTemplateState;
|
|
60
|
+
handlers: BaseTemplateHandlers;
|
|
61
|
+
uiState: BaseTemplateUiState;
|
|
62
|
+
customNodes?: {
|
|
63
|
+
top?: React.ReactNode;
|
|
64
|
+
afterTitle?: React.ReactNode;
|
|
65
|
+
afterScope?: React.ReactNode;
|
|
66
|
+
afterDescription?: React.ReactNode;
|
|
67
|
+
afterWhenToApply?: React.ReactNode;
|
|
68
|
+
afterWhenNotToApply?: React.ReactNode;
|
|
69
|
+
bottom?: React.ReactNode;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export declare const BaseTemplate: React.FC<BaseTemplateProps>;
|
|
73
|
+
//# sourceMappingURL=BaseTemplate.d.ts.map
|
package/dist/types/src/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseTemplate.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.tsx"],"names":[],"mappings":"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"}
|
package/dist/types/src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templatesMap.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"templatesMap.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.ts"],"names":[],"mappings":";AAMA,oBAAY,YAAY;IACtB,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,OAAO,YAAY;IACnB,UAAU,gBAAgB;IAC1B,gBAAgB,sBAAsB;IACtC,cAAc,oBAAoB;CAEnC;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAOrD,CAAC"}
|
|
@@ -3,5 +3,4 @@ export { default as WtaWnta } from "./features/WtaWnta/WtaWnta";
|
|
|
3
3
|
export { default as BookLearning } from "./features/DocumentLearning/DocumentLearning";
|
|
4
4
|
export { default as ILOTJ } from "./features/IL-OTJ/ILOTJ";
|
|
5
5
|
export * from "./features/IL-OTJ/_components/index";
|
|
6
|
-
export { default as LearningManagement } from "./features/LearningManagement/LearningManagement";
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAC1D,cAAc,qCAAqC,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAC1D,cAAc,qCAAqC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ConditionItem {
|
|
3
|
+
id: number | string;
|
|
4
|
+
text: string;
|
|
5
|
+
reasoning?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ConfigDataType {
|
|
8
|
+
order_rules: {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
global_min_separation_seconds: number;
|
|
11
|
+
};
|
|
12
|
+
advertiser_rules: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
global_min_separation_seconds: number;
|
|
15
|
+
};
|
|
16
|
+
inventory_rules: {
|
|
17
|
+
respect_inventory_code: boolean;
|
|
18
|
+
};
|
|
19
|
+
break_code_rules: {
|
|
20
|
+
respect_break_code: boolean;
|
|
21
|
+
};
|
|
22
|
+
is_default_enabled: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface DefaultTeachMeRendererProps {
|
|
25
|
+
}
|
|
26
|
+
declare const DefaultTeachMeRenderer: React.FC<DefaultTeachMeRendererProps>;
|
|
27
|
+
export default DefaultTeachMeRenderer;
|
|
28
|
+
//# sourceMappingURL=DefaultTeachMeRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultTeachMeRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/valueTypes/Default/DefaultTeachMeRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,6BAA6B,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,gBAAgB,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,6BAA6B,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9E,eAAe,EAAE;QAAE,sBAAsB,EAAE,OAAO,CAAA;KAAE,CAAC;IACrD,gBAAgB,EAAE;QAAE,kBAAkB,EAAE,OAAO,CAAA;KAAE,CAAC;IAClD,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAkBD,UAAU,2BAA2B;CAEpC;AAED,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA+JjE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
package/dist/types/src/plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ConditionItem {
|
|
3
|
+
id: number | string;
|
|
4
|
+
text: string;
|
|
5
|
+
reasoning?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ConfigDataType {
|
|
8
|
+
order_rules: {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
global_min_separation_seconds: number;
|
|
11
|
+
};
|
|
12
|
+
advertiser_rules: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
global_min_separation_seconds: number;
|
|
15
|
+
};
|
|
16
|
+
inventory_rules: {
|
|
17
|
+
respect_inventory_code: boolean;
|
|
18
|
+
};
|
|
19
|
+
break_code_rules: {
|
|
20
|
+
respect_break_code: boolean;
|
|
21
|
+
};
|
|
22
|
+
is_default_enabled: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface RadioTrafficLearningRendererProps {
|
|
25
|
+
}
|
|
26
|
+
declare const RadioTrafficLearningRenderer: React.FC<RadioTrafficLearningRendererProps>;
|
|
27
|
+
export default RadioTrafficLearningRenderer;
|
|
28
|
+
//# sourceMappingURL=RadioTrafficLearningRenderer.d.ts.map
|
package/dist/types/src/plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioTrafficLearningRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/valueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,6BAA6B,EAAE,MAAM,CAAA;KAAE,CAAC;IACzE,gBAAgB,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,6BAA6B,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9E,eAAe,EAAE;QAAE,sBAAsB,EAAE,OAAO,CAAA;KAAE,CAAC;IACrD,gBAAgB,EAAE;QAAE,kBAAkB,EAAE,OAAO,CAAA;KAAE,CAAC;IAClD,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAkBD,UAAU,iCAAiC;CAE1C;AAED,QAAA,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAAC,iCAAiC,CAiJ7E,CAAC;AAEF,eAAe,4BAA4B,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.
|
|
3
|
+
"version": "0.1.1-alpha.3",
|
|
4
4
|
"author": "Devesh Patel",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,11 +83,6 @@
|
|
|
83
83
|
"import": "./dist/features/ILOTJ/ILOTJ.js",
|
|
84
84
|
"require": "./dist/cjs/features/ILOTJ/ILOTJ.js",
|
|
85
85
|
"types": "./dist/types/src/features/ILOTJ/ILOTJ.d.ts"
|
|
86
|
-
},
|
|
87
|
-
"./LearningManagement": {
|
|
88
|
-
"import": "./dist/features/LearningManagement/LearningManagement.js",
|
|
89
|
-
"require": "./dist/cjs/features/LearningManagement/LearningManagement.js",
|
|
90
|
-
"types": "./dist/types/src/features/LearningManagement/LearningManagement.d.ts"
|
|
91
86
|
}
|
|
92
87
|
},
|
|
93
88
|
"devDependencies": {
|
|
@@ -118,7 +113,6 @@
|
|
|
118
113
|
"lucide-react": "^0.525.0",
|
|
119
114
|
"moment": "2.29.4",
|
|
120
115
|
"moment-timezone": "0.5.34",
|
|
121
|
-
"patch-package": "^8.0.1",
|
|
122
116
|
"prettier": "^3.7.4",
|
|
123
117
|
"react-markdown": "^8.0.7",
|
|
124
118
|
"react-router-dom": "5.2.0",
|
|
@@ -138,30 +132,22 @@
|
|
|
138
132
|
"typescript": "4.9.5",
|
|
139
133
|
"uuid": "^11.1.0"
|
|
140
134
|
},
|
|
141
|
-
"peerDependencies": {
|
|
142
|
-
"dependencies": {
|
|
135
|
+
"peerDependencies": {
|
|
143
136
|
"react": ">=16.8.0 <19.0.0",
|
|
144
|
-
"react-dom": ">=16.8.0 <19.0.0"
|
|
137
|
+
"react-dom": ">=16.8.0 <19.0.0"
|
|
138
|
+
},
|
|
139
|
+
"dependencies": {
|
|
145
140
|
"@craco/craco": "^7.1.0",
|
|
146
141
|
"@e-llm-studio/citation": "^0.0.165",
|
|
147
142
|
"@e-llm-studio/watch-me-work": "^0.0.25",
|
|
148
|
-
"@
|
|
149
|
-
"@react-pdf-viewer/core": "^3.12.0",
|
|
150
|
-
"@react-pdf-viewer/page-navigation": "^3.12.0",
|
|
151
|
-
"@react-pdf-viewer/search": "^3.12.0",
|
|
152
|
-
"@react-pdf-viewer/zoom": "^3.12.0",
|
|
153
|
-
"@viswa-test/test-citation": "^0.0.55",
|
|
154
|
-
"date-fns": "^4.1.0",
|
|
155
|
-
"framer-motion": "^12.38.0",
|
|
143
|
+
"@viswa-test/test-citation": "^0.0.57",
|
|
156
144
|
"pdf-collaborative-tool": "^0.7.0",
|
|
157
|
-
"pdfjs-dist": "^3.11.174",
|
|
158
145
|
"primeicons": "^7.0.0",
|
|
159
146
|
"primereact": "^10.9.7",
|
|
160
147
|
"react-hot-toast": "^2.6.0",
|
|
161
148
|
"react-konva": "^17.0.2-6",
|
|
162
149
|
"react-player": "^3.4.0",
|
|
163
|
-
"wavesurfer.js": "^7.12.5"
|
|
164
|
-
"zustand": "^5.0.13"
|
|
150
|
+
"wavesurfer.js": "^7.12.5"
|
|
165
151
|
},
|
|
166
152
|
"overrides": {
|
|
167
153
|
"react-is": "^18.3.1",
|