@e-llm-studio/instant-learning 0.1.1-alpha.62 → 0.1.1-alpha.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js +2 -0
- package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js.map +1 -0
- package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +2 -0
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +1 -0
- package/dist/cjs/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/cjs/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
- package/dist/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/features/LearningManagement/assets/Search-result(add new).svg.js +2 -0
- package/dist/features/LearningManagement/assets/Search-result(add new).svg.js.map +1 -0
- package/dist/features/LearningManagement/components/CreateLearningSetModal.js +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +2 -0
- package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +1 -0
- package/dist/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts +12 -0
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map +1 -1
- package/dist/types/src/routes/Routes.d.ts +1 -1
- package/dist/types/src/routes/Routes.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__awaiter as r,__generator as n,__spreadArray as t}from"tslib";import{jsxs as o,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as a,useRef as s,useMemo as u,useEffect as c}from"react";import{Dialog as d,Box as p,Typography as f,IconButton as m,DialogContent as h,CircularProgress as g}from"@mui/material";import{X as v,Search as b,ArrowRight as x}from"lucide-react";import{Toast as S}from"primereact/toast";import{v4 as y}from"uuid";import w from"../../assets/Search-result(add new).svg.js";import C from"../../store/useAuthStore.js";import{IL_CONFIG_CONSTANTS as _}from"../../config.js";import{retrieveGenreScopes as O,fetchStationsByKeyword as F,searchScopes as T,inheritScope as A,deleteRuleSet as N,updateStation as M,createRuleSet as E}from"../../apis/scopeApis.js";import k from"./InputField.js";import D from"./StationAutocomplete.js";import z from"../CardSkeleton.js";import P from"./OnboardingLoader.js";import B from"./TemplateCard.js";var j=[{label:"5am to 7pm",value:"05:00 AM - 7:00 PM"},{label:"6am to 7pm",value:"06:00 AM - 7:00 PM"}],I=[{label:"Low Sellout",value:"Low Sellout"},{label:"High Sellout",value:"High Sellout"},{label:"None",value:""}],L=[{label:"None",value:"None"},{label:"Distribute spots evenly across all breaks in the hour",value:"Distribute spots evenly across all breaks in the hour"}],R=function(R){var W,U=R.isOpen,q=R.onClose,G=R.onBoardStation,Y=R.app_integration_id,H=R.token,K=R.stationNameParam,X=a(null),J=X[0],Q=X[1],V=a([]),Z=V[0],$=V[1],ee=a(0),re=ee[0],ne=ee[1],te=a(!0),oe=te[0],ie=te[1],le=a(!1),ae=le[0],se=le[1],ue=a([]),ce=ue[0],de=ue[1],pe=a(""),fe=pe[0],me=pe[1],he=a(""),ge=he[0],ve=he[1],be=a(!1),xe=be[0],Se=be[1],ye=a(!1),we=ye[0],Ce=ye[1],_e=a(null),Oe=_e[0],Fe=_e[1],Te=a(!1),Ae=Te[0],Ne=Te[1],Me=a(0),Ee=Me[0],ke=Me[1],De=a(""),ze=De[0],Pe=De[1],Be=C().user,je=s(null),Ie=s(null),Le=s(null),Re=s(null),We=a({region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""}),Ue=We[0],qe=We[1],Ge=function(e,r){return e.find(function(e){return e.value===r})||null},Ye=u(function(){return Z.map(function(e){return{label:e.scope_name,value:e.scope_name}})},[Z]),He=u(function(){var e,r,n;if(!Ue.genre)return null;var t=Z.find(function(e){return e.scope_name===Ue.genre});return t?{id:t.id,title:t.scope_name||"Unnamed Template",description:(null===(e=t.description)||void 0===e?void 0:e.trim())||"No description available.",inheritedText:(null===(r=t.inheritance)||void 0===r?void 0:r[0])||void 0,rulesCount:t.rules_count||0,tiersCount:t.tier_count||0,isCopy:null!==(n=t.is_copy)&&void 0!==n&&n}:null},[Ue.genre,Z]);c(function(){return function(){Le.current&&clearTimeout(Le.current)}},[]);var Ke=function(e){return r(void 0,void 0,void 0,function(){var r,o,i;return n(this,function(n){switch(n.label){case 0:if(ae)return[2];se(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,O({limit:"20",offset:String(e)})];case 2:return"success"===(null==(r=n.sent())?void 0:r.status)&&Array.isArray(null==r?void 0:r.data)?(o=r.data,$(function(r){if(0===e)return o;var n=new Set(r.map(function(e){return e.id})),i=o.filter(function(e){return!n.has(e.id)});return t(t([],r,!0),i,!0)}),o.length<20?ie(!1):ie(!0),ne(e+20)):ie(!1),[3,5];case 3:return i=n.sent(),console.error("[StationOnboard] Failed to fetch genre scopes:",i),ie(!1),[3,5];case 4:return se(!1),[7];case 5:return[2]}})})};c(function(){if(U&&($([]),ne(0),ie(!0),Ke(0),K)){Pe(K);r(void 0,void 0,void 0,function(){var e,r,t;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,F(K,!0)];case 1:return!0===(null==(e=n.sent())?void 0:e.success)&&Array.isArray(null==e?void 0:e.data)&&(r=e.data.find(function(e){var r;return(null===(r=e.station_name)||void 0===r?void 0:r.toLowerCase())===K.toLowerCase()&&!e.ruleset_id}),r&&Q(r)),[3,3];case 2:return t=n.sent(),console.error("[StationOnboard] Error auto-selecting station:",t),[3,3];case 3:return[2]}})})}},[U,K]);c(function(){qe(J?function(r){var n;return e(e({},r),{region:null!==(n=J.market)&&void 0!==n?n:""})}:{region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""})},[J]),c(function(){var e=setTimeout(function(){ve(fe)},500);return function(){return clearTimeout(e)}},[fe]),c(function(){r(void 0,void 0,void 0,function(){var e,r,t;return n(this,function(n){switch(n.label){case 0:if(!ge.trim())return de([]),[2];Se(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,T({search_string:ge})];case 2:return"success"===(null==(e=n.sent())?void 0:e.status)&&Array.isArray(null==e?void 0:e.data)?(r=e.data.map(function(e){var r,n,t;return{id:e.id,title:e.scope_name||"Unnamed Template",description:(null===(r=e.description)||void 0===r?void 0:r.trim())||"No description available.",inheritedText:(null===(n=e.inheritance)||void 0===n?void 0:n[0])||void 0,rulesCount:e.rules_count||0,tiersCount:e.tier_count||0,isCopy:null!==(t=e.is_copy)&&void 0!==t&&t}}),de(r)):de([]),[3,5];case 3:return t=n.sent(),console.error("[StationOnboard] Error searching scopes:",t),de([]),[3,5];case 4:return Se(!1),[7];case 5:return[2]}})})},[ge]),c(function(){!ge.trim()&&He&&Fe(He.id)},[ge,He]);var Xe=function(){setTimeout(function(){Re.current&&Re.current.scrollTo({top:Re.current.scrollHeight,behavior:"smooth"})},100)},Je=function(){Pe(""),Q(null),qe({region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""}),de([]),me(""),Fe(null),q()},Qe=function(r,n){var t;if("primeTime"!==r){var o=null!==(t=null==n?void 0:n.value)&&void 0!==t?t:"";qe(function(n){var t;return e(e({},n),((t={})[r]=String(o),t))}),"genre"===r&&(Ce(!0),Le.current&&clearTimeout(Le.current),Le.current=setTimeout(function(){var e=Z.find(function(e){return e.scope_name===o});Fe(e?e.id:null),Ce(!1)},800))}else{var i=(null==n?void 0:n.value)?String(n.value):"";qe(function(r){return e(e({},r),{primeTime:i?[i]:[]})})}},Ve=Boolean(J&&Ue.region&&Ue.primeTime.length>0&&Ue.genre);return o(d,e({open:U,onClose:Je,maxWidth:!1,disableEscapeKeyDown:!0,PaperProps:{sx:{width:"90vw",height:"90vh",borderRadius:"12px",display:"flex",flexDirection:"column",overflow:"hidden"}}},{children:[i(S,{ref:je}),o(p,e({sx:{p:"20px 20px 20px 27px",borderBottom:"1px solid #F0F2F5",display:"flex",justifyContent:"space-between",alignItems:"center",bgcolor:"#fff"}},{children:[o(p,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i(f,e({sx:{fontSize:"18px",fontWeight:600,color:"#19213D"}},{children:"Onboard a Station"})),i(f,e({sx:{fontSize:"16px",fontWeight:400,color:"#666F8D"}},{children:"Onboard a station to start configuring learnings."}))]})),i(m,e({onClick:Je,disabled:Ae,sx:{color:"#19213D"}},{children:i(v,{size:24})}))]})),o(h,e({sx:{p:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"row",overflow:"hidden",position:"relative"}},{children:[i(P,{isLoading:Ae,currentStep:Ee,onComplete:function(){Ne(!1);var e=Ie.current;Je(),G(e||void 0),Ie.current=null}}),o(p,e({sx:{display:"flex",flex:1,paddingY:"14px",paddingX:"20px",gap:3,overflowY:"hidden"}},{children:[o(p,e({ref:Re,sx:{flex:1,bgcolor:"#fff",p:3,borderRadius:"16px",border:"1px solid #F0F2F5",height:"100%",overflowY:"auto"}},{children:[i(f,e({sx:{fontSize:"1rem",fontWeight:600,mb:.5,color:"#19213D"}},{children:"Basic Details"})),i(f,e({sx:{fontSize:"0.75rem",color:"#00000080",mb:"20px"}},{children:"Set up basic station details to unlock AI recommended scopes."})),o(p,e({sx:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[o(p,e({className:"space-y-1.5"},{children:[o("label",e({className:"text-sm font-medium text-[#19213D]"},{children:[i("span",e({className:"mr-0.5 text-xs font-semibold text-[#8F2C23]"},{children:"*"})),"Station Name/Call Letters"]})),i(D,{value:ze,onChange:Pe,onStationSelect:function(e){return Q(e)}})]})),i(k,{required:!0,disabled:!0,label:"Region",placeholder:"Select Region",value:Ue.region||void 0,isSearchable:!1}),i(k,{required:!0,label:"Prime Time Window",placeholder:"Select Prime Time",options:j,value:Ge(j,(null===(W=Ue.primeTime)||void 0===W?void 0:W[0])||""),onOptionChange:function(e){return Qe("primeTime",e)},isSearchable:!1}),i(p,e({onClick:Xe,sx:{width:"100%"}},{children:i(k,{required:!0,label:"Genre",placeholder:"Select Genre",options:Ye,value:Ge(Ye,Ue.genre),onOptionChange:function(e){return Qe("genre",e)},isSearchable:!1,onMenuScrollToBottom:function(){!ae&&oe&&Ke(re)},isLoadingOptions:ae,hasMoreOptions:oe})})),i(p,e({onClick:Xe,sx:{width:"100%"}},{children:i(k,{label:"Station Type",placeholder:"None",options:I,value:Ge(I,Ue.type),onOptionChange:function(r){Qe("type",r),"Low Sellout"!==(null==r?void 0:r.value)&&qe(function(r){return e(e({},r),{lowSelloutConfig:""})})},isSearchable:!1})})),"Low Sellout"===Ue.type&&i(p,e({onClick:Xe,sx:{width:"100%"}},{children:i(k,{label:"Low Sell Out Configurations",placeholder:"Select Configuration",options:L,value:Ge(L,Ue.lowSelloutConfig),onOptionChange:function(e){return Qe("lowSelloutConfig",e)},isSearchable:!1})}))]}))]})),i(p,e({sx:{flex:1,bgcolor:"#fff",p:3,borderRadius:"12px",border:"1px solid #F0F2F5",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto"}},{children:Ue.genre?o(l,{children:[i(f,e({sx:{fontSize:"1rem",fontWeight:500,mb:1.5}},{children:"Matching scope for your station"})),i(p,e({sx:{display:"flex",flexDirection:"column",gap:2,mb:4}},{children:we?i(z,{}):He?i(B,e({},He,{isSelected:Oe===He.id,onSelect:Fe}),He.id):null})),i(f,e({sx:{fontSize:"1rem",fontWeight:500,mb:1.5}},{children:"Other available stations"})),o("div",e({className:"relative mb-4 w-full"},{children:[i("input",{type:"text",value:fe,onChange:function(e){return me(e.target.value)},placeholder:"Search for station...",className:"w-full rounded-lg border border-[#E2E8F0] px-10 py-[7px] text-[12px] outline-none transition-all placeholder:text-[#BAC0CC] focus:border-blue-500 focus:ring-1 focus:ring-blue-500"}),i(b,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",size:16})]})),o(p,e({sx:{display:"flex",flexDirection:"column",gap:2}},{children:[xe&&i(z,{}),!xe&&0===ce.length&&ge.trim()&&o(f,e({sx:{fontSize:"0.875rem",color:"#64748B",textAlign:"center",py:4}},{children:['No scopes found matching "',ge,'".']})),!xe&&ce.map(function(r){return i(B,e({},r,{isSelected:Oe===r.id,onSelect:Fe}),r.id)})]}))]}):o(l,{children:[i(f,e({sx:{fontSize:"1rem",fontWeight:500,mb:1.5}},{children:"Fill in the station details to load AI recommended scopes"})),i(f,e({sx:{fontSize:"0.75rem",color:"#64748B",mb:3}},{children:"AI will recommend the most relevant scope for this station."})),i(p,e({sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:.5,py:10}},{children:i("img",{src:w,alt:"Empty Result"})}))]})}))]}))]})),o(p,e({sx:{p:"12px 20px",borderTop:"1px solid #F0F2F5",display:"flex",justifyContent:"flex-end",gap:2,bgcolor:"#fff"}},{children:[i("button",e({onClick:Je,disabled:Ae,style:{padding:"7px 10px",borderRadius:"6px",color:"#64748B",border:"1px solid #E2E8F0",backgroundColor:"#fff",cursor:"pointer",fontSize:"14px",fontWeight:500}},{children:"Cancel"})),i("button",e({onClick:function(){return r(void 0,void 0,void 0,function(){var r,o,i,l,a,s,u,c,d,p,f,m,h,g,v,b,x,S;return n(this,function(n){switch(n.label){case 0:if(!J||!Oe)return console.error("[StationOnboard] Missing required data for onboarding"),[2];r=He?t([He],ce,!0):ce,o=r.find(function(e){return e.id===Oe}),i=null!==(h=null==o?void 0:o.isCopy)&&void 0!==h&&h,Ne(!0),ke(0),l=null,n.label=1;case 1:return n.trys.push([1,3,,4]),a={topic:"customRuleSet",customScopeGroupName:(null==_?void 0:_.CUSTOM_SCOPE_GROUP_NAME)||"Audacy-Traffic-Manager",scopeDescription:J.station_name||"New Station",parentScopeId:null,customScopeName:J.station_name||"New Station",customScopeId:y(),createByName:(null==Be?void 0:Be.firstname)||"System",createdBy:(null==Be?void 0:Be.email)||"system@audacy.com",applicationMappingId:Y},console.log("[StationOnboard] Step 1: Creating rule set with payload:",a),[4,E(a,H)];case 2:if(s=n.sent(),!(l=null===(g=null==s?void 0:s.data)||void 0===g?void 0:g.scopeId))throw new Error("Failed to create scope - no scopeId returned");return ke(1),[3,4];case 3:return u=n.sent(),console.error("[StationOnboard] Error creating rule set:",u),null===(v=je.current)||void 0===v||v.show({severity:"error",life:3e3,summary:"Error",detail:"Failed to create rule set. Please try again."}),Ne(!1),ke(0),[2];case 4:return n.trys.push([4,6,,11]),c={market:J.market,region:J.region,primetime_windows:Ue.primeTime,genre:Ue.genre,station_type:""===Ue.type?null:Ue.type,low_sellout_configurations:"Low Sellout"===Ue.type?Ue.lowSelloutConfig:null,ruleset_id:l,station_guid:J.station_guid,station_name:J.station_name||"New Station"},console.log("[StationOnboard] Step 2: Updating station with payload:",c),[4,M(c)];case 5:return n.sent(),ke(2),[3,11];case 6:d=n.sent(),console.error("[StationOnboard] Error updating station, rolling back rule set:",d),409===d.status?(null===(b=je.current)||void 0===b||b.show({severity:"error",life:2500,summary:"Error updating station",detail:"Station already Onboarded."}),Q(null),Fe(null),Pe(""),qe(function(r){return e(e({},r),{region:""})})):null===(x=je.current)||void 0===x||x.show({severity:"error",life:2500,summary:"Error updating station",detail:"Please try again."}),n.label=7;case 7:return n.trys.push([7,9,,10]),[4,N(l,H)];case 8:return n.sent(),[3,10];case 9:return p=n.sent(),console.error("[StationOnboard] Failed to rollback rule set deletion:",p),[3,10];case 10:return Ne(!1),ke(0),[2];case 11:return n.trys.push([11,13,,14]),f={source_scope_id:Oe,target_scope_id:l,is_copy_parent_variant_id:i},console.log("[StationOnboard] Step 3: Inheriting scope with payload:",f),[4,A(f)];case 12:return n.sent(),ke(3),[3,14];case 13:return m=n.sent(),console.error("[StationOnboard] Error inheriting scope (no rollback):",m),null===(S=je.current)||void 0===S||S.show({severity:"error",life:3e3,summary:"Error",detail:"Failed to apply rule template. Please try again."}),Ne(!1),ke(0),[2];case 14:return Ie.current=l,[2]}})})},disabled:!Ve||Ae,style:{padding:"7px 10px",borderRadius:"6px",border:"none",backgroundColor:Ve?"#2563EB":"#BFDBFE",color:"#fff",cursor:Ve&&!Ae?"pointer":"not-allowed",fontSize:"14px",fontWeight:500,display:"flex",alignItems:"center",gap:"7px"}},{children:o(l,Ae?{children:[i(g,{size:16,color:"inherit"}),i("span",{children:"Onboarding..."})]}:{children:[i("span",{children:"Onboard Station"}),i(x,{size:16})]})}))]}))]}))};export{R as default};
|
|
2
|
+
//# sourceMappingURL=BackwardStationOnboardModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackwardStationOnboardModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"react";var a={TAB:"tab",RULESET_ID:"rulesetid",OPEN_IL:"openil",ONBOARD_STATION:"onboardstation",VARIANT_ID:"variantid",APPROVAL_ACTION:"approval"},t=function(a){return new URLSearchParams(window.location.search).get(a)},n=function(a){var t=new URLSearchParams(window.location.search);Object.entries(a).forEach(function(a){var n=a[0],o=a[1];null==o||""===o?t.delete(n):t.set(n,o)});var n=t.toString(),o="".concat(window.location.pathname).concat(n?"?".concat(n):"");window.history.replaceState({},"",o)};export{a as QUERY_PARAM_KEYS,t as getQueryParam,n as setQueryParams};
|
|
1
|
+
import"react";var a={TAB:"tab",RULESET_ID:"rulesetid",SECTION:"section",OPEN_IL:"openil",ONBOARD_STATION:"onboardstation",VARIANT_ID:"variantid",APPROVAL_ACTION:"approval"},t=function(a){return new URLSearchParams(window.location.search).get(a)},n=function(a){var t=new URLSearchParams(window.location.search);Object.entries(a).forEach(function(a){var n=a[0],o=a[1];null==o||""===o?t.delete(n):t.set(n,o)});var n=t.toString(),o="".concat(window.location.pathname).concat(n?"?".concat(n):"");window.history.replaceState({},"",o)};export{a as QUERY_PARAM_KEYS,t as getQueryParam,n as setQueryParams};
|
|
2
2
|
//# sourceMappingURL=useLearningTemplateQueryParams.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as t}from"tslib";import{jsx as o,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useState as a,useCallback as i}from"react";import{Lightbulb as s}from"lucide-react";import"../../../features/IL-OTJ/_components/atoms/Textarea/Textarea.js";import"../../../features/IL-OTJ/_components/InputDataReasoningCard.js";import"../../../features/IL-OTJ/_components/TooltipComponent.js";import{TemplateList as l}from"../../../features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import"../../../features/IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../../features/IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../../features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../../features/IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"@viswa-test/test-citation";import"../../../features/LearningManagement/
|
|
1
|
+
import{__assign as e,__spreadArray as t}from"tslib";import{jsx as o,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useState as a,useCallback as i}from"react";import{Lightbulb as s}from"lucide-react";import"../../../features/IL-OTJ/_components/atoms/Textarea/Textarea.js";import"../../../features/IL-OTJ/_components/InputDataReasoningCard.js";import"../../../features/IL-OTJ/_components/TooltipComponent.js";import{TemplateList as l}from"../../../features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import"../../../features/IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../../features/IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../../features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../../features/IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"@viswa-test/test-citation";import"../../../features/LearningManagement/LearningManagement.js";import p from"../../../features/IL-OTJ/_components/AccordianSection.js";import c from"../../../features/IL-OTJ/ILOTJ.js";var u={order_rules:{enabled:!1,global_min_separation_seconds:0},advertiser_rules:{enabled:!1,global_min_separation_seconds:0},inventory_rules:{respect_inventory_code:!1},break_code_rules:{respect_break_code:!1},is_default_enabled:!1},d=[{label:"Global Scope",value:"global"},{label:"Genre Scope",value:"genre"},{label:"Custom Scope",value:"custom"}],m=["Tier 1"],f=function(){var f=a(!0),_=f[0],b=f[1],g=a(""),v=g[0],h=g[1],y=a(""),T=y[0],k=y[1],C=a({station:"",tiers:["Tier 1"]}),L=C[0],w=C[1],A=a([]),I=A[0],x=A[1],O=a([]),S=O[0],j=O[1],N=a(u),J=N[0],D=N[1],W=i(function(t,o){w(function(n){var r;return e(e({},n),((r={})[t]=o,r))})},[]),E=i(function(t,o){D(function(n){var r=e({},n);switch(t){case"order_rules":case"advertiser_rules":r[t]="boolean"==typeof o?e(e({},n[t]),{enabled:o}):{enabled:o.enabled,global_min_separation_seconds:o.global_min_separation_seconds};break;case"inventory_rules":r.inventory_rules={respect_inventory_code:"boolean"==typeof o?o:o.respect_inventory_code};break;case"break_code_rules":r.break_code_rules={respect_break_code:"boolean"==typeof o?o:o.respect_break_code};break;case"is_default_enabled":r.is_default_enabled="boolean"==typeof o?o:!!o}return r})},[]),M=function(e){e(function(e){return t(t([],e,!0),[{id:Date.now(),text:"",reasoning:""}],!1)})},B=function(e,t){e(function(e){return e.filter(function(e){return e.id!==t})})},R=function(t,o,n){t(function(t){return t.map(function(t){return String(t.id)===String(o)?e(e({},t),{text:n}):t})})},U=[e({key:"order_rules",label:"Order"},J.order_rules),e({key:"advertiser_rules",label:"Advertiser"},J.advertiser_rules)],H=[{key:"inventory_rules",label:"Inventory code",enabled:J.inventory_rules.respect_inventory_code},{key:"break_code_rules",label:"Break Code",enabled:J.break_code_rules.respect_break_code},{key:"is_default_enabled",label:"Default Variant",enabled:J.is_default_enabled}];return o(c,{open:_,closeFunction:function(){return b(!1)},chatAssistantName:"defaultAssistant",organizationName:"techolution",baseUrl:"https://devllmstudio.creativeworkspace.ai",baseWebsocketUrl:"wss://devllmstudio.creativeworkspace.ai/graphql",ThinkingBulbIconComponent:o(s,{}),customSections:o(n,{}),isUseNormalChat:!0,chatTitle:"Create New Learning",formTitle:"Learning Details",initialChatMessage:"Hey! How can I assist you?",template:l.BaseTemplate,templateProps:{state:{title:v,description:T,scopeData:L,whenToApplyConditions:I,whenNotToApplyConditions:S,configData:J,citations:[],citation:{}},handlers:{onTitleChange:function(e){var t,o;return h(null!==(o=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)&&void 0!==o?o:e)},onDescriptionChange:function(e){var t,o;return k(null!==(o=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)&&void 0!==o?o:e)},onAddWhenToApply:function(){return M(x)},onRemoveWhenToApply:function(e){return B(x,e)},onEditWhenToApply:function(e,t){return R(x,e,t)},onAddWhenNotToApply:function(){return M(j)},onRemoveWhenNotToApply:function(e){return B(j,e)},onEditWhenNotToApply:function(e,t){return R(j,e,t)},onScopeChange:W,onConfigChange:E},uiState:{showScope:!1,showConfiguration:!0,titleLabel:"Main Rule Name",scopeLabel:"Define Scope",tierLabel:"Select Tier",descriptionLabel:"Learning Explanation",whenToApplyLabel:"Trigger Events (When to Apply)",whenNotToApplyLabel:"Exclusion Events (When NOT to Apply)",configLabel:"Advanced Settings",stationOptions:d,tierOptions:m,separationItems:U,toggles:H},customNodes:{afterDescription:o(p,e({title:{type:"other",label:"Extra Context Panel"}},{children:o("p",e({style:{padding:"12px",fontSize:"14px",color:"#64748b"}},{children:"Because you decoupled the template, I can inject anything I want here without touching BaseTemplate logic!"}))})),afterTitle:r("div",e({style:{marginBottom:"12px",padding:"8px",backgroundColor:"#f0f4ff",borderRadius:"4px"}},{children:[o("strong",{children:"Tip:"})," Use a clear and descriptive title for your rule to make it easily identifiable later."]}))}}})};export{f as default};
|
|
2
2
|
//# sourceMappingURL=DefaultTeachMeRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as t}from"tslib";import{jsx as o,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useState as a,useCallback as i}from"react";import{Lightbulb as
|
|
1
|
+
import{__assign as e,__spreadArray as t}from"tslib";import{jsx as o,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useState as a,useCallback as i}from"react";import{Lightbulb as l}from"lucide-react";import"../../../features/IL-OTJ/_components/atoms/Textarea/Textarea.js";import"../../../features/IL-OTJ/_components/InputDataReasoningCard.js";import"../../../features/IL-OTJ/_components/TooltipComponent.js";import{TemplateList as s}from"../../../features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import"../../../features/IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../../features/IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../../features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../../features/IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"@viswa-test/test-citation";import"../../../features/LearningManagement/LearningManagement.js";import u from"../../../features/IL-OTJ/_components/AccordianSection.js";import p from"../../../features/IL-OTJ/ILOTJ.js";var c={order_rules:{enabled:!1,global_min_separation_seconds:0},advertiser_rules:{enabled:!1,global_min_separation_seconds:0},inventory_rules:{respect_inventory_code:!1},break_code_rules:{respect_break_code:!1},is_default_enabled:!1},d=[{label:"Global Scope",value:"global"},{label:"Genre Scope",value:"genre"},{label:"Custom Scope",value:"custom"}],m=["Tier 1"],_=function(){var _=a(!0),f=_[0],b=_[1],h=a(""),y=h[0],v=h[1],T=a(""),g=T[0],k=T[1],w=a({station:"",tiers:["Tier 1"]}),C=w[0],L=w[1],A=a([]),I=A[0],G=A[1],O=a([]),S=O[0],x=O[1],j=a(c),J=j[0],N=j[1],W=i(function(t,o){L(function(n){var r;return e(e({},n),((r={})[t]=o,r))})},[]),D=i(function(t,o){N(function(n){var r=e({},n);switch(t){case"order_rules":case"advertiser_rules":r[t]="boolean"==typeof o?e(e({},n[t]),{enabled:o}):{enabled:o.enabled,global_min_separation_seconds:o.global_min_separation_seconds};break;case"inventory_rules":r.inventory_rules={respect_inventory_code:"boolean"==typeof o?o:o.respect_inventory_code};break;case"break_code_rules":r.break_code_rules={respect_break_code:"boolean"==typeof o?o:o.respect_break_code};break;case"is_default_enabled":r.is_default_enabled="boolean"==typeof o?o:!!o}return r})},[]),M=function(e){e(function(e){return t(t([],e,!0),[{id:Date.now(),text:"",reasoning:""}],!1)})},B=function(e,t){e(function(e){return e.filter(function(e){return e.id!==t})})},H=function(t,o,n){t(function(t){return t.map(function(t){return String(t.id)===String(o)?e(e({},t),{text:n}):t})})},R=[e({key:"order_rules",label:"Order"},J.order_rules),e({key:"advertiser_rules",label:"Advertiser"},J.advertiser_rules)],q=[{key:"inventory_rules",label:"Inventory code",enabled:J.inventory_rules.respect_inventory_code},{key:"break_code_rules",label:"Break Code",enabled:J.break_code_rules.respect_break_code},{key:"is_default_enabled",label:"Default Variant",enabled:J.is_default_enabled}],z={"Add Guideline":"I would want to add a separation rule","Search Guideline":"I would want to set a max priority rule","Type your query":"I would want to add a break code matching rule"},E="<p><span>Hi! 👋 I'm your Instant Learning Concierge.</span>\n <span>How would you like to get started? You can select an option below or describe the Guideline you’d like to create.</span>\n ".concat(["Add Guideline","Search Guideline","Type your query"].map(function(e){return'<button class="clickable-button" data-value="'.concat(z[e],'">').concat(e,"</button>")}).join(""),"</p>");return o(p,{open:f,closeFunction:function(){return b(!1)},chatAssistantName:"defaultAssistant",organizationName:"techolution",baseUrl:"https://devllmstudio.creativeworkspace.ai",baseWebsocketUrl:"wss://devllmstudio.creativeworkspace.ai/graphql",ThinkingBulbIconComponent:o(l,{}),customSections:o(n,{}),isUseNormalChat:!0,chatTitle:"Create New Guideline",formTitle:"Guideline Details",initialChatMessage:E,template:s.BaseTemplate,templateProps:{state:{title:y,description:g,scopeData:C,whenToApplyConditions:I,whenNotToApplyConditions:S,configData:J,citations:[],citation:{}},handlers:{onTitleChange:function(e){var t,o;return v(null!==(o=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)&&void 0!==o?o:e)},onDescriptionChange:function(e){var t,o;return k(null!==(o=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)&&void 0!==o?o:e)},onAddWhenToApply:function(){return M(G)},onRemoveWhenToApply:function(e){return B(G,e)},onEditWhenToApply:function(e,t){return H(G,e,t)},onAddWhenNotToApply:function(){return M(x)},onRemoveWhenNotToApply:function(e){return B(x,e)},onEditWhenNotToApply:function(e,t){return H(x,e,t)},onScopeChange:W,onConfigChange:D},uiState:{showScope:!1,showConfiguration:!1,titleLabel:"Guideline Name",scopeLabel:"Define Scope",tierLabel:"Select Tier",descriptionLabel:"Guideline Description",whenToApplyLabel:"When to apply this Guideline (When to Apply)",whenNotToApplyLabel:"When not to apply this Guideline (When NOT to Apply)",configLabel:"Advanced Settings",stationOptions:d,tierOptions:m,separationItems:R,toggles:q},customNodes:{afterTitle:o(u,e({title:{type:"other",label:"Guideline"}},{children:o("p",e({style:{padding:"12px",fontSize:"14px",color:"#64748b"}},{children:"HealthCare"}))})),top:r("div",e({style:{marginBottom:"12px",padding:"8px",backgroundColor:"#f0f4ff",borderRadius:"4px"}},{children:[o("strong",{children:"Guideline Template:"})," This is an ILOTJ TeachMe customized for Guideline Value Type"]}))}}})};export{_ as default};
|
|
2
2
|
//# sourceMappingURL=GuidelinesTeachMeRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LearningManagement.d.ts","sourceRoot":"","sources":["../../../../../src/features/LearningManagement/LearningManagement.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAWrC,OAAoB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"LearningManagement.d.ts","sourceRoot":"","sources":["../../../../../src/features/LearningManagement/LearningManagement.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAWrC,OAAoB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA+E9D,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,uBAAuB;IAC/B,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,oBAAoB,EAAE,MAAM,CAAC;KAC9B,CAAA;IACD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;GAGG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,qBAA2B,EAC5B,EAAE,uBAAuB,2CA+iBzB;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface StationOnboardModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onBoardStation: (scopeId?: string) => void;
|
|
6
|
+
app_integration_id?: string;
|
|
7
|
+
token: string;
|
|
8
|
+
stationNameParam?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const BackwardStationOnboardModal: React.FC<StationOnboardModalProps>;
|
|
11
|
+
export default BackwardStationOnboardModal;
|
|
12
|
+
//# sourceMappingURL=BackwardStationOnboardModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackwardStationOnboardModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AA+DpE,UAAU,wBAAwB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAitBnE,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const QUERY_PARAM_KEYS: {
|
|
|
6
6
|
readonly TAB: "tab";
|
|
7
7
|
/** Selected rule set or station ID */
|
|
8
8
|
readonly RULESET_ID: "rulesetid";
|
|
9
|
+
/** Selected content section: | 'history' | 'access' */
|
|
10
|
+
readonly SECTION: "section";
|
|
9
11
|
/** Whether to open the Instant Learning modal automatically */
|
|
10
12
|
readonly OPEN_IL: "openil";
|
|
11
13
|
/** Whether to open the Station Onboarding modal automatically */
|
package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLearningTemplateQueryParams.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/hooks/useLearningTemplateQueryParams.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B,mDAAmD;;IAEnD,sCAAsC;;IAEtC,+DAA+D;;IAE/D,iEAAiE;;IAEjE,wDAAwD;;IAExD,2EAA2E;;CAEnE,CAAC;AAEX;;GAEG;AACH,KAAK,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,MAAM,GAAG,IAGpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,YAAa,OAAO,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAG,IAcvE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;yBAKC,UAAU,GAAG,IAAI;+BAYX,MAAM,GAAG,IAAI;mBAQvB,UAAU,KAAG,IAAI;wBAQZ,MAAM,GAAG,IAAI,KAAG,IAAI;CAU5D,CAAC"}
|
|
1
|
+
{"version":3,"file":"useLearningTemplateQueryParams.d.ts","sourceRoot":"","sources":["../../../../../../src/features/LearningManagement/hooks/useLearningTemplateQueryParams.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B,mDAAmD;;IAEnD,sCAAsC;;IAEtC,uDAAuD;;IAEvD,+DAA+D;;IAE/D,iEAAiE;;IAEjE,wDAAwD;;IAExD,2EAA2E;;CAEnE,CAAC;AAEX;;GAEG;AACH,KAAK,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,MAAM,GAAG,IAGpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,YAAa,OAAO,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAG,IAcvE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;yBAKC,UAAU,GAAG,IAAI;+BAYX,MAAM,GAAG,IAAI;mBAQvB,UAAU,KAAG,IAAI;wBAQZ,MAAM,GAAG,IAAI,KAAG,IAAI;CAU5D,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function AppRouter(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=Routes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Routes.d.ts","sourceRoot":"","sources":["../../../../src/routes/Routes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Routes.d.ts","sourceRoot":"","sources":["../../../../src/routes/Routes.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,SAAS,4CAmBhC"}
|