@e-llm-studio/instant-learning 1.3.11 → 1.3.12
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 +2 -0
- package/dist/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/ILMarketplaceWrapper.js +2 -0
- package/dist/cjs/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/ILOTJ.js +3 -1
- package/dist/cjs/features/IL-OTJ/ILOTJ.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -0
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -0
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +32 -28
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
- package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagement.js +11 -2
- package/dist/cjs/features/LearningManagement/LearningManagement.js.map +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +25 -19
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +65 -29
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js.map +1 -1
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -0
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js.map +1 -1
- package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js +3 -4
- package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js.map +1 -1
- package/dist/cjs/schema-driven/components/VariantListField.js +1 -2
- package/dist/cjs/schema-driven/components/VariantListField.js.map +1 -1
- package/dist/cjs/schema-driven/primitives/Accordion.js +1 -1
- package/dist/cjs/schema-driven/primitives/Accordion.js.map +1 -1
- package/dist/features/IL-OTJ/ILOTJ.js +3 -1
- package/dist/features/IL-OTJ/ILOTJ.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -0
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -0
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.js +32 -28
- package/dist/features/IL-OTJ/_components/ILPopup.js.map +1 -1
- package/dist/features/IL-marketplace/components/LearningManagementWrapper.js +2 -0
- package/dist/features/IL-marketplace/components/LearningManagementWrapper.js.map +1 -1
- package/dist/features/LearningManagement/LearningManagement.js +11 -2
- package/dist/features/LearningManagement/LearningManagement.js.map +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantCard.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +25 -19
- package/dist/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +65 -29
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/features/LearningManagement/store/useLMSConfigStore.js.map +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -0
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js.map +1 -1
- package/dist/schema-driven/components/GlobalSetupAccordionField.js +3 -4
- package/dist/schema-driven/components/GlobalSetupAccordionField.js.map +1 -1
- package/dist/schema-driven/components/VariantListField.js +1 -2
- package/dist/schema-driven/components/VariantListField.js.map +1 -1
- package/dist/schema-driven/primitives/Accordion.js +1 -1
- package/dist/schema-driven/primitives/Accordion.js.map +1 -1
- package/dist/types/src/ILMarketplaceMockTest.d.ts.map +1 -1
- package/dist/types/src/ILMarketplaceWrapper.d.ts +5 -0
- package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts +3 -1
- package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +3 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.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 +1 -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/components/GlobalSetupAccordionField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/VariantListField.d.ts.map +1 -1
- package/dist/types/src/schema-driven/primitives/Accordion.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -184,7 +184,7 @@ const InstantLearningModalDynamic = ({
|
|
|
184
184
|
mode,
|
|
185
185
|
is_publishing
|
|
186
186
|
}) => {
|
|
187
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
187
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
188
188
|
const [scopeData, setScopeData] = React.useState({
|
|
189
189
|
station: initialScope,
|
|
190
190
|
tiers: ["Tier 1"]
|
|
@@ -281,7 +281,7 @@ const InstantLearningModalDynamic = ({
|
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
}, []);
|
|
284
|
-
useDynamicFormStore.useDynamicFormStore((s) => s.globalData);
|
|
284
|
+
const dynamicGlobalData = useDynamicFormStore.useDynamicFormStore((s) => s.globalData);
|
|
285
285
|
useDynamicFormStore.useDynamicFormStore((s) => s.variantData);
|
|
286
286
|
const dynamicFormSchema = useLMSConfigStore.useTeachMeConfigStore(
|
|
287
287
|
(s) => {
|
|
@@ -1398,6 +1398,17 @@ const InstantLearningModalDynamic = ({
|
|
|
1398
1398
|
console.log("variantIds", variantIds);
|
|
1399
1399
|
setShowComparison(true);
|
|
1400
1400
|
}, [variantIds]);
|
|
1401
|
+
const getSuccessToastMessage = React.useCallback(
|
|
1402
|
+
(fallback) => {
|
|
1403
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
1404
|
+
const rawToast = typeof (uiStateLabels == null ? void 0 : uiStateLabels.successToastMessage) === "string" && uiStateLabels.successToastMessage.trim() !== "" ? uiStateLabels.successToastMessage.trim() : typeof ((_a2 = useLMSConfigStore.useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _a2.successToastMessage) === "string" && ((_c2 = (_b2 = useLMSConfigStore.useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _b2.successToastMessage) == null ? void 0 : _c2.trim()) !== "" ? (_e2 = (_d2 = useLMSConfigStore.useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _d2.successToastMessage) == null ? void 0 : _e2.trim() : void 0;
|
|
1405
|
+
if (rawToast) {
|
|
1406
|
+
return rawToast.replace(/\{scope\}/g, (ruleSet == null ? void 0 : ruleSet.ruleSetName) || "");
|
|
1407
|
+
}
|
|
1408
|
+
return fallback;
|
|
1409
|
+
},
|
|
1410
|
+
[uiStateLabels == null ? void 0 : uiStateLabels.successToastMessage, ruleSet == null ? void 0 : ruleSet.ruleSetName]
|
|
1411
|
+
);
|
|
1401
1412
|
const myCustomHandlers = {
|
|
1402
1413
|
/**
|
|
1403
1414
|
* Handles the 'Let me connect the dots for you...' header message.
|
|
@@ -1903,7 +1914,7 @@ const InstantLearningModalDynamic = ({
|
|
|
1903
1914
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: InstantLearningModal_module["default"].iconSuccess }),
|
|
1904
1915
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${InstantLearningModal_module["default"].toastTitle} ${InstantLearningModal_module["default"].toastTitleSuccess}`, children: "Success" })
|
|
1905
1916
|
] }),
|
|
1906
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: isAnyCreated ? "Learning saved successfully!" : "Changes saved successfully!" })
|
|
1917
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: getSuccessToastMessage(isAnyCreated ? "Learning saved successfully!" : "Changes saved successfully!") })
|
|
1907
1918
|
] })
|
|
1908
1919
|
});
|
|
1909
1920
|
setIsCloseModal(true);
|
|
@@ -3451,7 +3462,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3451
3462
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: InstantLearningModal_module["default"].iconSuccess }),
|
|
3452
3463
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${InstantLearningModal_module["default"].toastTitle} ${InstantLearningModal_module["default"].toastTitleSuccess}`, children: "Success" })
|
|
3453
3464
|
] }),
|
|
3454
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: "Learning saved successfully!" })
|
|
3465
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: getSuccessToastMessage("Learning saved successfully!") })
|
|
3455
3466
|
] })
|
|
3456
3467
|
});
|
|
3457
3468
|
closeTimeoutRef.current = setTimeout(() => {
|
|
@@ -3532,7 +3543,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3532
3543
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
3533
3544
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
3534
3545
|
variantsToUpdate.forEach((variant, index) => {
|
|
3535
|
-
var _a3, _b3, _c3, _d3, _e3, _f3, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2,
|
|
3546
|
+
var _a3, _b3, _c3, _d3, _e3, _f3, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2, _y2, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P;
|
|
3536
3547
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.description || "";
|
|
3537
3548
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
3538
3549
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -3745,7 +3756,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3745
3756
|
tierLinkId: existingLinkId != null ? existingLinkId : null,
|
|
3746
3757
|
variantType: variantTypeToUse,
|
|
3747
3758
|
// Send is_user_accepted_risk directly from the variant state or fallback to props; defaulting to false
|
|
3748
|
-
is_user_accepted_risk: !!((
|
|
3759
|
+
is_user_accepted_risk: !!((_y2 = (_x2 = (structuredAIResponse || [])[index]) == null ? void 0 : _x2.is_user_accepted_risk) != null ? _y2 : variant == null ? void 0 : variant.is_user_accepted_risk),
|
|
3749
3760
|
is_enabled: variant.is_enabled,
|
|
3750
3761
|
appsecData: {
|
|
3751
3762
|
application: (_z = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _z : "",
|
|
@@ -3832,7 +3843,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3832
3843
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: InstantLearningModal_module["default"].iconSuccess }),
|
|
3833
3844
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${InstantLearningModal_module["default"].toastTitle} ${InstantLearningModal_module["default"].toastTitleSuccess}`, children: "Success" })
|
|
3834
3845
|
] }),
|
|
3835
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: "Changes saved successfully!" })
|
|
3846
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: getSuccessToastMessage("Changes saved successfully!") })
|
|
3836
3847
|
] })
|
|
3837
3848
|
});
|
|
3838
3849
|
closeTimeoutRef.current = setTimeout(() => {
|
|
@@ -3906,7 +3917,7 @@ const InstantLearningModalDynamic = ({
|
|
|
3906
3917
|
const tierWtaMap = whenToApplyConditions.get(tierKey);
|
|
3907
3918
|
const tierWntaMap = whenNotToApplyConditions.get(tierKey);
|
|
3908
3919
|
allVariants.forEach((variant, index) => {
|
|
3909
|
-
var _a3, _b3, _c3, _d3, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2,
|
|
3920
|
+
var _a3, _b3, _c3, _d3, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p2, _q2, _r2, _s2, _t2, _u2, _v2, _w2, _x2, _y2, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N;
|
|
3910
3921
|
const description = (tierDescMap == null ? void 0 : tierDescMap.get(index)) || variant.rule_description || variant.description || "";
|
|
3911
3922
|
const wtaConditions = (tierWtaMap == null ? void 0 : tierWtaMap.get(index)) || [];
|
|
3912
3923
|
const wntaConditions = (tierWntaMap == null ? void 0 : tierWntaMap.get(index)) || [];
|
|
@@ -4115,7 +4126,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4115
4126
|
appsecData: {
|
|
4116
4127
|
application: (_x2 = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _x2 : "",
|
|
4117
4128
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
4118
|
-
applicationLevelModuleId: (
|
|
4129
|
+
applicationLevelModuleId: (_y2 = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _y2 : "",
|
|
4119
4130
|
applicationLevelResourceId: (_z = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _z : ""
|
|
4120
4131
|
}
|
|
4121
4132
|
};
|
|
@@ -4218,7 +4229,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4218
4229
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: InstantLearningModal_module["default"].iconSuccess }),
|
|
4219
4230
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${InstantLearningModal_module["default"].toastTitle} ${InstantLearningModal_module["default"].toastTitleSuccess}`, children: "Success" })
|
|
4220
4231
|
] }),
|
|
4221
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: "Changes saved successfully!" })
|
|
4232
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `${InstantLearningModal_module["default"].toastMessage} ${InstantLearningModal_module["default"].toastMessageSuccess}`, children: getSuccessToastMessage("Changes saved successfully!") })
|
|
4222
4233
|
] })
|
|
4223
4234
|
});
|
|
4224
4235
|
closeTimeoutRef.current = setTimeout(() => {
|
|
@@ -4281,8 +4292,32 @@ const InstantLearningModalDynamic = ({
|
|
|
4281
4292
|
scopeData.tiers.length ? scopeData.tiers.map(normalizeTierKey) : void 0,
|
|
4282
4293
|
isEditFlow || isLoadAndEditModeRef.current ? void 0 : [newVariantMapIndexRef.current]
|
|
4283
4294
|
);
|
|
4284
|
-
const
|
|
4295
|
+
const pickTitle = (src) => {
|
|
4296
|
+
if (!src) return "";
|
|
4297
|
+
const preferred = ["rule_title", "ruleTitle", "title", "template_title"];
|
|
4298
|
+
const keys = [
|
|
4299
|
+
...preferred.filter((k) => k in src),
|
|
4300
|
+
...Object.keys(src).filter((k) => /title/i.test(k) && !preferred.includes(k))
|
|
4301
|
+
];
|
|
4302
|
+
for (const k of keys) {
|
|
4303
|
+
const v = src[k];
|
|
4304
|
+
const s = typeof v === "string" ? v : typeof (v == null ? void 0 : v.value) === "string" ? v.value : "";
|
|
4305
|
+
if (s.trim()) return s.trim();
|
|
4306
|
+
}
|
|
4307
|
+
return "";
|
|
4308
|
+
};
|
|
4309
|
+
const draftTierKey = ((_f = scopeData.tiers) == null ? void 0 : _f[0]) ? normalizeTierKey(scopeData.tiers[0]) : "tier_1";
|
|
4310
|
+
const draftVariantIdx = editVariantIndex != null ? editVariantIndex : 0;
|
|
4311
|
+
const draftRootPayload = dynamicFormSchema ? PayloadUtils.generatePayloadFromSchema(dynamicFormSchema, draftTierKey, draftVariantIdx).rootPayload : {};
|
|
4312
|
+
const effectiveRuleTitle = pickTitle(draftRootPayload) || pickTitle(dynamicGlobalData) || ruleTitle.trim();
|
|
4313
|
+
const canSaveDraft = !isEditFlow && effectiveRuleTitle.length > 0;
|
|
4285
4314
|
const saveDraftDisabledTooltip = isEditFlow ? "Drafts cannot be saved in Edit Mode." : "Add a learning title before saving a draft.";
|
|
4315
|
+
const hasRequiredFieldsForButton = () => {
|
|
4316
|
+
var _a2, _b2, _c2;
|
|
4317
|
+
if (isEditFlow) return true;
|
|
4318
|
+
const jsonSchema = ((_b2 = (_a2 = useLMSConfigStore.useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _a2.learningMetadataComponents) == null ? void 0 : _b2.teachMe) || ((_c2 = useLMSConfigStore.useTeachMeConfigStore.getState().teachMeConfig) == null ? void 0 : _c2.learningMetadataComponents);
|
|
4319
|
+
return hasRequiredFieldsForCurrentSave(jsonSchema);
|
|
4320
|
+
};
|
|
4286
4321
|
const saveDraft$1 = async () => {
|
|
4287
4322
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
4288
4323
|
if (!canSaveDraft) {
|
|
@@ -4343,8 +4378,8 @@ const InstantLearningModalDynamic = ({
|
|
|
4343
4378
|
}
|
|
4344
4379
|
}
|
|
4345
4380
|
}, [isSaveRule, isAiStreaming]);
|
|
4346
|
-
const editTierKey = ((
|
|
4347
|
-
const editIndex = (
|
|
4381
|
+
const editTierKey = ((_h = ((_g = scopeData == null ? void 0 : scopeData.tiers) == null ? void 0 : _g[0]) || editingTier || "Tier 1") == null ? void 0 : _h.toLowerCase().replace(/ /g, "_")) || "tier_1";
|
|
4382
|
+
const editIndex = (_i = editVariantIndex != null ? editVariantIndex : focusedVariantIndex) != null ? _i : 0;
|
|
4348
4383
|
const isVariantAccordionOpen = editVariantIndex != null;
|
|
4349
4384
|
const currentAccordionData = isVariantAccordionOpen ? structuredAIResponse == null ? void 0 : structuredAIResponse[editIndex] : null;
|
|
4350
4385
|
const activeVariant = structuredAIResponse && (structuredAIResponse == null ? void 0 : structuredAIResponse.find(
|
|
@@ -4442,7 +4477,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4442
4477
|
}
|
|
4443
4478
|
};
|
|
4444
4479
|
const uiStateVariants = isEditFlow ? buildVariantsMap() : {};
|
|
4445
|
-
const marketplaceEditVariantId = instantLearningId && isEditFlow ? "variant_0" in uiStateVariants ? "variant_0" : (
|
|
4480
|
+
const marketplaceEditVariantId = instantLearningId && isEditFlow ? "variant_0" in uiStateVariants ? "variant_0" : (_j = Object.keys(uiStateVariants)[0]) != null ? _j : null : variantIdToBeEdited;
|
|
4446
4481
|
customMetaDataRef.current = {
|
|
4447
4482
|
send_metadata_to_orchestrator: false,
|
|
4448
4483
|
is_draft_flow: isDraftFlow,
|
|
@@ -4453,12 +4488,12 @@ const InstantLearningModalDynamic = ({
|
|
|
4453
4488
|
LearningTerm: useLMSConfigStore.dt("agents.LearningTerm", "Learnings"),
|
|
4454
4489
|
mode_name: baseModeName ? baseModeName : void 0,
|
|
4455
4490
|
x_full_url: buildXFullUrl(),
|
|
4456
|
-
agents_from_ilkb_config: (
|
|
4491
|
+
agents_from_ilkb_config: (_k = useLMSConfigStore.useLMSConfigStore.getState().lmsConfig) == null ? void 0 : _k.agents,
|
|
4457
4492
|
appsecData: {
|
|
4458
|
-
application: (
|
|
4493
|
+
application: (_l = rbacConfig == null ? void 0 : rbacConfig.applicationId) != null ? _l : "",
|
|
4459
4494
|
scopeLevelModuleId: (rbacConfig == null ? void 0 : rbacConfig.moduleId) || "",
|
|
4460
|
-
applicationLevelModuleId: (
|
|
4461
|
-
applicationLevelResourceId: (
|
|
4495
|
+
applicationLevelModuleId: (_m = rbacConfig == null ? void 0 : rbacConfig.applicationModuleId) != null ? _m : "",
|
|
4496
|
+
applicationLevelResourceId: (_n = rbacConfig == null ? void 0 : rbacConfig.applicationResourceId) != null ? _n : ""
|
|
4462
4497
|
},
|
|
4463
4498
|
save_api_payload: (() => {
|
|
4464
4499
|
var _a2, _b2, _c2, _d2;
|
|
@@ -4502,7 +4537,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4502
4537
|
)) == null ? void 0 : _g2.tier_id) || "",
|
|
4503
4538
|
topic_id: null,
|
|
4504
4539
|
scope_id: effectiveRuleSetId,
|
|
4505
|
-
question_title:
|
|
4540
|
+
question_title: effectiveRuleTitle,
|
|
4506
4541
|
variantType: resolveVariantTypeForPayload(
|
|
4507
4542
|
tierKey,
|
|
4508
4543
|
targetIndex,
|
|
@@ -4578,7 +4613,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4578
4613
|
description: config.IL_CONFIG_CONSTANTS.CATEGORY
|
|
4579
4614
|
}
|
|
4580
4615
|
],
|
|
4581
|
-
originalQuestion:
|
|
4616
|
+
originalQuestion: effectiveRuleTitle,
|
|
4582
4617
|
questionId: null,
|
|
4583
4618
|
variantType: resolveVariantTypeForPayload(
|
|
4584
4619
|
tierKey,
|
|
@@ -4727,7 +4762,7 @@ const InstantLearningModalDynamic = ({
|
|
|
4727
4762
|
backward_compatibility: useLearningTemplateStore.useLearningTemplateStore.getState().backwardCompatibility,
|
|
4728
4763
|
ruleset_id: effectiveRuleSetId,
|
|
4729
4764
|
...initialRuleSetId ? { initial_ruleset_id: initialRuleSetId } : {},
|
|
4730
|
-
current_variants_length: editingRule ? Array.isArray(structuredAIResponse) && structuredAIResponse.length > 0 ? Math.max(((
|
|
4765
|
+
current_variants_length: editingRule ? Array.isArray(structuredAIResponse) && structuredAIResponse.length > 0 ? Math.max(((_o = editingRule == null ? void 0 : editingRule.variants) == null ? void 0 : _o.length) || 0, structuredAIResponse.length) : (_p = editingRule == null ? void 0 : editingRule.variants) == null ? void 0 : _p.length : void 0,
|
|
4731
4766
|
tiers: useLearningTemplateStore.useLearningTemplateStore.getState().tiers,
|
|
4732
4767
|
authToken: (user == null ? void 0 : user.accessToken) || "",
|
|
4733
4768
|
...is_publishing && { is_publishing }
|
|
@@ -4989,8 +5024,8 @@ const InstantLearningModalDynamic = ({
|
|
|
4989
5024
|
// JSON-driven operational config (dropdown option sources + host-prefilled
|
|
4990
5025
|
// values). Kept out of uiStateLabels so labels stay label-only; the schema
|
|
4991
5026
|
// renderer / ComponentRegistry read these off uiState.
|
|
4992
|
-
dynamicOptions: (
|
|
4993
|
-
prefilledData: (
|
|
5027
|
+
dynamicOptions: (_q = dynamicFormConfig == null ? void 0 : dynamicFormConfig.dynamicOptions) != null ? _q : {},
|
|
5028
|
+
prefilledData: (_r = dynamicFormConfig == null ? void 0 : dynamicFormConfig.prefilledData) != null ? _r : {},
|
|
4994
5029
|
...ilLabels,
|
|
4995
5030
|
scrollTrigger,
|
|
4996
5031
|
...uiStateLabels,
|
|
@@ -5619,7 +5654,7 @@ const InstantLearningModalDynamic = ({
|
|
|
5619
5654
|
ThinkingBulbIconComponent: /* @__PURE__ */ jsxRuntime.jsx(MockBulbIcon, {}),
|
|
5620
5655
|
customSections: customSections != null ? customSections : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}),
|
|
5621
5656
|
customMetaData: customMetaDataRef,
|
|
5622
|
-
chatTitle: editingRule ? ((
|
|
5657
|
+
chatTitle: editingRule ? ((_s = uiStateLabels == null ? void 0 : uiStateLabels.chatTitleEdit) != null ? _s : configuration.CHAT_TITLE_EDIT).replace("{scope}", (ruleSet == null ? void 0 : ruleSet.ruleSetName) || "") : ((_t = uiStateLabels == null ? void 0 : uiStateLabels.chatTitle) != null ? _t : configuration.CHAT_TITLE).replace("{scope}", (ruleSet == null ? void 0 : ruleSet.ruleSetName) || ""),
|
|
5623
5658
|
formTitle: (uiState == null ? void 0 : uiState.formTitle) || configuration.FORM_TITLE,
|
|
5624
5659
|
showSavedMessage: false,
|
|
5625
5660
|
savedMessage,
|
|
@@ -5650,7 +5685,7 @@ const InstantLearningModalDynamic = ({
|
|
|
5650
5685
|
isFormDirty,
|
|
5651
5686
|
initialChatMessage: editingRule ? getEditRuleChatMessage(
|
|
5652
5687
|
editingRule.ruleTitle || "this rule",
|
|
5653
|
-
((
|
|
5688
|
+
((_u = editingVariants == null ? void 0 : editingVariants[focusedVariantIndex != null ? focusedVariantIndex : 0]) == null ? void 0 : _u.is_user_accepted_risk) === true
|
|
5654
5689
|
) : initialChatMessage != null ? initialChatMessage : configuration.INITIAL_CHAT_MESSAGE,
|
|
5655
5690
|
validateCustom: () => {
|
|
5656
5691
|
var _a2, _b2, _c2;
|
|
@@ -5710,10 +5745,11 @@ const InstantLearningModalDynamic = ({
|
|
|
5710
5745
|
initialDraftMessage,
|
|
5711
5746
|
socketTimeOutInMilliSeconds: configuration.SOCKET_TIMEOUT,
|
|
5712
5747
|
userDetails: {
|
|
5713
|
-
name: `${(
|
|
5714
|
-
id: (
|
|
5715
|
-
email: (
|
|
5716
|
-
}
|
|
5748
|
+
name: `${(_v = user == null ? void 0 : user.firstname) != null ? _v : ""} ${(_w = user == null ? void 0 : user.lastname) != null ? _w : ""}`.trim() || "Guest Userr",
|
|
5749
|
+
id: (_x = user == null ? void 0 : user._id) != null ? _x : "Guest Userr",
|
|
5750
|
+
email: (_y = user == null ? void 0 : user.email) != null ? _y : "guestUserr@example.com"
|
|
5751
|
+
},
|
|
5752
|
+
hasRequiredFields: hasRequiredFieldsForButton
|
|
5717
5753
|
}
|
|
5718
5754
|
),
|
|
5719
5755
|
/* @__PURE__ */ jsxRuntime.jsx(
|