@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/auto.cjs
CHANGED
|
@@ -16312,6 +16312,9 @@ function parseMap(content) {
|
|
|
16312
16312
|
break;
|
|
16313
16313
|
// ── Cosmetic `no-*` opt-outs: bare flags, idempotent (mirror `no-legend`,
|
|
16314
16314
|
// no dup warning); each defaults the feature ON when absent. ──
|
|
16315
|
+
case "no-title":
|
|
16316
|
+
d.noTitle = true;
|
|
16317
|
+
break;
|
|
16315
16318
|
case "no-legend":
|
|
16316
16319
|
d.noLegend = true;
|
|
16317
16320
|
break;
|
|
@@ -16333,6 +16336,9 @@ function parseMap(content) {
|
|
|
16333
16336
|
case "no-colorize":
|
|
16334
16337
|
d.noColorize = true;
|
|
16335
16338
|
break;
|
|
16339
|
+
case "no-cluster-pois":
|
|
16340
|
+
d.noClusterPois = true;
|
|
16341
|
+
break;
|
|
16336
16342
|
}
|
|
16337
16343
|
}
|
|
16338
16344
|
function handleTag(trimmed, line12) {
|
|
@@ -16634,13 +16640,15 @@ var init_parser12 = __esm({
|
|
|
16634
16640
|
"locale",
|
|
16635
16641
|
"active-tag",
|
|
16636
16642
|
"caption",
|
|
16643
|
+
"no-title",
|
|
16637
16644
|
"no-legend",
|
|
16638
16645
|
"no-coastline",
|
|
16639
16646
|
"no-relief",
|
|
16640
16647
|
"no-context-labels",
|
|
16641
16648
|
"no-region-labels",
|
|
16642
16649
|
"no-poi-labels",
|
|
16643
|
-
"no-colorize"
|
|
16650
|
+
"no-colorize",
|
|
16651
|
+
"no-cluster-pois"
|
|
16644
16652
|
]);
|
|
16645
16653
|
}
|
|
16646
16654
|
});
|
|
@@ -37350,18 +37358,10 @@ var init_layout11 = __esm({
|
|
|
37350
37358
|
// src/pert/renderer.ts
|
|
37351
37359
|
var renderer_exports11 = {};
|
|
37352
37360
|
__export(renderer_exports11, {
|
|
37353
|
-
PERT_LEGEND_PILL_HEIGHT: () => PERT_LEGEND_PILL_HEIGHT,
|
|
37354
|
-
highlightPertCriticalPath: () => highlightPertCriticalPath,
|
|
37355
|
-
highlightPertSet: () => highlightPertSet,
|
|
37356
37361
|
measurePertAnalysisBlock: () => measurePertAnalysisBlock,
|
|
37357
|
-
pertLegendBlockWidth: () => pertLegendBlockWidth,
|
|
37358
|
-
pertLegendEntries: () => pertLegendEntries,
|
|
37359
|
-
renderLegendBlock: () => renderLegendBlock,
|
|
37360
37362
|
renderPert: () => renderPert,
|
|
37361
37363
|
renderPertAnalysisBlock: () => renderPertAnalysisBlock,
|
|
37362
|
-
renderPertForExport: () => renderPertForExport
|
|
37363
|
-
resetPertCriticalPath: () => resetPertCriticalPath,
|
|
37364
|
-
resetPertHighlight: () => resetPertHighlight
|
|
37364
|
+
renderPertForExport: () => renderPertForExport
|
|
37365
37365
|
});
|
|
37366
37366
|
function analysisBlockChrome(palette, isDark) {
|
|
37367
37367
|
const surfaceBg = isDark ? palette.surface : palette.bg;
|
|
@@ -37444,16 +37444,14 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37444
37444
|
const standaloneFieldLegendWidthForExport = layout.width;
|
|
37445
37445
|
const analysisBlockHeight = analysisLayer.analysisHasContent ? CAPTION_TOP_GAP + analysisLayer.analysisRowHeight : 0;
|
|
37446
37446
|
const fieldLegendBlockHeight = analysisLayer.fieldLegendStandalone ? CAPTION_TOP_GAP + fieldLegendHeightFor(standaloneFieldLegendWidthForExport) : 0;
|
|
37447
|
-
const
|
|
37448
|
-
const legendEntries = showTopLegend ? pertLegendEntries(resolved) : [];
|
|
37447
|
+
const showLegend = options.showLegend ?? true;
|
|
37449
37448
|
const tagLegendActive = resolveActiveTagGroup(
|
|
37450
37449
|
resolved.tagGroups,
|
|
37451
37450
|
resolved.options.activeTag,
|
|
37452
37451
|
options.activeTagOverride
|
|
37453
37452
|
);
|
|
37454
|
-
const showTagLegend =
|
|
37455
|
-
const
|
|
37456
|
-
const legendBlockHeight = (legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0) + tagLegendBlockHeight;
|
|
37453
|
+
const showTagLegend = showLegend && resolved.tagGroups.length > 0;
|
|
37454
|
+
const legendBlockHeight = showTagLegend ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
|
|
37457
37455
|
const naturalChartWidth = layout.width + DIAGRAM_PADDING11 * 2;
|
|
37458
37456
|
const minAnalysisRowW = analysisLayer.analysisHasContent ? analysisLayer.minContentWidth + 2 * DIAGRAM_PADDING11 : 0;
|
|
37459
37457
|
const naturalWidth = Math.max(naturalChartWidth, minAnalysisRowW);
|
|
@@ -37476,8 +37474,7 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37476
37474
|
const sLegendTopGap = ctx.aesthetic(LEGEND_TOP_GAP);
|
|
37477
37475
|
const sLegendBottomGap = ctx.aesthetic(LEGEND_BOTTOM_GAP);
|
|
37478
37476
|
const sLegendPillHeight = ctx.structural(LEGEND_PILL_HEIGHT);
|
|
37479
|
-
const
|
|
37480
|
-
const sLegendBlockHeight = (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0) + sTagLegendBlockHeight;
|
|
37477
|
+
const sLegendBlockHeight = showTagLegend ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0;
|
|
37481
37478
|
const sNodeRadius = ctx.structural(NODE_RADIUS2);
|
|
37482
37479
|
const sNodeStrokeWidth = ctx.structural(NODE_STROKE_WIDTH10);
|
|
37483
37480
|
const sNodeFontSize = ctx.text(NODE_FONT_SIZE4);
|
|
@@ -37509,17 +37506,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37509
37506
|
}
|
|
37510
37507
|
const offsetX = Math.max(sDiagramPad, (svgW - layout.width) / 2);
|
|
37511
37508
|
const offsetY = sDiagramPad + sTitleHeight + sLegendBlockHeight;
|
|
37512
|
-
if (legendEntries.length > 0) {
|
|
37513
|
-
renderLegendBlock(svg, legendEntries, {
|
|
37514
|
-
x: 0,
|
|
37515
|
-
y: sDiagramPad + sTitleHeight + sLegendTopGap,
|
|
37516
|
-
width: svgW,
|
|
37517
|
-
palette,
|
|
37518
|
-
isDark
|
|
37519
|
-
});
|
|
37520
|
-
}
|
|
37521
37509
|
if (showTagLegend) {
|
|
37522
|
-
const tagLegendY = sDiagramPad + sTitleHeight +
|
|
37510
|
+
const tagLegendY = sDiagramPad + sTitleHeight + sLegendTopGap;
|
|
37523
37511
|
renderTagLegendRow(svg, resolved, palette, isDark, {
|
|
37524
37512
|
x: 0,
|
|
37525
37513
|
y: tagLegendY,
|
|
@@ -37603,8 +37591,7 @@ function renderPertForExport(content, theme, palette, now) {
|
|
|
37603
37591
|
}
|
|
37604
37592
|
const captionBoxHeight = captionBullets.length > 0 ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
|
|
37605
37593
|
const captionBlockHeight = captionBullets.length > 0 ? CAPTION_TOP_GAP + captionBoxHeight : 0;
|
|
37606
|
-
const
|
|
37607
|
-
const legendBlockHeight = legendEntries.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
|
|
37594
|
+
const legendBlockHeight = resolved.tagGroups.length > 0 ? LEGEND_TOP_GAP + LEGEND_PILL_HEIGHT + LEGEND_BOTTOM_GAP : 0;
|
|
37608
37595
|
const exportWidth = layout.width + DIAGRAM_PADDING11 * 2;
|
|
37609
37596
|
const exportHeight = layout.height + DIAGRAM_PADDING11 * 2 + titleHeight + legendBlockHeight + captionBlockHeight;
|
|
37610
37597
|
const container = document.createElement("div");
|
|
@@ -38144,22 +38131,22 @@ function renderEdges2(root, resolved, layout, palette, collapsedSet, sc = {}) {
|
|
|
38144
38131
|
if (srcGroup && tgtGroup && srcGroup === tgtGroup && collapsedSet.has(srcGroup)) {
|
|
38145
38132
|
continue;
|
|
38146
38133
|
}
|
|
38147
|
-
const
|
|
38134
|
+
const isCritical = criticalSet.has(e.source) && criticalSet.has(e.target);
|
|
38148
38135
|
let band;
|
|
38149
38136
|
if (mcOn) {
|
|
38150
38137
|
const sc2 = critById.get(e.source);
|
|
38151
38138
|
const tc = critById.get(e.target);
|
|
38152
38139
|
const minC = sc2 === null || tc === null || sc2 === void 0 || tc === void 0 ? null : Math.min(sc2, tc);
|
|
38153
38140
|
band = criticalityBand(minC);
|
|
38154
|
-
if (band === null &&
|
|
38141
|
+
if (band === null && isCritical) band = "red";
|
|
38155
38142
|
} else {
|
|
38156
|
-
band =
|
|
38143
|
+
band = isCritical ? "red" : null;
|
|
38157
38144
|
}
|
|
38158
38145
|
const path = lineGenerator6(e.points);
|
|
38159
38146
|
if (!path) continue;
|
|
38160
38147
|
const sESW = sc.edgeStrokeWidth ?? EDGE_STROKE_WIDTH10;
|
|
38161
38148
|
const sELFS = sc.edgeLabelFontSize ?? 10;
|
|
38162
|
-
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(
|
|
38149
|
+
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 ?? "");
|
|
38163
38150
|
const parsedEdge = edgeByKey.get(`${e.source}->${e.target}`);
|
|
38164
38151
|
const labelText = parsedEdge ? formatEdgeLabel(parsedEdge) : null;
|
|
38165
38152
|
if (labelText) {
|
|
@@ -38211,7 +38198,7 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
|
|
|
38211
38198
|
const r = byId.get(node.id);
|
|
38212
38199
|
if (!r) continue;
|
|
38213
38200
|
if (r.activity.groupId && collapsedSet.has(r.activity.groupId)) continue;
|
|
38214
|
-
const
|
|
38201
|
+
const isCritical = r.isCriticalPath;
|
|
38215
38202
|
const isTbd = tbdSet.has(node.id);
|
|
38216
38203
|
const dashArray = isTbd ? "4,3" : "none";
|
|
38217
38204
|
const isTopMu = topMuIds.has(node.id);
|
|
@@ -38219,14 +38206,14 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
|
|
|
38219
38206
|
let band;
|
|
38220
38207
|
if (mcOn) {
|
|
38221
38208
|
band = criticalityBand(r.criticality);
|
|
38222
|
-
if (band === null &&
|
|
38209
|
+
if (band === null && isCritical) band = "red";
|
|
38223
38210
|
} else {
|
|
38224
|
-
band =
|
|
38211
|
+
band = isCritical ? "red" : null;
|
|
38225
38212
|
}
|
|
38226
38213
|
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(
|
|
38227
38214
|
"data-group-id",
|
|
38228
38215
|
r.activity.groupId !== void 0 ? r.activity.groupId : ""
|
|
38229
|
-
).attr("data-critical-path", String(
|
|
38216
|
+
).attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
|
|
38230
38217
|
if (r.activity.tags) {
|
|
38231
38218
|
for (const [tagKey, tagValue] of Object.entries(r.activity.tags)) {
|
|
38232
38219
|
g.attr(`data-tag-${tagKey}`, String(tagValue).toLowerCase());
|
|
@@ -38536,69 +38523,6 @@ function computeAnchorPinSet(resolved) {
|
|
|
38536
38523
|
}
|
|
38537
38524
|
return pinned;
|
|
38538
38525
|
}
|
|
38539
|
-
function isCritical(el, mcOn) {
|
|
38540
|
-
if (mcOn) {
|
|
38541
|
-
return HIGHLIGHT_BANDS.has(el.getAttribute("data-criticality-band") ?? "");
|
|
38542
|
-
}
|
|
38543
|
-
return el.getAttribute("data-critical-path") === "true";
|
|
38544
|
-
}
|
|
38545
|
-
function isInHighlightSet(el, kind, mcOn) {
|
|
38546
|
-
if (kind === "critical") return isCritical(el, mcOn);
|
|
38547
|
-
if (kind === "milestone") {
|
|
38548
|
-
return el.getAttribute("data-milestone") === "true";
|
|
38549
|
-
}
|
|
38550
|
-
return el.hasAttribute("data-anchor");
|
|
38551
|
-
}
|
|
38552
|
-
function highlightPertSet(container, kind) {
|
|
38553
|
-
const svg = container.querySelector("svg");
|
|
38554
|
-
if (!svg) return;
|
|
38555
|
-
const mcOn = Array.from(svg.querySelectorAll(".pert-edge")).some((e) => {
|
|
38556
|
-
const b = e.getAttribute("data-criticality-band");
|
|
38557
|
-
return b !== null && b !== "" && b !== "red";
|
|
38558
|
-
});
|
|
38559
|
-
const candidates = svg.querySelectorAll(
|
|
38560
|
-
".pert-node, .pert-edge, .pert-group-collapsed"
|
|
38561
|
-
);
|
|
38562
|
-
let anyMatch = false;
|
|
38563
|
-
for (const el of candidates) {
|
|
38564
|
-
if (isInHighlightSet(el, kind, mcOn)) {
|
|
38565
|
-
anyMatch = true;
|
|
38566
|
-
break;
|
|
38567
|
-
}
|
|
38568
|
-
}
|
|
38569
|
-
if (!anyMatch) return;
|
|
38570
|
-
svg.setAttribute("data-pert-highlight-active", kind);
|
|
38571
|
-
for (const el of svg.querySelectorAll(".pert-node, .pert-edge")) {
|
|
38572
|
-
el.setAttribute(
|
|
38573
|
-
"opacity",
|
|
38574
|
-
isInHighlightSet(el, kind, mcOn) ? "1" : String(FADE_OPACITY)
|
|
38575
|
-
);
|
|
38576
|
-
}
|
|
38577
|
-
for (const el of svg.querySelectorAll(".pert-group")) {
|
|
38578
|
-
const inSet = el.classList.contains("pert-group-collapsed") && isInHighlightSet(el, kind, mcOn);
|
|
38579
|
-
el.setAttribute(
|
|
38580
|
-
"opacity",
|
|
38581
|
-
inSet ? "1" : String(FADE_OPACITY)
|
|
38582
|
-
);
|
|
38583
|
-
}
|
|
38584
|
-
}
|
|
38585
|
-
function highlightPertCriticalPath(container) {
|
|
38586
|
-
highlightPertSet(container, "critical");
|
|
38587
|
-
}
|
|
38588
|
-
function resetPertHighlight(container) {
|
|
38589
|
-
const svg = container.querySelector("svg");
|
|
38590
|
-
if (!svg) return;
|
|
38591
|
-
svg.removeAttribute("data-pert-highlight-active");
|
|
38592
|
-
svg.removeAttribute("data-critical-path-active");
|
|
38593
|
-
for (const el of svg.querySelectorAll(
|
|
38594
|
-
".pert-node, .pert-edge, .pert-group"
|
|
38595
|
-
)) {
|
|
38596
|
-
el.removeAttribute("opacity");
|
|
38597
|
-
}
|
|
38598
|
-
}
|
|
38599
|
-
function resetPertCriticalPath(container) {
|
|
38600
|
-
resetPertHighlight(container);
|
|
38601
|
-
}
|
|
38602
38526
|
function anchorAnnotationText(resolved) {
|
|
38603
38527
|
const anchor = resolved.options.anchor;
|
|
38604
38528
|
if (anchor === null) return null;
|
|
@@ -38651,70 +38575,6 @@ function renderCaptionBlock(svg, bullets, args) {
|
|
|
38651
38575
|
if (i > 0) tspan.attr("dy", CAPTION_LINE_HEIGHT);
|
|
38652
38576
|
});
|
|
38653
38577
|
}
|
|
38654
|
-
function pertLegendEntries(resolved) {
|
|
38655
|
-
const entries = [];
|
|
38656
|
-
if (resolved.activities.length > 0) {
|
|
38657
|
-
entries.push({ kind: "critical", label: "Critical Path" });
|
|
38658
|
-
}
|
|
38659
|
-
if (resolved.options.anchor !== null) {
|
|
38660
|
-
entries.push({ kind: "anchor", label: "Anchor" });
|
|
38661
|
-
}
|
|
38662
|
-
if (resolved.activities.some((a) => a.activity.isMilestone)) {
|
|
38663
|
-
entries.push({ kind: "milestone", label: "Milestone" });
|
|
38664
|
-
}
|
|
38665
|
-
return entries;
|
|
38666
|
-
}
|
|
38667
|
-
function legendSwatchWidth(kind) {
|
|
38668
|
-
if (kind === "critical") return LEGEND_DOT_R * 2;
|
|
38669
|
-
if (kind === "anchor") return PIN_ICON_W;
|
|
38670
|
-
return LEGEND_FONT_SIZE;
|
|
38671
|
-
}
|
|
38672
|
-
function legendPillWidth(entry) {
|
|
38673
|
-
const labelW = measureLegendText(entry.label, LEGEND_FONT_SIZE);
|
|
38674
|
-
return Math.ceil(
|
|
38675
|
-
LEGEND_PILL_PADDING_X + legendSwatchWidth(entry.kind) + LEGEND_SWATCH_GAP + labelW + LEGEND_PILL_PADDING_X
|
|
38676
|
-
);
|
|
38677
|
-
}
|
|
38678
|
-
function legendNaturalWidth(entries) {
|
|
38679
|
-
if (entries.length === 0) return 0;
|
|
38680
|
-
let total = 0;
|
|
38681
|
-
for (const e of entries) total += legendPillWidth(e);
|
|
38682
|
-
total += (entries.length - 1) * LEGEND_PILL_GAP;
|
|
38683
|
-
return total;
|
|
38684
|
-
}
|
|
38685
|
-
function pertLegendBlockWidth(entries) {
|
|
38686
|
-
return legendNaturalWidth(entries);
|
|
38687
|
-
}
|
|
38688
|
-
function renderLegendBlock(svg, entries, args) {
|
|
38689
|
-
if (entries.length === 0) return;
|
|
38690
|
-
const { x, y, width, palette, isDark } = args;
|
|
38691
|
-
const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
|
|
38692
|
-
const block = svg.append("g").attr("class", "pert-legend").attr("data-pert-legend", "");
|
|
38693
|
-
const totalW = legendNaturalWidth(entries);
|
|
38694
|
-
let pillX = x + (width - totalW) / 2;
|
|
38695
|
-
for (const entry of entries) {
|
|
38696
|
-
const pillW = legendPillWidth(entry);
|
|
38697
|
-
const pill = block.append("g").attr("class", "pert-legend-entry").attr("data-legend-entry", entry.kind).attr("transform", `translate(${pillX}, ${y})`).style("cursor", "pointer");
|
|
38698
|
-
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);
|
|
38699
|
-
const swatchW = legendSwatchWidth(entry.kind);
|
|
38700
|
-
const swatchCx = LEGEND_PILL_PADDING_X + swatchW / 2;
|
|
38701
|
-
const swatchCy = LEGEND_PILL_HEIGHT / 2;
|
|
38702
|
-
if (entry.kind === "critical") {
|
|
38703
|
-
pill.append("circle").attr("class", "pert-legend-swatch").attr("cx", swatchCx).attr("cy", swatchCy).attr("r", LEGEND_DOT_R).attr("fill", palette.colors.red);
|
|
38704
|
-
} else if (entry.kind === "anchor") {
|
|
38705
|
-
drawAnchorPin(
|
|
38706
|
-
pill,
|
|
38707
|
-
swatchCx - PIN_ICON_W / 2,
|
|
38708
|
-
swatchCy,
|
|
38709
|
-
palette.textMuted
|
|
38710
|
-
);
|
|
38711
|
-
} else {
|
|
38712
|
-
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");
|
|
38713
|
-
}
|
|
38714
|
-
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);
|
|
38715
|
-
pillX += pillW + LEGEND_PILL_GAP;
|
|
38716
|
-
}
|
|
38717
|
-
}
|
|
38718
38578
|
function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
38719
38579
|
if (resolved.tagGroups.length === 0) return;
|
|
38720
38580
|
const { x, y, width, activeGroup, exportMode } = args;
|
|
@@ -39161,7 +39021,7 @@ function formatScurveDate(iso) {
|
|
|
39161
39021
|
if (month < 0 || month > 11 || isNaN(day)) return iso;
|
|
39162
39022
|
return `${SCURVE_MONTH_NAMES[month]} ${day}`;
|
|
39163
39023
|
}
|
|
39164
|
-
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,
|
|
39024
|
+
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;
|
|
39165
39025
|
var init_renderer11 = __esm({
|
|
39166
39026
|
"src/pert/renderer.ts"() {
|
|
39167
39027
|
"use strict";
|
|
@@ -39192,15 +39052,10 @@ var init_renderer11 = __esm({
|
|
|
39192
39052
|
CONTAINER_LABEL_FONT_SIZE3 = 13;
|
|
39193
39053
|
CONTAINER_HEADER_HEIGHT3 = 28;
|
|
39194
39054
|
COLLAPSE_BAR_HEIGHT7 = 6;
|
|
39195
|
-
FADE_OPACITY = 0.15;
|
|
39196
39055
|
DURATION_FADE_OPACITY = 0.55;
|
|
39197
39056
|
PIN_ICON_W = 13;
|
|
39198
39057
|
PIN_ICON_H = 13;
|
|
39199
39058
|
LEGEND_PILL_HEIGHT = LEGEND_HEIGHT;
|
|
39200
|
-
LEGEND_PILL_PADDING_X = 8;
|
|
39201
|
-
LEGEND_PILL_GAP = 8;
|
|
39202
|
-
LEGEND_SWATCH_GAP = LEGEND_ENTRY_DOT_GAP;
|
|
39203
|
-
LEGEND_FONT_SIZE = LEGEND_PILL_FONT_SIZE;
|
|
39204
39059
|
LEGEND_TOP_GAP = 12;
|
|
39205
39060
|
LEGEND_BOTTOM_GAP = 12;
|
|
39206
39061
|
FIELD_LEGEND_HEADER_BAND_HEIGHT = 26;
|
|
@@ -39237,7 +39092,6 @@ var init_renderer11 = __esm({
|
|
|
39237
39092
|
];
|
|
39238
39093
|
lineGenerator6 = d3Shape8.line().x((d) => d.x).y((d) => d.y).curve(d3Shape8.curveBasis);
|
|
39239
39094
|
FIELD_LEGEND_MIN_W = 220;
|
|
39240
|
-
HIGHLIGHT_BANDS = /* @__PURE__ */ new Set(["red", "orange", "yellow"]);
|
|
39241
39095
|
SUB_BULLET_INDENT = 20;
|
|
39242
39096
|
CAPTION_HEADER_BAND_HEIGHT = CAPTION_LINE_HEIGHT + 8;
|
|
39243
39097
|
TORNADO_TOP_N = 10;
|
|
@@ -39257,7 +39111,6 @@ var init_renderer11 = __esm({
|
|
|
39257
39111
|
SCURVE_PLOT_PADDING_BOTTOM = 44;
|
|
39258
39112
|
SCURVE_TICK_FONT_SIZE = 13;
|
|
39259
39113
|
SCURVE_PERCENTILE_RADIUS = 4;
|
|
39260
|
-
PERT_LEGEND_PILL_HEIGHT = LEGEND_PILL_HEIGHT;
|
|
39261
39114
|
DAYS_PER_UNIT = {
|
|
39262
39115
|
min: 1 / (60 * 24),
|
|
39263
39116
|
h: 1 / 24,
|
|
@@ -40782,31 +40635,31 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
40782
40635
|
todayHoverG.on("mouseenter", () => {
|
|
40783
40636
|
g.selectAll(".gantt-task").attr(
|
|
40784
40637
|
"opacity",
|
|
40785
|
-
|
|
40638
|
+
FADE_OPACITY
|
|
40786
40639
|
);
|
|
40787
40640
|
g.selectAll(".gantt-milestone").attr(
|
|
40788
40641
|
"opacity",
|
|
40789
|
-
|
|
40642
|
+
FADE_OPACITY
|
|
40790
40643
|
);
|
|
40791
40644
|
g.selectAll(
|
|
40792
40645
|
".gantt-group-bar, .gantt-group-summary"
|
|
40793
|
-
).attr("opacity",
|
|
40794
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
40795
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
40796
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
40646
|
+
).attr("opacity", FADE_OPACITY);
|
|
40647
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
40648
|
+
svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
|
|
40649
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
40797
40650
|
g.selectAll(
|
|
40798
40651
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
40799
|
-
).attr("opacity",
|
|
40652
|
+
).attr("opacity", FADE_OPACITY);
|
|
40800
40653
|
g.selectAll(
|
|
40801
40654
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
40802
|
-
).attr("opacity",
|
|
40655
|
+
).attr("opacity", FADE_OPACITY);
|
|
40803
40656
|
g.selectAll(".gantt-era-group").attr(
|
|
40804
40657
|
"opacity",
|
|
40805
|
-
|
|
40658
|
+
FADE_OPACITY
|
|
40806
40659
|
);
|
|
40807
40660
|
g.selectAll(".gantt-marker-group").attr(
|
|
40808
40661
|
"opacity",
|
|
40809
|
-
|
|
40662
|
+
FADE_OPACITY
|
|
40810
40663
|
);
|
|
40811
40664
|
showGanttDateIndicators(
|
|
40812
40665
|
g,
|
|
@@ -41038,28 +40891,28 @@ function applyCriticalPathHighlight(svg, chartG) {
|
|
|
41038
40891
|
const el = d3Selection13.select(this);
|
|
41039
40892
|
el.attr(
|
|
41040
40893
|
"opacity",
|
|
41041
|
-
el.attr("data-critical-path") === "true" ? 1 :
|
|
40894
|
+
el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
|
|
41042
40895
|
);
|
|
41043
40896
|
});
|
|
41044
|
-
chartG.selectAll(".gantt-milestone").attr("opacity",
|
|
41045
|
-
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity",
|
|
40897
|
+
chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
|
|
40898
|
+
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
|
|
41046
40899
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41047
40900
|
const el = d3Selection13.select(this);
|
|
41048
40901
|
el.attr(
|
|
41049
40902
|
"opacity",
|
|
41050
|
-
el.attr("data-critical-path") === "true" ? 1 :
|
|
40903
|
+
el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
|
|
41051
40904
|
);
|
|
41052
40905
|
});
|
|
41053
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41054
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41055
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41056
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41057
|
-
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity",
|
|
40906
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
40907
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
40908
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
40909
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
40910
|
+
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
|
|
41058
40911
|
chartG.selectAll(".gantt-dep-arrow, .gantt-dep-arrowhead").each(function() {
|
|
41059
40912
|
const el = d3Selection13.select(this);
|
|
41060
40913
|
el.attr(
|
|
41061
40914
|
"opacity",
|
|
41062
|
-
el.attr("data-critical-path") === "true" ? 0.7 :
|
|
40915
|
+
el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY
|
|
41063
40916
|
);
|
|
41064
40917
|
});
|
|
41065
40918
|
}
|
|
@@ -41238,27 +41091,27 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
41238
41091
|
const el = d3Selection13.select(this);
|
|
41239
41092
|
el.attr(
|
|
41240
41093
|
"opacity",
|
|
41241
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41094
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41242
41095
|
);
|
|
41243
41096
|
});
|
|
41244
|
-
chartG.selectAll(".gantt-milestone").attr("opacity",
|
|
41245
|
-
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity",
|
|
41097
|
+
chartG.selectAll(".gantt-milestone").attr("opacity", FADE_OPACITY);
|
|
41098
|
+
chartG.selectAll(".gantt-group-bar, .gantt-group-summary").attr("opacity", FADE_OPACITY);
|
|
41246
41099
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41247
41100
|
const el = d3Selection13.select(this);
|
|
41248
41101
|
el.attr(
|
|
41249
41102
|
"opacity",
|
|
41250
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41103
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41251
41104
|
);
|
|
41252
41105
|
});
|
|
41253
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41106
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41254
41107
|
svg.selectAll(".gantt-lane-header").each(function() {
|
|
41255
41108
|
const el = d3Selection13.select(this);
|
|
41256
41109
|
el.attr(
|
|
41257
41110
|
"opacity",
|
|
41258
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41111
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41259
41112
|
);
|
|
41260
41113
|
});
|
|
41261
|
-
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity",
|
|
41114
|
+
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
|
|
41262
41115
|
} else {
|
|
41263
41116
|
if (criticalPathActive) {
|
|
41264
41117
|
applyCriticalPathHighlight(svg, chartG);
|
|
@@ -41363,27 +41216,27 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
|
|
|
41363
41216
|
eraG.on("mouseenter", () => {
|
|
41364
41217
|
g.selectAll(".gantt-task").attr(
|
|
41365
41218
|
"opacity",
|
|
41366
|
-
|
|
41219
|
+
FADE_OPACITY
|
|
41367
41220
|
);
|
|
41368
41221
|
g.selectAll(".gantt-milestone").attr(
|
|
41369
41222
|
"opacity",
|
|
41370
|
-
|
|
41223
|
+
FADE_OPACITY
|
|
41371
41224
|
);
|
|
41372
41225
|
g.selectAll(
|
|
41373
41226
|
".gantt-group-bar, .gantt-group-summary"
|
|
41374
|
-
).attr("opacity",
|
|
41375
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41376
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
41377
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41227
|
+
).attr("opacity", FADE_OPACITY);
|
|
41228
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41229
|
+
svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
|
|
41230
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41378
41231
|
g.selectAll(
|
|
41379
41232
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41380
|
-
).attr("opacity",
|
|
41233
|
+
).attr("opacity", FADE_OPACITY);
|
|
41381
41234
|
g.selectAll(
|
|
41382
41235
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41383
|
-
).attr("opacity",
|
|
41236
|
+
).attr("opacity", FADE_OPACITY);
|
|
41384
41237
|
g.selectAll(".gantt-marker-group").attr(
|
|
41385
41238
|
"opacity",
|
|
41386
|
-
|
|
41239
|
+
FADE_OPACITY
|
|
41387
41240
|
);
|
|
41388
41241
|
eraRect.attr("opacity", hoverEraOpacity);
|
|
41389
41242
|
if (eraTruncated) eraLabel.text(era.label);
|
|
@@ -41441,31 +41294,31 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
|
|
|
41441
41294
|
markerG.on("mouseenter", () => {
|
|
41442
41295
|
g.selectAll(".gantt-task").attr(
|
|
41443
41296
|
"opacity",
|
|
41444
|
-
|
|
41297
|
+
FADE_OPACITY
|
|
41445
41298
|
);
|
|
41446
41299
|
g.selectAll(".gantt-milestone").attr(
|
|
41447
41300
|
"opacity",
|
|
41448
|
-
|
|
41301
|
+
FADE_OPACITY
|
|
41449
41302
|
);
|
|
41450
41303
|
g.selectAll(
|
|
41451
41304
|
".gantt-group-bar, .gantt-group-summary"
|
|
41452
|
-
).attr("opacity",
|
|
41453
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41454
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
41455
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41305
|
+
).attr("opacity", FADE_OPACITY);
|
|
41306
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41307
|
+
svg.selectAll(".gantt-task-label").attr("opacity", FADE_OPACITY);
|
|
41308
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41456
41309
|
g.selectAll(
|
|
41457
41310
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41458
|
-
).attr("opacity",
|
|
41311
|
+
).attr("opacity", FADE_OPACITY);
|
|
41459
41312
|
g.selectAll(
|
|
41460
41313
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41461
|
-
).attr("opacity",
|
|
41314
|
+
).attr("opacity", FADE_OPACITY);
|
|
41462
41315
|
g.selectAll(".gantt-era-group").attr(
|
|
41463
41316
|
"opacity",
|
|
41464
|
-
|
|
41317
|
+
FADE_OPACITY
|
|
41465
41318
|
);
|
|
41466
41319
|
g.selectAll(".gantt-marker-group").attr(
|
|
41467
41320
|
"opacity",
|
|
41468
|
-
|
|
41321
|
+
FADE_OPACITY
|
|
41469
41322
|
);
|
|
41470
41323
|
markerG.attr("opacity", 1);
|
|
41471
41324
|
markerLine.attr("opacity", 0.8);
|
|
@@ -41541,7 +41394,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41541
41394
|
const id = el.attr("data-task-id");
|
|
41542
41395
|
el.attr(
|
|
41543
41396
|
"opacity",
|
|
41544
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41397
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41545
41398
|
);
|
|
41546
41399
|
});
|
|
41547
41400
|
g.selectAll(".gantt-milestone").each(function() {
|
|
@@ -41549,7 +41402,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41549
41402
|
const id = el.attr("data-task-id");
|
|
41550
41403
|
el.attr(
|
|
41551
41404
|
"opacity",
|
|
41552
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41405
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41553
41406
|
);
|
|
41554
41407
|
});
|
|
41555
41408
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
@@ -41557,7 +41410,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41557
41410
|
const id = el.attr("data-task-id");
|
|
41558
41411
|
el.attr(
|
|
41559
41412
|
"opacity",
|
|
41560
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41413
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41561
41414
|
);
|
|
41562
41415
|
});
|
|
41563
41416
|
g.selectAll(
|
|
@@ -41567,7 +41420,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41567
41420
|
const name = el.attr("data-group");
|
|
41568
41421
|
el.attr(
|
|
41569
41422
|
"opacity",
|
|
41570
|
-
name && overlappingGroupNames.has(name) ? 1 :
|
|
41423
|
+
name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
|
|
41571
41424
|
);
|
|
41572
41425
|
});
|
|
41573
41426
|
svg.selectAll(".gantt-group-label").each(function() {
|
|
@@ -41575,19 +41428,19 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41575
41428
|
const name = el.attr("data-group");
|
|
41576
41429
|
el.attr(
|
|
41577
41430
|
"opacity",
|
|
41578
|
-
name && overlappingGroupNames.has(name) ? 1 :
|
|
41431
|
+
name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
|
|
41579
41432
|
);
|
|
41580
41433
|
});
|
|
41581
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41434
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41582
41435
|
g.selectAll(
|
|
41583
41436
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41584
|
-
).attr("opacity",
|
|
41437
|
+
).attr("opacity", FADE_OPACITY);
|
|
41585
41438
|
g.selectAll(
|
|
41586
41439
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41587
|
-
).attr("opacity",
|
|
41440
|
+
).attr("opacity", FADE_OPACITY);
|
|
41588
41441
|
g.selectAll(".gantt-marker-group").attr(
|
|
41589
41442
|
"opacity",
|
|
41590
|
-
|
|
41443
|
+
FADE_OPACITY
|
|
41591
41444
|
);
|
|
41592
41445
|
sprintRect.attr("opacity", SPRINT_HOVER_OPACITY);
|
|
41593
41446
|
const startVisible = rawSx >= chartMinX;
|
|
@@ -41656,20 +41509,20 @@ function highlightDeps(g, svg, taskId, resolved) {
|
|
|
41656
41509
|
g.selectAll(".gantt-task").each(function() {
|
|
41657
41510
|
const el = d3Selection13.select(this);
|
|
41658
41511
|
const id = el.attr("data-task-id");
|
|
41659
|
-
el.attr("opacity", id && related.has(id) ? 1 :
|
|
41512
|
+
el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY);
|
|
41660
41513
|
});
|
|
41661
41514
|
g.selectAll(".gantt-milestone").attr(
|
|
41662
41515
|
"opacity",
|
|
41663
|
-
|
|
41516
|
+
FADE_OPACITY
|
|
41664
41517
|
);
|
|
41665
41518
|
g.selectAll(
|
|
41666
41519
|
".gantt-group-bar, .gantt-group-summary"
|
|
41667
|
-
).attr("opacity",
|
|
41668
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41669
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41520
|
+
).attr("opacity", FADE_OPACITY);
|
|
41521
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41522
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41670
41523
|
g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
|
|
41671
41524
|
"opacity",
|
|
41672
|
-
|
|
41525
|
+
FADE_OPACITY
|
|
41673
41526
|
);
|
|
41674
41527
|
g.selectAll(
|
|
41675
41528
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
@@ -41678,52 +41531,52 @@ function highlightDeps(g, svg, taskId, resolved) {
|
|
|
41678
41531
|
const from = el.attr("data-dep-from");
|
|
41679
41532
|
const to = el.attr("data-dep-to");
|
|
41680
41533
|
const isRelated = from && related.has(from) || to && related.has(to);
|
|
41681
|
-
el.attr("opacity", isRelated ? 0.5 :
|
|
41534
|
+
el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY);
|
|
41682
41535
|
});
|
|
41683
41536
|
g.selectAll(".gantt-marker-group").attr(
|
|
41684
41537
|
"opacity",
|
|
41685
|
-
|
|
41538
|
+
FADE_OPACITY
|
|
41686
41539
|
);
|
|
41687
41540
|
}
|
|
41688
41541
|
function highlightGroup(g, svg, groupName) {
|
|
41689
41542
|
g.selectAll(".gantt-task").each(function() {
|
|
41690
41543
|
const el = d3Selection13.select(this);
|
|
41691
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41544
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41692
41545
|
});
|
|
41693
41546
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41694
41547
|
const el = d3Selection13.select(this);
|
|
41695
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41548
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41696
41549
|
});
|
|
41697
41550
|
g.selectAll(
|
|
41698
41551
|
".gantt-group-bar, .gantt-group-summary"
|
|
41699
41552
|
).each(function() {
|
|
41700
41553
|
const el = d3Selection13.select(this);
|
|
41701
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41554
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41702
41555
|
});
|
|
41703
41556
|
svg.selectAll(".gantt-group-label").each(function() {
|
|
41704
41557
|
const el = d3Selection13.select(this);
|
|
41705
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41558
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41706
41559
|
});
|
|
41707
41560
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41708
41561
|
const el = d3Selection13.select(this);
|
|
41709
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41562
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41710
41563
|
});
|
|
41711
41564
|
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").each(function() {
|
|
41712
41565
|
const el = d3Selection13.select(this);
|
|
41713
41566
|
el.attr(
|
|
41714
41567
|
"opacity",
|
|
41715
|
-
el.attr("data-group") === groupName ? 1 :
|
|
41568
|
+
el.attr("data-group") === groupName ? 1 : FADE_OPACITY
|
|
41716
41569
|
);
|
|
41717
41570
|
});
|
|
41718
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41719
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41571
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41572
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
41720
41573
|
g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
|
|
41721
41574
|
"opacity",
|
|
41722
|
-
|
|
41575
|
+
FADE_OPACITY
|
|
41723
41576
|
);
|
|
41724
41577
|
g.selectAll(".gantt-marker-group").attr(
|
|
41725
41578
|
"opacity",
|
|
41726
|
-
|
|
41579
|
+
FADE_OPACITY
|
|
41727
41580
|
);
|
|
41728
41581
|
}
|
|
41729
41582
|
function highlightLane(g, svg, tagKey, laneName) {
|
|
@@ -41731,105 +41584,105 @@ function highlightLane(g, svg, tagKey, laneName) {
|
|
|
41731
41584
|
const laneValue = laneName.toLowerCase();
|
|
41732
41585
|
g.selectAll(".gantt-task").each(function() {
|
|
41733
41586
|
const el = d3Selection13.select(this);
|
|
41734
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41587
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41735
41588
|
});
|
|
41736
41589
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41737
41590
|
const el = d3Selection13.select(this);
|
|
41738
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41591
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41739
41592
|
});
|
|
41740
41593
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41741
41594
|
const el = d3Selection13.select(this);
|
|
41742
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41595
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41743
41596
|
});
|
|
41744
41597
|
svg.selectAll(".gantt-lane-header").each(function() {
|
|
41745
41598
|
const el = d3Selection13.select(this);
|
|
41746
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41599
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41747
41600
|
});
|
|
41748
41601
|
g.selectAll(".gantt-lane-band-group").each(function() {
|
|
41749
41602
|
const el = d3Selection13.select(this);
|
|
41750
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41603
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41751
41604
|
});
|
|
41752
41605
|
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").each(function() {
|
|
41753
41606
|
const el = d3Selection13.select(this);
|
|
41754
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41607
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41755
41608
|
});
|
|
41756
41609
|
g.selectAll(
|
|
41757
41610
|
".gantt-group-bar, .gantt-group-summary"
|
|
41758
|
-
).attr("opacity",
|
|
41759
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41760
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41611
|
+
).attr("opacity", FADE_OPACITY);
|
|
41612
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41613
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
41761
41614
|
g.selectAll(".gantt-marker-group").attr(
|
|
41762
41615
|
"opacity",
|
|
41763
|
-
|
|
41616
|
+
FADE_OPACITY
|
|
41764
41617
|
);
|
|
41765
41618
|
}
|
|
41766
41619
|
function highlightTask(g, svg, taskId) {
|
|
41767
41620
|
g.selectAll(".gantt-task").each(function() {
|
|
41768
41621
|
const el = d3Selection13.select(this);
|
|
41769
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41622
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41770
41623
|
});
|
|
41771
41624
|
g.selectAll(".gantt-milestone").attr(
|
|
41772
41625
|
"opacity",
|
|
41773
|
-
|
|
41626
|
+
FADE_OPACITY
|
|
41774
41627
|
);
|
|
41775
41628
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41776
41629
|
const el = d3Selection13.select(this);
|
|
41777
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41630
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41778
41631
|
});
|
|
41779
41632
|
g.selectAll(
|
|
41780
41633
|
".gantt-group-bar, .gantt-group-summary"
|
|
41781
|
-
).attr("opacity",
|
|
41782
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41783
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41784
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41785
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41634
|
+
).attr("opacity", FADE_OPACITY);
|
|
41635
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41636
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
41637
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41638
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
41786
41639
|
g.selectAll(
|
|
41787
41640
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41788
|
-
).attr("opacity",
|
|
41641
|
+
).attr("opacity", FADE_OPACITY);
|
|
41789
41642
|
g.selectAll(
|
|
41790
41643
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41791
|
-
).attr("opacity",
|
|
41644
|
+
).attr("opacity", FADE_OPACITY);
|
|
41792
41645
|
g.selectAll(".gantt-marker-group").attr(
|
|
41793
41646
|
"opacity",
|
|
41794
|
-
|
|
41647
|
+
FADE_OPACITY
|
|
41795
41648
|
);
|
|
41796
41649
|
}
|
|
41797
41650
|
function highlightMilestone(g, svg, taskId) {
|
|
41798
41651
|
g.selectAll(".gantt-task").attr(
|
|
41799
41652
|
"opacity",
|
|
41800
|
-
|
|
41653
|
+
FADE_OPACITY
|
|
41801
41654
|
);
|
|
41802
41655
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41803
41656
|
const el = d3Selection13.select(this);
|
|
41804
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41657
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41805
41658
|
});
|
|
41806
41659
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41807
41660
|
const el = d3Selection13.select(this);
|
|
41808
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41661
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41809
41662
|
});
|
|
41810
41663
|
g.selectAll(
|
|
41811
41664
|
".gantt-group-bar, .gantt-group-summary"
|
|
41812
|
-
).attr("opacity",
|
|
41813
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41814
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41815
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41816
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41665
|
+
).attr("opacity", FADE_OPACITY);
|
|
41666
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41667
|
+
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity", FADE_OPACITY);
|
|
41668
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41669
|
+
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity", FADE_OPACITY);
|
|
41817
41670
|
g.selectAll(
|
|
41818
41671
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41819
|
-
).attr("opacity",
|
|
41672
|
+
).attr("opacity", FADE_OPACITY);
|
|
41820
41673
|
g.selectAll(
|
|
41821
41674
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41822
|
-
).attr("opacity",
|
|
41675
|
+
).attr("opacity", FADE_OPACITY);
|
|
41823
41676
|
g.selectAll(".gantt-marker-group").attr(
|
|
41824
41677
|
"opacity",
|
|
41825
|
-
|
|
41678
|
+
FADE_OPACITY
|
|
41826
41679
|
);
|
|
41827
41680
|
}
|
|
41828
41681
|
function highlightTaskLabel(svg, lineNumber) {
|
|
41829
41682
|
const ln = String(lineNumber);
|
|
41830
41683
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41831
41684
|
const el = d3Selection13.select(this);
|
|
41832
|
-
el.attr("opacity", el.attr("data-line-number") === ln ? 1 :
|
|
41685
|
+
el.attr("opacity", el.attr("data-line-number") === ln ? 1 : FADE_OPACITY);
|
|
41833
41686
|
});
|
|
41834
41687
|
}
|
|
41835
41688
|
function resetTaskLabels(svg) {
|
|
@@ -42103,7 +41956,7 @@ function renderTimeScaleHorizontal(g, scale, _innerWidth, innerHeight, textColor
|
|
|
42103
41956
|
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);
|
|
42104
41957
|
}
|
|
42105
41958
|
}
|
|
42106
|
-
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,
|
|
41959
|
+
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;
|
|
42107
41960
|
var init_renderer12 = __esm({
|
|
42108
41961
|
"src/gantt/renderer.ts"() {
|
|
42109
41962
|
"use strict";
|
|
@@ -42146,7 +41999,7 @@ var init_renderer12 = __esm({
|
|
|
42146
41999
|
SPRINT_BAND_OPACITY = 0.05;
|
|
42147
42000
|
SPRINT_HOVER_OPACITY = 0.12;
|
|
42148
42001
|
SPRINT_BOUNDARY_OPACITY = 0.3;
|
|
42149
|
-
|
|
42002
|
+
FADE_OPACITY = 0.1;
|
|
42150
42003
|
MONTH_ABBR2 = [
|
|
42151
42004
|
"Jan",
|
|
42152
42005
|
"Feb",
|
|
@@ -47461,7 +47314,8 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
47461
47314
|
palette.bg,
|
|
47462
47315
|
mutedBasemap ? isDark ? MUTED_FOREIGN_DARK : MUTED_FOREIGN_LIGHT : isDark ? FOREIGN_TINT_DARK : FOREIGN_TINT_LIGHT
|
|
47463
47316
|
);
|
|
47464
|
-
const
|
|
47317
|
+
const hasDirectColor = resolved.regions.some((r) => r.color !== void 0);
|
|
47318
|
+
const colorizeActive = resolved.directives.noColorize !== true && !hasRamp && !hasDirectColor && resolved.tagGroups.length === 0;
|
|
47465
47319
|
const colorByIso = /* @__PURE__ */ new Map();
|
|
47466
47320
|
if (colorizeActive) {
|
|
47467
47321
|
const adjacency = /* @__PURE__ */ new Map();
|
|
@@ -47557,16 +47411,17 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
47557
47411
|
};
|
|
47558
47412
|
}
|
|
47559
47413
|
}
|
|
47414
|
+
const shownTitle = resolved.directives.noTitle ? null : resolved.title;
|
|
47560
47415
|
const TITLE_GAP2 = 16;
|
|
47561
47416
|
let topPad = FIT_PAD;
|
|
47562
|
-
if (
|
|
47417
|
+
if (shownTitle && resolved.pois.length > 0) {
|
|
47563
47418
|
const bannerBottom = (resolved.subtitle ? TITLE_Y + TITLE_FONT_SIZE : TITLE_Y) + TITLE_FONT_SIZE / 2;
|
|
47564
47419
|
topPad = Math.max(FIT_PAD, bannerBottom + TITLE_GAP2);
|
|
47565
47420
|
}
|
|
47566
47421
|
const legendBand = mapLegendBand(legend, {
|
|
47567
47422
|
width,
|
|
47568
47423
|
mode: opts.legendMode ?? "preview",
|
|
47569
|
-
hasTitle: Boolean(
|
|
47424
|
+
hasTitle: Boolean(shownTitle),
|
|
47570
47425
|
hasSubtitle: Boolean(resolved.subtitle)
|
|
47571
47426
|
});
|
|
47572
47427
|
if (legendBand > topPad) topPad = legendBand;
|
|
@@ -48655,7 +48510,7 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
48655
48510
|
width,
|
|
48656
48511
|
height,
|
|
48657
48512
|
background: water,
|
|
48658
|
-
title:
|
|
48513
|
+
title: shownTitle,
|
|
48659
48514
|
...resolved.subtitle !== void 0 && { subtitle: resolved.subtitle },
|
|
48660
48515
|
...resolved.caption !== void 0 && { caption: resolved.caption },
|
|
48661
48516
|
regions,
|
|
@@ -49065,9 +48920,10 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
|
|
|
49065
48920
|
wireSync(lt, leg.lineNumber);
|
|
49066
48921
|
}
|
|
49067
48922
|
});
|
|
48923
|
+
const clusterUi = !exportDims && !resolved.directives.noClusterPois;
|
|
49068
48924
|
const gSpider = svg.append("g").attr("class", "dgmo-map-spider");
|
|
49069
48925
|
for (const cl of layout.clusters) {
|
|
49070
|
-
if (
|
|
48926
|
+
if (clusterUi) {
|
|
49071
48927
|
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");
|
|
49072
48928
|
}
|
|
49073
48929
|
for (const leg of cl.legs) {
|
|
@@ -49159,13 +49015,18 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
|
|
|
49159
49015
|
}
|
|
49160
49016
|
wireSync(t, lab.lineNumber);
|
|
49161
49017
|
}
|
|
49162
|
-
if (
|
|
49018
|
+
if (clusterUi && layout.clusters.length) {
|
|
49163
49019
|
const gBadge = svg.append("g").attr("class", "dgmo-map-cluster-badges");
|
|
49164
49020
|
for (const cl of layout.clusters) {
|
|
49165
49021
|
const g = gBadge.append("g").attr("data-cluster", cl.id).style("opacity", 0).style("pointer-events", "none");
|
|
49166
49022
|
const R = 9;
|
|
49167
49023
|
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);
|
|
49168
49024
|
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);
|
|
49025
|
+
const beadR = R + 2.5;
|
|
49026
|
+
for (const leg of cl.legs) {
|
|
49027
|
+
const a = Math.atan2(leg.y2 - cl.cy, leg.x2 - cl.cx);
|
|
49028
|
+
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);
|
|
49029
|
+
}
|
|
49169
49030
|
emitText(
|
|
49170
49031
|
g,
|
|
49171
49032
|
cl.cx,
|
|
@@ -52091,10 +51952,12 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
52091
51952
|
isDark ? 15 : 20
|
|
52092
51953
|
) : isDark ? palette.surface : palette.bg;
|
|
52093
51954
|
const strokeColor = groupTagColor || palette.textMuted;
|
|
52094
|
-
const groupG = svg.append("g").attr("class", "group-box-wrapper").attr("data-group-toggle", "").attr("data-group-line", String(group.lineNumber)).attr("cursor", "pointer");
|
|
51955
|
+
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");
|
|
52095
51956
|
groupG.append("title").text("Click to collapse");
|
|
52096
|
-
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");
|
|
52097
|
-
groupG.append("
|
|
51957
|
+
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");
|
|
51958
|
+
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");
|
|
51959
|
+
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");
|
|
51960
|
+
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);
|
|
52098
51961
|
}
|
|
52099
51962
|
const lifelineStartY = lifelineStartY0;
|
|
52100
51963
|
participants.forEach((participant) => {
|
|
@@ -52136,7 +51999,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
52136
51999
|
const participantG = svg.select(
|
|
52137
52000
|
`.participant[data-participant-id="${participant.id}"]`
|
|
52138
52001
|
);
|
|
52139
|
-
participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("cursor", "pointer");
|
|
52002
|
+
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");
|
|
52140
52003
|
participantG.append("title").text("Click to expand");
|
|
52141
52004
|
const pFill = effectiveTagColor ? mix(
|
|
52142
52005
|
effectiveTagColor,
|
|
@@ -54115,7 +53978,7 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54115
53978
|
neighbors2.get(link.source).add(link.target);
|
|
54116
53979
|
neighbors2.get(link.target).add(link.source);
|
|
54117
53980
|
}
|
|
54118
|
-
const
|
|
53981
|
+
const FADE_OPACITY2 = 0.1;
|
|
54119
53982
|
function handleMouseEnter(hovered) {
|
|
54120
53983
|
const connected = neighbors2.get(hovered);
|
|
54121
53984
|
g.selectAll(".arc-link").each(function() {
|
|
@@ -54123,13 +53986,13 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54123
53986
|
const src = el.attr("data-source");
|
|
54124
53987
|
const tgt = el.attr("data-target");
|
|
54125
53988
|
const isRelated = src === hovered || tgt === hovered;
|
|
54126
|
-
el.attr("stroke-opacity", isRelated ? 0.85 :
|
|
53989
|
+
el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
|
|
54127
53990
|
});
|
|
54128
53991
|
g.selectAll(".arc-node").each(function() {
|
|
54129
53992
|
const el = d3Selection23.select(this);
|
|
54130
53993
|
const name = el.attr("data-node");
|
|
54131
53994
|
const isRelated = name === hovered || connected.has(name);
|
|
54132
|
-
el.attr("opacity", isRelated ? 1 :
|
|
53995
|
+
el.attr("opacity", isRelated ? 1 : FADE_OPACITY2);
|
|
54133
53996
|
});
|
|
54134
53997
|
}
|
|
54135
53998
|
function handleMouseLeave() {
|
|
@@ -54153,11 +54016,11 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54153
54016
|
g.selectAll(".arc-link").each(function() {
|
|
54154
54017
|
const el = d3Selection23.select(this);
|
|
54155
54018
|
const isRelated = members.has(el.attr("data-source")) || members.has(el.attr("data-target"));
|
|
54156
|
-
el.attr("stroke-opacity", isRelated ? 0.85 :
|
|
54019
|
+
el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
|
|
54157
54020
|
});
|
|
54158
54021
|
g.selectAll(".arc-node").each(function() {
|
|
54159
54022
|
const el = d3Selection23.select(this);
|
|
54160
|
-
el.attr("opacity", members.has(el.attr("data-node")) ? 1 :
|
|
54023
|
+
el.attr("opacity", members.has(el.attr("data-node")) ? 1 : FADE_OPACITY2);
|
|
54161
54024
|
});
|
|
54162
54025
|
g.selectAll(".arc-group-band").each(function() {
|
|
54163
54026
|
const el = d3Selection23.select(this);
|
|
@@ -54679,23 +54542,23 @@ function setupTimeline(container, parsed, palette, isDark, exportDims, activeTag
|
|
|
54679
54542
|
};
|
|
54680
54543
|
}
|
|
54681
54544
|
function makeTimelineHoverHelpers() {
|
|
54682
|
-
const
|
|
54545
|
+
const FADE_OPACITY2 = 0.1;
|
|
54683
54546
|
function fadeToGroup(g, groupName) {
|
|
54684
54547
|
g.selectAll(".tl-event").each(function() {
|
|
54685
54548
|
const el = d3Selection23.select(this);
|
|
54686
54549
|
const evGroup = el.attr("data-group");
|
|
54687
|
-
el.attr("opacity", evGroup === groupName ? 1 :
|
|
54550
|
+
el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY2);
|
|
54688
54551
|
});
|
|
54689
54552
|
g.selectAll(".tl-legend-item, .tl-lane-header").each(
|
|
54690
54553
|
function() {
|
|
54691
54554
|
const el = d3Selection23.select(this);
|
|
54692
54555
|
const name = el.attr("data-group");
|
|
54693
|
-
el.attr("opacity", name === groupName ? 1 :
|
|
54556
|
+
el.attr("opacity", name === groupName ? 1 : FADE_OPACITY2);
|
|
54694
54557
|
}
|
|
54695
54558
|
);
|
|
54696
54559
|
g.selectAll(".tl-marker").attr(
|
|
54697
54560
|
"opacity",
|
|
54698
|
-
|
|
54561
|
+
FADE_OPACITY2
|
|
54699
54562
|
);
|
|
54700
54563
|
}
|
|
54701
54564
|
function fadeToEra(g, eraStart, eraEnd) {
|
|
@@ -54705,40 +54568,40 @@ function makeTimelineHoverHelpers() {
|
|
|
54705
54568
|
const endDate = el.attr("data-end-date");
|
|
54706
54569
|
const evEnd = endDate ? parseFloat(endDate) : date;
|
|
54707
54570
|
const inside = evEnd >= eraStart && date <= eraEnd;
|
|
54708
|
-
el.attr("opacity", inside ? 1 :
|
|
54571
|
+
el.attr("opacity", inside ? 1 : FADE_OPACITY2);
|
|
54709
54572
|
});
|
|
54710
54573
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54711
54574
|
"opacity",
|
|
54712
|
-
|
|
54575
|
+
FADE_OPACITY2
|
|
54713
54576
|
);
|
|
54714
54577
|
g.selectAll(".tl-era").each(function() {
|
|
54715
54578
|
const el = d3Selection23.select(this);
|
|
54716
54579
|
const s = parseFloat(el.attr("data-era-start"));
|
|
54717
54580
|
const e = parseFloat(el.attr("data-era-end"));
|
|
54718
54581
|
const isSelf = s === eraStart && e === eraEnd;
|
|
54719
|
-
el.attr("opacity", isSelf ? 1 :
|
|
54582
|
+
el.attr("opacity", isSelf ? 1 : FADE_OPACITY2);
|
|
54720
54583
|
});
|
|
54721
54584
|
g.selectAll(".tl-marker").each(function() {
|
|
54722
54585
|
const el = d3Selection23.select(this);
|
|
54723
54586
|
const date = parseFloat(el.attr("data-marker-date"));
|
|
54724
54587
|
const inside = date >= eraStart && date <= eraEnd;
|
|
54725
|
-
el.attr("opacity", inside ? 1 :
|
|
54588
|
+
el.attr("opacity", inside ? 1 : FADE_OPACITY2);
|
|
54726
54589
|
});
|
|
54727
54590
|
}
|
|
54728
54591
|
function fadeToMarker(g, markerDate) {
|
|
54729
54592
|
g.selectAll(".tl-event").attr(
|
|
54730
54593
|
"opacity",
|
|
54731
|
-
|
|
54594
|
+
FADE_OPACITY2
|
|
54732
54595
|
);
|
|
54733
|
-
g.selectAll(".tl-era").attr("opacity",
|
|
54596
|
+
g.selectAll(".tl-era").attr("opacity", FADE_OPACITY2);
|
|
54734
54597
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54735
54598
|
"opacity",
|
|
54736
|
-
|
|
54599
|
+
FADE_OPACITY2
|
|
54737
54600
|
);
|
|
54738
54601
|
g.selectAll(".tl-marker").each(function() {
|
|
54739
54602
|
const el = d3Selection23.select(this);
|
|
54740
54603
|
const date = parseFloat(el.attr("data-marker-date"));
|
|
54741
|
-
el.attr("opacity", date === markerDate ? 1 :
|
|
54604
|
+
el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY2);
|
|
54742
54605
|
});
|
|
54743
54606
|
}
|
|
54744
54607
|
function fadeReset(g) {
|
|
@@ -54752,15 +54615,15 @@ function makeTimelineHoverHelpers() {
|
|
|
54752
54615
|
g.selectAll(".tl-event").each(function() {
|
|
54753
54616
|
const el = d3Selection23.select(this);
|
|
54754
54617
|
const val = el.attr(attrName);
|
|
54755
|
-
el.attr("opacity", val === tagValue ? 1 :
|
|
54618
|
+
el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY2);
|
|
54756
54619
|
});
|
|
54757
54620
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54758
54621
|
"opacity",
|
|
54759
|
-
|
|
54622
|
+
FADE_OPACITY2
|
|
54760
54623
|
);
|
|
54761
54624
|
g.selectAll(".tl-marker").attr(
|
|
54762
54625
|
"opacity",
|
|
54763
|
-
|
|
54626
|
+
FADE_OPACITY2
|
|
54764
54627
|
);
|
|
54765
54628
|
g.selectAll(".tl-tag-legend-entry").each(function() {
|
|
54766
54629
|
const el = d3Selection23.select(this);
|
|
@@ -54769,7 +54632,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54769
54632
|
const entryGroup = el.attr("data-tag-group");
|
|
54770
54633
|
el.attr(
|
|
54771
54634
|
"opacity",
|
|
54772
|
-
entryGroup === tagKey && entryValue === tagValue ? 1 :
|
|
54635
|
+
entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY2
|
|
54773
54636
|
);
|
|
54774
54637
|
});
|
|
54775
54638
|
}
|
|
@@ -54779,7 +54642,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54779
54642
|
}
|
|
54780
54643
|
}
|
|
54781
54644
|
return {
|
|
54782
|
-
FADE_OPACITY:
|
|
54645
|
+
FADE_OPACITY: FADE_OPACITY2,
|
|
54783
54646
|
fadeToGroup,
|
|
54784
54647
|
fadeToEra,
|
|
54785
54648
|
fadeToMarker,
|
|
@@ -54791,7 +54654,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54791
54654
|
function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
|
|
54792
54655
|
if (parsed.timelineTagGroups.length === 0) return;
|
|
54793
54656
|
const { width, textColor, groupColorMap, solid } = setup;
|
|
54794
|
-
const { FADE_OPACITY:
|
|
54657
|
+
const { FADE_OPACITY: FADE_OPACITY2, fadeReset, fadeToTagValue } = hovers;
|
|
54795
54658
|
const title = parsed.noTitle ? null : parsed.title;
|
|
54796
54659
|
const { timelineEvents } = parsed;
|
|
54797
54660
|
const LG_HEIGHT = LEGEND_HEIGHT;
|
|
@@ -54881,7 +54744,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
|
|
|
54881
54744
|
const eg = el.attr("data-tag-group") ?? el.node()?.closest?.("[data-tag-group]")?.getAttribute("data-tag-group");
|
|
54882
54745
|
el.attr(
|
|
54883
54746
|
"opacity",
|
|
54884
|
-
eg === tagKey && ev === tagVal ? 1 :
|
|
54747
|
+
eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY2
|
|
54885
54748
|
);
|
|
54886
54749
|
});
|
|
54887
54750
|
} else {
|
|
@@ -57640,6 +57503,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
57640
57503
|
const { renderSequenceDiagram: renderSequenceDiagram2 } = await Promise.resolve().then(() => (init_renderer20(), renderer_exports20));
|
|
57641
57504
|
const seqParsed = parseSequenceDgmo2(content);
|
|
57642
57505
|
if (seqParsed.error || seqParsed.participants.length === 0) return "";
|
|
57506
|
+
const collapsedSections = viewState?.cs ? new Set(viewState.cs) : void 0;
|
|
57507
|
+
const collapsedGroups = viewState?.cg ? new Set(viewState.cg.map(Number).filter((n) => Number.isFinite(n))) : void 0;
|
|
57508
|
+
const seqActiveTagGroup = viewState?.tag ?? options?.tagGroup;
|
|
57643
57509
|
renderSequenceDiagram2(
|
|
57644
57510
|
container,
|
|
57645
57511
|
seqParsed,
|
|
@@ -57648,9 +57514,11 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
57648
57514
|
void 0,
|
|
57649
57515
|
{
|
|
57650
57516
|
exportWidth: EXPORT_WIDTH,
|
|
57651
|
-
...
|
|
57652
|
-
activeTagGroup:
|
|
57653
|
-
}
|
|
57517
|
+
...seqActiveTagGroup !== void 0 && {
|
|
57518
|
+
activeTagGroup: seqActiveTagGroup
|
|
57519
|
+
},
|
|
57520
|
+
...collapsedSections !== void 0 && { collapsedSections },
|
|
57521
|
+
...collapsedGroups !== void 0 && { collapsedGroups }
|
|
57654
57522
|
}
|
|
57655
57523
|
);
|
|
57656
57524
|
} else if (parsed.type === "wordcloud") {
|
|
@@ -58620,6 +58488,7 @@ var DIRECTIVE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
58620
58488
|
"no-region-labels",
|
|
58621
58489
|
"no-poi-labels",
|
|
58622
58490
|
"no-colorize",
|
|
58491
|
+
"no-cluster-pois",
|
|
58623
58492
|
"poi",
|
|
58624
58493
|
"route",
|
|
58625
58494
|
// Data charts
|
|
@@ -59289,7 +59158,7 @@ pre.dgmo, code.language-dgmo, pre > code.language-dgmo,
|
|
|
59289
59158
|
|
|
59290
59159
|
// src/auto/index.ts
|
|
59291
59160
|
init_safe_href();
|
|
59292
|
-
var VERSION = "0.25.
|
|
59161
|
+
var VERSION = "0.25.2";
|
|
59293
59162
|
var DEFAULTS = {
|
|
59294
59163
|
theme: "auto",
|
|
59295
59164
|
palette: "nord",
|