@e-llm-studio/federated-dashboard-components 2.2.9-rca-test-3 → 2.2.9-rca-test-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ExecutiveDashboard/ExecutiveDashboardWrapper.js +1 -1
- package/dist/ExecutiveDashboard/api/insightsApi.js +1 -1
- package/dist/ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.js +1 -1
- package/dist/ExecutiveDashboard/components/ExecutiveDashboard.js +1 -1
- package/dist/ExecutiveDashboard/components/Graph/LineChart.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/AgCharts.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/AgReport.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/CommentsThread.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/DrillLevel.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/DrillLevel.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/DrillTable.js +2 -0
- package/dist/ExecutiveDashboard/components/Insights/DrillTable.js.map +1 -0
- package/dist/ExecutiveDashboard/components/Insights/InsightTabs.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/InsightsContext.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/L1Report.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/ReportDrawer.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/RowDetail.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/agPrimitives.js +1 -1
- package/dist/ExecutiveDashboard/components/Insights/insightsUtils.js +1 -1
- package/dist/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.js +1 -1
- package/dist/cjs/ExecutiveDashboard/ExecutiveDashboardWrapper.js +1 -1
- package/dist/cjs/ExecutiveDashboard/api/insightsApi.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/ExecutiveDashboard.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Graph/LineChart.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/AgCharts.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/AgReport.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/DrillLevel.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/DrillLevel.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/DrillTable.js +2 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/DrillTable.js.map +1 -0
- package/dist/cjs/ExecutiveDashboard/components/Insights/InsightTabs.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/InsightsContext.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/L1Report.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/ReportDrawer.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/RowDetail.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/agPrimitives.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/Insights/insightsUtils.js +1 -1
- package/dist/cjs/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/ExecutiveDashboard/ExecutiveDashboardWrapper.d.ts +1 -1
- package/dist/types/ExecutiveDashboard/ExecutiveDashboardWrapper.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/TestExecutiveDashboard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/api/insightsApi.d.ts +26 -2
- package/dist/types/ExecutiveDashboard/api/insightsApi.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/ExecutiveDashboard.d.ts +16 -1
- package/dist/types/ExecutiveDashboard/components/ExecutiveDashboard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Graph/LineChart.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/AgCharts.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/AgReport.d.ts +19 -7
- package/dist/types/ExecutiveDashboard/components/Insights/AgReport.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/DecisionAdvantageCard.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/DrillLevel.d.ts +35 -0
- package/dist/types/ExecutiveDashboard/components/Insights/DrillLevel.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/DrillTable.d.ts +29 -0
- package/dist/types/ExecutiveDashboard/components/Insights/DrillTable.d.ts.map +1 -0
- package/dist/types/ExecutiveDashboard/components/Insights/InsightTabs.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/InsightsContext.d.ts +33 -2
- package/dist/types/ExecutiveDashboard/components/Insights/InsightsContext.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/L1Report.d.ts +6 -1
- package/dist/types/ExecutiveDashboard/components/Insights/L1Report.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/NeedsAttention.d.ts +4 -3
- package/dist/types/ExecutiveDashboard/components/Insights/NeedsAttention.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/ReportDrawer.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/RowDetail.d.ts +10 -1
- package/dist/types/ExecutiveDashboard/components/Insights/RowDetail.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/agPrimitives.d.ts +2 -1
- package/dist/types/ExecutiveDashboard/components/Insights/agPrimitives.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/insightsContextCore.d.ts +46 -2
- package/dist/types/ExecutiveDashboard/components/Insights/insightsContextCore.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/Insights/insightsUtils.d.ts +5 -4
- package/dist/types/ExecutiveDashboard/components/Insights/insightsUtils.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/types/index.d.ts +31 -1
- package/dist/types/ExecutiveDashboard/types/index.d.ts.map +1 -1
- package/dist/types/ExecutiveDashboard/types/insights.d.ts +241 -0
- package/dist/types/ExecutiveDashboard/types/insights.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),t=require("lucide-react"),i=require("react-markdown"),a=require("remark-gfm"),s=require("../../api/insightsApi.js"),o=require("./DecisionAdvantageCard.js"),l=require("./CommentsThread.js"),d=require("./insightsContextCore.js"),u=require("./insightsUtils.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=c(i),p=c(a);exports.default=function(i){var a,c,g,_,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),t=require("lucide-react"),i=require("react-markdown"),a=require("remark-gfm"),s=require("../../api/insightsApi.js"),o=require("./DecisionAdvantageCard.js"),l=require("./CommentsThread.js"),d=require("./insightsContextCore.js"),u=require("./insightsUtils.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=c(i),p=c(a);exports.default=function(i){var a,c,g,v,_,f,j,x=this,m=i.target,w=i.onClose,y=d.useInsights(),b=n.useState(null!==(a=m.reportId)&&void 0!==a?a:null),k=b[0],I=b[1],C=n.useState(null),D=C[0],N=C[1],R=n.useState(!1),A=R[0],q=R[1],T=n.useState(null),S=T[0],L=T[1],E=n.useState(!1),K=E[0],P=E[1],B=n.useRef(null);n.useEffect(function(){var e;I(null!==(e=m.reportId)&&void 0!==e?e:null),N(null),q(!1),L(null),P(!1)},[m]),n.useEffect(function(){var e;null===(e=B.current)||void 0===e||e.focus();var r=function(e){return"Escape"===e.key&&w()};return window.addEventListener("keydown",r),function(){return window.removeEventListener("keydown",r)}},[w]);var F=u.useInsightsFetch(y&&k?function(e){return s.fetchInsightsReport(y.api,k,e)}:null,[k,null==y?void 0:y.api.configId,null==y?void 0:y.revision],"".concat(null!==(c=null==y?void 0:y.api.configId)&&void 0!==c?c:"",":").concat(null!=k?k:"")),U=u.useJob(D,null!==(g=null==y?void 0:y.api)&&void 0!==g?g:null,function(e){N(null),e===k?F.reload():e&&I(e)});if(n.useEffect(function(){U.error&&L(U.error)},[U.error]),!y)return null;var M,O=Boolean(m.nodeKey&&m.kpiId&&m.dataDay),W=function(r){return void 0===r&&(r=!1),e.__awaiter(x,void 0,void 0,function(){var n,t;return e.__generator(this,function(i){switch(i.label){case 0:if(!O)return[2];L(null),q(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,s.generateInsightsReport(y.api,e.__assign({nodeKey:m.nodeKey,kpiId:m.kpiId,dataDay:m.dataDay},r?{force:!0}:{}))];case 2:return"report"===(n=i.sent()).kind?(N(null),n.report.reportId===k?F.reload():I(n.report.reportId)):N(n.jobId),[3,5];case 3:return t=i.sent(),N(null),L(429===(null==(a=t)?void 0:a.status)?a.message:"RateLimited"===(null==a?void 0:a.errorType)?"This dashboard has asked for 20 reports this hour. Try again later.":"QueueUnavailable"===(null==a?void 0:a.errorType)?"Reports can't be written right now. Try again in a few minutes.":(null==a?void 0:a.message)||"The report couldn't be written."),[3,5];case 4:return q(!1),[7];case 5:return[2]}var a})})},J=m.title||[m.kpiId?y.kpiLabel(m.kpiId):"",m.dataDay?u.shortDay(m.dataDay):""].filter(Boolean).join(" · ")||"Decision Advantage",Q=F.loading?void 0:F.data,V=y.levelOf(null===(v=null==Q?void 0:Q.node)||void 0===v?void 0:v.entityKey),X=Q?e.__spreadArray(e.__spreadArray(["L".concat(V," report")],V>1&&(null===(_=Q.node)||void 0===_?void 0:_.label)?[Q.node.label]:[],!0),m.kpiId?[y.kpiLabel(m.kpiId)]:[],!0).join(" · "):J,z=A||Boolean(D&&"failed"!==U.status);return M=k?F.error?r.jsx(o.InsightsStateCard,{title:"Decision Advantage",heading:"Couldn't load the report",text:F.error.message,action:r.jsxs("button",e.__assign({type:"button",className:"ins-link",onClick:F.reload},{children:[r.jsx(t.RefreshCw,{"aria-hidden":"true"})," Try again"]}))}):Q?r.jsxs(r.Fragment,{children:[r.jsx(o.ReportView,{report:Q.report,title:"Decision Advantage",onRetry:F.reload}),O?r.jsxs("button",e.__assign({type:"button",className:"ins-link",disabled:z,onClick:function(){return W(!0)}},{children:[r.jsx(t.RefreshCw,{"aria-hidden":"true"})," ",z?"Rerunning…":"Rerun RCA"]})):null,Q.markdown?r.jsxs("section",e.__assign({className:"ins-drawer__text"},{children:[r.jsxs("button",e.__assign({type:"button",className:"ins-drawer__text-toggle","aria-expanded":K,onClick:function(){return P(function(e){return!e})}},{children:["Full report ",K?r.jsx(t.ChevronUp,{"aria-hidden":"true"}):r.jsx(t.ChevronDown,{"aria-hidden":"true"})]})),K?r.jsx("div",e.__assign({className:"ins-drawer__markdown"},{children:r.jsx(h.default,e.__assign({remarkPlugins:[p.default]},{children:Q.markdown}))})):null]})):null,Q.report.reportId&&"generated"===Q.report.status?r.jsx(l.default,{reportId:Q.report.reportId}):null]}):r.jsx(o.InsightsSkeleton,{title:"Decision Advantage"}):z?r.jsx(o.InsightsSkeleton,{title:"Writing the report…"}):r.jsx(o.InsightsStateCard,{title:"Decision Advantage",icon:r.jsx(t.PenLine,{"aria-hidden":"true"}),heading:"No report for this change yet",text:O?"Reports are written automatically for the biggest changes. Ask the AI to write one for this change now; it takes a minute or two.":"There's no report for this change.",action:O?r.jsxs("button",e.__assign({type:"button",className:"ins-button",onClick:function(){return W()}},{children:[r.jsx(t.PenLine,{"aria-hidden":"true"})," Write report"]})):null}),r.jsx("div",e.__assign({className:"ins-drawer",role:"presentation",onMouseDown:function(e){return e.target===e.currentTarget&&w()}},{children:r.jsxs("aside",e.__assign({className:"ins-drawer__panel",role:"dialog","aria-modal":"true","aria-label":X},{children:[r.jsxs("header",e.__assign({className:"ins-drawer__header"},{children:[r.jsxs("div",e.__assign({className:"ins-drawer__titles"},{children:[r.jsx("h2",{children:X}),(null==Q?void 0:Q.period)?r.jsxs("p",{children:[u.formatReportDate(Q.period),(null===(j=null===(f=Q.node)||void 0===f?void 0:f.path)||void 0===j?void 0:j.length)?" · ".concat(Q.node.path.join(" › ")):""]}):null]})),r.jsx("button",e.__assign({ref:B,type:"button",className:"ins-icon-button",onClick:w,"aria-label":"Close report"},{children:r.jsx(t.X,{"aria-hidden":"true"})}))]})),r.jsxs("div",e.__assign({className:"ins-drawer__body"},{children:[S?r.jsx("p",e.__assign({className:"ins-error"},{children:S})):null,M]}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=ReportDrawer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../../../_virtual/_tslib.js"),e=require("react/jsx-runtime"),n=require("react"),r=require("lucide-react"),o=require("../../api/insightsApi.js"),l=require("./insightsContextCore.js"),t=require("./insightsUtils.js"),d=require("./agPrimitives.js"),a=require("./AgReport.js"),s=require("./CommentsThread.js");exports.default=function(c){var u,v,p,g,h,m,j,x,f,_,y,I=c.nodeKey,D=c.kpiId,C=c.dataDay,b=c.reportId,k=c.embedded,q=void 0!==k&&k,N=c.onReportDay,R=c.onBack,P=c.onOpenDriver,w=c.backLabel,O=void 0===w?"L1 Report › Top drivers":w,T=c.show,L=void 0===T?{}:T,F=L.summary,S=void 0===F||F,A=L.decision,K=void 0===A||A,M=L.topDrivers,B=void 0===M||M,E=l.useInsights(),H=t.useInsightsFetch(E&&b?function(i){return o.fetchInsightsReport(E.api,b,i)}:null,[null==E?void 0:E.api.configId,b,null==E?void 0:E.revision],"".concat(null!==(u=null==E?void 0:E.api.configId)&&void 0!==u?u:"",":").concat(null!=b?b:"")),U=(null===(p=null===(v=H.data)||void 0===v?void 0:v.period)||void 0===p?void 0:p.end)||C;n.useEffect(function(){var i,e;(null===(e=null===(i=H.data)||void 0===i?void 0:i.period)||void 0===e?void 0:e.end)?null==N||N(H.data.period.end):H.error&&(null==N||N(C))},[C,N,null===(h=null===(g=H.data)||void 0===g?void 0:g.period)||void 0===h?void 0:h.end,H.error]);var V=t.useInsightsFetch(!E||q||b&&!H.data?null:function(i){return o.fetchRowDetail(E.api,I,{kpiId:D,dataDay:U},i)},[null==E?void 0:E.api.configId,I,D,U,q,null==E?void 0:E.revision],"".concat(null!==(m=null==E?void 0:E.api.configId)&&void 0!==m?m:"",":").concat(I,":").concat(D,":").concat(U)),z=t.useInsightsFetch(E&&!b?function(i){return o.fetchRowReport(E.api,I,{kpiId:D,dataDay:U},i)}:null,[null==E?void 0:E.api.configId,I,D,U,b,null==E?void 0:E.revision],"".concat(null!==(j=null==E?void 0:E.api.configId)&&void 0!==j?j:"",":").concat(I,":").concat(D,":").concat(U,":").concat(null!=b?b:""));if(!E)return null;var G=V.data,J=null==G?void 0:G.movement,Q=null!==(f=null===(x=H.data)||void 0===x?void 0:x.report)&&void 0!==f?f:null===(_=z.data)||void 0===_?void 0:_.report,W=b?H.loading:z.loading,X=b?H.error:z.error;return e.jsxs("div",i.__assign({className:"ag-row-detail"},{children:[!q&&R?e.jsxs("button",i.__assign({type:"button",className:"ins-link",onClick:R},{children:[e.jsx(r.ChevronLeft,{"aria-hidden":"true"})," ",O]})):null,q?null:e.jsx("h3",{children:(null==G?void 0:G.label)||"Row details"}),!q&&(null===(y=null==G?void 0:G.path)||void 0===y?void 0:y.length)?e.jsx("p",i.__assign({className:"ag-muted"},{children:G.path.join(" › ")})):null,q||!V.loading||G?null:e.jsx("p",i.__assign({className:"ag-muted"},{children:"Loading row…"})),V.error&&!H.data?e.jsx("p",i.__assign({className:"ins-error"},{children:V.error.message})):null,!q&&G?e.jsxs(e.Fragment,{children:[e.jsxs("div",i.__assign({className:"ag-driver__chips"},{children:[e.jsx(d.CriticalityChip,{criticality:null==J?void 0:J.criticality}),e.jsx(d.MovementChip,{movementType:null==J?void 0:J.movementType,direction:null==J?void 0:J.direction,good:E.goodDirection(D)})]})),null!=G.shareOfParentPct?e.jsxs("p",{children:[G.shareOfParentPct,"% of parent"]}):null,e.jsx("dl",i.__assign({className:"ag-row-detail__metrics"},{children:Object.entries(G.metrics).map(function(i){var n=i[0],r=i[1];return e.jsxs("div",{children:[e.jsx("dt",{children:E.kpiLabel(n)}),e.jsxs("dd",{children:[t.formatValue(r.value)," ",e.jsx(d.DayOverDayChange,{deltaPct:r.deltaPct,direction:r.direction,tone:r.tone,good:E.goodDirection(n)})]})]},n)})}))]}):null,e.jsxs("div",i.__assign({className:"ag-stack"},{children:[S?e.jsxs("div",{children:[e.jsx(d.SectionHeader,{title:"Summary"}),e.jsx(a.SummaryCard,{report:Q,loading:W,error:X,good:E.goodDirection(D)})]}):null,K?e.jsx(a.DecisionCard,{report:Q,loading:W,error:X}):null,B?e.jsx(a.TopDriversSection,{dataDay:U,parentNodeKey:I,kpiId:D,title:"Top Drivers",graphed:[],onOpenDriver:P}):null,(null==Q?void 0:Q.reportId)?e.jsx(d.ReportAccordion,i.__assign({title:"Comments".concat(Q.commentCount?" (".concat(Q.commentCount,")"):"")},{children:e.jsx(s.default,{reportId:Q.reportId})})):null]}))]}))};
|
|
2
2
|
//# sourceMappingURL=RowDetail.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"),a=require("react"),t=require("lucide-react"),r="#E11D48",s="#15803D",i="#5928ED",o="#0F172A",l=function(e,n){return e===n};function c(e,n){var a=!("down"===n||"decrease"===n);switch(e){case"spike":return{label:"Spiking up",dir:"up"};case"drop":return{label:"Spiking down",dir:"down"};case"fast_mover":return{label:a?"Picking up":"Cooling off",dir:a?"up":"down"};case"slow_mover":return{label:a?"Trending up":"Trending down",dir:a?"up":"down"};case"new_entity":return{label:"Just appeared",dir:"flat"};case"dormant_entity":return{label:"Gone quiet",dir:"flat"};case"recovered":return{label:"Recovered",dir:"flat"};case"stable":return{label:"Steady",dir:"flat"};default:return null}}var d={Critical:"ag-tone--critical",High:"ag-tone--high",Medium:"ag-tone--medium",Low:"ag-tone--low"};function u(a){var t=a.children,r=a.tone,s=a.compact,i=void 0!==s&&s;return n.jsx("span",e.__assign({className:"ag-token".concat(i?" ag-token--compact":""," ").concat(r)},{children:t}))}function g(e,n){return null!=e&&Number.isFinite(e)?Math.abs(e)<1e-4?"flat":l(e>0?"up":"down",n)?"good":"bad":null}function p(a){var r=a.label,s=a.value,i=a.change,o=a.good,l=void 0===i?null:g(i,void 0===o?"up":o),c="flat"===l?t.Minus:null!=i&&i>0?t.ArrowUpRight:t.ArrowDownRight;return n.jsxs("div",e.__assign({className:"ag-metric"},{children:[n.jsx("div",e.__assign({className:"ag-metric__label"},{children:r})),n.jsxs("div",e.__assign({className:"ag-metric__row"},{children:[n.jsx("div",e.__assign({className:"ag-metric__value".concat(l&&"flat"!==l?" ag-metric__value--".concat(l):"")},{children:s})),l?n.jsxs("span",e.__assign({className:"ag-metric__badge ag-metric__badge--".concat(l)},{children:[n.jsx(c,{"aria-hidden":"true"}),"flat"===l?"No change":i>0?"Going up":"Going down"]})):null]}))]}))}var v=/([↑↓]\s?[\d,]+(?:\.\d+)?%)/;function _(t){var r=t.text,s=t.good,i=void 0===s?"up":s,o=t.tone,c=t.renderText;return n.jsx(n.Fragment,{children:r.split(v).map(function(t,r){return r%2==1?n.jsx("span",e.__assign({className:"ag-arrow ag-arrow--".concat(null!=o?o:l(t.startsWith("↑")?"up":"down",i)?"good":"bad")},{children:t}),r):c?n.jsx(a.Fragment,{children:c(t)},r):t})})}var h=/^(Good news|Bad news)\s*[-–—]\s*([\s\S]*)$/;function m(e){var n=e.match(h);return n?{prefix:n[1],rest:n[2]}:{prefix:null,rest:e}}var x=[{value:!1,label:"Complete",hint:"Every calendar day"},{value:!0,label:"Working Days",hint:"Weekdays only, weekends left out"}];exports.ArrowColoredText=_,exports.CRITICALITY_TONE=d,exports.ChartSkeleton=function(a){var t=a.height,r=void 0===t?260:t,s=a.label,i=void 0===s?"Loading chart":s;return n.jsx("div",e.__assign({className:"ag-skel-chart",style:{height:r},"aria-busy":"true","aria-label":i},{children:n.jsx("svg",e.__assign({viewBox:"0 0 400 120",preserveAspectRatio:"none","aria-hidden":"true"},{children:n.jsx("polyline",{points:"0,90 50,70 100,78 150,50 200,62 250,38 300,52 350,30 400,44"})}))}))},exports.CollapsibleVisualSection=function(r){var s=r.title,i=r.meta,o=r.action,l=r.children,c=r.className,d=void 0===c?"":c,u=a.useState(!0),g=u[0],p=u[1];return n.jsxs("section",e.__assign({className:"ag-visual".concat(g?"":" is-collapsed"," ").concat(d).trim()},{children:[n.jsxs("div",e.__assign({className:"ag-visual__head"},{children:[n.jsxs("div",e.__assign({className:"ag-visual__title"},{children:[n.jsx("span",{children:s}),i?n.jsx("span",e.__assign({className:"ag-meta-chip"},{children:i})):null]})),g?o:null,n.jsx("button",e.__assign({type:"button",className:"ag-icon-button","aria-label":"".concat(g?"Collapse":"Expand"," ").concat(s),"aria-expanded":g,onClick:function(){return p(function(e){return!e})}},{children:n.jsx(t.ChevronDown,{"aria-hidden":"true",className:g?"is-open":"is-closed"})}))]})),g?l:null]}))},exports.CriticalityChip=function(a){var t=a.criticality,r=a.compact,s=void 0===r||r;return t&&d[t]?n.jsx(u,e.__assign({compact:s,tone:d[t]},{children:t})):null},exports.DayOverDayChange=function(a){var t=a.deltaPct,r=a.good,s=void 0===r?"up":r,i=a.suffix,o=void 0===i?"vs last day":i,l=a.direction,c=a.tone;if(null==t||!Number.isFinite(t))return null;var d=Math.round(Math.abs(t)),u="up"===l?"↑":"down"===l?"↓":"flat"===l||0===d?"→":t>0?"↑":"↓",p="good"===c||"bad"===c||"flat"===c?c:0===d?"flat":g(t,s);return n.jsxs("span",e.__assign({className:"ag-dod"},{children:[n.jsxs("span",e.__assign({className:"ag-dod__value ag-dod__value--".concat(p)},{children:[d,"% ",u]})),n.jsx("span",e.__assign({className:"ag-dod__suffix"},{children:o}))]}))},exports.DaysDropdown=function(r){var s,i,o,l,c=r.value,d=r.onChange,u=r.disabled,g=r.groups,p=r.group,v=r.onGroupChange,_=a.useState(!1),h=_[0],m=_[1],f=a.useState(0),b=f[0],w=f[1],j=a.useRef(null),y=a.useRef(null),N=a.useId(),k=(null==g?void 0:g.length)?g.map(function(e){return{value:e.groupKey,label:e.displayName,hint:e.description}}):x,C=k.findIndex(function(e){return e.value===((null==g?void 0:g.length)?p:c)});a.useEffect(function(){var e;if(h){w(Math.max(0,C)),null===(e=y.current)||void 0===e||e.focus();var n=function(e){var n;(null===(n=j.current)||void 0===n?void 0:n.contains(e.target))||m(!1)};return document.addEventListener("mousedown",n),function(){return document.removeEventListener("mousedown",n)}}},[h]);var D=function(e){var n,a;m(!1),null===(a=null===(n=j.current)||void 0===n?void 0:n.querySelector("button"))||void 0===a||a.focus();var t=k[e].value;"string"==typeof t?null==v||v(t):t!==c&&d(t)};return n.jsxs("div",e.__assign({className:"ag-dd".concat(h?" is-open":""),ref:j},{children:[n.jsxs("button",e.__assign({type:"button",className:"ag-dd__button","aria-haspopup":"listbox","aria-expanded":h,"aria-controls":"".concat(N,"-list"),"aria-label":"Days to show: ".concat(null!==(i=null===(s=k[C])||void 0===s?void 0:s.label)&&void 0!==i?i:"Complete"),disabled:u,onClick:function(){return m(function(e){return!e})},onKeyDown:function(e){["ArrowDown","ArrowUp"].includes(e.key)&&(e.preventDefault(),m(!0))}},{children:[n.jsx(t.CalendarDays,{"aria-hidden":"true",className:"ag-dd__icon"}),n.jsx("span",{children:null!==(l=null===(o=k[C])||void 0===o?void 0:o.label)&&void 0!==l?l:"Complete"}),n.jsx(t.ChevronDown,{"aria-hidden":"true",className:"ag-dd__chevron"})]})),h?n.jsx("ul",e.__assign({ref:y,id:"".concat(N,"-list"),className:"ag-dd__menu",role:"listbox",tabIndex:-1,"aria-label":"Days to show","aria-activedescendant":"".concat(N,"-opt-").concat(b),onKeyDown:function(e){var n,a;if("ArrowDown"===e.key)w(function(e){return Math.min(k.length-1,e+1)});else if("ArrowUp"===e.key)w(function(e){return Math.max(0,e-1)});else if("Home"===e.key)w(0);else if("End"===e.key)w(k.length-1);else if("Enter"===e.key||" "===e.key)D(b);else if("Escape"===e.key)m(!1),null===(a=null===(n=j.current)||void 0===n?void 0:n.querySelector("button"))||void 0===a||a.focus();else{if("Tab"!==e.key)return;m(!1)}"Tab"!==e.key&&e.preventDefault()}},{children:k.map(function(a,r){return n.jsxs("li",e.__assign({id:"".concat(N,"-opt-").concat(r),role:"option","aria-selected":r===C,className:"ag-dd__option".concat(r===b?" is-active":"").concat(r===C?" is-selected":""),onMouseEnter:function(){return w(r)},onMouseDown:function(e){return e.preventDefault()},onClick:function(){return D(r)}},{children:[n.jsxs("span",e.__assign({className:"ag-dd__text"},{children:[n.jsx("span",e.__assign({className:"ag-dd__label"},{children:a.label})),n.jsx("span",e.__assign({className:"ag-dd__hint"},{children:a.hint}))]})),r===C?n.jsx(t.Check,{"aria-hidden":"true",className:"ag-dd__check"}):null]}),a.label)})})):null]}))},exports.Metric=p,exports.MetricsSkeleton=function(a){var t=a.count,r=void 0===t?4:t;return n.jsx("div",e.__assign({className:"ag-metrics".concat(4===r?" ag-metrics--four":""),"aria-busy":"true","aria-label":"Loading averages"},{children:Array.from({length:r},function(a,t){return n.jsxs("div",e.__assign({className:"ag-metric"},{children:[n.jsx("span",{className:"ag-skel__line",style:{width:"60%"}}),n.jsx("span",{className:"ag-skel__line ag-skel__line--big",style:{width:"45%"}})]}),t)})}))},exports.MovementChip=function(a){var r=c(a.movementType,a.direction);return r?n.jsxs(u,e.__assign({compact:!0,tone:"ag-tone--movement-".concat(r.dir)},{children:["up"===r.dir?n.jsx(t.TrendingUp,{"aria-hidden":"true"}):"down"===r.dir?n.jsx(t.TrendingDown,{"aria-hidden":"true"}):null,r.label]})):null},exports.ReportAccordion=function(r){var s=r.title,i=r.defaultExpanded,o=void 0===i||i,l=r.children,c=a.useState(o),d=c[0],u=c[1];return n.jsxs("section",e.__assign({className:"ag-accordion"},{children:[n.jsx("h3",{children:n.jsxs("button",e.__assign({type:"button","aria-expanded":d,onClick:function(){return u(function(e){return!e})}},{children:[s,n.jsx(t.ChevronDown,{"aria-hidden":"true",className:d?"is-open":"is-closed"})]}))}),d?n.jsx("div",e.__assign({className:"ag-accordion__body"},{children:l})):null]}))},exports.SectionHeader=function(a){var t=a.title,r=a.meta,s=a.action;return n.jsxs("div",e.__assign({className:"ag-section-header"},{children:[n.jsxs("div",e.__assign({className:"ag-section-header__title"},{children:[n.jsx("h4",{children:t}),r?n.jsx("span",e.__assign({className:"ag-meta-chip"},{children:r})):null]})),s]}))},exports.SkeletonLines=function(a){var t=a.widths,r=void 0===t?[40,90,75]:t,s=a.label,i=void 0===s?"Loading":s;return n.jsx("div",e.__assign({className:"ag-skel","aria-busy":"true","aria-label":i},{children:r.map(function(e,a){return n.jsx("span",{className:"ag-skel__line",style:{width:"".concat(e,"%")}},a)})}))},exports.StatusToken=u,exports.TrendMetricsSection=function(a){var t=a.dailyLabel,r=a.daily,s=a.fast,i=a.slow,o=a.long,l=a.windows,c=a.good,d=a.format,u=null!=s&&null!=i?s-i:null,g=null!=i&&null!=o?i-o:null;return n.jsxs("div",e.__assign({className:"ag-metrics".concat(t?" ag-metrics--four":"")},{children:[t?n.jsx(p,{label:t,value:d(r)}):null,n.jsx(p,{label:"".concat(l.fast,"-day average"),value:d(s),change:u,good:c}),n.jsx(p,{label:"".concat(l.slow,"-day average"),value:d(i)}),n.jsx(p,{label:"".concat(l.long,"-day average"),value:d(o),change:g,good:c})]}))},exports.VerdictSentence=function(a){var t=a.text,r=a.good,s=void 0===r?"up":r,i=a.arrowsFollowVerdict,o=void 0!==i&&i,l=a.renderText,c=m(t.trim()),d=c.prefix,u=c.rest;return d?n.jsxs(n.Fragment,{children:[n.jsx("span",e.__assign({className:"Good news"===d?"ag-verdict--good":"ag-verdict--bad"},{children:d}))," - ",n.jsx(_,{text:u,good:s,tone:o?"Good news"===d?"good":"bad":void 0,renderText:l})]}):n.jsx(_,{text:u,good:s,renderText:l})},exports.formatHeaderDate=function(e){if(!e)return"";var n=e.slice(0,10).split("-").map(Number),a=n[0],t=n[1],r=n[2];return a&&t&&r?new Date(a,t-1,r).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):e},exports.getMovementPhrase=c,exports.linkedText=function(a,t){if((null==a?void 0:a.length)&&t){var r=new Map(a.map(function(e){return[e.label,e]})),s=Array.from(r.keys()).sort(function(e,n){return n.length-e.length}).map(function(e){return e.replace(/[.*+?^$(){}|[\]\\]/g,"\\$&")}).join("|"),i=new RegExp("(?<![\\w.])("+s+")(?![\\w])");return function(a){return a.split(i).map(function(a,s){var i=s%2==1?r.get(a):void 0;return i?n.jsx("button",e.__assign({type:"button",className:"ag-rowlink",title:"Open the latest report for ".concat(i.label),onClick:function(){return t(i)}},{children:a}),s):a})}}},exports.movementColorHex=function(e,n,a){return void 0===a&&(a="up"),"spike"===e||"drop"===e?l("spike"===e?"up":"down",a)?s:r:null==e?"#2563EB":"stable"===e?o:"recovered"!==e||"up"!==n&&"down"!==n?i:l(n,a)?s:r},exports.movementVerdictLabel=function(e,n){switch(e){case"spike":case"drop":return"Significant change";case"fast_mover":case"slow_mover":return"down"===n||"decrease"===n?"Trending down":"Trending up";case"new_entity":return"New entity";case"dormant_entity":return"Now dormant";case"recovered":return"Recovered";default:return"No significant change"}},exports.splitVerdict=m,exports.toneOf=g,exports.tooltipSafeColorHex=function(e){return e===o?"#F1F5F9":e===i?"#C4B5FD":e},exports.verdictToneHex=function(e){return"good"===e?s:"bad"===e?r:i};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),a=require("react"),t=require("lucide-react"),r="#E11D48",s="#15803D",i="#5928ED",o="#0F172A",l=function(e,n){return e===n};function c(e,n){return"up"===n||"increase"===n?"up":"down"===n||"decrease"===n?"down":"spike"===e?"up":"drop"===e?"down":null}function d(e,n){var a="down"!==c(e,n);switch(e){case"spike":case"drop":return{label:a?"Spiking up":"Spiking down",dir:a?"up":"down"};case"fast_mover":return{label:a?"Picking up":"Cooling off",dir:a?"up":"down"};case"slow_mover":return{label:a?"Trending up":"Trending down",dir:a?"up":"down"};case"new_entity":return{label:"Just appeared",dir:"flat"};case"dormant_entity":return{label:"Gone quiet",dir:"flat"};case"recovered":return{label:"Recovered",dir:"flat"};case"stable":return{label:"Steady",dir:"flat"};default:return null}}var u={Critical:"ag-tone--critical",High:"ag-tone--high",Medium:"ag-tone--medium",Low:"ag-tone--low"};function g(a){var t=a.children,r=a.tone,s=a.compact,i=void 0!==s&&s;return n.jsx("span",e.__assign({className:"ag-token".concat(i?" ag-token--compact":""," ").concat(r)},{children:t}))}function p(e,n){return null!=e&&Number.isFinite(e)?Math.abs(e)<1e-4?"flat":l(e>0?"up":"down",n)?"good":"bad":null}function v(a){var r=a.label,s=a.value,i=a.change,o=a.good,l=void 0===i?null:p(i,void 0===o?"up":o),c="flat"===l?t.Minus:null!=i&&i>0?t.ArrowUpRight:t.ArrowDownRight;return n.jsxs("div",e.__assign({className:"ag-metric"},{children:[n.jsx("div",e.__assign({className:"ag-metric__label"},{children:r})),n.jsxs("div",e.__assign({className:"ag-metric__row"},{children:[n.jsx("div",e.__assign({className:"ag-metric__value".concat(l&&"flat"!==l?" ag-metric__value--".concat(l):"")},{children:s})),l?n.jsxs("span",e.__assign({className:"ag-metric__badge ag-metric__badge--".concat(l)},{children:[n.jsx(c,{"aria-hidden":"true"}),"flat"===l?"No change":i>0?"Going up":"Going down"]})):null]}))]}))}var _=/([↑↓]\s?[\d,]+(?:\.\d+)?%)/;function h(t){var r=t.text,s=t.good,i=void 0===s?"up":s,o=t.tone,c=t.renderText;return n.jsx(n.Fragment,{children:r.split(_).map(function(t,r){return r%2==1?n.jsx("span",e.__assign({className:"ag-arrow ag-arrow--".concat(null!=o?o:l(t.startsWith("↑")?"up":"down",i)?"good":"bad")},{children:t}),r):c?n.jsx(a.Fragment,{children:c(t)},r):t})})}var f=/^(Good news|Bad news)\s*[-–—]\s*([\s\S]*)$/;function m(e){var n=e.match(f);return n?{prefix:n[1],rest:n[2]}:{prefix:null,rest:e}}var x=[{value:!1,label:"Complete",hint:"Every calendar day"},{value:!0,label:"Working Days",hint:"Weekdays only, weekends left out"}];exports.ArrowColoredText=h,exports.CRITICALITY_TONE=u,exports.ChartSkeleton=function(a){var t=a.height,r=void 0===t?260:t,s=a.label,i=void 0===s?"Loading chart":s;return n.jsx("div",e.__assign({className:"ag-skel-chart",style:{height:r},"aria-busy":"true","aria-label":i},{children:n.jsx("svg",e.__assign({viewBox:"0 0 400 120",preserveAspectRatio:"none","aria-hidden":"true"},{children:n.jsx("polyline",{points:"0,90 50,70 100,78 150,50 200,62 250,38 300,52 350,30 400,44"})}))}))},exports.CollapsibleVisualSection=function(r){var s=r.title,i=r.meta,o=r.action,l=r.children,c=r.className,d=void 0===c?"":c,u=a.useState(!0),g=u[0],p=u[1];return n.jsxs("section",e.__assign({className:"ag-visual".concat(g?"":" is-collapsed"," ").concat(d).trim()},{children:[n.jsxs("div",e.__assign({className:"ag-visual__head"},{children:[n.jsxs("div",e.__assign({className:"ag-visual__title"},{children:[n.jsx("span",{children:s}),i?n.jsx("span",e.__assign({className:"ag-meta-chip"},{children:i})):null]})),g?o:null,n.jsx("button",e.__assign({type:"button",className:"ag-icon-button","aria-label":"".concat(g?"Collapse":"Expand"," ").concat(s),"aria-expanded":g,onClick:function(){return p(function(e){return!e})}},{children:n.jsx(t.ChevronDown,{"aria-hidden":"true",className:g?"is-open":"is-closed"})}))]})),g?l:null]}))},exports.CriticalityChip=function(a){var t=a.criticality,r=a.compact,s=void 0===r||r;return t&&u[t]?n.jsx(g,e.__assign({compact:s,tone:u[t]},{children:t})):null},exports.DayOverDayChange=function(a){var t=a.deltaPct,r=a.good,s=void 0===r?"up":r,i=a.suffix,o=void 0===i?"vs last day":i,l=a.direction,c=a.tone;if(null==t||!Number.isFinite(t))return null;var d=Math.round(Math.abs(t)),u="up"===l?"↑":"down"===l?"↓":"flat"===l||0===d?"→":t>0?"↑":"↓",g="good"===c||"bad"===c||"flat"===c?c:0===d?"flat":p(t,s);return n.jsxs("span",e.__assign({className:"ag-dod"},{children:[n.jsxs("span",e.__assign({className:"ag-dod__value ag-dod__value--".concat(g)},{children:[d,"% ",u]})),n.jsx("span",e.__assign({className:"ag-dod__suffix"},{children:o}))]}))},exports.DaysDropdown=function(r){var s,i,o,l,c=r.value,d=r.onChange,u=r.disabled,g=r.groups,p=r.group,v=r.onGroupChange,_=a.useState(!1),h=_[0],f=_[1],m=a.useState(0),b=m[0],w=m[1],j=a.useRef(null),y=a.useRef(null),N=a.useId(),k=(null==g?void 0:g.length)?g.map(function(e){return{value:e.groupKey,label:e.displayName,hint:e.description}}):x,C=k.findIndex(function(e){return e.value===((null==g?void 0:g.length)?p:c)});a.useEffect(function(){var e;if(h){w(Math.max(0,C)),null===(e=y.current)||void 0===e||e.focus();var n=function(e){var n;(null===(n=j.current)||void 0===n?void 0:n.contains(e.target))||f(!1)};return document.addEventListener("mousedown",n),function(){return document.removeEventListener("mousedown",n)}}},[h]);var D=function(e){var n,a;f(!1),null===(a=null===(n=j.current)||void 0===n?void 0:n.querySelector("button"))||void 0===a||a.focus();var t=k[e].value;"string"==typeof t?null==v||v(t):t!==c&&d(t)};return n.jsxs("div",e.__assign({className:"ag-dd".concat(h?" is-open":""),ref:j},{children:[n.jsxs("button",e.__assign({type:"button",className:"ag-dd__button","aria-haspopup":"listbox","aria-expanded":h,"aria-controls":"".concat(N,"-list"),"aria-label":"Days to show: ".concat(null!==(i=null===(s=k[C])||void 0===s?void 0:s.label)&&void 0!==i?i:"Complete"),disabled:u,onClick:function(){return f(function(e){return!e})},onKeyDown:function(e){["ArrowDown","ArrowUp"].includes(e.key)&&(e.preventDefault(),f(!0))}},{children:[n.jsx(t.CalendarDays,{"aria-hidden":"true",className:"ag-dd__icon"}),n.jsx("span",{children:null!==(l=null===(o=k[C])||void 0===o?void 0:o.label)&&void 0!==l?l:"Complete"}),n.jsx(t.ChevronDown,{"aria-hidden":"true",className:"ag-dd__chevron"})]})),h?n.jsx("ul",e.__assign({ref:y,id:"".concat(N,"-list"),className:"ag-dd__menu",role:"listbox",tabIndex:-1,"aria-label":"Days to show","aria-activedescendant":"".concat(N,"-opt-").concat(b),onKeyDown:function(e){var n,a;if("ArrowDown"===e.key)w(function(e){return Math.min(k.length-1,e+1)});else if("ArrowUp"===e.key)w(function(e){return Math.max(0,e-1)});else if("Home"===e.key)w(0);else if("End"===e.key)w(k.length-1);else if("Enter"===e.key||" "===e.key)D(b);else if("Escape"===e.key)f(!1),null===(a=null===(n=j.current)||void 0===n?void 0:n.querySelector("button"))||void 0===a||a.focus();else{if("Tab"!==e.key)return;f(!1)}"Tab"!==e.key&&e.preventDefault()}},{children:k.map(function(a,r){return n.jsxs("li",e.__assign({id:"".concat(N,"-opt-").concat(r),role:"option","aria-selected":r===C,className:"ag-dd__option".concat(r===b?" is-active":"").concat(r===C?" is-selected":""),onMouseEnter:function(){return w(r)},onMouseDown:function(e){return e.preventDefault()},onClick:function(){return D(r)}},{children:[n.jsxs("span",e.__assign({className:"ag-dd__text"},{children:[n.jsx("span",e.__assign({className:"ag-dd__label"},{children:a.label})),n.jsx("span",e.__assign({className:"ag-dd__hint"},{children:a.hint}))]})),r===C?n.jsx(t.Check,{"aria-hidden":"true",className:"ag-dd__check"}):null]}),a.label)})})):null]}))},exports.Metric=v,exports.MetricsSkeleton=function(a){var t=a.count,r=void 0===t?4:t;return n.jsx("div",e.__assign({className:"ag-metrics".concat(4===r?" ag-metrics--four":""),"aria-busy":"true","aria-label":"Loading averages"},{children:Array.from({length:r},function(a,t){return n.jsxs("div",e.__assign({className:"ag-metric"},{children:[n.jsx("span",{className:"ag-skel__line",style:{width:"60%"}}),n.jsx("span",{className:"ag-skel__line ag-skel__line--big",style:{width:"45%"}})]}),t)})}))},exports.MovementChip=function(a){var r=a.movementType,s=a.direction,i=a.good,o=void 0===i?"up":i,c=d(r,s);if(!c)return null;var u="flat"===c.dir?"flat":l(c.dir,o)?"good":"bad";return n.jsxs(g,e.__assign({compact:!0,tone:"ag-tone--movement-".concat(u)},{children:["up"===c.dir?n.jsx(t.TrendingUp,{"aria-hidden":"true"}):"down"===c.dir?n.jsx(t.TrendingDown,{"aria-hidden":"true"}):null,c.label]}))},exports.ReportAccordion=function(r){var s=r.title,i=r.defaultExpanded,o=void 0===i||i,l=r.children,c=a.useState(o),d=c[0],u=c[1];return n.jsxs("section",e.__assign({className:"ag-accordion"},{children:[n.jsx("h3",{children:n.jsxs("button",e.__assign({type:"button","aria-expanded":d,onClick:function(){return u(function(e){return!e})}},{children:[s,n.jsx(t.ChevronDown,{"aria-hidden":"true",className:d?"is-open":"is-closed"})]}))}),d?n.jsx("div",e.__assign({className:"ag-accordion__body"},{children:l})):null]}))},exports.SectionHeader=function(a){var t=a.title,r=a.meta,s=a.action;return n.jsxs("div",e.__assign({className:"ag-section-header"},{children:[n.jsxs("div",e.__assign({className:"ag-section-header__title"},{children:[n.jsx("h4",{children:t}),r?n.jsx("span",e.__assign({className:"ag-meta-chip"},{children:r})):null]})),s]}))},exports.SkeletonLines=function(a){var t=a.widths,r=void 0===t?[40,90,75]:t,s=a.label,i=void 0===s?"Loading":s;return n.jsx("div",e.__assign({className:"ag-skel","aria-busy":"true","aria-label":i},{children:r.map(function(e,a){return n.jsx("span",{className:"ag-skel__line",style:{width:"".concat(e,"%")}},a)})}))},exports.StatusToken=g,exports.TrendMetricsSection=function(a){var t=a.dailyLabel,r=a.daily,s=a.fast,i=a.slow,o=a.long,l=a.windows,c=a.good,d=a.format,u=null!=s&&null!=i?s-i:null,g=null!=i&&null!=o?i-o:null;return n.jsxs("div",e.__assign({className:"ag-metrics".concat(t?" ag-metrics--four":"")},{children:[t?n.jsx(v,{label:t,value:d(r)}):null,n.jsx(v,{label:"".concat(l.fast,"-day average"),value:d(s),change:u,good:c}),n.jsx(v,{label:"".concat(l.slow,"-day average"),value:d(i)}),n.jsx(v,{label:"".concat(l.long,"-day average"),value:d(o),change:g,good:c})]}))},exports.VerdictSentence=function(a){var t=a.text,r=a.good,s=void 0===r?"up":r,i=a.arrowsFollowVerdict,o=void 0!==i&&i,l=a.renderText,c=m(t.trim()),d=c.prefix,u=c.rest;return d?n.jsxs(n.Fragment,{children:[n.jsx("span",e.__assign({className:"Good news"===d?"ag-verdict--good":"ag-verdict--bad"},{children:d}))," - ",n.jsx(h,{text:u,good:s,tone:o?"Good news"===d?"good":"bad":void 0,renderText:l})]}):n.jsx(h,{text:u,good:s,renderText:l})},exports.formatHeaderDate=function(e){if(!e)return"";var n=e.slice(0,10).split("-").map(Number),a=n[0],t=n[1],r=n[2];return a&&t&&r?new Date(a,t-1,r).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):e},exports.getMovementPhrase=d,exports.linkedText=function(a,t){if((null==a?void 0:a.length)&&t){var r=new Map(a.map(function(e){return[e.label,e]})),s=Array.from(r.keys()).sort(function(e,n){return n.length-e.length}).map(function(e){return e.replace(/[.*+?^$(){}|[\]\\]/g,"\\$&")}).join("|"),i=new RegExp("(?<![\\w.])("+s+")(?![\\w])");return function(a){return a.split(i).map(function(a,s){var i=s%2==1?r.get(a):void 0;return i?n.jsx("button",e.__assign({type:"button",className:"ag-rowlink",title:"Open the latest report for ".concat(i.label),onClick:function(){return t(i)}},{children:a}),s):a})}}},exports.movementColorHex=function(e,n,a){if(void 0===a&&(a="up"),"spike"===e||"drop"===e){var t=c(e,n);return l(t,a)?s:r}return null==e?"#2563EB":"stable"===e?o:"recovered"!==e||"up"!==n&&"down"!==n?i:l(n,a)?s:r},exports.movementVerdictLabel=function(e,n){switch(e){case"spike":case"drop":return"Significant change";case"fast_mover":case"slow_mover":return"down"===n||"decrease"===n?"Trending down":"Trending up";case"new_entity":return"New entity";case"dormant_entity":return"Now dormant";case"recovered":return"Recovered";default:return"No significant change"}},exports.splitVerdict=m,exports.toneOf=p,exports.tooltipSafeColorHex=function(e){return e===o?"#F1F5F9":e===i?"#C4B5FD":e},exports.verdictToneHex=function(e){return"good"===e?s:"bad"===e?r:i};
|
|
2
2
|
//# sourceMappingURL=agPrimitives.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react"),t=require("../../api/insightsApi.js"),r=require("./agPrimitives.js"),i=require("./insightsContextCore.js");var o=function(e){var n=e.slice(0,10).split("-").map(Number),t=n[0],r=n[1],i=n[2];return new Date(t,(r||1)-1,i||1)};function a(e){if(!(null==e?void 0:e.start)||!(null==e?void 0:e.end))return"";var n=o(e.start),t=o(e.end),r=function(e){return e.getDate()},i=function(e){return e.toLocaleString("en-GB",{month:"short"})};return e.start===e.end?"".concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear()):n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()?"".concat(r(n),"–").concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear()):n.getFullYear()===t.getFullYear()?"".concat(r(n)," ").concat(i(n)," – ").concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear()):"".concat(r(n)," ").concat(i(n)," ").concat(n.getFullYear()," – ").concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear())}var l={spike:"Spike",drop:"Drop",fast_mover:"Fast mover",slow_mover:"Slow mover",new_entity:"New",dormant_entity:"Went quiet",recovered:"Recovered",stable:"Stable"};var s="insights:open-entity-report";var u=function(e,n){return Array.from(new Set(e.map(function(e){return(null!=e?e:"").trim()}).filter(Boolean))).slice(0,n)};exports.OPEN_INSIGHTS_ENTITY_REPORT=s,exports.formatPeriod=a,exports.formatReportDate=function(e){return(null==e?void 0:e.end)?a({start:e.end,end:e.end}):""},exports.formatValue=function(e){return null!=e&&Number.isFinite(e)?String(e):"—"},exports.insightTabItems=function(e){var n,t;return(null!==(t=null===(n=null==e?void 0:e.tabs)||void 0===n?void 0:n.items)&&void 0!==t?t:[]).filter(function(e){return e&&"string"==typeof e.entityKey&&e.entityKey})},exports.isInsightsOn=function(e){var n=null==e?void 0:e.enabled;return!0===n||"string"==typeof n&&["true","yes","y","1"].includes(n.trim().toLowerCase())},exports.movementLabel=function(e){var n;return e?null!==(n=l[e])&&void 0!==n?n:e.replace(/_/g," "):""},exports.previousDayLabel=function(e){var n=e?new Date("".concat(e.slice(0,10),"T00:00:00")).getDay():1;return 0===n||6===n?"vs previous weekend day":"vs previous working day"},exports.reportDecisioning=function(n,t){var r,i,o,a,l;if(!n||"generated"!==n.status)return null;var s=e.__spreadArray(e.__spreadArray([],null!==(r=n.rootCause)&&void 0!==r?r:[],!0),null!==(i=n.nextSteps)&&void 0!==i?i:[],!0).map(function(e){return e.decisioning}).filter(Boolean),c=u(s.flatMap(function(e){var n;return null!==(n=e.decisionMakingFactors)&&void 0!==n?n:[]}),3),d=u(s.flatMap(function(e){var n;return null!==(n=e.gapsInDecision)&&void 0!==n?n:[]}),4);return c.length||d.length||null!=n.score?{explanation:null!=t?t:(null===(o=n.summary)||void 0===o?void 0:o.body)||(null===(a=s[0])||void 0===a?void 0:a.explanation)||void 0,decisionMakingFactors:c,gapsInDecision:d,score:null!==(l=n.score)&&void 0!==l?l:void 0}:null},exports.sentimentColor=function(e,n){return void 0===n&&(n="up"),"up"!==e&&"down"!==e?"#d97706":e===n?"#16a34a":"#dc2626"},exports.shortDay=function(e){var n=String(e);return/^\d{4}-\d{2}-\d{2}/.test(n)?"".concat(n.slice(5,7),"/").concat(n.slice(8,10)):n},exports.summaryCardConfig=function(e){var n=null==e?void 0:e.summaryCard;return n&&!1!==n.enabled?n:null},exports.toRcaItems=function(e,t){return(null!=e?e:[]).map(function(e){var i,o,a,l,s,u,c,d,v,g;return{id:e.id,content:(null===(i=e.links)||void 0===i?void 0:i.length)&&t?n.createElement(r.VerdictSentence,{text:e.content,arrowsFollowVerdict:!0,renderText:r.linkedText(e.links,t)}):/^(Good|Bad) news\s*[-–—]|[↑↓]/.test(e.content)?n.createElement(r.VerdictSentence,{text:e.content,arrowsFollowVerdict:!0}):e.content,decisioning:e.decisioning?{explanation:null!==(o=e.decisioning.explanation)&&void 0!==o?o:void 0,decisionMakingFactors:(null!==(a=e.decisioning.decisionMakingFactors)&&void 0!==a?a:[]).slice(0,3),gapsInDecision:null!==(l=e.decisioning.gapsInDecision)&&void 0!==l?l:[],score:null!==(s=e.decisioning.score)&&void 0!==s?s:void 0,evidence:e.decisioning.evidence?{label:e.decisioning.evidence.label,title:null!==(u=e.decisioning.evidence.title)&&void 0!==u?u:void 0,description:null!==(c=e.decisioning.evidence.description)&&void 0!==c?c:void 0,items:null!==(d=e.decisioning.evidence.items)&&void 0!==d?d:[],highlight:null!==(v=e.decisioning.evidence.highlight)&&void 0!==v?v:void 0,footer:null!==(g=e.decisioning.evidence.footer)&&void 0!==g?g:void 0}:void 0}:void 0}})},exports.useInsightsFetch=function(t,r){var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react"),t=require("../../api/insightsApi.js"),r=require("./agPrimitives.js"),i=require("./insightsContextCore.js");var o=function(e){var n=e.slice(0,10).split("-").map(Number),t=n[0],r=n[1],i=n[2];return new Date(t,(r||1)-1,i||1)};function a(e){if(!(null==e?void 0:e.start)||!(null==e?void 0:e.end))return"";var n=o(e.start),t=o(e.end),r=function(e){return e.getDate()},i=function(e){return e.toLocaleString("en-GB",{month:"short"})};return e.start===e.end?"".concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear()):n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()?"".concat(r(n),"–").concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear()):n.getFullYear()===t.getFullYear()?"".concat(r(n)," ").concat(i(n)," – ").concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear()):"".concat(r(n)," ").concat(i(n)," ").concat(n.getFullYear()," – ").concat(r(t)," ").concat(i(t)," ").concat(t.getFullYear())}var l={spike:"Spike",drop:"Drop",fast_mover:"Fast mover",slow_mover:"Slow mover",new_entity:"New",dormant_entity:"Went quiet",recovered:"Recovered",stable:"Stable"};var s="insights:open-entity-report";var u=function(e,n){return Array.from(new Set(e.map(function(e){return(null!=e?e:"").trim()}).filter(Boolean))).slice(0,n)};exports.OPEN_INSIGHTS_ENTITY_REPORT=s,exports.formatPeriod=a,exports.formatReportDate=function(e){return(null==e?void 0:e.end)?a({start:e.end,end:e.end}):""},exports.formatValue=function(e){return null!=e&&Number.isFinite(e)?String(e):"—"},exports.insightTabItems=function(e){var n,t;return(null!==(t=null===(n=null==e?void 0:e.tabs)||void 0===n?void 0:n.items)&&void 0!==t?t:[]).filter(function(e){return e&&"string"==typeof e.entityKey&&e.entityKey})},exports.isInsightsOn=function(e){var n=null==e?void 0:e.enabled;return!0===n||"string"==typeof n&&["true","yes","y","1"].includes(n.trim().toLowerCase())},exports.movementLabel=function(e){var n;return e?null!==(n=l[e])&&void 0!==n?n:e.replace(/_/g," "):""},exports.previousDayLabel=function(e){var n=e?new Date("".concat(e.slice(0,10),"T00:00:00")).getDay():1;return 0===n||6===n?"vs previous weekend day":"vs previous working day"},exports.reportDecisioning=function(n,t){var r,i,o,a,l;if(!n||"generated"!==n.status)return null;var s=e.__spreadArray(e.__spreadArray([],null!==(r=n.rootCause)&&void 0!==r?r:[],!0),null!==(i=n.nextSteps)&&void 0!==i?i:[],!0).map(function(e){return e.decisioning}).filter(Boolean),c=u(s.flatMap(function(e){var n;return null!==(n=e.decisionMakingFactors)&&void 0!==n?n:[]}),3),d=u(s.flatMap(function(e){var n;return null!==(n=e.gapsInDecision)&&void 0!==n?n:[]}),4);return c.length||d.length||null!=n.score?{explanation:null!=t?t:(null===(o=n.summary)||void 0===o?void 0:o.body)||(null===(a=s[0])||void 0===a?void 0:a.explanation)||void 0,decisionMakingFactors:c,gapsInDecision:d,score:null!==(l=n.score)&&void 0!==l?l:void 0}:null},exports.sentimentColor=function(e,n){return void 0===n&&(n="up"),"up"!==e&&"down"!==e?"#d97706":e===n?"#16a34a":"#dc2626"},exports.shortDay=function(e){var n=String(e);return/^\d{4}-\d{2}-\d{2}/.test(n)?"".concat(n.slice(5,7),"/").concat(n.slice(8,10)):n},exports.summaryCardConfig=function(e){var n=null==e?void 0:e.summaryCard;return n&&!1!==n.enabled?n:null},exports.toRcaItems=function(e,t){return(null!=e?e:[]).map(function(e){var i,o,a,l,s,u,c,d,v,g;return{id:e.id,content:(null===(i=e.links)||void 0===i?void 0:i.length)&&t?n.createElement(r.VerdictSentence,{text:e.content,arrowsFollowVerdict:!0,renderText:r.linkedText(e.links,t)}):/^(Good|Bad) news\s*[-–—]|[↑↓]/.test(e.content)?n.createElement(r.VerdictSentence,{text:e.content,arrowsFollowVerdict:!0}):e.content,decisioning:e.decisioning?{explanation:null!==(o=e.decisioning.explanation)&&void 0!==o?o:void 0,decisionMakingFactors:(null!==(a=e.decisioning.decisionMakingFactors)&&void 0!==a?a:[]).slice(0,3),gapsInDecision:null!==(l=e.decisioning.gapsInDecision)&&void 0!==l?l:[],score:null!==(s=e.decisioning.score)&&void 0!==s?s:void 0,evidence:e.decisioning.evidence?{label:e.decisioning.evidence.label,title:null!==(u=e.decisioning.evidence.title)&&void 0!==u?u:void 0,description:null!==(c=e.decisioning.evidence.description)&&void 0!==c?c:void 0,items:null!==(d=e.decisioning.evidence.items)&&void 0!==d?d:[],highlight:null!==(v=e.decisioning.evidence.highlight)&&void 0!==v?v:void 0,footer:null!==(g=e.decisioning.evidence.footer)&&void 0!==g?g:void 0}:void 0}:void 0}})},exports.useInsightsFetch=function(t,r,i){var o=n.useState({loading:Boolean(t),identityKey:i}),a=o[0],l=o[1],s=n.useState(0),u=s[0],c=s[1],d=n.useRef(t);d.current=t,n.useEffect(function(){var n=d.current;if(n){var t=new AbortController;return l(function(e){return{data:e.identityKey===i?e.data:void 0,loading:!0,identityKey:i}}),n(t.signal).then(function(e){t.signal.aborted||l({data:e,loading:!1,identityKey:i})}).catch(function(e){t.signal.aborted||"AbortError"===(null==e?void 0:e.name)||l({error:e,loading:!1,identityKey:i})}),function(){return t.abort()}}l(function(n){return e.__assign(e.__assign({},n),{data:n.identityKey===i?n.data:void 0,error:void 0,loading:!1,identityKey:i})})},e.__spreadArray(e.__spreadArray([],r,!0),[u,i],!1));var v=void 0===i||a.identityKey===i;return e.__assign(e.__assign({},a),{data:v?a.data:void 0,error:v?a.error:void 0,loading:v?a.loading:Boolean(t),reload:function(){return c(function(e){return e+1})},updateData:function(n){return l(function(t){return e.__assign(e.__assign({},t),{data:n(t.identityKey===i?t.data:void 0),identityKey:i})})}})},exports.useJob=function(r,i,o){var a=this,l=n.useState({status:null,error:null}),s=l[0],u=l[1],c=n.useRef(o);return c.current=o,n.useEffect(function(){if(r&&i){var n,o=!1,l=function(){return e.__awaiter(a,void 0,void 0,function(){var a,s,d;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,t.fetchInsightsJob(i,r)];case 1:return a=e.sent(),o?[2]:(u({status:a.status,error:"failed"===a.status?a.error||"The job failed.":null}),"succeeded"===a.status?null===(d=c.current)||void 0===d||d.call(c,a.reportId):"failed"!==a.status&&(n=setTimeout(l,4e3)),[3,3]);case 2:return s=e.sent(),o||u({status:"failed",error:s.message||"The job couldn't be checked."}),[3,3];case 3:return[2]}})})};return l(),function(){o=!0,clearTimeout(n)}}u({status:null,error:null})},[r,i]),s},exports.useOpenRow=function(){var n=this,r=i.useInsights();return function(i){return e.__awaiter(n,void 0,void 0,function(){var n,o,a,l;return e.__generator(this,function(e){switch(e.label){case 0:if(!r)return[2];if(n=new CustomEvent(s,{detail:i,cancelable:!0}),window.dispatchEvent(n),n.defaultPrevented)return[3,4];if(!(o=r.headlineKpi))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.fetchRowReport(r.api,i.nodeKey,{kpiId:o,dataDay:i.dataDay||t.toIsoDay(r.range.endDate)})];case 2:return a=e.sent(),(null===(l=a.report)||void 0===l?void 0:l.reportId)&&r.openReport({reportId:a.report.reportId,title:i.label}),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}})})}},exports.viewerFromToken=function(e){var n,t,r;try{var i=null==e?void 0:e.replace(/^bearer\s+/i,"").split(".")[1];if(!i)return{email:null,isAdmin:!1};var o=JSON.parse(decodeURIComponent(escape(atob(i.replace(/-/g,"+").replace(/_/g,"/"))))),a=[].concat(null!==(n=o.rolename)&&void 0!==n?n:[],null!==(t=o.role)&&void 0!==t?t:[],null!==(r=o.roles)&&void 0!==r?r:[]).map(String);return{email:o.email||o.sub||null,isAdmin:a.some(function(e){return"cw-admin"===e||/ Admin$/.test(e)})}}catch(e){return{email:null,isAdmin:!1}}};
|
|
2
2
|
//# sourceMappingURL=insightsUtils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),a=require("../../../assets/icons/cognitive_desicioning_icon_brain.svg.js"),c=function(e){return void 0===e&&(e=0),Math.max(0,Math.min(100,Math.round(e)))};function r(n){var s=n.text.split(/(\*\*[^*]+\*\*|`[^`]+`)/g);return i.jsx(i.Fragment,{children:s.map(function(n,s){return/^\*\*[^*]+\*\*$/.test(n)?i.jsx("strong",e.__assign({className:"rca-decision__strong"},{children:n.slice(2,-2)}),s):/^`[^`]+`$/.test(n)?i.jsx("code",e.__assign({className:"rca-decision__code"},{children:n.slice(1,-1)}),s):n})})}function t(n){var c=n.open,r=n.onToggle,t=n.label,o=void 0===t?"cognitive decisioning":t;return i.jsxs("button",e.__assign({type:"button",className:"rca-decision__reasoning-trigger","aria-label":"".concat(c?"Hide":"Show"," ").concat(o),"aria-expanded":c,onClick:r},{children:[i.jsx("img",{src:a.default,alt:""}),c?i.jsx(s.ChevronUp,{"aria-hidden":"true"}):i.jsx(s.ChevronDown,{"aria-hidden":"true"})]}))}function o(r){var t,o,d=r.decisioning,_=n.useState(!1),h=_[0],u=_[1],g=c(d.score),x=null!==(t=d.decisionMakingFactors)&&void 0!==t?t:[],j=null!==(o=d.gapsInDecision)&&void 0!==o?o:[];return i.jsxs("div",e.__assign({className:"rca-decision__reasoning"},{children:[d.explanation?i.jsxs("section",e.__assign({className:"rca-decision__explanation"},{children:[i.jsx("h3",{children:"Explanation"}),i.jsx("div",{children:d.explanation})]})):null,i.jsxs("section",e.__assign({className:"rca-decision__cognitive"},{children:[i.jsxs("button",e.__assign({type:"button",className:"rca-decision__cognitive-toggle","aria-expanded":h,onClick:function(){return u(function(e){return!e})}},{children:[i.jsxs("span",e.__assign({className:"rca-decision__cognitive-title"},{children:[i.jsx("img",{src:a.default,alt:""}),"Cognitive Decisioning AI"]})),i.jsxs("span",e.__assign({className:"rca-decision__score"},{children:[i.jsx(s.Sparkles,{"aria-hidden":"true"}),g,"%"]})),h?i.jsx(s.ChevronUp,{"aria-hidden":"true"}):i.jsx(s.ChevronDown,{"aria-hidden":"true"})]})),h?i.jsxs("div",e.__assign({className:"rca-decision__cognitive-body"},{children:[i.jsx(l,{icon:i.jsx(s.Lightbulb,{"aria-hidden":"true"}),title:"Decision Making Factors",items:x,evidence:d.evidence}),i.jsx(l,{icon:i.jsx(s.Search,{"aria-hidden":"true"}),title:"Gaps in Decision",items:j.length?j:["No gaps identified"]})]})):null]}))]}))}function l(a){var c=a.icon,r=a.title,t=a.items,o=a.evidence,l=n.useState(!1),_=l[0],h=l[1];return t.length?i.jsxs("div",e.__assign({className:"rca-decision__reasoning-section"},{children:[i.jsxs("h4",{children:[i.jsx("span",e.__assign({className:"rca-decision__subsection-icon"},{children:c})),r]}),i.jsx("ol",{children:t.map(function(n,a){return i.jsxs("li",{children:[n,0===a&&o?i.jsxs(i.Fragment,{children:[i.jsxs("button",e.__assign({type:"button",className:"rca-decision__evidence-trigger","aria-expanded":_,onClick:function(){return h(function(e){return!e})}},{children:[i.jsx(s.Sparkles,{"aria-hidden":"true"}),o.label,_?i.jsx(s.ChevronUp,{"aria-hidden":"true"}):i.jsx(s.ChevronDown,{"aria-hidden":"true"})]})),_?i.jsx(d,{evidence:o,onClose:function(){return h(!1)}}):null]}):null]},"".concat(r,"-").concat(a))})})]})):null}function d(n){var a,c,r=n.evidence,t=n.onClose,o=function(e){if(!r.highlight||"string"!=typeof e)return e;var n=e.indexOf(r.highlight);return n<0?e:i.jsxs(i.Fragment,{children:[e.slice(0,n),i.jsx("mark",{children:r.highlight}),e.slice(n+r.highlight.length)]})};return i.jsxs("div",e.__assign({className:"rca-decision__evidence-detail"},{children:[i.jsxs("button",e.__assign({type:"button",className:"rca-decision__evidence-header",onClick:t},{children:[i.jsx("span",{children:null!==(a=r.title)&&void 0!==a?a:r.label}),i.jsx(s.ChevronUp,{"aria-hidden":"true"})]})),i.jsxs("div",e.__assign({className:"rca-decision__evidence-body"},{children:[r.description?i.jsx("p",{children:r.description}):null,null===(c=r.items)||void 0===c?void 0:c.map(function(e,n){return i.jsx("p",{children:o(e)},n)})]})),r.footer?i.jsx("div",e.__assign({className:"rca-decision__evidence-footer"},{children:r.footer})):null]}))}function _(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),a=require("../../../assets/icons/cognitive_desicioning_icon_brain.svg.js"),c=function(e){return void 0===e&&(e=0),Math.max(0,Math.min(100,Math.round(e)))};function r(n){var s=n.text.split(/(\*\*[^*]+\*\*|`[^`]+`)/g);return i.jsx(i.Fragment,{children:s.map(function(n,s){return/^\*\*[^*]+\*\*$/.test(n)?i.jsx("strong",e.__assign({className:"rca-decision__strong"},{children:n.slice(2,-2)}),s):/^`[^`]+`$/.test(n)?i.jsx("code",e.__assign({className:"rca-decision__code"},{children:n.slice(1,-1)}),s):n})})}function t(n){var c=n.open,r=n.onToggle,t=n.label,o=void 0===t?"cognitive decisioning":t;return i.jsxs("button",e.__assign({type:"button",className:"rca-decision__reasoning-trigger","aria-label":"".concat(c?"Hide":"Show"," ").concat(o),"aria-expanded":c,onClick:r},{children:[i.jsx("img",{src:a.default,alt:""}),c?i.jsx(s.ChevronUp,{"aria-hidden":"true"}):i.jsx(s.ChevronDown,{"aria-hidden":"true"})]}))}function o(r){var t,o,d=r.decisioning,_=n.useState(!1),h=_[0],u=_[1],g=c(d.score),x=null!==(t=d.decisionMakingFactors)&&void 0!==t?t:[],j=null!==(o=d.gapsInDecision)&&void 0!==o?o:[];return i.jsxs("div",e.__assign({className:"rca-decision__reasoning"},{children:[d.explanation?i.jsxs("section",e.__assign({className:"rca-decision__explanation"},{children:[i.jsx("h3",{children:"Explanation"}),i.jsx("div",{children:d.explanation})]})):null,i.jsxs("section",e.__assign({className:"rca-decision__cognitive"},{children:[i.jsxs("button",e.__assign({type:"button",className:"rca-decision__cognitive-toggle","aria-expanded":h,onClick:function(){return u(function(e){return!e})}},{children:[i.jsxs("span",e.__assign({className:"rca-decision__cognitive-title"},{children:[i.jsx("img",{src:a.default,alt:""}),"Cognitive Decisioning AI"]})),i.jsxs("span",e.__assign({className:"rca-decision__score"},{children:[i.jsx(s.Sparkles,{"aria-hidden":"true"}),g,"%"]})),h?i.jsx(s.ChevronUp,{"aria-hidden":"true"}):i.jsx(s.ChevronDown,{"aria-hidden":"true"})]})),h?i.jsxs("div",e.__assign({className:"rca-decision__cognitive-body"},{children:[i.jsx(l,{icon:i.jsx(s.Lightbulb,{"aria-hidden":"true"}),title:"Decision Making Factors",items:x,evidence:d.evidence}),i.jsx(l,{icon:i.jsx(s.Search,{"aria-hidden":"true"}),title:"Gaps in Decision",items:j.length?j:["No gaps identified"]})]})):null]}))]}))}function l(a){var c=a.icon,r=a.title,t=a.items,o=a.evidence,l=n.useState(!1),_=l[0],h=l[1];return t.length?i.jsxs("div",e.__assign({className:"rca-decision__reasoning-section"},{children:[i.jsxs("h4",{children:[i.jsx("span",e.__assign({className:"rca-decision__subsection-icon"},{children:c})),r]}),i.jsx("ol",{children:t.map(function(n,a){return i.jsxs("li",{children:[n,0===a&&o?i.jsxs(i.Fragment,{children:[i.jsxs("button",e.__assign({type:"button",className:"rca-decision__evidence-trigger","aria-expanded":_,onClick:function(){return h(function(e){return!e})}},{children:[i.jsx(s.Sparkles,{"aria-hidden":"true"}),o.label,_?i.jsx(s.ChevronUp,{"aria-hidden":"true"}):i.jsx(s.ChevronDown,{"aria-hidden":"true"})]})),_?i.jsx(d,{evidence:o,onClose:function(){return h(!1)}}):null]}):null]},"".concat(r,"-").concat(a))})})]})):null}function d(n){var a,c,r=n.evidence,t=n.onClose,o=function(e){if(!r.highlight||"string"!=typeof e)return e;var n=e.indexOf(r.highlight);return n<0?e:i.jsxs(i.Fragment,{children:[e.slice(0,n),i.jsx("mark",{children:r.highlight}),e.slice(n+r.highlight.length)]})};return i.jsxs("div",e.__assign({className:"rca-decision__evidence-detail"},{children:[i.jsxs("button",e.__assign({type:"button",className:"rca-decision__evidence-header",onClick:t},{children:[i.jsx("span",{children:null!==(a=r.title)&&void 0!==a?a:r.label}),i.jsx(s.ChevronUp,{"aria-hidden":"true"})]})),i.jsxs("div",e.__assign({className:"rca-decision__evidence-body"},{children:[r.description?i.jsx("p",{children:r.description}):null,null===(c=r.items)||void 0===c?void 0:c.map(function(e,n){return i.jsx("p",{children:o(e)},n)})]})),r.footer?i.jsx("div",e.__assign({className:"rca-decision__evidence-footer"},{children:r.footer})):null]}))}function _(a){var c=a.title,l=a.items,d=a.tone,_=a.icon,h=n.useState(null),u=h[0],g=h[1],x=n.useState(!1),j=x[0],m=x[1],v=n.useId(),p=j?l:l.slice(0,3);return i.jsxs("section",e.__assign({className:"rca-decision__section"},{children:[i.jsxs("h2",{children:[i.jsx("span",e.__assign({className:"rca-decision__section-icon rca-decision__section-icon--".concat(d)},{children:_})),c]}),i.jsx("ol",e.__assign({className:"rca-decision__items",id:v},{children:p.map(function(n,s){var a,c=null!==(a=n.id)&&void 0!==a?a:"".concat(d,"-").concat(s),l=u===c;return i.jsxs("li",{children:[i.jsxs("div",e.__assign({className:"rca-decision__item-row"},{children:[i.jsx("div",e.__assign({className:"rca-decision__item-content"},{children:"string"==typeof n.content?i.jsx(r,{text:n.content}):n.content})),n.decisioning?i.jsx(t,{open:l,onToggle:function(){return g(l?null:c)}}):null]})),l&&n.decisioning?i.jsx(o,{decisioning:n.decisioning}):null]},c)})})),l.length>3?i.jsxs("button",e.__assign({type:"button",className:"rca-decision__see-more","aria-controls":v,"aria-expanded":j,onClick:function(){m(!j),g(null)}},{children:[j?"See Less":"See More (".concat(l.length-3,")"),j?i.jsx(s.ChevronUp,{"aria-hidden":"true"}):i.jsx(s.ChevronDown,{"aria-hidden":"true"})]})):null]}))}function h(a){var r=a.title,l=void 0===r?"Decision Advantage":r,d=a.score,h=a.summary,u=a.footer,g=a.evidenceNote,x=a.notice,j=a.headerActions,m=a.afterSections,v=a.decisioning,p=a.rootCause,N=a.nextSteps,f=a.width,b=a.maxWidth,y=a.height,C=a.className,S=void 0===C?"":C,k=n.useState(!1),w=k[0],D=k[1];return i.jsxs("article",e.__assign({className:"rca-decision ".concat(void 0!==y?"rca-decision--fixed-height":""," ").concat(S).trim(),style:{width:f,height:y,maxWidth:null!=b?b:f?"none":void 0}},{children:[i.jsxs("header",e.__assign({className:"rca-decision__header"},{children:[i.jsx("span",{children:l}),i.jsxs("span",e.__assign({className:"rca-decision__header-end"},{children:[j,v?i.jsx(t,{open:w,onToggle:function(){return D(function(e){return!e})},label:"how the AI reached this report"}):null,null!=d?i.jsxs("span",e.__assign({className:"rca-decision__header-score"},{children:[i.jsx(s.Sparkles,{"aria-hidden":"true"}),c(d),"%"]})):null]}))]})),i.jsxs("div",e.__assign({className:"rca-decision__body"},{children:[x?i.jsx("div",e.__assign({className:"rca-decision__notice"},{children:x})):null,w&&v?i.jsx("div",e.__assign({className:"rca-decision__header-reasoning"},{children:i.jsx(o,{decisioning:v})})):null,h&&(h.headline||h.body)?i.jsxs("section",e.__assign({className:"rca-decision__summary"},{children:[h.eyebrow?i.jsx("span",e.__assign({className:"rca-decision__eyebrow"},{children:h.eyebrow})):null,h.headline?i.jsx("h2",e.__assign({className:"rca-decision__headline"},{children:h.headline})):null,h.body?i.jsx("p",e.__assign({className:"rca-decision__summary-body"},{children:h.body})):null,g?i.jsx("p",e.__assign({className:"rca-decision__evidence-note"},{children:g})):null]})):g?i.jsx("p",e.__assign({className:"rca-decision__evidence-note"},{children:g})):null,p.length?i.jsx(_,{title:"Root Cause",items:p,tone:"root-cause",icon:i.jsx(s.Search,{"aria-hidden":"true"})}):null,N.length?i.jsx(_,{title:"Next Steps",items:N,tone:"next-steps",icon:i.jsx(s.CheckCircle2,{"aria-hidden":"true"})}):null,m,u?i.jsx("p",e.__assign({className:"rca-decision__footer"},{children:u})):null]}))]}))}exports.RcaDecisionComponent=h,exports.ReasoningPanel=o,exports.ReasoningTrigger=t,exports.default=h;
|
|
2
2
|
//# sourceMappingURL=RcaDecisionComponent.js.map
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ExecutiveDashboard/ExecutiveDashboardWrapper.js"),r=require("./ExecutiveDashboard/components/ExecutiveDashboard.js"),o=require("./ExecutiveDashboard/api/dashboardApi.js"),t=require("./ExecutiveDashboard/utils/sectionOrder.js"),a=require("./ExecutiveDashboard/components/DashboardGrid/DashboardGrid.js"),s=require("./ExecutiveDashboard/components/DashboardGrid/layout.js"),i=require("./ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.js"),n=require("./ExecutiveDashboard/components/Graph/Graph.js"),d=require("./ExecutiveDashboard/components/Graph/LineChart.js"),p=require("./ExecutiveDashboard/components/Graph/PlotBySelector.js"),c=require("./ExecutiveDashboard/components/Graph/types.js"),l=require("./ExecutiveDashboard/components/ui/chart.js"),u=require("./ExecutiveDashboard/components/BarChart/BarChart.js"),h=require("./ExecutiveDashboard/components/BarChart/BarChartSkeleton.js"),C=require("./ExecutiveDashboard/components/BarChart/BarChartEmptyState.js"),D=require("./ExecutiveDashboard/components/BarChart/BarChartTooltip.js"),x=require("./ExecutiveDashboard/components/BarChart/utils.js"),R=require("./ExecutiveDashboard/components/BarChart/types.js"),b=require("./ExecutiveDashboard/components/PieChart/PieChart.js"),E=require("./ExecutiveDashboard/components/PieChart/PieChartSkeleton.js"),m=require("./ExecutiveDashboard/components/PieChart/PieChartEmptyState.js"),T=require("./ExecutiveDashboard/components/PieChart/PieChartTooltip.js"),S=require("./ExecutiveDashboard/components/PieChart/utils.js"),g=require("./ExecutiveDashboard/components/PieChart/types.js"),_=require("./ExecutiveDashboard/components/DashboardDateFilter/DashboardDateFilter.js"),O=require("./ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.js"),I=require("./ExecutiveDashboard/components/TopDriver/TopDriver.js"),v=require("./ExecutiveDashboard/components/Insights/InsightsContext.js"),j=require("./ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js"),q=require("./ExecutiveDashboard/components/Insights/InsightTabs.js"),A=require("./ExecutiveDashboard/components/Insights/L1Report.js"),f=require("./ExecutiveDashboard/api/insightsApi.js"),L=require("./ExecutiveDashboard/components/MetricCard/MetricCard.js"),P=require("./ExecutiveDashboard/components/FiltersSidebar/FiltersSidebar.js"),F=require("./ExecutiveDashboard/components/Table/FTable.js"),G=require("./ExecutiveDashboard/components/Table/TableCard.js"),H=require("./ExecutiveDashboard/components/Table/TableGrid/TableGrid.js"),y=require("./ExecutiveDashboard/components/Table/TableGrid/TableLayoutToggle.js"),K=require("./ExecutiveDashboard/components/Table/TableGrid/useResponsiveColumns.js"),N=require("./ExecutiveDashboard/utils/chartCards.js"),M=require("./ExecutiveDashboard/utils/index.js"),U=require("./ExecutiveDashboard/components/DashboardDateFilter/datePreset.js"),B=require("./ExecutiveDashboard/components/DashboardCard/DashboardCard.js"),W=require("./ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.js"),V=require("./ExecutiveDashboard/components/common/ConfirmationModal.js"),Y=require("./ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.js"),w=require("./ExecutiveDashboard/components/TablePage/TablePage.js"),k=require("./HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.js"),X=require("./HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.js"),J=require("./HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.js"),z=require("./HumanIntelligence/components/PatternDetails/PatternDetails.js"),Q=require("./HumanIntelligence/components/CitationContent/CitationContent.js"),Z=require("./HumanIntelligence/components/Shared/ReusableTable.js"),$=require("./HumanIntelligence/components/LogFilters/LogFilters.js"),ee=require("./HumanIntelligence/components/LogFilters/LogFilterDropdown.js"),re=require("./HumanIntelligence/components/LogTable/LogTable.js"),oe=require("./HumanIntelligence/HumanChangesTableWrapper.js");require("./_virtual/_tslib.js"),require("react");var te=require("./RecordDashboard/RecordDashboardWrapper.js"),ae=require("./RecordDashboard/RecordComponents/RecordDashboard.js"),se=require("./RecordDashboard/RecordApi/RecordDashboardApi.js"),ie=require("./RecordDashboard/RecordUtils/RecordSectionOrder.js"),ne=require("./RecordDashboard/RecordComponents/Graph/RecordGraph.js"),de=require("./RecordDashboard/RecordComponents/Graph/RecordLineChart.js"),pe=require("./RecordDashboard/RecordComponents/Graph/RecordPlotBySelector.js"),ce=require("./RecordDashboard/RecordComponents/Graph/types.js"),le=require("./RecordDashboard/RecordComponents/ui/RecordChart.js"),ue=require("./RecordDashboard/RecordComponents/DashboardDateFilter/RecordDashboardDateFilter.js"),he=require("./RecordDashboard/RecordComponents/MetricCard/RecordMetricCard.js"),Ce=require("./RecordDashboard/RecordComponents/FiltersSidebar/RecordFiltersSidebar.js"),De=require("./RecordDashboard/RecordComponents/Table/RecordFTable.js"),xe=require("./RecordDashboard/RecordComponents/Table/RecordTableActionContext.js"),Re=require("./RecordDashboard/RecordComponents/Table/RecordTableCard.js"),be=require("./RecordDashboard/RecordComponents/Table/TableGrid/RecordTableGrid.js"),Ee=require("./RecordDashboard/RecordComponents/Table/TableGrid/RecordTableLayoutToggle.js"),me=require("./RecordDashboard/RecordComponents/Table/TableGrid/useRecordResponsiveColumns.js"),Te=require("./RecordDashboard/RecordComponents/AnalyticsChart/AnalyticsChart.js"),Se=require("./RecordDashboard/RecordComponents/TableHeader/TableHeader.js"),ge=require("./RecordDashboard/RecordComponents/Table/Pagination/TablePagination.js"),_e=require("./RecordDashboard/RecordComponents/StatsCard/RecordDashboardStats.js"),Oe=require("./RecordDashboard/RecordUtils/RecordTableColumns.js"),Ie=require("./RecordDashboard/RecordUtils/index.js"),ve=require("./RecordDashboard/RecordComponents/DashboardDateFilter/RecordDatePreset.js"),je=require("./RecordDashboard/RecordComponents/DashboardCard/RecordDashboardCard.js"),qe=require("./ExecutiveDashboard/components/Insights/insightsContextCore.js");exports.ExecutiveDashboardWrapper=e.ExecutiveDashboardWrapper,exports.ExecutiveDashboard_Container=e.ExecutiveDashboardWrapper,exports.ExecutiveDashboard=r.ExecutiveDashboard,exports.DashboardApiError=o.DashboardApiError,exports.fetchDashboardData=o.fetchDashboardData,exports.fetchTableData=o.fetchTableData,exports.fetchUIConfig=o.fetchUIConfig,exports.DASHBOARD_SECTION_KEYS=t.DASHBOARD_SECTION_KEYS,exports.PINNED_SECTION_KEYS=t.PINNED_SECTION_KEYS,exports.isSectionHidden=t.isSectionHidden,exports.resolveSectionOrder=t.resolveSectionOrder,exports.DashboardGrid=a.default,exports.DEFAULT_COLUMNS=s.DEFAULT_COLUMNS,exports.DEFAULT_GAP=s.DEFAULT_GAP,exports.DEFAULT_MIN_WIDTH=s.DEFAULT_MIN_WIDTH,exports.DEFAULT_ROW_HEIGHT=s.DEFAULT_ROW_HEIGHT,exports.MAX_COLUMNS=s.MAX_COLUMNS,exports.MAX_ROW_SPAN=s.MAX_ROW_SPAN,exports.buildWidgetIndex=s.buildWidgetIndex,exports.cellHeight=s.cellHeight,exports.packLayout=s.packLayout,exports.placeItems=s.placeItems,exports.resolveLayout=s.resolveLayout,exports.DECISION_WIDGET_KEY=i.DECISION_WIDGET_KEY,exports.GRAPH_WIDGET_KEY=i.GRAPH_WIDGET_KEY,exports.INSIGHT_TABS_WIDGET_KEY=i.INSIGHT_TABS_WIDGET_KEY,exports.buildDashboardWidgets=i.buildDashboardWidgets,exports.Graph=n.default,exports.LineChart=d.default,exports.PlotBySelector=p.default,exports.DEFAULT_COLORS=c.DEFAULT_COLORS,exports.colorForIndex=c.colorForIndex,exports.ChartContainer=l.ChartContainer,exports.ChartLegend=l.ChartLegend,exports.ChartLegendContent=l.ChartLegendContent,exports.ChartTooltip=l.ChartTooltip,exports.ChartTooltipContent=l.ChartTooltipContent,exports.useChart=l.useChart,exports.BarChart=u.default,exports.BarChartSkeleton=h.default,exports.BarChartEmptyState=C.default,exports.BarChartTooltip=D.default,exports.darken=x.darken,exports.parseColor=x.parseColor,exports.resolveBarColors=x.resolveBarColors,exports.sumValues=x.sumValues,exports.toBarChartData=x.toBarChartData,exports.withAlpha=x.withAlpha,exports.withIntensity=x.withIntensity,exports.wrapLabel=x.wrapLabel,exports.DEFAULT_BAR_COLOR=R.DEFAULT_BAR_COLOR,exports.PieChart=b.default,exports.PieChartSkeleton=E.default,exports.PieChartEmptyState=m.default,exports.PieChartTooltip=T.default,exports.groupTopSlices=S.groupTopSlices,exports.isPlottableSlice=S.isPlottableSlice,exports.percentOf=S.percentOf,exports.resolveSliceColors=S.resolveSliceColors,exports.sumSlices=S.sumSlices,exports.toPieChartData=S.toPieChartData,exports.DEFAULT_PIE_COLOR=g.DEFAULT_PIE_COLOR,exports.DashboardDateFilter=_.default,exports.RcaDecisionComponent=O.RcaDecisionComponent,exports.TopDriver=I.TopDriver,exports.InsightsProvider=v.InsightsProvider,exports.DecisionAdvantageCard=j.default,exports.InsightTabs=q.default,exports.L1Report=A.default,exports.L1ReportModal=A.L1ReportModal,exports.InsightsApiError=f.InsightsApiError,exports.deleteReportComment=f.deleteReportComment,exports.fetchInsightsJob=f.fetchInsightsJob,exports.fetchInsightsReport=f.fetchInsightsReport,exports.fetchInsightsSeries=f.fetchInsightsSeries,exports.fetchInsightsSummary=f.fetchInsightsSummary,exports.fetchLevelRows=f.fetchLevelRows,exports.fetchLevelSummary=f.fetchLevelSummary,exports.fetchReportComments=f.fetchReportComments,exports.generateInsightsReport=f.generateInsightsReport,exports.postReportComment=f.postReportComment,exports.saveInsightsAction=f.saveInsightsAction,exports.MetricCard=L.default,exports.FiltersSidebar=P.default,exports.FTable=F.default,exports.TableCard=G.default,exports.TableGrid=H.default,exports.TableLayoutToggle=y.default,exports.useResponsiveColumns=K.useResponsiveColumns,exports.formatChartValue=N.formatChartValue,exports.limitChartData=N.limitChartData,exports.toChartData=N.toChartData,exports.KPI_SENTIMENT_COLORS=M.KPI_SENTIMENT_COLORS,exports.formatKpiValue=M.formatKpiValue,exports.getKpiDelta=M.getKpiDelta,exports.getKpiSentiment=M.getKpiSentiment,exports.getKpiValueColor=M.getKpiValueColor,exports.isKpiValueObject=M.isKpiValueObject,exports.DATE_PRESETS=U.DATE_PRESETS,exports.DATE_PRESET_MAP=U.DATE_PRESET_MAP,exports.DEFAULT_DATE_PRESETS=U.DEFAULT_DATE_PRESETS,exports.DashboardCard=B.DashboardCard,exports.ReportSidebar=W.default,exports.ConfirmationModal=V.default,exports.CreateSubscriptionModal=Y.default,exports.TablePage=w.default,exports.HumanChangesSummary=k.HumanChangesSummary,exports.HumanIntelligenceCard=X.HumanIntelligenceCard,exports.CognitiveDecisioning=J.CognitiveDecisioning,exports.PatternDetails=z.PatternDetails,exports.CitationContent=Q.CitationContent,exports.ReusableTable=Z.ReusableTable,exports.LogFilters=$.default,exports.LogFilterDropdown=ee.default,exports.LogTable=re.default,exports.HumanChangesTableWrapper=oe.default,exports.RecordDashboardWrapper=te.RecordDashboardWrapper,exports.RecordDashboard_Container=te.RecordDashboardWrapper,exports.RecordDashboard=ae.RecordDashboard,exports.RECODashboardApiError=se.RECODashboardApiError,exports.RecordFetchDashboardData=se.RecordFetchDashboardData,exports.RecordFetchTableData=se.RecordFetchTableData,exports.RecordFetchUIConfig=se.RecordFetchUIConfig,exports.RECOIsSectionHidden=ie.RECOIsSectionHidden,exports.RECORD_DASHBOARD_SECTION_KEYS=ie.RECORD_DASHBOARD_SECTION_KEYS,exports.RECORD_PINNED_SECTION_KEYS=ie.RECORD_PINNED_SECTION_KEYS,exports.RECOResolveSectionOrder=ie.RECOResolveSectionOrder,exports.RecordGraph=ne.default,exports.RecordLineChart=de.default,exports.RecordPlotBySelector=pe.default,exports.RECOColorForIndex=ce.RECOColorForIndex,exports.RECODEFAULT_COLORS=ce.RECODEFAULT_COLORS,exports.RECOChartLegend=le.RECOChartLegend,exports.RECOChartLegendContent=le.RECOChartLegendContent,exports.RECOChartTooltip=le.RECOChartTooltip,exports.RECOChartTooltipContent=le.RECOChartTooltipContent,exports.RecordChartContainer=le.RecordChartContainer,exports.useRecordChart=le.useRecordChart,exports.RecordDashboardDateFilter=ue.default,exports.RecordMetricCard=he.default,exports.RecordFiltersSidebar=Ce.default,exports.RecordSidebarFilter=Ce.default,exports.RecordFTable=De.default,exports.useRecordTableActions=xe.useRecordTableActions,exports.RecordTableCard=Re.default,exports.RecordTableGrid=be.default,exports.RecordTableLayoutToggle=Ee.default,exports.useResponsiveRecordColumns=me.useRecordResponsiveColumns,exports.RecordAnalyticsChart=Te.default,exports.RecordTableHeader=Se.default,exports.RecordTablePagination=ge.default,exports.RecordDashboardStats=_e.default,exports.RECORenderDynamicCell=Oe.RECORenderDynamicCell,exports.RECOFormatKpiValue=Ie.RECOFormatKpiValue,exports.RECOGetKpiDelta=Ie.RECOGetKpiDelta,exports.RECOGetKpiSentiment=Ie.RECOGetKpiSentiment,exports.RECOGetKpiValueColor=Ie.RECOGetKpiValueColor,exports.RECOIsKpiValueObject=Ie.RECOIsKpiValueObject,exports.RECO_SENTIMENT_COLORS=Ie.RECO_SENTIMENT_COLORS,exports.RECO_DATE_PRESETS=ve.RECO_DATE_PRESETS,exports.RECO_DATE_PRESET_MAP=ve.RECO_DATE_PRESET_MAP,exports.RECO_DEFAULT_DATE_PRESETS=ve.RECO_DEFAULT_DATE_PRESETS,exports.RecordDashboardCard=je.RecordDashboardCard,exports.useInsights=qe.useInsights;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ExecutiveDashboard/ExecutiveDashboardWrapper.js"),r=require("./ExecutiveDashboard/components/ExecutiveDashboard.js"),t=require("./ExecutiveDashboard/api/dashboardApi.js"),o=require("./ExecutiveDashboard/utils/sectionOrder.js"),a=require("./ExecutiveDashboard/components/DashboardGrid/DashboardGrid.js"),s=require("./ExecutiveDashboard/components/DashboardGrid/layout.js"),i=require("./ExecutiveDashboard/components/DashboardGrid/buildDashboardWidgets.js"),n=require("./ExecutiveDashboard/components/Graph/Graph.js"),d=require("./ExecutiveDashboard/components/Graph/LineChart.js"),p=require("./ExecutiveDashboard/components/Graph/PlotBySelector.js"),c=require("./ExecutiveDashboard/components/Graph/types.js"),l=require("./ExecutiveDashboard/components/ui/chart.js"),h=require("./ExecutiveDashboard/components/BarChart/BarChart.js"),u=require("./ExecutiveDashboard/components/BarChart/BarChartSkeleton.js"),C=require("./ExecutiveDashboard/components/BarChart/BarChartEmptyState.js"),D=require("./ExecutiveDashboard/components/BarChart/BarChartTooltip.js"),x=require("./ExecutiveDashboard/components/BarChart/utils.js"),R=require("./ExecutiveDashboard/components/BarChart/types.js"),b=require("./ExecutiveDashboard/components/PieChart/PieChart.js"),E=require("./ExecutiveDashboard/components/PieChart/PieChartSkeleton.js"),m=require("./ExecutiveDashboard/components/PieChart/PieChartEmptyState.js"),T=require("./ExecutiveDashboard/components/PieChart/PieChartTooltip.js"),S=require("./ExecutiveDashboard/components/PieChart/utils.js"),g=require("./ExecutiveDashboard/components/PieChart/types.js"),I=require("./ExecutiveDashboard/components/DashboardDateFilter/DashboardDateFilter.js"),v=require("./ExecutiveDashboard/components/RcaDecisionComponent/RcaDecisionComponent.js"),O=require("./ExecutiveDashboard/components/TopDriver/TopDriver.js"),_=require("./ExecutiveDashboard/components/Insights/InsightsContext.js"),f=require("./ExecutiveDashboard/components/Insights/DecisionAdvantageCard.js"),j=require("./ExecutiveDashboard/components/Insights/InsightTabs.js"),q=require("./ExecutiveDashboard/components/Insights/L1Report.js"),A=require("./ExecutiveDashboard/components/Insights/DrillTable.js"),L=require("./ExecutiveDashboard/components/Insights/RowDetail.js"),P=require("./ExecutiveDashboard/components/Insights/AgReport.js"),F=require("./ExecutiveDashboard/api/insightsApi.js"),G=require("./ExecutiveDashboard/components/MetricCard/MetricCard.js"),H=require("./ExecutiveDashboard/components/FiltersSidebar/FiltersSidebar.js"),y=require("./ExecutiveDashboard/components/Table/FTable.js"),N=require("./ExecutiveDashboard/components/Table/TableCard.js"),K=require("./ExecutiveDashboard/components/Table/TableGrid/TableGrid.js"),M=require("./ExecutiveDashboard/components/Table/TableGrid/TableLayoutToggle.js"),U=require("./ExecutiveDashboard/components/Table/TableGrid/useResponsiveColumns.js"),B=require("./ExecutiveDashboard/utils/chartCards.js"),W=require("./ExecutiveDashboard/utils/index.js"),w=require("./ExecutiveDashboard/components/DashboardDateFilter/datePreset.js"),V=require("./ExecutiveDashboard/components/DashboardCard/DashboardCard.js"),Y=require("./ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/ReportSidebar.js"),k=require("./ExecutiveDashboard/components/common/ConfirmationModal.js"),X=require("./ExecutiveDashboard/components/DashboardDateFilter/SubscriptionFeature/CreateSubscriptionModal.js"),J=require("./ExecutiveDashboard/components/TablePage/TablePage.js"),z=require("./HumanIntelligence/components/HumanChangesSummary/HumanChangesSummary.js"),Q=require("./HumanIntelligence/components/HumanIntelligenceCard/HumanIntelligenceCard.js"),Z=require("./HumanIntelligence/components/CognitiveDecisioning/CognitiveDecisioning.js"),$=require("./HumanIntelligence/components/PatternDetails/PatternDetails.js"),ee=require("./HumanIntelligence/components/CitationContent/CitationContent.js"),re=require("./HumanIntelligence/components/Shared/ReusableTable.js"),te=require("./HumanIntelligence/components/LogFilters/LogFilters.js"),oe=require("./HumanIntelligence/components/LogFilters/LogFilterDropdown.js"),ae=require("./HumanIntelligence/components/LogTable/LogTable.js"),se=require("./HumanIntelligence/HumanChangesTableWrapper.js");require("./_virtual/_tslib.js"),require("react");var ie=require("./RecordDashboard/RecordDashboardWrapper.js"),ne=require("./RecordDashboard/RecordComponents/RecordDashboard.js"),de=require("./RecordDashboard/RecordApi/RecordDashboardApi.js"),pe=require("./RecordDashboard/RecordUtils/RecordSectionOrder.js"),ce=require("./RecordDashboard/RecordComponents/Graph/RecordGraph.js"),le=require("./RecordDashboard/RecordComponents/Graph/RecordLineChart.js"),he=require("./RecordDashboard/RecordComponents/Graph/RecordPlotBySelector.js"),ue=require("./RecordDashboard/RecordComponents/Graph/types.js"),Ce=require("./RecordDashboard/RecordComponents/ui/RecordChart.js"),De=require("./RecordDashboard/RecordComponents/DashboardDateFilter/RecordDashboardDateFilter.js"),xe=require("./RecordDashboard/RecordComponents/MetricCard/RecordMetricCard.js"),Re=require("./RecordDashboard/RecordComponents/FiltersSidebar/RecordFiltersSidebar.js"),be=require("./RecordDashboard/RecordComponents/Table/RecordFTable.js"),Ee=require("./RecordDashboard/RecordComponents/Table/RecordTableActionContext.js"),me=require("./RecordDashboard/RecordComponents/Table/RecordTableCard.js"),Te=require("./RecordDashboard/RecordComponents/Table/TableGrid/RecordTableGrid.js"),Se=require("./RecordDashboard/RecordComponents/Table/TableGrid/RecordTableLayoutToggle.js"),ge=require("./RecordDashboard/RecordComponents/Table/TableGrid/useRecordResponsiveColumns.js"),Ie=require("./RecordDashboard/RecordComponents/AnalyticsChart/AnalyticsChart.js"),ve=require("./RecordDashboard/RecordComponents/TableHeader/TableHeader.js"),Oe=require("./RecordDashboard/RecordComponents/Table/Pagination/TablePagination.js"),_e=require("./RecordDashboard/RecordComponents/StatsCard/RecordDashboardStats.js"),fe=require("./RecordDashboard/RecordUtils/RecordTableColumns.js"),je=require("./RecordDashboard/RecordUtils/index.js"),qe=require("./RecordDashboard/RecordComponents/DashboardDateFilter/RecordDatePreset.js"),Ae=require("./RecordDashboard/RecordComponents/DashboardCard/RecordDashboardCard.js"),Le=require("./ExecutiveDashboard/components/Insights/insightsContextCore.js");exports.ExecutiveDashboardWrapper=e.ExecutiveDashboardWrapper,exports.ExecutiveDashboard_Container=e.ExecutiveDashboardWrapper,exports.ExecutiveDashboard=r.ExecutiveDashboard,exports.DashboardApiError=t.DashboardApiError,exports.fetchDashboardData=t.fetchDashboardData,exports.fetchTableData=t.fetchTableData,exports.fetchUIConfig=t.fetchUIConfig,exports.DASHBOARD_SECTION_KEYS=o.DASHBOARD_SECTION_KEYS,exports.PINNED_SECTION_KEYS=o.PINNED_SECTION_KEYS,exports.isSectionHidden=o.isSectionHidden,exports.resolveSectionOrder=o.resolveSectionOrder,exports.DashboardGrid=a.default,exports.DEFAULT_COLUMNS=s.DEFAULT_COLUMNS,exports.DEFAULT_GAP=s.DEFAULT_GAP,exports.DEFAULT_MIN_WIDTH=s.DEFAULT_MIN_WIDTH,exports.DEFAULT_ROW_HEIGHT=s.DEFAULT_ROW_HEIGHT,exports.MAX_COLUMNS=s.MAX_COLUMNS,exports.MAX_ROW_SPAN=s.MAX_ROW_SPAN,exports.buildWidgetIndex=s.buildWidgetIndex,exports.cellHeight=s.cellHeight,exports.packLayout=s.packLayout,exports.placeItems=s.placeItems,exports.resolveLayout=s.resolveLayout,exports.DECISION_WIDGET_KEY=i.DECISION_WIDGET_KEY,exports.GRAPH_WIDGET_KEY=i.GRAPH_WIDGET_KEY,exports.INSIGHT_TABS_WIDGET_KEY=i.INSIGHT_TABS_WIDGET_KEY,exports.buildDashboardWidgets=i.buildDashboardWidgets,exports.Graph=n.default,exports.LineChart=d.default,exports.PlotBySelector=p.default,exports.DEFAULT_COLORS=c.DEFAULT_COLORS,exports.colorForIndex=c.colorForIndex,exports.ChartContainer=l.ChartContainer,exports.ChartLegend=l.ChartLegend,exports.ChartLegendContent=l.ChartLegendContent,exports.ChartTooltip=l.ChartTooltip,exports.ChartTooltipContent=l.ChartTooltipContent,exports.useChart=l.useChart,exports.BarChart=h.default,exports.BarChartSkeleton=u.default,exports.BarChartEmptyState=C.default,exports.BarChartTooltip=D.default,exports.darken=x.darken,exports.parseColor=x.parseColor,exports.resolveBarColors=x.resolveBarColors,exports.sumValues=x.sumValues,exports.toBarChartData=x.toBarChartData,exports.withAlpha=x.withAlpha,exports.withIntensity=x.withIntensity,exports.wrapLabel=x.wrapLabel,exports.DEFAULT_BAR_COLOR=R.DEFAULT_BAR_COLOR,exports.PieChart=b.default,exports.PieChartSkeleton=E.default,exports.PieChartEmptyState=m.default,exports.PieChartTooltip=T.default,exports.groupTopSlices=S.groupTopSlices,exports.isPlottableSlice=S.isPlottableSlice,exports.percentOf=S.percentOf,exports.resolveSliceColors=S.resolveSliceColors,exports.sumSlices=S.sumSlices,exports.toPieChartData=S.toPieChartData,exports.DEFAULT_PIE_COLOR=g.DEFAULT_PIE_COLOR,exports.DashboardDateFilter=I.default,exports.RcaDecisionComponent=v.RcaDecisionComponent,exports.TopDriver=O.TopDriver,exports.InsightsProvider=_.InsightsProvider,exports.DecisionAdvantageCard=f.default,exports.InsightTabs=j.default,exports.L1Report=q.default,exports.L1ReportModal=q.L1ReportModal,exports.DrillTable=A.default,exports.RowDetail=L.default,exports.CorrelationSection=P.CorrelationSection,exports.TopDriversSection=P.TopDriversSection,exports.InsightsApiError=F.InsightsApiError,exports.decideObservation=F.decideObservation,exports.deleteReportComment=F.deleteReportComment,exports.fetchHierarchy=F.fetchHierarchy,exports.fetchInsightsCorrelation=F.fetchInsightsCorrelation,exports.fetchInsightsCorrelationTrend=F.fetchInsightsCorrelationTrend,exports.fetchInsightsDrivers=F.fetchInsightsDrivers,exports.fetchInsightsJob=F.fetchInsightsJob,exports.fetchInsightsReport=F.fetchInsightsReport,exports.fetchInsightsReports=F.fetchInsightsReports,exports.fetchInsightsSeries=F.fetchInsightsSeries,exports.fetchInsightsSummary=F.fetchInsightsSummary,exports.fetchLevelRows=F.fetchLevelRows,exports.fetchLevelSummary=F.fetchLevelSummary,exports.fetchNeedsAttention=F.fetchNeedsAttention,exports.fetchObservation=F.fetchObservation,exports.fetchObservations=F.fetchObservations,exports.fetchReportComments=F.fetchReportComments,exports.fetchRowDetail=F.fetchRowDetail,exports.fetchRowReport=F.fetchRowReport,exports.generateInsightsReport=F.generateInsightsReport,exports.postReportComment=F.postReportComment,exports.saveInsightsAction=F.saveInsightsAction,exports.MetricCard=G.default,exports.FiltersSidebar=H.default,exports.FTable=y.default,exports.TableCard=N.default,exports.TableGrid=K.default,exports.TableLayoutToggle=M.default,exports.useResponsiveColumns=U.useResponsiveColumns,exports.formatChartValue=B.formatChartValue,exports.limitChartData=B.limitChartData,exports.toChartData=B.toChartData,exports.KPI_SENTIMENT_COLORS=W.KPI_SENTIMENT_COLORS,exports.formatKpiValue=W.formatKpiValue,exports.getKpiDelta=W.getKpiDelta,exports.getKpiSentiment=W.getKpiSentiment,exports.getKpiValueColor=W.getKpiValueColor,exports.isKpiValueObject=W.isKpiValueObject,exports.DATE_PRESETS=w.DATE_PRESETS,exports.DATE_PRESET_MAP=w.DATE_PRESET_MAP,exports.DEFAULT_DATE_PRESETS=w.DEFAULT_DATE_PRESETS,exports.DashboardCard=V.DashboardCard,exports.ReportSidebar=Y.default,exports.ConfirmationModal=k.default,exports.CreateSubscriptionModal=X.default,exports.TablePage=J.default,exports.HumanChangesSummary=z.HumanChangesSummary,exports.HumanIntelligenceCard=Q.HumanIntelligenceCard,exports.CognitiveDecisioning=Z.CognitiveDecisioning,exports.PatternDetails=$.PatternDetails,exports.CitationContent=ee.CitationContent,exports.ReusableTable=re.ReusableTable,exports.LogFilters=te.default,exports.LogFilterDropdown=oe.default,exports.LogTable=ae.default,exports.HumanChangesTableWrapper=se.default,exports.RecordDashboardWrapper=ie.RecordDashboardWrapper,exports.RecordDashboard_Container=ie.RecordDashboardWrapper,exports.RecordDashboard=ne.RecordDashboard,exports.RECODashboardApiError=de.RECODashboardApiError,exports.RecordFetchDashboardData=de.RecordFetchDashboardData,exports.RecordFetchTableData=de.RecordFetchTableData,exports.RecordFetchUIConfig=de.RecordFetchUIConfig,exports.RECOIsSectionHidden=pe.RECOIsSectionHidden,exports.RECORD_DASHBOARD_SECTION_KEYS=pe.RECORD_DASHBOARD_SECTION_KEYS,exports.RECORD_PINNED_SECTION_KEYS=pe.RECORD_PINNED_SECTION_KEYS,exports.RECOResolveSectionOrder=pe.RECOResolveSectionOrder,exports.RecordGraph=ce.default,exports.RecordLineChart=le.default,exports.RecordPlotBySelector=he.default,exports.RECOColorForIndex=ue.RECOColorForIndex,exports.RECODEFAULT_COLORS=ue.RECODEFAULT_COLORS,exports.RECOChartLegend=Ce.RECOChartLegend,exports.RECOChartLegendContent=Ce.RECOChartLegendContent,exports.RECOChartTooltip=Ce.RECOChartTooltip,exports.RECOChartTooltipContent=Ce.RECOChartTooltipContent,exports.RecordChartContainer=Ce.RecordChartContainer,exports.useRecordChart=Ce.useRecordChart,exports.RecordDashboardDateFilter=De.default,exports.RecordMetricCard=xe.default,exports.RecordFiltersSidebar=Re.default,exports.RecordSidebarFilter=Re.default,exports.RecordFTable=be.default,exports.useRecordTableActions=Ee.useRecordTableActions,exports.RecordTableCard=me.default,exports.RecordTableGrid=Te.default,exports.RecordTableLayoutToggle=Se.default,exports.useResponsiveRecordColumns=ge.useRecordResponsiveColumns,exports.RecordAnalyticsChart=Ie.default,exports.RecordTableHeader=ve.default,exports.RecordTablePagination=Oe.default,exports.RecordDashboardStats=_e.default,exports.RECORenderDynamicCell=fe.RECORenderDynamicCell,exports.RECOFormatKpiValue=je.RECOFormatKpiValue,exports.RECOGetKpiDelta=je.RECOGetKpiDelta,exports.RECOGetKpiSentiment=je.RECOGetKpiSentiment,exports.RECOGetKpiValueColor=je.RECOGetKpiValueColor,exports.RECOIsKpiValueObject=je.RECOIsKpiValueObject,exports.RECO_SENTIMENT_COLORS=je.RECO_SENTIMENT_COLORS,exports.RECO_DATE_PRESETS=qe.RECO_DATE_PRESETS,exports.RECO_DATE_PRESET_MAP=qe.RECO_DATE_PRESET_MAP,exports.RECO_DEFAULT_DATE_PRESETS=qe.RECO_DEFAULT_DATE_PRESETS,exports.RecordDashboardCard=Ae.RecordDashboardCard,exports.useInsights=Le.useInsights;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|