@e-llm-studio/instant-learning 0.0.146 → 0.0.147
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/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/features/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts +3 -1
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i}from"../../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as e,jsx as
|
|
1
|
+
import{__assign as i}from"../../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as e,jsx as t}from"react/jsx-runtime";import o,{useState as n}from"react";import{InputDataReasoningCard as r}from"../../InputDataReasoningCard.js";import{ConditionSection as l}from"../../organisms/ConditionSection/ConditionSection.js";import{ConfigSection as a}from"../../organisms/ConfigSection/ConfigSection.js";import{ScopeSection as d}from"../../organisms/ScopeSection/ScopeSection.js";import{TextSection as c}from"../../organisms/TextSection/TextSection.js";import s from"../../AccordianSection.js";var u=function(n){var r=n.children,l=n.onAddVariant,a=o.Children.toArray(r);return e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[a.map(function(i,n){return e(o.Fragment,{children:[i,t("div",{style:{width:"2px",height:"20px",backgroundColor:"#E2E8F0",marginLeft:"30px"}})]},n)}),t("div",i({onClick:l,style:{padding:"8px 16px",border:"1px solid #E2E8F0",borderRadius:"8px",color:"#475569",fontSize:"14px",fontWeight:"500",cursor:"pointer",backgroundColor:"#FFFFFF",userSelect:"none"}},{children:"Add Variant"}))]}))},p=function(o){var p,h,v,g,f,y,m,D,T,C,x=o.state,b=o.handlers,A=o.uiState,O=(null==A?void 0:A.highlights)||new Map,R=O.get("global_0")||{},S=n({}),w=S[0],V=S[1],W=function(e){V(function(t){var o;return i(i({},t),((o={})[e]=!t[e],o))})},E=function(i){var e,t=null===(e=x.fieldCitations)||void 0===e?void 0:e[i];return Array.isArray(t)&&t.length>0?t:x.citations},N={marginTop:"-17px",position:"relative",zIndex:1},F=function(i){i&&i.scrollIntoView({behavior:"smooth",block:"center"})};return console.log("CreateRule state:",x),console.log("CreateRule uiState:",A),e("div",i({className:"traffic-manager-template"},{children:[t(s,i({title:{type:"other",label:"Rule Setup"},footerData:{ruleTitle:x.ruleTitle,stations:[x.scopeData.station],tiers:null===(p=x.scopeData)||void 0===p?void 0:p.tiers},defaultOpen:"Create"===(null==A?void 0:A.usedFor),readOnly:"Create"!==(null==A?void 0:A.usedFor)},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"20px"}},{children:[t(c,i({id:"rule-title",title:"Rule Title",rows:1,placeholder:"Enter a short, descriptive title for the rule",required:!0,value:x.ruleTitle,onChange:b.setRuleTitle,readOnly:"Create"!==(null==A?void 0:A.usedFor),isOpen:w.ruleTitle,onToggle:function(){return W("ruleTitle")},isHighlighted:R.ruleTitle||!1,showCognitiveIcon:x.citation.ruleTitle,tooltipDescription:"Why this Title?",errorMessage:null===(h=A.validationErrors)||void 0===h?void 0:h.ruleTitle},A)),x.citation.ruleTitle&&t("div",i({style:N},{children:t(r,{isVisible:w.ruleTitle,citation:x.citation.ruleTitle,citations:E("ruleTitle"),fieldName:"Rule Title",fieldValue:x.ruleTitle})})),t(d,i({id:"scope",required:!0,scopeData:x.scopeData,onScopeChange:b.onScopeChange,tierLabel:"Which tiers should this rule apply to?",stationLabel:"Which rule set should this rule belong to?",highlights:R,isOpen:w.scopeData,onToggle:function(){return W("scopeData")},showCognitiveIcon:x.citation.scopeData,tooltipDescription:"Why this Scope?",errorMessage:(null===(v=A.validationErrors)||void 0===v?void 0:v.station)||(null===(g=A.validationErrors)||void 0===g?void 0:g.tiers),stationErrorMessage:null===(f=A.validationErrors)||void 0===f?void 0:f.station,tierErrorMessage:null===(y=A.validationErrors)||void 0===y?void 0:y.tiers,readOnly:"Create"!==(null==A?void 0:A.usedFor)},A)),x.citation.scopeData&&t("div",i({style:N},{children:t(r,{isVisible:w.scopeData,citation:x.citation.scopeData,citations:E("scopeData"),fieldName:"Scope",fieldValue:null===(D=null===(m=x.scopeData)||void 0===m?void 0:m.tiers)||void 0===D?void 0:D.join(", ")})}))]}))})),null===(C=null===(T=null==A?void 0:A.tierOptions)||void 0===T?void 0:T.filter(function(i){var e,t;return null===(t=null===(e=x.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===C?void 0:C.map(function(o,n,d){var p,h=o.toLowerCase().replace(/ /g,"_"),v=(null===(p=x.variantsByTier)||void 0===p?void 0:p[h])||[],g=v.length,f="".concat(g," ").concat(1===g?"variant":"variants"," configured for this tier"),y=!((null==A?void 0:A.defaultTierOpen)>=0)||n===A.defaultTierOpen;return console.log("Rendering tier : ",o),t(s,i({variant:"tier-header",title:{type:"other",label:o},subtitle:f,defaultOpen:y,footerData:{description:"Variants for ".concat(o)}},{children:t(u,i({onAddVariant:function(){var i;return null===(i=b.addNewVariant)||void 0===i?void 0:i.call(b,h)}},{children:v.map(function(o,n){var d,u,p,g,f,y,m,D,T,C=o.variantType||"default",x="".concat(h,"-variant-").concat(n),R=!0===o.is_variant,S=(null==A?void 0:A.defaultVariantOpen)>=0?n===A.defaultVariantOpen:R,V="".concat(h,"_").concat(n),I=O.get(V)||{},_=(null===(u=null===(d=A.separationItemsByTier)||void 0===d?void 0:d[h])||void 0===u?void 0:u.get(n))||[],j=(null===(g=null===(p=A.togglesByTier)||void 0===p?void 0:p[h])||void 0===g?void 0:g.get(n))||[];return console.log("Rendering ".concat(h," variant ").concat(n,":"),o),console.log("Rendering Variant : ",o),t("div",i({ref:R?F:null,style:{width:"100%"}},{children:t(s,i({title:{type:C,label:o.isReadOnly&&v.length>1?"Variant ".concat(n+1):"Rule Behavior",isNewVariant:R},defaultOpen:S,variant:"rule-behavior",footerData:{ruleTitle:C,description:o.ruleDescription||""}},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"20px"}},{children:[t(c,i({id:"rule-description-".concat(h,"-").concat(n),title:"Rule Description",rows:2,placeholder:"Explain the rule behaviour",required:!0,readOnly:o.isReadOnly,value:o.ruleDescription||"",onChange:function(i){return b.setRuleDescription(h,n,i)},isOpen:w["ruleDescription-".concat(h,"-").concat(n)],onToggle:function(){return W("ruleDescription-".concat(h,"-").concat(n))},isHighlighted:I.ruleDescription||!1,showCognitiveIcon:null===(f=o.reasoning)||void 0===f?void 0:f.ruleDescription,tooltipDescription:"Why this Description?",errorMessage:null===(y=A.validationErrors)||void 0===y?void 0:y["ruleDescription-".concat(h,"-").concat(n)]},A)),(null===(m=o.reasoning)||void 0===m?void 0:m.ruleDescription)&&t("div",i({style:N},{children:t(r,{isVisible:w["ruleDescription-".concat(h,"-").concat(n)],citation:o.reasoning.ruleDescription,citations:E("ruleDescription_".concat(h,"_").concat(n)),fieldName:"Rule Description",fieldValue:o.ruleDescription})})),t(l,i({id:"when-to-apply-".concat(h,"-").concat(n),title:"When to apply",required:!0,dividerRequired:!0,readOnly:o.isReadOnly,conditions:o.whenToApplyConditions||[],onAdd:function(){return b.addWhenToApply(h,n)},onRemove:function(i,e,t){return b.removeWhenToApply(i,e,t)},onEdit:function(i,e,t,o){return b.editWhenToApply(i,e,t,o)},index:n,tierKey:h,isHighlighted:I.wta||!1,highlightedIds:null==A?void 0:A.highlightedIds,tooltipDescription:"Why this Condition?",citations:E("whenToApply_".concat(h,"_").concat(n)),bordered:!0,addLabel:"Add When to apply",isAiStreaming:A.isAiStreaming,errorMessage:null===(D=A.validationErrors)||void 0===D?void 0:D["whenToApply-".concat(h,"-").concat(n)]},A)),t(l,i({id:"when-not-to-apply-".concat(h,"-").concat(n),title:"When NOT to apply",required:!1,dividerRequired:!0,readOnly:o.isReadOnly,conditions:o.whenNotToApplyConditions||[],onAdd:function(){return b.addWhenNotToApply(h,n)},onRemove:function(i,e,t){return b.removeWhenNotToApply(i,e,t)},onEdit:function(i,e,t,o){return b.editWhenNotToApply(i,e,t,o)},index:n,tierKey:h,isHighlighted:I.wnta||!1,highlightedIds:null==A?void 0:A.highlightedIds,tooltipDescription:"Why this Condition?",citations:E("whenNotToApply_".concat(h,"_").concat(n)),bordered:!0,addLabel:"Add When NOT to apply",isAiStreaming:A.isAiStreaming},A)),t(a,i({id:"config-".concat(h,"-").concat(n),title:"Configuration",required:!1,highlights:I,bordered:!0,readOnly:o.isReadOnly,onConfigChange:function(i,e){return b.onConfigChange(h,n,i,e)},separationItems:_,toggles:j,index:n},A)),(null===(T=o.reasoning)||void 0===T?void 0:T.configData)&&t("div",i({style:N},{children:t(r,{citation:o.reasoning.configData,citations:E("configData_".concat(h,"_").concat(n)),fieldName:"Configuration",fieldValue:"Proposed Configuration"})}))]}))}),x)}),"".concat(h,"-variant-").concat(n))})}))}),"tier-".concat(n))})]}))};export{p as CreateRule};
|
|
2
2
|
//# sourceMappingURL=CreateRule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILOTJTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/IL-OTJ/ILOTJTest.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAKhE,OAAO,EAA8C,oBAAoB,EAAuB,MAAM,iBAAiB,CAAC;AAOxH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAEzE,UAAU,UAAU;CACnB;AAKD,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AACD,eAAO,MAAM,cAAc,YAAmB,qBAAqB,iBASlE,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"ILOTJTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/IL-OTJ/ILOTJTest.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAKhE,OAAO,EAA8C,oBAAoB,EAAuB,MAAM,iBAAiB,CAAC;AAOxH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAEzE,UAAU,UAAU;CACnB;AAKD,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AACD,eAAO,MAAM,cAAc,YAAmB,qBAAqB,iBASlE,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAi5DnC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -18,12 +18,14 @@ interface FooterData {
|
|
|
18
18
|
tiers?: string[];
|
|
19
19
|
description?: string;
|
|
20
20
|
}
|
|
21
|
-
declare const AccordionSection: ({ title, children, defaultOpen, footerData, readOnly, }: {
|
|
21
|
+
declare const AccordionSection: ({ title, subtitle, children, defaultOpen, footerData, readOnly, variant, }: {
|
|
22
22
|
title: TitleProps;
|
|
23
|
+
subtitle?: string | undefined;
|
|
23
24
|
children: React.ReactNode;
|
|
24
25
|
defaultOpen?: boolean | undefined;
|
|
25
26
|
footerData?: FooterData | undefined;
|
|
26
27
|
readOnly?: boolean | undefined;
|
|
28
|
+
variant?: "default" | "tier-header" | "rule-behavior" | undefined;
|
|
27
29
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
28
30
|
export default AccordionSection;
|
|
29
31
|
//# sourceMappingURL=AccordianSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordianSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/AccordianSection.tsx"],"names":[],"mappings":"AAGA,KAAK,UAAU,GACT;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAG,GAC3D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAG,CAAC;AAEhE,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB;
|
|
1
|
+
{"version":3,"file":"AccordianSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/AccordianSection.tsx"],"names":[],"mappings":"AAGA,KAAK,UAAU,GACT;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAG,GAC3D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAG,CAAC;AAEhE,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB;WASX,UAAU;;cAEP,MAAM,SAAS;;;;;6CAuL5B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.tsx"],"names":[],"mappings":"AA+CA,eAAO,MAAM,UAAU,iCAAkC,GAAG,
|
|
1
|
+
{"version":3,"file":"CreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.tsx"],"names":[],"mappings":"AA+CA,eAAO,MAAM,UAAU,iCAAkC,GAAG,4CAmS3D,CAAC"}
|