@e-llm-studio/instant-learning 1.3.0-alpha.200 → 1.3.0-alpha.202
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/ILMarketplaceWrapper.js +1 -1
- package/dist/cjs/ILMarketplaceWrapper.js +1 -1
- package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/hooks/useVariantEditSession.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/hooks/useVariantEditSession.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryTab.js +1 -1
- package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagementTest.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/cjs/schema-driven/BPARenderer.js +1 -1
- package/dist/cjs/schema-driven/components/ConditionSectionField.js +1 -1
- package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js +1 -1
- package/dist/cjs/schema-driven/components/GroupEditRow.js +1 -1
- package/dist/cjs/schema-driven/components/PromptTextEditorField.js +1 -1
- package/dist/cjs/schema-driven/components/VariantListField.js +1 -1
- package/dist/cjs/schema-driven/hooks/useParentEditEnabled.js +2 -0
- package/dist/cjs/schema-driven/hooks/useParentEditEnabled.js.map +1 -0
- package/dist/cjs/schema-driven/hooks/useSectionEditSession.js +2 -0
- package/dist/cjs/schema-driven/hooks/useSectionEditSession.js.map +1 -0
- package/dist/cjs/schema-driven/primitives/Accordion.js +1 -1
- package/dist/cjs/schema-driven/utils/conditionText.js +2 -0
- package/dist/cjs/schema-driven/utils/conditionText.js.map +1 -0
- package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
- package/dist/features/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/features/IL-OTJ/_components/hooks/useVariantEditSession.js +2 -0
- package/dist/features/IL-OTJ/_components/hooks/useVariantEditSession.js.map +1 -0
- package/dist/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/features/IL-marketplace/components/GuidelineLibraryTab.js +1 -1
- package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js +1 -1
- package/dist/features/LearningManagement/LearningManagementTest.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/schema-driven/BPARenderer.js +1 -1
- package/dist/schema-driven/components/ConditionSectionField.js +1 -1
- package/dist/schema-driven/components/GlobalSetupAccordionField.js +1 -1
- package/dist/schema-driven/components/GroupEditRow.js +1 -1
- package/dist/schema-driven/components/PromptTextEditorField.js +1 -1
- package/dist/schema-driven/components/VariantListField.js +1 -1
- package/dist/schema-driven/hooks/useParentEditEnabled.js +2 -0
- package/dist/schema-driven/hooks/useParentEditEnabled.js.map +1 -0
- package/dist/schema-driven/hooks/useSectionEditSession.js +2 -0
- package/dist/schema-driven/hooks/useSectionEditSession.js.map +1 -0
- package/dist/schema-driven/primitives/Accordion.js +1 -1
- package/dist/schema-driven/utils/conditionText.js +2 -0
- package/dist/schema-driven/utils/conditionText.js.map +1 -0
- package/dist/types/src/ILMarketplaceMockTest.d.ts.map +1 -1
- package/dist/types/src/ILMarketplaceWrapper.d.ts +1 -8
- package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts +11 -0
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts +8 -1
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/hooks/useVariantEditSession.d.ts +47 -0
- package/dist/types/src/features/IL-OTJ/_components/hooks/useVariantEditSession.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryTab.d.ts +2 -1
- package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryTab.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/types/add-context.types.d.ts +1 -0
- package/dist/types/src/features/IL-marketplace/types/add-context.types.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts +7 -0
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -1
- package/dist/types/src/schema-driven/BPARenderer.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/ConditionSectionField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/GlobalSetupAccordionField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/GroupEditRow.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/PromptTextEditorField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/VariantListField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/demoSchema.d.ts.map +1 -1
- package/dist/types/src/schema-driven/hooks/useParentEditEnabled.d.ts +18 -0
- package/dist/types/src/schema-driven/hooks/useParentEditEnabled.d.ts.map +1 -0
- package/dist/types/src/schema-driven/hooks/useSectionEditSession.d.ts +29 -0
- package/dist/types/src/schema-driven/hooks/useSectionEditSession.d.ts.map +1 -0
- package/dist/types/src/schema-driven/primitives/Accordion.d.ts +11 -0
- package/dist/types/src/schema-driven/primitives/Accordion.d.ts.map +1 -1
- package/dist/types/src/schema-driven/types.d.ts +13 -0
- package/dist/types/src/schema-driven/types.d.ts.map +1 -1
- package/dist/types/src/schema-driven/utils/conditionText.d.ts +8 -0
- package/dist/types/src/schema-driven/utils/conditionText.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as t,jsx as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{useMemo as n}from"react";import a from"../../../features/LearningManagement/components/InstantLearningModal.js";import o from"../../../features/LearningManagement/components/InstantLearningModalDynamic.js";import{useTeachMeConfigStore as r,dtt as l,dttWelcomeMessageParts as s,dt as p,dttValue as c,resolveEnableChatLogs as d}from"../../../features/LearningManagement/store/useLMSConfigStore.js";import u from"react-markdown";import{renderToStaticMarkup as m}from"react-dom/server";import{resolveRegistryComponent as g}from"../../../ComponentRegistry.js";import{useLearningTemplateStore as f}from"../../../features/LearningManagement/store/useLearningTemplateStore.js";var h=function(h){var T,L,b=h.pluginPayload||{},v=b.editingRule,I=b.editingTier,M=b.editingVariants,y=b.focusedVariantIndex,A=b.setFocusedVariantIndex,w=b.triggerAddVariant,S=b.triggerFixGaps,C=b.triggerValidateMessage,D=b.copiedRule,P=b.copiedSourceTier,_=b.copiedTargetTier,x=b.initialDraftMessage,V=b.modeId,N=b.mode,R=b.is_publishing,E=h.app_integration_id,F="instruction_prompt",W=r(function(e){return e.teachMeConfig});console.log("teachMeConfig:",W);var B=l("learningMetadataComponents.properties.instruction_prompt.bpa_ui_component",""),O=f(function(e){var t;return null!==(t=e.learningMetadata[F])&&void 0!==t?t:""}),j=f(function(e){return e.setLearningMetadataField}),k=n(function(){return g(B)},[B]),G=s(),J=G.greeting,z=G.subtitle,H=G.actions,q=m(t("p",{children:[i("span",{children:J}),i(u,{children:z}),i("span",e({className:"clickable-button-group"},{children:H.map(function(t){var n=t.label,a=t.value;return i("button",e({className:"clickable-button","data-value":a},{children:n}),n)})}))]})),K=(null===(T=h.pluginPayload)||void 0===T?void 0:T.dynamicOptions)||{},Q=(null===(L=h.pluginPayload)||void 0===L?void 0:L.prefilledData)||{},U={showScope:!1,showConfiguration:!1,welcomeMessage:l("welcomeMessage","Hi! 👋 I'm your Instant Learning Concierge."),formTitle:l("formTitle","Rule setup"),setupLabel:l("setupLabel","Configure your IL"),ruleTitle:l("ruleTitle","Main Rule Name"),ruleTitleInformation:l("ruleTitleInformation","Give a concise title which isn't too specific"),scopeLabel:l("scopeLabel","Define Scope"),tierLabel:l("tierLabel","Select Tiers"),variantPillLabel:l("variantPillLabel","Variant"),ruleDescriptionTitle:l("ruleDescriptionTitle","Learning Explanation"),ruleDescriptionInformation:l("ruleDescriptionInformation","A short summary of the intent of the learning"),promptDescriptionInformation:l("promptDescriptionInformation","Provides the detailed instructions the AI should follow"),wtaInformation:l("wtaInformation","Specifies the use case when the learning should be used"),wntaInformation:l("wntaInformation","Specifies the use case when the learning should not be used"),whenToApplyTitle:l("whenToApplyTitle","Trigger Events (When to Apply)"),addWhenToApplyBtnLabel:l("addWhenToApplyBtnLabel","Add WTA"),whenNotToApplyTitle:l("whenNotToApplyTitle","Exclusion Events (When NOT to Apply)"),addWhenNotToApplyBtnLabel:l("addWhenNotToApplyBtnLabel","Add WNTA"),configTitle:l("configTitle","Advanced Settings"),saveBtnConfig:{label:l("saveBtnLabel","Save Rule"),loadingLabel:l("saveBtnLoadingLabel","Saving Rule...")},chatTitle:l("chatTitle","Teach Me OTJ - {scope} - Add Learning"),chatTitleEdit:l("chatTitleEdit","Teach Me OTJ - {scope} - Edit Learning"),chatTextareaPlaceholder:l("chatTextareaPlaceholder","Tell me more about this learning.."),LearningTerm:p("agents.LearningTerm","Learnings"),LazyPromptEditor:k,instructionPrompt:O,setInstructionPrompt:function(e){return j(F,e)},instructionPromptTitle:l("learningMetadataComponents.properties.instruction_prompt.title","Instruction Prompt"),instructionPromptDescription:l("learningMetadataComponents.properties.instruction_prompt.description",l("promptDescriptionInformation","Provides the detailed instructions the AI should follow")),instructionPromptViewToggle:c("learningMetadataComponents.properties.instruction_prompt.bpa_ui_view_toggle",!1)},X={dynamicOptions:K,prefilledData:Q},Y=h.useDynamicForm||!0===(null==W?void 0:W.useDynamicForm)?o:a,Z=d(h.enableChatLogs);return i(Y,{isOpen:h.isOpen,onClose:h.onClose,initialScope:h.initialScope,ruleSet:h.ruleSet,editingRule:v,editingTier:I,editingVariants:M,focusedVariantIndex:y,setFocusedVariantIndex:A,triggerAddVariant:w,triggerFixGaps:S,triggerValidateMessage:C,copiedRule:D,copiedSourceTier:P,copiedTargetTier:_,initialDraftMessage:x,initialChatMessage:q,applicationIntegrationId:null!=E?E:"",modeId:V,mode:N,is_publishing:R,uiStateLabels:U,dynamicFormConfig:X,enableChatLogs:Z,customSections:null})};export{h as default};
|
|
2
2
|
//# sourceMappingURL=DefaultTeachMeRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useMemo as n,Suspense as r}from"react";import{resolveRegistryComponentOrFallback as o,isContainerComponent as d}from"../ComponentRegistry.js";import{useDynamicFormStore as a}from"./store/useDynamicFormStore.js";import{DynamicFormContext as l}from"./hooks/useParentEditEnabled.js";var u=function(n){var l,u=n.node,v=n.id,s=n.tierKey,p=n.variantIndex,c=n.uiState,g=n.state,m=n.handlers,f=n.contextOverrides,h=n.renderChildren,y=a(),b=y.getGlobalField,I=y.getVariantField,x=y.setGlobalField,E=y.setVariantField,_=y.getGlobalReasoning,O=y.getVariantReasoning;if(u.hidden)return null;var S=u.data_key||v,C=S.startsWith("global.")||void 0===p,j=S.replace("global.",""),V=null==f?void 0:f[j],A=void 0!==(null==V?void 0:V.value)?V.value:C?b(j):s&&void 0!==p?I(s,p,j):void 0;null==A&&(A="array"===u.type?[]:"boolean"!==u.type&&("object"===u.type?{}:""));var F=C?_(j):s&&void 0!==p?O(s,p,j):void 0,K=function(e){var i,t,n=void 0!==(null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.value)?e.target.value:e;(null===(t=null==f?void 0:f[j])||void 0===t?void 0:t.onChange)?f[j].onChange(n):C?x(j,n):s&&void 0!==p&&E(s,p,j,n)},P="array"===u.type?{onAdd:function(){return K(i(i([],A||[],!0),[{id:Date.now(),text:""}],!1))},onRemove:function(e,i,t){return K((A||[]).filter(function(e){return e.id!==t}))},onEdit:function(i,t,n,r){return K((A||[]).map(function(i){return i.id===n?e(e({},i),{text:r}):i}))}}:{},R=null==c?void 0:c.isAiStreaming,k=void 0!==(null==V?void 0:V.readOnly)?V.readOnly:u.read_only||R,w=null===(l=null==c?void 0:c.validationErrors)||void 0===l?void 0:l[j],D=o(u.bpa_ui_component);return t(r,e({fallback:t("div",e({style:{padding:12,fontSize:13,color:"#9ca3af"}},{children:"Loading..."}))},{children:t(D,e({id:v,schema:u,title:u.title,description:u.description,subtitle:u.subtitle,fieldName:u.title,placeholder:u.placeholder,required:u.is_required,tooltipDescription:u.tooltip||"No tooltip provided.",value:A,onChange:K,citation:F,readOnly:k,enableInlineEdit:!u.read_only,enableViewToggle:u.bpa_ui_view_toggle,errorMessage:w,isAiStreaming:R,uiState:c,state:g,handlers:m,tierKey:s,variantIndex:p,activeEditId:null==c?void 0:c.activeEditId,setActiveEditId:null==c?void 0:c.setActiveEditId,pendingEditId:null==c?void 0:c.pendingEditId,setPendingEditId:null==c?void 0:c.setPendingEditId,setSendMessageInChat:null==c?void 0:c.setSendMessageInChat,renderChildren:h,parentValueOverride:null==V?void 0:V.parentValueOverride,contextOverrides:f},P,{conditions:"array"===u.type?A:void 0},V,{children:d(u.bpa_ui_component)&&h?h():null}))}))},v=function(i){var r=i.properties,o=i.tierKey,d=i.variantIndex,a=i.uiState,s=i.state,p=i.handlers,c=i.contextOverrides,g=n(function(){return r?Object.entries(r).sort(function(e,i){var t,n,r=e[1],o=i[1];return(null!==(t=r.ui_position)&&void 0!==t?t:0)-(null!==(n=o.ui_position)&&void 0!==n?n:0)}):[]},[r]);return t(l.Provider,e({value:!0},{children:g.map(function(e){var i=e[0],n=e[1];return t(u,{id:i,node:n,tierKey:o,variantIndex:d,uiState:a,state:s,handlers:p,contextOverrides:c,renderChildren:function(e,i,r){return n.properties?t(v,{properties:n.properties,tierKey:void 0!==r?r:o,variantIndex:void 0!==e?e:d,uiState:a,state:s,handlers:p,contextOverrides:i||c}):null}},i)})}))};export{v as BPARenderer};
|
|
2
2
|
//# sourceMappingURL=BPARenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as
|
|
1
|
+
import{__spreadArray as o,__assign as n}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useMemo as i,useState as e,useRef as d,useEffect as r}from"react";import{ConditionSection as a}from"../../features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js";import{splitConditions as c}from"../utils/conditionText.js";function u(u){var l,s,v,f,m,p,y="whenToApply"===(null===(l=u.schema)||void 0===l?void 0:l.data_key),h=(null===(s=u.schema)||void 0===s?void 0:s.data_key)||"condition",A="string"==typeof u.value?u.value:"",T=i(function(){return c(A,h)},[A,h]),b=e([]),x=b[0],L=b[1],S=d(A);r(function(){S.current!==A&&(L([]),S.current=A)},[A]);var W=o(o([],T,!0),x,!0),_=!!u.hideEditControls&&Array.isArray(u.conditions);return t(a,n({},u,{citations:null===(v=u.state)||void 0===v?void 0:v.citations,conditions:_?u.conditions:W,onAdd:_?u.onAdd:function(){return L(function(n){return o(o([],n,!0),[{id:"new-".concat(Date.now(),"-").concat(n.length),text:""}],!1)})},onRemove:_?u.onRemove:function(o,n,t){return L(function(o){return o.filter(function(o){return o.id!==t})})},onEdit:_?u.onEdit:void 0,bordered:!0,idPrefix:"condition-".concat(null===(f=u.schema)||void 0===f?void 0:f.data_key),addLabel:y?(null===(m=u.uiState)||void 0===m?void 0:m.addWhenToApplyBtnLabel)||"Add When to apply":(null===(p=u.uiState)||void 0===p?void 0:p.addWhenNotToApplyBtnLabel)||"Add When NOT to apply"}))}export{u as default};
|
|
2
2
|
//# sourceMappingURL=ConditionSectionField.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i}from"tslib";import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{__assign as i}from"tslib";import{jsx as t,jsxs as e,Fragment as l}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as d}from"react";import{Loader2Icon as a,Pencil as r,Check as u,AlertTriangle as s}from"lucide-react";import c from"../../features/IL-OTJ/_components/AccordianSection.js";import{EditPencilIcon as v}from"../../features/IL-OTJ/_components/_svg/EditPencilIcon.js";import{useLearningTemplateStore as p}from"../../features/LearningManagement/store/useLearningTemplateStore.js";function f(f){var g,S,m,h,x,y,C,b,I,D,E,T,A,k,z,w,F,O,P,j,_,N,R,J,L,W,M,B=p(function(i){return i.backwardCompatibility}),K=o(null),U=K[0],V=K[1],q=o(null),G=q[0],H=q[1],Q=o(!1),X=Q[0],Y=Q[1],Z=n(null===(g=f.uiState)||void 0===g?void 0:g.isAiStreaming),$="rule-setup"===(null===(S=f.uiState)||void 0===S?void 0:S.activeEditId);d(function(){var i,t;Z.current&&!(null===(i=f.uiState)||void 0===i?void 0:i.isAiStreaming)&&X&&Y(!1),Z.current=null===(t=f.uiState)||void 0===t?void 0:t.isAiStreaming},[null===(m=f.uiState)||void 0===m?void 0:m.isAiStreaming,X]);var ii=function(){var i,t;V(null),H(null),null===(t=null===(i=f.uiState)||void 0===i?void 0:i.setActiveEditId)||void 0===t||t.call(i,null)},ti=function(){var i,t,e,l,o,n,d,a=null!=U?U:null===(i=f.state)||void 0===i?void 0:i.ruleTitle,r=null!=G?G:null===(t=f.state)||void 0===t?void 0:t.scopeData,u=a!==(null===(e=f.state)||void 0===e?void 0:e.ruleTitle),s=JSON.stringify(r)!==JSON.stringify(null===(l=f.state)||void 0===l?void 0:l.scopeData);if(u||s){if(null===(o=f.uiState)||void 0===o?void 0:o.setSendMessageInChat){var c="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),v=[];if(u&&v.push((null==a?void 0:a.trim())?"Title with ".concat(a):"No Title"),s){var p=null==r?void 0:r.tiers;v.push(p&&p.length>0?"tiers: ".concat(p.join(", ")):"No Tier Selected")}f.uiState.setSendMessageInChat("__SKELETON__:".concat(c,":Update Rule Setup ").concat(v.join(" and ")))}Y(!0),V(null),H(null),null===(d=null===(n=f.uiState)||void 0===n?void 0:n.setActiveEditId)||void 0===d||d.call(n,null)}else ii()},ei=null!==U?null==U?void 0:U.trim():((null===(h=f.state)||void 0===h?void 0:h.ruleTitle)||"").trim(),li=null!=G?G:null===(x=f.state)||void 0===x?void 0:x.scopeData,oi=ei!==((null===(y=f.state)||void 0===y?void 0:y.ruleTitle)||"").trim(),ni=JSON.stringify(li)!==JSON.stringify(null===(C=f.state)||void 0===C?void 0:C.scopeData),di=!oi&&!ni||""===ei,ai=!((null===(b=f.state)||void 0===b?void 0:b.ruleTitle)||"").trim()&&!(null===(D=null===(I=f.state)||void 0===I?void 0:I.scopeData)||void 0===D?void 0:D.station)&&!((null===(T=null===(E=f.state)||void 0===E?void 0:E.scopeData)||void 0===T?void 0:T.tiers)||[]).length,ri={display:"flex",alignItems:"center",gap:"7px",padding:"7px 10.5px",borderRadius:"6px",border:"1px solid #D9D6FE",color:"#5925DC",fontSize:"14px",fontWeight:500},ui=function(){return e("div",i({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[t("button",i({onClick:function(i){i.stopPropagation(),ti()},disabled:di||X,style:i(i({},ri),{backgroundColor:X?"#F5F3FF":"#ffffff",cursor:di||X?"not-allowed":"pointer",opacity:di?.5:1})},{children:X?"Validating...":"Save"})),!X&&t("button",i({onClick:function(i){i.stopPropagation(),ii()},style:i(i({},ri),{backgroundColor:"#ffffff",cursor:"pointer"})},{children:"Cancel"}))]}))},si=$?{ruleTitle:{value:null!==U?U:null===(A=f.state)||void 0===A?void 0:A.ruleTitle,onChange:V},scopeData:{value:null!==G?G:null===(k=f.state)||void 0===k?void 0:k.scopeData,onChange:H}}:{};return t("div",i({"data-edit-id":"rule-setup"},{children:t(c,i({},f,{title:{type:"other",label:(null===(z=f.schema)||void 0===z?void 0:z.title)||"Rule Setup"},actionButtons:function(o,n){var d;if($)return B?null:ui();var a=!!(null===(d=f.uiState)||void 0===d?void 0:d.activeEditId)&&"rule-setup"!==f.uiState.activeEditId;return t("div",i({style:{position:"relative",display:"flex",flexDirection:"column"}},{children:t("button",i({title:a?"Save active edits first":ai?"Add":"Edit",onClick:function(t){var e,l;t.stopPropagation(),a?(null===(e=f.uiState)||void 0===e?void 0:e.setPendingEditId)&&f.uiState.setPendingEditId(f.uiState.activeEditId||null):(!function(){var t,e,l,o,n,d;(null===(t=f.uiState)||void 0===t?void 0:t.activeEditId)&&"rule-setup"!==f.uiState.activeEditId||(null===(l=null===(e=f.uiState)||void 0===e?void 0:e.setActiveEditId)||void 0===l||l.call(e,"rule-setup"),V(null!==(n=null===(o=f.state)||void 0===o?void 0:o.ruleTitle)&&void 0!==n?n:""),H((null===(d=f.state)||void 0===d?void 0:d.scopeData)?i({},f.state.scopeData):{}))}(),(null===(l=f.uiState)||void 0===l?void 0:l.setPendingEditId)&&f.uiState.setPendingEditId(null),o||n())},disabled:X,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"6px 8px",border:"1px solid #e5e7eb",borderRadius:"8px",cursor:X?"not-allowed":"pointer",backgroundColor:"#ffffff",color:"#6b7280",opacity:X?.5:1}},{children:B?t(r,{size:14}):e(l,{children:[t(v,{size:12})," ",ai?"Add":"Edit"]})}))}))},defaultOpen:null!==(F=null===(w=f.schema)||void 0===w?void 0:w.default_open)&&void 0!==F?F:"Create"===(null===(O=f.uiState)||void 0===O?void 0:O.usedFor),readOnly:"Create"!==(null===(P=f.uiState)||void 0===P?void 0:P.usedFor),editFlow:"Edit"===(null===(j=f.uiState)||void 0===j?void 0:j.usedFor),isAiStreaming:null===(_=f.uiState)||void 0===_?void 0:_.isAiStreaming,alwaysShowActions:!0,footerData:{ruleTitle:null===(N=f.state)||void 0===N?void 0:N.ruleTitle,stations:[null===(J=null===(R=f.state)||void 0===R?void 0:R.scopeData)||void 0===J?void 0:J.station],tiers:null===(W=null===(L=f.state)||void 0===L?void 0:L.scopeData)||void 0===W?void 0:W.tiers}},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[X&&(null===(M=f.uiState)||void 0===M?void 0:M.isAiStreaming)&&e("div",i({style:{display:"flex",alignItems:"center",color:"#141414ff",fontSize:"13px",fontWeight:500,fontStyle:"italic",marginBottom:"8px",paddingLeft:"4px"}},{children:[t(a,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}}),"Checking the correctness of your Rule Setup..."]})),f.renderChildren?f.renderChildren(void 0,si):null,function(){var l;return $?e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[B&&e("div",i({style:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"16px"}},{children:[t("button",i({onClick:ii,style:{background:"none",border:"none",color:"#6b7280",fontSize:"14px",fontWeight:"500",cursor:"pointer",padding:"0"}},{children:"Discard Changes"})),e("button",i({onClick:ti,disabled:di,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"12px",border:"none",backgroundColor:"#2563eb",color:"#ffffff",fontSize:"14px",fontWeight:"500",cursor:di?"not-allowed":"pointer",opacity:di?.5:1}},{children:[t(u,{size:18,strokeWidth:2.5,color:"#ffffff"})," Save Changes"]}))]})),"rule-setup"===(null===(l=f.uiState)||void 0===l?void 0:l.pendingEditId)&&e("div",i({style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"10px"}},{children:[t(s,{size:14,style:{color:"#C2410C"}}),t("div",i({style:{color:"#C2410C",fontSize:"13px"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]})):null}()]}))}))}))}export{f as default};
|
|
2
2
|
//# sourceMappingURL=GlobalSetupAccordionField.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as n,jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n,jsxs as i}from"react/jsx-runtime";import{useState as t,useRef as o,useEffect as l}from"react";import{Pencil as d,Loader2Icon as r,Check as a,AlertTriangle as u}from"lucide-react";import{useDynamicFormStore as c}from"../store/useDynamicFormStore.js";var s={display:"flex",gap:"16px",width:"100%",alignItems:"flex-start"};function f(f){var v,p,y,g,h,m,x,b,S,k,_,C,E=!!(null===(v=f.schema)||void 0===v?void 0:v.group_edit),I=c(function(e){return e.globalData}),z=c(function(e){return e.setGlobalField}),A=t({}),D=A[0],j=A[1],w=t(!1),P=w[0],W=w[1],F=null===(p=f.uiState)||void 0===p?void 0:p.isAiStreaming,O=o(F);if(l(function(){O.current&&!F&&P&&W(!1),O.current=F},[F,P]),!E)return n("div",e({style:s},{children:f.renderChildren?f.renderChildren():null}));var R=Object.entries((null===(y=f.schema)||void 0===y?void 0:y.properties)||{}).map(function(e){return{key:e[0],node:e[1]}}).filter(function(e){var n;return null===(n=e.node)||void 0===n?void 0:n.data_key}),M=f.contextOverrides||{},B=R.map(function(e){return M[String(e.node.data_key).replace("global.","")]}).find(Boolean),J=!!(null==B?void 0:B.hideEditControls),L=!!(null==B?void 0:B.parentEditing);if(J)return i("div",e({style:{border:"1px solid #e5e7eb",borderRadius:"12px",padding:"16px",width:"100%",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#ffffff",boxSizing:"border-box"}},{children:[i("div",e({style:{display:"flex",flexDirection:"column",gap:"2px"}},{children:[n("span",e({style:{fontSize:"14px",fontWeight:500,color:F?"#717b8c":"#19213D",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:(null===(g=f.schema)||void 0===g?void 0:g.group_title)||(null===(h=f.schema)||void 0===h?void 0:h.title)||""})),(f.subtitle||(null===(m=f.schema)||void 0===m?void 0:m.subtitle))&&n("span",e({style:{fontFamily:"Inter",fontWeight:400,fontSize:"12px",lineHeight:"130%",color:"#64748B"}},{children:f.subtitle||(null===(x=f.schema)||void 0===x?void 0:x.subtitle)}))]})),n("div",e({style:e(e({},s),{pointerEvents:L?"auto":"none"})},{children:f.renderChildren?f.renderChildren():null}))]}));var T="group-".concat(f.id||"flexrow"),q=(null===(b=f.uiState)||void 0===b?void 0:b.activeEditId)===T,G=!!(null===(S=f.uiState)||void 0===S?void 0:S.activeEditId)&&!q,H=(null===(k=f.uiState)||void 0===k?void 0:k.pendingEditId)===T,K=R.filter(function(e){return e.node.is_required}).map(function(e){return e.node.data_key}).every(function(e){var n;return""!==String(null!==(n=D[e])&&void 0!==n?n:"").trim()}),N=R.some(function(e){var n,i;return(null!==(n=D[e.node.data_key])&&void 0!==n?n:"")!==(null!==(i=I[e.node.data_key])&&void 0!==i?i:"")}),U=!K||!N||F,V={};R.forEach(function(n){var i,t,o,l,d=n.node.data_key,r=n.node.depends_on_global_key;V[d]={value:q?null!==(i=D[d])&&void 0!==i?i:"":null!==(t=I[d])&&void 0!==t?t:"",onChange:function(n){return i=d,t=n,void j(function(n){var o,l=e(e({},n),((o={})[i]=t,o));return R.forEach(function(e){e.node.depends_on_global_key===i&&(l[e.node.data_key]="")}),l});var i,t},readOnly:F,parentValueOverride:r?q?null!==(o=D[r])&&void 0!==o?o:"":null!==(l=I[r])&&void 0!==l?l:"":void 0}});var Q={display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"1px solid #e5e7eb",borderRadius:"8px",backgroundColor:"#ffffff",color:"#6b7280",cursor:P?"not-allowed":"pointer",opacity:P?.5:1};return i("div",e({"data-edit-id":T,style:{border:"1px solid #e5e7eb",borderRadius:"12px",padding:"16px",width:"100%",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#ffffff"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[n("span",e({style:{fontSize:"14px",fontWeight:500,color:F?"#717b8c":"#19213D",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:(null===(_=f.schema)||void 0===_?void 0:_.group_title)||(null===(C=f.schema)||void 0===C?void 0:C.title)||""})),!q&&n("button",e({title:G?"Save active edits first":"Edit",onClick:function(){var e,n,i,t,o,l,d;if(!(null===(e=f.uiState)||void 0===e?void 0:e.activeEditId)||q){var r={};R.forEach(function(e){var n;r[e.node.data_key]=null!==(n=I[e.node.data_key])&&void 0!==n?n:""}),j(r),null===(o=null===(t=f.uiState)||void 0===t?void 0:t.setPendingEditId)||void 0===o||o.call(t,null),null===(d=null===(l=f.uiState)||void 0===l?void 0:l.setActiveEditId)||void 0===d||d.call(l,T)}else null===(i=null===(n=f.uiState)||void 0===n?void 0:n.setPendingEditId)||void 0===i||i.call(n,f.uiState.activeEditId)},disabled:P||F,style:Q},{children:n(d,{size:14})}))]})),P&&F&&i("div",e({style:{display:"flex",alignItems:"center",color:"#141414",fontSize:"13px",fontWeight:500,fontStyle:"italic",paddingLeft:"2px"}},{children:[n("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),n(r,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}}),"Checking the correctness of your selection..."]})),n("div",e({style:e(e({},s),{pointerEvents:q?"auto":"none"})},{children:f.renderChildren?f.renderChildren(void 0,V):null})),q&&i("div",e({style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"10px"}},{children:[i("div",e({style:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"16px"}},{children:[n("button",e({onClick:function(){var e,n,i,t;j({}),null===(n=null===(e=f.uiState)||void 0===e?void 0:e.setPendingEditId)||void 0===n||n.call(e,null),null===(t=null===(i=f.uiState)||void 0===i?void 0:i.setActiveEditId)||void 0===t||t.call(i,null)},style:{background:"none",border:"none",color:"#6b7280",fontSize:"14px",fontWeight:500,cursor:"pointer",padding:0}},{children:"Discard Changes"})),i("button",e({onClick:function(){var e,n,i,t,o;if(!U){if(R.forEach(function(e){var n;return z(e.node.data_key,null!==(n=D[e.node.data_key])&&void 0!==n?n:"")}),null===(e=f.uiState)||void 0===e?void 0:e.setSendMessageInChat){var l="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),d=R.filter(function(e){return e.node.ai_generated}),r=R.filter(function(e){return!e.node.ai_generated}),a="";if(d.length>0){var u=d.map(function(e){var n;return"".concat(e.node.title||e.node.data_key," to ").concat(function(e,n){var i,t;return null!==(t=null===(i=(Array.isArray(null==e?void 0:e.options)?e.options:Array.isArray(null==e?void 0:e.enum)?e.enum.map(function(e){return e&&"object"==typeof e?e:{label:String(e),value:e}}):[]).find(function(e){return e.value===n}))||void 0===i?void 0:i.label)&&void 0!==t?t:n||"empty"}(e.node,null!==(n=D[e.node.data_key])&&void 0!==n?n:""))});a+="Update ".concat(u.join(" and "))}if(r.length>0){var c=r.map(function(e){return e.node.title||e.node.data_key}).join(" and ");a+="".concat(a?" and ":"","The ").concat(c," have been updated through the learning form")}f.uiState.setSendMessageInChat("__SKELETON__:".concat(l,":").concat(a))}W(!0),j({}),null===(i=null===(n=f.uiState)||void 0===n?void 0:n.setPendingEditId)||void 0===i||i.call(n,null),null===(o=null===(t=f.uiState)||void 0===t?void 0:t.setActiveEditId)||void 0===o||o.call(t,null)}},disabled:U,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"12px",border:"none",backgroundColor:"#2563eb",color:"#ffffff",fontSize:"14px",fontWeight:500,cursor:U?"not-allowed":"pointer",opacity:U?.5:1}},{children:[n(a,{size:18,strokeWidth:2.5,color:"#ffffff"})," Apply"]}))]})),H&&i("div",e({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n(u,{size:14,style:{color:"#C2410C"}}),n("div",e({style:{color:"#C2410C",fontSize:"13px"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]}))]}))}export{f as default};
|
|
2
2
|
//# sourceMappingURL=GroupEditRow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as t,jsx as i,Fragment as n}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{Check as l,X as d,Pencil as u}from"lucide-react";import
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as i,Fragment as n}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{Check as l,X as d,Pencil as u}from"lucide-react";import s from"../../features/LearningManagement/components/PromptTextEditor.js";import{Textarea as c}from"../../features/IL-OTJ/_components/atoms/Textarea/Textarea.js";import{useLearningTemplateStore as p}from"../../features/LearningManagement/store/useLearningTemplateStore.js";import{useParentEditEnabled as f}from"../hooks/useParentEditEnabled.js";var h=[{key:"text",label:"Text"},{key:"prompt",label:"Prompt"}];function v(v){var x,m,b,g,y,S=r(null),E=S[0],C=S[1],k=r("text"),w=k[0],I=k[1],A=p(function(e){return e.backwardCompatibility}),W=v.id||"prompt-editor",T=f(v.schema),z=void 0!==v.hideEditControls?!!v.hideEditControls:T,L=z?!!v.parentEditing:(null===(x=v.uiState)||void 0===x?void 0:x.activeEditId)===W,F=!!(null===(m=v.uiState)||void 0===m?void 0:m.activeEditId)&&v.uiState.activeEditId!==W,O=o(null);a(function(){if(!L&&O.current){var e=O.current,t=e.querySelector(":focus");t&&t.blur();var i=function(e){L||(e.preventDefault(),e.target.blur())};return e.addEventListener("focus",i,{capture:!0}),function(){e.removeEventListener("focus",i,{capture:!0})}}},[L]),a(function(){O.current&&(L?(O.current.inert=!1,O.current.querySelectorAll('[aria-hidden="true"]').forEach(function(e){e.removeAttribute("aria-hidden");var t=e.tagName.toLowerCase();"button"!==t&&"input"!==t&&"textarea"!==t&&"a"!==t||(e.removeAttribute("tabindex"),e.disabled=!1)})):(O.current.inert=!0,O.current.querySelectorAll("input, textarea, button, a, [tabindex], [contenteditable]").forEach(function(e){e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),e.disabled=!0})))},[L]);var j=!E||E.trim()===(v.value||"").trim(),B={display:"flex",alignItems:"center",justifyContent:"center",padding:"8px",border:"1px solid #e5e7eb",borderRadius:"8px",cursor:"pointer",width:"36px",height:"36px",backgroundColor:"#ffffff"},M=(null===(y=null===(g=null===(b=v.uiState)||void 0===b?void 0:b.highlights)||void 0===g?void 0:g.get("".concat(v.tierKey,"_").concat(v.variantIndex)))||void 0===y?void 0:y.instruction_prompt)||!1,_=A?"#2563EB":"#5925DC",R=A?"37, 99, 235":"89, 37, 220",D=z?v.value||"":L&&null!==E?E:v.value||"",H=function(e){return z||!L?v.onChange(e):C(e)};return t("div",e({style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%",maxWidth:"100%",boxSizing:"border-box",minWidth:0,marginBottom:"12px"},"data-edit-id":W},{children:[t("div",e({style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},{children:[i("span",e({style:{fontSize:"14px",fontWeight:500,color:"#19213D",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:v.title})),v.enableViewToggle&&i("div",e({style:{display:"flex",alignItems:"center",gap:"2px",padding:"2px",backgroundColor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"6px"}},{children:h.map(function(t){var n=t.key,r=t.label,o=w===n;return i("button",e({type:"button",onClick:function(){return I(n)},style:{padding:"3px 8px",borderRadius:"4px",border:"none",cursor:"pointer",fontSize:"11px",fontWeight:500,fontFamily:"Inter, sans-serif",backgroundColor:o?"#ffffff":"transparent",color:o?_:"#64748B",boxShadow:o?"0px 1px 2px rgba(18, 18, 23, 0.05)":"none"}},{children:r}),n)})}))]})),(v.subtitle||v.description)&&i("div",e({style:{fontFamily:"Inter",fontWeight:400,fontSize:"12px",lineHeight:"130%",color:"#64748B",marginBottom:"4px"}},{children:v.subtitle||v.description})),t("div",e({style:{display:"flex",alignItems:"flex-start",gap:"8px",width:"100%",maxWidth:"100%",minWidth:0,boxSizing:"border-box"}},{children:[i("div",e({ref:O,style:{flex:"1 1 0%",minWidth:0,maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",border:M?"1px solid ".concat(_):"none",borderRadius:"8px",boxShadow:M?"0 0 12px 3px rgba(".concat(R,", 0.3)"):"none",transition:"all 0.3s",scrollBehavior:L?"auto":"unset"},"aria-disabled":!L},{children:i("div",e({style:{pointerEvents:L?"auto":"none",opacity:L?1:.75,maxWidth:"100%",minWidth:0,overflow:"hidden"}},{children:v.enableViewToggle&&"text"===w?i(c,{rows:6,placeholder:v.placeholder||"Enter the instruction prompt..",value:D,onChange:function(e){return H(e.target.value)},isReadOnly:v.readOnly||v.isAiStreaming,inputReadOnly:!L,isHighlighted:M,errorMessage:v.errorMessage}):i(s,e({},v,{value:D,onChange:H,minHeight:"220px",maxHeight:"400px",readOnly:v.readOnly||v.isAiStreaming||!L}))}))})),!v.readOnly&&!z&&i("div",e({style:{display:"flex",gap:"8px"}},{children:L?t(n,{children:[t("button",e({onClick:function(){var e,t,i;if(null!==E&&E!==(v.value||"")&&(v.onChange(E),null===(e=v.uiState)||void 0===e?void 0:e.setSendMessageInChat)){var n="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8));v.uiState.setSendMessageInChat("__SKELETON__:".concat(n,":The ").concat(v.title," has been updated through the Learning Form"))}C(null),null===(i=null===(t=v.uiState)||void 0===t?void 0:t.setActiveEditId)||void 0===i||i.call(t,null)},disabled:j,style:e(e({},B),{backgroundColor:"#2563EB",color:"white",width:"auto"})},{children:[i(l,{size:20,strokeWidth:2.5})," Apply"]})),i("button",e({onClick:function(){var e,t;C(null),null===(t=null===(e=v.uiState)||void 0===e?void 0:e.setActiveEditId)||void 0===t||t.call(e,null)},style:e(e({},B),{color:"#dc2626"})},{children:i(d,{size:20,strokeWidth:2.5})}))]}):i("button",e({onClick:function(){var e,t;F||(null===(t=null===(e=v.uiState)||void 0===e?void 0:e.setActiveEditId)||void 0===t||t.call(e,W),C(v.value||""))},disabled:v.isAiStreaming||F,style:e(e({},B),{color:"#6b7280"})},{children:i(u,{size:20})}))}))]}))]}))}export{v as default};
|
|
2
2
|
//# sourceMappingURL=PromptTextEditorField.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as i}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import{AlertTriangle as o}from"lucide-react";import{VariantListWrapper as e}from"../../features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js";import r from"../../features/IL-OTJ/_components/AccordianSection.js";import{EditPencilIcon as a}from"../../features/IL-OTJ/_components/_svg/EditPencilIcon.js";import{useVariantEditSession as d,hasMeaningfulText as l}from"../../features/IL-OTJ/_components/hooks/useVariantEditSession.js";import{useDynamicFormStore as u}from"../store/useDynamicFormStore.js";import{splitConditions as s}from"../utils/conditionText.js";import{useParentEditEnabled as p}from"../hooks/useParentEditEnabled.js";function c(c){var f,v,m,h,g,y,C=p(c.schema),x=c.tierKey||"tier_1",b=!1!==(null===(f=c.schema)||void 0===f?void 0:f.show_variant_pill),A=(null===(m=null===(v=c.state)||void 0===v?void 0:v.variantsByTier)||void 0===m?void 0:m[x])||[{}],E=(null===(h=c.schema)||void 0===h?void 0:h.properties)||{},S=function(i){return Object.entries(E).filter(function(n){var t=n[1];return(null==t?void 0:t.bpa_ui_component)===i&&!(null==t?void 0:t.hidden)}).sort(function(i,n){var t,o,e=i[1],r=n[1];return(null!==(t=null==e?void 0:e.ui_position)&&void 0!==t?t:0)-(null!==(o=null==r?void 0:r.ui_position)&&void 0!==o?o:0)}).map(function(i){var n=i[0],t=i[1];return String((null==t?void 0:t.data_key)||n).replace("global.","")})},w=S("TextInput")[0],T=S("PromptTextEditor")[0],D=S("ConditionSection"),I=D[0],V=D[1],_=u(function(i){return i.variantData}),O=d(c.uiState,function(i){var n=u.getState().getVariantField,t=function(t){return t?n(x,i,t):void 0};return{ruleDescription:t(w)||"",instructionPrompt:t(T)||"",whenToApplyConditions:s(t(I)||"","wta"),whenNotToApplyConditions:s(t(V)||"","wnta")}},function(i,n){void 0!==i.instructionPrompt&&T&&u.getState().setVariantField(n.tierKey,n.variantIndex,T,i.instructionPrompt)}),P=O.variantEdit,j=O.pendingVariantId,k=O.handleStartVariantEdit,F=O.handleCancelVariantEdit,N=O.patchVariantDraft,R=O.editDraftCondition,z=O.removeDraftCondition,B=O.addDraftCondition,J=O.handleSaveVariantEdit;return n(e,i({onAddVariant:function(){var i;(null===(i=c.handlers)||void 0===i?void 0:i.addNewVariant)&&c.handlers.addNewVariant(x)},isDisabled:null===(g=c.uiState)||void 0===g?void 0:g.isAiStreaming,showAddVariantBtn:!C&&"Edit"!==(null===(y=c.uiState)||void 0===y?void 0:y.usedFor)},{children:A.map(function(e,d){var u,s,p,f,v,m=e.variantType||"default",h="default"===m||"default_variant"===m,g="".concat(x,"-variant-").concat(d),y=!0===e.is_variant,A=null===(u=c.uiState)||void 0===u?void 0:u.activeVariantAccordionIndex,E=void 0!==A?A===d:y,S=e.isReadOnly||(null===(s=c.uiState)||void 0===s?void 0:s.isAiStreaming),D="variant-".concat(x,"-").concat(d),O=C&&(null==P?void 0:P.id)===D,L=j===D,M=O?P.draft:null,W=S||L,K=(null===(p=null==_?void 0:_[x])||void 0===p?void 0:p[d])||{},q=![w,T,I,V].some(function(i){return i&&l(K[i])}),G=!M||!l(M.ruleDescription)||!M.whenToApplyConditions.some(function(i){return l(i.text)}),H=i({},function(i){var n,t={},o=function(n){void 0===n&&(n={}),Object.entries(n).forEach(function(n){var e=n[0],r=n[1],a=((null==r?void 0:r.data_key)||e).replace("global.","");t[a]={readOnly:i},(null==r?void 0:r.properties)&&o(r.properties)})};return o(null===(n=c.schema)||void 0===n?void 0:n.properties),t}(S));if(C){var Q=function(n,t){n&&(H[n]=i(i({},H[n]||{}),t))};Q(w,i({readOnly:S||!O,enableInlineEdit:!1},M?{value:M.ruleDescription,onChange:function(i){return N({ruleDescription:i})}}:{})),Q(T,i({readOnly:S||!O,hideEditControls:!0,parentEditing:O},M?{value:M.instructionPrompt,onChange:function(i){return N({instructionPrompt:i})}}:{})),Q(I,i({readOnly:S,hideEditControls:!0,parentEditing:O},M?{conditions:M.whenToApplyConditions,onAdd:function(){return B("whenToApplyConditions")},onRemove:function(i,n,t){return z("whenToApplyConditions",t)},onEdit:function(i,n,t,o){return R("whenToApplyConditions",t,o)}}:{})),Q(V,i({readOnly:S,hideEditControls:!0,parentEditing:O},M?{conditions:M.whenNotToApplyConditions,onAdd:function(){return B("whenNotToApplyConditions")},onRemove:function(i,n,t){return z("whenNotToApplyConditions",t)},onEdit:function(i,n,t,o){return R("whenNotToApplyConditions",t,o)}}:{}))}return n("div",i({style:{width:"100%"},"data-edit-id":C?D:void 0},{children:n(r,i({title:{type:h?"default":"variant",label:m,number:d+1,isNewVariant:y,isDefault:e.isDefault,isModified:e.isModified},expanded:E,onToggle:function(){var i,n;return null===(n=null===(i=c.uiState)||void 0===i?void 0:i.setActiveVariantAccordionIndex)||void 0===n?void 0:n.call(i,E?null:d)},variant:"rule-behavior",showTitlePill:b,footerData:{ruleTitle:m,description:e.ruleDescription||""},readOnly:S,actionButtons:C?function(o,e){return C&&(!S||O||L)?O||L?t("div",i({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n("button",i({onClick:function(i){i.stopPropagation(),J()},disabled:G||L,style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 10.5px",borderRadius:"6px",border:"1px solid #D9D6FE",backgroundColor:L?"#F5F3FF":"#ffffff",color:"#5925DC",fontSize:"13px",fontWeight:500,cursor:G||L?"not-allowed":"pointer",opacity:G?.5:1}},{children:L?"Validating...":"Save"})),!L&&n("button",i({onClick:function(i){i.stopPropagation(),F()},style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 10.5px",borderRadius:"6px",border:"1px solid #D9D6FE",backgroundColor:"#ffffff",color:"#5925DC",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Cancel"}))]})):t("button",i({title:W?"Editing unavailable":q?"Add":"Edit",onClick:function(i){i.stopPropagation(),k(d,x,d,m),o||e()},disabled:W,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"1px solid #CBD5E1",borderRadius:"6px",backgroundColor:"#ffffff",color:"#64748B",fontSize:"13px",fontWeight:500,cursor:W?"not-allowed":"pointer",opacity:W?.5:1,gap:"6px"}},{children:[n(a,{size:12})," ",q?"Add":"Edit"]})):null}:void 0,isAiStreaming:null===(f=c.uiState)||void 0===f?void 0:f.isAiStreaming,alwaysShowActions:C},{children:t("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[c.renderChildren?c.renderChildren(d,H,x):null,C&&O&&(null===(v=c.uiState)||void 0===v?void 0:v.pendingEditId)===D&&t("div",i({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n(o,{size:14,style:{color:"#C2410C"}}),n("div",i({style:{color:"#C2410C",fontSize:"13px"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]}))}))}),g)})}))}export{c as default};
|
|
2
2
|
//# sourceMappingURL=VariantListField.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r,{useContext as t}from"react";import{useLearningTemplateStore as e}from"../../features/LearningManagement/store/useLearningTemplateStore.js";var n=r.createContext(!1),a=function(){return t(n)};function o(r){var t=a(),n=e(function(r){return r.backwardCompatibility});return t?!0===(null==r?void 0:r.parent_edit):!n}export{n as DynamicFormContext,a as useIsDynamicForm,o as useParentEditEnabled};
|
|
2
|
+
//# sourceMappingURL=useParentEditEnabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useParentEditEnabled.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as n}from"tslib";import{useMemo as e,useState as i,useRef as t,useEffect as l}from"react";import{useDynamicFormStore as o}from"../store/useDynamicFormStore.js";import{hasMeaningfulText as r,buildEditMessage as a}from"../../features/IL-OTJ/_components/hooks/useVariantEditSession.js";var u=function(n){return"PromptTextEditor"===(null==n?void 0:n.bpa_ui_component)},d=function(n){return!0===(null==n?void 0:n.is_repeatable_variant)||"VariantListWrapper"===(null==n?void 0:n.bpa_ui_component)},c=function(n){return void 0===n&&(n={}),Object.values(n||{}).some(function(n){return d(n)||(null==n?void 0:n.properties)&&c(n.properties)})},v=function(n){void 0===n&&(n={});var e=[],i=function(n){void 0===n&&(n={}),Object.entries(n||{}).forEach(function(n){var t=n[0],l=n[1];!l||l.hidden||d(l)||(l.data_key&&!l.read_only&&e.push({propKey:t,node:l,cleanKey:String(l.data_key).replace("global.","")}),l.properties&&i(l.properties))})};return i(n),e};function s(d,c,s){var f=e(function(){return v(c)},[c]),g=i(null),p=g[0],m=g[1],y=i(!1),E=y[0],S=y[1],_=t(null==s?void 0:s.isAiStreaming),K=(null==s?void 0:s.activeEditId)===d&&null!==p;l(function(){_.current&&!(null==s?void 0:s.isAiStreaming)&&E&&S(!1),_.current=null==s?void 0:s.isAiStreaming},[null==s?void 0:s.isAiStreaming,E]);var b=function(){var n,e;m(null),null===(n=null==s?void 0:s.setActiveEditId)||void 0===n||n.call(s,null),null===(e=null==s?void 0:s.setPendingEditId)||void 0===e||e.call(s,null)},h=o(function(n){return n.globalData}),I=!f.some(function(n){var e;return r(String(null!==(e=h[n.cleanKey])&&void 0!==e?e:""))}),A=!!p&&f.some(function(n){var e,i;return String(null!==(e=p[n.cleanKey])&&void 0!==e?e:"")!==String(null!==(i=o.getState().globalData[n.cleanKey])&&void 0!==i?i:"")}),D=!!p&&f.some(function(n){var e;return n.node.is_required&&""===String(null!==(e=p[n.cleanKey])&&void 0!==e?e:"").trim()}),O=!p||!A||D,k=e(function(){var e={};return f.forEach(function(i){var t,l=i.node.depends_on_global_key;e[i.cleanKey]=n({readOnly:!K||!!(null==s?void 0:s.isAiStreaming),enableInlineEdit:!1,hideEditControls:!0,parentEditing:K},K?n({value:p[i.cleanKey],onChange:function(e){return m(function(t){var l;if(!t)return t;var o=n(n({},t),((l={})[i.cleanKey]=e,l));return f.forEach(function(n){n.node.depends_on_global_key===i.cleanKey&&(o[n.cleanKey]="")}),o})}},l?{parentValueOverride:null!==(t=p[l])&&void 0!==t?t:""}:{}):{})}),e},[f,K,p,null==s?void 0:s.isAiStreaming]);return{leaves:f,isEditing:K,isEmpty:I,isPending:E,isSaveDisabled:O,start:function(){var n,e,i;if((null==s?void 0:s.activeEditId)&&s.activeEditId!==d)null===(n=null==s?void 0:s.setPendingEditId)||void 0===n||n.call(s,s.activeEditId);else{var t=o.getState().globalData,l={};f.forEach(function(n){var e;l[n.cleanKey]=null!==(e=t[n.cleanKey])&&void 0!==e?e:""}),m(l),null===(e=null==s?void 0:s.setActiveEditId)||void 0===e||e.call(s,d),null===(i=null==s?void 0:s.setPendingEditId)||void 0===i||i.call(s,null)}},cancel:b,save:function(){var n,e;if(p){var i=o.getState(),t=i.globalData,l=i.setGlobalField,r=f.filter(function(n){var e,i;return String(null!==(e=p[n.cleanKey])&&void 0!==e?e:"")!==String(null!==(i=t[n.cleanKey])&&void 0!==i?i:"")});if(0!==r.length){if(r.filter(function(n){return!n.node.ai_generated||u(n.node)}).forEach(function(n){return l(n.cleanKey,p[n.cleanKey])}),null==s?void 0:s.setSendMessageInChat){var d="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),c=r.filter(function(n){return!u(n.node)}).map(function(n){var e;return"".concat(n.node.title||n.cleanKey,": ").concat(String(null!==(e=p[n.cleanKey])&&void 0!==e?e:"").trim()||"None")}),v=a(c,r.some(function(n){return u(n.node)}));s.setSendMessageInChat("__SKELETON__:".concat(d,":").concat(v)),S(!0)}m(null),null===(n=null==s?void 0:s.setActiveEditId)||void 0===n||n.call(s,null),null===(e=null==s?void 0:s.setPendingEditId)||void 0===e||e.call(s,null)}else b()}},childOverrides:k}}export{v as collectSectionLeaves,c as sectionHasVariantWrapper,s as useSectionEditSession};
|
|
2
|
+
//# sourceMappingURL=useSectionEditSession.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSectionEditSession.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as o}from"react";import{ChevronDown as r,AlertTriangle as l}from"lucide-react";import d from"../../features/IL-OTJ/_components/AccordianSection.js";import{EditPencilIcon as s}from"../../features/IL-OTJ/_components/_svg/EditPencilIcon.js";import{sectionHasVariantWrapper as a,collectSectionLeaves as c,useSectionEditSession as p}from"../hooks/useSectionEditSession.js";import{useParentEditEnabled as f}from"../hooks/useParentEditEnabled.js";var u={display:"flex",alignItems:"center",gap:"7px",padding:"7px 10.5px",borderRadius:"6px",border:"1px solid #D9D6FE",color:"#5925DC",fontSize:"14px",fontWeight:500},g=function(g){var m,h=g,y=h.schema,x=h.children,b=h.renderChildren,v=h.uiState,C=o(!!y.default_open),S=C[0],P=C[1],E="section-".concat(g.id||y.title||"accordion"),k=a(y.properties),F=c(y.properties),D=f(y)&&!k&&F.length>0,I=p(E,y.properties,v);if(!D)return e("div",i({style:{border:"1px solid #E2E8F0",borderRadius:12,marginBottom:12,overflow:"hidden"}},{children:[e("button",i({type:"button",onClick:function(){return P(function(i){return!i})},"aria-expanded":S,style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",background:"#F8FAFC",border:"none",cursor:"pointer",fontSize:14,fontWeight:500,color:"#19213D",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:[y.title,t(r,{size:18,style:{transform:S?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})]})),S&&e("div",i({style:{padding:16,display:"flex",flexDirection:"column",gap:12}},{children:[y.subtitle&&t("div",i({style:{fontFamily:"Inter",fontWeight:400,fontSize:12,lineHeight:"130%",color:"#64748B"}},{children:y.subtitle})),x]}))]}));return t("div",i({"data-edit-id":E},{children:t(d,i({title:{type:"other",label:y.title||""},subtitle:y.subtitle,defaultOpen:null===(m=y.default_open)||void 0===m||m,isAiStreaming:null==v?void 0:v.isAiStreaming,actionButtons:function(o,r){if(I.isEditing)return e("div",i({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[t("button",i({onClick:function(i){i.stopPropagation(),I.save()},disabled:I.isSaveDisabled||I.isPending,style:i(i({},u),{backgroundColor:I.isPending?"#F5F3FF":"#ffffff",cursor:I.isSaveDisabled||I.isPending?"not-allowed":"pointer",opacity:I.isSaveDisabled?.5:1})},{children:I.isPending?"Validating...":"Save"})),!I.isPending&&t("button",i({onClick:function(i){i.stopPropagation(),I.cancel()},style:i(i({},u),{backgroundColor:"#ffffff",cursor:"pointer"})},{children:"Cancel"}))]}));var l=I.isPending||!!(null==v?void 0:v.isAiStreaming),d=I.isEmpty?"Add":"Edit";return t("button",i({title:I.isPending?"Validating...":d,onClick:function(i){i.stopPropagation(),I.start(),o||r()},disabled:l,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"6px 10px",border:"1px solid #CBD5E1",borderRadius:"6px",backgroundColor:"#ffffff",color:"#64748B",fontSize:"13px",fontWeight:500,cursor:l?"not-allowed":"pointer",opacity:l?.5:1}},{children:I.isPending?"Validating...":e(n,{children:[t(s,{size:12})," ",d]})}))},alwaysShowActions:!0},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:12}},{children:[b?b(void 0,I.childOverrides):x,(null==v?void 0:v.pendingEditId)===E&&e("div",i({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[t(l,{size:14,style:{color:"#C2410C"}}),t("div",i({style:{color:"#C2410C",fontSize:"13px"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]}))}))}))};export{g as default};
|
|
2
2
|
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var n=/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/,r=/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/g,a=/(?:<ai_reasoning>[\s\S]*?<\/ai_reasoning>|[^\r\n])+/g,i=function(i,e){var t;return(null!==(t=String(null!=i?i:"").replace(/\\+n/g,"\n").match(a))&&void 0!==t?t:[]).map(function(a){var i,e=null===(i=a.match(n))||void 0===i?void 0:i[1];return{text:a.replace(r,"").trim().replace(/^-\s*/,""),reasoning:e}}).filter(function(n){return n.text}).map(function(n,r){return{id:"".concat(e,"-").concat(r),text:n.text,reasoning:n.reasoning}})};export{i as splitConditions};
|
|
2
|
+
//# sourceMappingURL=conditionText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionText.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILMarketplaceMockTest.d.ts","sourceRoot":"","sources":["../../../src/ILMarketplaceMockTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkG1B,QAAA,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ILMarketplaceMockTest.d.ts","sourceRoot":"","sources":["../../../src/ILMarketplaceMockTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkG1B,QAAA,MAAM,qBAAqB,yBAmF1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -39,7 +39,7 @@ export type GuidelineFilterOptionState = {
|
|
|
39
39
|
disabled?: boolean;
|
|
40
40
|
};
|
|
41
41
|
export type ILMarketplaceWrapperProps = {
|
|
42
|
-
guidelineSections
|
|
42
|
+
guidelineSections?: LscGuidelineSection[];
|
|
43
43
|
guidelineFiles?: FileItem[];
|
|
44
44
|
/** Fallback sidebar tree used until `applicationMappingId` resolves via the marketplace domain API. */
|
|
45
45
|
treeSidebarData?: ScopeTreeNode;
|
|
@@ -81,13 +81,6 @@ export type ILMarketplaceWrapperProps = {
|
|
|
81
81
|
* Passing it means the mode owns the header, so the default publish header is not rendered.
|
|
82
82
|
* Omit it and the wrapper handles tabs and header itself, as before.
|
|
83
83
|
*/
|
|
84
|
-
view?: ILMarketplaceView;
|
|
85
|
-
/**
|
|
86
|
-
* Fires whenever the wrapper moves itself — a tab click, opening the publish flow, or leaving it.
|
|
87
|
-
* A `useState` setter drops straight in (`onViewChange={setView}`); the second argument carries
|
|
88
|
-
* the template being published, for hosts whose header shows its name.
|
|
89
|
-
*/
|
|
90
|
-
onViewChange?: (view: ILMarketplaceView, guideline: FileItem | null) => void;
|
|
91
84
|
/**
|
|
92
85
|
* Full header node for the built-in publish flow, for hosts that would rather hand one over than
|
|
93
86
|
* render it themselves. Takes precedence over `onViewChange`'s suppression; omit both to get the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILMarketplaceWrapper.d.ts","sourceRoot":"","sources":["../../../src/ILMarketplaceWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrH,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAIrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AAOzG,OAAO,EAAkB,aAAa,EAAqB,MAAM,gEAAgE,CAAC;
|
|
1
|
+
{"version":3,"file":"ILMarketplaceWrapper.d.ts","sourceRoot":"","sources":["../../../src/ILMarketplaceWrapper.tsx"],"names":[],"mappings":"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"}
|
|
@@ -68,6 +68,17 @@ export interface TeachMePluginProps {
|
|
|
68
68
|
* request has not resolved.
|
|
69
69
|
*/
|
|
70
70
|
isMarketPlace?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether this plugin instance renders its own bundled `<ContinueWithTemplateModal />`.
|
|
73
|
+
* Defaults to true. Set to false when the host conditionally mounts/unmounts
|
|
74
|
+
* `<TeachMePlugin />` itself (e.g. `{isOpen && <TeachMePlugin ... />}`) — the continue
|
|
75
|
+
* modal is opened via a store flag right as the plugin's `onClose` fires, so a bundled
|
|
76
|
+
* copy gets unmounted before it can show and `isContinueModalOpen` is left stuck `true`
|
|
77
|
+
* for the next mount to immediately (and wrongly) re-show. In that setup, the host should
|
|
78
|
+
* render a single `<ContinueWithTemplateModal />` itself at a level that stays mounted
|
|
79
|
+
* across the plugin's open/close cycle, and pass `renderContinueModal={false}` here.
|
|
80
|
+
*/
|
|
81
|
+
renderContinueModal?: boolean;
|
|
71
82
|
}
|
|
72
83
|
/**
|
|
73
84
|
* Map a value_type_name (returned by the /getValueType API) to its renderer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeachMePlugin.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevE,OAAO,EAA4B,wBAAwB,EAAE,MAAM,yDAAyD,CAAC;AAI7H,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IAEjC,sGAAsG;IACtG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAC,GAAG,CAAC;IACX;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TeachMePlugin.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAevE,OAAO,EAA4B,wBAAwB,EAAE,MAAM,yDAAyD,CAAC;AAI7H,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IAEjC,sGAAsG;IACtG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAC,GAAG,CAAC;IACX;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAGD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAM1E,CAAC;AAuBF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAM/C,CAAC;AA2KF,eAAe,aAAa,CAAC"}
|
|
@@ -26,7 +26,7 @@ interface FooterData {
|
|
|
26
26
|
tiers?: string[];
|
|
27
27
|
description?: string;
|
|
28
28
|
}
|
|
29
|
-
declare const AccordionSection: ({ title, subtitle, children, defaultOpen, footerData, readOnly, variant, expanded, onToggle, actionButtons, isAiStreaming, editFlow, showAccentBorder }: {
|
|
29
|
+
declare const AccordionSection: ({ title, subtitle, children, defaultOpen, footerData, readOnly, variant, expanded, onToggle, actionButtons, isAiStreaming, editFlow, showAccentBorder, alwaysShowActions, showTitlePill }: {
|
|
30
30
|
title: TitleProps;
|
|
31
31
|
subtitle?: string | undefined;
|
|
32
32
|
children: React.ReactNode;
|
|
@@ -39,6 +39,13 @@ declare const AccordionSection: ({ title, subtitle, children, defaultOpen, foote
|
|
|
39
39
|
actionButtons?: ((isOpen: boolean, onToggle: () => void) => React.ReactNode) | undefined;
|
|
40
40
|
isAiStreaming?: boolean | undefined;
|
|
41
41
|
editFlow?: boolean | undefined;
|
|
42
|
+
/** Header actions are hidden while the AI streams so stale pencils can't be clicked.
|
|
43
|
+
* Sections whose actions double as the pending indicator ("Validating...") opt out —
|
|
44
|
+
* otherwise the button vanishes the instant Save kicks off streaming. */
|
|
45
|
+
alwaysShowActions?: boolean | undefined;
|
|
46
|
+
/** Hides the title chip (e.g. the "Variant 1" pill) while keeping the rest of the
|
|
47
|
+
* header — driven from the schema so a config can opt out of the pill. */
|
|
48
|
+
showTitlePill?: boolean | undefined;
|
|
42
49
|
showAccentBorder?: boolean | undefined;
|
|
43
50
|
}) => import("react").JSX.Element;
|
|
44
51
|
export default AccordionSection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordianSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/AccordianSection.tsx"],"names":[],"mappings":";AAKA,KAAK,UAAU,GACT;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAGrH;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9H,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":";AAKA,KAAK,UAAU,GACT;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAGrH;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9H,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;WAiBX,UAAU;;cAEP,MAAM,SAAS;;;;;;sBAMR,IAAI;8BACI,OAAO,YAAY,MAAM,IAAI,KAAK,MAAM,SAAS;;;IAG1E;;8EAE0E;;IAE1E;+EAC2E;;;iCA4Q9E,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface DraftCondition {
|
|
2
|
+
id: number | string;
|
|
3
|
+
text: string;
|
|
4
|
+
reasoning?: string;
|
|
5
|
+
conflict?: any;
|
|
6
|
+
}
|
|
7
|
+
export interface VariantDraft {
|
|
8
|
+
ruleDescription: string;
|
|
9
|
+
instructionPrompt: string;
|
|
10
|
+
whenToApplyConditions: DraftCondition[];
|
|
11
|
+
whenNotToApplyConditions: DraftCondition[];
|
|
12
|
+
}
|
|
13
|
+
export type ConditionKey = 'whenToApplyConditions' | 'whenNotToApplyConditions';
|
|
14
|
+
export declare const hasMeaningfulText: (text?: string | null) => boolean;
|
|
15
|
+
export declare const conditionsToText: (conditions: DraftCondition[]) => string;
|
|
16
|
+
/** Chat copy for a saved edit session. The instruction prompt is summarised, never
|
|
17
|
+
* quoted — its full text would flood the chat. */
|
|
18
|
+
export declare const buildEditMessage: (changedParts: string[], isPromptChanged: boolean) => string;
|
|
19
|
+
export interface VariantEditState {
|
|
20
|
+
id: string;
|
|
21
|
+
tierKey: string;
|
|
22
|
+
variantIndex: number;
|
|
23
|
+
label: string;
|
|
24
|
+
original: VariantDraft;
|
|
25
|
+
draft: VariantDraft;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* One edit session per variant: the whole variant body (description, prompt,
|
|
29
|
+
* when/when-not to apply) is driven off a local draft, and Save sends ONE
|
|
30
|
+
* combined chat message summarizing every changed field. Shared by CreateRule.tsx
|
|
31
|
+
* (TrafficManager) and VariantListField.tsx (schema-driven) so both templates'
|
|
32
|
+
* `backwardCompatibility === false` behavior stays identical.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useVariantEditSession(uiState: any, buildVariantDraft: (item: any) => VariantDraft, commitOnSave?: (committed: {
|
|
35
|
+
instructionPrompt?: string;
|
|
36
|
+
}, session: VariantEditState) => void): {
|
|
37
|
+
variantEdit: VariantEditState | null;
|
|
38
|
+
pendingVariantId: string | null;
|
|
39
|
+
handleStartVariantEdit: (item: any, tierKey: string, variantIndex: number, label: string) => void;
|
|
40
|
+
handleCancelVariantEdit: () => void;
|
|
41
|
+
patchVariantDraft: (patch: Partial<VariantDraft>) => void;
|
|
42
|
+
editDraftCondition: (key: ConditionKey, id: number | string, text: string) => void;
|
|
43
|
+
removeDraftCondition: (key: ConditionKey, id: number | string) => void;
|
|
44
|
+
addDraftCondition: (key: ConditionKey) => void;
|
|
45
|
+
handleSaveVariantEdit: () => void;
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=useVariantEditSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVariantEditSession.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/hooks/useVariantEditSession.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAAG,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE;AAEzG,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,cAAc,EAAE,CAAC;IACxC,wBAAwB,EAAE,cAAc,EAAE,CAAC;CAC5C;AAED,MAAM,MAAM,YAAY,GAAG,uBAAuB,GAAG,0BAA0B,CAAC;AAIhF,eAAO,MAAM,iBAAiB,UAAW,MAAM,GAAG,IAAI,YAAwC,CAAC;AAE/F,eAAO,MAAM,gBAAgB,eAAgB,cAAc,EAAE,WAI/C,CAAC;AAEf;mDACmD;AACnD,eAAO,MAAM,gBAAgB,iBAAkB,MAAM,EAAE,mBAAmB,OAAO,WAKhF,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,GAAG,EACZ,iBAAiB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,YAAY,EAI9C,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,EAAE,gBAAgB,KAAK,IAAI;;;mCAevD,GAAG,WAAW,MAAM,gBAAgB,MAAM,SAAS,MAAM;;+BAkB7D,QAAQ,YAAY,CAAC;8BAItB,YAAY,MAAM,MAAM,GAAG,MAAM,QAAQ,MAAM;gCAO7C,YAAY,MAAM,MAAM,GAAG,MAAM;6BAOpC,YAAY;;EA+D7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaDrivenCreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"SchemaDrivenCreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAiChD,CAAC;AAEF,eAAe,sBAAsB,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":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AA0B7D,eAAO,MAAM,kBAAkB;cAAkF,MAAM,SAAS;kBAAgB,MAAM,IAAI;;;uBAgDzJ,CAAC;AAEF,eAAO,MAAM,UAAU,iCAAkC,GAAG,sBAsiC3D,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { LscGuidelineSection, LscGuidelineClassNames, LscGuidelineStyles } from '../types';
|
|
3
3
|
interface GuidelineLibraryTabProps {
|
|
4
4
|
section: LscGuidelineSection;
|
|
5
|
+
isActive?: boolean;
|
|
5
6
|
classNames?: LscGuidelineClassNames;
|
|
6
7
|
styles?: LscGuidelineStyles;
|
|
7
8
|
onTabSelection?: (tabId: string) => void;
|
|
@@ -21,6 +22,6 @@ interface GuidelineLibraryTabProps {
|
|
|
21
22
|
* @param styles - Custom inline styles
|
|
22
23
|
* @param onTabSelection - Callback fired when tab is clicked
|
|
23
24
|
*/
|
|
24
|
-
export declare function GuidelineLibraryTab({ section, classNames, styles, onTabSelection, }: GuidelineLibraryTabProps): import("react").JSX.Element;
|
|
25
|
+
export declare function GuidelineLibraryTab({ section, isActive, classNames, styles, onTabSelection, }: GuidelineLibraryTabProps): import("react").JSX.Element;
|
|
25
26
|
export {};
|
|
26
27
|
//# sourceMappingURL=GuidelineLibraryTab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuidelineLibraryTab.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-marketplace/components/GuidelineLibraryTab.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKhG,UAAU,wBAAwB;IAChC,OAAO,EAAE,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"GuidelineLibraryTab.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-marketplace/components/GuidelineLibraryTab.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKhG,UAAU,wBAAwB;IAChC,OAAO,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,QAAc,EACd,UAAU,EACV,MAAM,EACN,cAAc,GACf,EAAE,wBAAwB,+BAqD1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-context.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-marketplace/types/add-context.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACzC,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
1
|
+
{"version":3,"file":"add-context.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-marketplace/types/add-context.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACzC,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/RuleContent/RuleContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RuleContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/RuleContent/RuleContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAsB3D;;;GAGG;AACH,UAAU,gBAAgB;IACxB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,8CAA8C;IAC9C,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,qDAAqD;IACrD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wDAAwD;IACxD,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,0CAA0C;IAC1C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+CAA+C;IAC/C,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2CAA2C;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,iBAAiB,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAC,MAAM,CAAC;CAChB;AAED;;;;;;;;;;GAUG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8zB3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstantLearningModalDynamic.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/components/InstantLearningModalDynamic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiCjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAMhF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AA8BpE,UAAU,yBAAyB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,qEAAqE;IACrE,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IACvC,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,sBAAsB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7E,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uFAAuF;IACvF,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAC,GAAG,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACrC,CAAC;IACF,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,iFAAiF;IACjF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,qFAAqF;IACrF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAoBD;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,GAAG,GAAG,WAMhD,CAAC;AA0LF,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"InstantLearningModalDynamic.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/components/InstantLearningModalDynamic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiCjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAMhF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AA8BpE,UAAU,yBAAyB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,qEAAqE;IACrE,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IACvC,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,sBAAsB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7E,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uFAAuF;IACvF,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAC,GAAG,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACrC,CAAC;IACF,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,iFAAiF;IACjF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,qFAAqF;IACrF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAoBD;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,GAAG,GAAG,WAMhD,CAAC;AA0LF,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA66OpE,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -36,6 +36,13 @@ export interface LMSMetadataField {
|
|
|
36
36
|
* bound to the same value/onChange — only the presentation differs.
|
|
37
37
|
*/
|
|
38
38
|
bpa_ui_view_toggle?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Short helper copy rendered as a subtitle under the field's title, same
|
|
41
|
+
* treatment as `ruleDescriptionInformation`/`wtaInformation` etc. for the
|
|
42
|
+
* built-in fields. Lets custom (bpa_ui_component) fields describe
|
|
43
|
+
* themselves per-instance instead of sharing one global string.
|
|
44
|
+
*/
|
|
45
|
+
description?: string;
|
|
39
46
|
properties?: Record<string, LMSMetadataField>;
|
|
40
47
|
}
|
|
41
48
|
export interface LMSTreeMenuConfig {
|