@e-llm-studio/federated-dashboard-components 2.1.6-test-humanintel → 2.1.7-test-humanintel
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 l,jsxs as t}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 h}from"lucide-react";import p from"./components/LogTable/LogTable.js";import{useHumanIntelligenceController as g}from"./hooks/useHumanIntelligenceController.js";import{useHumanChangesData as v}from"./hooks/useHumanChangesData.js";import f from"./components/LogFilters/LogFilters.js";import m from"./components/LogFilters/LogFilterDropdown.js";import w from"./styles/HumanIntelligence.module.css.js";import{CitationProvider as x,TeachMePlugin as b}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 L(L){var z,H,N,R,E,M,O,A,j,D,P,T,q,B,W,U,G,J,K,$,Q,V=this,X=L.configId;L.changeLogConfigId;var Y=L.userDetails,Z=L.app_integration_id,ee=L.teachMeConfig,ne=L.getData,oe=L.query,ie=L.extraColumns,ae=L.filters,le=L.filterDropdown,te=L.table,re=L.rowHeight,de=L.headerHeight,se=L.rowPadding,ce=L.headerPadding,ue=L.rowLineHeight,he=L.tableClassName,pe=L.impactLabelOptions,ge=void 0===pe?I:pe,ve=L.impactOptions,fe=L.sortOptions,me=void 0===fe?S:fe,we=L.rejectLearningApi,xe=L.generateLearningApi,be=L.config,ye=L.className,Ie=L.style,_e=L.isMaximized,Ce=L.defaultIsMaximized,Fe=void 0!==Ce&&Ce,ke=L.onMaximizedChange,Se=L.isTableOpen,Le=L.defaultIsTableOpen,ze=void 0===Le||Le,He=L.onTableOpenChange,Ne=L.footerActions,Re=L.modeId,Ee=e(L,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","rowHeight","headerHeight","rowPadding","headerPadding","rowLineHeight","tableClassName","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),Me=null==Y?void 0:Y.accessToken,Oe=r(ze),Ae=Oe[0],je=Oe[1],De=void 0!==Se?Se:Ae,Pe=r(!1),Te=Pe[0],qe=Pe[1],Be=r(null),We=Be[0],Ue=Be[1],Ge=r(!1),Je=Ge[0],Ke=Ge[1],$e=r(""),Qe=$e[0],Ve=$e[1],Xe=r(null),Ye=Xe[0],Ze=Xe[1],en=function(e,o,i){return void 0===o&&(o=5e3),void 0===i&&(i=100),new Promise(function(a){var l=Date.now(),t=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()-l>=o?a(n(n({},e),{scopeId:c,raw:s?n(n({},s),{scopeId:c}):s})):setTimeout(t,i)};t()})},nn=r(Fe),on=nn[0],an=nn[1],ln=void 0!==_e?_e:on,tn=r(!1);tn[0];var rn=tn[1],dn=function(e,n,o,l){return i(V,void 0,void 0,function(){var i,t,r,d,s,c,u,h,p,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,!(t=null!==(h=null!==(u=i.humanChangeId)&&void 0!==u?u:e.humanChangeId)&&void 0!==h?h:e.id))throw new Error("The selected row is missing humanChangeId.");return r=null!==(g=null!==(p=o.baseUrl)&&void 0!==p?p:null==ne?void 0:ne.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:X,human_change_id:t,review_status:n,reviewed_by_name:(null==Y?void 0:Y.firstname)+" "+(null==Y?void 0:Y.lastname),reviewed_by_email:null==Y?void 0:Y.email,human_change_feedback:l})})];case 1:if(!(s=a.sent()).ok)throw new Error("Learning action failed: ".concat(s.status," ").concat(s.statusText));return[2]}})})},sn=function(){Ke(!1),Ve(""),Ze(null)},cn=g({initialImpactRange:void 0}),un=cn.keyword,hn=cn.searchInput,pn=cn.dateRange,gn=cn.sort,vn=cn.filterOpen,fn=cn.draftImpactLabels,mn=cn.closeFilterPanel,wn=cn.toggleFilterPanel,xn=cn.setDraftImpactLabels,bn=cn.selectedImpactLabels,yn=cn.handleSearchChange,In=cn.handleDateChange,_n=cn.handleSortChange,Cn=cn.handleApplyFilters,Fn=cn.handleResetFilters,kn=d(function(){var e,n={scopeId:null!==(e=null==oe?void 0:oe.scopeId)&&void 0!==e?e:[],content:un||void 0,overallImpact:(null==bn?void 0:bn.length)?bn:void 0};return gn&&(n.orderBy=y[gn]),n},[null==oe?void 0:oe.scopeId,un,bn,gn]),Sn=!(!(null==ne?void 0:ne.baseUrl)||!(null==ne?void 0:ne.endpoint)),Ln=v({baseUrl:Sn?null==ne?void 0:ne.baseUrl:void 0,endpoint:Sn?null==ne?void 0:ne.endpoint:void 0,humanChangeConfigId:X,eventId:null==oe?void 0:oe.eventId,filters:kn,pageSize:null!==(z=null==oe?void 0:oe.paginationLimit)&&void 0!==z?z:12}),zn=Ln.rows,Hn=Ln.loading,Nn=Ln.loadingMore,Rn=Ln.hasMore,En=Ln.fetchMore,Mn=Ln.refetch,On=d(function(){return[{key:"humanChangePatterns",header:"Human Changes Pattern",style:{width:"55%"},headerStyle:F,body:function(e){var o,i=e;return l("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 l("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 l("div",n({style:{backgroundColor:a.bg,color:a.fg,padding:"3px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:500,width:"fit-content"}},{children:i||"—"}))}}]},[]),An=d(function(){var e=o([],On,!0);return null==ie||ie.forEach(function(n){var o=e.findIndex(function(e){return e.key===n.key});-1!==o?e[o]=n:e.push(n)}),e},[On,ie]);return console.log(null!==(R=null===(N=null!==(H=null==We?void 0:We.raw)&&void 0!==H?H:We)||void 0===N?void 0:N.scopeId)&&void 0!==R?R:null==We?void 0:We.scopeId,We,"ruleSetId debug"),t("div",n({className:"human-changes-wrapper ".concat(ln?"human-changes-wrapper--maximized":""," ").concat(ye||"").trim()},Ee,{style:n(n({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},ln?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:50,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px"}),Ie)},{children:[l("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==be?void 0:be.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==be?void 0:be.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==be?void 0:be.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__filter {\n flex: 1 1 auto;\n }\n .human-changes-wrapper .log-toolbar__btn {\n flex: 1 1 auto;\n justify-content: center;\n }\n }\n ")}),l("div",n({className:"human-changes-header-container"},{children:t("div",n({className:"human-changes-header"},{children:[(null==be?void 0:be.showHeader)&&t("div",n({className:"human-changes-header__titles"},{children:[l("h2",n({className:"human-changes-header__title",title:be.title||"Human Changes"},{children:be.title||"Human Changes"})),l("p",n({className:"human-changes-header__description",title:be.description||"Recurring scheduling patterns identified from human changes."},{children:be.description||"Recurring scheduling patterns identified from human changes."}))]})),l("div",n({className:"human-changes-header__toolbar"},{children:l(f,n({},ae,{config:n(n({showFilterButton:!0},null==ae?void 0:ae.config),{sortOptions:null!==(M=null===(E=null==ae?void 0:ae.config)||void 0===E?void 0:E.sortOptions)&&void 0!==M?M:me}),value:n({search:hn,dateRange:pn,sort:gn},null==ae?void 0:ae.value),onChange:n({onSearch:function(e){var n,o;yn(e),null===(o=null===(n=null==ae?void 0:ae.onChange)||void 0===n?void 0:n.onSearch)||void 0===o||o.call(n,e)},onDate:In,onSort:_n},null==ae?void 0:ae.onChange),filterActive:bn.length>0,onOpenFilter:function(){var e;wn(),null===(e=null==ae?void 0:ae.onOpenFilter)||void 0===e||e.call(ae)},filterPanel:!1!==(null==be?void 0:be.showSidebar)?l(m,n({},le,{visible:vn,onHide:function(){var e;mn(),null===(e=null==le?void 0:le.onHide)||void 0===e||e.call(le)},impactOptions:null!==(A=null!==(O=null==le?void 0:le.impactOptions)&&void 0!==O?O:ve)&&void 0!==A?A:ge.map(function(e){return{label:e,value:e}}),selectedImpacts:fn,onImpactChange:function(e){var n;xn(e),null===(n=null==le?void 0:le.onImpactChange)||void 0===n||n.call(le,e)},onApply:function(){var e;Cn(),null===(e=null==le?void 0:le.onApply)||void 0===e||e.call(le)},onReset:function(){var e;Fn(),null===(e=null==le?void 0:le.onReset)||void 0===e||e.call(le)}})):null}))})),((null==be?void 0:be.showMaximizeToggle)||(null==be?void 0:be.showAccordionToggle))&&t("div",n({className:"human-changes-header__toggles"},{children:[(null==be?void 0:be.showMaximizeToggle)&&l("button",n({onClick:function(){var e=!ln;void 0===_e&&an(e),null==ke||ke(e)},"aria-label":ln?"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:l(ln?s:c,{size:16})})),(null==be?void 0:be.showAccordionToggle)&&l("button",n({onClick:function(){var e=!De;void 0===Se&&je(e),null==He||He(e)},"aria-label":De?"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:l(De?u:h,{size:16})}))]}))]}))})),De&&l(p,n({},te,{renderExpandedRow:(null==te?void 0:te.renderExpandedRow)?function(e,o){var i,a,r,d,s,c,u,h,p=!1!==(null===(i=null==Ne?void 0:Ne.primary)||void 0===i?void 0:i.show)||!1!==(null===(a=null==Ne?void 0:Ne.secondary)||void 0===a?void 0:a.show);return t("div",n({style:{display:"flex",flexDirection:"column"}},{children:[te.renderExpandedRow(e,o),p&&t("div",n({className:w.footerActionContainer},{children:[!1!==(null===(r=null==Ne?void 0:Ne.secondary)||void 0===r?void 0:r.show)&&l("button",n({className:"".concat(w.footerActionSecondary," ").concat((null===(d=null==Ne?void 0:Ne.secondary)||void 0===d?void 0:d.className)||"").trim(),onClick:o.rejectLearning},{children:(null===(s=null==Ne?void 0:Ne.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(c=null==Ne?void 0:Ne.primary)||void 0===c?void 0:c.show)&&l("button",n({className:"".concat(w.footerActionPrimary," ").concat((null===(u=null==Ne?void 0:Ne.primary)||void 0===u?void 0:u.className)||"").trim(),onClick:o.generateLearning},{children:(null===(h=null==Ne?void 0:Ne.primary)||void 0===h?void 0:h.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(e){return i(V,void 0,void 0,function(){return a(this,function(n){return Ze(e),Ke(!0),[2]})})},onGenerateLearning:function(e){return i(V,void 0,void 0,function(){var n,o;return a(this,function(i){switch(i.label){case 0:rn(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,en(e)];case 2:return n=i.sent(),Ue(n),qe(!0),[3,5];case 3:return o=i.sent(),console.error(o),[3,5];case 4:return rn(!1),[7];case 5:return[2]}})})},columns:An,rows:zn,headerStyle:F,headerClassName:"audit-header",rowHeight:null!==(j=null==te?void 0:te.rowHeight)&&void 0!==j?j:re,headerHeight:null!==(D=null==te?void 0:te.headerHeight)&&void 0!==D?D:de,rowPadding:null!==(P=null==te?void 0:te.rowPadding)&&void 0!==P?P:se,headerPadding:null!==(T=null==te?void 0:te.headerPadding)&&void 0!==T?T:ce,rowLineHeight:null!==(q=null==te?void 0:te.rowLineHeight)&&void 0!==q?q:ue,className:null!==(B=null==te?void 0:te.className)&&void 0!==B?B:he,loading:Hn,loadingMore:Nn,hasMore:Rn,onLoadMore:function(){null==En||En()}})),t(x,{children:[Je&&l("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:sn},{children:t("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:[l("h3",n({style:{margin:0,fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:"Reject learning"})),l("p",n({style:{margin:0,fontSize:"13px",color:"#64748B"}},{children:"Optionally add a reason before rejecting this learning."})),l("input",{type:"text",value:Qe,onChange:function(e){return Ve(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}),t("div",n({style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"4px"}},{children:[l("button",n({onClick:sn,style:{padding:"8px 14px",borderRadius:"8px",border:"1px solid #E2E8F0",background:"#fff",color:"#374151",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Cancel"})),l("button",n({onClick:function(){return i(V,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,dn(Ye||{},"rejected",we,Qe)];case 1:return n.sent(),[3,4];case 2:return e=n.sent(),console.error(e),[3,4];case 3:return Ke(!1),Ve(""),Ze(null),Mn(),[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"}))]}))]}))})),l(b,{isOpen:Te,onClose:function(){qe(!1),Ue(null),Mn()},app_integration_id:Z,token:Me,mode:"ADD",config:ee,pluginPayload:{modeId:Re,initialDraftMessage:null==We?void 0:We.summary,postSaveCallback:function(){console.log("postSaveCallback called with activeLearningRow:",We),dn(We||{},"accepted",xe)},ruleSet:{ruleSetId:null!==(G=null===(U=null!==(W=null==We?void 0:We.raw)&&void 0!==W?W:We)||void 0===U?void 0:U.scopeId)&&void 0!==G?G:null==We?void 0:We.scopeId}}},null!==(Q=null!==($=null===(K=null!==(J=null==We?void 0:We.raw)&&void 0!==J?J:We)||void 0===K?void 0:K.scopeId)&&void 0!==$?$:null==We?void 0:We.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 l,jsxs as t}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 h}from"lucide-react";import p from"./components/LogTable/LogTable.js";import{useHumanIntelligenceController as g}from"./hooks/useHumanIntelligenceController.js";import{useHumanChangesData as v}from"./hooks/useHumanChangesData.js";import f from"./components/LogFilters/LogFilters.js";import m from"./components/LogFilters/LogFilterDropdown.js";import w from"./styles/HumanIntelligence.module.css.js";import{CitationProvider as x,TeachMePlugin as b}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 L(L){var z,H,N,R,E,M,O,A,j,D,P,T,q,B,W,U,G,J,K,$,Q,V=this,X=L.configId;L.changeLogConfigId;var Y=L.userDetails,Z=L.app_integration_id,ee=L.teachMeConfig,ne=L.getData,oe=L.query,ie=L.extraColumns,ae=L.filters,le=L.filterDropdown,te=L.table,re=L.rowHeight,de=L.headerHeight,se=L.rowPadding,ce=L.headerPadding,ue=L.rowLineHeight,he=L.tableClassName,pe=L.impactLabelOptions,ge=void 0===pe?I:pe,ve=L.impactOptions,fe=L.sortOptions,me=void 0===fe?S:fe,we=L.rejectLearningApi,xe=L.generateLearningApi,be=L.config,ye=L.className,Ie=L.style,_e=L.isMaximized,Ce=L.defaultIsMaximized,Fe=void 0!==Ce&&Ce,ke=L.onMaximizedChange,Se=L.isTableOpen,Le=L.defaultIsTableOpen,ze=void 0===Le||Le,He=L.onTableOpenChange,Ne=L.footerActions,Re=L.modeId,Ee=e(L,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","rowHeight","headerHeight","rowPadding","headerPadding","rowLineHeight","tableClassName","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),Me=null==Y?void 0:Y.accessToken,Oe=r(ze),Ae=Oe[0],je=Oe[1],De=void 0!==Se?Se:Ae,Pe=r(!1),Te=Pe[0],qe=Pe[1],Be=r(null),We=Be[0],Ue=Be[1],Ge=r(!1),Je=Ge[0],Ke=Ge[1],$e=r(""),Qe=$e[0],Ve=$e[1],Xe=r(null),Ye=Xe[0],Ze=Xe[1],en=function(e,o,i){return void 0===o&&(o=5e3),void 0===i&&(i=100),new Promise(function(a){var l=Date.now(),t=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()-l>=o?a(n(n({},e),{scopeId:c,raw:s?n(n({},s),{scopeId:c}):s})):setTimeout(t,i)};t()})},nn=r(Fe),on=nn[0],an=nn[1],ln=void 0!==_e?_e:on,tn=r(!1);tn[0];var rn=tn[1],dn=function(e,n,o,l){return i(V,void 0,void 0,function(){var i,t,r,d,s,c,u,h,p,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,!(t=null!==(h=null!==(u=i.humanChangeId)&&void 0!==u?u:e.humanChangeId)&&void 0!==h?h:e.id))throw new Error("The selected row is missing humanChangeId.");return r=null!==(g=null!==(p=o.baseUrl)&&void 0!==p?p:null==ne?void 0:ne.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:X,human_change_id:t,review_status:n,reviewed_by_name:(null==Y?void 0:Y.firstname)+" "+(null==Y?void 0:Y.lastname),reviewed_by_email:null==Y?void 0:Y.email,human_change_feedback:l})})];case 1:if(!(s=a.sent()).ok)throw new Error("Learning action failed: ".concat(s.status," ").concat(s.statusText));return[2]}})})},sn=function(){Ke(!1),Ve(""),Ze(null)},cn=g({initialImpactRange:void 0}),un=cn.keyword,hn=cn.searchInput,pn=cn.dateRange,gn=cn.sort,vn=cn.filterOpen,fn=cn.draftImpactLabels,mn=cn.closeFilterPanel,wn=cn.toggleFilterPanel,xn=cn.setDraftImpactLabels,bn=cn.selectedImpactLabels,yn=cn.handleSearchChange,In=cn.handleDateChange,_n=cn.handleSortChange,Cn=cn.handleApplyFilters,Fn=cn.handleResetFilters,kn=d(function(){var e,n={scopeId:null!==(e=null==oe?void 0:oe.scopeId)&&void 0!==e?e:[],content:un||void 0,overallImpact:(null==bn?void 0:bn.length)?bn:void 0};return gn&&(n.orderBy=y[gn]),n},[null==oe?void 0:oe.scopeId,un,bn,gn]),Sn=!(!(null==ne?void 0:ne.baseUrl)||!(null==ne?void 0:ne.endpoint)),Ln=v({baseUrl:Sn?null==ne?void 0:ne.baseUrl:void 0,endpoint:Sn?null==ne?void 0:ne.endpoint:void 0,humanChangeConfigId:X,eventId:null==oe?void 0:oe.eventId,filters:kn,pageSize:null!==(z=null==oe?void 0:oe.paginationLimit)&&void 0!==z?z:12}),zn=Ln.rows,Hn=Ln.loading,Nn=Ln.loadingMore,Rn=Ln.hasMore,En=Ln.fetchMore,Mn=Ln.refetch,On=d(function(){return[{key:"humanChangePatterns",header:"Human Changes Pattern",style:{width:"55%"},headerStyle:F,body:function(e){var o,i=e;return l("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 l("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 l("div",n({style:{backgroundColor:a.bg,color:a.fg,padding:"3px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:500,width:"fit-content"}},{children:i||"—"}))}}]},[]),An=d(function(){var e=o([],On,!0);return null==ie||ie.forEach(function(n){var o=e.findIndex(function(e){return e.key===n.key});-1!==o?e[o]=n:e.push(n)}),e},[On,ie]);return console.log(null!==(R=null===(N=null!==(H=null==We?void 0:We.raw)&&void 0!==H?H:We)||void 0===N?void 0:N.scopeId)&&void 0!==R?R:null==We?void 0:We.scopeId,We,"ruleSetId debug"),t("div",n({className:"human-changes-wrapper ".concat(ln?"human-changes-wrapper--maximized":""," ").concat(ye||"").trim()},Ee,{style:n(n({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},ln?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:50,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px",overflow:"auto"}),Ie)},{children:[l("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==be?void 0:be.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==be?void 0:be.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==be?void 0:be.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__filter {\n flex: 1 1 auto;\n }\n .human-changes-wrapper .log-toolbar__btn {\n flex: 1 1 auto;\n justify-content: center;\n }\n }\n ")}),l("div",n({className:"human-changes-header-container"},{children:t("div",n({className:"human-changes-header"},{children:[(null==be?void 0:be.showHeader)&&t("div",n({className:"human-changes-header__titles"},{children:[l("h2",n({className:"human-changes-header__title",title:be.title||"Human Changes"},{children:be.title||"Human Changes"})),l("p",n({className:"human-changes-header__description",title:be.description||"Recurring scheduling patterns identified from human changes."},{children:be.description||"Recurring scheduling patterns identified from human changes."}))]})),l("div",n({className:"human-changes-header__toolbar"},{children:l(f,n({},ae,{config:n(n({showFilterButton:!0},null==ae?void 0:ae.config),{sortOptions:null!==(M=null===(E=null==ae?void 0:ae.config)||void 0===E?void 0:E.sortOptions)&&void 0!==M?M:me}),value:n({search:hn,dateRange:pn,sort:gn},null==ae?void 0:ae.value),onChange:n({onSearch:function(e){var n,o;yn(e),null===(o=null===(n=null==ae?void 0:ae.onChange)||void 0===n?void 0:n.onSearch)||void 0===o||o.call(n,e)},onDate:In,onSort:_n},null==ae?void 0:ae.onChange),filterActive:bn.length>0,onOpenFilter:function(){var e;wn(),null===(e=null==ae?void 0:ae.onOpenFilter)||void 0===e||e.call(ae)},filterPanel:!1!==(null==be?void 0:be.showSidebar)?l(m,n({},le,{visible:vn,onHide:function(){var e;mn(),null===(e=null==le?void 0:le.onHide)||void 0===e||e.call(le)},impactOptions:null!==(A=null!==(O=null==le?void 0:le.impactOptions)&&void 0!==O?O:ve)&&void 0!==A?A:ge.map(function(e){return{label:e,value:e}}),selectedImpacts:fn,onImpactChange:function(e){var n;xn(e),null===(n=null==le?void 0:le.onImpactChange)||void 0===n||n.call(le,e)},onApply:function(){var e;Cn(),null===(e=null==le?void 0:le.onApply)||void 0===e||e.call(le)},onReset:function(){var e;Fn(),null===(e=null==le?void 0:le.onReset)||void 0===e||e.call(le)}})):null}))})),((null==be?void 0:be.showMaximizeToggle)||(null==be?void 0:be.showAccordionToggle))&&t("div",n({className:"human-changes-header__toggles"},{children:[(null==be?void 0:be.showMaximizeToggle)&&l("button",n({onClick:function(){var e=!ln;void 0===_e&&an(e),null==ke||ke(e)},"aria-label":ln?"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:l(ln?s:c,{size:16})})),(null==be?void 0:be.showAccordionToggle)&&l("button",n({onClick:function(){var e=!De;void 0===Se&&je(e),null==He||He(e)},"aria-label":De?"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:l(De?u:h,{size:16})}))]}))]}))})),De&&l(p,n({},te,{renderExpandedRow:(null==te?void 0:te.renderExpandedRow)?function(e,o){var i,a,r,d,s,c,u,h,p=!1!==(null===(i=null==Ne?void 0:Ne.primary)||void 0===i?void 0:i.show)||!1!==(null===(a=null==Ne?void 0:Ne.secondary)||void 0===a?void 0:a.show);return t("div",n({style:{display:"flex",flexDirection:"column"}},{children:[te.renderExpandedRow(e,o),p&&t("div",n({className:w.footerActionContainer},{children:[!1!==(null===(r=null==Ne?void 0:Ne.secondary)||void 0===r?void 0:r.show)&&l("button",n({className:"".concat(w.footerActionSecondary," ").concat((null===(d=null==Ne?void 0:Ne.secondary)||void 0===d?void 0:d.className)||"").trim(),onClick:o.rejectLearning},{children:(null===(s=null==Ne?void 0:Ne.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(c=null==Ne?void 0:Ne.primary)||void 0===c?void 0:c.show)&&l("button",n({className:"".concat(w.footerActionPrimary," ").concat((null===(u=null==Ne?void 0:Ne.primary)||void 0===u?void 0:u.className)||"").trim(),onClick:o.generateLearning},{children:(null===(h=null==Ne?void 0:Ne.primary)||void 0===h?void 0:h.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(e){return i(V,void 0,void 0,function(){return a(this,function(n){return Ze(e),Ke(!0),[2]})})},onGenerateLearning:function(e){return i(V,void 0,void 0,function(){var n,o;return a(this,function(i){switch(i.label){case 0:rn(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,en(e)];case 2:return n=i.sent(),Ue(n),qe(!0),[3,5];case 3:return o=i.sent(),console.error(o),[3,5];case 4:return rn(!1),[7];case 5:return[2]}})})},columns:An,rows:zn,headerStyle:F,headerClassName:"audit-header",rowHeight:null!==(j=null==te?void 0:te.rowHeight)&&void 0!==j?j:re,headerHeight:null!==(D=null==te?void 0:te.headerHeight)&&void 0!==D?D:de,rowPadding:null!==(P=null==te?void 0:te.rowPadding)&&void 0!==P?P:se,headerPadding:null!==(T=null==te?void 0:te.headerPadding)&&void 0!==T?T:ce,rowLineHeight:null!==(q=null==te?void 0:te.rowLineHeight)&&void 0!==q?q:ue,className:null!==(B=null==te?void 0:te.className)&&void 0!==B?B:he,loading:Hn,loadingMore:Nn,hasMore:Rn,onLoadMore:function(){null==En||En()}})),t(x,{children:[Je&&l("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:sn},{children:t("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:[l("h3",n({style:{margin:0,fontSize:"16px",fontWeight:600,color:"#0F172A"}},{children:"Reject learning"})),l("p",n({style:{margin:0,fontSize:"13px",color:"#64748B"}},{children:"Optionally add a reason before rejecting this learning."})),l("input",{type:"text",value:Qe,onChange:function(e){return Ve(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}),t("div",n({style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"4px"}},{children:[l("button",n({onClick:sn,style:{padding:"8px 14px",borderRadius:"8px",border:"1px solid #E2E8F0",background:"#fff",color:"#374151",fontSize:"13px",fontWeight:500,cursor:"pointer"}},{children:"Cancel"})),l("button",n({onClick:function(){return i(V,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,dn(Ye||{},"rejected",we,Qe)];case 1:return n.sent(),[3,4];case 2:return e=n.sent(),console.error(e),[3,4];case 3:return Ke(!1),Ve(""),Ze(null),Mn(),[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"}))]}))]}))})),l(b,{isOpen:Te,onClose:function(){qe(!1),Ue(null),Mn()},app_integration_id:Z,token:Me,mode:"ADD",config:ee,pluginPayload:{modeId:Re,initialDraftMessage:null==We?void 0:We.summary,postSaveCallback:function(){console.log("postSaveCallback called with activeLearningRow:",We),dn(We||{},"accepted",xe)},ruleSet:{ruleSetId:null!==(G=null===(U=null!==(W=null==We?void 0:We.raw)&&void 0!==W?W:We)||void 0===U?void 0:U.scopeId)&&void 0!==G?G:null==We?void 0:We.scopeId}}},null!==(Q=null!==($=null===(K=null!==(J=null==We?void 0:We.raw)&&void 0!==J?J:We)||void 0===K?void 0:K.scopeId)&&void 0!==$?$:null==We?void 0:We.scopeId)&&void 0!==Q?Q:"pending")]})]}))}export{L 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"),l=require("./hooks/useHumanChangesData.js"),r=require("./components/LogFilters/LogFilters.js"),s=require("./components/LogFilters/LogFilterDropdown.js"),d=require("./styles/HumanIntelligence.module.css.js"),u=require("@e-llm-studio/instant-learning"),c={highestFrequency:"highestFrequency",lowestFrequency:"lowestFrequency"},h=["Positive Impact","No Measurable Impact","Mixed Impact","Negative Impact"],g={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"}},p={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,L,z,M,H,N,q,O,P,R,A,D,E=this,T=x.configId;x.changeLogConfigId;var B=x.userDetails,U=x.app_integration_id,W=x.teachMeConfig,G=x.getData,J=x.query,K=x.extraColumns,$=x.filters,Q=x.filterDropdown,V=x.table,X=x.rowHeight,Y=x.headerHeight,Z=x.rowPadding,ee=x.headerPadding,ne=x.rowLineHeight,ie=x.tableClassName,ae=x.impactLabelOptions,oe=void 0===ae?h:ae,te=x.impactOptions,le=x.sortOptions,re=void 0===le?m:le,se=x.rejectLearningApi,de=x.generateLearningApi,ue=x.config,ce=x.className,he=x.style,ge=x.isMaximized,pe=x.defaultIsMaximized,ve=void 0!==pe&&pe,fe=x.onMaximizedChange,me=x.isTableOpen,xe=x.defaultIsTableOpen,_e=void 0===xe||xe,we=x.onTableOpenChange,be=x.footerActions,ye=x.modeId,Ie=e.__rest(x,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","rowHeight","headerHeight","rowPadding","headerPadding","rowLineHeight","tableClassName","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),Ce=null==B?void 0:B.accessToken,Fe=i.useState(_e),je=Fe[0],Se=Fe[1],ke=void 0!==me?me:je,Le=i.useState(!1),ze=Le[0],Me=Le[1],He=i.useState(null),Ne=He[0],qe=He[1],Oe=i.useState(!1),Pe=Oe[0],Re=Oe[1],Ae=i.useState(""),De=Ae[0],Ee=Ae[1],Te=i.useState(null),Be=Te[0],Ue=Te[1],We=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,u=null!==(s=null==d?void 0:d.scopeId)&&void 0!==s?s:n.scopeId;u||Date.now()-t>=i?o(e.__assign(e.__assign({},n),{scopeId:u,raw:d?e.__assign(e.__assign({},d),{scopeId:u}):d})):setTimeout(l,a)};l()})},Ge=i.useState(ve),Je=Ge[0],Ke=Ge[1],$e=void 0!==ge?ge:Je,Qe=i.useState(!1);Qe[0];var Ve=Qe[1],Xe=function(n,i,a,o){return e.__awaiter(E,void 0,void 0,function(){var t,l,r,s,d,u,c,h,g,p;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!==(u=n.raw)&&void 0!==u?u:n,!(l=null!==(h=null!==(c=t.humanChangeId)&&void 0!==c?c:n.humanChangeId)&&void 0!==h?h:n.id))throw new Error("The selected row is missing humanChangeId.");return r=null!==(p=null!==(g=a.baseUrl)&&void 0!==g?g:null==G?void 0:G.baseUrl)&&void 0!==p?p:"",s="".concat(r.replace(/\/$/,""),"/").concat(a.endpoint.replace(/^\//,"")),[4,fetch(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({humanIntelligentConfigId:T,human_change_id:l,review_status:i,reviewed_by_name:(null==B?void 0:B.firstname)+" "+(null==B?void 0:B.lastname),reviewed_by_email:null==B?void 0:B.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]}})})},Ye=function(){Re(!1),Ee(""),Ue(null)},Ze=t.useHumanIntelligenceController({initialImpactRange:void 0}),en=Ze.keyword,nn=Ze.searchInput,an=Ze.dateRange,on=Ze.sort,tn=Ze.filterOpen,ln=Ze.draftImpactLabels,rn=Ze.closeFilterPanel,sn=Ze.toggleFilterPanel,dn=Ze.setDraftImpactLabels,un=Ze.selectedImpactLabels,cn=Ze.handleSearchChange,hn=Ze.handleDateChange,gn=Ze.handleSortChange,pn=Ze.handleApplyFilters,vn=Ze.handleResetFilters,fn=i.useMemo(function(){var e,n={scopeId:null!==(e=null==J?void 0:J.scopeId)&&void 0!==e?e:[],content:en||void 0,overallImpact:(null==un?void 0:un.length)?un:void 0};return on&&(n.orderBy=c[on]),n},[null==J?void 0:J.scopeId,en,un,on]),mn=!(!(null==G?void 0:G.baseUrl)||!(null==G?void 0:G.endpoint)),xn=l.useHumanChangesData({baseUrl:mn?null==G?void 0:G.baseUrl:void 0,endpoint:mn?null==G?void 0:G.endpoint:void 0,humanChangeConfigId:T,eventId:null==J?void 0:J.eventId,filters:fn,pageSize:null!==(_=null==J?void 0:J.paginationLimit)&&void 0!==_?_:12}),_n=xn.rows,wn=xn.loading,bn=xn.loadingMore,yn=xn.hasMore,In=xn.fetchMore,Cn=xn.refetch,Fn=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=p[e])&&void 0!==n?n:e:void 0}(null==a?void 0:a.impactLabel),t=(null==a?void 0:a.impactLabel)&&g[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||"—"}))}}]},[]),jn=i.useMemo(function(){var n=e.__spreadArray([],Fn,!0);return null==K||K.forEach(function(e){var i=n.findIndex(function(n){return n.key===e.key});-1!==i?n[i]=e:n.push(e)}),n},[Fn,K]);return console.log(null!==(y=null===(b=null!==(w=null==Ne?void 0:Ne.raw)&&void 0!==w?w:Ne)||void 0===b?void 0:b.scopeId)&&void 0!==y?y:null==Ne?void 0:Ne.scopeId,Ne,"ruleSetId debug"),n.jsxs("div",e.__assign({className:"human-changes-wrapper ".concat($e?"human-changes-wrapper--maximized":""," ").concat(ce||"").trim()},Ie,{style:e.__assign(e.__assign({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},$e?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:50,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px"}),he)},{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==ue?void 0:ue.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==ue?void 0:ue.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==ue?void 0:ue.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__filter {\n flex: 1 1 auto;\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==ue?void 0:ue.showHeader)&&n.jsxs("div",e.__assign({className:"human-changes-header__titles"},{children:[n.jsx("h2",e.__assign({className:"human-changes-header__title",title:ue.title||"Human Changes"},{children:ue.title||"Human Changes"})),n.jsx("p",e.__assign({className:"human-changes-header__description",title:ue.description||"Recurring scheduling patterns identified from human changes."},{children:ue.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({},$,{config:e.__assign(e.__assign({showFilterButton:!0},null==$?void 0:$.config),{sortOptions:null!==(C=null===(I=null==$?void 0:$.config)||void 0===I?void 0:I.sortOptions)&&void 0!==C?C:re}),value:e.__assign({search:nn,dateRange:an,sort:on},null==$?void 0:$.value),onChange:e.__assign({onSearch:function(e){var n,i;cn(e),null===(i=null===(n=null==$?void 0:$.onChange)||void 0===n?void 0:n.onSearch)||void 0===i||i.call(n,e)},onDate:hn,onSort:gn},null==$?void 0:$.onChange),filterActive:un.length>0,onOpenFilter:function(){var e;sn(),null===(e=null==$?void 0:$.onOpenFilter)||void 0===e||e.call($)},filterPanel:!1!==(null==ue?void 0:ue.showSidebar)?n.jsx(s.default,e.__assign({},Q,{visible:tn,onHide:function(){var e;rn(),null===(e=null==Q?void 0:Q.onHide)||void 0===e||e.call(Q)},impactOptions:null!==(j=null!==(F=null==Q?void 0:Q.impactOptions)&&void 0!==F?F:te)&&void 0!==j?j:oe.map(function(e){return{label:e,value:e}}),selectedImpacts:ln,onImpactChange:function(e){var n;dn(e),null===(n=null==Q?void 0:Q.onImpactChange)||void 0===n||n.call(Q,e)},onApply:function(){var e;pn(),null===(e=null==Q?void 0:Q.onApply)||void 0===e||e.call(Q)},onReset:function(){var e;vn(),null===(e=null==Q?void 0:Q.onReset)||void 0===e||e.call(Q)}})):null}))})),((null==ue?void 0:ue.showMaximizeToggle)||(null==ue?void 0:ue.showAccordionToggle))&&n.jsxs("div",e.__assign({className:"human-changes-header__toggles"},{children:[(null==ue?void 0:ue.showMaximizeToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!$e;void 0===ge&&Ke(e),null==fe||fe(e)},"aria-label":$e?"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:$e?n.jsx(a.Minimize,{size:16}):n.jsx(a.Maximize,{size:16})})),(null==ue?void 0:ue.showAccordionToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!ke;void 0===me&&Se(e),null==we||we(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:ke?n.jsx(a.ChevronUp,{size:16}):n.jsx(a.ChevronDown,{size:16})}))]}))]}))})),ke&&n.jsx(o.default,e.__assign({},V,{renderExpandedRow:(null==V?void 0:V.renderExpandedRow)?function(i,a){var o,t,l,r,s,u,c,h,g=!1!==(null===(o=null==be?void 0:be.primary)||void 0===o?void 0:o.show)||!1!==(null===(t=null==be?void 0:be.secondary)||void 0===t?void 0:t.show);return n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[V.renderExpandedRow(i,a),g&&n.jsxs("div",e.__assign({className:d.default.footerActionContainer},{children:[!1!==(null===(l=null==be?void 0:be.secondary)||void 0===l?void 0:l.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionSecondary," ").concat((null===(r=null==be?void 0:be.secondary)||void 0===r?void 0:r.className)||"").trim(),onClick:a.rejectLearning},{children:(null===(s=null==be?void 0:be.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(u=null==be?void 0:be.primary)||void 0===u?void 0:u.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionPrimary," ").concat((null===(c=null==be?void 0:be.primary)||void 0===c?void 0:c.className)||"").trim(),onClick:a.generateLearning},{children:(null===(h=null==be?void 0:be.primary)||void 0===h?void 0:h.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(n){return e.__awaiter(E,void 0,void 0,function(){return e.__generator(this,function(e){return Ue(n),Re(!0),[2]})})},onGenerateLearning:function(n){return e.__awaiter(E,void 0,void 0,function(){var i,a;return e.__generator(this,function(e){switch(e.label){case 0:Ve(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,We(n)];case 2:return i=e.sent(),qe(i),Me(!0),[3,5];case 3:return a=e.sent(),console.error(a),[3,5];case 4:return Ve(!1),[7];case 5:return[2]}})})},columns:jn,rows:_n,headerStyle:v,headerClassName:"audit-header",rowHeight:null!==(S=null==V?void 0:V.rowHeight)&&void 0!==S?S:X,headerHeight:null!==(k=null==V?void 0:V.headerHeight)&&void 0!==k?k:Y,rowPadding:null!==(L=null==V?void 0:V.rowPadding)&&void 0!==L?L:Z,headerPadding:null!==(z=null==V?void 0:V.headerPadding)&&void 0!==z?z:ee,rowLineHeight:null!==(M=null==V?void 0:V.rowLineHeight)&&void 0!==M?M:ne,className:null!==(H=null==V?void 0:V.className)&&void 0!==H?H:ie,loading:wn,loadingMore:bn,hasMore:yn,onLoadMore:function(){null==In||In()}})),n.jsxs(u.CitationProvider,{children:[Pe&&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:Ye},{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:De,onChange:function(e){return Ee(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:Ye,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(E,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,Xe(Be||{},"rejected",se,De)];case 1:return e.sent(),[3,4];case 2:return n=e.sent(),console.error(n),[3,4];case 3:return Re(!1),Ee(""),Ue(null),Cn(),[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(u.TeachMePlugin,{isOpen:ze,onClose:function(){Me(!1),qe(null),Cn()},app_integration_id:U,token:Ce,mode:"ADD",config:W,pluginPayload:{modeId:ye,initialDraftMessage:null==Ne?void 0:Ne.summary,postSaveCallback:function(){console.log("postSaveCallback called with activeLearningRow:",Ne),Xe(Ne||{},"accepted",de)},ruleSet:{ruleSetId:null!==(O=null===(q=null!==(N=null==Ne?void 0:Ne.raw)&&void 0!==N?N:Ne)||void 0===q?void 0:q.scopeId)&&void 0!==O?O:null==Ne?void 0:Ne.scopeId}}},null!==(D=null!==(A=null===(R=null!==(P=null==Ne?void 0:Ne.raw)&&void 0!==P?P:Ne)||void 0===R?void 0:R.scopeId)&&void 0!==A?A:null==Ne?void 0:Ne.scopeId)&&void 0!==D?D:"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"),u=require("@e-llm-studio/instant-learning"),c={highestFrequency:"highestFrequency",lowestFrequency:"lowestFrequency"},h=["Positive Impact","No Measurable Impact","Mixed Impact","Negative Impact"],g={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"}},p={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,L,z,M,H,N,q,O,P,R,A,D,E=this,T=x.configId;x.changeLogConfigId;var B=x.userDetails,U=x.app_integration_id,W=x.teachMeConfig,G=x.getData,J=x.query,K=x.extraColumns,$=x.filters,Q=x.filterDropdown,V=x.table,X=x.rowHeight,Y=x.headerHeight,Z=x.rowPadding,ee=x.headerPadding,ne=x.rowLineHeight,ie=x.tableClassName,ae=x.impactLabelOptions,oe=void 0===ae?h:ae,te=x.impactOptions,le=x.sortOptions,re=void 0===le?m:le,se=x.rejectLearningApi,de=x.generateLearningApi,ue=x.config,ce=x.className,he=x.style,ge=x.isMaximized,pe=x.defaultIsMaximized,ve=void 0!==pe&&pe,fe=x.onMaximizedChange,me=x.isTableOpen,xe=x.defaultIsTableOpen,_e=void 0===xe||xe,we=x.onTableOpenChange,be=x.footerActions,ye=x.modeId,Ie=e.__rest(x,["configId","changeLogConfigId","userDetails","app_integration_id","teachMeConfig","getData","query","extraColumns","filters","filterDropdown","table","rowHeight","headerHeight","rowPadding","headerPadding","rowLineHeight","tableClassName","impactLabelOptions","impactOptions","sortOptions","rejectLearningApi","generateLearningApi","config","className","style","isMaximized","defaultIsMaximized","onMaximizedChange","isTableOpen","defaultIsTableOpen","onTableOpenChange","footerActions","modeId"]),Ce=null==B?void 0:B.accessToken,Fe=i.useState(_e),je=Fe[0],Se=Fe[1],ke=void 0!==me?me:je,Le=i.useState(!1),ze=Le[0],Me=Le[1],He=i.useState(null),Ne=He[0],qe=He[1],Oe=i.useState(!1),Pe=Oe[0],Re=Oe[1],Ae=i.useState(""),De=Ae[0],Ee=Ae[1],Te=i.useState(null),Be=Te[0],Ue=Te[1],We=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,u=null!==(s=null==d?void 0:d.scopeId)&&void 0!==s?s:n.scopeId;u||Date.now()-t>=i?o(e.__assign(e.__assign({},n),{scopeId:u,raw:d?e.__assign(e.__assign({},d),{scopeId:u}):d})):setTimeout(l,a)};l()})},Ge=i.useState(ve),Je=Ge[0],Ke=Ge[1],$e=void 0!==ge?ge:Je,Qe=i.useState(!1);Qe[0];var Ve=Qe[1],Xe=function(n,i,a,o){return e.__awaiter(E,void 0,void 0,function(){var t,l,r,s,d,u,c,h,g,p;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!==(u=n.raw)&&void 0!==u?u:n,!(l=null!==(h=null!==(c=t.humanChangeId)&&void 0!==c?c:n.humanChangeId)&&void 0!==h?h:n.id))throw new Error("The selected row is missing humanChangeId.");return r=null!==(p=null!==(g=a.baseUrl)&&void 0!==g?g:null==G?void 0:G.baseUrl)&&void 0!==p?p:"",s="".concat(r.replace(/\/$/,""),"/").concat(a.endpoint.replace(/^\//,"")),[4,fetch(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({humanIntelligentConfigId:T,human_change_id:l,review_status:i,reviewed_by_name:(null==B?void 0:B.firstname)+" "+(null==B?void 0:B.lastname),reviewed_by_email:null==B?void 0:B.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]}})})},Ye=function(){Re(!1),Ee(""),Ue(null)},Ze=t.useHumanIntelligenceController({initialImpactRange:void 0}),en=Ze.keyword,nn=Ze.searchInput,an=Ze.dateRange,on=Ze.sort,tn=Ze.filterOpen,ln=Ze.draftImpactLabels,rn=Ze.closeFilterPanel,sn=Ze.toggleFilterPanel,dn=Ze.setDraftImpactLabels,un=Ze.selectedImpactLabels,cn=Ze.handleSearchChange,hn=Ze.handleDateChange,gn=Ze.handleSortChange,pn=Ze.handleApplyFilters,vn=Ze.handleResetFilters,fn=i.useMemo(function(){var e,n={scopeId:null!==(e=null==J?void 0:J.scopeId)&&void 0!==e?e:[],content:en||void 0,overallImpact:(null==un?void 0:un.length)?un:void 0};return on&&(n.orderBy=c[on]),n},[null==J?void 0:J.scopeId,en,un,on]),mn=!(!(null==G?void 0:G.baseUrl)||!(null==G?void 0:G.endpoint)),xn=l.useHumanChangesData({baseUrl:mn?null==G?void 0:G.baseUrl:void 0,endpoint:mn?null==G?void 0:G.endpoint:void 0,humanChangeConfigId:T,eventId:null==J?void 0:J.eventId,filters:fn,pageSize:null!==(_=null==J?void 0:J.paginationLimit)&&void 0!==_?_:12}),_n=xn.rows,wn=xn.loading,bn=xn.loadingMore,yn=xn.hasMore,In=xn.fetchMore,Cn=xn.refetch,Fn=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=p[e])&&void 0!==n?n:e:void 0}(null==a?void 0:a.impactLabel),t=(null==a?void 0:a.impactLabel)&&g[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||"—"}))}}]},[]),jn=i.useMemo(function(){var n=e.__spreadArray([],Fn,!0);return null==K||K.forEach(function(e){var i=n.findIndex(function(n){return n.key===e.key});-1!==i?n[i]=e:n.push(e)}),n},[Fn,K]);return console.log(null!==(y=null===(b=null!==(w=null==Ne?void 0:Ne.raw)&&void 0!==w?w:Ne)||void 0===b?void 0:b.scopeId)&&void 0!==y?y:null==Ne?void 0:Ne.scopeId,Ne,"ruleSetId debug"),n.jsxs("div",e.__assign({className:"human-changes-wrapper ".concat($e?"human-changes-wrapper--maximized":""," ").concat(ce||"").trim()},Ie,{style:e.__assign(e.__assign({padding:"16px 20px",display:"flex",flexDirection:"column",gap:"16px",border:"1px solid #E2E8F0",backgroundColor:"#FFFFFF"},$e?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",zIndex:50,margin:0,borderRadius:0,overflow:"auto"}:{position:"relative",borderRadius:"12px",overflow:"auto"}),he)},{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==ue?void 0:ue.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==ue?void 0:ue.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==ue?void 0:ue.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__filter {\n flex: 1 1 auto;\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==ue?void 0:ue.showHeader)&&n.jsxs("div",e.__assign({className:"human-changes-header__titles"},{children:[n.jsx("h2",e.__assign({className:"human-changes-header__title",title:ue.title||"Human Changes"},{children:ue.title||"Human Changes"})),n.jsx("p",e.__assign({className:"human-changes-header__description",title:ue.description||"Recurring scheduling patterns identified from human changes."},{children:ue.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({},$,{config:e.__assign(e.__assign({showFilterButton:!0},null==$?void 0:$.config),{sortOptions:null!==(C=null===(I=null==$?void 0:$.config)||void 0===I?void 0:I.sortOptions)&&void 0!==C?C:re}),value:e.__assign({search:nn,dateRange:an,sort:on},null==$?void 0:$.value),onChange:e.__assign({onSearch:function(e){var n,i;cn(e),null===(i=null===(n=null==$?void 0:$.onChange)||void 0===n?void 0:n.onSearch)||void 0===i||i.call(n,e)},onDate:hn,onSort:gn},null==$?void 0:$.onChange),filterActive:un.length>0,onOpenFilter:function(){var e;sn(),null===(e=null==$?void 0:$.onOpenFilter)||void 0===e||e.call($)},filterPanel:!1!==(null==ue?void 0:ue.showSidebar)?n.jsx(s.default,e.__assign({},Q,{visible:tn,onHide:function(){var e;rn(),null===(e=null==Q?void 0:Q.onHide)||void 0===e||e.call(Q)},impactOptions:null!==(j=null!==(F=null==Q?void 0:Q.impactOptions)&&void 0!==F?F:te)&&void 0!==j?j:oe.map(function(e){return{label:e,value:e}}),selectedImpacts:ln,onImpactChange:function(e){var n;dn(e),null===(n=null==Q?void 0:Q.onImpactChange)||void 0===n||n.call(Q,e)},onApply:function(){var e;pn(),null===(e=null==Q?void 0:Q.onApply)||void 0===e||e.call(Q)},onReset:function(){var e;vn(),null===(e=null==Q?void 0:Q.onReset)||void 0===e||e.call(Q)}})):null}))})),((null==ue?void 0:ue.showMaximizeToggle)||(null==ue?void 0:ue.showAccordionToggle))&&n.jsxs("div",e.__assign({className:"human-changes-header__toggles"},{children:[(null==ue?void 0:ue.showMaximizeToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!$e;void 0===ge&&Ke(e),null==fe||fe(e)},"aria-label":$e?"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:$e?n.jsx(a.Minimize,{size:16}):n.jsx(a.Maximize,{size:16})})),(null==ue?void 0:ue.showAccordionToggle)&&n.jsx("button",e.__assign({onClick:function(){var e=!ke;void 0===me&&Se(e),null==we||we(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:ke?n.jsx(a.ChevronUp,{size:16}):n.jsx(a.ChevronDown,{size:16})}))]}))]}))})),ke&&n.jsx(o.default,e.__assign({},V,{renderExpandedRow:(null==V?void 0:V.renderExpandedRow)?function(i,a){var o,t,l,r,s,u,c,h,g=!1!==(null===(o=null==be?void 0:be.primary)||void 0===o?void 0:o.show)||!1!==(null===(t=null==be?void 0:be.secondary)||void 0===t?void 0:t.show);return n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[V.renderExpandedRow(i,a),g&&n.jsxs("div",e.__assign({className:d.default.footerActionContainer},{children:[!1!==(null===(l=null==be?void 0:be.secondary)||void 0===l?void 0:l.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionSecondary," ").concat((null===(r=null==be?void 0:be.secondary)||void 0===r?void 0:r.className)||"").trim(),onClick:a.rejectLearning},{children:(null===(s=null==be?void 0:be.secondary)||void 0===s?void 0:s.label)||"Reject"})),!1!==(null===(u=null==be?void 0:be.primary)||void 0===u?void 0:u.show)&&n.jsx("button",e.__assign({className:"".concat(d.default.footerActionPrimary," ").concat((null===(c=null==be?void 0:be.primary)||void 0===c?void 0:c.className)||"").trim(),onClick:a.generateLearning},{children:(null===(h=null==be?void 0:be.primary)||void 0===h?void 0:h.label)||"Generate Learning"}))]}))]}))}:void 0,onRejectLearning:function(n){return e.__awaiter(E,void 0,void 0,function(){return e.__generator(this,function(e){return Ue(n),Re(!0),[2]})})},onGenerateLearning:function(n){return e.__awaiter(E,void 0,void 0,function(){var i,a;return e.__generator(this,function(e){switch(e.label){case 0:Ve(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,We(n)];case 2:return i=e.sent(),qe(i),Me(!0),[3,5];case 3:return a=e.sent(),console.error(a),[3,5];case 4:return Ve(!1),[7];case 5:return[2]}})})},columns:jn,rows:_n,headerStyle:v,headerClassName:"audit-header",rowHeight:null!==(S=null==V?void 0:V.rowHeight)&&void 0!==S?S:X,headerHeight:null!==(k=null==V?void 0:V.headerHeight)&&void 0!==k?k:Y,rowPadding:null!==(L=null==V?void 0:V.rowPadding)&&void 0!==L?L:Z,headerPadding:null!==(z=null==V?void 0:V.headerPadding)&&void 0!==z?z:ee,rowLineHeight:null!==(M=null==V?void 0:V.rowLineHeight)&&void 0!==M?M:ne,className:null!==(H=null==V?void 0:V.className)&&void 0!==H?H:ie,loading:wn,loadingMore:bn,hasMore:yn,onLoadMore:function(){null==In||In()}})),n.jsxs(u.CitationProvider,{children:[Pe&&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:Ye},{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:De,onChange:function(e){return Ee(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:Ye,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(E,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,Xe(Be||{},"rejected",se,De)];case 1:return e.sent(),[3,4];case 2:return n=e.sent(),console.error(n),[3,4];case 3:return Re(!1),Ee(""),Ue(null),Cn(),[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(u.TeachMePlugin,{isOpen:ze,onClose:function(){Me(!1),qe(null),Cn()},app_integration_id:U,token:Ce,mode:"ADD",config:W,pluginPayload:{modeId:ye,initialDraftMessage:null==Ne?void 0:Ne.summary,postSaveCallback:function(){console.log("postSaveCallback called with activeLearningRow:",Ne),Xe(Ne||{},"accepted",de)},ruleSet:{ruleSetId:null!==(O=null===(q=null!==(N=null==Ne?void 0:Ne.raw)&&void 0!==N?N:Ne)||void 0===q?void 0:q.scopeId)&&void 0!==O?O:null==Ne?void 0:Ne.scopeId}}},null!==(D=null!==(A=null===(R=null!==(P=null==Ne?void 0:Ne.raw)&&void 0!==P?P:Ne)||void 0===R?void 0:R.scopeId)&&void 0!==A?A:null==Ne?void 0:Ne.scopeId)&&void 0!==D?D:"pending")]})]}))};
|
|
2
2
|
//# sourceMappingURL=HumanChangesTableWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
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,M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,EACjB,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,OAAO,EACP,KAAK,EACL,YAAY,EACZ,OAAO,EACP,cAAc,EACd,KAAK,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,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,+
|
|
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,MAAM,CAAC;CAC1B,CAAC;AAmEF,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,kBAAkB,CAAC;CAC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