@diagrammo/dgmo 0.74.0 → 0.75.0
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/advanced.d.ts +11 -49
- package/dist/advanced.js +38 -38
- package/dist/{analyzer-FHRJUIMW.js → analyzer-QTDQEMS5.js} +4 -6
- package/dist/block.js +6 -6
- package/dist/{charts-d3-LWHTOVX7.js → charts-d3-SQEVMIAM.js} +5 -5
- package/dist/{chunk-TC63QU4M.js → chunk-32MOGTKT.js} +31 -196
- package/dist/{chunk-CMQJP5L4.js → chunk-3LJNQ6LR.js} +4 -4
- package/dist/{chunk-GJQQCI63.js → chunk-3SQJZMPO.js} +1 -127
- package/dist/{chunk-BBH5IAAR.js → chunk-76IBFEYW.js} +3 -3
- package/dist/{chunk-YJ5G2WRU.js → chunk-7EZ5AKBK.js} +3 -3
- package/dist/{chunk-5NAOTRLN.js → chunk-7G4XMHDB.js} +3 -3
- package/dist/{chunk-LSHMDQZQ.js → chunk-AFR6GWXD.js} +3 -3
- package/dist/{chunk-T6BO4VO6.js → chunk-AYM472K3.js} +2 -2
- package/dist/{chunk-YSMI6TNZ.js → chunk-BCB24FG7.js} +2 -2
- package/dist/{chunk-RQ6SEQOT.js → chunk-BFTRW24X.js} +2 -2
- package/dist/{chunk-5KE6KHY6.js → chunk-CAPR5DET.js} +2 -2
- package/dist/{chunk-GQJ35I2I.js → chunk-CLQJAGWL.js} +7 -5
- package/dist/{chunk-NW3VXCXR.js → chunk-COCMMQXW.js} +2 -2
- package/dist/{chunk-A4GOY3PE.js → chunk-DEW62ON3.js} +1 -3
- package/dist/{chunk-SXZS56YM.js → chunk-DSH7NJ2G.js} +3 -3
- package/dist/{chunk-WWQ6TUVK.js → chunk-F4CPZRG2.js} +3 -3
- package/dist/{chunk-PHRBLJ3K.js → chunk-GEURKGZS.js} +2 -2
- package/dist/{chunk-L2EA5YLO.js → chunk-HGFKDSKZ.js} +3 -3
- package/dist/{chunk-JSYAH7KR.js → chunk-HOIAQ3P2.js} +2 -2
- package/dist/{chunk-FGXBIOVK.js → chunk-IFC3JXCT.js} +2 -2
- package/dist/{chunk-ALDU62VN.js → chunk-IGQW7TKM.js} +3 -3
- package/dist/{chunk-EV6BZMBZ.js → chunk-IHUOYDLN.js} +3 -3
- package/dist/{chunk-474D3IUN.js → chunk-JL7BDLC6.js} +4 -4
- package/dist/{chunk-ULEWCCBN.js → chunk-JQ575OAK.js} +2 -2
- package/dist/{chunk-YXY6V2YN.js → chunk-M3IVOGZE.js} +37 -39
- package/dist/{chunk-YJMWEZOB.js → chunk-MG3DE3VO.js} +2 -2
- package/dist/{chunk-2MJSSDK5.js → chunk-OUJG73YJ.js} +2 -2
- package/dist/{chunk-CDFIZHVD.js → chunk-QI4Q5ZZH.js} +3 -3
- package/dist/{chunk-57Z2WXJ2.js → chunk-QUYYL3LP.js} +2 -2
- package/dist/{chunk-FL5IKZQA.js → chunk-U5B3TUEW.js} +2 -2
- package/dist/{chunk-TTCXHFFB.js → chunk-U7AO6FRL.js} +2 -2
- package/dist/{chunk-RN3PAL4E.js → chunk-UBW53CNS.js} +2 -2
- package/dist/{chunk-MDEG62W7.js → chunk-UTTRJ6KN.js} +3 -3
- package/dist/{chunk-Q6LP67RP.js → chunk-UWYZIGCB.js} +2 -2
- package/dist/{chunk-ALBVWTU4.js → chunk-XFLLYY3V.js} +3 -3
- package/dist/{chunk-XJLNQEQS.js → chunk-XHROEQ23.js} +3 -3
- package/dist/{chunk-EPH4UMUE.js → chunk-YVDBBWEP.js} +2 -2
- package/dist/{chunk-KR432TCU.js → chunk-ZMKCG3FT.js} +3 -3
- package/dist/{dimensions-Q5SFPATB.js → dimensions-NLQ64ED5.js} +4 -4
- package/dist/{flowchart-renderer-TTUSBBQI.js → flowchart-renderer-RIJ5FZKO.js} +3 -3
- package/dist/index.js +6 -6
- package/dist/pert.d.ts +4 -33
- package/dist/{renderer-AA5CC4VJ.js → renderer-4EWGZLJ6.js} +3 -3
- package/dist/{renderer-6SSIELBC.js → renderer-4PNVGHVA.js} +3 -3
- package/dist/{renderer-U6PK5ZKD.js → renderer-5W3HWIUL.js} +3 -3
- package/dist/{renderer-46QQH33X.js → renderer-73QHYZ2Q.js} +4 -4
- package/dist/{renderer-N2X3WYBY.js → renderer-A2YWSBPY.js} +4 -4
- package/dist/{renderer-TI7QABY7.js → renderer-CGOPX4HW.js} +4 -4
- package/dist/{renderer-6IGQEVTE.js → renderer-CO5O5VR5.js} +3 -3
- package/dist/{renderer-QLZVE45Z.js → renderer-D7N7PPB7.js} +3 -3
- package/dist/{renderer-6HRDO635.js → renderer-DKW273R7.js} +4 -4
- package/dist/{renderer-IPNSOM5J.js → renderer-F24V3RD3.js} +4 -4
- package/dist/{renderer-55JP6AO4.js → renderer-FGGDZZFQ.js} +3 -3
- package/dist/{renderer-E5BYZTVH.js → renderer-FUJNSC5X.js} +3 -3
- package/dist/{renderer-YQI5U6KJ.js → renderer-GF6S5ZX6.js} +3 -3
- package/dist/{renderer-UXZEYV2X.js → renderer-GJDVPXI3.js} +4 -4
- package/dist/{renderer-NECP7G4X.js → renderer-JMJ7Q5OC.js} +4 -4
- package/dist/{renderer-YM7PLDBF.js → renderer-KMOGGMM7.js} +5 -5
- package/dist/{renderer-P55KPBIX.js → renderer-LBNVKVO3.js} +4 -4
- package/dist/{renderer-4K6KR3U3.js → renderer-MUW4G2N6.js} +6 -6
- package/dist/{renderer-2WW35ZIW.js → renderer-PIEPRK6M.js} +4 -4
- package/dist/{renderer-EJXFEA5C.js → renderer-PKRKLOYR.js} +4 -4
- package/dist/{renderer-W7RKBG6C.js → renderer-PR3KLNST.js} +4 -4
- package/dist/{renderer-SCIHPARI.js → renderer-QAMOXOZ2.js} +3 -3
- package/dist/{renderer-3LD3ANCP.js → renderer-RUHC6D3B.js} +4 -4
- package/dist/{renderer-OWBIWBMK.js → renderer-UUP6OX6F.js} +3 -3
- package/dist/{renderer-UUPNOGO5.js → renderer-UYZSP7MF.js} +4 -4
- package/dist/{renderer-227JWWHX.js → renderer-WDSBFDQ2.js} +4 -4
- package/dist/{renderer-CF5TYQT4.js → renderer-ZAJ5353N.js} +3 -3
- package/dist/{state-renderer-OPP6YOJI.js → state-renderer-454ADT7E.js} +4 -4
- package/docs/language-reference.md +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzePert
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3SQJZMPO.js";
|
|
4
4
|
import {
|
|
5
5
|
computeNodeSizing,
|
|
6
6
|
layoutPert
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
INLINE_HEADER_PAD,
|
|
21
21
|
layoutInlineHeader
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MG3DE3VO.js";
|
|
23
23
|
import {
|
|
24
24
|
serializeSvg
|
|
25
25
|
} from "./chunk-RU2HHHYA.js";
|
|
@@ -27,13 +27,12 @@ import {
|
|
|
27
27
|
CAPTION_BOX_PADDING_X,
|
|
28
28
|
CAPTION_BOX_PADDING_Y,
|
|
29
29
|
CAPTION_FONT_SIZE,
|
|
30
|
-
CAPTION_FONT_WEIGHT,
|
|
31
30
|
CAPTION_LINE_HEIGHT,
|
|
32
31
|
CAPTION_TOP_GAP,
|
|
33
32
|
TITLE_FONT_SIZE,
|
|
34
33
|
TITLE_FONT_WEIGHT,
|
|
35
34
|
TITLE_Y
|
|
36
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-DEW62ON3.js";
|
|
37
36
|
import {
|
|
38
37
|
renderIntegratedLegend
|
|
39
38
|
} from "./chunk-QT5UMFPE.js";
|
|
@@ -169,19 +168,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
169
168
|
const effectiveTitle = options.title;
|
|
170
169
|
const effectiveSubtitle = options.subtitle ?? null;
|
|
171
170
|
const titleHeight = effectiveTitle ? 80 : effectiveSubtitle ? 50 : 0;
|
|
172
|
-
const anchorAnnotation = anchorAnnotationText(resolved);
|
|
173
171
|
const collapsedSet = new Set(options.collapsedGroupIds ?? []);
|
|
174
|
-
const
|
|
175
|
-
const captionBullets = captionRows !== null && captionRows.length > 0 ? bulletizeCaption(captionRows) : [];
|
|
176
|
-
if (anchorAnnotation) {
|
|
177
|
-
captionBullets.push({
|
|
178
|
-
text: anchorAnnotation,
|
|
179
|
-
level: 0,
|
|
180
|
-
italic: true
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
const analysisLayer = computeAnalysisLayer(resolved, captionBullets, {
|
|
184
|
-
showSummary: options.showSummary ?? true,
|
|
172
|
+
const analysisLayer = computeAnalysisLayer(resolved, {
|
|
185
173
|
showTornado: options.showTornado ?? false,
|
|
186
174
|
showScurve: options.showScurve ?? false,
|
|
187
175
|
showFieldLegend: options.showFieldLegend ?? false
|
|
@@ -340,7 +328,6 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
340
328
|
palette,
|
|
341
329
|
isDark,
|
|
342
330
|
analysisLayer,
|
|
343
|
-
captionBullets,
|
|
344
331
|
sDiagramPad,
|
|
345
332
|
offsetY + layout.height,
|
|
346
333
|
svgW - 2 * sDiagramPad
|
|
@@ -358,16 +345,9 @@ function renderPertForExport(content, theme, palette, now) {
|
|
|
358
345
|
const hasTitle = !!parsed.title && !resolved.options.noTitle;
|
|
359
346
|
const hasSubtitle = resolved.projectSubtitle !== null;
|
|
360
347
|
const titleHeight = hasTitle ? 80 : hasSubtitle ? 50 : 0;
|
|
361
|
-
const captionBullets = resolved.summaryRows !== null && resolved.summaryRows.length > 0 ? bulletizeCaption(resolved.summaryRows) : [];
|
|
362
|
-
const anchorNote = anchorAnnotationText(resolved);
|
|
363
|
-
if (anchorNote) {
|
|
364
|
-
captionBullets.push({ text: anchorNote, level: 0, italic: true });
|
|
365
|
-
}
|
|
366
|
-
const captionBoxHeight = captionBullets.length > 0 ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
|
|
367
|
-
const captionBlockHeight = captionBullets.length > 0 ? CAPTION_TOP_GAP + captionBoxHeight : 0;
|
|
368
348
|
const legendBlockHeight = resolved.tagGroups.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
|
|
369
349
|
const exportWidth = layout.width + DIAGRAM_PADDING * 2;
|
|
370
|
-
const exportHeight = layout.height + DIAGRAM_PADDING * 2 + titleHeight + legendBlockHeight
|
|
350
|
+
const exportHeight = layout.height + DIAGRAM_PADDING * 2 + titleHeight + legendBlockHeight;
|
|
371
351
|
const container = document.createElement("div");
|
|
372
352
|
container.style.width = `${exportWidth}px`;
|
|
373
353
|
container.style.height = `${exportHeight}px`;
|
|
@@ -392,25 +372,17 @@ function renderPertForExport(content, theme, palette, now) {
|
|
|
392
372
|
document.body.removeChild(container);
|
|
393
373
|
}
|
|
394
374
|
}
|
|
395
|
-
function computeAnalysisLayer(resolved,
|
|
396
|
-
const summaryRendered = opts.showSummary && captionBullets.length > 0;
|
|
397
|
-
const captionBoxHeight = summaryRendered ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
|
|
375
|
+
function computeAnalysisLayer(resolved, opts) {
|
|
398
376
|
let tornadoRows = opts.showTornado ? buildTornadoRows(resolved) : [];
|
|
399
377
|
const showTornado = tornadoRows.length > 0;
|
|
400
378
|
let tornadoBoxHeight = showTornado ? tornadoBoxHeightFor(tornadoRows) : 0;
|
|
401
379
|
const scurveData = opts.showScurve ? buildScurveData(resolved) : null;
|
|
402
380
|
const showScurve = scurveData !== null;
|
|
403
381
|
const scurveBoxHeight = showScurve ? SCURVE_BOX_HEIGHT : 0;
|
|
404
|
-
const fieldLegendInAnalysisRow = opts.showFieldLegend && (
|
|
405
|
-
const col1Width =
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
) : fieldLegendInAnalysisRow ? SUMMARY_MAX_W : 0;
|
|
409
|
-
const fieldLegendCol1Height = fieldLegendInAnalysisRow ? fieldLegendHeightFor(col1Width) : 0;
|
|
410
|
-
const col1Items = [];
|
|
411
|
-
if (summaryRendered) col1Items.push(captionBoxHeight);
|
|
412
|
-
if (fieldLegendInAnalysisRow) col1Items.push(fieldLegendCol1Height);
|
|
413
|
-
const col1Height = col1Items.length ? col1Items.reduce((a, b) => a + b, 0) + (col1Items.length - 1) * COL1_VSTACK_GAP : 0;
|
|
382
|
+
const fieldLegendInAnalysisRow = opts.showFieldLegend && (showTornado || showScurve);
|
|
383
|
+
const col1Width = fieldLegendInAnalysisRow ? FIELD_LEGEND_COL1_W : 0;
|
|
384
|
+
const col1Height = fieldLegendInAnalysisRow ? fieldLegendHeightFor(col1Width) : 0;
|
|
385
|
+
const fieldLegendCol1Height = col1Height;
|
|
414
386
|
let analysisRowHeight = Math.max(
|
|
415
387
|
col1Height,
|
|
416
388
|
scurveBoxHeight,
|
|
@@ -433,11 +405,11 @@ function computeAnalysisLayer(resolved, captionBullets, opts) {
|
|
|
433
405
|
analysisCharts.push({ kind: "tornado", contentHeight: tornadoBoxHeight });
|
|
434
406
|
if (showScurve)
|
|
435
407
|
analysisCharts.push({ kind: "scurve", contentHeight: scurveBoxHeight });
|
|
436
|
-
const analysisHasContent =
|
|
408
|
+
const analysisHasContent = analysisCharts.length > 0 || fieldLegendInAnalysisRow;
|
|
437
409
|
const fieldLegendStandalone = opts.showFieldLegend && !fieldLegendInAnalysisRow;
|
|
438
410
|
let minContentWidth = 0;
|
|
439
411
|
if (analysisHasContent) {
|
|
440
|
-
const col1Used =
|
|
412
|
+
const col1Used = fieldLegendInAnalysisRow;
|
|
441
413
|
if (col1Used) minContentWidth += col1Width;
|
|
442
414
|
for (const w of analysisCharts) {
|
|
443
415
|
minContentWidth += w.kind === "tornado" ? TORNADO_MIN_W : SCURVE_MIN_W;
|
|
@@ -446,7 +418,6 @@ function computeAnalysisLayer(resolved, captionBullets, opts) {
|
|
|
446
418
|
if (colCount > 1) minContentWidth += (colCount - 1) * ANALYSIS_GAP;
|
|
447
419
|
}
|
|
448
420
|
return {
|
|
449
|
-
summaryRendered,
|
|
450
421
|
showTornado,
|
|
451
422
|
showScurve,
|
|
452
423
|
fieldLegendInAnalysisRow,
|
|
@@ -455,7 +426,6 @@ function computeAnalysisLayer(resolved, captionBullets, opts) {
|
|
|
455
426
|
tornadoRows,
|
|
456
427
|
scurveData,
|
|
457
428
|
analysisCharts,
|
|
458
|
-
captionBoxHeight,
|
|
459
429
|
fieldLegendCol1Height,
|
|
460
430
|
tornadoBoxHeight,
|
|
461
431
|
scurveBoxHeight,
|
|
@@ -489,7 +459,7 @@ function analysisContentHeightAt(state, availableWidth) {
|
|
|
489
459
|
});
|
|
490
460
|
return total;
|
|
491
461
|
}
|
|
492
|
-
function paintAnalysisLayer(svg, resolved, palette, isDark, state,
|
|
462
|
+
function paintAnalysisLayer(svg, resolved, palette, isDark, state, x, y, availableWidth) {
|
|
493
463
|
if (!state.analysisHasContent) {
|
|
494
464
|
if (!state.fieldLegendStandalone) return 0;
|
|
495
465
|
const bandY = y + CAPTION_TOP_GAP;
|
|
@@ -511,7 +481,6 @@ function paintAnalysisLayer(svg, resolved, palette, isDark, state, captionBullet
|
|
|
511
481
|
palette,
|
|
512
482
|
isDark,
|
|
513
483
|
state,
|
|
514
|
-
captionBullets,
|
|
515
484
|
x,
|
|
516
485
|
y,
|
|
517
486
|
availableWidth
|
|
@@ -523,15 +492,14 @@ function paintAnalysisLayer(svg, resolved, palette, isDark, state, captionBullet
|
|
|
523
492
|
palette,
|
|
524
493
|
isDark,
|
|
525
494
|
state,
|
|
526
|
-
captionBullets,
|
|
527
495
|
x,
|
|
528
496
|
y,
|
|
529
497
|
availableWidth
|
|
530
498
|
);
|
|
531
499
|
}
|
|
532
|
-
function paintAnalysisRowMode(svg, resolved, palette, isDark, state,
|
|
500
|
+
function paintAnalysisRowMode(svg, resolved, palette, isDark, state, x, y, availableWidth) {
|
|
533
501
|
const bandY = y + CAPTION_TOP_GAP;
|
|
534
|
-
const col1Used = state.
|
|
502
|
+
const col1Used = state.fieldLegendInAnalysisRow;
|
|
535
503
|
const colCount = (col1Used ? 1 : 0) + state.analysisCharts.length;
|
|
536
504
|
const nGaps = Math.max(0, colCount - 1);
|
|
537
505
|
const usableWidth = availableWidth - nGaps * ANALYSIS_GAP;
|
|
@@ -552,35 +520,18 @@ function paintAnalysisRowMode(svg, resolved, palette, isDark, state, captionBull
|
|
|
552
520
|
fillMode: resolved.options.fillMode
|
|
553
521
|
});
|
|
554
522
|
} else {
|
|
555
|
-
const scurveTitle = !state.summaryRendered && captionBullets.length > 0 ? (
|
|
556
|
-
// In-bounds by length check.
|
|
557
|
-
captionBullets[0].text
|
|
558
|
-
) : void 0;
|
|
559
523
|
renderScurveBlock(svg, state.scurveData, {
|
|
560
524
|
...args,
|
|
561
|
-
unit: resolved.options.timeUnit
|
|
562
|
-
...scurveTitle !== void 0 && { title: scurveTitle }
|
|
525
|
+
unit: resolved.options.timeUnit
|
|
563
526
|
});
|
|
564
527
|
}
|
|
565
528
|
cursorX += chartWidth + ANALYSIS_GAP;
|
|
566
529
|
}
|
|
567
530
|
if (col1Used) {
|
|
568
|
-
let stackY = bandY;
|
|
569
|
-
if (state.summaryRendered) {
|
|
570
|
-
renderCaptionBlock(svg, captionBullets, {
|
|
571
|
-
x: cursorX,
|
|
572
|
-
y: stackY,
|
|
573
|
-
width: state.col1Width,
|
|
574
|
-
height: state.captionBoxHeight,
|
|
575
|
-
palette,
|
|
576
|
-
isDark
|
|
577
|
-
});
|
|
578
|
-
stackY += state.captionBoxHeight + COL1_VSTACK_GAP;
|
|
579
|
-
}
|
|
580
531
|
if (state.fieldLegendInAnalysisRow) {
|
|
581
532
|
renderFieldLegendBlock(svg, {
|
|
582
533
|
x: cursorX,
|
|
583
|
-
y:
|
|
534
|
+
y: bandY,
|
|
584
535
|
width: state.col1Width,
|
|
585
536
|
height: state.fieldLegendCol1Height,
|
|
586
537
|
palette,
|
|
@@ -590,7 +541,6 @@ function paintAnalysisRowMode(svg, resolved, palette, isDark, state, captionBull
|
|
|
590
541
|
}
|
|
591
542
|
return CAPTION_TOP_GAP + state.analysisRowHeight;
|
|
592
543
|
}
|
|
593
|
-
var FIELD_LEGEND_MIN_W = 220;
|
|
594
544
|
function packRows(state, availableWidth) {
|
|
595
545
|
const rows = [];
|
|
596
546
|
const charts = state.analysisCharts;
|
|
@@ -610,23 +560,7 @@ function packRows(state, availableWidth) {
|
|
|
610
560
|
} else if (charts.length === 1) {
|
|
611
561
|
rows.push([{ kind: charts[0].kind, paintWidth: availableWidth }]);
|
|
612
562
|
}
|
|
613
|
-
|
|
614
|
-
const hasField = state.fieldLegendInAnalysisRow;
|
|
615
|
-
if (hasSummary && hasField) {
|
|
616
|
-
const summaryW = state.col1Width;
|
|
617
|
-
const fieldW = availableWidth - summaryW - ANALYSIS_GAP;
|
|
618
|
-
if (fieldW >= FIELD_LEGEND_MIN_W) {
|
|
619
|
-
rows.push([
|
|
620
|
-
{ kind: "summary", paintWidth: summaryW },
|
|
621
|
-
{ kind: "field", paintWidth: fieldW }
|
|
622
|
-
]);
|
|
623
|
-
} else {
|
|
624
|
-
rows.push([{ kind: "summary", paintWidth: summaryW }]);
|
|
625
|
-
rows.push([{ kind: "field", paintWidth: availableWidth }]);
|
|
626
|
-
}
|
|
627
|
-
} else if (hasSummary) {
|
|
628
|
-
rows.push([{ kind: "summary", paintWidth: state.col1Width }]);
|
|
629
|
-
} else if (hasField) {
|
|
563
|
+
if (state.fieldLegendInAnalysisRow) {
|
|
630
564
|
rows.push([{ kind: "field", paintWidth: availableWidth }]);
|
|
631
565
|
}
|
|
632
566
|
return rows;
|
|
@@ -637,13 +571,11 @@ function itemContentHeight(state, kind, paintWidth) {
|
|
|
637
571
|
return state.tornadoBoxHeight;
|
|
638
572
|
case "scurve":
|
|
639
573
|
return state.scurveBoxHeight;
|
|
640
|
-
case "summary":
|
|
641
|
-
return state.captionBoxHeight;
|
|
642
574
|
case "field":
|
|
643
575
|
return fieldLegendHeightFor(paintWidth);
|
|
644
576
|
}
|
|
645
577
|
}
|
|
646
|
-
function paintAnalysisStackMode(svg, resolved, palette, isDark, state,
|
|
578
|
+
function paintAnalysisStackMode(svg, resolved, palette, isDark, state, x, y, availableWidth) {
|
|
647
579
|
const rows = packRows(state, availableWidth);
|
|
648
580
|
let cursorY = y + CAPTION_TOP_GAP;
|
|
649
581
|
rows.forEach((row, rowIndex) => {
|
|
@@ -674,21 +606,12 @@ function paintAnalysisStackMode(svg, resolved, palette, isDark, state, captionBu
|
|
|
674
606
|
fillMode: resolved.options.fillMode
|
|
675
607
|
});
|
|
676
608
|
break;
|
|
677
|
-
case "scurve":
|
|
678
|
-
const scurveTitle = !state.summaryRendered && captionBullets.length > 0 ? (
|
|
679
|
-
// In-bounds by length check.
|
|
680
|
-
captionBullets[0].text
|
|
681
|
-
) : void 0;
|
|
609
|
+
case "scurve":
|
|
682
610
|
renderScurveBlock(svg, state.scurveData, {
|
|
683
611
|
...args,
|
|
684
|
-
unit: resolved.options.timeUnit
|
|
685
|
-
...scurveTitle !== void 0 && { title: scurveTitle }
|
|
612
|
+
unit: resolved.options.timeUnit
|
|
686
613
|
});
|
|
687
614
|
break;
|
|
688
|
-
}
|
|
689
|
-
case "summary":
|
|
690
|
-
renderCaptionBlock(svg, captionBullets, args);
|
|
691
|
-
break;
|
|
692
615
|
case "field":
|
|
693
616
|
renderFieldLegendBlock(svg, args);
|
|
694
617
|
break;
|
|
@@ -701,14 +624,7 @@ function paintAnalysisStackMode(svg, resolved, palette, isDark, state, captionBu
|
|
|
701
624
|
return cursorY - y;
|
|
702
625
|
}
|
|
703
626
|
function measurePertAnalysisBlock(resolved, width, options) {
|
|
704
|
-
const
|
|
705
|
-
const captionBullets = captionRows !== null && captionRows.length > 0 ? bulletizeCaption(captionRows) : [];
|
|
706
|
-
const anchorAnnotation = anchorAnnotationText(resolved);
|
|
707
|
-
if (anchorAnnotation) {
|
|
708
|
-
captionBullets.push({ text: anchorAnnotation, level: 0, italic: true });
|
|
709
|
-
}
|
|
710
|
-
const state = computeAnalysisLayer(resolved, captionBullets, {
|
|
711
|
-
showSummary: options.showSummary ?? true,
|
|
627
|
+
const state = computeAnalysisLayer(resolved, {
|
|
712
628
|
showTornado: options.showTornado ?? false,
|
|
713
629
|
showScurve: options.showScurve ?? false,
|
|
714
630
|
showFieldLegend: options.showFieldLegend ?? false
|
|
@@ -717,7 +633,6 @@ function measurePertAnalysisBlock(resolved, width, options) {
|
|
|
717
633
|
return { width: 0, height: 0 };
|
|
718
634
|
}
|
|
719
635
|
const itemMinW = Math.max(
|
|
720
|
-
state.summaryRendered ? SUMMARY_MIN_W : 0,
|
|
721
636
|
state.showTornado ? TORNADO_MIN_W : 0,
|
|
722
637
|
state.showScurve ? SCURVE_MIN_W : 0,
|
|
723
638
|
0
|
|
@@ -727,21 +642,13 @@ function measurePertAnalysisBlock(resolved, width, options) {
|
|
|
727
642
|
}
|
|
728
643
|
function renderPertAnalysisBlock(container, resolved, palette, isDark, options) {
|
|
729
644
|
d3Selection.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
730
|
-
const
|
|
731
|
-
const captionBullets = captionRows !== null && captionRows.length > 0 ? bulletizeCaption(captionRows) : [];
|
|
732
|
-
const anchorAnnotation = anchorAnnotationText(resolved);
|
|
733
|
-
if (anchorAnnotation) {
|
|
734
|
-
captionBullets.push({ text: anchorAnnotation, level: 0, italic: true });
|
|
735
|
-
}
|
|
736
|
-
const state = computeAnalysisLayer(resolved, captionBullets, {
|
|
737
|
-
showSummary: options.showSummary ?? true,
|
|
645
|
+
const state = computeAnalysisLayer(resolved, {
|
|
738
646
|
showTornado: options.showTornado ?? false,
|
|
739
647
|
showScurve: options.showScurve ?? false,
|
|
740
648
|
showFieldLegend: options.showFieldLegend ?? false
|
|
741
649
|
});
|
|
742
650
|
if (!state.analysisHasContent && !state.fieldLegendStandalone) return;
|
|
743
651
|
const itemMinW = Math.max(
|
|
744
|
-
state.summaryRendered ? SUMMARY_MIN_W : 0,
|
|
745
652
|
state.showTornado ? TORNADO_MIN_W : 0,
|
|
746
653
|
state.showScurve ? SCURVE_MIN_W : 0,
|
|
747
654
|
// Field labels has no hard min — it wraps to whatever width it gets.
|
|
@@ -751,17 +658,7 @@ function renderPertAnalysisBlock(container, resolved, palette, isDark, options)
|
|
|
751
658
|
const totalHeight = analysisLayerHeightAt(state, width);
|
|
752
659
|
if (totalHeight <= 0 || width <= 0) return;
|
|
753
660
|
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", totalHeight).attr("viewBox", `0 0 ${width} ${totalHeight}`).attr("preserveAspectRatio", "xMidYMin meet").style("font-family", FONT_FAMILY).style("overflow", "visible");
|
|
754
|
-
paintAnalysisLayer(
|
|
755
|
-
svg,
|
|
756
|
-
resolved,
|
|
757
|
-
palette,
|
|
758
|
-
isDark,
|
|
759
|
-
state,
|
|
760
|
-
captionBullets,
|
|
761
|
-
0,
|
|
762
|
-
0,
|
|
763
|
-
width
|
|
764
|
-
);
|
|
661
|
+
paintAnalysisLayer(svg, resolved, palette, isDark, state, 0, 0, width);
|
|
765
662
|
}
|
|
766
663
|
function buildArrowheads(defs, palette, arrowW = ARROWHEAD_W, arrowH = ARROWHEAD_H) {
|
|
767
664
|
const mk = (id, fill) => {
|
|
@@ -1308,48 +1205,14 @@ function computeAnchorPinSet(resolved) {
|
|
|
1308
1205
|
}
|
|
1309
1206
|
return pinned;
|
|
1310
1207
|
}
|
|
1311
|
-
function anchorAnnotationText(resolved) {
|
|
1312
|
-
const anchor = resolved.options.anchor;
|
|
1313
|
-
if (anchor === null) return null;
|
|
1314
|
-
const today = resolved.options.today;
|
|
1315
|
-
if (anchor.kind === "forward") {
|
|
1316
|
-
return `Forward from start-date ${anchor.date}`;
|
|
1317
|
-
}
|
|
1318
|
-
const asOf = today ? ` (as of ${today})` : "";
|
|
1319
|
-
if (resolved.projectStart) {
|
|
1320
|
-
return `Backward-anchored from end-date ${anchor.date}${asOf}`;
|
|
1321
|
-
}
|
|
1322
|
-
return `Backward-anchored from end-date ${anchor.date}${asOf} \u2014 upstream activities still need estimates`;
|
|
1323
|
-
}
|
|
1324
|
-
function bulletizeCaption(rows) {
|
|
1325
|
-
return rows.map((row) => {
|
|
1326
|
-
const out = { text: row.text, level: row.level };
|
|
1327
|
-
if (row.italic) out.italic = true;
|
|
1328
|
-
if (row.isPast) out.isPast = true;
|
|
1329
|
-
return out;
|
|
1330
|
-
});
|
|
1331
|
-
}
|
|
1332
|
-
var SUB_BULLET_INDENT = 20;
|
|
1333
1208
|
var CAPTION_HEADER_BAND_HEIGHT = CAPTION_LINE_HEIGHT + 8;
|
|
1334
|
-
function captionNaturalWidth(bullets) {
|
|
1335
|
-
const charW = CAPTION_FONT_SIZE * 0.55;
|
|
1336
|
-
let max = "Summary".length * charW;
|
|
1337
|
-
for (const b of bullets) {
|
|
1338
|
-
const indent = b.level === 1 ? SUB_BULLET_INDENT : 0;
|
|
1339
|
-
const w = indent + `\u2022 ${b.text}`.length * charW;
|
|
1340
|
-
if (w > max) max = w;
|
|
1341
|
-
}
|
|
1342
|
-
return Math.ceil(max + 2 * CAPTION_BOX_PADDING_X);
|
|
1343
|
-
}
|
|
1344
1209
|
var TORNADO_TOP_N = 10;
|
|
1345
1210
|
var TORNADO_ROW_HEIGHT = 26;
|
|
1346
1211
|
var TORNADO_NAME_COL_W = 160;
|
|
1347
1212
|
var TORNADO_BAR_FONT_SIZE = 13;
|
|
1348
1213
|
var TORNADO_BAR_HEIGHT = 16;
|
|
1349
|
-
var
|
|
1350
|
-
var SUMMARY_MAX_W = 420;
|
|
1214
|
+
var FIELD_LEGEND_COL1_W = 420;
|
|
1351
1215
|
var ANALYSIS_GAP = 16;
|
|
1352
|
-
var COL1_VSTACK_GAP = 8;
|
|
1353
1216
|
var TORNADO_MIN_W = 340;
|
|
1354
1217
|
var SCURVE_MIN_W = 320;
|
|
1355
1218
|
var SCURVE_BOX_HEIGHT = 220;
|
|
@@ -1358,27 +1221,6 @@ var SCURVE_PLOT_PADDING_RIGHT = 16;
|
|
|
1358
1221
|
var SCURVE_PLOT_PADDING_BOTTOM = 44;
|
|
1359
1222
|
var SCURVE_TICK_FONT_SIZE = 13;
|
|
1360
1223
|
var SCURVE_PERCENTILE_RADIUS = 4;
|
|
1361
|
-
function renderCaptionBlock(svg, bullets, args) {
|
|
1362
|
-
const { x, y, width, height, palette, isDark } = args;
|
|
1363
|
-
const { fill, stroke: chromeStroke } = analysisBlockChrome(palette, isDark);
|
|
1364
|
-
const labelColor = contrastText(
|
|
1365
|
-
fill,
|
|
1366
|
-
palette.textOnFillLight,
|
|
1367
|
-
palette.textOnFillDark
|
|
1368
|
-
);
|
|
1369
|
-
const block = svg.append("g").attr("class", "pert-caption-block").attr("data-pert-caption", "");
|
|
1370
|
-
block.append("rect").attr("class", "pert-caption-rect").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("rx", NODE_RADIUS).attr("ry", NODE_RADIUS).attr("fill", fill).attr("stroke", chromeStroke).attr("stroke-width", NODE_STROKE_WIDTH);
|
|
1371
|
-
block.append("text").attr("class", "pert-caption-header").attr("x", x + width / 2).attr("y", y + CAPTION_BOX_PADDING_Y + CAPTION_FONT_SIZE).attr("text-anchor", "middle").attr("fill", labelColor).attr("font-size", CAPTION_FONT_SIZE).attr("font-weight", "700").text("Summary");
|
|
1372
|
-
const textX = x + CAPTION_BOX_PADDING_X;
|
|
1373
|
-
const firstBaselineY = y + CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT + CAPTION_FONT_SIZE;
|
|
1374
|
-
const text = block.append("text").attr("class", "pert-caption").attr("x", textX).attr("y", firstBaselineY).attr("text-anchor", "start").attr("fill", labelColor).attr("font-size", CAPTION_FONT_SIZE).attr("font-weight", CAPTION_FONT_WEIGHT);
|
|
1375
|
-
bullets.forEach((bullet, i) => {
|
|
1376
|
-
const indent = bullet.level === 1 ? SUB_BULLET_INDENT : 0;
|
|
1377
|
-
const tspan = text.append("tspan").attr("x", textX + indent).text(`\u2022 ${bullet.text}`);
|
|
1378
|
-
if (bullet.italic) tspan.attr("font-style", "italic");
|
|
1379
|
-
if (i > 0) tspan.attr("dy", CAPTION_LINE_HEIGHT);
|
|
1380
|
-
});
|
|
1381
|
-
}
|
|
1382
1224
|
function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
1383
1225
|
if (resolved.tagGroups.length === 0) return;
|
|
1384
1226
|
const { x, y, width, activeGroup, exportMode, inline } = args;
|
|
@@ -1632,24 +1474,22 @@ function buildScurveData(resolved) {
|
|
|
1632
1474
|
samples,
|
|
1633
1475
|
p16Days: bandLeft,
|
|
1634
1476
|
p84Days: bandRight,
|
|
1635
|
-
// Percentile dots/date-labels — `projectRounded`
|
|
1636
|
-
//
|
|
1637
|
-
//
|
|
1638
|
-
// "P{X} latest-safe start: <date>" row.
|
|
1477
|
+
// Percentile dots/date-labels — `projectRounded` ceils the
|
|
1478
|
+
// duration, so each dot's date label is the conservative reading
|
|
1479
|
+
// of its trial rather than a rounded-down one.
|
|
1639
1480
|
p50Days: projectRounded(mc.p50),
|
|
1640
1481
|
p80Days: projectRounded(mc.p80),
|
|
1641
1482
|
p95Days: projectRounded(mc.p95),
|
|
1642
1483
|
xMinDays,
|
|
1643
1484
|
xMaxDays,
|
|
1644
1485
|
referenceLines,
|
|
1645
|
-
framingNote: anchorAnnotationText(resolved),
|
|
1646
1486
|
anchorDate: resolved.projectStart,
|
|
1647
1487
|
deadlineDays,
|
|
1648
1488
|
deadlineDate
|
|
1649
1489
|
};
|
|
1650
1490
|
}
|
|
1651
1491
|
function renderScurveBlock(svg, data, args) {
|
|
1652
|
-
const { x, y, width, height, palette, isDark, unit
|
|
1492
|
+
const { x, y, width, height, palette, isDark, unit } = args;
|
|
1653
1493
|
const { fill, stroke: chromeStroke } = analysisBlockChrome(palette, isDark);
|
|
1654
1494
|
const labelColor = contrastText(
|
|
1655
1495
|
fill,
|
|
@@ -1658,16 +1498,11 @@ function renderScurveBlock(svg, data, args) {
|
|
|
1658
1498
|
);
|
|
1659
1499
|
const block = svg.append("g").attr("class", "pert-scurve-block").attr("data-pert-scurve", "");
|
|
1660
1500
|
block.append("rect").attr("class", "pert-scurve-rect").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("rx", NODE_RADIUS).attr("ry", NODE_RADIUS).attr("fill", fill).attr("stroke", chromeStroke).attr("stroke-width", NODE_STROKE_WIDTH);
|
|
1661
|
-
const hasTitle = typeof title === "string" && title.length > 0;
|
|
1662
|
-
if (hasTitle) {
|
|
1663
|
-
const titleText = title.replace(/\.$/, "");
|
|
1664
|
-
block.append("text").attr("class", "pert-scurve-header").attr("x", x + width / 2).attr("y", y + CAPTION_BOX_PADDING_Y + CAPTION_FONT_SIZE).attr("text-anchor", "middle").attr("fill", labelColor).attr("font-size", CAPTION_FONT_SIZE).attr("font-weight", "700").text(titleText);
|
|
1665
|
-
}
|
|
1666
1501
|
const SCURVE_DEADLINE_LABEL_HEIGHT = 16;
|
|
1667
1502
|
const hasDeadline = data.deadlineDays !== null;
|
|
1668
1503
|
const plotLeft = x + SCURVE_PLOT_PADDING_X;
|
|
1669
1504
|
const plotRight = x + width - SCURVE_PLOT_PADDING_RIGHT;
|
|
1670
|
-
const plotTop = y + CAPTION_BOX_PADDING_Y + (
|
|
1505
|
+
const plotTop = y + CAPTION_BOX_PADDING_Y + (hasDeadline ? SCURVE_DEADLINE_LABEL_HEIGHT : 0);
|
|
1671
1506
|
const isAnchored = data.anchorDate !== null;
|
|
1672
1507
|
const plotBottom = y + height - SCURVE_PLOT_PADDING_BOTTOM;
|
|
1673
1508
|
const plotW = plotRight - plotLeft;
|
|
@@ -1873,4 +1708,4 @@ export {
|
|
|
1873
1708
|
measurePertAnalysisBlock,
|
|
1874
1709
|
renderPertAnalysisBlock
|
|
1875
1710
|
};
|
|
1876
|
-
//# sourceMappingURL=chunk-
|
|
1711
|
+
//# sourceMappingURL=chunk-32MOGTKT.js.map
|
|
@@ -16,15 +16,15 @@ import {
|
|
|
16
16
|
} from "./chunk-FJ57274M.js";
|
|
17
17
|
import {
|
|
18
18
|
formatDateLabel
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YVDBBWEP.js";
|
|
20
20
|
import {
|
|
21
21
|
layoutInlineHeader
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MG3DE3VO.js";
|
|
23
23
|
import {
|
|
24
24
|
TITLE_FONT_SIZE,
|
|
25
25
|
TITLE_FONT_WEIGHT,
|
|
26
26
|
TITLE_Y
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-DEW62ON3.js";
|
|
28
28
|
import {
|
|
29
29
|
renderIntegratedLegend
|
|
30
30
|
} from "./chunk-QT5UMFPE.js";
|
|
@@ -1161,4 +1161,4 @@ export {
|
|
|
1161
1161
|
focusEventLine,
|
|
1162
1162
|
renderEventLineForExport
|
|
1163
1163
|
};
|
|
1164
|
-
//# sourceMappingURL=chunk-
|
|
1164
|
+
//# sourceMappingURL=chunk-3LJNQ6LR.js.map
|
|
@@ -598,7 +598,6 @@ function analyzePert(parsed) {
|
|
|
598
598
|
groups: [],
|
|
599
599
|
tagGroups: parsed.tagGroups.slice(),
|
|
600
600
|
mode: "monte-carlo",
|
|
601
|
-
summaryRows: null,
|
|
602
601
|
projectSubtitle: null,
|
|
603
602
|
projectMu: null,
|
|
604
603
|
projectSigma: null,
|
|
@@ -652,18 +651,6 @@ function analyzePert(parsed) {
|
|
|
652
651
|
projectStart = addCalendarDays(anchor.date, -projectMuDays);
|
|
653
652
|
}
|
|
654
653
|
}
|
|
655
|
-
const summaryRows = buildSummary({
|
|
656
|
-
mode,
|
|
657
|
-
projectMu: projectMuOut,
|
|
658
|
-
projectSigma: projectSigmaOut,
|
|
659
|
-
unit,
|
|
660
|
-
parsedActivities: activities,
|
|
661
|
-
monteCarloResult,
|
|
662
|
-
trialsClamped,
|
|
663
|
-
anchor: parsed.options.anchor,
|
|
664
|
-
today: parsed.options.today,
|
|
665
|
-
...sprintDays !== void 0 && { sprintDays }
|
|
666
|
-
});
|
|
667
654
|
const projectSubtitle = buildProjectSubtitle({
|
|
668
655
|
projectMu: projectMuOut,
|
|
669
656
|
projectSigma: projectSigmaOut,
|
|
@@ -678,7 +665,6 @@ function analyzePert(parsed) {
|
|
|
678
665
|
groups: resolvedGroups,
|
|
679
666
|
tagGroups: parsed.tagGroups.slice(),
|
|
680
667
|
mode,
|
|
681
|
-
summaryRows,
|
|
682
668
|
projectSubtitle,
|
|
683
669
|
projectMu: projectMuOut,
|
|
684
670
|
projectSigma: projectSigmaOut,
|
|
@@ -843,116 +829,6 @@ function rollupGroup(group, expandedById, resolvedById, criticalSet, unit, sprin
|
|
|
843
829
|
criticality
|
|
844
830
|
};
|
|
845
831
|
}
|
|
846
|
-
function roundConservative(durationDays, _mode) {
|
|
847
|
-
return Math.ceil(durationDays);
|
|
848
|
-
}
|
|
849
|
-
function buildSummary(input) {
|
|
850
|
-
const {
|
|
851
|
-
mode,
|
|
852
|
-
projectMu,
|
|
853
|
-
projectSigma,
|
|
854
|
-
unit,
|
|
855
|
-
parsedActivities,
|
|
856
|
-
monteCarloResult,
|
|
857
|
-
trialsClamped,
|
|
858
|
-
sprintDays,
|
|
859
|
-
today
|
|
860
|
-
} = input;
|
|
861
|
-
const anchor = input.anchor ?? null;
|
|
862
|
-
if (parsedActivities.length === 0) return null;
|
|
863
|
-
if (projectMu === null) {
|
|
864
|
-
if (anchor?.kind === "backward") {
|
|
865
|
-
return [
|
|
866
|
-
{ text: "Expected duration: ?", level: 0 },
|
|
867
|
-
{ text: "P50 latest-safe start: ?", level: 0 },
|
|
868
|
-
{ text: "P80 latest-safe start: ?", level: 0 },
|
|
869
|
-
{ text: "P95 latest-safe start: ?", level: 0 }
|
|
870
|
-
];
|
|
871
|
-
}
|
|
872
|
-
const tbdCount = parsedActivities.filter(
|
|
873
|
-
(a) => a.duration === null && !a.isMilestone
|
|
874
|
-
).length;
|
|
875
|
-
return [
|
|
876
|
-
{
|
|
877
|
-
text: `Expected duration unknown \u2014 ${tbdCount} ${tbdCount === 1 ? "activity has" : "activities have"} no estimate.`,
|
|
878
|
-
level: 0
|
|
879
|
-
}
|
|
880
|
-
];
|
|
881
|
-
}
|
|
882
|
-
const rows = [];
|
|
883
|
-
const mc = mode === "monte-carlo" && monteCarloResult !== null;
|
|
884
|
-
const sigmaPositive = projectSigma !== null && projectSigma > 0;
|
|
885
|
-
const showMcDetail = mc && sigmaPositive;
|
|
886
|
-
const sigmaParen = showMcDetail ? ` (\xB1 ${roundForCaption(projectSigma)} ${pluralizeUnit(projectSigma, unit)})` : "";
|
|
887
|
-
if (anchor?.kind === "forward") {
|
|
888
|
-
const projectMuDays = projectMu * unitToDays(unit);
|
|
889
|
-
rows.push({
|
|
890
|
-
text: `Expected finish: ${addCalendarDays(anchor.date, projectMuDays)}${sigmaParen}.`,
|
|
891
|
-
level: 0
|
|
892
|
-
});
|
|
893
|
-
} else if (anchor?.kind === "backward") {
|
|
894
|
-
const projectMuDays = projectMu * unitToDays(unit);
|
|
895
|
-
rows.push({
|
|
896
|
-
text: `Expected start: ${addCalendarDays(anchor.date, -projectMuDays)}${sigmaParen}.`,
|
|
897
|
-
level: 0
|
|
898
|
-
});
|
|
899
|
-
} else {
|
|
900
|
-
const muStr = `${roundForCaption(projectMu)} ${pluralizeUnit(projectMu, unit)}`;
|
|
901
|
-
rows.push({
|
|
902
|
-
text: `Expected duration: ${muStr}${sigmaParen}.`,
|
|
903
|
-
level: 0
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
if (showMcDetail) {
|
|
907
|
-
const percentiles = [
|
|
908
|
-
{ pct: 50, days: monteCarloResult.p50 },
|
|
909
|
-
{ pct: 80, days: monteCarloResult.p80 },
|
|
910
|
-
{ pct: 95, days: monteCarloResult.p95 }
|
|
911
|
-
];
|
|
912
|
-
if (anchor?.kind === "forward") {
|
|
913
|
-
for (const { pct, days } of percentiles) {
|
|
914
|
-
const offsetDays = roundConservative(days, "forward");
|
|
915
|
-
const date = addCalendarDays(anchor.date, offsetDays);
|
|
916
|
-
rows.push({ text: `P${pct} finish: ${date}.`, level: 1 });
|
|
917
|
-
}
|
|
918
|
-
} else if (anchor?.kind === "backward") {
|
|
919
|
-
for (const { pct, days } of percentiles) {
|
|
920
|
-
const offsetDays = roundConservative(days, "backward");
|
|
921
|
-
const date = addCalendarDays(anchor.date, -offsetDays);
|
|
922
|
-
const isPast = today.length > 0 && date < today;
|
|
923
|
-
const suffix = isPast ? " (latest-safe start has passed)" : "";
|
|
924
|
-
const row = {
|
|
925
|
-
text: `P${pct} latest-safe start: ${date}${suffix}`,
|
|
926
|
-
level: 1
|
|
927
|
-
};
|
|
928
|
-
if (isPast) row.isPast = true;
|
|
929
|
-
rows.push(row);
|
|
930
|
-
}
|
|
931
|
-
} else {
|
|
932
|
-
for (const { pct, days } of percentiles) {
|
|
933
|
-
const v = fromDays(days, unit, sprintDays);
|
|
934
|
-
rows.push({ text: `P${pct}: ${formatPercentile(v, unit)}.`, level: 1 });
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
if (mc && projectSigma === 0) {
|
|
939
|
-
const filtered = rows.filter(
|
|
940
|
-
(r) => r.text.startsWith("Expected ")
|
|
941
|
-
);
|
|
942
|
-
filtered.push({
|
|
943
|
-
text: "(No variance in estimates \u2014 all activities have O = M = P.)",
|
|
944
|
-
level: 0
|
|
945
|
-
});
|
|
946
|
-
return filtered;
|
|
947
|
-
}
|
|
948
|
-
if (trialsClamped) {
|
|
949
|
-
rows.push({
|
|
950
|
-
text: "Insufficient trials configured (`trials` < 100) \u2014 falling back to deterministic analysis.",
|
|
951
|
-
level: 0
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
return rows;
|
|
955
|
-
}
|
|
956
832
|
function buildProjectSubtitle(input) {
|
|
957
833
|
const anchor = input.anchor ?? null;
|
|
958
834
|
const { projectMu, projectSigma, unit } = input;
|
|
@@ -1037,7 +913,6 @@ function emptyResolved(parsed, diagnostics) {
|
|
|
1037
913
|
})),
|
|
1038
914
|
tagGroups: parsed.tagGroups.slice(),
|
|
1039
915
|
mode: "analytical",
|
|
1040
|
-
summaryRows: null,
|
|
1041
916
|
projectSubtitle: null,
|
|
1042
917
|
projectMu: null,
|
|
1043
918
|
projectSigma: null,
|
|
@@ -1057,7 +932,6 @@ export {
|
|
|
1057
932
|
simulateCanonical,
|
|
1058
933
|
simulateFast,
|
|
1059
934
|
analyzePert,
|
|
1060
|
-
buildSummary,
|
|
1061
935
|
buildProjectSubtitle
|
|
1062
936
|
};
|
|
1063
|
-
//# sourceMappingURL=chunk-
|
|
937
|
+
//# sourceMappingURL=chunk-3SQJZMPO.js.map
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-FJ57274M.js";
|
|
15
15
|
import {
|
|
16
16
|
layoutInlineHeader
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MG3DE3VO.js";
|
|
18
18
|
import {
|
|
19
19
|
TITLE_FONT_SIZE,
|
|
20
20
|
TITLE_FONT_WEIGHT,
|
|
21
21
|
TITLE_Y
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DEW62ON3.js";
|
|
23
23
|
import {
|
|
24
24
|
renderIntegratedLegend
|
|
25
25
|
} from "./chunk-QT5UMFPE.js";
|
|
@@ -317,4 +317,4 @@ export {
|
|
|
317
317
|
renderFamilyForExport,
|
|
318
318
|
renderFamily
|
|
319
319
|
};
|
|
320
|
-
//# sourceMappingURL=chunk-
|
|
320
|
+
//# sourceMappingURL=chunk-76IBFEYW.js.map
|