@diagrammo/dgmo 0.24.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/advanced.cjs +203 -351
- package/dist/advanced.d.cts +17 -80
- package/dist/advanced.d.ts +17 -80
- package/dist/advanced.js +203 -343
- package/dist/auto.cjs +201 -336
- package/dist/auto.js +118 -118
- package/dist/auto.mjs +201 -336
- package/dist/cli.cjs +156 -156
- 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 +218 -337
- package/dist/index.js +218 -337
- package/dist/internal.cjs +203 -351
- package/dist/internal.d.cts +17 -80
- package/dist/internal.d.ts +17 -80
- package/dist/internal.js +203 -343
- package/package.json +1 -1
- package/src/advanced.ts +0 -8
- package/src/completion.ts +5 -0
- package/src/d3.ts +12 -2
- package/src/diagnostics.ts +0 -19
- package/src/editor/keywords.ts +1 -0
- package/src/map/geo.ts +0 -5
- 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/parser.ts +0 -4
- package/src/sequence/renderer.ts +36 -1
- package/src/utils/brand.ts +0 -17
- package/src/utils/legend-d3.ts +18 -8
- package/src/utils/parsing.ts +0 -16
- package/src/utils/reserved-key-registry.ts +0 -12
- package/src/utils/svg-embed.ts +36 -2
package/dist/index.cjs
CHANGED
|
@@ -818,7 +818,7 @@ function withTagAliases(base, aliases) {
|
|
|
818
818
|
function isReservedKey(registry, key) {
|
|
819
819
|
return registry.keys.has(key) || registry.tagAliases.has(key);
|
|
820
820
|
}
|
|
821
|
-
var SEQUENCE_REGISTRY, INFRA_REGISTRY, MAP_REGISTRY, ORG_REGISTRY, C4_REGISTRY, ER_REGISTRY,
|
|
821
|
+
var SEQUENCE_REGISTRY, INFRA_REGISTRY, MAP_REGISTRY, ORG_REGISTRY, C4_REGISTRY, ER_REGISTRY, KANBAN_REGISTRY, SITEMAP_REGISTRY, GANTT_REGISTRY, PERT_REGISTRY, BOXES_AND_LINES_REGISTRY, TIMELINE_REGISTRY, MINDMAP_REGISTRY, TECH_RADAR_REGISTRY, CYCLE_REGISTRY, JOURNEY_MAP_REGISTRY, PYRAMID_REGISTRY, RING_REGISTRY, RACI_REGISTRY;
|
|
822
822
|
var init_reserved_key_registry = __esm({
|
|
823
823
|
"src/utils/reserved-key-registry.ts"() {
|
|
824
824
|
"use strict";
|
|
@@ -862,10 +862,6 @@ var init_reserved_key_registry = __esm({
|
|
|
862
862
|
"description",
|
|
863
863
|
"domain"
|
|
864
864
|
]);
|
|
865
|
-
CLASS_REGISTRY = staticRegistry([
|
|
866
|
-
"color",
|
|
867
|
-
"description"
|
|
868
|
-
]);
|
|
869
865
|
KANBAN_REGISTRY = staticRegistry([
|
|
870
866
|
"color",
|
|
871
867
|
"description",
|
|
@@ -941,7 +937,6 @@ var init_reserved_key_registry = __esm({
|
|
|
941
937
|
"color",
|
|
942
938
|
"description"
|
|
943
939
|
]);
|
|
944
|
-
WIREFRAME_REGISTRY = staticRegistry([]);
|
|
945
940
|
}
|
|
946
941
|
});
|
|
947
942
|
|
|
@@ -4210,6 +4205,9 @@ var init_legend_layout = __esm({
|
|
|
4210
4205
|
});
|
|
4211
4206
|
|
|
4212
4207
|
// src/utils/legend-d3.ts
|
|
4208
|
+
function centerText(sel) {
|
|
4209
|
+
return sel.attr("dy", LEGEND_TEXT_DY);
|
|
4210
|
+
}
|
|
4213
4211
|
function renderLegendD3(container, config, state, palette, isDark, callbacks, containerWidth) {
|
|
4214
4212
|
const width = containerWidth ?? parseFloat(container.attr("width") || "800");
|
|
4215
4213
|
let currentState = { ...state };
|
|
@@ -4292,21 +4290,21 @@ function renderCapsule(parent, capsule, palette, groupBg, pillBorder, _isDark, c
|
|
|
4292
4290
|
const pill = capsule.pill;
|
|
4293
4291
|
g.append("rect").attr("x", pill.x).attr("y", pill.y).attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", palette.bg);
|
|
4294
4292
|
g.append("rect").attr("x", pill.x).attr("y", pill.y).attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", "none").attr("stroke", pillBorder).attr("stroke-width", 0.75);
|
|
4295
|
-
g.append("text").attr("x", pill.x + pill.width / 2).attr("y", LEGEND_HEIGHT / 2).attr("text-anchor", "middle").
|
|
4293
|
+
g.append("text").attr("x", pill.x + pill.width / 2).attr("y", LEGEND_HEIGHT / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.text).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(capsule.groupName);
|
|
4296
4294
|
if (capsule.gradient) {
|
|
4297
4295
|
const gr = capsule.gradient;
|
|
4298
4296
|
const gradId = `dgmo-legend-ramp-${capsule.groupName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`;
|
|
4299
4297
|
const def = g.append("defs").append("linearGradient").attr("id", gradId);
|
|
4300
4298
|
def.append("stop").attr("offset", "0%").attr("stop-color", mix(gr.hue, gr.base, 15));
|
|
4301
4299
|
def.append("stop").attr("offset", "100%").attr("stop-color", gr.hue);
|
|
4302
|
-
g.append("text").attr("x", gr.minX).attr("y", gr.textY).
|
|
4300
|
+
g.append("text").attr("x", gr.minX).attr("y", gr.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(gr.minText);
|
|
4303
4301
|
g.append("rect").attr("class", "dgmo-legend-gradient-ramp").attr("data-ramp-min", gr.min).attr("data-ramp-max", gr.max).attr("x", gr.rampX).attr("y", gr.rampY).attr("width", gr.rampW).attr("height", gr.rampH).attr("rx", 2).attr("fill", `url(#${gradId})`);
|
|
4304
|
-
g.append("text").attr("x", gr.maxX).attr("y", gr.textY).
|
|
4302
|
+
g.append("text").attr("x", gr.maxX).attr("y", gr.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(gr.maxText);
|
|
4305
4303
|
}
|
|
4306
4304
|
for (const entry of capsule.entries) {
|
|
4307
4305
|
const entryG = g.append("g").attr("data-legend-entry", entry.value.toLowerCase()).attr("data-series-name", entry.value).style("cursor", "pointer");
|
|
4308
4306
|
entryG.append("circle").attr("cx", entry.dotCx).attr("cy", entry.dotCy).attr("r", LEGEND_DOT_R).attr("fill", entry.color);
|
|
4309
|
-
entryG.append("text").attr("x", entry.textX).attr("y", entry.textY).
|
|
4307
|
+
entryG.append("text").attr("x", entry.textX).attr("y", entry.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("font-family", FONT_FAMILY).text(entry.displayValue ?? entry.value);
|
|
4310
4308
|
if (callbacks?.onEntryHover) {
|
|
4311
4309
|
const groupName = capsule.groupName;
|
|
4312
4310
|
const entryValue = entry.value;
|
|
@@ -4326,7 +4324,7 @@ function renderCapsule(parent, capsule, palette, groupBg, pillBorder, _isDark, c
|
|
|
4326
4324
|
function renderPill(parent, pill, palette, groupBg, callbacks) {
|
|
4327
4325
|
const g = parent.append("g").attr("transform", `translate(${pill.x},${pill.y})`).attr("data-legend-group", pill.groupName.toLowerCase()).style("cursor", "pointer");
|
|
4328
4326
|
g.append("rect").attr("width", pill.width).attr("height", pill.height).attr("rx", pill.height / 2).attr("fill", groupBg);
|
|
4329
|
-
g.append("text").attr("x", pill.width / 2).attr("y", pill.height / 2).attr("text-anchor", "middle").
|
|
4327
|
+
g.append("text").attr("x", pill.width / 2).attr("y", pill.height / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(pill.groupName);
|
|
4330
4328
|
if (callbacks?.onGroupToggle) {
|
|
4331
4329
|
const cb = callbacks.onGroupToggle;
|
|
4332
4330
|
const name = pill.groupName;
|
|
@@ -4349,7 +4347,7 @@ function renderControl(parent, ctrl, palette, _groupBg, pillBorder, _isDark, con
|
|
|
4349
4347
|
textX = 8 + 14 + LEGEND_ENTRY_DOT_GAP + measureLegendText(ctrl.label, LEGEND_PILL_FONT_SIZE) / 2;
|
|
4350
4348
|
}
|
|
4351
4349
|
if (ctrl.label) {
|
|
4352
|
-
g.append("text").attr("x", textX).attr("y", ctrl.height / 2).attr("text-anchor", "middle").
|
|
4350
|
+
g.append("text").attr("x", textX).attr("y", ctrl.height / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.textMuted).attr("pointer-events", "none").attr("font-family", FONT_FAMILY).text(ctrl.label);
|
|
4353
4351
|
}
|
|
4354
4352
|
if (ctrl.children) {
|
|
4355
4353
|
let cx = ctrl.width + 4;
|
|
@@ -4359,7 +4357,7 @@ function renderControl(parent, ctrl, palette, _groupBg, pillBorder, _isDark, con
|
|
|
4359
4357
|
"fill",
|
|
4360
4358
|
child.isActive ? palette.primary ?? palette.text : "none"
|
|
4361
4359
|
).attr("stroke", pillBorder).attr("stroke-width", 0.75);
|
|
4362
|
-
childG.append("text").attr("x", child.width / 2).attr("y", ctrl.height / 2).attr("text-anchor", "middle").
|
|
4360
|
+
childG.append("text").attr("x", child.width / 2).attr("y", ctrl.height / 2).attr("text-anchor", "middle").call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", child.isActive ? palette.bg : palette.textMuted).attr("font-family", FONT_FAMILY).text(child.label);
|
|
4363
4361
|
const configCtrl2 = configControls?.find((c) => c.id === ctrl.id);
|
|
4364
4362
|
const configChild = configCtrl2?.children?.find((c) => c.id === child.id);
|
|
4365
4363
|
if (configChild?.onClick) {
|
|
@@ -4413,7 +4411,7 @@ function renderControlsGroup(parent, layout, palette, groupBg, pillBorder, callb
|
|
|
4413
4411
|
} else {
|
|
4414
4412
|
entryG.append("circle").attr("cx", tl.dotCx).attr("cy", tl.dotCy).attr("r", LEGEND_TOGGLE_DOT_R).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1);
|
|
4415
4413
|
}
|
|
4416
|
-
entryG.append("text").attr("x", tl.textX).attr("y", tl.textY).
|
|
4414
|
+
entryG.append("text").attr("x", tl.textX).attr("y", tl.textY).call(centerText).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("fill", palette.textMuted).attr("opacity", tl.active ? 1 : LEGEND_TOGGLE_OFF_OPACITY).attr("font-family", FONT_FAMILY).text(tl.label);
|
|
4417
4415
|
if (callbacks?.onControlsToggle && toggle) {
|
|
4418
4416
|
const cb = callbacks.onControlsToggle;
|
|
4419
4417
|
const id = tl.id;
|
|
@@ -4426,6 +4424,7 @@ function renderControlsGroup(parent, layout, palette, groupBg, pillBorder, callb
|
|
|
4426
4424
|
}
|
|
4427
4425
|
}
|
|
4428
4426
|
}
|
|
4427
|
+
var LEGEND_TEXT_DY;
|
|
4429
4428
|
var init_legend_d3 = __esm({
|
|
4430
4429
|
"src/utils/legend-d3.ts"() {
|
|
4431
4430
|
"use strict";
|
|
@@ -4433,6 +4432,7 @@ var init_legend_d3 = __esm({
|
|
|
4433
4432
|
init_legend_layout();
|
|
4434
4433
|
init_color_utils();
|
|
4435
4434
|
init_fonts();
|
|
4435
|
+
LEGEND_TEXT_DY = "0.32em";
|
|
4436
4436
|
}
|
|
4437
4437
|
});
|
|
4438
4438
|
|
|
@@ -4683,7 +4683,6 @@ var init_arrows = __esm({
|
|
|
4683
4683
|
var parser_exports = {};
|
|
4684
4684
|
__export(parser_exports, {
|
|
4685
4685
|
isSequenceBlock: () => isSequenceBlock,
|
|
4686
|
-
isSequenceMessage: () => isSequenceMessage,
|
|
4687
4686
|
isSequenceNote: () => isSequenceNote,
|
|
4688
4687
|
isSequenceSection: () => isSequenceSection,
|
|
4689
4688
|
looksLikeSequence: () => looksLikeSequence,
|
|
@@ -4699,9 +4698,6 @@ function isHardRemovedToken(remainder) {
|
|
|
4699
4698
|
}
|
|
4700
4699
|
return { removed: false };
|
|
4701
4700
|
}
|
|
4702
|
-
function isSequenceMessage(el) {
|
|
4703
|
-
return el.kind === "message";
|
|
4704
|
-
}
|
|
4705
4701
|
function isSequenceBlock(el) {
|
|
4706
4702
|
return el.kind === "block";
|
|
4707
4703
|
}
|
|
@@ -16391,6 +16387,9 @@ function parseMap(content) {
|
|
|
16391
16387
|
break;
|
|
16392
16388
|
// ── Cosmetic `no-*` opt-outs: bare flags, idempotent (mirror `no-legend`,
|
|
16393
16389
|
// no dup warning); each defaults the feature ON when absent. ──
|
|
16390
|
+
case "no-title":
|
|
16391
|
+
d.noTitle = true;
|
|
16392
|
+
break;
|
|
16394
16393
|
case "no-legend":
|
|
16395
16394
|
d.noLegend = true;
|
|
16396
16395
|
break;
|
|
@@ -16412,6 +16411,9 @@ function parseMap(content) {
|
|
|
16412
16411
|
case "no-colorize":
|
|
16413
16412
|
d.noColorize = true;
|
|
16414
16413
|
break;
|
|
16414
|
+
case "no-cluster-pois":
|
|
16415
|
+
d.noClusterPois = true;
|
|
16416
|
+
break;
|
|
16415
16417
|
}
|
|
16416
16418
|
}
|
|
16417
16419
|
function handleTag(trimmed, line12) {
|
|
@@ -16713,13 +16715,15 @@ var init_parser12 = __esm({
|
|
|
16713
16715
|
"locale",
|
|
16714
16716
|
"active-tag",
|
|
16715
16717
|
"caption",
|
|
16718
|
+
"no-title",
|
|
16716
16719
|
"no-legend",
|
|
16717
16720
|
"no-coastline",
|
|
16718
16721
|
"no-relief",
|
|
16719
16722
|
"no-context-labels",
|
|
16720
16723
|
"no-region-labels",
|
|
16721
16724
|
"no-poi-labels",
|
|
16722
|
-
"no-colorize"
|
|
16725
|
+
"no-colorize",
|
|
16726
|
+
"no-cluster-pois"
|
|
16723
16727
|
]);
|
|
16724
16728
|
}
|
|
16725
16729
|
});
|
|
@@ -37429,18 +37433,10 @@ var init_layout11 = __esm({
|
|
|
37429
37433
|
// src/pert/renderer.ts
|
|
37430
37434
|
var renderer_exports11 = {};
|
|
37431
37435
|
__export(renderer_exports11, {
|
|
37432
|
-
PERT_LEGEND_PILL_HEIGHT: () => PERT_LEGEND_PILL_HEIGHT,
|
|
37433
|
-
highlightPertCriticalPath: () => highlightPertCriticalPath,
|
|
37434
|
-
highlightPertSet: () => highlightPertSet,
|
|
37435
37436
|
measurePertAnalysisBlock: () => measurePertAnalysisBlock,
|
|
37436
|
-
pertLegendBlockWidth: () => pertLegendBlockWidth,
|
|
37437
|
-
pertLegendEntries: () => pertLegendEntries,
|
|
37438
|
-
renderLegendBlock: () => renderLegendBlock,
|
|
37439
37437
|
renderPert: () => renderPert,
|
|
37440
37438
|
renderPertAnalysisBlock: () => renderPertAnalysisBlock,
|
|
37441
|
-
renderPertForExport: () => renderPertForExport
|
|
37442
|
-
resetPertCriticalPath: () => resetPertCriticalPath,
|
|
37443
|
-
resetPertHighlight: () => resetPertHighlight
|
|
37439
|
+
renderPertForExport: () => renderPertForExport
|
|
37444
37440
|
});
|
|
37445
37441
|
function analysisBlockChrome(palette, isDark) {
|
|
37446
37442
|
const surfaceBg = isDark ? palette.surface : palette.bg;
|
|
@@ -37523,16 +37519,14 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37523
37519
|
const standaloneFieldLegendWidthForExport = layout.width;
|
|
37524
37520
|
const analysisBlockHeight = analysisLayer.analysisHasContent ? CAPTION_TOP_GAP + analysisLayer.analysisRowHeight : 0;
|
|
37525
37521
|
const fieldLegendBlockHeight = analysisLayer.fieldLegendStandalone ? CAPTION_TOP_GAP + fieldLegendHeightFor(standaloneFieldLegendWidthForExport) : 0;
|
|
37526
|
-
const
|
|
37527
|
-
const legendEntries = showTopLegend ? pertLegendEntries(resolved) : [];
|
|
37522
|
+
const showLegend = options.showLegend ?? true;
|
|
37528
37523
|
const tagLegendActive = resolveActiveTagGroup(
|
|
37529
37524
|
resolved.tagGroups,
|
|
37530
37525
|
resolved.options.activeTag,
|
|
37531
37526
|
options.activeTagOverride
|
|
37532
37527
|
);
|
|
37533
|
-
const showTagLegend =
|
|
37534
|
-
const
|
|
37535
|
-
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;
|
|
37536
37530
|
const naturalChartWidth = layout.width + DIAGRAM_PADDING11 * 2;
|
|
37537
37531
|
const minAnalysisRowW = analysisLayer.analysisHasContent ? analysisLayer.minContentWidth + 2 * DIAGRAM_PADDING11 : 0;
|
|
37538
37532
|
const naturalWidth = Math.max(naturalChartWidth, minAnalysisRowW);
|
|
@@ -37555,8 +37549,7 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37555
37549
|
const sLegendTopGap = ctx.aesthetic(LEGEND_TOP_GAP);
|
|
37556
37550
|
const sLegendBottomGap = ctx.aesthetic(LEGEND_BOTTOM_GAP);
|
|
37557
37551
|
const sLegendPillHeight = ctx.structural(LEGEND_PILL_HEIGHT);
|
|
37558
|
-
const
|
|
37559
|
-
const sLegendBlockHeight = (legendEntries.length > 0 ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0) + sTagLegendBlockHeight;
|
|
37552
|
+
const sLegendBlockHeight = showTagLegend ? sLegendTopGap + sLegendPillHeight + sLegendBottomGap : 0;
|
|
37560
37553
|
const sNodeRadius = ctx.structural(NODE_RADIUS2);
|
|
37561
37554
|
const sNodeStrokeWidth = ctx.structural(NODE_STROKE_WIDTH10);
|
|
37562
37555
|
const sNodeFontSize = ctx.text(NODE_FONT_SIZE4);
|
|
@@ -37588,17 +37581,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
37588
37581
|
}
|
|
37589
37582
|
const offsetX = Math.max(sDiagramPad, (svgW - layout.width) / 2);
|
|
37590
37583
|
const offsetY = sDiagramPad + sTitleHeight + sLegendBlockHeight;
|
|
37591
|
-
if (legendEntries.length > 0) {
|
|
37592
|
-
renderLegendBlock(svg, legendEntries, {
|
|
37593
|
-
x: 0,
|
|
37594
|
-
y: sDiagramPad + sTitleHeight + sLegendTopGap,
|
|
37595
|
-
width: svgW,
|
|
37596
|
-
palette,
|
|
37597
|
-
isDark
|
|
37598
|
-
});
|
|
37599
|
-
}
|
|
37600
37584
|
if (showTagLegend) {
|
|
37601
|
-
const tagLegendY = sDiagramPad + sTitleHeight +
|
|
37585
|
+
const tagLegendY = sDiagramPad + sTitleHeight + sLegendTopGap;
|
|
37602
37586
|
renderTagLegendRow(svg, resolved, palette, isDark, {
|
|
37603
37587
|
x: 0,
|
|
37604
37588
|
y: tagLegendY,
|
|
@@ -37682,8 +37666,7 @@ function renderPertForExport(content, theme, palette, now) {
|
|
|
37682
37666
|
}
|
|
37683
37667
|
const captionBoxHeight = captionBullets.length > 0 ? captionBullets.length * CAPTION_LINE_HEIGHT + 2 * CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT : 0;
|
|
37684
37668
|
const captionBlockHeight = captionBullets.length > 0 ? CAPTION_TOP_GAP + captionBoxHeight : 0;
|
|
37685
|
-
const
|
|
37686
|
-
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;
|
|
37687
37670
|
const exportWidth = layout.width + DIAGRAM_PADDING11 * 2;
|
|
37688
37671
|
const exportHeight = layout.height + DIAGRAM_PADDING11 * 2 + titleHeight + legendBlockHeight + captionBlockHeight;
|
|
37689
37672
|
const container = document.createElement("div");
|
|
@@ -38223,22 +38206,22 @@ function renderEdges2(root, resolved, layout, palette, collapsedSet, sc = {}) {
|
|
|
38223
38206
|
if (srcGroup && tgtGroup && srcGroup === tgtGroup && collapsedSet.has(srcGroup)) {
|
|
38224
38207
|
continue;
|
|
38225
38208
|
}
|
|
38226
|
-
const
|
|
38209
|
+
const isCritical = criticalSet.has(e.source) && criticalSet.has(e.target);
|
|
38227
38210
|
let band;
|
|
38228
38211
|
if (mcOn) {
|
|
38229
38212
|
const sc2 = critById.get(e.source);
|
|
38230
38213
|
const tc = critById.get(e.target);
|
|
38231
38214
|
const minC = sc2 === null || tc === null || sc2 === void 0 || tc === void 0 ? null : Math.min(sc2, tc);
|
|
38232
38215
|
band = criticalityBand(minC);
|
|
38233
|
-
if (band === null &&
|
|
38216
|
+
if (band === null && isCritical) band = "red";
|
|
38234
38217
|
} else {
|
|
38235
|
-
band =
|
|
38218
|
+
band = isCritical ? "red" : null;
|
|
38236
38219
|
}
|
|
38237
38220
|
const path = lineGenerator6(e.points);
|
|
38238
38221
|
if (!path) continue;
|
|
38239
38222
|
const sESW = sc.edgeStrokeWidth ?? EDGE_STROKE_WIDTH10;
|
|
38240
38223
|
const sELFS = sc.edgeLabelFontSize ?? 10;
|
|
38241
|
-
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 ?? "");
|
|
38242
38225
|
const parsedEdge = edgeByKey.get(`${e.source}->${e.target}`);
|
|
38243
38226
|
const labelText = parsedEdge ? formatEdgeLabel(parsedEdge) : null;
|
|
38244
38227
|
if (labelText) {
|
|
@@ -38290,7 +38273,7 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
|
|
|
38290
38273
|
const r = byId.get(node.id);
|
|
38291
38274
|
if (!r) continue;
|
|
38292
38275
|
if (r.activity.groupId && collapsedSet.has(r.activity.groupId)) continue;
|
|
38293
|
-
const
|
|
38276
|
+
const isCritical = r.isCriticalPath;
|
|
38294
38277
|
const isTbd = tbdSet.has(node.id);
|
|
38295
38278
|
const dashArray = isTbd ? "4,3" : "none";
|
|
38296
38279
|
const isTopMu = topMuIds.has(node.id);
|
|
@@ -38298,14 +38281,14 @@ function renderNodes2(root, _defs, resolved, layout, palette, isDark, sizing, on
|
|
|
38298
38281
|
let band;
|
|
38299
38282
|
if (mcOn) {
|
|
38300
38283
|
band = criticalityBand(r.criticality);
|
|
38301
|
-
if (band === null &&
|
|
38284
|
+
if (band === null && isCritical) band = "red";
|
|
38302
38285
|
} else {
|
|
38303
|
-
band =
|
|
38286
|
+
band = isCritical ? "red" : null;
|
|
38304
38287
|
}
|
|
38305
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(
|
|
38306
38289
|
"data-group-id",
|
|
38307
38290
|
r.activity.groupId !== void 0 ? r.activity.groupId : ""
|
|
38308
|
-
).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" : "");
|
|
38309
38292
|
if (r.activity.tags) {
|
|
38310
38293
|
for (const [tagKey, tagValue] of Object.entries(r.activity.tags)) {
|
|
38311
38294
|
g.attr(`data-tag-${tagKey}`, String(tagValue).toLowerCase());
|
|
@@ -38615,69 +38598,6 @@ function computeAnchorPinSet(resolved) {
|
|
|
38615
38598
|
}
|
|
38616
38599
|
return pinned;
|
|
38617
38600
|
}
|
|
38618
|
-
function isCritical(el, mcOn) {
|
|
38619
|
-
if (mcOn) {
|
|
38620
|
-
return HIGHLIGHT_BANDS.has(el.getAttribute("data-criticality-band") ?? "");
|
|
38621
|
-
}
|
|
38622
|
-
return el.getAttribute("data-critical-path") === "true";
|
|
38623
|
-
}
|
|
38624
|
-
function isInHighlightSet(el, kind, mcOn) {
|
|
38625
|
-
if (kind === "critical") return isCritical(el, mcOn);
|
|
38626
|
-
if (kind === "milestone") {
|
|
38627
|
-
return el.getAttribute("data-milestone") === "true";
|
|
38628
|
-
}
|
|
38629
|
-
return el.hasAttribute("data-anchor");
|
|
38630
|
-
}
|
|
38631
|
-
function highlightPertSet(container, kind) {
|
|
38632
|
-
const svg = container.querySelector("svg");
|
|
38633
|
-
if (!svg) return;
|
|
38634
|
-
const mcOn = Array.from(svg.querySelectorAll(".pert-edge")).some((e) => {
|
|
38635
|
-
const b = e.getAttribute("data-criticality-band");
|
|
38636
|
-
return b !== null && b !== "" && b !== "red";
|
|
38637
|
-
});
|
|
38638
|
-
const candidates = svg.querySelectorAll(
|
|
38639
|
-
".pert-node, .pert-edge, .pert-group-collapsed"
|
|
38640
|
-
);
|
|
38641
|
-
let anyMatch = false;
|
|
38642
|
-
for (const el of candidates) {
|
|
38643
|
-
if (isInHighlightSet(el, kind, mcOn)) {
|
|
38644
|
-
anyMatch = true;
|
|
38645
|
-
break;
|
|
38646
|
-
}
|
|
38647
|
-
}
|
|
38648
|
-
if (!anyMatch) return;
|
|
38649
|
-
svg.setAttribute("data-pert-highlight-active", kind);
|
|
38650
|
-
for (const el of svg.querySelectorAll(".pert-node, .pert-edge")) {
|
|
38651
|
-
el.setAttribute(
|
|
38652
|
-
"opacity",
|
|
38653
|
-
isInHighlightSet(el, kind, mcOn) ? "1" : String(FADE_OPACITY)
|
|
38654
|
-
);
|
|
38655
|
-
}
|
|
38656
|
-
for (const el of svg.querySelectorAll(".pert-group")) {
|
|
38657
|
-
const inSet = el.classList.contains("pert-group-collapsed") && isInHighlightSet(el, kind, mcOn);
|
|
38658
|
-
el.setAttribute(
|
|
38659
|
-
"opacity",
|
|
38660
|
-
inSet ? "1" : String(FADE_OPACITY)
|
|
38661
|
-
);
|
|
38662
|
-
}
|
|
38663
|
-
}
|
|
38664
|
-
function highlightPertCriticalPath(container) {
|
|
38665
|
-
highlightPertSet(container, "critical");
|
|
38666
|
-
}
|
|
38667
|
-
function resetPertHighlight(container) {
|
|
38668
|
-
const svg = container.querySelector("svg");
|
|
38669
|
-
if (!svg) return;
|
|
38670
|
-
svg.removeAttribute("data-pert-highlight-active");
|
|
38671
|
-
svg.removeAttribute("data-critical-path-active");
|
|
38672
|
-
for (const el of svg.querySelectorAll(
|
|
38673
|
-
".pert-node, .pert-edge, .pert-group"
|
|
38674
|
-
)) {
|
|
38675
|
-
el.removeAttribute("opacity");
|
|
38676
|
-
}
|
|
38677
|
-
}
|
|
38678
|
-
function resetPertCriticalPath(container) {
|
|
38679
|
-
resetPertHighlight(container);
|
|
38680
|
-
}
|
|
38681
38601
|
function anchorAnnotationText(resolved) {
|
|
38682
38602
|
const anchor = resolved.options.anchor;
|
|
38683
38603
|
if (anchor === null) return null;
|
|
@@ -38730,70 +38650,6 @@ function renderCaptionBlock(svg, bullets, args) {
|
|
|
38730
38650
|
if (i > 0) tspan.attr("dy", CAPTION_LINE_HEIGHT);
|
|
38731
38651
|
});
|
|
38732
38652
|
}
|
|
38733
|
-
function pertLegendEntries(resolved) {
|
|
38734
|
-
const entries = [];
|
|
38735
|
-
if (resolved.activities.length > 0) {
|
|
38736
|
-
entries.push({ kind: "critical", label: "Critical Path" });
|
|
38737
|
-
}
|
|
38738
|
-
if (resolved.options.anchor !== null) {
|
|
38739
|
-
entries.push({ kind: "anchor", label: "Anchor" });
|
|
38740
|
-
}
|
|
38741
|
-
if (resolved.activities.some((a) => a.activity.isMilestone)) {
|
|
38742
|
-
entries.push({ kind: "milestone", label: "Milestone" });
|
|
38743
|
-
}
|
|
38744
|
-
return entries;
|
|
38745
|
-
}
|
|
38746
|
-
function legendSwatchWidth(kind) {
|
|
38747
|
-
if (kind === "critical") return LEGEND_DOT_R * 2;
|
|
38748
|
-
if (kind === "anchor") return PIN_ICON_W;
|
|
38749
|
-
return LEGEND_FONT_SIZE;
|
|
38750
|
-
}
|
|
38751
|
-
function legendPillWidth(entry) {
|
|
38752
|
-
const labelW = measureLegendText(entry.label, LEGEND_FONT_SIZE);
|
|
38753
|
-
return Math.ceil(
|
|
38754
|
-
LEGEND_PILL_PADDING_X + legendSwatchWidth(entry.kind) + LEGEND_SWATCH_GAP + labelW + LEGEND_PILL_PADDING_X
|
|
38755
|
-
);
|
|
38756
|
-
}
|
|
38757
|
-
function legendNaturalWidth(entries) {
|
|
38758
|
-
if (entries.length === 0) return 0;
|
|
38759
|
-
let total = 0;
|
|
38760
|
-
for (const e of entries) total += legendPillWidth(e);
|
|
38761
|
-
total += (entries.length - 1) * LEGEND_PILL_GAP;
|
|
38762
|
-
return total;
|
|
38763
|
-
}
|
|
38764
|
-
function pertLegendBlockWidth(entries) {
|
|
38765
|
-
return legendNaturalWidth(entries);
|
|
38766
|
-
}
|
|
38767
|
-
function renderLegendBlock(svg, entries, args) {
|
|
38768
|
-
if (entries.length === 0) return;
|
|
38769
|
-
const { x, y, width, palette, isDark } = args;
|
|
38770
|
-
const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
|
|
38771
|
-
const block = svg.append("g").attr("class", "pert-legend").attr("data-pert-legend", "");
|
|
38772
|
-
const totalW = legendNaturalWidth(entries);
|
|
38773
|
-
let pillX = x + (width - totalW) / 2;
|
|
38774
|
-
for (const entry of entries) {
|
|
38775
|
-
const pillW = legendPillWidth(entry);
|
|
38776
|
-
const pill = block.append("g").attr("class", "pert-legend-entry").attr("data-legend-entry", entry.kind).attr("transform", `translate(${pillX}, ${y})`).style("cursor", "pointer");
|
|
38777
|
-
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);
|
|
38778
|
-
const swatchW = legendSwatchWidth(entry.kind);
|
|
38779
|
-
const swatchCx = LEGEND_PILL_PADDING_X + swatchW / 2;
|
|
38780
|
-
const swatchCy = LEGEND_PILL_HEIGHT / 2;
|
|
38781
|
-
if (entry.kind === "critical") {
|
|
38782
|
-
pill.append("circle").attr("class", "pert-legend-swatch").attr("cx", swatchCx).attr("cy", swatchCy).attr("r", LEGEND_DOT_R).attr("fill", palette.colors.red);
|
|
38783
|
-
} else if (entry.kind === "anchor") {
|
|
38784
|
-
drawAnchorPin(
|
|
38785
|
-
pill,
|
|
38786
|
-
swatchCx - PIN_ICON_W / 2,
|
|
38787
|
-
swatchCy,
|
|
38788
|
-
palette.textMuted
|
|
38789
|
-
);
|
|
38790
|
-
} else {
|
|
38791
|
-
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");
|
|
38792
|
-
}
|
|
38793
|
-
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);
|
|
38794
|
-
pillX += pillW + LEGEND_PILL_GAP;
|
|
38795
|
-
}
|
|
38796
|
-
}
|
|
38797
38653
|
function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
38798
38654
|
if (resolved.tagGroups.length === 0) return;
|
|
38799
38655
|
const { x, y, width, activeGroup, exportMode } = args;
|
|
@@ -39240,7 +39096,7 @@ function formatScurveDate(iso) {
|
|
|
39240
39096
|
if (month < 0 || month > 11 || isNaN(day)) return iso;
|
|
39241
39097
|
return `${SCURVE_MONTH_NAMES[month]} ${day}`;
|
|
39242
39098
|
}
|
|
39243
|
-
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;
|
|
39244
39100
|
var init_renderer11 = __esm({
|
|
39245
39101
|
"src/pert/renderer.ts"() {
|
|
39246
39102
|
"use strict";
|
|
@@ -39271,15 +39127,10 @@ var init_renderer11 = __esm({
|
|
|
39271
39127
|
CONTAINER_LABEL_FONT_SIZE3 = 13;
|
|
39272
39128
|
CONTAINER_HEADER_HEIGHT3 = 28;
|
|
39273
39129
|
COLLAPSE_BAR_HEIGHT7 = 6;
|
|
39274
|
-
FADE_OPACITY = 0.15;
|
|
39275
39130
|
DURATION_FADE_OPACITY = 0.55;
|
|
39276
39131
|
PIN_ICON_W = 13;
|
|
39277
39132
|
PIN_ICON_H = 13;
|
|
39278
39133
|
LEGEND_PILL_HEIGHT = LEGEND_HEIGHT;
|
|
39279
|
-
LEGEND_PILL_PADDING_X = 8;
|
|
39280
|
-
LEGEND_PILL_GAP = 8;
|
|
39281
|
-
LEGEND_SWATCH_GAP = LEGEND_ENTRY_DOT_GAP;
|
|
39282
|
-
LEGEND_FONT_SIZE = LEGEND_PILL_FONT_SIZE;
|
|
39283
39134
|
LEGEND_TOP_GAP = 12;
|
|
39284
39135
|
LEGEND_BOTTOM_GAP = 12;
|
|
39285
39136
|
FIELD_LEGEND_HEADER_BAND_HEIGHT = 26;
|
|
@@ -39316,7 +39167,6 @@ var init_renderer11 = __esm({
|
|
|
39316
39167
|
];
|
|
39317
39168
|
lineGenerator6 = d3Shape8.line().x((d) => d.x).y((d) => d.y).curve(d3Shape8.curveBasis);
|
|
39318
39169
|
FIELD_LEGEND_MIN_W = 220;
|
|
39319
|
-
HIGHLIGHT_BANDS = /* @__PURE__ */ new Set(["red", "orange", "yellow"]);
|
|
39320
39170
|
SUB_BULLET_INDENT = 20;
|
|
39321
39171
|
CAPTION_HEADER_BAND_HEIGHT = CAPTION_LINE_HEIGHT + 8;
|
|
39322
39172
|
TORNADO_TOP_N = 10;
|
|
@@ -39336,7 +39186,6 @@ var init_renderer11 = __esm({
|
|
|
39336
39186
|
SCURVE_PLOT_PADDING_BOTTOM = 44;
|
|
39337
39187
|
SCURVE_TICK_FONT_SIZE = 13;
|
|
39338
39188
|
SCURVE_PERCENTILE_RADIUS = 4;
|
|
39339
|
-
PERT_LEGEND_PILL_HEIGHT = LEGEND_PILL_HEIGHT;
|
|
39340
39189
|
DAYS_PER_UNIT = {
|
|
39341
39190
|
min: 1 / (60 * 24),
|
|
39342
39191
|
h: 1 / 24,
|
|
@@ -40861,31 +40710,31 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
40861
40710
|
todayHoverG.on("mouseenter", () => {
|
|
40862
40711
|
g.selectAll(".gantt-task").attr(
|
|
40863
40712
|
"opacity",
|
|
40864
|
-
|
|
40713
|
+
FADE_OPACITY
|
|
40865
40714
|
);
|
|
40866
40715
|
g.selectAll(".gantt-milestone").attr(
|
|
40867
40716
|
"opacity",
|
|
40868
|
-
|
|
40717
|
+
FADE_OPACITY
|
|
40869
40718
|
);
|
|
40870
40719
|
g.selectAll(
|
|
40871
40720
|
".gantt-group-bar, .gantt-group-summary"
|
|
40872
|
-
).attr("opacity",
|
|
40873
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
40874
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
40875
|
-
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);
|
|
40876
40725
|
g.selectAll(
|
|
40877
40726
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
40878
|
-
).attr("opacity",
|
|
40727
|
+
).attr("opacity", FADE_OPACITY);
|
|
40879
40728
|
g.selectAll(
|
|
40880
40729
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
40881
|
-
).attr("opacity",
|
|
40730
|
+
).attr("opacity", FADE_OPACITY);
|
|
40882
40731
|
g.selectAll(".gantt-era-group").attr(
|
|
40883
40732
|
"opacity",
|
|
40884
|
-
|
|
40733
|
+
FADE_OPACITY
|
|
40885
40734
|
);
|
|
40886
40735
|
g.selectAll(".gantt-marker-group").attr(
|
|
40887
40736
|
"opacity",
|
|
40888
|
-
|
|
40737
|
+
FADE_OPACITY
|
|
40889
40738
|
);
|
|
40890
40739
|
showGanttDateIndicators(
|
|
40891
40740
|
g,
|
|
@@ -41117,28 +40966,28 @@ function applyCriticalPathHighlight(svg, chartG) {
|
|
|
41117
40966
|
const el = d3Selection13.select(this);
|
|
41118
40967
|
el.attr(
|
|
41119
40968
|
"opacity",
|
|
41120
|
-
el.attr("data-critical-path") === "true" ? 1 :
|
|
40969
|
+
el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
|
|
41121
40970
|
);
|
|
41122
40971
|
});
|
|
41123
|
-
chartG.selectAll(".gantt-milestone").attr("opacity",
|
|
41124
|
-
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);
|
|
41125
40974
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41126
40975
|
const el = d3Selection13.select(this);
|
|
41127
40976
|
el.attr(
|
|
41128
40977
|
"opacity",
|
|
41129
|
-
el.attr("data-critical-path") === "true" ? 1 :
|
|
40978
|
+
el.attr("data-critical-path") === "true" ? 1 : FADE_OPACITY
|
|
41130
40979
|
);
|
|
41131
40980
|
});
|
|
41132
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41133
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41134
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41135
|
-
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").attr("opacity",
|
|
41136
|
-
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);
|
|
41137
40986
|
chartG.selectAll(".gantt-dep-arrow, .gantt-dep-arrowhead").each(function() {
|
|
41138
40987
|
const el = d3Selection13.select(this);
|
|
41139
40988
|
el.attr(
|
|
41140
40989
|
"opacity",
|
|
41141
|
-
el.attr("data-critical-path") === "true" ? 0.7 :
|
|
40990
|
+
el.attr("data-critical-path") === "true" ? 0.7 : FADE_OPACITY
|
|
41142
40991
|
);
|
|
41143
40992
|
});
|
|
41144
40993
|
}
|
|
@@ -41317,27 +41166,27 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
41317
41166
|
const el = d3Selection13.select(this);
|
|
41318
41167
|
el.attr(
|
|
41319
41168
|
"opacity",
|
|
41320
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41169
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41321
41170
|
);
|
|
41322
41171
|
});
|
|
41323
|
-
chartG.selectAll(".gantt-milestone").attr("opacity",
|
|
41324
|
-
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);
|
|
41325
41174
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41326
41175
|
const el = d3Selection13.select(this);
|
|
41327
41176
|
el.attr(
|
|
41328
41177
|
"opacity",
|
|
41329
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41178
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41330
41179
|
);
|
|
41331
41180
|
});
|
|
41332
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41181
|
+
svg.selectAll(".gantt-group-label").attr("opacity", FADE_OPACITY);
|
|
41333
41182
|
svg.selectAll(".gantt-lane-header").each(function() {
|
|
41334
41183
|
const el = d3Selection13.select(this);
|
|
41335
41184
|
el.attr(
|
|
41336
41185
|
"opacity",
|
|
41337
|
-
el.attr(`data-tag-${tagKey}`) === ev ? 1 :
|
|
41186
|
+
el.attr(`data-tag-${tagKey}`) === ev ? 1 : FADE_OPACITY
|
|
41338
41187
|
);
|
|
41339
41188
|
});
|
|
41340
|
-
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity",
|
|
41189
|
+
chartG.selectAll(".gantt-lane-band, .gantt-lane-accent").attr("opacity", FADE_OPACITY);
|
|
41341
41190
|
} else {
|
|
41342
41191
|
if (criticalPathActive) {
|
|
41343
41192
|
applyCriticalPathHighlight(svg, chartG);
|
|
@@ -41442,27 +41291,27 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
|
|
|
41442
41291
|
eraG.on("mouseenter", () => {
|
|
41443
41292
|
g.selectAll(".gantt-task").attr(
|
|
41444
41293
|
"opacity",
|
|
41445
|
-
|
|
41294
|
+
FADE_OPACITY
|
|
41446
41295
|
);
|
|
41447
41296
|
g.selectAll(".gantt-milestone").attr(
|
|
41448
41297
|
"opacity",
|
|
41449
|
-
|
|
41298
|
+
FADE_OPACITY
|
|
41450
41299
|
);
|
|
41451
41300
|
g.selectAll(
|
|
41452
41301
|
".gantt-group-bar, .gantt-group-summary"
|
|
41453
|
-
).attr("opacity",
|
|
41454
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41455
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
41456
|
-
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);
|
|
41457
41306
|
g.selectAll(
|
|
41458
41307
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41459
|
-
).attr("opacity",
|
|
41308
|
+
).attr("opacity", FADE_OPACITY);
|
|
41460
41309
|
g.selectAll(
|
|
41461
41310
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41462
|
-
).attr("opacity",
|
|
41311
|
+
).attr("opacity", FADE_OPACITY);
|
|
41463
41312
|
g.selectAll(".gantt-marker-group").attr(
|
|
41464
41313
|
"opacity",
|
|
41465
|
-
|
|
41314
|
+
FADE_OPACITY
|
|
41466
41315
|
);
|
|
41467
41316
|
eraRect.attr("opacity", hoverEraOpacity);
|
|
41468
41317
|
if (eraTruncated) eraLabel.text(era.label);
|
|
@@ -41520,31 +41369,31 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
|
|
|
41520
41369
|
markerG.on("mouseenter", () => {
|
|
41521
41370
|
g.selectAll(".gantt-task").attr(
|
|
41522
41371
|
"opacity",
|
|
41523
|
-
|
|
41372
|
+
FADE_OPACITY
|
|
41524
41373
|
);
|
|
41525
41374
|
g.selectAll(".gantt-milestone").attr(
|
|
41526
41375
|
"opacity",
|
|
41527
|
-
|
|
41376
|
+
FADE_OPACITY
|
|
41528
41377
|
);
|
|
41529
41378
|
g.selectAll(
|
|
41530
41379
|
".gantt-group-bar, .gantt-group-summary"
|
|
41531
|
-
).attr("opacity",
|
|
41532
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41533
|
-
svg.selectAll(".gantt-task-label").attr("opacity",
|
|
41534
|
-
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);
|
|
41535
41384
|
g.selectAll(
|
|
41536
41385
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41537
|
-
).attr("opacity",
|
|
41386
|
+
).attr("opacity", FADE_OPACITY);
|
|
41538
41387
|
g.selectAll(
|
|
41539
41388
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41540
|
-
).attr("opacity",
|
|
41389
|
+
).attr("opacity", FADE_OPACITY);
|
|
41541
41390
|
g.selectAll(".gantt-era-group").attr(
|
|
41542
41391
|
"opacity",
|
|
41543
|
-
|
|
41392
|
+
FADE_OPACITY
|
|
41544
41393
|
);
|
|
41545
41394
|
g.selectAll(".gantt-marker-group").attr(
|
|
41546
41395
|
"opacity",
|
|
41547
|
-
|
|
41396
|
+
FADE_OPACITY
|
|
41548
41397
|
);
|
|
41549
41398
|
markerG.attr("opacity", 1);
|
|
41550
41399
|
markerLine.attr("opacity", 0.8);
|
|
@@ -41620,7 +41469,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41620
41469
|
const id = el.attr("data-task-id");
|
|
41621
41470
|
el.attr(
|
|
41622
41471
|
"opacity",
|
|
41623
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41472
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41624
41473
|
);
|
|
41625
41474
|
});
|
|
41626
41475
|
g.selectAll(".gantt-milestone").each(function() {
|
|
@@ -41628,7 +41477,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41628
41477
|
const id = el.attr("data-task-id");
|
|
41629
41478
|
el.attr(
|
|
41630
41479
|
"opacity",
|
|
41631
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41480
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41632
41481
|
);
|
|
41633
41482
|
});
|
|
41634
41483
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
@@ -41636,7 +41485,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41636
41485
|
const id = el.attr("data-task-id");
|
|
41637
41486
|
el.attr(
|
|
41638
41487
|
"opacity",
|
|
41639
|
-
id && overlappingTaskIds.has(id) ? 1 :
|
|
41488
|
+
id && overlappingTaskIds.has(id) ? 1 : FADE_OPACITY
|
|
41640
41489
|
);
|
|
41641
41490
|
});
|
|
41642
41491
|
g.selectAll(
|
|
@@ -41646,7 +41495,7 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41646
41495
|
const name = el.attr("data-group");
|
|
41647
41496
|
el.attr(
|
|
41648
41497
|
"opacity",
|
|
41649
|
-
name && overlappingGroupNames.has(name) ? 1 :
|
|
41498
|
+
name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
|
|
41650
41499
|
);
|
|
41651
41500
|
});
|
|
41652
41501
|
svg.selectAll(".gantt-group-label").each(function() {
|
|
@@ -41654,19 +41503,19 @@ function renderSprintBands(g, svg, resolved, xScale, innerHeight, palette) {
|
|
|
41654
41503
|
const name = el.attr("data-group");
|
|
41655
41504
|
el.attr(
|
|
41656
41505
|
"opacity",
|
|
41657
|
-
name && overlappingGroupNames.has(name) ? 1 :
|
|
41506
|
+
name && overlappingGroupNames.has(name) ? 1 : FADE_OPACITY
|
|
41658
41507
|
);
|
|
41659
41508
|
});
|
|
41660
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41509
|
+
svg.selectAll(".gantt-lane-header").attr("opacity", FADE_OPACITY);
|
|
41661
41510
|
g.selectAll(
|
|
41662
41511
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41663
|
-
).attr("opacity",
|
|
41512
|
+
).attr("opacity", FADE_OPACITY);
|
|
41664
41513
|
g.selectAll(
|
|
41665
41514
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41666
|
-
).attr("opacity",
|
|
41515
|
+
).attr("opacity", FADE_OPACITY);
|
|
41667
41516
|
g.selectAll(".gantt-marker-group").attr(
|
|
41668
41517
|
"opacity",
|
|
41669
|
-
|
|
41518
|
+
FADE_OPACITY
|
|
41670
41519
|
);
|
|
41671
41520
|
sprintRect.attr("opacity", SPRINT_HOVER_OPACITY);
|
|
41672
41521
|
const startVisible = rawSx >= chartMinX;
|
|
@@ -41735,20 +41584,20 @@ function highlightDeps(g, svg, taskId, resolved) {
|
|
|
41735
41584
|
g.selectAll(".gantt-task").each(function() {
|
|
41736
41585
|
const el = d3Selection13.select(this);
|
|
41737
41586
|
const id = el.attr("data-task-id");
|
|
41738
|
-
el.attr("opacity", id && related.has(id) ? 1 :
|
|
41587
|
+
el.attr("opacity", id && related.has(id) ? 1 : FADE_OPACITY);
|
|
41739
41588
|
});
|
|
41740
41589
|
g.selectAll(".gantt-milestone").attr(
|
|
41741
41590
|
"opacity",
|
|
41742
|
-
|
|
41591
|
+
FADE_OPACITY
|
|
41743
41592
|
);
|
|
41744
41593
|
g.selectAll(
|
|
41745
41594
|
".gantt-group-bar, .gantt-group-summary"
|
|
41746
|
-
).attr("opacity",
|
|
41747
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41748
|
-
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);
|
|
41749
41598
|
g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
|
|
41750
41599
|
"opacity",
|
|
41751
|
-
|
|
41600
|
+
FADE_OPACITY
|
|
41752
41601
|
);
|
|
41753
41602
|
g.selectAll(
|
|
41754
41603
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
@@ -41757,52 +41606,52 @@ function highlightDeps(g, svg, taskId, resolved) {
|
|
|
41757
41606
|
const from = el.attr("data-dep-from");
|
|
41758
41607
|
const to = el.attr("data-dep-to");
|
|
41759
41608
|
const isRelated = from && related.has(from) || to && related.has(to);
|
|
41760
|
-
el.attr("opacity", isRelated ? 0.5 :
|
|
41609
|
+
el.attr("opacity", isRelated ? 0.5 : FADE_OPACITY);
|
|
41761
41610
|
});
|
|
41762
41611
|
g.selectAll(".gantt-marker-group").attr(
|
|
41763
41612
|
"opacity",
|
|
41764
|
-
|
|
41613
|
+
FADE_OPACITY
|
|
41765
41614
|
);
|
|
41766
41615
|
}
|
|
41767
41616
|
function highlightGroup(g, svg, groupName) {
|
|
41768
41617
|
g.selectAll(".gantt-task").each(function() {
|
|
41769
41618
|
const el = d3Selection13.select(this);
|
|
41770
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41619
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41771
41620
|
});
|
|
41772
41621
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41773
41622
|
const el = d3Selection13.select(this);
|
|
41774
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41623
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41775
41624
|
});
|
|
41776
41625
|
g.selectAll(
|
|
41777
41626
|
".gantt-group-bar, .gantt-group-summary"
|
|
41778
41627
|
).each(function() {
|
|
41779
41628
|
const el = d3Selection13.select(this);
|
|
41780
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41629
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41781
41630
|
});
|
|
41782
41631
|
svg.selectAll(".gantt-group-label").each(function() {
|
|
41783
41632
|
const el = d3Selection13.select(this);
|
|
41784
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41633
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41785
41634
|
});
|
|
41786
41635
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41787
41636
|
const el = d3Selection13.select(this);
|
|
41788
|
-
el.attr("opacity", el.attr("data-group") === groupName ? 1 :
|
|
41637
|
+
el.attr("opacity", el.attr("data-group") === groupName ? 1 : FADE_OPACITY);
|
|
41789
41638
|
});
|
|
41790
41639
|
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").each(function() {
|
|
41791
41640
|
const el = d3Selection13.select(this);
|
|
41792
41641
|
el.attr(
|
|
41793
41642
|
"opacity",
|
|
41794
|
-
el.attr("data-group") === groupName ? 1 :
|
|
41643
|
+
el.attr("data-group") === groupName ? 1 : FADE_OPACITY
|
|
41795
41644
|
);
|
|
41796
41645
|
});
|
|
41797
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41798
|
-
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);
|
|
41799
41648
|
g.selectAll(".gantt-lane-band, .gantt-lane-accent").attr(
|
|
41800
41649
|
"opacity",
|
|
41801
|
-
|
|
41650
|
+
FADE_OPACITY
|
|
41802
41651
|
);
|
|
41803
41652
|
g.selectAll(".gantt-marker-group").attr(
|
|
41804
41653
|
"opacity",
|
|
41805
|
-
|
|
41654
|
+
FADE_OPACITY
|
|
41806
41655
|
);
|
|
41807
41656
|
}
|
|
41808
41657
|
function highlightLane(g, svg, tagKey, laneName) {
|
|
@@ -41810,105 +41659,105 @@ function highlightLane(g, svg, tagKey, laneName) {
|
|
|
41810
41659
|
const laneValue = laneName.toLowerCase();
|
|
41811
41660
|
g.selectAll(".gantt-task").each(function() {
|
|
41812
41661
|
const el = d3Selection13.select(this);
|
|
41813
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41662
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41814
41663
|
});
|
|
41815
41664
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41816
41665
|
const el = d3Selection13.select(this);
|
|
41817
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41666
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41818
41667
|
});
|
|
41819
41668
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41820
41669
|
const el = d3Selection13.select(this);
|
|
41821
|
-
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 :
|
|
41670
|
+
el.attr("opacity", el.attr(tagAttr) === laneValue ? 1 : FADE_OPACITY);
|
|
41822
41671
|
});
|
|
41823
41672
|
svg.selectAll(".gantt-lane-header").each(function() {
|
|
41824
41673
|
const el = d3Selection13.select(this);
|
|
41825
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41674
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41826
41675
|
});
|
|
41827
41676
|
g.selectAll(".gantt-lane-band-group").each(function() {
|
|
41828
41677
|
const el = d3Selection13.select(this);
|
|
41829
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41678
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41830
41679
|
});
|
|
41831
41680
|
svg.selectAll(".gantt-lane-band-bg, .gantt-lane-band-accent").each(function() {
|
|
41832
41681
|
const el = d3Selection13.select(this);
|
|
41833
|
-
el.attr("opacity", el.attr("data-lane") === laneName ? 1 :
|
|
41682
|
+
el.attr("opacity", el.attr("data-lane") === laneName ? 1 : FADE_OPACITY);
|
|
41834
41683
|
});
|
|
41835
41684
|
g.selectAll(
|
|
41836
41685
|
".gantt-group-bar, .gantt-group-summary"
|
|
41837
|
-
).attr("opacity",
|
|
41838
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41839
|
-
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);
|
|
41840
41689
|
g.selectAll(".gantt-marker-group").attr(
|
|
41841
41690
|
"opacity",
|
|
41842
|
-
|
|
41691
|
+
FADE_OPACITY
|
|
41843
41692
|
);
|
|
41844
41693
|
}
|
|
41845
41694
|
function highlightTask(g, svg, taskId) {
|
|
41846
41695
|
g.selectAll(".gantt-task").each(function() {
|
|
41847
41696
|
const el = d3Selection13.select(this);
|
|
41848
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41697
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41849
41698
|
});
|
|
41850
41699
|
g.selectAll(".gantt-milestone").attr(
|
|
41851
41700
|
"opacity",
|
|
41852
|
-
|
|
41701
|
+
FADE_OPACITY
|
|
41853
41702
|
);
|
|
41854
41703
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41855
41704
|
const el = d3Selection13.select(this);
|
|
41856
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41705
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41857
41706
|
});
|
|
41858
41707
|
g.selectAll(
|
|
41859
41708
|
".gantt-group-bar, .gantt-group-summary"
|
|
41860
|
-
).attr("opacity",
|
|
41861
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41862
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41863
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41864
|
-
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);
|
|
41865
41714
|
g.selectAll(
|
|
41866
41715
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41867
|
-
).attr("opacity",
|
|
41716
|
+
).attr("opacity", FADE_OPACITY);
|
|
41868
41717
|
g.selectAll(
|
|
41869
41718
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41870
|
-
).attr("opacity",
|
|
41719
|
+
).attr("opacity", FADE_OPACITY);
|
|
41871
41720
|
g.selectAll(".gantt-marker-group").attr(
|
|
41872
41721
|
"opacity",
|
|
41873
|
-
|
|
41722
|
+
FADE_OPACITY
|
|
41874
41723
|
);
|
|
41875
41724
|
}
|
|
41876
41725
|
function highlightMilestone(g, svg, taskId) {
|
|
41877
41726
|
g.selectAll(".gantt-task").attr(
|
|
41878
41727
|
"opacity",
|
|
41879
|
-
|
|
41728
|
+
FADE_OPACITY
|
|
41880
41729
|
);
|
|
41881
41730
|
g.selectAll(".gantt-milestone").each(function() {
|
|
41882
41731
|
const el = d3Selection13.select(this);
|
|
41883
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41732
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41884
41733
|
});
|
|
41885
41734
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41886
41735
|
const el = d3Selection13.select(this);
|
|
41887
|
-
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 :
|
|
41736
|
+
el.attr("opacity", el.attr("data-task-id") === taskId ? 1 : FADE_OPACITY);
|
|
41888
41737
|
});
|
|
41889
41738
|
g.selectAll(
|
|
41890
41739
|
".gantt-group-bar, .gantt-group-summary"
|
|
41891
|
-
).attr("opacity",
|
|
41892
|
-
svg.selectAll(".gantt-group-label").attr("opacity",
|
|
41893
|
-
svg.selectAll(".gantt-group-band-bg, .gantt-group-band-accent").attr("opacity",
|
|
41894
|
-
svg.selectAll(".gantt-lane-header").attr("opacity",
|
|
41895
|
-
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);
|
|
41896
41745
|
g.selectAll(
|
|
41897
41746
|
".gantt-lane-band, .gantt-lane-accent, .gantt-lane-band-group"
|
|
41898
|
-
).attr("opacity",
|
|
41747
|
+
).attr("opacity", FADE_OPACITY);
|
|
41899
41748
|
g.selectAll(
|
|
41900
41749
|
".gantt-dep-arrow, .gantt-dep-arrowhead"
|
|
41901
|
-
).attr("opacity",
|
|
41750
|
+
).attr("opacity", FADE_OPACITY);
|
|
41902
41751
|
g.selectAll(".gantt-marker-group").attr(
|
|
41903
41752
|
"opacity",
|
|
41904
|
-
|
|
41753
|
+
FADE_OPACITY
|
|
41905
41754
|
);
|
|
41906
41755
|
}
|
|
41907
41756
|
function highlightTaskLabel(svg, lineNumber) {
|
|
41908
41757
|
const ln = String(lineNumber);
|
|
41909
41758
|
svg.selectAll(".gantt-task-label").each(function() {
|
|
41910
41759
|
const el = d3Selection13.select(this);
|
|
41911
|
-
el.attr("opacity", el.attr("data-line-number") === ln ? 1 :
|
|
41760
|
+
el.attr("opacity", el.attr("data-line-number") === ln ? 1 : FADE_OPACITY);
|
|
41912
41761
|
});
|
|
41913
41762
|
}
|
|
41914
41763
|
function resetTaskLabels(svg) {
|
|
@@ -42182,7 +42031,7 @@ function renderTimeScaleHorizontal(g, scale, _innerWidth, innerHeight, textColor
|
|
|
42182
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);
|
|
42183
42032
|
}
|
|
42184
42033
|
}
|
|
42185
|
-
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;
|
|
42186
42035
|
var init_renderer12 = __esm({
|
|
42187
42036
|
"src/gantt/renderer.ts"() {
|
|
42188
42037
|
"use strict";
|
|
@@ -42225,7 +42074,7 @@ var init_renderer12 = __esm({
|
|
|
42225
42074
|
SPRINT_BAND_OPACITY = 0.05;
|
|
42226
42075
|
SPRINT_HOVER_OPACITY = 0.12;
|
|
42227
42076
|
SPRINT_BOUNDARY_OPACITY = 0.3;
|
|
42228
|
-
|
|
42077
|
+
FADE_OPACITY = 0.1;
|
|
42229
42078
|
MONTH_ABBR2 = [
|
|
42230
42079
|
"Jan",
|
|
42231
42080
|
"Feb",
|
|
@@ -47540,7 +47389,8 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
47540
47389
|
palette.bg,
|
|
47541
47390
|
mutedBasemap ? isDark ? MUTED_FOREIGN_DARK : MUTED_FOREIGN_LIGHT : isDark ? FOREIGN_TINT_DARK : FOREIGN_TINT_LIGHT
|
|
47542
47391
|
);
|
|
47543
|
-
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;
|
|
47544
47394
|
const colorByIso = /* @__PURE__ */ new Map();
|
|
47545
47395
|
if (colorizeActive) {
|
|
47546
47396
|
const adjacency = /* @__PURE__ */ new Map();
|
|
@@ -47636,16 +47486,17 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
47636
47486
|
};
|
|
47637
47487
|
}
|
|
47638
47488
|
}
|
|
47489
|
+
const shownTitle = resolved.directives.noTitle ? null : resolved.title;
|
|
47639
47490
|
const TITLE_GAP2 = 16;
|
|
47640
47491
|
let topPad = FIT_PAD;
|
|
47641
|
-
if (
|
|
47492
|
+
if (shownTitle && resolved.pois.length > 0) {
|
|
47642
47493
|
const bannerBottom = (resolved.subtitle ? TITLE_Y + TITLE_FONT_SIZE : TITLE_Y) + TITLE_FONT_SIZE / 2;
|
|
47643
47494
|
topPad = Math.max(FIT_PAD, bannerBottom + TITLE_GAP2);
|
|
47644
47495
|
}
|
|
47645
47496
|
const legendBand = mapLegendBand(legend, {
|
|
47646
47497
|
width,
|
|
47647
47498
|
mode: opts.legendMode ?? "preview",
|
|
47648
|
-
hasTitle: Boolean(
|
|
47499
|
+
hasTitle: Boolean(shownTitle),
|
|
47649
47500
|
hasSubtitle: Boolean(resolved.subtitle)
|
|
47650
47501
|
});
|
|
47651
47502
|
if (legendBand > topPad) topPad = legendBand;
|
|
@@ -48734,7 +48585,7 @@ function layoutMap(resolved, data, size, opts) {
|
|
|
48734
48585
|
width,
|
|
48735
48586
|
height,
|
|
48736
48587
|
background: water,
|
|
48737
|
-
title:
|
|
48588
|
+
title: shownTitle,
|
|
48738
48589
|
...resolved.subtitle !== void 0 && { subtitle: resolved.subtitle },
|
|
48739
48590
|
...resolved.caption !== void 0 && { caption: resolved.caption },
|
|
48740
48591
|
regions,
|
|
@@ -49144,9 +48995,10 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
|
|
|
49144
48995
|
wireSync(lt, leg.lineNumber);
|
|
49145
48996
|
}
|
|
49146
48997
|
});
|
|
48998
|
+
const clusterUi = !exportDims && !resolved.directives.noClusterPois;
|
|
49147
48999
|
const gSpider = svg.append("g").attr("class", "dgmo-map-spider");
|
|
49148
49000
|
for (const cl of layout.clusters) {
|
|
49149
|
-
if (
|
|
49001
|
+
if (clusterUi) {
|
|
49150
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");
|
|
49151
49003
|
}
|
|
49152
49004
|
for (const leg of cl.legs) {
|
|
@@ -49238,13 +49090,18 @@ function renderMap(container, resolved, data, palette, isDark, onClickItem, expo
|
|
|
49238
49090
|
}
|
|
49239
49091
|
wireSync(t, lab.lineNumber);
|
|
49240
49092
|
}
|
|
49241
|
-
if (
|
|
49093
|
+
if (clusterUi && layout.clusters.length) {
|
|
49242
49094
|
const gBadge = svg.append("g").attr("class", "dgmo-map-cluster-badges");
|
|
49243
49095
|
for (const cl of layout.clusters) {
|
|
49244
49096
|
const g = gBadge.append("g").attr("data-cluster", cl.id).style("opacity", 0).style("pointer-events", "none");
|
|
49245
49097
|
const R = 9;
|
|
49246
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);
|
|
49247
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
|
+
}
|
|
49248
49105
|
emitText(
|
|
49249
49106
|
g,
|
|
49250
49107
|
cl.cx,
|
|
@@ -52170,10 +52027,12 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
52170
52027
|
isDark ? 15 : 20
|
|
52171
52028
|
) : isDark ? palette.surface : palette.bg;
|
|
52172
52029
|
const strokeColor = groupTagColor || palette.textMuted;
|
|
52173
|
-
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");
|
|
52174
52031
|
groupG.append("title").text("Click to collapse");
|
|
52175
|
-
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");
|
|
52176
|
-
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);
|
|
52177
52036
|
}
|
|
52178
52037
|
const lifelineStartY = lifelineStartY0;
|
|
52179
52038
|
participants.forEach((participant) => {
|
|
@@ -52215,7 +52074,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
52215
52074
|
const participantG = svg.select(
|
|
52216
52075
|
`.participant[data-participant-id="${participant.id}"]`
|
|
52217
52076
|
);
|
|
52218
|
-
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");
|
|
52219
52078
|
participantG.append("title").text("Click to expand");
|
|
52220
52079
|
const pFill = effectiveTagColor ? mix(
|
|
52221
52080
|
effectiveTagColor,
|
|
@@ -54194,7 +54053,7 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54194
54053
|
neighbors2.get(link.source).add(link.target);
|
|
54195
54054
|
neighbors2.get(link.target).add(link.source);
|
|
54196
54055
|
}
|
|
54197
|
-
const
|
|
54056
|
+
const FADE_OPACITY2 = 0.1;
|
|
54198
54057
|
function handleMouseEnter(hovered) {
|
|
54199
54058
|
const connected = neighbors2.get(hovered);
|
|
54200
54059
|
g.selectAll(".arc-link").each(function() {
|
|
@@ -54202,13 +54061,13 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54202
54061
|
const src = el.attr("data-source");
|
|
54203
54062
|
const tgt = el.attr("data-target");
|
|
54204
54063
|
const isRelated = src === hovered || tgt === hovered;
|
|
54205
|
-
el.attr("stroke-opacity", isRelated ? 0.85 :
|
|
54064
|
+
el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
|
|
54206
54065
|
});
|
|
54207
54066
|
g.selectAll(".arc-node").each(function() {
|
|
54208
54067
|
const el = d3Selection23.select(this);
|
|
54209
54068
|
const name = el.attr("data-node");
|
|
54210
54069
|
const isRelated = name === hovered || connected.has(name);
|
|
54211
|
-
el.attr("opacity", isRelated ? 1 :
|
|
54070
|
+
el.attr("opacity", isRelated ? 1 : FADE_OPACITY2);
|
|
54212
54071
|
});
|
|
54213
54072
|
}
|
|
54214
54073
|
function handleMouseLeave() {
|
|
@@ -54232,11 +54091,11 @@ function renderArcDiagram(container, parsed, palette, _isDark, onClickItem, expo
|
|
|
54232
54091
|
g.selectAll(".arc-link").each(function() {
|
|
54233
54092
|
const el = d3Selection23.select(this);
|
|
54234
54093
|
const isRelated = members.has(el.attr("data-source")) || members.has(el.attr("data-target"));
|
|
54235
|
-
el.attr("stroke-opacity", isRelated ? 0.85 :
|
|
54094
|
+
el.attr("stroke-opacity", isRelated ? 0.85 : FADE_OPACITY2);
|
|
54236
54095
|
});
|
|
54237
54096
|
g.selectAll(".arc-node").each(function() {
|
|
54238
54097
|
const el = d3Selection23.select(this);
|
|
54239
|
-
el.attr("opacity", members.has(el.attr("data-node")) ? 1 :
|
|
54098
|
+
el.attr("opacity", members.has(el.attr("data-node")) ? 1 : FADE_OPACITY2);
|
|
54240
54099
|
});
|
|
54241
54100
|
g.selectAll(".arc-group-band").each(function() {
|
|
54242
54101
|
const el = d3Selection23.select(this);
|
|
@@ -54758,23 +54617,23 @@ function setupTimeline(container, parsed, palette, isDark, exportDims, activeTag
|
|
|
54758
54617
|
};
|
|
54759
54618
|
}
|
|
54760
54619
|
function makeTimelineHoverHelpers() {
|
|
54761
|
-
const
|
|
54620
|
+
const FADE_OPACITY2 = 0.1;
|
|
54762
54621
|
function fadeToGroup(g, groupName) {
|
|
54763
54622
|
g.selectAll(".tl-event").each(function() {
|
|
54764
54623
|
const el = d3Selection23.select(this);
|
|
54765
54624
|
const evGroup = el.attr("data-group");
|
|
54766
|
-
el.attr("opacity", evGroup === groupName ? 1 :
|
|
54625
|
+
el.attr("opacity", evGroup === groupName ? 1 : FADE_OPACITY2);
|
|
54767
54626
|
});
|
|
54768
54627
|
g.selectAll(".tl-legend-item, .tl-lane-header").each(
|
|
54769
54628
|
function() {
|
|
54770
54629
|
const el = d3Selection23.select(this);
|
|
54771
54630
|
const name = el.attr("data-group");
|
|
54772
|
-
el.attr("opacity", name === groupName ? 1 :
|
|
54631
|
+
el.attr("opacity", name === groupName ? 1 : FADE_OPACITY2);
|
|
54773
54632
|
}
|
|
54774
54633
|
);
|
|
54775
54634
|
g.selectAll(".tl-marker").attr(
|
|
54776
54635
|
"opacity",
|
|
54777
|
-
|
|
54636
|
+
FADE_OPACITY2
|
|
54778
54637
|
);
|
|
54779
54638
|
}
|
|
54780
54639
|
function fadeToEra(g, eraStart, eraEnd) {
|
|
@@ -54784,40 +54643,40 @@ function makeTimelineHoverHelpers() {
|
|
|
54784
54643
|
const endDate = el.attr("data-end-date");
|
|
54785
54644
|
const evEnd = endDate ? parseFloat(endDate) : date;
|
|
54786
54645
|
const inside = evEnd >= eraStart && date <= eraEnd;
|
|
54787
|
-
el.attr("opacity", inside ? 1 :
|
|
54646
|
+
el.attr("opacity", inside ? 1 : FADE_OPACITY2);
|
|
54788
54647
|
});
|
|
54789
54648
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54790
54649
|
"opacity",
|
|
54791
|
-
|
|
54650
|
+
FADE_OPACITY2
|
|
54792
54651
|
);
|
|
54793
54652
|
g.selectAll(".tl-era").each(function() {
|
|
54794
54653
|
const el = d3Selection23.select(this);
|
|
54795
54654
|
const s = parseFloat(el.attr("data-era-start"));
|
|
54796
54655
|
const e = parseFloat(el.attr("data-era-end"));
|
|
54797
54656
|
const isSelf = s === eraStart && e === eraEnd;
|
|
54798
|
-
el.attr("opacity", isSelf ? 1 :
|
|
54657
|
+
el.attr("opacity", isSelf ? 1 : FADE_OPACITY2);
|
|
54799
54658
|
});
|
|
54800
54659
|
g.selectAll(".tl-marker").each(function() {
|
|
54801
54660
|
const el = d3Selection23.select(this);
|
|
54802
54661
|
const date = parseFloat(el.attr("data-marker-date"));
|
|
54803
54662
|
const inside = date >= eraStart && date <= eraEnd;
|
|
54804
|
-
el.attr("opacity", inside ? 1 :
|
|
54663
|
+
el.attr("opacity", inside ? 1 : FADE_OPACITY2);
|
|
54805
54664
|
});
|
|
54806
54665
|
}
|
|
54807
54666
|
function fadeToMarker(g, markerDate) {
|
|
54808
54667
|
g.selectAll(".tl-event").attr(
|
|
54809
54668
|
"opacity",
|
|
54810
|
-
|
|
54669
|
+
FADE_OPACITY2
|
|
54811
54670
|
);
|
|
54812
|
-
g.selectAll(".tl-era").attr("opacity",
|
|
54671
|
+
g.selectAll(".tl-era").attr("opacity", FADE_OPACITY2);
|
|
54813
54672
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54814
54673
|
"opacity",
|
|
54815
|
-
|
|
54674
|
+
FADE_OPACITY2
|
|
54816
54675
|
);
|
|
54817
54676
|
g.selectAll(".tl-marker").each(function() {
|
|
54818
54677
|
const el = d3Selection23.select(this);
|
|
54819
54678
|
const date = parseFloat(el.attr("data-marker-date"));
|
|
54820
|
-
el.attr("opacity", date === markerDate ? 1 :
|
|
54679
|
+
el.attr("opacity", date === markerDate ? 1 : FADE_OPACITY2);
|
|
54821
54680
|
});
|
|
54822
54681
|
}
|
|
54823
54682
|
function fadeReset(g) {
|
|
@@ -54831,15 +54690,15 @@ function makeTimelineHoverHelpers() {
|
|
|
54831
54690
|
g.selectAll(".tl-event").each(function() {
|
|
54832
54691
|
const el = d3Selection23.select(this);
|
|
54833
54692
|
const val = el.attr(attrName);
|
|
54834
|
-
el.attr("opacity", val === tagValue ? 1 :
|
|
54693
|
+
el.attr("opacity", val === tagValue ? 1 : FADE_OPACITY2);
|
|
54835
54694
|
});
|
|
54836
54695
|
g.selectAll(".tl-legend-item, .tl-lane-header").attr(
|
|
54837
54696
|
"opacity",
|
|
54838
|
-
|
|
54697
|
+
FADE_OPACITY2
|
|
54839
54698
|
);
|
|
54840
54699
|
g.selectAll(".tl-marker").attr(
|
|
54841
54700
|
"opacity",
|
|
54842
|
-
|
|
54701
|
+
FADE_OPACITY2
|
|
54843
54702
|
);
|
|
54844
54703
|
g.selectAll(".tl-tag-legend-entry").each(function() {
|
|
54845
54704
|
const el = d3Selection23.select(this);
|
|
@@ -54848,7 +54707,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54848
54707
|
const entryGroup = el.attr("data-tag-group");
|
|
54849
54708
|
el.attr(
|
|
54850
54709
|
"opacity",
|
|
54851
|
-
entryGroup === tagKey && entryValue === tagValue ? 1 :
|
|
54710
|
+
entryGroup === tagKey && entryValue === tagValue ? 1 : FADE_OPACITY2
|
|
54852
54711
|
);
|
|
54853
54712
|
});
|
|
54854
54713
|
}
|
|
@@ -54858,7 +54717,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54858
54717
|
}
|
|
54859
54718
|
}
|
|
54860
54719
|
return {
|
|
54861
|
-
FADE_OPACITY:
|
|
54720
|
+
FADE_OPACITY: FADE_OPACITY2,
|
|
54862
54721
|
fadeToGroup,
|
|
54863
54722
|
fadeToEra,
|
|
54864
54723
|
fadeToMarker,
|
|
@@ -54870,7 +54729,7 @@ function makeTimelineHoverHelpers() {
|
|
|
54870
54729
|
function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
|
|
54871
54730
|
if (parsed.timelineTagGroups.length === 0) return;
|
|
54872
54731
|
const { width, textColor, groupColorMap, solid } = setup;
|
|
54873
|
-
const { FADE_OPACITY:
|
|
54732
|
+
const { FADE_OPACITY: FADE_OPACITY2, fadeReset, fadeToTagValue } = hovers;
|
|
54874
54733
|
const title = parsed.noTitle ? null : parsed.title;
|
|
54875
54734
|
const { timelineEvents } = parsed;
|
|
54876
54735
|
const LG_HEIGHT = LEGEND_HEIGHT;
|
|
@@ -54960,7 +54819,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
|
|
|
54960
54819
|
const eg = el.attr("data-tag-group") ?? el.node()?.closest?.("[data-tag-group]")?.getAttribute("data-tag-group");
|
|
54961
54820
|
el.attr(
|
|
54962
54821
|
"opacity",
|
|
54963
|
-
eg === tagKey && ev === tagVal ? 1 :
|
|
54822
|
+
eg === tagKey && ev === tagVal ? 1 : FADE_OPACITY2
|
|
54964
54823
|
);
|
|
54965
54824
|
});
|
|
54966
54825
|
} else {
|
|
@@ -57719,6 +57578,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
57719
57578
|
const { renderSequenceDiagram: renderSequenceDiagram2 } = await Promise.resolve().then(() => (init_renderer20(), renderer_exports20));
|
|
57720
57579
|
const seqParsed = parseSequenceDgmo2(content);
|
|
57721
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;
|
|
57722
57584
|
renderSequenceDiagram2(
|
|
57723
57585
|
container,
|
|
57724
57586
|
seqParsed,
|
|
@@ -57727,9 +57589,11 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
57727
57589
|
void 0,
|
|
57728
57590
|
{
|
|
57729
57591
|
exportWidth: EXPORT_WIDTH,
|
|
57730
|
-
...
|
|
57731
|
-
activeTagGroup:
|
|
57732
|
-
}
|
|
57592
|
+
...seqActiveTagGroup !== void 0 && {
|
|
57593
|
+
activeTagGroup: seqActiveTagGroup
|
|
57594
|
+
},
|
|
57595
|
+
...collapsedSections !== void 0 && { collapsedSections },
|
|
57596
|
+
...collapsedGroups !== void 0 && { collapsedGroups }
|
|
57733
57597
|
}
|
|
57734
57598
|
);
|
|
57735
57599
|
} else if (parsed.type === "wordcloud") {
|
|
@@ -58815,8 +58679,17 @@ function normalizeSvgForEmbed(input) {
|
|
|
58815
58679
|
const tight = computeBBox(svg);
|
|
58816
58680
|
if (tight && tight.width > 0 && tight.height > 0) {
|
|
58817
58681
|
const pad2 = 16;
|
|
58818
|
-
const
|
|
58819
|
-
|
|
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 withinCanvas = !canvas || x >= canvas.x - TOL && y >= canvas.y - TOL && x + w <= canvas.x + canvas.width + TOL && y + h <= canvas.y + canvas.height + TOL;
|
|
58689
|
+
if (withinCanvas) {
|
|
58690
|
+
const vb = `${x} ${y} ${w} ${h}`;
|
|
58691
|
+
svg = svg.replace(/(<svg[^>]*?)viewBox="[^"]*"/, `$1viewBox="${vb}"`);
|
|
58692
|
+
}
|
|
58820
58693
|
}
|
|
58821
58694
|
svg = svg.replace(/(<svg[^>]*?) width="[^"]*"/g, "$1");
|
|
58822
58695
|
svg = svg.replace(/(<svg[^>]*?) height="[^"]*"/g, "$1");
|
|
@@ -58835,6 +58708,14 @@ function getEmbedSvgViewBox(svg) {
|
|
|
58835
58708
|
height: tight.height + pad2 * 2
|
|
58836
58709
|
};
|
|
58837
58710
|
}
|
|
58711
|
+
function readViewBox(svg) {
|
|
58712
|
+
const m = svg.match(/<svg[^>]*?\bviewBox="([^"]+)"/);
|
|
58713
|
+
if (!m) return null;
|
|
58714
|
+
const n = m[1].trim().split(/[\s,]+/).map(Number);
|
|
58715
|
+
if (n.length !== 4 || n.some((v) => !Number.isFinite(v)) || n[2] <= 0 || n[3] <= 0)
|
|
58716
|
+
return null;
|
|
58717
|
+
return { x: n[0], y: n[1], width: n[2], height: n[3] };
|
|
58718
|
+
}
|
|
58838
58719
|
function computeBBox(svg) {
|
|
58839
58720
|
const xs = [];
|
|
58840
58721
|
const ys = [];
|