@e-llm-studio/federated-dashboard-components 1.0.12-human-intel-test → 1.1.12-human-intel-test

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.
@@ -1,2 +1,2 @@
1
- import{__rest as e,__assign as n,__spreadArray as o,__awaiter as i,__generator as a}from"../_virtual/_tslib.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useState as l,useMemo as d}from"react";import{Minimize as s,Maximize as c,ChevronUp as u,ChevronDown as p}from"lucide-react";import h from"./components/LogTable/LogTable.js";import{useHumanIntelligenceController as g}from"./hooks/useHumanIntelligenceController.js";import{useHumanChangesData as m}from"./hooks/useHumanChangesData.js";import f from"./components/LogFilters/LogFilters.js";import v from"./components/LogFilters/LogFilterDropdown.js";import x from"./styles/HumanIntelligence.module.css.js";import{CitationProvider as b,TeachMePlugin as w}from"@e-llm-studio/instant-learning";var y={highestFrequency:"highestFrequency",lowestFrequency:"lowestFrequency"},I=["Positive Impact","No Measurable Impact","Mixed Impact","Negative Impact"],C={positive:{bg:"#ECFDF5",fg:"#065F46"},no_measurable_impact:{bg:"#F3F4F6",fg:"#4B5563"},mixed:{bg:"#FEF3C7",fg:"#92400E"},negative:{bg:"#fef2f2",fg:"#dc2626"},"Positive Impact":{bg:"#ECFDF5",fg:"#065F46"},"No Measurable Impact":{bg:"#F3F4F6",fg:"#4B5563"},"Mixed Impact":{bg:"#FEF3C7",fg:"#92400E"},"Negative Impact ":{bg:"#F3E8E8",fg:"#6B3C3C"}},_={positive:"Positive Impact",no_measurable_impact:"No Measurable Impact",mixed:"Mixed Impact",negative:"Negative Impact"},F={backgroundColor:"#F9FAFB",textAlign:"left",padding:"10px 16px",letterSpacing:"0.01em",color:"#666E7D",fontFamily:"Inter",fontSize:"13px",fontStyle:"normal",fontWeight:"600",lineHeight:"18px"},k={color:"#111827",fontFamily:"Inter",fontSize:"14px",fontStyle:"normal",fontWeight:400,lineHeight:"20px"},S=[{label:"Highest Frequency",value:"highestFrequency"},{label:"Lowest Frequency",value:"lowestFrequency"}];function L(L){var z,N,O,R,A,E,M,D,T,j,H,q,P=this,B=L.configId;L.changeLogConfigId;var W=L.userDetails,U=L.app_integration_id,G=L.teachMeConfig,J=L.getData,K=L.query,$=L.extraColumns,Q=L.filters,V=L.filterDropdown,X=L.table,Y=L.impactLabelOptions,Z=void 0===Y?I:Y,ee=L.impactOptions,ne=L.sortOptions,oe=void 0===ne?S:ne,ie=L.rejectLearningApi,ae=L.generateLearningApi,te=L.config,re=L.className,le=L.style,de=L.isMaximized,se=L.defaultIsMaximized,ce=void 0!==se&&se,ue=L.onMaximizedChange,pe=L.isTableOpen,he=L.defaultIsTableOpen,ge=void 0===he||he,me=L.onTableOpenChange,fe=L.footerActions,ve=L.modeId,xe=e(L,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),be=null==W?void 0:W.accessToken,we=l(ge),ye=we[0],Ie=we[1],Ce=void 0!==pe?pe:ye,_e=l(!1),Fe=_e[0],ke=_e[1],Se=l(null),Le=Se[0],ze=Se[1],Ne=l(!1),Oe=Ne[0],Re=Ne[1],Ae=l(""),Ee=Ae[0],Me=Ae[1],De=l(null),Te=De[0],je=De[1],He=function(e,o,i){return void 0===o&&(o=5e3),void 0===i&&(i=100),new Promise(function(a){var t=Date.now(),r=function(){var l,d,s=null!==(l=e.raw)&&void 0!==l?l:e,c=null!==(d=null==s?void 0:s.scopeId)&&void 0!==d?d:e.scopeId;c||Date.now()-t>=o?a(n(n({},e),{scopeId:c,raw:s?n(n({},s),{scopeId:c}):s})):setTimeout(r,i)};r()})},qe=l(ce),Pe=qe[0],Be=qe[1],We=void 0!==de?de:Pe,Ue=l("");Ue[0];var Ge=Ue[1],Je=l(!1);Je[0];var Ke=Je[1],$e=function(e,n,o,t){return i(P,void 0,void 0,function(){var i,r,l,d,s,c,u,p,h,g;return a(this,function(a){switch(a.label){case 0:if(!o)throw new Error("A learning action API configuration is required to submit this action.");if(i=null!==(c=e.raw)&&void 0!==c?c:e,!(r=null!==(p=null!==(u=i.humanChangeId)&&void 0!==u?u:e.humanChangeId)&&void 0!==p?p:e.id))throw new Error("The selected row is missing humanChangeId.");return l=null!==(g=null!==(h=o.baseUrl)&&void 0!==h?h:null==J?void 0:J.baseUrl)&&void 0!==g?g:"",d="".concat(l.replace(/\/$/,""),"/").concat(o.endpoint.replace(/^\//,"")),[4,fetch(d,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({humanIntelligentConfigId:B,human_change_id:r,review_status:n,reviewed_by_name:(null==W?void 0:W.firstname)+" "+(null==W?void 0:W.lastname),reviewed_by_email:null==W?void 0:W.email,human_change_feedback:t})})];case 1:if(!(s=a.sent()).ok)throw new Error("Learning action failed: ".concat(s.status," ").concat(s.statusText));return[2]}})})},Qe=function(){Re(!1),Me(""),je(null)},Ve=g({initialImpactRange:void 0}),Xe=Ve.keyword,Ye=Ve.searchInput,Ze=Ve.dateRange,en=Ve.sort,nn=Ve.filterOpen,on=Ve.draftImpactLabels,an=Ve.closeFilterPanel,tn=Ve.toggleFilterPanel,rn=Ve.setDraftImpactLabels,ln=Ve.selectedImpactLabels,dn=Ve.handleSearchChange,sn=Ve.handleDateChange,cn=Ve.handleSortChange,un=Ve.handleApplyFilters,pn=Ve.handleResetFilters,hn=d(function(){var e,n={scopeId:null!==(e=null==K?void 0:K.scopeId)&&void 0!==e?e:[],content:Xe||void 0,overallImpact:(null==ln?void 0:ln.length)?ln:void 0};return en&&(n.orderBy=y[en]),n},[null==K?void 0:K.scopeId,Xe,ln,en]),gn=!(!(null==J?void 0:J.baseUrl)||!(null==J?void 0:J.endpoint)),mn=m({baseUrl:gn?null==J?void 0:J.baseUrl:void 0,endpoint:gn?null==J?void 0:J.endpoint:void 0,humanChangeConfigId:B,eventId:null==K?void 0:K.eventId,filters:hn,pageSize:null!==(z=null==K?void 0:K.paginationLimit)&&void 0!==z?z:12}),fn=mn.rows,vn=mn.loading,xn=mn.loadingMore,bn=mn.hasMore,wn=mn.fetchMore,yn=mn.refetch,In=d(function(){return[{key:"humanChangePatterns",header:"Human Changes Pattern",style:{width:"55%"},headerStyle:F,body:function(e){var o,i=e;return t("div",n({style:k},{children:null!==(o=null==i?void 0:i.title)&&void 0!==o?o:"—"}))}},{key:"frequency",header:"Frequency",style:{width:"20%"},headerStyle:F,body:function(e){var o,i=e;return t("div",n({style:k},{children:null!==(o=null==i?void 0:i.frequency)&&void 0!==o?o:"—"}))}},{key:"overAllImpact",header:"Overall Impact",style:{width:"25%"},headerStyle:F,body:function(e){var o=e,i=function(e){var n;return e?null!==(n=_[e])&&void 0!==n?n:e:void 0}(null==o?void 0:o.impactLabel),a=(null==o?void 0:o.impactLabel)&&C[o.impactLabel]||{bg:"#F3F4F6",fg:"#4B5563"};return t("div",n({style:{backgroundColor:a.bg,color:a.fg,padding:"3px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:500,width:"fit-content"}},{children:i||"—"}))}}]},[]),Cn=d(function(){var e=o([],In,!0);return null==$||$.forEach(function(n){var o=e.findIndex(function(e){return e.key===n.key});-1!==o?e[o]=n:e.push(n)}),e},[In,$]);return console.log(null!==(R=null===(O=null!==(N=null==Le?void 0:Le.raw)&&void 0!==N?N:Le)||void 0===O?void 0:O.scopeId)&&void 0!==R?R:null==Le?void 0:Le.scopeId,Le,"ruleSetId debug"),r("div",n({className:"human-changes-wrapper ".concat(We?"human-changes-wrapper--maximized":""," ").concat(re||"").trim()},xe,{style:n(n({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},We?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:9999,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px"}),le)},{children:[t("style",{children:"\n /* Scoped size container so the header responds to the component's own\n width, not the viewport. Kept off the root wrapper on purpose: size\n containment would trap the position:fixed maximized/modal layers. */\n .human-changes-wrapper .human-changes-header-container {\n container-type: inline-size;\n width: 100%;\n }\n\n /* ---------- header layout ---------- */\n .human-changes-wrapper .human-changes-header {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px 24px;\n width: 100%;\n }\n\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 220px;\n min-width: 0;\n order: 1;\n }\n\n .human-changes-wrapper .human-changes-header__title {\n margin: 0;\n padding-bottom: 2px;\n font-family: Inter;\n font-size: 18px;\n font-weight: 600;\n color: #0F172A;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__description {\n margin: 0;\n font-family: Inter;\n font-size: 13px;\n color: #64748B;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 2;\n min-width: 0;\n ".concat((null==te?void 0:te.showHeader)?"flex: 0 1 auto;":"flex: 1 1 240px;","\n }\n\n .human-changes-wrapper .human-changes-header__toggles {\n order: 3;\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 0 0 auto;\n margin-left: auto;\n }\n\n /* ---------- toolbar (search / filter / sort) ---------- */\n .human-changes-wrapper .log-toolbar {\n width: 100%;\n min-width: 0;\n // flex-wrap: wrap;\n gap: 12px;\n }\n .human-changes-wrapper .log-toolbar__search {\n ").concat((null==te?void 0:te.showHeader)?"flex: 0 1 260px; width: auto; min-width: 160px;":"flex: 1 1 240px; width: auto; min-width: 160px;","\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 0 0 auto;\n }\n .human-changes-wrapper .log-toolbar__btn {\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n /* ---------- narrow container: title keeps the toggles, toolbar drops\n to its own full-width row instead of colliding with the title ---------- */\n ").concat((null==te?void 0:te.showHeader)?"\n @container (max-width: 900px) {\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 3;\n flex: 1 1 100%;\n }\n .human-changes-wrapper .human-changes-header__toggles {\n order: 2;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 240px;\n }\n }":"","\n\n /* ---------- very narrow: search takes a full row, filters below ---------- */\n @container (max-width: 480px) {\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__btn {\n flex: 1 1 auto;\n justify-content: center;\n }\n }\n ")}),t("div",n({className:"human-changes-header-container"},{children:r("div",n({className:"human-changes-header"},{children:[(null==te?void 0:te.showHeader)&&r("div",n({className:"human-changes-header__titles"},{children:[t("h2",n({className:"human-changes-header__title",title:te.title||"Human Changes"},{children:te.title||"Human Changes"})),t("p",n({className:"human-changes-header__description",title:te.description||"Recurring scheduling patterns identified from human changes."},{children:te.description||"Recurring scheduling patterns identified from human changes."}))]})),t("div",n({className:"human-changes-header__toolbar"},{children:t(f,n({},Q,{config:n(n({showFilterButton:!0},null==Q?void 0:Q.config),{sortOptions:null!==(E=null===(A=null==Q?void 0:Q.config)||void 0===A?void 0:A.sortOptions)&&void 0!==E?E:oe}),value:n({search:Ye,dateRange:Ze,sort:en},null==Q?void 0:Q.value),onChange:n({onSearch:function(e){var n,o;dn(e),null===(o=null===(n=null==Q?void 0:Q.onChange)||void 0===n?void 0:n.onSearch)||void 0===o||o.call(n,e)},onDate:sn,onSort:cn},null==Q?void 0:Q.onChange),filterActive:ln.length>0,onOpenFilter:function(){var e;tn(),null===(e=null==Q?void 0:Q.onOpenFilter)||void 0===e||e.call(Q)}}))})),((null==te?void 0:te.showMaximizeToggle)||(null==te?void 0:te.showAccordionToggle))&&r("div",n({className:"human-changes-header__toggles"},{children:[(null==te?void 0:te.showMaximizeToggle)&&t("button",n({onClick:function(){var e=!We;void 0===de&&Be(e),null==ue||ue(e)},"aria-label":We?"Restore":"Maximize",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:t(We?s:c,{size:16})})),(null==te?void 0:te.showAccordionToggle)&&t("button",n({onClick:function(){var e=!Ce;void 0===pe&&Ie(e),null==me||me(e)},"aria-label":Ce?"Collapse table":"Expand table",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:t(Ce?u:p,{size:16})}))]}))]}))})),Ce&&t(h,n({},X,{renderExpandedRow:(null==X?void 0:X.renderExpandedRow)?function(e,o){var i,a,l,d,s,c,u,p,h=!1!==(null===(i=null==fe?void 0:fe.primary)||void 0===i?void 0:i.show)||!1!==(null===(a=null==fe?void 0:fe.secondary)||void 0===a?void 0:a.show);return r("div",n({style:{display:"flex",flexDirection:"column"}},{children:[X.renderExpandedRow(e,o),h&&r("div",n({className:x.footerActionContainer},{children:[!1!==(null===(l=null==fe?void 0:fe.secondary)||void 0===l?void 0:l.show)&&t("button",n({className:"".concat(x.footerActionSecondary," ").concat((null===(d=null==fe?void 0:fe.secondary)||void 0===d?void 0:d.className)||"").trim(),onClick:o.rejectLearning},{children:(null===(s=null==fe?void 0:fe.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(c=null==fe?void 0:fe.primary)||void 0===c?void 0:c.show)&&t("button",n({className:"".concat(x.footerActionPrimary," ").concat((null===(u=null==fe?void 0:fe.primary)||void 0===u?void 0:u.className)||"").trim(),onClick:o.generateLearning},{children:(null===(p=null==fe?void 0:fe.primary)||void 0===p?void 0:p.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(e){return i(P,void 0,void 0,function(){return a(this,function(n){return je(e),Re(!0),[2]})})},onGenerateLearning:function(e){return i(P,void 0,void 0,function(){var n,o;return a(this,function(i){switch(i.label){case 0:Ke(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,He(e)];case 2:return n=i.sent(),Ge("generate order seperation rule of 15 mins with no exemptions in Tier 1"),ze(n),ke(!0),[3,5];case 3:return o=i.sent(),console.error(o),[3,5];case 4:return Ke(!1),[7];case 5:return[2]}})})},columns:Cn,rows:fn,headerStyle:F,headerClassName:"audit-header",loading:vn,loadingMore:xn,hasMore:bn,onLoadMore:function(){null==wn||wn()}})),!1!==(null==te?void 0:te.showSidebar)&&t(v,n({},V,{visible:nn,onHide:function(){var e;an(),null===(e=null==V?void 0:V.onHide)||void 0===e||e.call(V)},impactOptions:null!==(D=null!==(M=null==V?void 0:V.impactOptions)&&void 0!==M?M:ee)&&void 0!==D?D:Z.map(function(e){return{label:e,value:e}}),selectedImpacts:on,onImpactChange:function(e){var n;rn(e),null===(n=null==V?void 0:V.onImpactChange)||void 0===n||n.call(V,e)},onApply:function(){var e;un(),null===(e=null==V?void 0:V.onApply)||void 0===e||e.call(V)},onReset:function(){var e;pn(),null===(e=null==V?void 0:V.onReset)||void 0===e||e.call(V)}})),r(b,{children:[Oe&&t("div",n({style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(15, 23, 42, 0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},onClick:Qe},{children:r("div",n({onClick:function(e){return e.stopPropagation()},style:{background:"#fff",borderRadius:"12px",padding:"20px 24px",width:"360px",boxShadow:"0 10px 30px rgba(0,0,0,0.2)",display:"flex",flexDirection:"column",gap:"12px",fontFamily:"Inter"}},{children:[t("h3",n({style:{margin:0,fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:"Reject learning"})),t("p",n({style:{margin:0,fontSize:"13px",color:"#64748B"}},{children:"Optionally add a reason before rejecting this learning."})),t("input",{type:"text",value:Ee,onChange:function(e){return Me(e.target.value)},placeholder:"Enter feedback (optional)...",style:{padding:"8px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",fontSize:"14px",fontFamily:"Inter",outline:"none"},autoFocus:!0}),r("div",n({style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"4px"}},{children:[t("button",n({onClick:Qe,style:{padding:"8px 14px",borderRadius:"8px",border:"1px solid #E2E8F0",background:"#fff",color:"#374151",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Cancel"})),t("button",n({onClick:function(){return i(P,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),[4,$e(Te||{},"rejected",ie,Ee)];case 1:return n.sent(),[3,4];case 2:return e=n.sent(),console.error(e),[3,4];case 3:return Re(!1),Me(""),je(null),[7];case 4:return[2]}})})},style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:"#111827",color:"#fff",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Submit"}))]}))]}))})),t(w,{isOpen:Fe,onClose:function(){ke(!1),ze(null),Ge(""),yn()},app_integration_id:U,token:be,mode:"ADD",config:G,pluginPayload:{modeId:ve,initialDraftMessage:"Add a new learning with the following details:Rule Title: Advertiser SeparationDescription: Maintains a minimum separation of 6 minutes between ads from the same advertiser.When to apply: When the Advertiser Name is Grocery Outlet or Mediabase OR When the Break Code is LINERWhen NOT to apply: When the Advertiser Name is Grocery Outlet and the Break Code is LINERTier information: Tier 2",postSaveCallback:function(){$e(Le||{},"accepted",ae)},ruleSet:{ruleSetId:"01a04927-769b-7ded-99b9-41c29779601d"}}},null!==(q=null!==(H=null===(j=null!==(T=null==Le?void 0:Le.raw)&&void 0!==T?T:Le)||void 0===j?void 0:j.scopeId)&&void 0!==H?H:null==Le?void 0:Le.scopeId)&&void 0!==q?q:"pending")]})]}))}export{L as default};
1
+ import{__rest as e,__assign as n,__spreadArray as o,__awaiter as i,__generator as a}from"../_virtual/_tslib.js";import{jsx as t,jsxs as l}from"react/jsx-runtime";import{useState as r,useMemo as d}from"react";import{Minimize as s,Maximize as c,ChevronUp as u,ChevronDown as p}from"lucide-react";import h from"./components/LogTable/LogTable.js";import{useHumanIntelligenceController as g}from"./hooks/useHumanIntelligenceController.js";import{useHumanChangesData as f}from"./hooks/useHumanChangesData.js";import m from"./components/LogFilters/LogFilters.js";import v from"./components/LogFilters/LogFilterDropdown.js";import x from"./styles/HumanIntelligence.module.css.js";import{CitationProvider as b,TeachMePlugin as w}from"@e-llm-studio/instant-learning";var y={highestFrequency:"highestFrequency",lowestFrequency:"lowestFrequency"},I=["Positive Impact","No Measurable Impact","Mixed Impact","Negative Impact"],_={positive:{bg:"#ECFDF5",fg:"#065F46"},no_measurable_impact:{bg:"#F3F4F6",fg:"#4B5563"},mixed:{bg:"#FEF3C7",fg:"#92400E"},negative:{bg:"#fef2f2",fg:"#dc2626"},"Positive Impact":{bg:"#ECFDF5",fg:"#065F46"},"No Measurable Impact":{bg:"#F3F4F6",fg:"#4B5563"},"Mixed Impact":{bg:"#FEF3C7",fg:"#92400E"},"Negative Impact ":{bg:"#F3E8E8",fg:"#6B3C3C"}},C={positive:"Positive Impact",no_measurable_impact:"No Measurable Impact",mixed:"Mixed Impact",negative:"Negative Impact"},F={backgroundColor:"#F9FAFB",textAlign:"left",padding:"10px 16px",letterSpacing:"0.01em",color:"#666E7D",fontFamily:"Inter",fontSize:"13px",fontStyle:"normal",fontWeight:"600",lineHeight:"18px"},k={color:"#111827",fontFamily:"Inter",fontSize:"14px",fontStyle:"normal",fontWeight:400,lineHeight:"20px"},S=[{label:"Highest Frequency",value:"highestFrequency"},{label:"Lowest Frequency",value:"lowestFrequency"}];function z(z){var L,E,M,O,R,A,N,j,D,T,H,q,P,B,W,U=this,G=z.configId;z.changeLogConfigId;var J=z.userDetails,K=z.app_integration_id,$=z.teachMeConfig,Q=z.getData,V=z.query,X=z.extraColumns,Y=z.filters,Z=z.filterDropdown,ee=z.table,ne=z.impactLabelOptions,oe=void 0===ne?I:ne,ie=z.impactOptions,ae=z.sortOptions,te=void 0===ae?S:ae,le=z.rejectLearningApi,re=z.generateLearningApi,de=z.config,se=z.className,ce=z.style,ue=z.isMaximized,pe=z.defaultIsMaximized,he=void 0!==pe&&pe,ge=z.onMaximizedChange,fe=z.isTableOpen,me=z.defaultIsTableOpen,ve=void 0===me||me,xe=z.onTableOpenChange,be=z.footerActions,we=z.modeId,ye=e(z,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),Ie=null==J?void 0:J.accessToken,_e=r(ve),Ce=_e[0],Fe=_e[1],ke=void 0!==fe?fe:Ce,Se=r(!1),ze=Se[0],Le=Se[1],Ee=r(null),Me=Ee[0],Oe=Ee[1],Re=r(!1),Ae=Re[0],Ne=Re[1],je=r(""),De=je[0],Te=je[1],He=r(null),qe=He[0],Pe=He[1],Be=function(e,o,i){return void 0===o&&(o=5e3),void 0===i&&(i=100),new Promise(function(a){var t=Date.now(),l=function(){var r,d,s=null!==(r=e.raw)&&void 0!==r?r:e,c=null!==(d=null==s?void 0:s.scopeId)&&void 0!==d?d:e.scopeId;c||Date.now()-t>=o?a(n(n({},e),{scopeId:c,raw:s?n(n({},s),{scopeId:c}):s})):setTimeout(l,i)};l()})},We=r(he),Ue=We[0],Ge=We[1],Je=void 0!==ue?ue:Ue,Ke=r("");Ke[0];var $e=Ke[1],Qe=r(!1);Qe[0];var Ve=Qe[1],Xe=function(e,n,o,t){return i(U,void 0,void 0,function(){var i,l,r,d,s,c,u,p,h,g;return a(this,function(a){switch(a.label){case 0:if(!o)throw new Error("A learning action API configuration is required to submit this action.");if(i=null!==(c=e.raw)&&void 0!==c?c:e,!(l=null!==(p=null!==(u=i.humanChangeId)&&void 0!==u?u:e.humanChangeId)&&void 0!==p?p:e.id))throw new Error("The selected row is missing humanChangeId.");return r=null!==(g=null!==(h=o.baseUrl)&&void 0!==h?h:null==Q?void 0:Q.baseUrl)&&void 0!==g?g:"",d="".concat(r.replace(/\/$/,""),"/").concat(o.endpoint.replace(/^\//,"")),[4,fetch(d,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({humanIntelligentConfigId:G,human_change_id:l,review_status:n,reviewed_by_name:(null==J?void 0:J.firstname)+" "+(null==J?void 0:J.lastname),reviewed_by_email:null==J?void 0:J.email,human_change_feedback:t})})];case 1:if(!(s=a.sent()).ok)throw new Error("Learning action failed: ".concat(s.status," ").concat(s.statusText));return[2]}})})},Ye=function(){Ne(!1),Te(""),Pe(null)},Ze=g({initialImpactRange:void 0}),en=Ze.keyword,nn=Ze.searchInput,on=Ze.dateRange,an=Ze.sort,tn=Ze.filterOpen,ln=Ze.draftImpactLabels,rn=Ze.closeFilterPanel,dn=Ze.toggleFilterPanel,sn=Ze.setDraftImpactLabels,cn=Ze.selectedImpactLabels,un=Ze.handleSearchChange,pn=Ze.handleDateChange,hn=Ze.handleSortChange,gn=Ze.handleApplyFilters,fn=Ze.handleResetFilters,mn=d(function(){var e,n={scopeId:null!==(e=null==V?void 0:V.scopeId)&&void 0!==e?e:[],content:en||void 0,overallImpact:(null==cn?void 0:cn.length)?cn:void 0};return an&&(n.orderBy=y[an]),n},[null==V?void 0:V.scopeId,en,cn,an]),vn=!(!(null==Q?void 0:Q.baseUrl)||!(null==Q?void 0:Q.endpoint)),xn=f({baseUrl:vn?null==Q?void 0:Q.baseUrl:void 0,endpoint:vn?null==Q?void 0:Q.endpoint:void 0,humanChangeConfigId:G,eventId:null==V?void 0:V.eventId,filters:mn,pageSize:null!==(L=null==V?void 0:V.paginationLimit)&&void 0!==L?L:12}),bn=xn.rows,wn=xn.loading,yn=xn.loadingMore,In=xn.hasMore,_n=xn.fetchMore,Cn=xn.refetch,Fn=d(function(){return[{key:"humanChangePatterns",header:"Human Changes Pattern",style:{width:"55%"},headerStyle:F,body:function(e){var o,i=e;return t("div",n({style:k},{children:null!==(o=null==i?void 0:i.title)&&void 0!==o?o:"—"}))}},{key:"frequency",header:"Frequency",style:{width:"20%"},headerStyle:F,body:function(e){var o,i=e;return t("div",n({style:k},{children:null!==(o=null==i?void 0:i.frequency)&&void 0!==o?o:"—"}))}},{key:"overAllImpact",header:"Overall Impact",style:{width:"25%"},headerStyle:F,body:function(e){var o=e,i=function(e){var n;return e?null!==(n=C[e])&&void 0!==n?n:e:void 0}(null==o?void 0:o.impactLabel),a=(null==o?void 0:o.impactLabel)&&_[o.impactLabel]||{bg:"#F3F4F6",fg:"#4B5563"};return t("div",n({style:{backgroundColor:a.bg,color:a.fg,padding:"3px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:500,width:"fit-content"}},{children:i||"—"}))}}]},[]),kn=d(function(){var e=o([],Fn,!0);return null==X||X.forEach(function(n){var o=e.findIndex(function(e){return e.key===n.key});-1!==o?e[o]=n:e.push(n)}),e},[Fn,X]);return console.log(null!==(O=null===(M=null!==(E=null==Me?void 0:Me.raw)&&void 0!==E?E:Me)||void 0===M?void 0:M.scopeId)&&void 0!==O?O:null==Me?void 0:Me.scopeId,Me,"ruleSetId debug"),l("div",n({className:"human-changes-wrapper ".concat(Je?"human-changes-wrapper--maximized":""," ").concat(se||"").trim()},ye,{style:n(n({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},Je?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:9999,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px"}),ce)},{children:[t("style",{children:"\n /* Scoped size container so the header responds to the component's own\n width, not the viewport. Kept off the root wrapper on purpose: size\n containment would trap the position:fixed maximized/modal layers. */\n .human-changes-wrapper .human-changes-header-container {\n container-type: inline-size;\n width: 100%;\n }\n\n /* ---------- header layout ---------- */\n .human-changes-wrapper .human-changes-header {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px 24px;\n width: 100%;\n }\n\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 220px;\n min-width: 0;\n order: 1;\n }\n\n .human-changes-wrapper .human-changes-header__title {\n margin: 0;\n padding-bottom: 2px;\n font-family: Inter;\n font-size: 18px;\n font-weight: 600;\n color: #0F172A;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__description {\n margin: 0;\n font-family: Inter;\n font-size: 13px;\n color: #64748B;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 2;\n min-width: 0;\n ".concat((null==de?void 0:de.showHeader)?"flex: 0 1 auto;":"flex: 1 1 240px;","\n }\n\n .human-changes-wrapper .human-changes-header__toggles {\n order: 3;\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 0 0 auto;\n margin-left: auto;\n }\n\n /* ---------- toolbar (search / filter / sort) ---------- */\n .human-changes-wrapper .log-toolbar {\n width: 100%;\n min-width: 0;\n // flex-wrap: wrap;\n gap: 12px;\n }\n .human-changes-wrapper .log-toolbar__search {\n ").concat((null==de?void 0:de.showHeader)?"flex: 0 1 260px; width: auto; min-width: 160px;":"flex: 1 1 240px; width: auto; min-width: 160px;","\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 0 0 auto;\n }\n .human-changes-wrapper .log-toolbar__btn {\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n /* ---------- narrow container: title keeps the toggles, toolbar drops\n to its own full-width row instead of colliding with the title ---------- */\n ").concat((null==de?void 0:de.showHeader)?"\n @container (max-width: 900px) {\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 3;\n flex: 1 1 100%;\n }\n .human-changes-wrapper .human-changes-header__toggles {\n order: 2;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 240px;\n }\n }":"","\n\n /* ---------- very narrow: search takes a full row, filters below ---------- */\n @container (max-width: 480px) {\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__btn {\n flex: 1 1 auto;\n justify-content: center;\n }\n }\n ")}),t("div",n({className:"human-changes-header-container"},{children:l("div",n({className:"human-changes-header"},{children:[(null==de?void 0:de.showHeader)&&l("div",n({className:"human-changes-header__titles"},{children:[t("h2",n({className:"human-changes-header__title",title:de.title||"Human Changes"},{children:de.title||"Human Changes"})),t("p",n({className:"human-changes-header__description",title:de.description||"Recurring scheduling patterns identified from human changes."},{children:de.description||"Recurring scheduling patterns identified from human changes."}))]})),t("div",n({className:"human-changes-header__toolbar"},{children:t(m,n({},Y,{config:n(n({showFilterButton:!0},null==Y?void 0:Y.config),{sortOptions:null!==(A=null===(R=null==Y?void 0:Y.config)||void 0===R?void 0:R.sortOptions)&&void 0!==A?A:te}),value:n({search:nn,dateRange:on,sort:an},null==Y?void 0:Y.value),onChange:n({onSearch:function(e){var n,o;un(e),null===(o=null===(n=null==Y?void 0:Y.onChange)||void 0===n?void 0:n.onSearch)||void 0===o||o.call(n,e)},onDate:pn,onSort:hn},null==Y?void 0:Y.onChange),filterActive:cn.length>0,onOpenFilter:function(){var e;dn(),null===(e=null==Y?void 0:Y.onOpenFilter)||void 0===e||e.call(Y)}}))})),((null==de?void 0:de.showMaximizeToggle)||(null==de?void 0:de.showAccordionToggle))&&l("div",n({className:"human-changes-header__toggles"},{children:[(null==de?void 0:de.showMaximizeToggle)&&t("button",n({onClick:function(){var e=!Je;void 0===ue&&Ge(e),null==ge||ge(e)},"aria-label":Je?"Restore":"Maximize",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:t(Je?s:c,{size:16})})),(null==de?void 0:de.showAccordionToggle)&&t("button",n({onClick:function(){var e=!ke;void 0===fe&&Fe(e),null==xe||xe(e)},"aria-label":ke?"Collapse table":"Expand table",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:t(ke?u:p,{size:16})}))]}))]}))})),ke&&t(h,n({},ee,{renderExpandedRow:(null==ee?void 0:ee.renderExpandedRow)?function(e,o){var i,a,r,d,s,c,u,p,h=!1!==(null===(i=null==be?void 0:be.primary)||void 0===i?void 0:i.show)||!1!==(null===(a=null==be?void 0:be.secondary)||void 0===a?void 0:a.show);return l("div",n({style:{display:"flex",flexDirection:"column"}},{children:[ee.renderExpandedRow(e,o),h&&l("div",n({className:x.footerActionContainer},{children:[!1!==(null===(r=null==be?void 0:be.secondary)||void 0===r?void 0:r.show)&&t("button",n({className:"".concat(x.footerActionSecondary," ").concat((null===(d=null==be?void 0:be.secondary)||void 0===d?void 0:d.className)||"").trim(),onClick:o.rejectLearning},{children:(null===(s=null==be?void 0:be.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(c=null==be?void 0:be.primary)||void 0===c?void 0:c.show)&&t("button",n({className:"".concat(x.footerActionPrimary," ").concat((null===(u=null==be?void 0:be.primary)||void 0===u?void 0:u.className)||"").trim(),onClick:o.generateLearning},{children:(null===(p=null==be?void 0:be.primary)||void 0===p?void 0:p.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(e){return i(U,void 0,void 0,function(){return a(this,function(n){return Pe(e),Ne(!0),[2]})})},onGenerateLearning:function(e){return i(U,void 0,void 0,function(){var n,o;return a(this,function(i){switch(i.label){case 0:Ve(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,Be(e)];case 2:return n=i.sent(),$e("generate order seperation rule of 15 mins with no exemptions in Tier 1"),Oe(n),Le(!0),[3,5];case 3:return o=i.sent(),console.error(o),[3,5];case 4:return Ve(!1),[7];case 5:return[2]}})})},columns:kn,rows:bn,headerStyle:F,headerClassName:"audit-header",loading:wn,loadingMore:yn,hasMore:In,onLoadMore:function(){null==_n||_n()}})),!1!==(null==de?void 0:de.showSidebar)&&t(v,n({},Z,{visible:tn,onHide:function(){var e;rn(),null===(e=null==Z?void 0:Z.onHide)||void 0===e||e.call(Z)},impactOptions:null!==(j=null!==(N=null==Z?void 0:Z.impactOptions)&&void 0!==N?N:ie)&&void 0!==j?j:oe.map(function(e){return{label:e,value:e}}),selectedImpacts:ln,onImpactChange:function(e){var n;sn(e),null===(n=null==Z?void 0:Z.onImpactChange)||void 0===n||n.call(Z,e)},onApply:function(){var e;gn(),null===(e=null==Z?void 0:Z.onApply)||void 0===e||e.call(Z)},onReset:function(){var e;fn(),null===(e=null==Z?void 0:Z.onReset)||void 0===e||e.call(Z)}})),l(b,{children:[Ae&&t("div",n({style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(15, 23, 42, 0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},onClick:Ye},{children:l("div",n({onClick:function(e){return e.stopPropagation()},style:{background:"#fff",borderRadius:"12px",padding:"20px 24px",width:"360px",boxShadow:"0 10px 30px rgba(0,0,0,0.2)",display:"flex",flexDirection:"column",gap:"12px",fontFamily:"Inter"}},{children:[t("h3",n({style:{margin:0,fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:"Reject learning"})),t("p",n({style:{margin:0,fontSize:"13px",color:"#64748B"}},{children:"Optionally add a reason before rejecting this learning."})),t("input",{type:"text",value:De,onChange:function(e){return Te(e.target.value)},placeholder:"Enter feedback (optional)...",style:{padding:"8px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",fontSize:"14px",fontFamily:"Inter",outline:"none"},autoFocus:!0}),l("div",n({style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"4px"}},{children:[t("button",n({onClick:Ye,style:{padding:"8px 14px",borderRadius:"8px",border:"1px solid #E2E8F0",background:"#fff",color:"#374151",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Cancel"})),t("button",n({onClick:function(){return i(U,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),[4,Xe(qe||{},"rejected",le,De)];case 1:return n.sent(),[3,4];case 2:return e=n.sent(),console.error(e),[3,4];case 3:return Ne(!1),Te(""),Pe(null),[7];case 4:return[2]}})})},style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:"#111827",color:"#fff",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Submit"}))]}))]}))})),t(w,{isOpen:ze,onClose:function(){Le(!1),Oe(null),$e(""),Cn()},app_integration_id:K,token:Ie,mode:"ADD",config:$,pluginPayload:{modeId:we,initialDraftMessage:null==Me?void 0:Me.summary,postSaveCallback:function(){Xe(Me||{},"accepted",re)},ruleSet:{ruleSetId:null!==(H=null===(T=null!==(D=null==Me?void 0:Me.raw)&&void 0!==D?D:Me)||void 0===T?void 0:T.scopeId)&&void 0!==H?H:null==Me?void 0:Me.scopeId}}},null!==(W=null!==(B=null===(P=null!==(q=null==Me?void 0:Me.raw)&&void 0!==q?q:Me)||void 0===P?void 0:P.scopeId)&&void 0!==B?B:null==Me?void 0:Me.scopeId)&&void 0!==W?W:"pending")]})]}))}export{z as default};
2
2
  //# sourceMappingURL=HumanChangesTableWrapper.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_tslib.js"),n=require("react/jsx-runtime"),i=require("react"),a=require("lucide-react"),o=require("./components/LogTable/LogTable.js"),t=require("./hooks/useHumanIntelligenceController.js"),r=require("./hooks/useHumanChangesData.js"),l=require("./components/LogFilters/LogFilters.js"),s=require("./components/LogFilters/LogFilterDropdown.js"),d=require("./styles/HumanIntelligence.module.css.js"),c=require("@e-llm-studio/instant-learning"),u={highestFrequency:"highestFrequency",lowestFrequency:"lowestFrequency"},h=["Positive Impact","No Measurable Impact","Mixed Impact","Negative Impact"],p={positive:{bg:"#ECFDF5",fg:"#065F46"},no_measurable_impact:{bg:"#F3F4F6",fg:"#4B5563"},mixed:{bg:"#FEF3C7",fg:"#92400E"},negative:{bg:"#fef2f2",fg:"#dc2626"},"Positive Impact":{bg:"#ECFDF5",fg:"#065F46"},"No Measurable Impact":{bg:"#F3F4F6",fg:"#4B5563"},"Mixed Impact":{bg:"#FEF3C7",fg:"#92400E"},"Negative Impact ":{bg:"#F3E8E8",fg:"#6B3C3C"}},g={positive:"Positive Impact",no_measurable_impact:"No Measurable Impact",mixed:"Mixed Impact",negative:"Negative Impact"},f={backgroundColor:"#F9FAFB",textAlign:"left",padding:"10px 16px",letterSpacing:"0.01em",color:"#666E7D",fontFamily:"Inter",fontSize:"13px",fontStyle:"normal",fontWeight:"600",lineHeight:"18px"},v={color:"#111827",fontFamily:"Inter",fontSize:"14px",fontStyle:"normal",fontWeight:400,lineHeight:"20px"},m=[{label:"Highest Frequency",value:"highestFrequency"},{label:"Lowest Frequency",value:"lowestFrequency"}];exports.default=function(x){var _,w,b,y,I,C,F,j,S,k,z,M,L=this,O=x.configId;x.changeLogConfigId;var A=x.userDetails,N=x.app_integration_id,R=x.teachMeConfig,E=x.getData,q=x.query,D=x.extraColumns,T=x.filters,H=x.filterDropdown,P=x.table,B=x.impactLabelOptions,W=void 0===B?h:B,U=x.impactOptions,G=x.sortOptions,J=void 0===G?m:G,K=x.rejectLearningApi,$=x.generateLearningApi,Q=x.config,V=x.className,X=x.style,Y=x.isMaximized,Z=x.defaultIsMaximized,ee=void 0!==Z&&Z,ne=x.onMaximizedChange,ie=x.isTableOpen,ae=x.defaultIsTableOpen,oe=void 0===ae||ae,te=x.onTableOpenChange,re=x.footerActions,le=x.modeId,se=e.__rest(x,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),de=null==A?void 0:A.accessToken,ce=i.useState(oe),ue=ce[0],he=ce[1],pe=void 0!==ie?ie:ue,ge=i.useState(!1),fe=ge[0],ve=ge[1],me=i.useState(null),xe=me[0],_e=me[1],we=i.useState(!1),be=we[0],ye=we[1],Ie=i.useState(""),Ce=Ie[0],Fe=Ie[1],je=i.useState(null),Se=je[0],ke=je[1],ze=function(n,i,a){return void 0===i&&(i=5e3),void 0===a&&(a=100),new Promise(function(o){var t=Date.now(),r=function(){var l,s,d=null!==(l=n.raw)&&void 0!==l?l:n,c=null!==(s=null==d?void 0:d.scopeId)&&void 0!==s?s:n.scopeId;c||Date.now()-t>=i?o(e.__assign(e.__assign({},n),{scopeId:c,raw:d?e.__assign(e.__assign({},d),{scopeId:c}):d})):setTimeout(r,a)};r()})},Me=i.useState(ee),Le=Me[0],Oe=Me[1],Ae=void 0!==Y?Y:Le,Ne=i.useState("");Ne[0];var Re=Ne[1],Ee=i.useState(!1);Ee[0];var qe=Ee[1],De=function(n,i,a,o){return e.__awaiter(L,void 0,void 0,function(){var t,r,l,s,d,c,u,h,p,g;return e.__generator(this,function(e){switch(e.label){case 0:if(!a)throw new Error("A learning action API configuration is required to submit this action.");if(t=null!==(c=n.raw)&&void 0!==c?c:n,!(r=null!==(h=null!==(u=t.humanChangeId)&&void 0!==u?u:n.humanChangeId)&&void 0!==h?h:n.id))throw new Error("The selected row is missing humanChangeId.");return l=null!==(g=null!==(p=a.baseUrl)&&void 0!==p?p:null==E?void 0:E.baseUrl)&&void 0!==g?g:"",s="".concat(l.replace(/\/$/,""),"/").concat(a.endpoint.replace(/^\//,"")),[4,fetch(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({humanIntelligentConfigId:O,human_change_id:r,review_status:i,reviewed_by_name:(null==A?void 0:A.firstname)+" "+(null==A?void 0:A.lastname),reviewed_by_email:null==A?void 0:A.email,human_change_feedback:o})})];case 1:if(!(d=e.sent()).ok)throw new Error("Learning action failed: ".concat(d.status," ").concat(d.statusText));return[2]}})})},Te=function(){ye(!1),Fe(""),ke(null)},He=t.useHumanIntelligenceController({initialImpactRange:void 0}),Pe=He.keyword,Be=He.searchInput,We=He.dateRange,Ue=He.sort,Ge=He.filterOpen,Je=He.draftImpactLabels,Ke=He.closeFilterPanel,$e=He.toggleFilterPanel,Qe=He.setDraftImpactLabels,Ve=He.selectedImpactLabels,Xe=He.handleSearchChange,Ye=He.handleDateChange,Ze=He.handleSortChange,en=He.handleApplyFilters,nn=He.handleResetFilters,an=i.useMemo(function(){var e,n={scopeId:null!==(e=null==q?void 0:q.scopeId)&&void 0!==e?e:[],content:Pe||void 0,overallImpact:(null==Ve?void 0:Ve.length)?Ve:void 0};return Ue&&(n.orderBy=u[Ue]),n},[null==q?void 0:q.scopeId,Pe,Ve,Ue]),on=!(!(null==E?void 0:E.baseUrl)||!(null==E?void 0:E.endpoint)),tn=r.useHumanChangesData({baseUrl:on?null==E?void 0:E.baseUrl:void 0,endpoint:on?null==E?void 0:E.endpoint:void 0,humanChangeConfigId:O,eventId:null==q?void 0:q.eventId,filters:an,pageSize:null!==(_=null==q?void 0:q.paginationLimit)&&void 0!==_?_:12}),rn=tn.rows,ln=tn.loading,sn=tn.loadingMore,dn=tn.hasMore,cn=tn.fetchMore,un=tn.refetch,hn=i.useMemo(function(){return[{key:"humanChangePatterns",header:"Human Changes Pattern",style:{width:"55%"},headerStyle:f,body:function(i){var a,o=i;return n.jsx("div",e.__assign({style:v},{children:null!==(a=null==o?void 0:o.title)&&void 0!==a?a:"—"}))}},{key:"frequency",header:"Frequency",style:{width:"20%"},headerStyle:f,body:function(i){var a,o=i;return n.jsx("div",e.__assign({style:v},{children:null!==(a=null==o?void 0:o.frequency)&&void 0!==a?a:"—"}))}},{key:"overAllImpact",header:"Overall Impact",style:{width:"25%"},headerStyle:f,body:function(i){var a=i,o=function(e){var n;return e?null!==(n=g[e])&&void 0!==n?n:e:void 0}(null==a?void 0:a.impactLabel),t=(null==a?void 0:a.impactLabel)&&p[a.impactLabel]||{bg:"#F3F4F6",fg:"#4B5563"};return n.jsx("div",e.__assign({style:{backgroundColor:t.bg,color:t.fg,padding:"3px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:500,width:"fit-content"}},{children:o||"—"}))}}]},[]),pn=i.useMemo(function(){var n=e.__spreadArray([],hn,!0);return null==D||D.forEach(function(e){var i=n.findIndex(function(n){return n.key===e.key});-1!==i?n[i]=e:n.push(e)}),n},[hn,D]);return console.log(null!==(y=null===(b=null!==(w=null==xe?void 0:xe.raw)&&void 0!==w?w:xe)||void 0===b?void 0:b.scopeId)&&void 0!==y?y:null==xe?void 0:xe.scopeId,xe,"ruleSetId debug"),n.jsxs("div",e.__assign({className:"human-changes-wrapper ".concat(Ae?"human-changes-wrapper--maximized":""," ").concat(V||"").trim()},se,{style:e.__assign(e.__assign({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},Ae?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:9999,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px"}),X)},{children:[n.jsx("style",{children:"\n /* Scoped size container so the header responds to the component's own\n width, not the viewport. Kept off the root wrapper on purpose: size\n containment would trap the position:fixed maximized/modal layers. */\n .human-changes-wrapper .human-changes-header-container {\n container-type: inline-size;\n width: 100%;\n }\n\n /* ---------- header layout ---------- */\n .human-changes-wrapper .human-changes-header {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px 24px;\n width: 100%;\n }\n\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 220px;\n min-width: 0;\n order: 1;\n }\n\n .human-changes-wrapper .human-changes-header__title {\n margin: 0;\n padding-bottom: 2px;\n font-family: Inter;\n font-size: 18px;\n font-weight: 600;\n color: #0F172A;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__description {\n margin: 0;\n font-family: Inter;\n font-size: 13px;\n color: #64748B;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 2;\n min-width: 0;\n ".concat((null==Q?void 0:Q.showHeader)?"flex: 0 1 auto;":"flex: 1 1 240px;","\n }\n\n .human-changes-wrapper .human-changes-header__toggles {\n order: 3;\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 0 0 auto;\n margin-left: auto;\n }\n\n /* ---------- toolbar (search / filter / sort) ---------- */\n .human-changes-wrapper .log-toolbar {\n width: 100%;\n min-width: 0;\n // flex-wrap: wrap;\n gap: 12px;\n }\n .human-changes-wrapper .log-toolbar__search {\n ").concat((null==Q?void 0:Q.showHeader)?"flex: 0 1 260px; width: auto; min-width: 160px;":"flex: 1 1 240px; width: auto; min-width: 160px;","\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 0 0 auto;\n }\n .human-changes-wrapper .log-toolbar__btn {\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n /* ---------- narrow container: title keeps the toggles, toolbar drops\n to its own full-width row instead of colliding with the title ---------- */\n ").concat((null==Q?void 0:Q.showHeader)?"\n @container (max-width: 900px) {\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 3;\n flex: 1 1 100%;\n }\n .human-changes-wrapper .human-changes-header__toggles {\n order: 2;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 240px;\n }\n }":"","\n\n /* ---------- very narrow: search takes a full row, filters below ---------- */\n @container (max-width: 480px) {\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__btn {\n flex: 1 1 auto;\n justify-content: center;\n }\n }\n ")}),n.jsx("div",e.__assign({className:"human-changes-header-container"},{children:n.jsxs("div",e.__assign({className:"human-changes-header"},{children:[(null==Q?void 0:Q.showHeader)&&n.jsxs("div",e.__assign({className:"human-changes-header__titles"},{children:[n.jsx("h2",e.__assign({className:"human-changes-header__title",title:Q.title||"Human Changes"},{children:Q.title||"Human Changes"})),n.jsx("p",e.__assign({className:"human-changes-header__description",title:Q.description||"Recurring scheduling patterns identified from human changes."},{children:Q.description||"Recurring scheduling patterns identified from human changes."}))]})),n.jsx("div",e.__assign({className:"human-changes-header__toolbar"},{children:n.jsx(l.default,e.__assign({},T,{config:e.__assign(e.__assign({showFilterButton:!0},null==T?void 0:T.config),{sortOptions:null!==(C=null===(I=null==T?void 0:T.config)||void 0===I?void 0:I.sortOptions)&&void 0!==C?C:J}),value:e.__assign({search:Be,dateRange:We,sort:Ue},null==T?void 0:T.value),onChange:e.__assign({onSearch:function(e){var n,i;Xe(e),null===(i=null===(n=null==T?void 0:T.onChange)||void 0===n?void 0:n.onSearch)||void 0===i||i.call(n,e)},onDate:Ye,onSort:Ze},null==T?void 0:T.onChange),filterActive:Ve.length>0,onOpenFilter:function(){var e;$e(),null===(e=null==T?void 0:T.onOpenFilter)||void 0===e||e.call(T)}}))})),((null==Q?void 0:Q.showMaximizeToggle)||(null==Q?void 0:Q.showAccordionToggle))&&n.jsxs("div",e.__assign({className:"human-changes-header__toggles"},{children:[(null==Q?void 0:Q.showMaximizeToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!Ae;void 0===Y&&Oe(e),null==ne||ne(e)},"aria-label":Ae?"Restore":"Maximize",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:Ae?n.jsx(a.Minimize,{size:16}):n.jsx(a.Maximize,{size:16})})),(null==Q?void 0:Q.showAccordionToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!pe;void 0===ie&&he(e),null==te||te(e)},"aria-label":pe?"Collapse table":"Expand table",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:pe?n.jsx(a.ChevronUp,{size:16}):n.jsx(a.ChevronDown,{size:16})}))]}))]}))})),pe&&n.jsx(o.default,e.__assign({},P,{renderExpandedRow:(null==P?void 0:P.renderExpandedRow)?function(i,a){var o,t,r,l,s,c,u,h,p=!1!==(null===(o=null==re?void 0:re.primary)||void 0===o?void 0:o.show)||!1!==(null===(t=null==re?void 0:re.secondary)||void 0===t?void 0:t.show);return n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[P.renderExpandedRow(i,a),p&&n.jsxs("div",e.__assign({className:d.default.footerActionContainer},{children:[!1!==(null===(r=null==re?void 0:re.secondary)||void 0===r?void 0:r.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionSecondary," ").concat((null===(l=null==re?void 0:re.secondary)||void 0===l?void 0:l.className)||"").trim(),onClick:a.rejectLearning},{children:(null===(s=null==re?void 0:re.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(c=null==re?void 0:re.primary)||void 0===c?void 0:c.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionPrimary," ").concat((null===(u=null==re?void 0:re.primary)||void 0===u?void 0:u.className)||"").trim(),onClick:a.generateLearning},{children:(null===(h=null==re?void 0:re.primary)||void 0===h?void 0:h.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(n){return e.__awaiter(L,void 0,void 0,function(){return e.__generator(this,function(e){return ke(n),ye(!0),[2]})})},onGenerateLearning:function(n){return e.__awaiter(L,void 0,void 0,function(){var i,a;return e.__generator(this,function(e){switch(e.label){case 0:qe(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,ze(n)];case 2:return i=e.sent(),Re("generate order seperation rule of 15 mins with no exemptions in Tier 1"),_e(i),ve(!0),[3,5];case 3:return a=e.sent(),console.error(a),[3,5];case 4:return qe(!1),[7];case 5:return[2]}})})},columns:pn,rows:rn,headerStyle:f,headerClassName:"audit-header",loading:ln,loadingMore:sn,hasMore:dn,onLoadMore:function(){null==cn||cn()}})),!1!==(null==Q?void 0:Q.showSidebar)&&n.jsx(s.default,e.__assign({},H,{visible:Ge,onHide:function(){var e;Ke(),null===(e=null==H?void 0:H.onHide)||void 0===e||e.call(H)},impactOptions:null!==(j=null!==(F=null==H?void 0:H.impactOptions)&&void 0!==F?F:U)&&void 0!==j?j:W.map(function(e){return{label:e,value:e}}),selectedImpacts:Je,onImpactChange:function(e){var n;Qe(e),null===(n=null==H?void 0:H.onImpactChange)||void 0===n||n.call(H,e)},onApply:function(){var e;en(),null===(e=null==H?void 0:H.onApply)||void 0===e||e.call(H)},onReset:function(){var e;nn(),null===(e=null==H?void 0:H.onReset)||void 0===e||e.call(H)}})),n.jsxs(c.CitationProvider,{children:[be&&n.jsx("div",e.__assign({style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(15, 23, 42, 0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},onClick:Te},{children:n.jsxs("div",e.__assign({onClick:function(e){return e.stopPropagation()},style:{background:"#fff",borderRadius:"12px",padding:"20px 24px",width:"360px",boxShadow:"0 10px 30px rgba(0,0,0,0.2)",display:"flex",flexDirection:"column",gap:"12px",fontFamily:"Inter"}},{children:[n.jsx("h3",e.__assign({style:{margin:0,fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:"Reject learning"})),n.jsx("p",e.__assign({style:{margin:0,fontSize:"13px",color:"#64748B"}},{children:"Optionally add a reason before rejecting this learning."})),n.jsx("input",{type:"text",value:Ce,onChange:function(e){return Fe(e.target.value)},placeholder:"Enter feedback (optional)...",style:{padding:"8px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",fontSize:"14px",fontFamily:"Inter",outline:"none"},autoFocus:!0}),n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"4px"}},{children:[n.jsx("button",e.__assign({onClick:Te,style:{padding:"8px 14px",borderRadius:"8px",border:"1px solid #E2E8F0",background:"#fff",color:"#374151",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Cancel"})),n.jsx("button",e.__assign({onClick:function(){return e.__awaiter(L,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),[4,De(Se||{},"rejected",K,Ce)];case 1:return e.sent(),[3,4];case 2:return n=e.sent(),console.error(n),[3,4];case 3:return ye(!1),Fe(""),ke(null),[7];case 4:return[2]}})})},style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:"#111827",color:"#fff",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Submit"}))]}))]}))})),n.jsx(c.TeachMePlugin,{isOpen:fe,onClose:function(){ve(!1),_e(null),Re(""),un()},app_integration_id:N,token:de,mode:"ADD",config:R,pluginPayload:{modeId:le,initialDraftMessage:"Add a new learning with the following details:Rule Title: Advertiser SeparationDescription: Maintains a minimum separation of 6 minutes between ads from the same advertiser.When to apply: When the Advertiser Name is Grocery Outlet or Mediabase OR When the Break Code is LINERWhen NOT to apply: When the Advertiser Name is Grocery Outlet and the Break Code is LINERTier information: Tier 2",postSaveCallback:function(){De(xe||{},"accepted",$)},ruleSet:{ruleSetId:"01a04927-769b-7ded-99b9-41c29779601d"}}},null!==(M=null!==(z=null===(k=null!==(S=null==xe?void 0:xe.raw)&&void 0!==S?S:xe)||void 0===k?void 0:k.scopeId)&&void 0!==z?z:null==xe?void 0:xe.scopeId)&&void 0!==M?M:"pending")]})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_tslib.js"),n=require("react/jsx-runtime"),i=require("react"),a=require("lucide-react"),o=require("./components/LogTable/LogTable.js"),t=require("./hooks/useHumanIntelligenceController.js"),l=require("./hooks/useHumanChangesData.js"),r=require("./components/LogFilters/LogFilters.js"),s=require("./components/LogFilters/LogFilterDropdown.js"),d=require("./styles/HumanIntelligence.module.css.js"),c=require("@e-llm-studio/instant-learning"),u={highestFrequency:"highestFrequency",lowestFrequency:"lowestFrequency"},p=["Positive Impact","No Measurable Impact","Mixed Impact","Negative Impact"],h={positive:{bg:"#ECFDF5",fg:"#065F46"},no_measurable_impact:{bg:"#F3F4F6",fg:"#4B5563"},mixed:{bg:"#FEF3C7",fg:"#92400E"},negative:{bg:"#fef2f2",fg:"#dc2626"},"Positive Impact":{bg:"#ECFDF5",fg:"#065F46"},"No Measurable Impact":{bg:"#F3F4F6",fg:"#4B5563"},"Mixed Impact":{bg:"#FEF3C7",fg:"#92400E"},"Negative Impact ":{bg:"#F3E8E8",fg:"#6B3C3C"}},g={positive:"Positive Impact",no_measurable_impact:"No Measurable Impact",mixed:"Mixed Impact",negative:"Negative Impact"},v={backgroundColor:"#F9FAFB",textAlign:"left",padding:"10px 16px",letterSpacing:"0.01em",color:"#666E7D",fontFamily:"Inter",fontSize:"13px",fontStyle:"normal",fontWeight:"600",lineHeight:"18px"},f={color:"#111827",fontFamily:"Inter",fontSize:"14px",fontStyle:"normal",fontWeight:400,lineHeight:"20px"},m=[{label:"Highest Frequency",value:"highestFrequency"},{label:"Lowest Frequency",value:"lowestFrequency"}];exports.default=function(x){var _,w,b,y,I,C,F,j,S,k,z,M,L,q,O,A=this,D=x.configId;x.changeLogConfigId;var E=x.userDetails,R=x.app_integration_id,N=x.teachMeConfig,T=x.getData,H=x.query,P=x.extraColumns,B=x.filters,U=x.filterDropdown,W=x.table,G=x.impactLabelOptions,J=void 0===G?p:G,K=x.impactOptions,$=x.sortOptions,Q=void 0===$?m:$,V=x.rejectLearningApi,X=x.generateLearningApi,Y=x.config,Z=x.className,ee=x.style,ne=x.isMaximized,ie=x.defaultIsMaximized,ae=void 0!==ie&&ie,oe=x.onMaximizedChange,te=x.isTableOpen,le=x.defaultIsTableOpen,re=void 0===le||le,se=x.onTableOpenChange,de=x.footerActions,ce=x.modeId,ue=e.__rest(x,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),pe=null==E?void 0:E.accessToken,he=i.useState(re),ge=he[0],ve=he[1],fe=void 0!==te?te:ge,me=i.useState(!1),xe=me[0],_e=me[1],we=i.useState(null),be=we[0],ye=we[1],Ie=i.useState(!1),Ce=Ie[0],Fe=Ie[1],je=i.useState(""),Se=je[0],ke=je[1],ze=i.useState(null),Me=ze[0],Le=ze[1],qe=function(n,i,a){return void 0===i&&(i=5e3),void 0===a&&(a=100),new Promise(function(o){var t=Date.now(),l=function(){var r,s,d=null!==(r=n.raw)&&void 0!==r?r:n,c=null!==(s=null==d?void 0:d.scopeId)&&void 0!==s?s:n.scopeId;c||Date.now()-t>=i?o(e.__assign(e.__assign({},n),{scopeId:c,raw:d?e.__assign(e.__assign({},d),{scopeId:c}):d})):setTimeout(l,a)};l()})},Oe=i.useState(ae),Ae=Oe[0],De=Oe[1],Ee=void 0!==ne?ne:Ae,Re=i.useState("");Re[0];var Ne=Re[1],Te=i.useState(!1);Te[0];var He=Te[1],Pe=function(n,i,a,o){return e.__awaiter(A,void 0,void 0,function(){var t,l,r,s,d,c,u,p,h,g;return e.__generator(this,function(e){switch(e.label){case 0:if(!a)throw new Error("A learning action API configuration is required to submit this action.");if(t=null!==(c=n.raw)&&void 0!==c?c:n,!(l=null!==(p=null!==(u=t.humanChangeId)&&void 0!==u?u:n.humanChangeId)&&void 0!==p?p:n.id))throw new Error("The selected row is missing humanChangeId.");return r=null!==(g=null!==(h=a.baseUrl)&&void 0!==h?h:null==T?void 0:T.baseUrl)&&void 0!==g?g:"",s="".concat(r.replace(/\/$/,""),"/").concat(a.endpoint.replace(/^\//,"")),[4,fetch(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({humanIntelligentConfigId:D,human_change_id:l,review_status:i,reviewed_by_name:(null==E?void 0:E.firstname)+" "+(null==E?void 0:E.lastname),reviewed_by_email:null==E?void 0:E.email,human_change_feedback:o})})];case 1:if(!(d=e.sent()).ok)throw new Error("Learning action failed: ".concat(d.status," ").concat(d.statusText));return[2]}})})},Be=function(){Fe(!1),ke(""),Le(null)},Ue=t.useHumanIntelligenceController({initialImpactRange:void 0}),We=Ue.keyword,Ge=Ue.searchInput,Je=Ue.dateRange,Ke=Ue.sort,$e=Ue.filterOpen,Qe=Ue.draftImpactLabels,Ve=Ue.closeFilterPanel,Xe=Ue.toggleFilterPanel,Ye=Ue.setDraftImpactLabels,Ze=Ue.selectedImpactLabels,en=Ue.handleSearchChange,nn=Ue.handleDateChange,an=Ue.handleSortChange,on=Ue.handleApplyFilters,tn=Ue.handleResetFilters,ln=i.useMemo(function(){var e,n={scopeId:null!==(e=null==H?void 0:H.scopeId)&&void 0!==e?e:[],content:We||void 0,overallImpact:(null==Ze?void 0:Ze.length)?Ze:void 0};return Ke&&(n.orderBy=u[Ke]),n},[null==H?void 0:H.scopeId,We,Ze,Ke]),rn=!(!(null==T?void 0:T.baseUrl)||!(null==T?void 0:T.endpoint)),sn=l.useHumanChangesData({baseUrl:rn?null==T?void 0:T.baseUrl:void 0,endpoint:rn?null==T?void 0:T.endpoint:void 0,humanChangeConfigId:D,eventId:null==H?void 0:H.eventId,filters:ln,pageSize:null!==(_=null==H?void 0:H.paginationLimit)&&void 0!==_?_:12}),dn=sn.rows,cn=sn.loading,un=sn.loadingMore,pn=sn.hasMore,hn=sn.fetchMore,gn=sn.refetch,vn=i.useMemo(function(){return[{key:"humanChangePatterns",header:"Human Changes Pattern",style:{width:"55%"},headerStyle:v,body:function(i){var a,o=i;return n.jsx("div",e.__assign({style:f},{children:null!==(a=null==o?void 0:o.title)&&void 0!==a?a:"—"}))}},{key:"frequency",header:"Frequency",style:{width:"20%"},headerStyle:v,body:function(i){var a,o=i;return n.jsx("div",e.__assign({style:f},{children:null!==(a=null==o?void 0:o.frequency)&&void 0!==a?a:"—"}))}},{key:"overAllImpact",header:"Overall Impact",style:{width:"25%"},headerStyle:v,body:function(i){var a=i,o=function(e){var n;return e?null!==(n=g[e])&&void 0!==n?n:e:void 0}(null==a?void 0:a.impactLabel),t=(null==a?void 0:a.impactLabel)&&h[a.impactLabel]||{bg:"#F3F4F6",fg:"#4B5563"};return n.jsx("div",e.__assign({style:{backgroundColor:t.bg,color:t.fg,padding:"3px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:500,width:"fit-content"}},{children:o||"—"}))}}]},[]),fn=i.useMemo(function(){var n=e.__spreadArray([],vn,!0);return null==P||P.forEach(function(e){var i=n.findIndex(function(n){return n.key===e.key});-1!==i?n[i]=e:n.push(e)}),n},[vn,P]);return console.log(null!==(y=null===(b=null!==(w=null==be?void 0:be.raw)&&void 0!==w?w:be)||void 0===b?void 0:b.scopeId)&&void 0!==y?y:null==be?void 0:be.scopeId,be,"ruleSetId debug"),n.jsxs("div",e.__assign({className:"human-changes-wrapper ".concat(Ee?"human-changes-wrapper--maximized":""," ").concat(Z||"").trim()},ue,{style:e.__assign(e.__assign({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},Ee?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:9999,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px"}),ee)},{children:[n.jsx("style",{children:"\n /* Scoped size container so the header responds to the component's own\n width, not the viewport. Kept off the root wrapper on purpose: size\n containment would trap the position:fixed maximized/modal layers. */\n .human-changes-wrapper .human-changes-header-container {\n container-type: inline-size;\n width: 100%;\n }\n\n /* ---------- header layout ---------- */\n .human-changes-wrapper .human-changes-header {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px 24px;\n width: 100%;\n }\n\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 220px;\n min-width: 0;\n order: 1;\n }\n\n .human-changes-wrapper .human-changes-header__title {\n margin: 0;\n padding-bottom: 2px;\n font-family: Inter;\n font-size: 18px;\n font-weight: 600;\n color: #0F172A;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__description {\n margin: 0;\n font-family: Inter;\n font-size: 13px;\n color: #64748B;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 2;\n min-width: 0;\n ".concat((null==Y?void 0:Y.showHeader)?"flex: 0 1 auto;":"flex: 1 1 240px;","\n }\n\n .human-changes-wrapper .human-changes-header__toggles {\n order: 3;\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 0 0 auto;\n margin-left: auto;\n }\n\n /* ---------- toolbar (search / filter / sort) ---------- */\n .human-changes-wrapper .log-toolbar {\n width: 100%;\n min-width: 0;\n // flex-wrap: wrap;\n gap: 12px;\n }\n .human-changes-wrapper .log-toolbar__search {\n ").concat((null==Y?void 0:Y.showHeader)?"flex: 0 1 260px; width: auto; min-width: 160px;":"flex: 1 1 240px; width: auto; min-width: 160px;","\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 0 0 auto;\n }\n .human-changes-wrapper .log-toolbar__btn {\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n /* ---------- narrow container: title keeps the toggles, toolbar drops\n to its own full-width row instead of colliding with the title ---------- */\n ").concat((null==Y?void 0:Y.showHeader)?"\n @container (max-width: 900px) {\n .human-changes-wrapper .human-changes-header__toolbar {\n order: 3;\n flex: 1 1 100%;\n }\n .human-changes-wrapper .human-changes-header__toggles {\n order: 2;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 240px;\n }\n }":"","\n\n /* ---------- very narrow: search takes a full row, filters below ---------- */\n @container (max-width: 480px) {\n .human-changes-wrapper .human-changes-header__titles {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__search {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__actions {\n flex: 1 1 100%;\n }\n .human-changes-wrapper .log-toolbar__btn {\n flex: 1 1 auto;\n justify-content: center;\n }\n }\n ")}),n.jsx("div",e.__assign({className:"human-changes-header-container"},{children:n.jsxs("div",e.__assign({className:"human-changes-header"},{children:[(null==Y?void 0:Y.showHeader)&&n.jsxs("div",e.__assign({className:"human-changes-header__titles"},{children:[n.jsx("h2",e.__assign({className:"human-changes-header__title",title:Y.title||"Human Changes"},{children:Y.title||"Human Changes"})),n.jsx("p",e.__assign({className:"human-changes-header__description",title:Y.description||"Recurring scheduling patterns identified from human changes."},{children:Y.description||"Recurring scheduling patterns identified from human changes."}))]})),n.jsx("div",e.__assign({className:"human-changes-header__toolbar"},{children:n.jsx(r.default,e.__assign({},B,{config:e.__assign(e.__assign({showFilterButton:!0},null==B?void 0:B.config),{sortOptions:null!==(C=null===(I=null==B?void 0:B.config)||void 0===I?void 0:I.sortOptions)&&void 0!==C?C:Q}),value:e.__assign({search:Ge,dateRange:Je,sort:Ke},null==B?void 0:B.value),onChange:e.__assign({onSearch:function(e){var n,i;en(e),null===(i=null===(n=null==B?void 0:B.onChange)||void 0===n?void 0:n.onSearch)||void 0===i||i.call(n,e)},onDate:nn,onSort:an},null==B?void 0:B.onChange),filterActive:Ze.length>0,onOpenFilter:function(){var e;Xe(),null===(e=null==B?void 0:B.onOpenFilter)||void 0===e||e.call(B)}}))})),((null==Y?void 0:Y.showMaximizeToggle)||(null==Y?void 0:Y.showAccordionToggle))&&n.jsxs("div",e.__assign({className:"human-changes-header__toggles"},{children:[(null==Y?void 0:Y.showMaximizeToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!Ee;void 0===ne&&De(e),null==oe||oe(e)},"aria-label":Ee?"Restore":"Maximize",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:Ee?n.jsx(a.Minimize,{size:16}):n.jsx(a.Maximize,{size:16})})),(null==Y?void 0:Y.showAccordionToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!fe;void 0===te&&ve(e),null==se||se(e)},"aria-label":fe?"Collapse table":"Expand table",style:{height:"40px",width:"40px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",color:"#6b7280",cursor:"pointer"}},{children:fe?n.jsx(a.ChevronUp,{size:16}):n.jsx(a.ChevronDown,{size:16})}))]}))]}))})),fe&&n.jsx(o.default,e.__assign({},W,{renderExpandedRow:(null==W?void 0:W.renderExpandedRow)?function(i,a){var o,t,l,r,s,c,u,p,h=!1!==(null===(o=null==de?void 0:de.primary)||void 0===o?void 0:o.show)||!1!==(null===(t=null==de?void 0:de.secondary)||void 0===t?void 0:t.show);return n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[W.renderExpandedRow(i,a),h&&n.jsxs("div",e.__assign({className:d.default.footerActionContainer},{children:[!1!==(null===(l=null==de?void 0:de.secondary)||void 0===l?void 0:l.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionSecondary," ").concat((null===(r=null==de?void 0:de.secondary)||void 0===r?void 0:r.className)||"").trim(),onClick:a.rejectLearning},{children:(null===(s=null==de?void 0:de.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(c=null==de?void 0:de.primary)||void 0===c?void 0:c.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionPrimary," ").concat((null===(u=null==de?void 0:de.primary)||void 0===u?void 0:u.className)||"").trim(),onClick:a.generateLearning},{children:(null===(p=null==de?void 0:de.primary)||void 0===p?void 0:p.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(n){return e.__awaiter(A,void 0,void 0,function(){return e.__generator(this,function(e){return Le(n),Fe(!0),[2]})})},onGenerateLearning:function(n){return e.__awaiter(A,void 0,void 0,function(){var i,a;return e.__generator(this,function(e){switch(e.label){case 0:He(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,qe(n)];case 2:return i=e.sent(),Ne("generate order seperation rule of 15 mins with no exemptions in Tier 1"),ye(i),_e(!0),[3,5];case 3:return a=e.sent(),console.error(a),[3,5];case 4:return He(!1),[7];case 5:return[2]}})})},columns:fn,rows:dn,headerStyle:v,headerClassName:"audit-header",loading:cn,loadingMore:un,hasMore:pn,onLoadMore:function(){null==hn||hn()}})),!1!==(null==Y?void 0:Y.showSidebar)&&n.jsx(s.default,e.__assign({},U,{visible:$e,onHide:function(){var e;Ve(),null===(e=null==U?void 0:U.onHide)||void 0===e||e.call(U)},impactOptions:null!==(j=null!==(F=null==U?void 0:U.impactOptions)&&void 0!==F?F:K)&&void 0!==j?j:J.map(function(e){return{label:e,value:e}}),selectedImpacts:Qe,onImpactChange:function(e){var n;Ye(e),null===(n=null==U?void 0:U.onImpactChange)||void 0===n||n.call(U,e)},onApply:function(){var e;on(),null===(e=null==U?void 0:U.onApply)||void 0===e||e.call(U)},onReset:function(){var e;tn(),null===(e=null==U?void 0:U.onReset)||void 0===e||e.call(U)}})),n.jsxs(c.CitationProvider,{children:[Ce&&n.jsx("div",e.__assign({style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(15, 23, 42, 0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},onClick:Be},{children:n.jsxs("div",e.__assign({onClick:function(e){return e.stopPropagation()},style:{background:"#fff",borderRadius:"12px",padding:"20px 24px",width:"360px",boxShadow:"0 10px 30px rgba(0,0,0,0.2)",display:"flex",flexDirection:"column",gap:"12px",fontFamily:"Inter"}},{children:[n.jsx("h3",e.__assign({style:{margin:0,fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:"Reject learning"})),n.jsx("p",e.__assign({style:{margin:0,fontSize:"13px",color:"#64748B"}},{children:"Optionally add a reason before rejecting this learning."})),n.jsx("input",{type:"text",value:Se,onChange:function(e){return ke(e.target.value)},placeholder:"Enter feedback (optional)...",style:{padding:"8px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",fontSize:"14px",fontFamily:"Inter",outline:"none"},autoFocus:!0}),n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"4px"}},{children:[n.jsx("button",e.__assign({onClick:Be,style:{padding:"8px 14px",borderRadius:"8px",border:"1px solid #E2E8F0",background:"#fff",color:"#374151",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Cancel"})),n.jsx("button",e.__assign({onClick:function(){return e.__awaiter(A,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),[4,Pe(Me||{},"rejected",V,Se)];case 1:return e.sent(),[3,4];case 2:return n=e.sent(),console.error(n),[3,4];case 3:return Fe(!1),ke(""),Le(null),[7];case 4:return[2]}})})},style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:"#111827",color:"#fff",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Submit"}))]}))]}))})),n.jsx(c.TeachMePlugin,{isOpen:xe,onClose:function(){_e(!1),ye(null),Ne(""),gn()},app_integration_id:R,token:pe,mode:"ADD",config:N,pluginPayload:{modeId:ce,initialDraftMessage:null==be?void 0:be.summary,postSaveCallback:function(){Pe(be||{},"accepted",X)},ruleSet:{ruleSetId:null!==(z=null===(k=null!==(S=null==be?void 0:be.raw)&&void 0!==S?S:be)||void 0===k?void 0:k.scopeId)&&void 0!==z?z:null==be?void 0:be.scopeId}}},null!==(O=null!==(q=null===(L=null!==(M=null==be?void 0:be.raw)&&void 0!==M?M:be)||void 0===L?void 0:L.scopeId)&&void 0!==q?q:null==be?void 0:be.scopeId)&&void 0!==O?O:"pending")]})]}))};
2
2
  //# sourceMappingURL=HumanChangesTableWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HumanChangesTableWrapper.d.ts","sourceRoot":"","sources":["../../../src/HumanIntellig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Aa,CAAC,EAAE;QACd,OAAO,CAAC,EAAE,kBAAkB,CAAC;QAC7B,SAAS,CAAC,EAAE,kBAAkB,CAAC;KAChC,CAAC;CACH;AAKD,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,OAAO,EACP,KAAK,EACL,YAAY,EACZ,OAAO,EACP,cAAc,EACd,KAAK,EACL,kBAAiD,EACjD,aAAa,EACb,WAAkC,EAClC,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,WAAW,EAAE,qBAAqB,EAClC,kBAA0B,EAC1B,iBAAiB,EACjB,WAAW,EAAE,qBAAqB,EAClC,kBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,MAAM,EACN,GAAG,IAAI,EACR,EAAE,6BAA6B,+BA8wB/B"}
1
+ {"version":3,"file":"HumanChangesTableWrapper.d.ts","sourceRoot":"","sources":["../../../src/HumanIntelligence/HumanChangesTableWrapper.tsx"],"names":[],"mappings":";AAEA,OAAO,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAkC,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3G,OAAO,EAEL,kBAAkB,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,iBAAiB,EAAE,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAQvG,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IACvC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAClC,eAAe,CAAC,EAAE,M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":"TestHumanIntelligence.d.ts","sourceRoot":"","sources":["../../../src/HumanIntelligence/TestHumanIntelligence.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAqI1B,wBAAgB,qBAAqB,sBAsEpC"}
1
+ {"version":3,"file":"TestHumanIntelligence.d.ts","sourceRoot":"","sources":["../../../src/HumanIntelligence/TestHumanIntelligence.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA+G1B,wBAAgB,qBAAqB,sBAyDpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/federated-dashboard-components",
3
- "version": "1.0.12-human-intel-test",
3
+ "version": "1.1.12-human-intel-test",
4
4
  "author": "Hitesh Rathi",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "dist"
26
26
  ],
27
27
  "scripts": {
28
- "start": "PORT=3000 craco start",
28
+ "start": "PORT=4000 craco start",
29
29
  "build": "rollup -c",
30
30
  "tsupBuild": "tsup src/index.ts",
31
31
  "test": "craco test",