@diagrammo/dgmo 0.25.0 → 0.25.2
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.cjs +189 -333
- package/dist/advanced.d.cts +17 -80
- package/dist/advanced.d.ts +17 -80
- package/dist/advanced.js +189 -325
- package/dist/auto.cjs +187 -318
- package/dist/auto.js +122 -122
- package/dist/auto.mjs +187 -318
- package/dist/cli.cjs +159 -159
- package/dist/editor.cjs +1 -0
- package/dist/editor.js +1 -0
- package/dist/highlight.cjs +1 -0
- package/dist/highlight.js +1 -0
- package/dist/index.cjs +205 -319
- package/dist/index.js +205 -319
- package/dist/internal.cjs +189 -333
- package/dist/internal.d.cts +17 -80
- package/dist/internal.d.ts +17 -80
- package/dist/internal.js +189 -325
- package/package.json +17 -17
- package/src/advanced.ts +0 -8
- package/src/completion.ts +5 -0
- package/src/d3.ts +12 -2
- package/src/editor/keywords.ts +1 -0
- package/src/map/layout.ts +18 -11
- package/src/map/parser.ts +12 -2
- package/src/map/renderer.ts +25 -2
- package/src/map/types.ts +9 -0
- package/src/pert/renderer.ts +21 -358
- package/src/sequence/renderer.ts +36 -1
- package/src/utils/svg-embed.ts +51 -2
package/dist/index.cjs
CHANGED
|
@@ -16387,6 +16387,9 @@ function parseMap(content) {
|
|
|
16387
16387
|
break;
|
|
16388
16388
|
// ── Cosmetic `no-*` opt-outs: bare flags, idempotent (mirror `no-legend`,
|
|
16389
16389
|
// no dup warning); each defaults the feature ON when absent. ──
|
|
16390
|
+
case "no-title":
|
|
16391
|
+
d.noTitle = true;
|
|
16392
|
+
break;
|
|
16390
16393
|
case "no-legend":
|
|
16391
16394
|
d.noLegend = true;
|
|
16392
16395
|
break;
|
|
@@ -16408,6 +16411,9 @@ function parseMap(content) {
|
|
|
16408
16411
|
case "no-colorize":
|
|
16409
16412
|
d.noColorize = true;
|
|
16410
16413
|
break;
|
|
16414
|
+
case "no-cluster-pois":
|
|
16415
|
+
d.noClusterPois = true;
|
|
16416
|
+
break;
|
|
16411
16417
|
}
|
|
16412
16418
|
}
|
|
16413
16419
|
function handleTag(trimmed, line12) {
|
|
@@ -16709,13 +16715,15 @@ var init_parser12 = __esm({
|
|
|
16709
16715
|
"locale",
|
|
16710
16716
|
"active-tag",
|
|
16711
16717
|
"caption",
|
|
16718
|
+
"no-title",
|
|
16712
16719
|
"no-legend",
|
|
16713
16720
|
"no-coastline",
|
|
16714
16721
|
"no-relief",
|
|
16715
16722
|
"no-context-labels",
|
|
16716
16723
|
"no-region-labels",
|
|
16717
16724
|
"no-poi-labels",
|
|
16718
|
-
"no-colorize"
|
|
16725
|
+
"no-colorize",
|
|
16726
|
+
"no-cluster-pois"
|
|
16719
16727
|
]);
|
|
16720
16728
|
}
|
|
16721
16729
|
});
|
|
@@ -37425,18 +37433,10 @@ var init_layout11 = __esm({
|
|
|
37425
37433
|
// src/pert/renderer.ts
|
|
37426
37434
|
var renderer_exports11 = {};
|
|
37427
37435
|
__export(renderer_exports11, {
|
|
37428
|
-
PERT_LEGEND_PILL_HEIGHT: () => PERT_LEGEND_PILL_HEIGHT,
|
|
37429
|
-
highlightPertCriticalPath: () => highlightPertCriticalPath,
|
|
37430
|
-
highlightPertSet: () => highlightPertSet,
|
|
37431
37436
|
measurePertAnalysisBlock: () => measurePertAnalysisBlock,
|
|
37432
|
-
pertLegendBlockWidth: () => pertLegendBlockWidth,
|
|
37433
|
-
pertLegendEntries: () => pertLegendEntries,
|
|
37434
|
-
renderLegendBlock: () => renderLegendBlock,
|
|
37435
37437
|
renderPert: () => renderPert,
|
|
37436
37438
|
renderPertAnalysisBlock: () => renderPertAnalysisBlock,
|
|
37437
|
-
renderPertForExport: () => renderPertForExport
|
|
37438
|
-
resetPertCriticalPath: () => resetPertCriticalPath,
|
|
37439
|
-
resetPertHighlight: () => resetPertHighlight
|
|
37439
|
+
renderPertForExport: () => renderPertForExport
|
|
37440
37440
|
});
|
|
37441
37441
|
function analysisBlockChrome(palette, isDark) {
|
|
37442
37442
|
const surfaceBg = isDark ? palette.surface : palette.bg;
|
|
@@ -37519,16 +37519,14 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37519
37519
|
const standaloneFieldLegendWidthForExport = layout.width;
|
|
37520
37520
|
const analysisBlockHeight = analysisLayer.analysisHasContent ? CAPTION_TOP_GAP + analysisLayer.analysisRowHeight : 0;
|
|
37521
37521
|
const fieldLegendBlockHeight = analysisLayer.fieldLegendStandalone ? CAPTION_TOP_GAP + fieldLegendHeightFor(standaloneFieldLegendWidthForExport) : 0;
|
|
37522
|
-
const
|
|
37523
|
-
const legendEntries = showTopLegend ? pertLegendEntries(resolved) : [];
|
|
37522
|
+
const showLegend = options.showLegend ?? true;
|
|
37524
37523
|
const tagLegendActive = resolveActiveTagGroup(
|
|
37525
37524
|
resolved.tagGroups,
|
|
37526
37525
|
resolved.options.activeTag,
|
|
37527
37526
|
options.activeTagOverride
|
|
37528
37527
|
);
|
|
37529
|
-
const showTagLegend =
|
|
37530
|
-
const
|
|
37531
|
-
const legendBlockHeight = (legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0) + tagLegendBlockHeight;
|
|
37528
|
+
const showTagLegend = showLegend && resolved.tagGroups.length > 0;
|
|
37529
|
+
const legendBlockHeight = showTagLegend ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
|
|
37532
37530
|
const naturalChartWidth = layout.width + DIAGRAM_PADDING11 * 2;
|
|
37533
37531
|
const minAnalysisRowW = analysisLayer.analysisHasContent ? analysisLayer.minContentWidth + 2 * DIAGRAM_PADDING11 : 0;
|
|
37534
37532
|
const naturalWidth = Math.max(naturalChartWidth, minAnalysisRowW);
|
|
@@ -37551,8 +37549,7 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37551
37549
|
const sLegendTopGap = ctx.aesthetic(LEGEND_TOP_GAP);
|
|
37552
37550
|
const sLegendBottomGap = ctx.aesthetic(LEGEND_BOTTOM_GAP);
|
|
37553
37551
|
const sLegendPillHeight = ctx.structural(LEGEND_PILL_HEIGHT);
|
|
37554
|
-
const
|
|
37555
|
-
const sLegendBlockHeight = (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0) + sTagLegendBlockHeight;
|
|
37552
|
+
const sLegendBlockHeight = showTagLegend ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0;
|
|
37556
37553
|
const sNodeRadius = ctx.structural(NODE_RADIUS2);
|
|
37557
37554
|
const sNodeStrokeWidth = ctx.structural(NODE_STROKE_WIDTH10);
|
|
37558
37555
|
const sNodeFontSize = ctx.text(NODE_FONT_SIZE4);
|
|
@@ -37584,17 +37581,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37584
37581
|
}
|
|
37585
37582
|
const offsetX = Math.max(sDiagramPad, (svgW - layout.width) / 2);
|
|
37586
37583
|
const offsetY = sDiagramPad + sTitleHeight + sLegendBlockHeight;
|
|
37587
|
-
if (legendEntries.length > 0) {
|
|
37588
|
-
renderLegendBlock(svg, legendEntries, {
|
|
37589
|
-
x: 0,
|
|
37590
|
-
y: sDiagramPad + sTitleHeight + sLegendTopGap,
|
|
37591
|
-
width: svgW,
|
|
37592
|
-
palette,
|
|
37593
|
-
isDark
|
|
37594
|
-
});
|
|
37595
|
-
}
|
|
37596
37584
|
if (showTagLegend) {
|
|
37597
|
-
const tagLegendY = sDiagramPad + sTitleHeight +
|
|
37585
|
+
const tagLegendY = sDiagramPad + sTitleHeight + sLegendTopGap;
|
|
37598
37586
|
renderTagLegendRow(svg, resolved, palette, isDark, {
|
|
37599
37587
|
x: 0,
|
|
37600
37588
|
y: tagLegendY,
|
|
@@ -37678,8 +37666,7 @@ function renderPertForExport(content, theme, palette, now) {
|
|
|
37678
37666
|
}
|
|
37679
37667
|
const captionBoxHeight = captionBullets.length > 0 ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
|
|
37680
37668
|
const captionBlockHeight = captionBullets.length > 0 ? CAPTION_TOP_GAP + captionBoxHeight : 0;
|
|
37681
|
-
const
|
|
37682
|
-
const legendBlockHeight = legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
|
|
37669
|
+
const legendBlockHeight = resolved.tagGroups.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
|
|
37683
37670
|
const exportWidth = layout.width + DIAGRAM_PADDING11 * 2;
|
|
37684
37671
|
const exportHeight = layout.height + DIAGRAM_PADDING11 * 2 + titleHeight + legendBlockHeight + captionBlockHeight;
|
|
37685
37672
|
const container = document.createElement("div");
|
|
@@ -38219,22 +38206,22 @@ function renderEdges2(root, resolved, layout, palette, collapsedSet, sc = {}) {
|
|
|
38219
38206
|
if (srcGroup && tgtGroup && srcGroup === tgtGroup && collapsedSet.has(srcGroup)) {
|
|
38220
38207
|
continue;
|
|
38221
38208
|
}
|
|
38222
|
-
const
|
|
38209
|
+
const isCritical = criticalSet.has(e.source) && criticalSet.has(e.target);
|
|
38223
38210
|
let band;
|
|
38224
38211
|
if (mcOn) {
|
|
38225
38212
|
const sc2 = critById.get(e.source);
|
|
38226
38213
|
const tc = critById.get(e.target);
|
|
38227
38214
|
const minC = sc2 === null || tc === null || sc2 === void 0 || tc === void 0 ? null : Math.min(sc2, tc);
|
|
38228
38215
|
band = criticalityBand(minC);
|
|
38229
|
-
if (band === null &&
|
|
38216
|
+
if (band === null && isCritical) band = "red";
|
|
38230
38217
|
} else {
|
|
38231
|
-
band =
|
|
38218
|
+
band = isCritical ? "red" : null;
|
|
38232
38219
|
}
|
|
38233
38220
|
const path = lineGenerator6(e.points);
|
|
38234
38221
|
if (!path) continue;
|
|
38235
38222
|
const sESW = sc.edgeStrokeWidth ?? EDGE_STROKE_WIDTH10;
|
|
38236
38223
|
const sELFS = sc.edgeLabelFontSize ?? 10;
|
|
38237
|
-
layer.append("path").attr("class", "pert-edge").attr("d", path).attr("fill", "none").attr("stroke", bandColor(band, palette, palette.textMuted)).attr("stroke-width", sESW).attr("marker-end", `url(#${bandArrow(band)})`).attr("data-source", e.source).attr("data-target", e.target).attr("data-critical", String(
|
|
38224
|
+
layer.append("path").attr("class", "pert-edge").attr("d", path).attr("fill", "none").attr("stroke", bandColor(band, palette, palette.textMuted)).attr("stroke-width", sESW).attr("marker-end", `url(#${bandArrow(band)})`).attr("data-source", e.source).attr("data-target", e.target).attr("data-critical", String(isCritical)).attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "");
|
|
38238
38225
|
const parsedEdge = edgeByKey.get(`${e.source}->${e.target}`);
|
|
38239
38226
|
const labelText = parsedEdge ? formatEdgeLabel(parsedEdge) : null;
|
|
38240
38227
|
if (labelText) {
|
|
@@ -38286,7 +38273,7 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
|
|
|
38286
38273
|
const r = byId.get(node.id);
|
|
38287
38274
|
if (!r) continue;
|
|
38288
38275
|
if (r.activity.groupId && collapsedSet.has(r.activity.groupId)) continue;
|
|
38289
|
-
const
|
|
38276
|
+
const isCritical = r.isCriticalPath;
|
|
38290
38277
|
const isTbd = tbdSet.has(node.id);
|
|
38291
38278
|
const dashArray = isTbd ? "4,3" : "none";
|
|
38292
38279
|
const isTopMu = topMuIds.has(node.id);
|
|
@@ -38294,14 +38281,14 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
|
|
|
38294
38281
|
let band;
|
|
38295
38282
|
if (mcOn) {
|
|
38296
38283
|
band = criticalityBand(r.criticality);
|
|
38297
|
-
if (band === null &&
|
|
38284
|
+
if (band === null && isCritical) band = "red";
|
|
38298
38285
|
} else {
|
|
38299
|
-
band =
|
|
38286
|
+
band = isCritical ? "red" : null;
|
|
38300
38287
|
}
|
|
38301
38288
|
const g = layer.append("g").attr("class", "pert-node").attr("transform", `translate(${node.x}, ${node.y})`).attr("data-activity-id", node.id).attr("data-line-number", String(r.activity.lineNumber)).attr(
|
|
38302
38289
|
"data-group-id",
|
|
38303
38290
|
r.activity.groupId !== void 0 ? r.activity.groupId : ""
|
|
38304
|
-
).attr("data-critical-path", String(
|
|
38291
|
+
).attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
|
|
38305
38292
|
if (r.activity.tags) {
|
|
38306
38293
|
for (const [tagKey, tagValue] of Object.entries(r.activity.tags)) {
|
|
38307
38294
|
g.attr(`data-tag-${tagKey}`, String(tagValue).toLowerCase());
|
|
@@ -38611,69 +38598,6 @@ function computeAnchorPinSet(resolved) {
|
|
|
38611
38598
|
}
|
|
38612
38599
|
return pinned;
|
|
38613
38600
|
}
|
|
38614
|
-
function isCritical(el, mcOn) {
|
|
38615
|
-
if (mcOn) {
|
|
38616
|
-
return HIGHLIGHT_BANDS.has(el.getAttribute("data-criticality-band") ?? "");
|
|
38617
|
-
}
|
|
38618
|
-
return el.getAttribute("data-critical-path") === "true";
|
|
38619
|
-
}
|
|
38620
|
-
function isInHighlightSet(el, kind, mcOn) {
|
|
38621
|
-
if (kind === "critical") return isCritical(el, mcOn);
|
|
38622
|
-
if (kind === "milestone") {
|
|
38623
|
-
return el.getAttribute("data-milestone") === "true";
|
|
38624
|
-
}
|
|
38625
|
-
return el.hasAttribute("data-anchor");
|
|
38626
|
-
}
|
|
38627
|
-
function highlightPertSet(container, kind) {
|
|
38628
|
-
const svg = container.querySelector("svg");
|
|
38629
|
-
if (!svg) return;
|
|
38630
|
-
const mcOn = Array.from(svg.querySelectorAll(".pert-edge")).some((e) => {
|
|
38631
|
-
const b = e.getAttribute("data-criticality-band");
|
|
38632
|
-
return b !== null && b !== "" && b !== "red";
|
|
38633
|
-
});
|
|
38634
|
-
const candidates = svg.querySelectorAll(
|
|
38635
|
-
".pert-node, .pert-edge, .pert-group-collapsed"
|
|
38636
|
-
);
|
|
38637
|
-
let anyMatch = false;
|
|
38638
|
-
for (const el of candidates) {
|
|
38639
|
-
if (isInHighlightSet(el, kind, mcOn)) {
|
|
38640
|
-
anyMatch = true;
|
|
38641
|
-
break;
|
|
38642
|
-
}
|
|
38643
|
-
}
|
|
38644
|
-
if (!anyMatch) return;
|
|
38645
|
-
svg.setAttribute("data-pert-highlight-active", kind);
|
|
38646
|
-
for (const el of svg.querySelectorAll(".pert-node, .pert-edge")) {
|
|
38647
|
-
el.setAttribute(
|
|
38648
|
-
"opacity",
|
|
38649
|
-
isInHighlightSet(el, kind, mcOn) ? "1" : String(FADE_OPACITY)
|
|
38650
|
-
);
|
|
38651
|
-
}
|
|
38652
|
-
for (const el of svg.querySelectorAll(".pert-group")) {
|
|
38653
|
-
const inSet = el.classList.contains("pert-group-collapsed") && isInHighlightSet(el, kind, mcOn);
|
|
38654
|
-
el.setAttribute(
|
|
38655
|
-
"opacity",
|
|
38656
|
-
inSet ? "1" : String(FADE_OPACITY)
|
|
38657
|
-
);
|
|
38658
|
-
}
|
|
38659
|
-
}
|
|
38660
|
-
function highlightPertCriticalPath(container) {
|
|
38661
|
-
highlightPertSet(container, "critical");
|
|
38662
|
-
}
|
|
38663
|
-
function resetPertHighlight(container) {
|
|
38664
|
-
const svg = container.querySelector("svg");
|
|
38665
|
-
if (!svg) return;
|
|
38666
|
-
svg.removeAttribute("data-pert-highlight-active");
|
|
38667
|
-
svg.removeAttribute("data-critical-path-active");
|
|
38668
|
-
for (const el of svg.querySelectorAll(
|
|
38669
|
-
".pert-node, .pert-edge, .pert-group"
|
|
38670
|
-
)) {
|
|
38671
|
-
el.removeAttribute("opacity");
|
|
38672
|
-
}
|
|
38673
|
-
}
|
|
38674
|
-
function resetPertCriticalPath(container) {
|
|
38675
|
-
resetPertHighlight(container);
|
|
38676
|
-
}
|
|
38677
38601
|
function anchorAnnotationText(resolved) {
|
|
38678
38602
|
const anchor = resolved.options.anchor;
|
|
38679
38603
|
if (anchor === null) return null;
|
|
@@ -38726,70 +38650,6 @@ function renderCaptionBlock(svg, bullets, args) {
|
|
|
38726
38650
|
if (i > 0) tspan.attr("dy", CAPTION_LINE_HEIGHT);
|
|
38727
38651
|
});
|
|
38728
38652
|
}
|
|
38729
|
-
function pertLegendEntries(resolved) {
|
|
38730
|
-
const entries = [];
|
|
38731
|
-
if (resolved.activities.length > 0) {
|
|
38732
|
-
entries.push({ kind: "critical", label: "Critical Path" });
|
|
38733
|
-
}
|
|
38734
|
-
if (resolved.options.anchor !== null) {
|
|
38735
|
-
entries.push({ kind: "anchor", label: "Anchor" });
|
|
38736
|
-
}
|
|
38737
|
-
if (resolved.activities.some((a) => a.activity.isMilestone)) {
|
|
38738
|
-
entries.push({ kind: "milestone", label: "Milestone" });
|
|
38739
|
-
}
|
|
38740
|
-
return entries;
|
|
38741
|
-
}
|
|
38742
|
-
function legendSwatchWidth(kind) {
|
|
38743
|
-
if (kind === "critical") return LEGEND_DOT_R * 2;
|
|
38744
|
-
if (kind === "anchor") return PIN_ICON_W;
|
|
38745
|
-
return LEGEND_FONT_SIZE;
|
|
38746
|
-
}
|
|
38747
|
-
function legendPillWidth(entry) {
|
|
38748
|
-
const labelW = measureLegendText(entry.label, LEGEND_FONT_SIZE);
|
|
38749
|
-
return Math.ceil(
|
|
38750
|
-
LEGEND_PILL_PADDING_X + legendSwatchWidth(entry.kind) + LEGEND_SWATCH_GAP + labelW + LEGEND_PILL_PADDING_X
|
|
38751
|
-
);
|
|
38752
|
-
}
|
|
38753
|
-
function legendNaturalWidth(entries) {
|
|
38754
|
-
if (entries.length === 0) return 0;
|
|
38755
|
-
let total = 0;
|
|
38756
|
-
for (const e of entries) total += legendPillWidth(e);
|
|
38757
|
-
total += (entries.length - 1) * LEGEND_PILL_GAP;
|
|
38758
|
-
return total;
|
|
38759
|
-
}
|
|
38760
|
-
function pertLegendBlockWidth(entries) {
|
|
38761
|
-
return legendNaturalWidth(entries);
|
|
38762
|
-
}
|
|
38763
|
-
function renderLegendBlock(svg, entries, args) {
|
|
38764
|
-
if (entries.length === 0) return;
|
|
38765
|
-
const { x, y, width, palette, isDark } = args;
|
|
38766
|
-
const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
|
|
38767
|
-
const block = svg.append("g").attr("class", "pert-legend").attr("data-pert-legend", "");
|
|
38768
|
-
const totalW = legendNaturalWidth(entries);
|
|
38769
|
-
let pillX = x + (width - totalW) / 2;
|
|
38770
|
-
for (const entry of entries) {
|
|
38771
|
-
const pillW = legendPillWidth(entry);
|
|
38772
|
-
const pill = block.append("g").attr("class", "pert-legend-entry").attr("data-legend-entry", entry.kind).attr("transform", `translate(${pillX}, ${y})`).style("cursor", "pointer");
|
|
38773
|
-
pill.append("rect").attr("class", "pert-legend-pill").attr("width", pillW).attr("height", LEGEND_PILL_HEIGHT).attr("rx", LEGEND_PILL_HEIGHT / 2).attr("ry", LEGEND_PILL_HEIGHT / 2).attr("fill", groupBg);
|
|
38774
|
-
const swatchW = legendSwatchWidth(entry.kind);
|
|
38775
|
-
const swatchCx = LEGEND_PILL_PADDING_X + swatchW / 2;
|
|
38776
|
-
const swatchCy = LEGEND_PILL_HEIGHT / 2;
|
|
38777
|
-
if (entry.kind === "critical") {
|
|
38778
|
-
pill.append("circle").attr("class", "pert-legend-swatch").attr("cx", swatchCx).attr("cy", swatchCy).attr("r", LEGEND_DOT_R).attr("fill", palette.colors.red);
|
|
38779
|
-
} else if (entry.kind === "anchor") {
|
|
38780
|
-
drawAnchorPin(
|
|
38781
|
-
pill,
|
|
38782
|
-
swatchCx - PIN_ICON_W / 2,
|
|
38783
|
-
swatchCy,
|
|
38784
|
-
palette.textMuted
|
|
38785
|
-
);
|
|
38786
|
-
} else {
|
|
38787
|
-
pill.append("text").attr("class", "pert-legend-swatch").attr("x", swatchCx).attr("y", swatchCy).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_FONT_SIZE + 1).attr("fill", palette.textMuted).text("\u25C6");
|
|
38788
|
-
}
|
|
38789
|
-
pill.append("text").attr("class", "pert-legend-label").attr("x", LEGEND_PILL_PADDING_X + swatchW + LEGEND_SWATCH_GAP).attr("y", swatchCy).attr("dominant-baseline", "central").attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).text(entry.label);
|
|
38790
|
-
pillX += pillW + LEGEND_PILL_GAP;
|
|
38791
|
-
}
|
|
38792
|
-
}
|
|
38793
38653
|
function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
38794
38654
|
if (resolved.tagGroups.length === 0) return;
|
|
38795
38655
|
const { x, y, width, activeGroup, exportMode } = args;
|
|
@@ -39236,7 +39096,7 @@ function formatScurveDate(iso) {
|
|
|
39236
39096
|
if (month < 0 || month > 11 || isNaN(day)) return iso;
|
|
39237
39097
|
return `${SCURVE_MONTH_NAMES[month]} ${day}`;
|
|
39238
39098
|
}
|
|
39239
|
-
var d3Selection12, d3Shape8, DIAGRAM_PADDING11, NODE_FONT_SIZE4, NODE_CELL_FONT_SIZE2, NODE_RADIUS2, NODE_STROKE_WIDTH10, NODE_TOP_ROW_HEIGHT, NODE_BOTTOM_ROW_HEIGHT, EDGE_STROKE_WIDTH10, ARROWHEAD_W4, ARROWHEAD_H4, CONTAINER_RADIUS3, CONTAINER_LABEL_FONT_SIZE3, CONTAINER_HEADER_HEIGHT3, COLLAPSE_BAR_HEIGHT7,
|
|
39099
|
+
var d3Selection12, d3Shape8, DIAGRAM_PADDING11, NODE_FONT_SIZE4, NODE_CELL_FONT_SIZE2, NODE_RADIUS2, NODE_STROKE_WIDTH10, NODE_TOP_ROW_HEIGHT, NODE_BOTTOM_ROW_HEIGHT, EDGE_STROKE_WIDTH10, ARROWHEAD_W4, ARROWHEAD_H4, CONTAINER_RADIUS3, CONTAINER_LABEL_FONT_SIZE3, CONTAINER_HEADER_HEIGHT3, COLLAPSE_BAR_HEIGHT7, DURATION_FADE_OPACITY, PIN_ICON_W, PIN_ICON_H, LEGEND_PILL_HEIGHT, LEGEND_TOP_GAP, LEGEND_BOTTOM_GAP, FIELD_LEGEND_HEADER_BAND_HEIGHT, FIELD_LEGEND_CELL_VPAD, FIELD_LEGEND_LABEL_FONT_SIZE, FIELD_LEGEND_DESC_FONT_SIZE, FIELD_LEGEND_DESC_LINE_HEIGHT, FIELD_LEGEND_LABEL_DESC_GAP, FIELD_LEGEND_CELLS, lineGenerator6, FIELD_LEGEND_MIN_W, SUB_BULLET_INDENT, CAPTION_HEADER_BAND_HEIGHT, TORNADO_TOP_N, TORNADO_ROW_HEIGHT, TORNADO_NAME_COL_W, TORNADO_BAR_FONT_SIZE, TORNADO_BAR_HEIGHT, SUMMARY_MIN_W, SUMMARY_MAX_W, ANALYSIS_GAP, COL1_VSTACK_GAP, TORNADO_MIN_W, SCURVE_MIN_W, SCURVE_BOX_HEIGHT, SCURVE_PLOT_PADDING_X, SCURVE_PLOT_PADDING_RIGHT, SCURVE_PLOT_PADDING_BOTTOM, SCURVE_TICK_FONT_SIZE, SCURVE_PERCENTILE_RADIUS, DAYS_PER_UNIT, SCURVE_MONTH_NAMES, UNIT_TO_DAYS_LOCAL2;
|
|
39240
39100
|
var init_renderer11 = __esm({
|
|
39241
39101
|
"src/pert/renderer.ts"() {
|
|
39242
39102
|
"use strict";
|
|
@@ -39267,15 +39127,10 @@ var init_renderer11 = __esm({
|
|
|
39267
39127
|
CONTAINER_LABEL_FONT_SIZE3 = 13;
|
|
39268
39128
|
CONTAINER_HEADER_HEIGHT3 = 28;
|
|
39269
39129
|
COLLAPSE_BAR_HEIGHT7 = 6;
|
|
39270
|
-
FADE_OPACITY = 0.15;
|
|
39271
39130
|
DURATION_FADE_OPACITY = 0.55;
|
|
39272
39131
|
PIN_ICON_W = 13;
|
|
39273
39132
|
PIN_ICON_H = 13;
|
|
39274
39133
|
LEGEND_PILL_HEIGHT = LEGEND_HEIGHT;
|
|
39275
|
-
LEGEND_PILL_PADDING_X = 8;
|
|
39276
|
-
LEGEND_PILL_GAP = 8;
|
|
39277
|
-
LEGEND_SWATCH_GAP = LEGEND_ENTRY_DOT_GAP;
|
|
39278
|
-
LEGEND_FONT_SIZE = LEGEND_PILL_FONT_SIZE;
|
|
39279
39134
|
LEGEND_TOP_GAP = 12;
|
|
39280
39135
|
LEGEND_BOTTOM_GAP = 12;
|
|
39281
39136
|
FIELD_LEGEND_HEADER_BAND_HEIGHT = 26;
|
|
@@ -39312,7 +39167,6 @@ var init_renderer11 = __esm({
|
|
|
39312
39167
|
];
|
|
39313
39168
|
lineGenerator6 = d3Shape8.line().x((d) => d.x).y((d) => d.y).curve(d3Shape8.curveBasis);
|
|
39314
39169
|
FIELD_LEGEND_MIN_W = 220;
|
|
39315
|
-
HIGHLIGHT_BANDS = /* @__PURE__ */ new Set(["red", "orange", "yellow"]);
|
|
39316
39170
|
SUB_BULLET_INDENT = 20;
|
|
39317
39171
|
CAPTION_HEADER_BAND_HEIGHT = CAPTION_LINE_HEIGHT + 8;
|
|
39318
39172
|
TORNADO_TOP_N = 10;
|
|
@@ -39332,7 +39186,6 @@ var init_renderer11 = __esm({
|
|
|
39332
39186
|
SCURVE_PLOT_PADDING_BOTTOM = 44;
|
|
39333
39187
|
SCURVE_TICK_FONT_SIZE = 13;
|
|
39334
39188
|
SCURVE_PERCENTILE_RADIUS = 4;
|
|
39335
|
-
PERT_LEGEND_PILL_HEIGHT = LEGEND_PILL_HEIGHT;
|
|
39336
39189
|
DAYS_PER_UNIT = {
|
|
39337
39190
|
min: 1 / (60 * 24),
|
|
39338
39191
|
h: 1 / 24,
|
|
@@ -40857,31 +40710,31 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
40857
40710
|
todayHoverG.on("mouseenter", () => {
|
|
40858
40711
|
g.selectAll(".gantt-task").attr(
|
|
40859
40712
|
"opacity",
|
|
40860
|
-
|
|
40713
|
+
FADE_OPACITY
|
|
40861
40714
|
);
|
|
40862
40715
|
g.selectAll(".gantt-milestone").attr(
|
|
40863
40716
|
"opacity",
|
|
40864
|
-
|
|
40717
|
+
FADE_OPACITY
|
|
40865
40718
|
);
|
|
40866
40719
|
g.selectAll(
|
|
40867
40720
|
".gantt-group-bar, .gantt-group-summary"
|
|
40868
|
-
).attr("opacity",
|
|
40869
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
40870
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
40871
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
40721
|
+
).attr("opacity", FADE_OPACITY);
|
|
40722
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
40723
|
+
svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
|
|
40724
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
40872
40725
|
g.selectAll(
|
|
40873
40726
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
40874
|
-
).attr("opacity",
|
|
40727
|
+
).attr("opacity", FADE_OPACITY);
|
|
40875
40728
|
g.selectAll(
|
|
40876
40729
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
40877
|
-
).attr("opacity",
|
|
40730
|
+
).attr("opacity", FADE_OPACITY);
|
|
40878
40731
|
g.selectAll(".gantt-era-group").attr(
|
|
40879
40732
|
"opacity",
|
|
40880
|
-
|
|
40733
|
+
FADE_OPACITY
|
|
40881
40734
|
);
|
|
40882
40735
|
g.selectAll(".gantt-marker-group").attr(
|
|
40883
40736
|
"opacity",
|
|
40884
|
-
|
|
40737
|
+
FADE_OPACITY
|
|
40885
40738
|
);
|
|
40886
40739
|
showGanttDateIndicators(
|
|
40887
40740
|
g,
|
|
@@ -41113,28 +40966,28 @@ function applyCriticalPathHighlight(svg, chartG) {
|
|
|
41113
40966
|
const el = d3Selection13.select(this);
|
|
41114
40967
|
el.attr(
|
|
41115
40968
|
"opacity",
|
|
41116
|
-
el.attr("data-critical-path") === "true" ? 1 :
|
|
40969
|
+
el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
|
|
41117
40970
|
);
|
|
41118
40971
|
});
|
|
41119
|
-
chartG.selectAll(".gantt-milestone").attr("opacity",
|
|
41120
|
-
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity",
|
|
40972
|
+
chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
|
|
40973
|
+
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
|
|
41121
40974
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41122
40975
|
const el = d3Selection13.select(this);
|
|
41123
40976
|
el.attr(
|
|
41124
40977
|
"opacity",
|
|
41125
|
-
el.attr("data-critical-path") === "true" ? 1 :
|
|
40978
|
+
el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
|
|
41126
40979
|
);
|
|
41127
40980
|
});
|
|
41128
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41129
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41130
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41131
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41132
|
-
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity",
|
|
40981
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
40982
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
40983
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
40984
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
40985
|
+
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
|
|
41133
40986
|
chartG.selectAll(".gantt-dep-arrow, .gantt-dep-arrowhead").each(function() {
|
|
41134
40987
|
const el = d3Selection13.select(this);
|
|
41135
40988
|
el.attr(
|
|
41136
40989
|
"opacity",
|
|
41137
|
-
el.attr("data-critical-path") === "true" ? 0.7 :
|
|
40990
|
+
el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY
|
|
41138
40991
|
);
|
|
41139
40992
|
});
|
|
41140
40993
|
}
|
|
@@ -41313,27 +41166,27 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
41313
41166
|
const el = d3Selection13.select(this);
|
|
41314
41167
|
el.attr(
|
|
41315
41168
|
"opacity",
|
|
41316
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41169
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41317
41170
|
);
|
|
41318
41171
|
});
|
|
41319
|
-
chartG.selectAll(".gantt-milestone").attr("opacity",
|
|
41320
|
-
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity",
|
|
41172
|
+
chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
|
|
41173
|
+
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
|
|
41321
41174
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41322
41175
|
const el = d3Selection13.select(this);
|
|
41323
41176
|
el.attr(
|
|
41324
41177
|
"opacity",
|
|
41325
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41178
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41326
41179
|
);
|
|
41327
41180
|
});
|
|
41328
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41181
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41329
41182
|
svg.selectAll(".gantt-lane-header").each(function() {
|
|
41330
41183
|
const el = d3Selection13.select(this);
|
|
41331
41184
|
el.attr(
|
|
41332
41185
|
"opacity",
|
|
41333
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41186
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41334
41187
|
);
|
|
41335
41188
|
});
|
|
41336
|
-
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity",
|
|
41189
|
+
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
|
|
41337
41190
|
} else {
|
|
41338
41191
|
if (criticalPathActive) {
|
|
41339
41192
|
applyCriticalPathHighlight(svg, chartG);
|
|
@@ -41438,27 +41291,27 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
|
|
|
41438
41291
|
eraG.on("mouseenter", () => {
|
|
41439
41292
|
g.selectAll(".gantt-task").attr(
|
|
41440
41293
|
"opacity",
|
|
41441
|
-
|
|
41294
|
+
FADE_OPACITY
|
|
41442
41295
|
);
|
|
41443
41296
|
g.selectAll(".gantt-milestone").attr(
|
|
41444
41297
|
"opacity",
|
|
41445
|
-
|
|
41298
|
+
FADE_OPACITY
|
|
41446
41299
|
);
|
|
41447
41300
|
g.selectAll(
|
|
41448
41301
|
".gantt-group-bar, .gantt-group-summary"
|
|
41449
|
-
).attr("opacity",
|
|
41450
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41451
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
41452
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41302
|
+
).attr("opacity", FADE_OPACITY);
|
|
41303
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41304
|
+
svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
|
|
41305
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41453
41306
|
g.selectAll(
|
|
41454
41307
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41455
|
-
).attr("opacity",
|
|
41308
|
+
).attr("opacity", FADE_OPACITY);
|
|
41456
41309
|
g.selectAll(
|
|
41457
41310
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41458
|
-
).attr("opacity",
|
|
41311
|
+
).attr("opacity", FADE_OPACITY);
|
|
41459
41312
|
g.selectAll(".gantt-marker-group").attr(
|
|
41460
41313
|
"opacity",
|
|
41461
|
-
|
|
41314
|
+
FADE_OPACITY
|
|
41462
41315
|
);
|
|
41463
41316
|
eraRect.attr("opacity", hoverEraOpacity);
|
|
41464
41317
|
if (eraTruncated) eraLabel.text(era.label);
|
|
@@ -41516,31 +41369,31 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
|
|
|
41516
41369
|
markerG.on("mouseenter", () => {
|
|
41517
41370
|
g.selectAll(".gantt-task").attr(
|
|
41518
41371
|
"opacity",
|
|
41519
|
-
|
|
41372
|
+
FADE_OPACITY
|
|
41520
41373
|
);
|
|
41521
41374
|
g.selectAll(".gantt-milestone").attr(
|
|
41522
41375
|
"opacity",
|
|
41523
|
-
|
|
41376
|
+
FADE_OPACITY
|
|
41524
41377
|
);
|
|
41525
41378
|
g.selectAll(
|
|
41526
41379
|
".gantt-group-bar, .gantt-group-summary"
|
|
41527
|
-
).attr("opacity",
|
|
41528
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41529
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
41530
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41380
|
+
).attr("opacity", FADE_OPACITY);
|
|
41381
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41382
|
+
svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
|
|
41383
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41531
41384
|
g.selectAll(
|
|
41532
41385
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41533
|
-
).attr("opacity",
|
|
41386
|
+
).attr("opacity", FADE_OPACITY);
|
|
41534
41387
|
g.selectAll(
|
|
41535
41388
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41536
|
-
).attr("opacity",
|
|
41389
|
+
).attr("opacity", FADE_OPACITY);
|
|
41537
41390
|
g.selectAll(".gantt-era-group").attr(
|
|
41538
41391
|
"opacity",
|
|
41539
|
-
|
|
41392
|
+
FADE_OPACITY
|
|
41540
41393
|
);
|
|
41541
41394
|
g.selectAll(".gantt-marker-group").attr(
|
|
41542
41395
|
"opacity",
|
|
41543
|
-
|
|
41396
|
+
FADE_OPACITY
|
|
41544
41397
|
);
|
|
41545
41398
|
markerG.attr("opacity", 1);
|
|
41546
41399
|
markerLine.attr("opacity", 0.8);
|
|
@@ -41616,7 +41469,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41616
41469
|
const id = el.attr("data-task-id");
|
|
41617
41470
|
el.attr(
|
|
41618
41471
|
"opacity",
|
|
41619
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41472
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41620
41473
|
);
|
|
41621
41474
|
});
|
|
41622
41475
|
g.selectAll(".gantt-milestone").each(function() {
|
|
@@ -41624,7 +41477,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41624
41477
|
const id = el.attr("data-task-id");
|
|
41625
41478
|
el.attr(
|
|
41626
41479
|
"opacity",
|
|
41627
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41480
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41628
41481
|
);
|
|
41629
41482
|
});
|
|
41630
41483
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
@@ -41632,7 +41485,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41632
41485
|
const id = el.attr("data-task-id");
|
|
41633
41486
|
el.attr(
|
|
41634
41487
|
"opacity",
|
|
41635
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41488
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41636
41489
|
);
|
|
41637
41490
|
});
|
|
41638
41491
|
g.selectAll(
|
|
@@ -41642,7 +41495,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41642
41495
|
const name = el.attr("data-group");
|
|
41643
41496
|
el.attr(
|
|
41644
41497
|
"opacity",
|
|
41645
|
-
name && overlappingGroupNames.has(name) ? 1 :
|
|
41498
|
+
name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
|
|
41646
41499
|
);
|
|
41647
41500
|
});
|
|
41648
41501
|
svg.selectAll(".gantt-group-label").each(function() {
|
|
@@ -41650,19 +41503,19 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41650
41503
|
const name = el.attr("data-group");
|
|
41651
41504
|
el.attr(
|
|
41652
41505
|
"opacity",
|
|
41653
|
-
name && overlappingGroupNames.has(name) ? 1 :
|
|
41506
|
+
name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
|
|
41654
41507
|
);
|
|
41655
41508
|
});
|
|
41656
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41509
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41657
41510
|
g.selectAll(
|
|
41658
41511
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41659
|
-
).attr("opacity",
|
|
41512
|
+
).attr("opacity", FADE_OPACITY);
|
|
41660
41513
|
g.selectAll(
|
|
41661
41514
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41662
|
-
).attr("opacity",
|
|
41515
|
+
).attr("opacity", FADE_OPACITY);
|
|
41663
41516
|
g.selectAll(".gantt-marker-group").attr(
|
|
41664
41517
|
"opacity",
|
|
41665
|
-
|
|
41518
|
+
FADE_OPACITY
|
|
41666
41519
|
);
|
|
41667
41520
|
sprintRect.attr("opacity", SPRINT_HOVER_OPACITY);
|
|
41668
41521
|
const startVisible = rawSx >= chartMinX;
|
|
@@ -41731,20 +41584,20 @@ function highlightDeps(g, svg, taskId, resolved) {
|
|
|
41731
41584
|
g.selectAll(".gantt-task").each(function() {
|
|
41732
41585
|
const el = d3Selection13.select(this);
|
|
41733
41586
|
const id = el.attr("data-task-id");
|
|
41734
|
-
el.attr("opacity", id && related.has(id) ? 1 :
|
|
41587
|
+
el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY);
|
|
41735
41588
|
});
|
|
41736
41589
|
g.selectAll(".gantt-milestone").attr(
|
|
41737
41590
|
"opacity",
|
|
41738
|
-
|
|
41591
|
+
FADE_OPACITY
|
|
41739
41592
|
);
|
|
41740
41593
|
g.selectAll(
|
|
41741
41594
|
".gantt-group-bar, .gantt-group-summary"
|
|
41742
|
-
).attr("opacity",
|
|
41743
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41744
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41595
|
+
).attr("opacity", FADE_OPACITY);
|
|
41596
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41597
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41745
41598
|
g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
|
|
41746
41599
|
"opacity",
|
|
41747
|
-
|
|
41600
|
+
FADE_OPACITY
|
|
41748
41601
|
);
|
|
41749
41602
|
g.selectAll(
|
|
41750
41603
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
@@ -41753,52 +41606,52 @@ function highlightDeps(g, svg, taskId, resolved) {
|
|
|
41753
41606
|
const from = el.attr("data-dep-from");
|
|
41754
41607
|
const to = el.attr("data-dep-to");
|
|
41755
41608
|
const isRelated = from && related.has(from) || to && related.has(to);
|
|
41756
|
-
el.attr("opacity", isRelated ? 0.5 :
|
|
41609
|
+
el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY);
|
|
41757
41610
|
});
|
|
41758
41611
|
g.selectAll(".gantt-marker-group").attr(
|
|
41759
41612
|
"opacity",
|
|
41760
|
-
|
|
41613
|
+
FADE_OPACITY
|
|
41761
41614
|
);
|
|
41762
41615
|
}
|
|
41763
41616
|
function highlightGroup(g, svg, groupName) {
|
|
41764
41617
|
g.selectAll(".gantt-task").each(function() {
|
|
41765
41618
|
const el = d3Selection13.select(this);
|
|
41766
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41619
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41767
41620
|
});
|
|
41768
41621
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41769
41622
|
const el = d3Selection13.select(this);
|
|
41770
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41623
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41771
41624
|
});
|
|
41772
41625
|
g.selectAll(
|
|
41773
41626
|
".gantt-group-bar, .gantt-group-summary"
|
|
41774
41627
|
).each(function() {
|
|
41775
41628
|
const el = d3Selection13.select(this);
|
|
41776
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41629
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41777
41630
|
});
|
|
41778
41631
|
svg.selectAll(".gantt-group-label").each(function() {
|
|
41779
41632
|
const el = d3Selection13.select(this);
|
|
41780
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41633
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41781
41634
|
});
|
|
41782
41635
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41783
41636
|
const el = d3Selection13.select(this);
|
|
41784
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41637
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41785
41638
|
});
|
|
41786
41639
|
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").each(function() {
|
|
41787
41640
|
const el = d3Selection13.select(this);
|
|
41788
41641
|
el.attr(
|
|
41789
41642
|
"opacity",
|
|
41790
|
-
el.attr("data-group") === groupName ? 1 :
|
|
41643
|
+
el.attr("data-group") === groupName ? 1 : FADE_OPACITY
|
|
41791
41644
|
);
|
|
41792
41645
|
});
|
|
41793
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41794
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41646
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41647
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
41795
41648
|
g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
|
|
41796
41649
|
"opacity",
|
|
41797
|
-
|
|
41650
|
+
FADE_OPACITY
|
|
41798
41651
|
);
|
|
41799
41652
|
g.selectAll(".gantt-marker-group").attr(
|
|
41800
41653
|
"opacity",
|
|
41801
|
-
|
|
41654
|
+
FADE_OPACITY
|
|
41802
41655
|
);
|
|
41803
41656
|
}
|
|
41804
41657
|
function highlightLane(g, svg, tagKey, laneName) {
|
|
@@ -41806,105 +41659,105 @@ function highlightLane(g, svg, tagKey, laneName) {
|
|
|
41806
41659
|
const laneValue = laneName.toLowerCase();
|
|
41807
41660
|
g.selectAll(".gantt-task").each(function() {
|
|
41808
41661
|
const el = d3Selection13.select(this);
|
|
41809
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41662
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41810
41663
|
});
|
|
41811
41664
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41812
41665
|
const el = d3Selection13.select(this);
|
|
41813
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41666
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41814
41667
|
});
|
|
41815
41668
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41816
41669
|
const el = d3Selection13.select(this);
|
|
41817
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41670
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41818
41671
|
});
|
|
41819
41672
|
svg.selectAll(".gantt-lane-header").each(function() {
|
|
41820
41673
|
const el = d3Selection13.select(this);
|
|
41821
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41674
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41822
41675
|
});
|
|
41823
41676
|
g.selectAll(".gantt-lane-band-group").each(function() {
|
|
41824
41677
|
const el = d3Selection13.select(this);
|
|
41825
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41678
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41826
41679
|
});
|
|
41827
41680
|
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").each(function() {
|
|
41828
41681
|
const el = d3Selection13.select(this);
|
|
41829
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41682
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41830
41683
|
});
|
|
41831
41684
|
g.selectAll(
|
|
41832
41685
|
".gantt-group-bar, .gantt-group-summary"
|
|
41833
|
-
).attr("opacity",
|
|
41834
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41835
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41686
|
+
).attr("opacity", FADE_OPACITY);
|
|
41687
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41688
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
41836
41689
|
g.selectAll(".gantt-marker-group").attr(
|
|
41837
41690
|
"opacity",
|
|
41838
|
-
|
|
41691
|
+
FADE_OPACITY
|
|
41839
41692
|
);
|
|
41840
41693
|
}
|
|
41841
41694
|
function highlightTask(g, svg, taskId) {
|
|
41842
41695
|
g.selectAll(".gantt-task").each(function() {
|
|
41843
41696
|
const el = d3Selection13.select(this);
|
|
41844
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41697
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41845
41698
|
});
|
|
41846
41699
|
g.selectAll(".gantt-milestone").attr(
|
|
41847
41700
|
"opacity",
|
|
41848
|
-
|
|
41701
|
+
FADE_OPACITY
|
|
41849
41702
|
);
|
|
41850
41703
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41851
41704
|
const el = d3Selection13.select(this);
|
|
41852
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41705
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41853
41706
|
});
|
|
41854
41707
|
g.selectAll(
|
|
41855
41708
|
".gantt-group-bar, .gantt-group-summary"
|
|
41856
|
-
).attr("opacity",
|
|
41857
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41858
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41859
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41860
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41709
|
+
).attr("opacity", FADE_OPACITY);
|
|
41710
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41711
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
41712
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41713
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
41861
41714
|
g.selectAll(
|
|
41862
41715
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41863
|
-
).attr("opacity",
|
|
41716
|
+
).attr("opacity", FADE_OPACITY);
|
|
41864
41717
|
g.selectAll(
|
|
41865
41718
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41866
|
-
).attr("opacity",
|
|
41719
|
+
).attr("opacity", FADE_OPACITY);
|
|
41867
41720
|
g.selectAll(".gantt-marker-group").attr(
|
|
41868
41721
|
"opacity",
|
|
41869
|
-
|
|
41722
|
+
FADE_OPACITY
|
|
41870
41723
|
);
|
|
41871
41724
|
}
|
|
41872
41725
|
function highlightMilestone(g, svg, taskId) {
|
|
41873
41726
|
g.selectAll(".gantt-task").attr(
|
|
41874
41727
|
"opacity",
|
|
41875
|
-
|
|
41728
|
+
FADE_OPACITY
|
|
41876
41729
|
);
|
|
41877
41730
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41878
41731
|
const el = d3Selection13.select(this);
|
|
41879
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41732
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41880
41733
|
});
|
|
41881
41734
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41882
41735
|
const el = d3Selection13.select(this);
|
|
41883
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41736
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41884
41737
|
});
|
|
41885
41738
|
g.selectAll(
|
|
41886
41739
|
".gantt-group-bar, .gantt-group-summary"
|
|
41887
|
-
).attr("opacity",
|
|
41888
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41889
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41890
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41891
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41740
|
+
).attr("opacity", FADE_OPACITY);
|
|
41741
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41742
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
41743
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41744
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
41892
41745
|
g.selectAll(
|
|
41893
41746
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41894
|
-
).attr("opacity",
|
|
41747
|
+
).attr("opacity", FADE_OPACITY);
|
|
41895
41748
|
g.selectAll(
|
|
41896
41749
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41897
|
-
).attr("opacity",
|
|
41750
|
+
).attr("opacity", FADE_OPACITY);
|
|
41898
41751
|
g.selectAll(".gantt-marker-group").attr(
|
|
41899
41752
|
"opacity",
|
|
41900
|
-
|
|
41753
|
+
FADE_OPACITY
|
|
41901
41754
|
);
|
|
41902
41755
|
}
|
|
41903
41756
|
function highlightTaskLabel(svg, lineNumber) {
|
|
41904
41757
|
const ln = String(lineNumber);
|
|
41905
41758
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41906
41759
|
const el = d3Selection13.select(this);
|
|
41907
|
-
el.attr("opacity", el.attr("data-line-number") === ln ? 1 :
|
|
41760
|
+
el.attr("opacity", el.attr("data-line-number") === ln ? 1 : FADE_OPACITY);
|
|
41908
41761
|
});
|
|
41909
41762
|
}
|
|
41910
41763
|
function resetTaskLabels(svg) {
|
|
@@ -42178,7 +42031,7 @@ function renderTimeScaleHorizontal(g, scale, _innerWidth, innerHeight, textColor
|
|
|
42178
42031
|
g.append("text").attr("class", "gantt-scale-tick").attr("x", tick.pos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("font-size", "10px").attr("fill", textColor).attr("opacity", opacity).text(tick.label);
|
|
42179
42032
|
}
|
|
42180
42033
|
}
|
|
42181
|
-
var d3Scale, d3Selection13, BAR_H, ROW_GAP, GROUP_GAP2, MILESTONE_SIZE, MIN_LEFT_MARGIN, BOTTOM_MARGIN, RIGHT_MARGIN, CHAR_W2, LABEL_PAD2, LABEL_GAP, BAND_ACCENT_W, BAND_RADIUS, bandClipCounter, JS_DAY_TO_WEEKDAY2, ERA_COLORS, SPRINT_BAND_OPACITY, SPRINT_HOVER_OPACITY, SPRINT_BOUNDARY_OPACITY,
|
|
42034
|
+
var d3Scale, d3Selection13, BAR_H, ROW_GAP, GROUP_GAP2, MILESTONE_SIZE, MIN_LEFT_MARGIN, BOTTOM_MARGIN, RIGHT_MARGIN, CHAR_W2, LABEL_PAD2, LABEL_GAP, BAND_ACCENT_W, BAND_RADIUS, bandClipCounter, JS_DAY_TO_WEEKDAY2, ERA_COLORS, SPRINT_BAND_OPACITY, SPRINT_HOVER_OPACITY, SPRINT_BOUNDARY_OPACITY, FADE_OPACITY, MONTH_ABBR2;
|
|
42182
42035
|
var init_renderer12 = __esm({
|
|
42183
42036
|
"src/gantt/renderer.ts"() {
|
|
42184
42037
|
"use strict";
|
|
@@ -42221,7 +42074,7 @@ var init_renderer12 = __esm({
|
|
|
42221
42074
|
SPRINT_BAND_OPACITY = 0.05;
|
|
42222
42075
|
SPRINT_HOVER_OPACITY = 0.12;
|
|
42223
42076
|
SPRINT_BOUNDARY_OPACITY = 0.3;
|
|
42224
|
-
|
|
42077
|
+
FADE_OPACITY = 0.1;
|
|
42225
42078
|
MONTH_ABBR2 = [
|
|
42226
42079
|
"Jan",
|
|
42227
42080
|
"Feb",
|
|
@@ -47536,7 +47389,8 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
47536
47389
|
palette.bg,
|
|
47537
47390
|
mutedBasemap ? isDark ? MUTED_FOREIGN_DARK : MUTED_FOREIGN_LIGHT : isDark ? FOREIGN_TINT_DARK : FOREIGN_TINT_LIGHT
|
|
47538
47391
|
);
|
|
47539
|
-
const
|
|
47392
|
+
const hasDirectColor = resolved.regions.some((r) => r.color !== void 0);
|
|
47393
|
+
const colorizeActive = resolved.directives.noColorize !== true && !hasRamp && !hasDirectColor && resolved.tagGroups.length === 0;
|
|
47540
47394
|
const colorByIso = /* @__PURE__ */ new Map();
|
|
47541
47395
|
if (colorizeActive) {
|
|
47542
47396
|
const adjacency = /* @__PURE__ */ new Map();
|
|
@@ -47632,16 +47486,17 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
47632
47486
|
};
|
|
47633
47487
|
}
|
|
47634
47488
|
}
|
|
47489
|
+
const shownTitle = resolved.directives.noTitle ? null : resolved.title;
|
|
47635
47490
|
const TITLE_GAP2 = 16;
|
|
47636
47491
|
let topPad = FIT_PAD;
|
|
47637
|
-
if (
|
|
47492
|
+
if (shownTitle && resolved.pois.length > 0) {
|
|
47638
47493
|
const bannerBottom = (resolved.subtitle ? TITLE_Y + TITLE_FONT_SIZE : TITLE_Y) + TITLE_FONT_SIZE / 2;
|
|
47639
47494
|
topPad = Math.max(FIT_PAD, bannerBottom + TITLE_GAP2);
|
|
47640
47495
|
}
|
|
47641
47496
|
const legendBand = mapLegendBand(legend, {
|
|
47642
47497
|
width,
|
|
47643
47498
|
mode: opts.legendMode ?? "preview",
|
|
47644
|
-
hasTitle: Boolean(
|
|
47499
|
+
hasTitle: Boolean(shownTitle),
|
|
47645
47500
|
hasSubtitle: Boolean(resolved.subtitle)
|
|
47646
47501
|
});
|
|
47647
47502
|
if (legendBand > topPad) topPad = legendBand;
|
|
@@ -48730,7 +48585,7 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
48730
48585
|
width,
|
|
48731
48586
|
height,
|
|
48732
48587
|
background: water,
|
|
48733
|
-
title:
|
|
48588
|
+
title: shownTitle,
|
|
48734
48589
|
...resolved.subtitle !== void 0 && { subtitle: resolved.subtitle },
|
|
48735
48590
|
...resolved.caption !== void 0 && { caption: resolved.caption },
|
|
48736
48591
|
regions,
|
|
@@ -49140,9 +48995,10 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
|
|
|
49140
48995
|
wireSync(lt, leg.lineNumber);
|
|
49141
48996
|
}
|
|
49142
48997
|
});
|
|
48998
|
+
const clusterUi = !exportDims && !resolved.directives.noClusterPois;
|
|
49143
48999
|
const gSpider = svg.append("g").attr("class", "dgmo-map-spider");
|
|
49144
49000
|
for (const cl of layout.clusters) {
|
|
49145
|
-
if (
|
|
49001
|
+
if (clusterUi) {
|
|
49146
49002
|
gSpider.append("circle").attr("cx", cl.cx).attr("cy", cl.cy).attr("r", cl.hitR).attr("fill", "transparent").attr("data-cluster-hit", cl.id).style("cursor", "pointer");
|
|
49147
49003
|
}
|
|
49148
49004
|
for (const leg of cl.legs) {
|
|
@@ -49234,13 +49090,18 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
|
|
|
49234
49090
|
}
|
|
49235
49091
|
wireSync(t, lab.lineNumber);
|
|
49236
49092
|
}
|
|
49237
|
-
if (
|
|
49093
|
+
if (clusterUi && layout.clusters.length) {
|
|
49238
49094
|
const gBadge = svg.append("g").attr("class", "dgmo-map-cluster-badges");
|
|
49239
49095
|
for (const cl of layout.clusters) {
|
|
49240
49096
|
const g = gBadge.append("g").attr("data-cluster", cl.id).style("opacity", 0).style("pointer-events", "none");
|
|
49241
49097
|
const R = 9;
|
|
49242
49098
|
g.append("circle").attr("cx", cl.cx).attr("cy", cl.cy).attr("r", R).attr("fill", mix(palette.textMuted, palette.bg, 35)).attr("stroke", palette.textMuted).attr("stroke-width", 1);
|
|
49243
49099
|
g.append("circle").attr("cx", cl.cx).attr("cy", cl.cy).attr("r", R + 2.5).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1);
|
|
49100
|
+
const beadR = R + 2.5;
|
|
49101
|
+
for (const leg of cl.legs) {
|
|
49102
|
+
const a = Math.atan2(leg.y2 - cl.cy, leg.x2 - cl.cx);
|
|
49103
|
+
g.append("circle").attr("class", "dgmo-map-cluster-bead").attr("cx", cl.cx + beadR * Math.cos(a)).attr("cy", cl.cy + beadR * Math.sin(a)).attr("r", 1.8).attr("fill", leg.color).attr("stroke", palette.bg).attr("stroke-width", 0.5);
|
|
49104
|
+
}
|
|
49244
49105
|
emitText(
|
|
49245
49106
|
g,
|
|
49246
49107
|
cl.cx,
|
|
@@ -52166,10 +52027,12 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
52166
52027
|
isDark ? 15 : 20
|
|
52167
52028
|
) : isDark ? palette.surface : palette.bg;
|
|
52168
52029
|
const strokeColor = groupTagColor || palette.textMuted;
|
|
52169
|
-
const groupG = svg.append("g").attr("class", "group-box-wrapper").attr("data-group-toggle", "").attr("data-group-line", String(group.lineNumber)).attr("cursor", "pointer");
|
|
52030
|
+
const groupG = svg.append("g").attr("class", "group-box-wrapper").attr("data-group-toggle", "").attr("data-group-line", String(group.lineNumber)).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "true").attr("cursor", "pointer");
|
|
52170
52031
|
groupG.append("title").text("Click to collapse");
|
|
52171
|
-
groupG.append("rect").attr("x", minX).attr("y", boxY).attr("width", maxX - minX).attr("height", boxH).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("class", "group-box");
|
|
52172
|
-
groupG.append("
|
|
52032
|
+
groupG.append("rect").attr("x", minX).attr("y", boxY).attr("width", maxX - minX).attr("height", boxH).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("pointer-events", "none").attr("class", "group-box");
|
|
52033
|
+
groupG.append("rect").attr("x", minX).attr("y", boxY).attr("width", maxX - minX).attr("height", participantStartY - boxY).attr("fill", "transparent").attr("class", "group-label-hit");
|
|
52034
|
+
groupG.append("text").attr("x", minX + 8).attr("y", boxY + GROUP_LABEL_SIZE + 4).attr("fill", strokeColor).attr("font-size", GROUP_LABEL_SIZE).attr("opacity", 0.7).attr("pointer-events", "none").attr("class", "group-chevron").text("\u25BE");
|
|
52035
|
+
groupG.append("text").attr("x", minX + 8 + GROUP_LABEL_SIZE + 2).attr("y", boxY + GROUP_LABEL_SIZE + 4).attr("fill", strokeColor).attr("font-size", GROUP_LABEL_SIZE).attr("font-weight", "bold").attr("opacity", 0.7).attr("pointer-events", "none").attr("class", "group-label").text(group.name);
|
|
52173
52036
|
}
|
|
52174
52037
|
const lifelineStartY = lifelineStartY0;
|
|
52175
52038
|
participants.forEach((participant) => {
|
|
@@ -52211,7 +52074,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
52211
52074
|
const participantG = svg.select(
|
|
52212
52075
|
`.participant[data-participant-id="${participant.id}"]`
|
|
52213
52076
|
);
|
|
52214
|
-
participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("cursor", "pointer");
|
|
52077
|
+
participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "false").attr("cursor", "pointer");
|
|
52215
52078
|
participantG.append("title").text("Click to expand");
|
|
52216
52079
|
const pFill = effectiveTagColor ? mix(
|
|
52217
52080
|
effectiveTagColor,
|
|
@@ -54190,7 +54053,7 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54190
54053
|
neighbors2.get(link.source).add(link.target);
|
|
54191
54054
|
neighbors2.get(link.target).add(link.source);
|
|
54192
54055
|
}
|
|
54193
|
-
const
|
|
54056
|
+
const FADE_OPACITY2 = 0.1;
|
|
54194
54057
|
function handleMouseEnter(hovered) {
|
|
54195
54058
|
const connected = neighbors2.get(hovered);
|
|
54196
54059
|
g.selectAll(".arc-link").each(function() {
|
|
@@ -54198,13 +54061,13 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54198
54061
|
const src = el.attr("data-source");
|
|
54199
54062
|
const tgt = el.attr("data-target");
|
|
54200
54063
|
const isRelated = src === hovered || tgt === hovered;
|
|
54201
|
-
el.attr("stroke-opacity", isRelated ? 0.85 :
|
|
54064
|
+
el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
|
|
54202
54065
|
});
|
|
54203
54066
|
g.selectAll(".arc-node").each(function() {
|
|
54204
54067
|
const el = d3Selection23.select(this);
|
|
54205
54068
|
const name = el.attr("data-node");
|
|
54206
54069
|
const isRelated = name === hovered || connected.has(name);
|
|
54207
|
-
el.attr("opacity", isRelated ? 1 :
|
|
54070
|
+
el.attr("opacity", isRelated ? 1 : FADE_OPACITY2);
|
|
54208
54071
|
});
|
|
54209
54072
|
}
|
|
54210
54073
|
function handleMouseLeave() {
|
|
@@ -54228,11 +54091,11 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54228
54091
|
g.selectAll(".arc-link").each(function() {
|
|
54229
54092
|
const el = d3Selection23.select(this);
|
|
54230
54093
|
const isRelated = members.has(el.attr("data-source")) || members.has(el.attr("data-target"));
|
|
54231
|
-
el.attr("stroke-opacity", isRelated ? 0.85 :
|
|
54094
|
+
el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
|
|
54232
54095
|
});
|
|
54233
54096
|
g.selectAll(".arc-node").each(function() {
|
|
54234
54097
|
const el = d3Selection23.select(this);
|
|
54235
|
-
el.attr("opacity", members.has(el.attr("data-node")) ? 1 :
|
|
54098
|
+
el.attr("opacity", members.has(el.attr("data-node")) ? 1 : FADE_OPACITY2);
|
|
54236
54099
|
});
|
|
54237
54100
|
g.selectAll(".arc-group-band").each(function() {
|
|
54238
54101
|
const el = d3Selection23.select(this);
|
|
@@ -54754,23 +54617,23 @@ function setupTimeline(container, parsed, palette, isDark, exportDims, activeTag
|
|
|
54754
54617
|
};
|
|
54755
54618
|
}
|
|
54756
54619
|
function makeTimelineHoverHelpers() {
|
|
54757
|
-
const
|
|
54620
|
+
const FADE_OPACITY2 = 0.1;
|
|
54758
54621
|
function fadeToGroup(g, groupName) {
|
|
54759
54622
|
g.selectAll(".tl-event").each(function() {
|
|
54760
54623
|
const el = d3Selection23.select(this);
|
|
54761
54624
|
const evGroup = el.attr("data-group");
|
|
54762
|
-
el.attr("opacity", evGroup === groupName ? 1 :
|
|
54625
|
+
el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY2);
|
|
54763
54626
|
});
|
|
54764
54627
|
g.selectAll(".tl-legend-item, .tl-lane-header").each(
|
|
54765
54628
|
function() {
|
|
54766
54629
|
const el = d3Selection23.select(this);
|
|
54767
54630
|
const name = el.attr("data-group");
|
|
54768
|
-
el.attr("opacity", name === groupName ? 1 :
|
|
54631
|
+
el.attr("opacity", name === groupName ? 1 : FADE_OPACITY2);
|
|
54769
54632
|
}
|
|
54770
54633
|
);
|
|
54771
54634
|
g.selectAll(".tl-marker").attr(
|
|
54772
54635
|
"opacity",
|
|
54773
|
-
|
|
54636
|
+
FADE_OPACITY2
|
|
54774
54637
|
);
|
|
54775
54638
|
}
|
|
54776
54639
|
function fadeToEra(g, eraStart, eraEnd) {
|
|
@@ -54780,40 +54643,40 @@ function makeTimelineHoverHelpers() {
|
|
|
54780
54643
|
const endDate = el.attr("data-end-date");
|
|
54781
54644
|
const evEnd = endDate ? parseFloat(endDate) : date;
|
|
54782
54645
|
const inside = evEnd >= eraStart && date <= eraEnd;
|
|
54783
|
-
el.attr("opacity", inside ? 1 :
|
|
54646
|
+
el.attr("opacity", inside ? 1 : FADE_OPACITY2);
|
|
54784
54647
|
});
|
|
54785
54648
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54786
54649
|
"opacity",
|
|
54787
|
-
|
|
54650
|
+
FADE_OPACITY2
|
|
54788
54651
|
);
|
|
54789
54652
|
g.selectAll(".tl-era").each(function() {
|
|
54790
54653
|
const el = d3Selection23.select(this);
|
|
54791
54654
|
const s = parseFloat(el.attr("data-era-start"));
|
|
54792
54655
|
const e = parseFloat(el.attr("data-era-end"));
|
|
54793
54656
|
const isSelf = s === eraStart && e === eraEnd;
|
|
54794
|
-
el.attr("opacity", isSelf ? 1 :
|
|
54657
|
+
el.attr("opacity", isSelf ? 1 : FADE_OPACITY2);
|
|
54795
54658
|
});
|
|
54796
54659
|
g.selectAll(".tl-marker").each(function() {
|
|
54797
54660
|
const el = d3Selection23.select(this);
|
|
54798
54661
|
const date = parseFloat(el.attr("data-marker-date"));
|
|
54799
54662
|
const inside = date >= eraStart && date <= eraEnd;
|
|
54800
|
-
el.attr("opacity", inside ? 1 :
|
|
54663
|
+
el.attr("opacity", inside ? 1 : FADE_OPACITY2);
|
|
54801
54664
|
});
|
|
54802
54665
|
}
|
|
54803
54666
|
function fadeToMarker(g, markerDate) {
|
|
54804
54667
|
g.selectAll(".tl-event").attr(
|
|
54805
54668
|
"opacity",
|
|
54806
|
-
|
|
54669
|
+
FADE_OPACITY2
|
|
54807
54670
|
);
|
|
54808
|
-
g.selectAll(".tl-era").attr("opacity",
|
|
54671
|
+
g.selectAll(".tl-era").attr("opacity", FADE_OPACITY2);
|
|
54809
54672
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54810
54673
|
"opacity",
|
|
54811
|
-
|
|
54674
|
+
FADE_OPACITY2
|
|
54812
54675
|
);
|
|
54813
54676
|
g.selectAll(".tl-marker").each(function() {
|
|
54814
54677
|
const el = d3Selection23.select(this);
|
|
54815
54678
|
const date = parseFloat(el.attr("data-marker-date"));
|
|
54816
|
-
el.attr("opacity", date === markerDate ? 1 :
|
|
54679
|
+
el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY2);
|
|
54817
54680
|
});
|
|
54818
54681
|
}
|
|
54819
54682
|
function fadeReset(g) {
|
|
@@ -54827,15 +54690,15 @@ function makeTimelineHoverHelpers() {
|
|
|
54827
54690
|
g.selectAll(".tl-event").each(function() {
|
|
54828
54691
|
const el = d3Selection23.select(this);
|
|
54829
54692
|
const val = el.attr(attrName);
|
|
54830
|
-
el.attr("opacity", val === tagValue ? 1 :
|
|
54693
|
+
el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY2);
|
|
54831
54694
|
});
|
|
54832
54695
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54833
54696
|
"opacity",
|
|
54834
|
-
|
|
54697
|
+
FADE_OPACITY2
|
|
54835
54698
|
);
|
|
54836
54699
|
g.selectAll(".tl-marker").attr(
|
|
54837
54700
|
"opacity",
|
|
54838
|
-
|
|
54701
|
+
FADE_OPACITY2
|
|
54839
54702
|
);
|
|
54840
54703
|
g.selectAll(".tl-tag-legend-entry").each(function() {
|
|
54841
54704
|
const el = d3Selection23.select(this);
|
|
@@ -54844,7 +54707,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54844
54707
|
const entryGroup = el.attr("data-tag-group");
|
|
54845
54708
|
el.attr(
|
|
54846
54709
|
"opacity",
|
|
54847
|
-
entryGroup === tagKey && entryValue === tagValue ? 1 :
|
|
54710
|
+
entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY2
|
|
54848
54711
|
);
|
|
54849
54712
|
});
|
|
54850
54713
|
}
|
|
@@ -54854,7 +54717,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54854
54717
|
}
|
|
54855
54718
|
}
|
|
54856
54719
|
return {
|
|
54857
|
-
FADE_OPACITY:
|
|
54720
|
+
FADE_OPACITY: FADE_OPACITY2,
|
|
54858
54721
|
fadeToGroup,
|
|
54859
54722
|
fadeToEra,
|
|
54860
54723
|
fadeToMarker,
|
|
@@ -54866,7 +54729,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54866
54729
|
function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
|
|
54867
54730
|
if (parsed.timelineTagGroups.length === 0) return;
|
|
54868
54731
|
const { width, textColor, groupColorMap, solid } = setup;
|
|
54869
|
-
const { FADE_OPACITY:
|
|
54732
|
+
const { FADE_OPACITY: FADE_OPACITY2, fadeReset, fadeToTagValue } = hovers;
|
|
54870
54733
|
const title = parsed.noTitle ? null : parsed.title;
|
|
54871
54734
|
const { timelineEvents } = parsed;
|
|
54872
54735
|
const LG_HEIGHT = LEGEND_HEIGHT;
|
|
@@ -54956,7 +54819,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
|
|
|
54956
54819
|
const eg = el.attr("data-tag-group") ?? el.node()?.closest?.("[data-tag-group]")?.getAttribute("data-tag-group");
|
|
54957
54820
|
el.attr(
|
|
54958
54821
|
"opacity",
|
|
54959
|
-
eg === tagKey && ev === tagVal ? 1 :
|
|
54822
|
+
eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY2
|
|
54960
54823
|
);
|
|
54961
54824
|
});
|
|
54962
54825
|
} else {
|
|
@@ -57715,6 +57578,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
57715
57578
|
const { renderSequenceDiagram: renderSequenceDiagram2 } = await Promise.resolve().then(() => (init_renderer20(), renderer_exports20));
|
|
57716
57579
|
const seqParsed = parseSequenceDgmo2(content);
|
|
57717
57580
|
if (seqParsed.error || seqParsed.participants.length === 0) return "";
|
|
57581
|
+
const collapsedSections = viewState?.cs ? new Set(viewState.cs) : void 0;
|
|
57582
|
+
const collapsedGroups = viewState?.cg ? new Set(viewState.cg.map(Number).filter((n) => Number.isFinite(n))) : void 0;
|
|
57583
|
+
const seqActiveTagGroup = viewState?.tag ?? options?.tagGroup;
|
|
57718
57584
|
renderSequenceDiagram2(
|
|
57719
57585
|
container,
|
|
57720
57586
|
seqParsed,
|
|
@@ -57723,9 +57589,11 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
57723
57589
|
void 0,
|
|
57724
57590
|
{
|
|
57725
57591
|
exportWidth: EXPORT_WIDTH,
|
|
57726
|
-
...
|
|
57727
|
-
activeTagGroup:
|
|
57728
|
-
}
|
|
57592
|
+
...seqActiveTagGroup !== void 0 && {
|
|
57593
|
+
activeTagGroup: seqActiveTagGroup
|
|
57594
|
+
},
|
|
57595
|
+
...collapsedSections !== void 0 && { collapsedSections },
|
|
57596
|
+
...collapsedGroups !== void 0 && { collapsedGroups }
|
|
57729
57597
|
}
|
|
57730
57598
|
);
|
|
57731
57599
|
} else if (parsed.type === "wordcloud") {
|
|
@@ -58811,8 +58679,18 @@ function normalizeSvgForEmbed(input) {
|
|
|
58811
58679
|
const tight = computeBBox(svg);
|
|
58812
58680
|
if (tight && tight.width > 0 && tight.height > 0) {
|
|
58813
58681
|
const pad2 = 16;
|
|
58814
|
-
const
|
|
58815
|
-
|
|
58682
|
+
const x = tight.x - pad2;
|
|
58683
|
+
const y = tight.y - pad2;
|
|
58684
|
+
const w = tight.width + pad2 * 2;
|
|
58685
|
+
const h = tight.height + pad2 * 2;
|
|
58686
|
+
const canvas = readViewBox(svg);
|
|
58687
|
+
const TOL = 2;
|
|
58688
|
+
const MIN_COVERAGE = 0.5;
|
|
58689
|
+
const trustworthy = !canvas || x >= canvas.x - TOL && y >= canvas.y - TOL && x + w <= canvas.x + canvas.width + TOL && y + h <= canvas.y + canvas.height + TOL && w >= canvas.width * MIN_COVERAGE && h >= canvas.height * MIN_COVERAGE;
|
|
58690
|
+
if (trustworthy) {
|
|
58691
|
+
const vb = `${x} ${y} ${w} ${h}`;
|
|
58692
|
+
svg = svg.replace(/(<svg[^>]*?)viewBox="[^"]*"/, `$1viewBox="${vb}"`);
|
|
58693
|
+
}
|
|
58816
58694
|
}
|
|
58817
58695
|
svg = svg.replace(/(<svg[^>]*?) width="[^"]*"/g, "$1");
|
|
58818
58696
|
svg = svg.replace(/(<svg[^>]*?) height="[^"]*"/g, "$1");
|
|
@@ -58831,6 +58709,14 @@ function getEmbedSvgViewBox(svg) {
|
|
|
58831
58709
|
height: tight.height + pad2 * 2
|
|
58832
58710
|
};
|
|
58833
58711
|
}
|
|
58712
|
+
function readViewBox(svg) {
|
|
58713
|
+
const m = svg.match(/<svg[^>]*?\bviewBox="([^"]+)"/);
|
|
58714
|
+
if (!m) return null;
|
|
58715
|
+
const n = m[1].trim().split(/[\s,]+/).map(Number);
|
|
58716
|
+
if (n.length !== 4 || n.some((v) => !Number.isFinite(v)) || n[2] <= 0 || n[3] <= 0)
|
|
58717
|
+
return null;
|
|
58718
|
+
return { x: n[0], y: n[1], width: n[2], height: n[3] };
|
|
58719
|
+
}
|
|
58834
58720
|
function computeBBox(svg) {
|
|
58835
58721
|
const xs = [];
|
|
58836
58722
|
const ys = [];
|