p-backlog 0.5.0 → 0.5.1
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/CHANGELOG.md +11 -0
- package/README.md +5 -1
- package/README.ru.md +5 -1
- package/dist/cli.js +127 -92
- package/dist/web/assets/{CodeTab-BU7UU1i4.js → CodeTab-D3I5lIJJ.js} +1 -1
- package/dist/web/assets/CostTab-8f2AC5ER.js +1 -0
- package/dist/web/assets/EffectTab-1jObLK9a.js +1 -0
- package/dist/web/assets/Figure-BHBCd7Dt.js +1 -0
- package/dist/web/assets/OverviewTab-DjNyxzJq.js +1 -0
- package/dist/web/assets/QualityTab-W2NdYBhI.js +1 -0
- package/dist/web/assets/StatsPage-rJH3k8Ye.js +1 -0
- package/dist/web/assets/StatsTabState-BoimPoKm.js +1 -0
- package/dist/web/assets/{StatsTable-C0coWtNM.js → StatsTable-B0tbx68M.js} +1 -1
- package/dist/web/assets/{UnavailableRepos-DDHmBHg0.js → UnavailableRepos-SpC6Dzwu.js} +1 -1
- package/dist/web/assets/cx-DDl6tKXq.js +58 -0
- package/dist/web/assets/{index-DN4lSwOL.js → index-C8xqRmo-.js} +2 -2
- package/dist/web/assets/start-YlC0KTe5.js +38 -0
- package/dist/web/assets/use-grain-series-Bx70IZvb.js +55 -0
- package/dist/web/assets/value-dot-B7BsbWBD.js +1 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/ChartTooltip-b-yZtIRd.js +0 -55
- package/dist/web/assets/CostTab-Be8xR9DU.js +0 -1
- package/dist/web/assets/EffectTab-D0kaZiSl.js +0 -1
- package/dist/web/assets/Figure-B6Ry1zXo.js +0 -1
- package/dist/web/assets/OverviewTab-DqU7o9Ug.js +0 -1
- package/dist/web/assets/QualityTab-DtnTgxXj.js +0 -1
- package/dist/web/assets/StatsPage-BLZKtSL6.js +0 -1
- package/dist/web/assets/StatsTabState-CYkDWYp7.js +0 -1
- package/dist/web/assets/cx-Cfec8QGz.js +0 -58
- package/dist/web/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/dist/web/assets/start-sbZVqXmP.js +0 -38
- package/dist/web/assets/value-dot-CfFRNT_m.js +0 -1
- /package/dist/web/assets/{ChartTooltip-tQC8-pw2.css → use-grain-series-tQC8-pw2.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,Ct as t,D as n,E as r,O as i,T as a,c as o,k as s,kn as c,vn as l,yn as u}from"./cx-DDl6tKXq.js";import{i as d,n as f,r as p}from"./StatsTabState-BoimPoKm.js";import{t as m}from"./StatsPage.module-D8dvB8Va.js";import{t as h}from"./UnavailableRepos-SpC6Dzwu.js";import{t as g}from"./Figure-BHBCd7Dt.js";import{t as _}from"./StatsTable-B0tbx68M.js";import{H as ee,V as v,_ as y,a as b,c as x,d as S,f as C,g as w,h as T,i as E,l as D,m as O,n as k,o as A,r as j,s as M,t as N,v as P,w as F}from"./use-grain-series-Bx70IZvb.js";var I=c(u()),L=[`axis`,`item`],R=(0,I.forwardRef)((e,t)=>I.createElement(T,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:L,tooltipPayloadSearcher:ee,categoricalChartProps:e,ref:t})),z={steps:`_steps_advmo_1`,now:`_now_advmo_13`},B=l();function V({totals:e}){let{stats:t}=r(),n=a();return(0,B.jsx)(d,{title:t.explainerTitle,children:(0,B.jsxs)(`ol`,{className:z.steps,children:[(0,B.jsx)(`li`,{children:t.explainerTask}),(0,B.jsxs)(`li`,{children:[t.explainerFixed,(0,B.jsx)(H,{children:t.fixedNow(e.fixedTasks,e.fixedLines)})]}),(0,B.jsxs)(`li`,{children:[t.explainerPending,(0,B.jsx)(H,{children:U(t,e)})]}),(0,B.jsxs)(`li`,{children:[t.explainerTests,(0,B.jsx)(H,{children:t.codeAndTests(e)})]}),(0,B.jsxs)(`li`,{children:[t.explainerNoise,(0,B.jsx)(H,{children:W(t,n,e)})]})]})})}function H({children:e}){let{stats:t}=r();return(0,B.jsxs)(`span`,{className:z.now,children:[t.now,` `,e]})}function U(e,t){return t.openTasks===0?e.noPending:t.estimatedLines===null?e.pendingWithoutEstimate(t.openTasks):e.pendingEstimated(t.openTasks,t.estimatedLines,t.estimatedLines/t.openTasks)}function W(t,r,a){if(a.estimatedLines===null&&a.openTasks>0)return t.estimateLater;if(a.noiseShare===null)return t.noCommitsSinceAdoption;let o=a.estimatedLines??0,c=e(a.estimatedLines);return`${n(r,a.deferredLines,c)} ÷ (${i(r,a.realLines)} + ${n(r,o,c)}) ${s(a.noiseShare)}`}var G=`var(--chart-bar-neutral)`,K=`var(--accent-ink)`;function q(e,t,r,i){let a=e=>n(r,e,Math.round(e)>0);return j(n=>({title:e.periodOf(i,C(r,n.start)),rows:[{label:e.inPullRequests,value:t.count(Math.round(n.onTopicLines),`line`),shape:`bar`,color:G},{label:e.deferredSeries,value:a(n.deferredLines),shape:`hatch`,color:K},{label:e.codeLines,value:a(n.deferredLines-n.deferredTestLines)},{label:e.testLines,value:a(n.deferredTestLines)},{label:e.deferredTasks,value:String(n.deferredTasks)}]}))}function J({periods:t,totals:n,grain:i}){let{stats:o,core:c}=r(),l=a(),u=(0,I.useMemo)(()=>q(o,c,l,i),[o,c,l,i]),d=(0,I.useId)(),f=[{label:o.inPullRequests,shape:`bar`,color:G},{label:o.deferredSeries,shape:`hatch`,color:K}],p=o.linesText(n.deferredLines,e(n.estimatedLines)),m=o.effectSummary(n.realLines,p,s(n.noiseShare));return(0,B.jsx)(O,{summary:m,legend:f,children:(0,B.jsxs)(R,{data:t,margin:A,"aria-label":o.chartLabel(o.effectTitle,i),children:[(0,B.jsx)(`defs`,{children:(0,B.jsxs)(`pattern`,{id:d,width:`6`,height:`6`,patternUnits:`userSpaceOnUse`,patternTransform:`rotate(45)`,children:[(0,B.jsx)(`rect`,{width:`6`,height:`6`,fill:`var(--surface-raised)`}),(0,B.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`6`,stroke:K,strokeWidth:`3`})]})}),(0,B.jsx)(F,{vertical:!1}),(0,B.jsx)(y,{dataKey:`start`,tickFormatter:e=>D(l,e),...M}),(0,B.jsx)(w,{tickFormatter:e=>S(l,e),width:60,...E}),(0,B.jsx)(v,{content:u,...x}),(0,B.jsx)(P,{dataKey:`onTopicLines`,stackId:`lines`,fill:G,isAnimationActive:!1}),(0,B.jsx)(P,{dataKey:`deferredLines`,stackId:`lines`,fill:`url(#${d})`,radius:b,isAnimationActive:!1})]})})}function Y({totals:e}){let{stats:t}=r(),n=a();return(0,B.jsxs)(`div`,{className:m.totals,children:[(0,B.jsx)(g,{label:t.keptOut,value:X(t,e),note:`${Z(t,n,e)} · ${t.codeAndTests(e)}`}),(0,B.jsx)(g,{label:t.noiseWithoutBacklog,value:s(e.noiseShare),note:t.noiseNote}),(0,B.jsx)(g,{label:t.deferredToBacklog,value:String(e.fixedTasks+e.openTasks),note:t.deferredNote(e.fixedTasks,e.openTasks)}),(0,B.jsx)(g,{label:t.pullRequestLines,value:i(n,e.realLines),note:t.sinceAdoption})]})}function X(t,n){return n.estimatedLines===null?t.linesText(n.fixedLines,!1):t.linesText(n.deferredLines,e(n.estimatedLines))}function Z(t,r,a){let o=i(r,a.fixedLines);return a.estimatedLines===null?t.keptOutPending(o):t.keptOutEstimated(o,n(r,a.estimatedLines,e(a.estimatedLines)))}function Q({weeks:e,days:t,totals:n}){let{stats:i}=r(),{grain:a,periods:o,setGrain:s}=N(`effect`,`week`,{week:e,day:t});return(0,B.jsx)(d,{title:i.effectTitle,aside:(0,B.jsx)(k,{chart:`effect`,grain:a,onChange:s}),children:(0,B.jsx)(J,{periods:o,totals:n,grain:a})})}function $({projects:t}){let{stats:o}=r(),c=a();return(0,B.jsx)(d,{title:o.byProject,children:t.length===0?(0,B.jsx)(`p`,{className:p.muted,children:o.noCodeData}):(0,B.jsx)(_,{label:o.byProject,head:o.projectsHead,rows:t.map(t=>({key:t.projectId,cells:[t.name,t.deferredTasks,i(c,t.fixedLines),t.estimatedLines===null?`—`:n(c,t.estimatedLines,e(t.estimatedLines)),i(c,t.realLines),s(t.noiseShare)]}))})})}function te(){let{projectId:e}=t(),n=o(e);return(0,B.jsx)(f,{query:n,children:e=>(0,B.jsx)(ne,{report:e})})}function ne({report:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(h,{repos:e.unavailableRepos}),(0,B.jsx)(Y,{totals:e.totals}),(0,B.jsxs)(`div`,{className:m.blocks,children:[(0,B.jsx)(`div`,{className:p.wide,children:(0,B.jsx)(Q,{weeks:e.weeks,days:e.days,totals:e.totals})}),(0,B.jsx)(`div`,{className:p.wide,children:(0,B.jsx)($,{projects:e.projects})}),(0,B.jsx)(`div`,{className:p.wide,children:(0,B.jsx)(V,{totals:e.totals})})]})]})}export{te as EffectTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{kn as e,t,vn as n,yn as r}from"./cx-DDl6tKXq.js";import{t as i}from"./StatsPage.module-D8dvB8Va.js";var a=e(r(),1),o=n();function s({label:e,value:n,note:r,tone:s,trend:c}){let l=(0,a.useId)();return(0,o.jsxs)(`div`,{className:i.figure,role:`group`,"aria-labelledby":l,children:[(0,o.jsx)(`span`,{id:l,className:i.figureLabel,children:e}),(0,o.jsx)(`span`,{className:t(i.figureValue,s===`growth`&&i.growth,s===`decline`&&i.decline),children:n}),c!==void 0&&(0,o.jsxs)(`span`,{className:t(i.figureTrend,c.better?i.decline:i.growth),children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,children:c.text}),(0,o.jsx)(`span`,{className:`visually-hidden`,children:c.speech})]}),(0,o.jsx)(`span`,{className:i.figureNote,children:r})]})}export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,E as t,I as n,M as r,P as i,T as a,_ as o,j as s,kn as c,t as l,vn as u,yn as d}from"./cx-DDl6tKXq.js";import{l as f,s as p}from"./start-YlC0KTe5.js";import{i as m,n as h,r as g}from"./StatsTabState-BoimPoKm.js";import{t as _}from"./StatsPage.module-D8dvB8Va.js";import{t as v}from"./Figure-BHBCd7Dt.js";import{V as y,_ as b,a as x,c as S,d as C,f as w,g as T,i as E,l as D,m as O,n as k,o as A,r as j,s as M,t as N,v as P,w as F}from"./use-grain-series-Bx70IZvb.js";import{n as I,r as L,t as R}from"./value-dot-B7BsbWBD.js";var z={columns:`_columns_1m2da_1`,countList:`_countList_1m2da_7`,ageRows:`_ageRows_1m2da_11`,ageRow:`_ageRow_1m2da_11`,ageLabel:`_ageLabel_1m2da_25`,ageTrack:`_ageTrack_1m2da_29`,ageSegment:`_ageSegment_1m2da_37`,legend:`_legend_1m2da_41`,legendItem:`_legendItem_1m2da_50`,share:`_share_1m2da_61`,critical:`_critical_1m2da_65`,high:`_high_1m2da_69`,medium:`_medium_1m2da_73`,low:`_low_1m2da_77`,done:`_done_1m2da_81`,fixed:`_fixed_1m2da_85`,obsolete:`_obsolete_1m2da_89`,duplicate:`_duplicate_1m2da_93`,cancelled:`_cancelled_1m2da_97`,unknown:`_unknown_1m2da_101`,shareBar:`_shareBar_1m2da_105`,alarm:`_alarm_1m2da_117`,alarmOn:`_alarmOn_1m2da_123`},B=u();function ee(e,t){let r=[...n].reverse().filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return r.length===0?``:` (${r.join(`, `)})`}function V({age:e}){let{stats:r,core:a}=t(),o=e.buckets.map(({bucket:e,byPriority:t})=>({bucket:e,total:i(n.map(e=>t[e])),byPriority:t})),s=Math.max(1,...o.map(({total:e})=>e)),c=o.map(({bucket:e,total:t,byPriority:n})=>`${r.ageBuckets[e]}: ${t}${ee(r,n)}`).join(`; `);return(0,B.jsxs)(m,{title:r.openAge,children:[(0,B.jsx)(`div`,{role:`img`,"aria-label":c,className:z.ageRows,children:o.map(({bucket:e,total:t,byPriority:i})=>(0,B.jsxs)(`div`,{className:z.ageRow,"aria-hidden":`true`,children:[(0,B.jsx)(`span`,{className:z.ageLabel,children:r.ageBuckets[e]}),(0,B.jsx)(`span`,{className:z.ageTrack,children:n.map(e=>(0,B.jsx)(`span`,{className:l(z.ageSegment,z[e]),style:{width:`${i[e]/s*100}%`}},e))}),(0,B.jsx)(`span`,{className:g.rowValue,children:t})]},e))}),(0,B.jsx)(`p`,{className:z.legend,children:[...n].reverse().map(e=>(0,B.jsx)(`span`,{className:l(z.legendItem,z[e]),children:a.priorityLabel(e)},e))}),(0,B.jsx)(`p`,{className:l(z.alarm,e.urgentStale>0&&z.alarmOn),children:r.urgentStale(e.urgentStale)})]})}var H=[`done`,`fixed`,`obsolete`,`duplicate`,`cancelled`,`unknown`];function U(e,{stats:t,core:n}){return e===`done`||e===`cancelled`||e===`unknown`?t.closingReasons[e]:n.resolutionLabel(e)}function te({closing:e}){let n=t(),{stats:r}=n,a=i(H.map(t=>e.byReason[t])),o=H.map(t=>`${U(t,n)}: ${e.byReason[t]}`).join(`; `);return(0,B.jsxs)(m,{title:r.closing,children:[(0,B.jsx)(`div`,{role:`img`,"aria-label":o,className:z.shareBar,children:H.map(t=>(0,B.jsx)(`span`,{className:l(z.share,z[t]),style:{width:a===0?0:`${e.byReason[t]/a*100}%`}},t))}),(0,B.jsx)(`ul`,{className:g.rows,children:H.map(t=>(0,B.jsxs)(`li`,{className:g.row,children:[(0,B.jsx)(`span`,{className:l(z.legendItem,z[t]),children:U(t,n)}),(0,B.jsx)(`span`,{className:g.rowValue,children:e.byReason[t]})]},t))}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h3`,{className:g.subTitle,children:r.noiseAndReopens}),(0,B.jsxs)(`ul`,{className:g.rows,children:[(0,B.jsx)(W,{label:r.duplicatesAmongClosed,value:s(e.duplicateShare)}),(0,B.jsx)(W,{label:r.noSourceAmongCreated,value:s(e.withoutSourceShare)}),(0,B.jsx)(W,{label:r.reopened,value:e.reopened})]})]})]})}function W({label:e,value:t}){return(0,B.jsxs)(`li`,{className:g.row,children:[(0,B.jsx)(`span`,{className:g.rowLabel,children:e}),(0,B.jsx)(`span`,{className:g.rowValue,children:t})]})}var ne=`↓`,re=`↑`;function G(e,t,n,r){if(t===null||n===null)return;let i=t-n;if(i===0)return;let a=i<0,o=r(Math.abs(i));return{text:e.weekTrend(a?ne:re,o),speech:e.weekTrendSpeech(o,a),better:a}}function K({hotspots:e,listPath:n}){let{stats:r}=t();return(0,B.jsx)(m,{title:r.hotspots,children:(0,B.jsxs)(`div`,{className:z.columns,children:[(0,B.jsx)(q,{title:r.folders,empty:r.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,B.jsx)(`code`,{children:e}),count:t}))}),(0,B.jsx)(q,{title:r.tags,empty:r.noTags,items:e.tags.map(({tag:e,count:t})=>({key:e,label:(0,B.jsxs)(f,{to:{pathname:n,search:`tag=${encodeURIComponent(e)}`},children:[`#`,e]}),count:t}))})]})})}function q({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,B.jsxs)(`div`,{className:z.countList,children:[(0,B.jsx)(`h3`,{className:g.subTitle,children:e}),n.length===0?(0,B.jsx)(`p`,{className:g.muted,children:t}):(0,B.jsx)(`ul`,{className:g.rows,children:n.map(e=>(0,B.jsxs)(`li`,{className:g.countRow,children:[(0,B.jsx)(`span`,{className:g.rowLabel,children:e.label}),(0,B.jsx)(`span`,{className:g.rowValue,children:e.count}),(0,B.jsx)(`span`,{className:g.track,"aria-hidden":`true`,children:(0,B.jsx)(`span`,{className:g.fill,style:{transform:`scaleX(${e.count/r})`}})})]},e.key))})]})}var J=c(d(),1),Y=`var(--chart-bar-neutral)`,X=`var(--chart-bar-green)`,Z=`var(--chart-line-bright)`;function ie(e,t,n){return j(r=>({title:e.periodOf(n,w(t,r.start)),rows:[{label:e.flowCreated,value:String(r.created),shape:`bar`,color:Y},{label:e.flowClosed,value:String(r.closed),shape:`bar`,color:X},{label:e.flowOpen,value:String(r.openAtEnd),shape:`line`,color:Z}]}))}function ae({weeks:e,days:n}){let{stats:r}=t(),o=a(),{grain:s,periods:c,setGrain:l}=N(`flow`,`week`,{week:e,day:n}),u=(0,J.useMemo)(()=>ie(r,o,s),[r,o,s]),d=[{label:r.flowCreated,shape:`bar`,color:Y},{label:r.flowClosed,shape:`bar`,color:X},{label:r.flowOpenAtEnd[s],shape:`line`,color:Z}],f=r.debtBy[s],p=r.flowSummary({grain:s,periodCount:c.length,created:i(c.map(e=>e.created)),closed:i(c.map(e=>e.closed)),openNow:c.at(-1)?.openAtEnd??0}),h=e=>C(o,e);return(0,B.jsx)(m,{title:f,aside:(0,B.jsx)(k,{chart:`flow`,grain:s,onChange:l}),children:(0,B.jsx)(O,{summary:p,legend:d,children:(0,B.jsxs)(I,{data:c,margin:A,"aria-label":r.chartLabel(f,s),children:[(0,B.jsx)(F,{vertical:!1}),(0,B.jsx)(b,{dataKey:`start`,tickFormatter:e=>D(o,e),...M}),(0,B.jsx)(T,{yAxisId:`flow`,allowDecimals:!1,tickFormatter:h,width:60,...E}),(0,B.jsx)(T,{yAxisId:`open`,orientation:`right`,allowDecimals:!1,tickFormatter:h,width:60,...E}),(0,B.jsx)(y,{content:u,...S}),(0,B.jsx)(P,{yAxisId:`flow`,dataKey:`created`,fill:Y,radius:x,isAnimationActive:!1}),(0,B.jsx)(P,{yAxisId:`flow`,dataKey:`closed`,fill:X,radius:x,isAnimationActive:!1}),(0,B.jsx)(L,{yAxisId:`open`,dataKey:`openAtEnd`,stroke:Z,strokeWidth:3,dot:R(Z),isAnimationActive:!1})]})})})}var Q=`var(--chart-bar-warm)`;function $(e,t,n,r){return j(i=>({title:e.periodOf(r,w(n,i.start)),rows:[{label:e.flowCreated,value:t.count(i.created,`task`),shape:`bar`,color:Q}]}))}function oe({weeks:e,days:n}){let{stats:r,core:o}=t(),s=a(),{grain:c,periods:l,setGrain:u}=N(`intake`,`day`,{week:e,day:n}),d=(0,J.useMemo)(()=>$(r,o,s,c),[r,o,s,c]),f=[{label:r.createdTasks,shape:`bar`,color:Q}],p=r.createdBy[c];return(0,B.jsx)(m,{title:p,aside:(0,B.jsx)(k,{chart:`intake`,grain:c,onChange:u}),children:(0,B.jsx)(O,{summary:r.intakeSummary(c,l.length,i(l.map(e=>e.created))),legend:f,children:(0,B.jsxs)(I,{data:l,margin:A,"aria-label":r.chartLabel(p,c),children:[(0,B.jsx)(F,{vertical:!1}),(0,B.jsx)(b,{dataKey:`start`,tickFormatter:e=>D(s,e),...M}),(0,B.jsx)(T,{allowDecimals:!1,tickFormatter:e=>C(s,e),width:60,...E}),(0,B.jsx)(y,{content:d,...S}),(0,B.jsx)(P,{dataKey:`created`,fill:Q,radius:x,isAnimationActive:!1})]})})})}function se(){let{projectId:t}=e(),n=o(t);return(0,B.jsx)(h,{query:n,children:e=>(0,B.jsx)(ce,{report:e,listPath:p(t)})})}function ce({report:e,listPath:t}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(le,{totals:e.totals}),(0,B.jsxs)(`div`,{className:_.blocks,children:[(0,B.jsx)(ae,{weeks:e.weeks,days:e.days}),(0,B.jsx)(oe,{weeks:e.weeks,days:e.days}),(0,B.jsx)(K,{hotspots:e.hotspots,listPath:t}),(0,B.jsx)(V,{age:e.age}),(0,B.jsx)(te,{closing:e.closing})]})]})}function le({totals:e}){let{stats:n}=t(),i=e.createdLastWeek-e.closedLastWeek,a=e.previous;return(0,B.jsxs)(`div`,{className:l(_.totals,_.totalsPair),children:[(0,B.jsx)(v,{label:n.tasksToday,value:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`span`,{className:e.createdToday>0?_.growth:void 0,children:[`+`,e.createdToday]}),` `,(0,B.jsxs)(`span`,{className:e.closedToday>0?_.decline:void 0,children:[`−`,e.closedToday]})]}),note:n.createdAndClosed}),(0,B.jsx)(v,{label:n.thisWeek,value:r(i),tone:ue(i),note:n.weekNote(e.createdLastWeek,e.closedLastWeek),trend:G(n,i,a?.net??null,String)})]})}function ue(e){if(e>0)return`growth`;if(e<0)return`decline`}export{se as OverviewTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,E as t,P as n,T as r,f as i,j as a,kn as o,vn as s,yn as c}from"./cx-DDl6tKXq.js";import{i as l,n as u,r as d}from"./StatsTabState-BoimPoKm.js";import{t as f}from"./StatsPage.module-D8dvB8Va.js";import{t as p}from"./StatsTable-B0tbx68M.js";import{V as m,_ as h,a as g,c as _,f as v,g as y,i as b,l as x,m as S,n as C,o as w,r as T,s as E,t as D,v as O,w as k}from"./use-grain-series-Bx70IZvb.js";import{n as A,r as j,t as M}from"./value-dot-B7BsbWBD.js";var N=o(c(),1),P=s(),F=`var(--chart-bar-neutral)`,I=`var(--chart-line-green)`;function L(e,t,n){return T(r=>({title:e.periodOf(n,v(t,r.start)),rows:[{label:e.decidedCandidates,value:String(r.decided),shape:`bar`,color:F},{label:e.precision,value:a(r.precision),shape:`line`,color:I}]}))}function R({periods:e,grain:i}){let{stats:o}=t(),s=r(),c=(0,N.useMemo)(()=>L(o,s,i),[o,s,i]),l=[{label:o.decidedCandidates,shape:`bar`,color:F},{label:o.precision,shape:`line`,color:I}],u=n(e.map(e=>e.decided)),d=e.filter(e=>e.precision!==null).at(-1),f=o.accuracySummary({grain:i,periodCount:e.length,decided:u,latestPrecision:d===void 0?null:a(d.precision)});return(0,P.jsx)(S,{summary:f,legend:l,children:(0,P.jsxs)(A,{data:e,margin:w,"aria-label":o.chartLabel(o.accuracyTitle,i),children:[(0,P.jsx)(k,{vertical:!1}),(0,P.jsx)(h,{dataKey:`start`,tickFormatter:e=>x(s,e),...E}),(0,P.jsx)(y,{yAxisId:`decided`,width:60,...b}),(0,P.jsx)(y,{yAxisId:`precision`,orientation:`right`,domain:[0,1],tickFormatter:e=>`${Math.round(e*100)}%`,width:60,...b}),(0,P.jsx)(m,{content:c,..._}),(0,P.jsx)(O,{yAxisId:`decided`,dataKey:`decided`,fill:F,radius:g,isAnimationActive:!1}),(0,P.jsx)(j,{yAxisId:`precision`,type:`monotone`,dataKey:`precision`,stroke:I,strokeWidth:2,connectNulls:!0,dot:M(I),isAnimationActive:!1})]})})}function z({rows:e,weeks:n,days:r,methodRows:i,matchRows:o}){let{stats:s,core:c}=t(),{grain:u,periods:f,setGrain:m}=D(`accuracy`,`week`,{week:n,day:r}),h=e=>e===`source-changed`?i.map(e=>B(s,e,e.by===`unknown`?s.beforeMethodRecorded:s.checkedBy(c.checkMethodLabel(e.by)))):e===`duplicate`?o.map(e=>B(s,e,e.by===`unknown`?s.beforeMatchRecorded:s.matchedBy(c.duplicateMatchLabel(e.by)))):[];return(0,P.jsx)(l,{title:s.accuracyTitle,aside:e.length===0?void 0:(0,P.jsx)(C,{chart:`accuracy`,grain:u,onChange:m}),children:e.length===0?(0,P.jsx)(`p`,{className:d.muted,children:s.noCandidates}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{className:d.muted,children:s.accuracyHint}),(0,P.jsx)(R,{periods:f,grain:u}),(0,P.jsx)(p,{label:s.accuracyTable,head:s.accuracyHead,rows:e.flatMap(e=>[{key:e.evidence,tone:e.evidence===`total`?`total`:void 0,cells:[c.evidenceLabel(e.evidence),e.candidates,e.closed,e.verified,e.open,a(e.precision)]},...h(e.evidence).map(t=>({...t,key:`${e.evidence}-${t.key}`}))])})]})})}function B(e,t,n){return{key:t.by,tone:`child`,cells:[e.splitRow(n),t.candidates,t.closed,t.verified,t.open,a(t.precision)]}}function V({graph:e}){let{stats:n,core:r}=t(),{projects:i,filter:a}=e;return a.filtered===0&&i.every(e=>e.state===`none`)?(0,P.jsx)(l,{title:n.graphTitle,children:(0,P.jsx)(`p`,{className:d.muted,children:n.graphMissing(e=>(0,P.jsx)(`code`,{children:e},e))})}):(0,P.jsxs)(l,{title:n.graphTitle,children:[(0,P.jsx)(`p`,{className:d.muted,children:n.graphHint}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:n.filteredTitle}),a.filtered===0?(0,P.jsx)(`p`,{className:d.muted,children:n.nothingFiltered}):(0,P.jsx)(p,{label:n.filteredTable,head:n.filteredHead,rows:[{key:`filtered`,cells:[n.filteredByGraph,a.filtered]},{key:`caught`,cells:[n.filteredCaught,a.caught]},{key:`missed`,cells:[n.filteredMissed,a.missed]},{key:`quiet`,cells:[n.filteredQuiet,a.quiet]}]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:n.projects}),(0,P.jsx)(p,{label:n.graphByProject,head:n.graphHead,rows:i.map(e=>({key:e.projectId,cells:[e.name,r.graphStateLabel(e.state),e.pinned,H(e)]}))})]})]})}function H({state:e,pinned:t,resolved:n}){return e===`none`||e===`unreadable`?`—`:`${n} (${a(t===0?null:n/t)})`}function U({rows:e}){let{stats:n,core:r}=t(),i=e=>e.category===`unknown`?n.categoryUnknown:r.categoryLabel(e.category??void 0);return(0,P.jsx)(l,{title:n.categoriesTitle,children:e.length===0?(0,P.jsx)(`p`,{className:d.muted,children:n.categoriesEmpty}):(0,P.jsx)(p,{label:n.categoriesTitle,head:n.categoriesHead,rows:e.map(e=>({key:e.category??`none`,cells:[i(e),e.open,e.weight,e.created,e.closed]}))})})}function W({found:e,branches:n}){let{stats:r}=t(),i=e=>e.found===null?r.foundNotRecorded:e.found===`unknown`?r.foundUnknown:r.foundLabels[e.found];return(0,P.jsxs)(l,{title:r.originTitle,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:r.foundTitle}),(0,P.jsx)(p,{label:r.foundTitle,head:r.foundHead,rows:e.map(e=>({key:e.found??`not-recorded`,cells:[i(e),e.created,e.open,e.fixed]}))})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:r.branchesTitle}),n.length===0?(0,P.jsx)(`p`,{className:d.muted,children:r.branchesEmpty}):(0,P.jsx)(p,{label:r.branchesTitle,head:r.branchesHead,rows:n.map(e=>({key:e.label,cells:[(0,P.jsx)(`code`,{children:e.label}),e.created,e.open]}))})]})]})}function G(){let{projectId:t}=e(),n=i(t);return(0,P.jsx)(u,{query:n,children:e=>(0,P.jsx)(K,{report:e})})}function K({report:e}){return(0,P.jsxs)(`div`,{className:f.blocks,children:[(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(z,{rows:e.accuracy,weeks:e.accuracyWeeks,days:e.accuracyDays,methodRows:e.methodAccuracy,matchRows:e.matchAccuracy})}),(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(V,{graph:e.graph})}),(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(U,{rows:e.categories})}),(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(W,{found:e.found,branches:e.branches})})]})}export{G as QualityTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,E as t,Kt as n,_t as r,bt as i,d as a,g as o,kn as s,t as c,vn as l,yn as u}from"./cx-DDl6tKXq.js";import{a as d,c as f,l as p,o as m,t as h,u as g}from"./start-YlC0KTe5.js";import{t as _}from"./StatsPage.module-D8dvB8Va.js";var v=s(u(),1),y=l();function b(){let{projectId:s}=e(),{pathname:l}=r(),u=a(),b=o(s),{app:x,core:S,stats:C}=t(),w=s===void 0?C.projects:d(u.data,s),T=C.heading(w),E=f(s),D=e=>e===``?E:`${E}/${e}`,O=(e,t)=>n({path:D(e),end:!0},t)!==null,k=h.find(e=>e.segment!==``&&O(e.segment,l))??h[0],A=i().location?.pathname,j=(0,v.useRef)(null),M=A===void 0?void 0:h.find(e=>O(e.segment,A)),N=C.docTitle(k.segment===``?T:`${C.tabs[k.key]} · ${T}`);return(0,v.useEffect)(()=>{document.title=N},[N]),(0,y.jsxs)(`main`,{id:`content`,tabIndex:-1,className:_.page,"aria-busy":M!==void 0||void 0,children:[(0,y.jsx)(`h1`,{ref:j,tabIndex:-1,className:_.heading,children:T}),s===void 0&&u.data!==void 0&&(0,y.jsx)(`p`,{className:_.scopeNote,children:m(u.data,x)}),(b.data?.signals.length??0)>0&&(0,y.jsxs)(`div`,{className:_.signals,role:`status`,"aria-labelledby":`stats-signals-heading`,children:[(0,y.jsx)(`strong`,{id:`stats-signals-heading`,className:_.signalsTitle,children:C.alerts}),(0,y.jsx)(`ul`,{children:b.data?.signals.map(e=>(0,y.jsx)(`li`,{children:S.signal(e)},e.kind))})]}),(0,y.jsx)(`nav`,{className:_.tabs,"aria-label":C.tabsLabel,children:h.map(e=>(0,y.jsx)(p,{to:D(e.segment),className:c(_.tab,e===k&&_.tabActive,e===M&&_.tabPending),"aria-current":e===k?`page`:void 0,children:C.tabs[e.key]},e.key))}),(0,y.jsx)(g,{context:{heading:j}})]})}export{b as StatsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,S as t,St as n,T as r,it as i,kn as a,t as o,vn as s,yn as c}from"./cx-DDl6tKXq.js";import{i as l,r as u}from"./start-YlC0KTe5.js";import{t as d}from"./StatsPage.module-D8dvB8Va.js";var f=a(c(),1),p={panel:`_panel_1ke0e_1`,head:`_head_1ke0e_14`,title:`_title_1ke0e_21`},m=s();function h({title:e,aside:t,children:n}){let r=(0,f.useId)();return(0,m.jsxs)(`section`,{className:p.panel,"aria-labelledby":r,children:[(0,m.jsxs)(`div`,{className:p.head,children:[(0,m.jsx)(`h2`,{id:r,className:p.title,children:e}),t]}),n]})}var g={muted:`_muted_14ll2_1`,subTitle:`_subTitle_14ll2_7`,rows:`_rows_14ll2_14`,countRow:`_countRow_14ll2_28`,row:`_row_14ll2_14`,rowLabel:`_rowLabel_14ll2_41`,rowValue:`_rowValue_14ll2_58`,wide:`_wide_14ll2_64`,track:`_track_14ll2_68`,fill:`_fill_14ll2_75`,grain:`_grain_14ll2_82`};function _({query:r,emptyMessage:i=null,children:a}){let{stats:s}=e(),{error:c,data:f,isFetching:p}=r,h=f!==void 0,g=c instanceof t&&c.status===404,_=g?null:c,v=c===null&&!h,b=y(s,c,g,h,i),{status:x,keepFocus:S}=u(b===null&&_===null,n()?.heading);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{ref:x,tabIndex:-1,role:`status`,"aria-live":`polite`,className:b===null&&_===null?`visually-hidden`:o(d.hint,v&&d.hintLoading),children:[b!==null&&(0,m.jsx)(`p`,{children:b}),_!==null&&(0,m.jsx)(l,{error:_,fetching:p,onRetry:()=>{S(),r.refetch()}})]}),!g&&f!==void 0&&i===null&&(0,m.jsx)(`div`,{className:d.content,children:a(f)})]})}function v({query:t,children:n}){let{stats:i}=e(),a=r(),o=t.data?.invalidJournalLines??0,s=t.data?.unknownJournalLines??0,c=t.data?.unparsedTasks??0,l=[o>0?i.invalidJournalLines(o):null,s>0?i.unknownJournalLines(s):null,c>0?i.unparsedTasks(c):null].filter(e=>e!==null);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`p`,{className:l.length>0?d.warning:`visually-hidden`,role:`status`,children:l.join(` `)}),(0,m.jsx)(_,{query:t,emptyMessage:t.data?.taskCount===0?i.noTasks:null,children:e=>(0,m.jsxs)(m.Fragment,{children:[n(e),(0,m.jsx)(`p`,{className:d.note,children:b(i,a,e.journalSince)})]})})]})}function y(e,t,n,r,i){return n?e.projectNotFound:t===null?r?i:e.loading:null}function b(e,t,n){return n===null?e.journalEmpty:e.journalSince(i(t,n))}export{h as i,v as n,g as r,_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,
|
|
1
|
+
import{E as e,vn as t}from"./cx-DDl6tKXq.js";var n={scroll:`_scroll_14ae0_1`,table:`_table_14ae0_14`,child:`_child_14ae0_45`,total:`_total_14ae0_49`},r=t();function i({label:t,head:i,rows:a}){let{stats:o}=e();return(0,r.jsx)(`div`,{className:n.scroll,tabIndex:0,role:`region`,"aria-label":o.tableLabel(t),children:(0,r.jsxs)(`table`,{className:n.table,children:[(0,r.jsx)(`thead`,{children:(0,r.jsx)(`tr`,{children:i.map(e=>(0,r.jsx)(`th`,{scope:`col`,children:e},e))})}),(0,r.jsx)(`tbody`,{children:a.map(e=>(0,r.jsx)(`tr`,{className:e.tone&&n[e.tone],children:e.cells.map((e,t)=>t===0?(0,r.jsx)(`th`,{scope:`row`,children:e},i[t]):(0,r.jsx)(`td`,{children:e},i[t]))},e.key))})]})})}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,
|
|
1
|
+
import{E as e,vn as t}from"./cx-DDl6tKXq.js";import{t as n}from"./StatsPage.module-D8dvB8Va.js";var r=t();function i({repos:t}){let{stats:i}=e();return t.map(e=>(0,r.jsx)(`p`,{className:n.warning,role:`status`,children:i.unavailableRepo(e)},e))}export{i as t};
|