@cjlapao/ui-kit 0.2.4 → 0.2.6
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/{CapsuleBlueprint-DwDZ7nii.d.cts → CapsuleBlueprint-BI0jdbTt.d.cts} +16 -1
- package/dist/{CapsuleBlueprint-DwDZ7nii.d.ts → CapsuleBlueprint-BI0jdbTt.d.ts} +16 -1
- package/dist/index.cjs +992 -676
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -0
- package/dist/index.d.cts +160 -13
- package/dist/index.d.ts +160 -13
- package/dist/index.js +923 -614
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs +14 -2
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.d.cts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +14 -2
- package/dist/markdown.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -68,6 +68,7 @@ __export(src_exports, {
|
|
|
68
68
|
COLLAPSIBLE_HELP_VARIANTS: () => COLLAPSIBLE_HELP_VARIANTS,
|
|
69
69
|
COMBOBOX_TONE_CLASSES: () => COMBOBOX_TONE_CLASSES,
|
|
70
70
|
COMBOBOX_VALIDATION_STATUSES: () => COMBOBOX_VALIDATION_STATUSES,
|
|
71
|
+
CONNECTION_FLOW_CHILD_LAYOUTS: () => CONNECTION_FLOW_CHILD_LAYOUTS,
|
|
71
72
|
CONNECTION_FLOW_EDGE_STYLES: () => CONNECTION_FLOW_EDGE_STYLES,
|
|
72
73
|
CONNECTION_FLOW_ITEM_PROGRESS: () => CONNECTION_FLOW_ITEM_PROGRESS,
|
|
73
74
|
CONNECTION_FLOW_LOADERS: () => CONNECTION_FLOW_LOADERS,
|
|
@@ -106,6 +107,7 @@ __export(src_exports, {
|
|
|
106
107
|
DEFAULT_LAYOUT_OPTIONS: () => DEFAULT_LAYOUT_OPTIONS,
|
|
107
108
|
DEFAULT_SERIES_PALETTE: () => DEFAULT_SERIES_PALETTE,
|
|
108
109
|
DEFAULT_SURFACE_CORNER: () => DEFAULT_SURFACE_CORNER,
|
|
110
|
+
DEFAULT_SURFACE_GUTTER: () => DEFAULT_SURFACE_GUTTER,
|
|
109
111
|
DEFAULT_SURFACE_PADDING: () => DEFAULT_SURFACE_PADDING,
|
|
110
112
|
DEFAULT_SURFACE_TONE: () => DEFAULT_SURFACE_TONE,
|
|
111
113
|
DEFAULT_TOAST_GAP_PX: () => DEFAULT_TOAST_GAP_PX,
|
|
@@ -256,6 +258,7 @@ __export(src_exports, {
|
|
|
256
258
|
STAT_PAGER_PLACEMENTS: () => STAT_PAGER_PLACEMENTS,
|
|
257
259
|
SURFACE_CORNERS: () => SURFACE_CORNERS,
|
|
258
260
|
SURFACE_GLASS_RIM: () => SURFACE_GLASS_RIM,
|
|
261
|
+
SURFACE_GUTTER_AXES: () => SURFACE_GUTTER_AXES,
|
|
259
262
|
SURFACE_PADDINGS: () => SURFACE_PADDINGS,
|
|
260
263
|
SURFACE_TO_BUTTON_VARIANT: () => SURFACE_TO_BUTTON_VARIANT,
|
|
261
264
|
SURFACE_VARIANTS: () => SURFACE_VARIANTS,
|
|
@@ -350,6 +353,7 @@ __export(src_exports, {
|
|
|
350
353
|
WorkflowTracker: () => WorkflowTracker_default,
|
|
351
354
|
WorkflowTrackerDetails: () => WorkflowTrackerDetails_default,
|
|
352
355
|
WorkflowTrackerRail: () => WorkflowTrackerRail_default,
|
|
356
|
+
WorkflowTrackerRollups: () => WorkflowTrackerRollups_default,
|
|
353
357
|
WorkflowTrackerStepDetails: () => WorkflowTrackerStepDetails_default,
|
|
354
358
|
areaPathFromPoints: () => areaPathFromPoints,
|
|
355
359
|
bandAreaPath: () => bandAreaPath,
|
|
@@ -488,6 +492,7 @@ __export(src_exports, {
|
|
|
488
492
|
getStepperTonePalette: () => getStepperTonePalette,
|
|
489
493
|
getSurfaceCornerClass: () => getSurfaceCornerClass,
|
|
490
494
|
getSurfaceCornerRem: () => getSurfaceCornerRem,
|
|
495
|
+
getSurfaceGutterClass: () => getSurfaceGutterClass,
|
|
491
496
|
getSurfacePaddingClass: () => getSurfacePaddingClass,
|
|
492
497
|
getSurfacePaddingClasses: () => getSurfacePaddingClasses,
|
|
493
498
|
getSurfaceTextTokens: () => getSurfaceTextTokens,
|
|
@@ -552,6 +557,7 @@ __export(src_exports, {
|
|
|
552
557
|
mixHex: () => mixHex,
|
|
553
558
|
nicePolarMax: () => nicePolarMax,
|
|
554
559
|
niceRadarMax: () => niceRadarMax,
|
|
560
|
+
nodeHasFailed: () => nodeHasFailed,
|
|
555
561
|
nodeIcon: () => nodeIcon,
|
|
556
562
|
nodeIsActive: () => nodeIsActive,
|
|
557
563
|
nodeIsSkipped: () => nodeIsSkipped,
|
|
@@ -607,6 +613,7 @@ __export(src_exports, {
|
|
|
607
613
|
tintColor: () => tintColor,
|
|
608
614
|
toBoolean: () => toBoolean,
|
|
609
615
|
toDate: () => toDate,
|
|
616
|
+
toRows: () => toRows,
|
|
610
617
|
toSmartVariable: () => toSmartVariable,
|
|
611
618
|
tracePathTo: () => tracePathTo,
|
|
612
619
|
usageTotals: () => usageTotals,
|
|
@@ -5969,6 +5976,15 @@ var getSurfacePaddingClass = (padding) => surfacePaddingClasses[padding] ?? surf
|
|
|
5969
5976
|
var getSurfacePaddingClasses = () => ({
|
|
5970
5977
|
...surfacePaddingClasses
|
|
5971
5978
|
});
|
|
5979
|
+
var SURFACE_GUTTER_AXES = ["top", "right", "bottom", "left"];
|
|
5980
|
+
var surfaceGutterClasses = {
|
|
5981
|
+
top: { none: "mt-0", xs: "mt-2", sm: "mt-4", md: "mt-6", lg: "mt-8", xl: "mt-10" },
|
|
5982
|
+
right: { none: "mr-0", xs: "mr-2", sm: "mr-4", md: "mr-6", lg: "mr-8", xl: "mr-10" },
|
|
5983
|
+
bottom: { none: "mb-0", xs: "mb-2", sm: "mb-4", md: "mb-6", lg: "mb-8", xl: "mb-10" },
|
|
5984
|
+
left: { none: "ml-0", xs: "ml-2", sm: "ml-4", md: "ml-6", lg: "ml-8", xl: "ml-10" }
|
|
5985
|
+
};
|
|
5986
|
+
var DEFAULT_SURFACE_GUTTER = "none";
|
|
5987
|
+
var getSurfaceGutterClass = (axis, gutter) => surfaceGutterClasses[axis][gutter] ?? surfaceGutterClasses[axis][DEFAULT_SURFACE_GUTTER];
|
|
5972
5988
|
var NEUTRAL_TONES = [
|
|
5973
5989
|
"neutral",
|
|
5974
5990
|
"slate",
|
|
@@ -16332,12 +16348,23 @@ var ScrollArea = ({
|
|
|
16332
16348
|
mask = false,
|
|
16333
16349
|
tabIndex = 0,
|
|
16334
16350
|
contentClassName,
|
|
16351
|
+
viewportClassName,
|
|
16352
|
+
viewportRef: viewportRefProp,
|
|
16335
16353
|
children,
|
|
16336
16354
|
className = "",
|
|
16337
16355
|
...rest
|
|
16338
16356
|
}) => {
|
|
16339
16357
|
const viewportId = (0, import_react176.useId)();
|
|
16340
16358
|
const viewportRef = (0, import_react176.useRef)(null);
|
|
16359
|
+
const setViewportRef = (0, import_react176.useCallback)(
|
|
16360
|
+
(el) => {
|
|
16361
|
+
viewportRef.current = el;
|
|
16362
|
+
if (typeof viewportRefProp === "function") viewportRefProp(el);
|
|
16363
|
+
else if (viewportRefProp)
|
|
16364
|
+
viewportRefProp.current = el;
|
|
16365
|
+
},
|
|
16366
|
+
[viewportRefProp]
|
|
16367
|
+
);
|
|
16341
16368
|
const contentRef = (0, import_react176.useRef)(null);
|
|
16342
16369
|
const yTrackRef = (0, import_react176.useRef)(null);
|
|
16343
16370
|
const xTrackRef = (0, import_react176.useRef)(null);
|
|
@@ -16479,7 +16506,7 @@ var ScrollArea = ({
|
|
|
16479
16506
|
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
16480
16507
|
"div",
|
|
16481
16508
|
{
|
|
16482
|
-
ref:
|
|
16509
|
+
ref: setViewportRef,
|
|
16483
16510
|
id: viewportId,
|
|
16484
16511
|
"data-slot": "scrollarea-viewport",
|
|
16485
16512
|
tabIndex: overflow.x || overflow.y ? tabIndex : -1,
|
|
@@ -16494,7 +16521,8 @@ var ScrollArea = ({
|
|
|
16494
16521
|
// and the viewport would simply grow past the frame's cap, get
|
|
16495
16522
|
// clipped by `overflow-hidden` and never learn it was scrollable.
|
|
16496
16523
|
"[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
16497
|
-
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400"
|
|
16524
|
+
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400",
|
|
16525
|
+
viewportClassName
|
|
16498
16526
|
),
|
|
16499
16527
|
children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
16500
16528
|
"div",
|
|
@@ -22037,10 +22065,23 @@ var PageHeader = ({
|
|
|
22037
22065
|
children,
|
|
22038
22066
|
variant = "default",
|
|
22039
22067
|
accentColor = "blue",
|
|
22068
|
+
padding,
|
|
22069
|
+
paddingTop,
|
|
22070
|
+
paddingRight,
|
|
22071
|
+
paddingBottom,
|
|
22072
|
+
paddingLeft,
|
|
22073
|
+
corner = DEFAULT_SURFACE_CORNER,
|
|
22040
22074
|
className = "",
|
|
22041
22075
|
...rest
|
|
22042
22076
|
}) => {
|
|
22043
22077
|
const surface = variant === "default" ? null : getSidebarSurfaceTokens(variant, accentColor);
|
|
22078
|
+
const pair = surface ? "xs" : "none";
|
|
22079
|
+
const gutter = {
|
|
22080
|
+
top: paddingTop ?? padding ?? pair,
|
|
22081
|
+
right: paddingRight ?? padding ?? pair,
|
|
22082
|
+
bottom: paddingBottom ?? padding ?? "none",
|
|
22083
|
+
left: paddingLeft ?? padding ?? "none"
|
|
22084
|
+
};
|
|
22044
22085
|
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
22045
22086
|
"header",
|
|
22046
22087
|
{
|
|
@@ -22048,9 +22089,12 @@ var PageHeader = ({
|
|
|
22048
22089
|
className: (0, import_classnames51.default)(
|
|
22049
22090
|
"flex w-full items-center justify-between gap-4 px-5",
|
|
22050
22091
|
SIDE_MENU_HEADER_HEIGHT,
|
|
22092
|
+
getSurfaceGutterClass("top", gutter.top),
|
|
22093
|
+
getSurfaceGutterClass("right", gutter.right),
|
|
22094
|
+
getSurfaceGutterClass("bottom", gutter.bottom),
|
|
22095
|
+
getSurfaceGutterClass("left", gutter.left),
|
|
22096
|
+
getSurfaceCornerClass(corner),
|
|
22051
22097
|
surface ? (0, import_classnames51.default)(
|
|
22052
|
-
surface.offset,
|
|
22053
|
-
surface.radius,
|
|
22054
22098
|
"border",
|
|
22055
22099
|
surface.border,
|
|
22056
22100
|
surface.shadow,
|
|
@@ -56057,6 +56101,7 @@ var CONNECTION_FLOW_EDGE_STYLES = [
|
|
|
56057
56101
|
"curved",
|
|
56058
56102
|
"straight"
|
|
56059
56103
|
];
|
|
56104
|
+
var CONNECTION_FLOW_CHILD_LAYOUTS = ["fan", "chain"];
|
|
56060
56105
|
var CONNECTION_FLOW_LOADERS = [
|
|
56061
56106
|
"skeleton",
|
|
56062
56107
|
"spinner",
|
|
@@ -56195,6 +56240,8 @@ var DEFAULT_LAYOUT_OPTIONS = {
|
|
|
56195
56240
|
laneGap: 16,
|
|
56196
56241
|
childGap: 12,
|
|
56197
56242
|
childIndent: 28,
|
|
56243
|
+
rowGap: 12,
|
|
56244
|
+
gridIndent: 28,
|
|
56198
56245
|
edgeStyle: "orthogonal",
|
|
56199
56246
|
cornerRadius: 8,
|
|
56200
56247
|
bypassLift: 18,
|
|
@@ -56220,6 +56267,8 @@ var NODE_CORNER_RADIUS = Object.fromEntries(
|
|
|
56220
56267
|
var nodeTone = (node) => node?.tone ?? (node?.status ? STATUS_TONE[node.status] : "neutral");
|
|
56221
56268
|
var nodeIcon = (node) => node?.icon ?? (node?.status ? STATUS_ICON2[node.status] : void 0);
|
|
56222
56269
|
var nodeIsActive = (node) => node?.active ?? node?.status === "running";
|
|
56270
|
+
var nodeHasFailed = (node) => node?.status === "failed";
|
|
56271
|
+
var toRows = (node) => node.rows ?? (node.children ?? []).map((child) => [child]);
|
|
56223
56272
|
var nodeIsSkipped = (node) => node?.skipped ?? (node?.status === "skipped" ? true : void 0);
|
|
56224
56273
|
|
|
56225
56274
|
// ../common/connectionFlow/measure.ts
|
|
@@ -56300,6 +56349,15 @@ var nodeScrolls = (node, options, expanded) => {
|
|
|
56300
56349
|
};
|
|
56301
56350
|
var measureBranch = (node, options, expanded) => {
|
|
56302
56351
|
const own = measureNode(node, options, expanded);
|
|
56352
|
+
if (node.childLayout === "chain") {
|
|
56353
|
+
const rows = toRows(node);
|
|
56354
|
+
if (rows.length === 0) return own;
|
|
56355
|
+
const rowsHeight = rows.reduce(
|
|
56356
|
+
(sum, row, index) => sum + Math.max(0, ...row.map((c) => measureBranch(c, options, expanded))) + (index > 0 ? options.rowGap : 0),
|
|
56357
|
+
0
|
|
56358
|
+
);
|
|
56359
|
+
return own + options.childGap + rowsHeight;
|
|
56360
|
+
}
|
|
56303
56361
|
const children = node.children ?? [];
|
|
56304
56362
|
if (children.length === 0) return own;
|
|
56305
56363
|
const childHeight = children.reduce(
|
|
@@ -56695,6 +56753,7 @@ var layoutConnectionFlow = (input) => {
|
|
|
56695
56753
|
const skipped = resolveSkipped(columns, input.autoState ?? false);
|
|
56696
56754
|
const laidOut = [];
|
|
56697
56755
|
const byId = /* @__PURE__ */ new Map();
|
|
56756
|
+
const chains = /* @__PURE__ */ new Map();
|
|
56698
56757
|
let x = options.padding;
|
|
56699
56758
|
const columnBounds = [];
|
|
56700
56759
|
columns.forEach((column, columnIndex) => {
|
|
@@ -56745,15 +56804,68 @@ var layoutConnectionFlow = (input) => {
|
|
|
56745
56804
|
placeChildren(child, depth + 1, indentX + options.childIndent);
|
|
56746
56805
|
});
|
|
56747
56806
|
};
|
|
56748
|
-
|
|
56807
|
+
if (node.childLayout === "chain") {
|
|
56808
|
+
const rows = toRows(node);
|
|
56809
|
+
if (rows.length > 0) {
|
|
56810
|
+
const cardWidth = options.metrics.width;
|
|
56811
|
+
const gridX = x + options.gridIndent;
|
|
56812
|
+
let rowY = y + ownHeight + options.childGap;
|
|
56813
|
+
const walk2 = [];
|
|
56814
|
+
let maxCols = 1;
|
|
56815
|
+
rows.forEach((row, rowIdx) => {
|
|
56816
|
+
maxCols = Math.max(maxCols, row.length);
|
|
56817
|
+
let rowBottom = rowY;
|
|
56818
|
+
row.forEach((card, col) => {
|
|
56819
|
+
const cardHeight = measureNode(card, options, input.expanded);
|
|
56820
|
+
const cardEntry = {
|
|
56821
|
+
id: card.id,
|
|
56822
|
+
node: card,
|
|
56823
|
+
outline: "",
|
|
56824
|
+
x: gridX + col * (cardWidth + options.connectorWidth),
|
|
56825
|
+
y: rowY,
|
|
56826
|
+
width: cardWidth,
|
|
56827
|
+
height: cardHeight,
|
|
56828
|
+
anchorY: cardHeight / 2,
|
|
56829
|
+
column: columnIndex,
|
|
56830
|
+
depth: 1,
|
|
56831
|
+
tone: toneOf(card),
|
|
56832
|
+
scrollable: nodeScrolls(card, options, input.expanded)
|
|
56833
|
+
};
|
|
56834
|
+
laidOut.push(cardEntry);
|
|
56835
|
+
byId.set(card.id, cardEntry);
|
|
56836
|
+
walk2.push({ card: cardEntry, row: rowIdx });
|
|
56837
|
+
rowBottom = Math.max(rowBottom, rowY + cardHeight);
|
|
56838
|
+
});
|
|
56839
|
+
rowY = rowBottom + options.rowGap;
|
|
56840
|
+
});
|
|
56841
|
+
const live = walk2.filter((w) => !nodeIsSkipped(w.card.node));
|
|
56842
|
+
const exitCard = live.length > 0 ? live[live.length - 1].card : null;
|
|
56843
|
+
chains.set(node.id, {
|
|
56844
|
+
parentNode: node,
|
|
56845
|
+
walk: walk2,
|
|
56846
|
+
exitCard,
|
|
56847
|
+
exitHasBranch: Boolean(exitCard?.node.success?.to),
|
|
56848
|
+
gridWidth: options.gridIndent + maxCols * cardWidth + (maxCols - 1) * options.connectorWidth
|
|
56849
|
+
});
|
|
56850
|
+
} else {
|
|
56851
|
+
placeChildren(node, 1, x + options.childIndent);
|
|
56852
|
+
}
|
|
56853
|
+
} else {
|
|
56854
|
+
placeChildren(node, 1, x + options.childIndent);
|
|
56855
|
+
}
|
|
56749
56856
|
y += heights[laneIndex] + options.laneGap;
|
|
56750
56857
|
});
|
|
56858
|
+
const chainInfo = column.parallel ? void 0 : chains.get(column.nodes[0].id);
|
|
56859
|
+
const columnWidth = Math.max(
|
|
56860
|
+
options.metrics.width,
|
|
56861
|
+
chainInfo?.gridWidth ?? 0
|
|
56862
|
+
);
|
|
56751
56863
|
columnBounds.push({
|
|
56752
56864
|
start: x,
|
|
56753
|
-
end: x +
|
|
56865
|
+
end: x + columnWidth,
|
|
56754
56866
|
centre: options.padding + stackHeight / 2
|
|
56755
56867
|
});
|
|
56756
|
-
x +=
|
|
56868
|
+
x += columnWidth + options.connectorWidth;
|
|
56757
56869
|
});
|
|
56758
56870
|
const edges = [];
|
|
56759
56871
|
const connectors = /* @__PURE__ */ new Map();
|
|
@@ -56811,7 +56923,10 @@ var layoutConnectionFlow = (input) => {
|
|
|
56811
56923
|
if (columnIsTerminal(sourceIndex)) return;
|
|
56812
56924
|
if (skipped.has(columnIndex)) return;
|
|
56813
56925
|
const isBypass = sourceIndex !== columnIndex - 1;
|
|
56814
|
-
const
|
|
56926
|
+
const chainSrc = columns[sourceIndex].parallel ? void 0 : chains.get(columns[sourceIndex].nodes[0].id);
|
|
56927
|
+
if (chainSrc && (!chainSrc.exitCard || chainSrc.exitHasBranch)) return;
|
|
56928
|
+
if (chainSrc?.exitCard?.node.terminal === true) return;
|
|
56929
|
+
const sourceNodes = chainSrc?.exitCard ? [chainSrc.exitCard.node] : columns[sourceIndex].nodes;
|
|
56815
56930
|
const targetNodes = column.nodes;
|
|
56816
56931
|
const state = (sourceNode, targetNode) => targetNode.connector?.state ?? (input.autoState ? toneOf(sourceNode) !== "neutral" ? nodeIsActive(targetNode) ? "flowing" : "stopped" : "disabled" : input.flowState ?? "flowing");
|
|
56817
56932
|
const animatedFor = (cfg, edgeState) => (cfg?.animated ?? input.animated ?? true) && (edgeState === "flowing" || edgeState === "stopped" && (cfg?.animateCompleted ?? false));
|
|
@@ -56821,7 +56936,7 @@ var layoutConnectionFlow = (input) => {
|
|
|
56821
56936
|
labelUsed = true;
|
|
56822
56937
|
return label;
|
|
56823
56938
|
};
|
|
56824
|
-
const sourceSpan = columnBox(sourceIndex);
|
|
56939
|
+
const sourceSpan = chainSrc?.exitCard ? boxOf(chainSrc.exitCard) : columnBox(sourceIndex);
|
|
56825
56940
|
const targetSpan = columnBox(columnIndex);
|
|
56826
56941
|
if (!sourceSpan || !targetSpan) return;
|
|
56827
56942
|
const sides = selectSides(sourceSpan, targetSpan);
|
|
@@ -56905,6 +57020,7 @@ var layoutConnectionFlow = (input) => {
|
|
|
56905
57020
|
});
|
|
56906
57021
|
});
|
|
56907
57022
|
const childEdges = (parent) => {
|
|
57023
|
+
if (parent.childLayout === "chain") return;
|
|
56908
57024
|
const parentEntry = byId.get(parent.id);
|
|
56909
57025
|
if (!parentEntry) return;
|
|
56910
57026
|
(parent.children ?? []).forEach((child) => {
|
|
@@ -56966,6 +57082,146 @@ var layoutConnectionFlow = (input) => {
|
|
|
56966
57082
|
});
|
|
56967
57083
|
};
|
|
56968
57084
|
input.nodes.forEach(childEdges);
|
|
57085
|
+
const emitFlowEdge = (o) => {
|
|
57086
|
+
const route = routePorts(o.fromPort, o.toPort, {
|
|
57087
|
+
style: o.cfg?.edgeStyle ?? options.edgeStyle,
|
|
57088
|
+
stub: Math.min(18, options.connectorWidth / 3),
|
|
57089
|
+
radius: options.cornerRadius,
|
|
57090
|
+
trim: trimFor(o.cfg),
|
|
57091
|
+
via: o.via
|
|
57092
|
+
});
|
|
57093
|
+
const animated = (o.cfg?.animated ?? input.animated ?? true) && (o.state === "flowing" || o.state === "stopped" && (o.cfg?.animateCompleted ?? false));
|
|
57094
|
+
addConnector(o.fromEntry.id, o.fromPort, o.sourceTone, o.state, animated, o.id, o.cfg);
|
|
57095
|
+
addConnector(o.toEntry.id, o.toPort, o.targetTone, o.state, animated, o.id, o.cfg);
|
|
57096
|
+
edges.push({
|
|
57097
|
+
id: o.id,
|
|
57098
|
+
fromId: o.fromEntry.id,
|
|
57099
|
+
toId: o.toEntry.id,
|
|
57100
|
+
state: o.state,
|
|
57101
|
+
points: route.points,
|
|
57102
|
+
d: route.d,
|
|
57103
|
+
sourceTone: o.sourceTone,
|
|
57104
|
+
targetTone: o.targetTone,
|
|
57105
|
+
bypass: false,
|
|
57106
|
+
emitIndex: 0,
|
|
57107
|
+
emitCount: 1,
|
|
57108
|
+
emitSpan: 0,
|
|
57109
|
+
animated,
|
|
57110
|
+
label: o.label,
|
|
57111
|
+
kind: o.kind,
|
|
57112
|
+
branchKind: o.branchKind
|
|
57113
|
+
});
|
|
57114
|
+
};
|
|
57115
|
+
const sidePort = (entry, side) => port(boxOf(entry), side, entry.anchorY / entry.height);
|
|
57116
|
+
const branchToneOf = (branch, kind) => branch.tone ?? (kind === "success" ? STATUS_TONE.succeeded : STATUS_TONE.failed);
|
|
57117
|
+
const emitBranch = (fromEntry, branch, kind) => {
|
|
57118
|
+
if (!branch.to) return;
|
|
57119
|
+
const target = byId.get(branch.to);
|
|
57120
|
+
if (!target || target.id === fromEntry.id) return;
|
|
57121
|
+
const tone = branchToneOf(branch, kind);
|
|
57122
|
+
const state = kind === "failure" ? nodeHasFailed(fromEntry.node) ? "flowing" : "stopped" : nodeHasFailed(fromEntry.node) ? "stopped" : "flowing";
|
|
57123
|
+
const srcBox = boxOf(fromEntry);
|
|
57124
|
+
const tgtBox = boxOf(target);
|
|
57125
|
+
const upstream = tgtBox.y + tgtBox.height <= srcBox.y + 1 || tgtBox.x + tgtBox.width <= srcBox.x + 1;
|
|
57126
|
+
if (upstream && kind === "failure") {
|
|
57127
|
+
emitFlowEdge({
|
|
57128
|
+
id: `${fromEntry.id}~fail>${target.id}`,
|
|
57129
|
+
fromEntry,
|
|
57130
|
+
toEntry: target,
|
|
57131
|
+
fromPort: port(srcBox, "left", fromEntry.anchorY / fromEntry.height),
|
|
57132
|
+
toPort: port(tgtBox, "top", 0.5),
|
|
57133
|
+
via: { x: Math.min(srcBox.x, tgtBox.x) - options.bypassLift },
|
|
57134
|
+
state,
|
|
57135
|
+
sourceTone: tone,
|
|
57136
|
+
targetTone: tone,
|
|
57137
|
+
label: branch.label,
|
|
57138
|
+
kind: "branch",
|
|
57139
|
+
branchKind: kind
|
|
57140
|
+
});
|
|
57141
|
+
return;
|
|
57142
|
+
}
|
|
57143
|
+
const sides = selectSides(srcBox, tgtBox);
|
|
57144
|
+
emitFlowEdge({
|
|
57145
|
+
id: `${fromEntry.id}~${kind === "failure" ? "fail" : "ok"}>${target.id}`,
|
|
57146
|
+
fromEntry,
|
|
57147
|
+
toEntry: target,
|
|
57148
|
+
fromPort: sidePort(fromEntry, sides.from),
|
|
57149
|
+
toPort: sidePort(target, sides.to),
|
|
57150
|
+
state,
|
|
57151
|
+
sourceTone: tone,
|
|
57152
|
+
targetTone: tone,
|
|
57153
|
+
label: branch.label,
|
|
57154
|
+
kind: "branch",
|
|
57155
|
+
branchKind: kind
|
|
57156
|
+
});
|
|
57157
|
+
};
|
|
57158
|
+
chains.forEach((chain) => {
|
|
57159
|
+
const parentEntry = byId.get(chain.parentNode.id);
|
|
57160
|
+
if (!parentEntry) return;
|
|
57161
|
+
if (nodeIsSkipped(chain.parentNode) === true) return;
|
|
57162
|
+
const live = chain.walk.filter((w) => !nodeIsSkipped(w.card.node));
|
|
57163
|
+
if (live.length === 0) return;
|
|
57164
|
+
const first = live[0].card;
|
|
57165
|
+
const parentBox = boxOf(parentEntry);
|
|
57166
|
+
const firstBox = boxOf(first);
|
|
57167
|
+
emitFlowEdge({
|
|
57168
|
+
id: `${parentEntry.id}~in>${first.id}`,
|
|
57169
|
+
fromEntry: parentEntry,
|
|
57170
|
+
toEntry: first,
|
|
57171
|
+
fromPort: portAt(
|
|
57172
|
+
parentBox,
|
|
57173
|
+
"bottom",
|
|
57174
|
+
firstBox.x + firstBox.width / 2 - parentBox.x
|
|
57175
|
+
),
|
|
57176
|
+
toPort: port(firstBox, "top", 0.5),
|
|
57177
|
+
state: first.node.connector?.state ?? (nodeHasFailed(parentEntry.node) ? "stopped" : nodeIsActive(first.node) ? "flowing" : "stopped"),
|
|
57178
|
+
sourceTone: toneOf(parentEntry.node),
|
|
57179
|
+
targetTone: toneOf(first.node),
|
|
57180
|
+
cfg: first.node.connector,
|
|
57181
|
+
kind: "chain"
|
|
57182
|
+
});
|
|
57183
|
+
live.forEach((w, i) => {
|
|
57184
|
+
const src = w.card;
|
|
57185
|
+
if (src.node.success?.to) {
|
|
57186
|
+
emitBranch(src, src.node.success, "success");
|
|
57187
|
+
return;
|
|
57188
|
+
}
|
|
57189
|
+
const next = live[i + 1];
|
|
57190
|
+
if (!next) return;
|
|
57191
|
+
const tgt = next.card;
|
|
57192
|
+
const srcBox = boxOf(src);
|
|
57193
|
+
const tgtBox = boxOf(tgt);
|
|
57194
|
+
const sameRow = next.row === w.row;
|
|
57195
|
+
const gapStart = srcBox.x + srcBox.width;
|
|
57196
|
+
const gapEnd = tgtBox.x;
|
|
57197
|
+
emitFlowEdge({
|
|
57198
|
+
id: `${src.id}~walk>${tgt.id}`,
|
|
57199
|
+
fromEntry: src,
|
|
57200
|
+
toEntry: tgt,
|
|
57201
|
+
fromPort: sameRow ? port(srcBox, "right", src.anchorY / src.height) : port(srcBox, "bottom", 0.5),
|
|
57202
|
+
toPort: sameRow ? port(tgtBox, "left", tgt.anchorY / tgt.height) : port(tgtBox, "top", 0.5),
|
|
57203
|
+
via: sameRow && gapEnd > gapStart ? { x: (gapStart + gapEnd) / 2 } : void 0,
|
|
57204
|
+
state: tgt.node.connector?.state ?? (nodeHasFailed(src.node) ? "stopped" : nodeIsActive(tgt.node) ? "flowing" : "stopped"),
|
|
57205
|
+
sourceTone: src.node.success ? branchToneOf(src.node.success, "success") : toneOf(src.node),
|
|
57206
|
+
targetTone: toneOf(tgt.node),
|
|
57207
|
+
cfg: tgt.node.connector,
|
|
57208
|
+
label: src.node.success?.label ?? tgt.node.connector?.label,
|
|
57209
|
+
kind: "chain"
|
|
57210
|
+
});
|
|
57211
|
+
});
|
|
57212
|
+
chain.walk.forEach((w) => {
|
|
57213
|
+
if (w.card.node.failure) emitBranch(w.card, w.card.node.failure, "failure");
|
|
57214
|
+
});
|
|
57215
|
+
});
|
|
57216
|
+
const chainCardIds = /* @__PURE__ */ new Set();
|
|
57217
|
+
chains.forEach(
|
|
57218
|
+
(chain) => chain.walk.forEach((w) => chainCardIds.add(w.card.id))
|
|
57219
|
+
);
|
|
57220
|
+
laidOut.forEach((entry) => {
|
|
57221
|
+
if (chainCardIds.has(entry.id)) return;
|
|
57222
|
+
if (entry.node.success?.to) emitBranch(entry, entry.node.success, "success");
|
|
57223
|
+
if (entry.node.failure?.to) emitBranch(entry, entry.node.failure, "failure");
|
|
57224
|
+
});
|
|
56969
57225
|
const emittedBySource = /* @__PURE__ */ new Map();
|
|
56970
57226
|
edges.forEach((edge) => {
|
|
56971
57227
|
if (!edge.animated) return;
|
|
@@ -57496,6 +57752,29 @@ var ConnectionFlowSvg = ({
|
|
|
57496
57752
|
const isLit = (edge) => highlightEdges.size === 0 || highlightEdges.has(edge.id);
|
|
57497
57753
|
const nodeOpacity = (node) => highlightNodes.size === 0 || highlightNodes.has(node.id) ? 1 : 0.22;
|
|
57498
57754
|
const connectorOpacity = (connector) => highlightEdges.size === 0 || connector.edgeIds.some((id) => highlightEdges.has(id)) ? 1 : 0.22;
|
|
57755
|
+
const cardContent = (laid) => {
|
|
57756
|
+
const content = renderNode ? renderNode(laid) : /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
57757
|
+
ConnectionFlowNodeBody_default,
|
|
57758
|
+
{
|
|
57759
|
+
node: laid,
|
|
57760
|
+
metrics,
|
|
57761
|
+
showProgress,
|
|
57762
|
+
options,
|
|
57763
|
+
scrollable: laid.scrollable,
|
|
57764
|
+
expanded,
|
|
57765
|
+
onToggleExpanded
|
|
57766
|
+
}
|
|
57767
|
+
);
|
|
57768
|
+
return laid.scrollable ? /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
57769
|
+
ScrollArea_default,
|
|
57770
|
+
{
|
|
57771
|
+
variant: "auto",
|
|
57772
|
+
className: "h-full w-full",
|
|
57773
|
+
contentClassName: "block w-full",
|
|
57774
|
+
children: content
|
|
57775
|
+
}
|
|
57776
|
+
) : content;
|
|
57777
|
+
};
|
|
57499
57778
|
return /* @__PURE__ */ (0, import_jsx_runtime289.jsxs)("div", { className: "relative h-full w-full overflow-hidden", children: [
|
|
57500
57779
|
/* @__PURE__ */ (0, import_jsx_runtime289.jsxs)(
|
|
57501
57780
|
"svg",
|
|
@@ -57659,10 +57938,6 @@ var ConnectionFlowSvg = ({
|
|
|
57659
57938
|
children: /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
57660
57939
|
"div",
|
|
57661
57940
|
{
|
|
57662
|
-
"data-scrolls": laid.scrollable ? "" : void 0,
|
|
57663
|
-
className: (0, import_classnames101.default)(
|
|
57664
|
-
laid.scrollable && `overflow-y-auto ${THIN_SCROLLBAR_FIELD}`
|
|
57665
|
-
),
|
|
57666
57941
|
style: {
|
|
57667
57942
|
width: laid.width,
|
|
57668
57943
|
height: laid.height,
|
|
@@ -57670,19 +57945,7 @@ var ConnectionFlowSvg = ({
|
|
|
57670
57945
|
transform: `scale(${scale})`,
|
|
57671
57946
|
transformOrigin: "top left"
|
|
57672
57947
|
},
|
|
57673
|
-
|
|
57674
|
-
children: renderNode ? renderNode(laid) : /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
57675
|
-
ConnectionFlowNodeBody_default,
|
|
57676
|
-
{
|
|
57677
|
-
node: laid,
|
|
57678
|
-
metrics,
|
|
57679
|
-
showProgress,
|
|
57680
|
-
options,
|
|
57681
|
-
scrollable: laid.scrollable,
|
|
57682
|
-
expanded,
|
|
57683
|
-
onToggleExpanded
|
|
57684
|
-
}
|
|
57685
|
-
)
|
|
57948
|
+
children: cardContent(laid)
|
|
57686
57949
|
}
|
|
57687
57950
|
)
|
|
57688
57951
|
},
|
|
@@ -57901,6 +58164,21 @@ var ConnectionFlow = import_react271.default.forwardRef(function ConnectionFlow2
|
|
|
57901
58164
|
observer.observe(element);
|
|
57902
58165
|
return () => observer.disconnect();
|
|
57903
58166
|
}, []);
|
|
58167
|
+
(0, import_react271.useEffect)(() => {
|
|
58168
|
+
const element = viewportRef.current;
|
|
58169
|
+
if (!element || !interactive) return;
|
|
58170
|
+
const onWheel = (event) => {
|
|
58171
|
+
if (!(event.ctrlKey || event.metaKey)) return;
|
|
58172
|
+
event.preventDefault();
|
|
58173
|
+
const rect = element.getBoundingClientRect();
|
|
58174
|
+
setZoom(
|
|
58175
|
+
scale * (event.deltaY < 0 ? 1.1 : 1 / 1.1),
|
|
58176
|
+
{ x: event.clientX - rect.left, y: event.clientY - rect.top }
|
|
58177
|
+
);
|
|
58178
|
+
};
|
|
58179
|
+
element.addEventListener("wheel", onWheel, { passive: false });
|
|
58180
|
+
return () => element.removeEventListener("wheel", onWheel);
|
|
58181
|
+
}, [interactive, scale, setZoom]);
|
|
57904
58182
|
(0, import_react271.useEffect)(() => {
|
|
57905
58183
|
if (fitOnLoad && viewport.width) fit();
|
|
57906
58184
|
}, [fitOnLoad, nodes, viewport.width, viewport.height]);
|
|
@@ -58014,22 +58292,17 @@ var ConnectionFlow = import_react271.default.forwardRef(function ConnectionFlow2
|
|
|
58014
58292
|
style: { height: typeof height === "number" ? `${height}px` : height },
|
|
58015
58293
|
children: [
|
|
58016
58294
|
/* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
58017
|
-
|
|
58295
|
+
ScrollArea_default,
|
|
58018
58296
|
{
|
|
58019
|
-
|
|
58020
|
-
|
|
58297
|
+
variant: "auto",
|
|
58298
|
+
viewportRef,
|
|
58299
|
+
viewportClassName: "overscroll-contain",
|
|
58300
|
+
className: "h-full w-full select-none",
|
|
58021
58301
|
style: { cursor: panning ? "grabbing" : void 0 },
|
|
58022
|
-
onWheel: (event) => {
|
|
58023
|
-
if (!interactive) return;
|
|
58024
|
-
if (event.target.closest("[data-scrolls]")) return;
|
|
58025
|
-
const rect = viewportRef.current?.getBoundingClientRect();
|
|
58026
|
-
const anchor = rect ? { x: event.clientX - rect.left, y: event.clientY - rect.top } : void 0;
|
|
58027
|
-
setZoom(scale * (event.deltaY < 0 ? 1.1 : 1 / 1.1), anchor);
|
|
58028
|
-
},
|
|
58029
58302
|
onPointerDown: (event) => {
|
|
58030
58303
|
if (!interactive || event.button !== 0) return;
|
|
58031
58304
|
if (event.target.closest(
|
|
58032
|
-
|
|
58305
|
+
'button, a, input, select, textarea, [data-no-pan], [data-slot="scrollarea-scrollbar"]'
|
|
58033
58306
|
)) {
|
|
58034
58307
|
return;
|
|
58035
58308
|
}
|
|
@@ -58042,7 +58315,7 @@ var ConnectionFlow = import_react271.default.forwardRef(function ConnectionFlow2
|
|
|
58042
58315
|
scrollLeft: element.scrollLeft,
|
|
58043
58316
|
scrollTop: element.scrollTop
|
|
58044
58317
|
};
|
|
58045
|
-
|
|
58318
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
58046
58319
|
},
|
|
58047
58320
|
onPointerMove: (event) => {
|
|
58048
58321
|
if (!panning) return;
|
|
@@ -60187,14 +60460,97 @@ var TreeView = ({
|
|
|
60187
60460
|
var TreeView_default = TreeView;
|
|
60188
60461
|
|
|
60189
60462
|
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
60190
|
-
var
|
|
60191
|
-
var
|
|
60463
|
+
var import_react283 = require("react");
|
|
60464
|
+
var import_classnames119 = __toESM(require("classnames"), 1);
|
|
60192
60465
|
|
|
60193
|
-
// src/components/WorkflowTracker/
|
|
60194
|
-
var
|
|
60466
|
+
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
60467
|
+
var import_react279 = require("react");
|
|
60468
|
+
var import_classnames112 = __toESM(require("classnames"), 1);
|
|
60195
60469
|
|
|
60196
|
-
// src/components/WorkflowTracker/
|
|
60470
|
+
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60471
|
+
var import_react277 = __toESM(require("react"), 1);
|
|
60472
|
+
var import_classnames111 = __toESM(require("classnames"), 1);
|
|
60473
|
+
|
|
60474
|
+
// src/components/WorkflowTracker/WorkflowSkeleton.tsx
|
|
60197
60475
|
var import_classnames107 = __toESM(require("classnames"), 1);
|
|
60476
|
+
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
60477
|
+
var Bar3 = ({
|
|
60478
|
+
width,
|
|
60479
|
+
className
|
|
60480
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
60481
|
+
"span",
|
|
60482
|
+
{
|
|
60483
|
+
className: (0, import_classnames107.default)(
|
|
60484
|
+
"block h-2.5 rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
60485
|
+
className
|
|
60486
|
+
),
|
|
60487
|
+
style: { width }
|
|
60488
|
+
}
|
|
60489
|
+
);
|
|
60490
|
+
var Dot = () => /* @__PURE__ */ (0, import_jsx_runtime296.jsx)("span", { className: "h-5 w-5 shrink-0 rounded-full bg-neutral-200 dark:bg-neutral-800" });
|
|
60491
|
+
var WorkflowHeaderSkeleton = ({ hasIcon = false, iconCorner = DEFAULT_SURFACE_CORNER }) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "mb-5 flex animate-pulse flex-wrap items-start justify-between gap-3 motion-reduce:animate-none", children: [
|
|
60492
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
60493
|
+
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
60494
|
+
Bar3,
|
|
60495
|
+
{
|
|
60496
|
+
width: "3rem",
|
|
60497
|
+
className: (0, import_classnames107.default)("h-12", getSurfaceCornerClass(iconCorner))
|
|
60498
|
+
}
|
|
60499
|
+
),
|
|
60500
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "space-y-3", children: [
|
|
60501
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "11rem", className: "h-2" }),
|
|
60502
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "16rem", className: "h-6" })
|
|
60503
|
+
] })
|
|
60504
|
+
] }),
|
|
60505
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "9rem", className: "h-6 rounded-full" })
|
|
60506
|
+
] });
|
|
60507
|
+
var WorkflowRailSkeleton = ({
|
|
60508
|
+
rows = 6
|
|
60509
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60510
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "border-b border-neutral-200 px-5 pb-4 pt-5 dark:border-neutral-800", children: [
|
|
60511
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60512
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "4.5rem" }),
|
|
60513
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "2rem" })
|
|
60514
|
+
] }),
|
|
60515
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("span", { className: "mt-3 block h-1 w-full rounded-full bg-neutral-200 dark:bg-neutral-800" }),
|
|
60516
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "80%", className: "mt-3" })
|
|
60517
|
+
] }),
|
|
60518
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "space-y-5 px-5 py-5", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
60519
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Dot, {}),
|
|
60520
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
60521
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: index % 2 === 0 ? "62%" : "48%" }),
|
|
60522
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "34%", className: "h-2" })
|
|
60523
|
+
] })
|
|
60524
|
+
] }, index)) })
|
|
60525
|
+
] });
|
|
60526
|
+
var WorkflowDetailSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60527
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "space-y-4 px-5 pb-6 pt-5 sm:px-6", children: [
|
|
60528
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60529
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "6rem" }),
|
|
60530
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "4rem" })
|
|
60531
|
+
] }),
|
|
60532
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "45%", className: "h-5" }),
|
|
60533
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "space-y-2", children: [
|
|
60534
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "92%", className: "h-2" }),
|
|
60535
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "70%", className: "h-2" })
|
|
60536
|
+
] }),
|
|
60537
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex gap-10 pt-2", children: [
|
|
60538
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "5rem" }),
|
|
60539
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "6rem" }),
|
|
60540
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "4rem" })
|
|
60541
|
+
] })
|
|
60542
|
+
] }),
|
|
60543
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "border-y border-neutral-200 bg-neutral-50 px-5 py-3 dark:border-neutral-800 dark:bg-white/5 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "5rem" }) }),
|
|
60544
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "divide-y divide-neutral-200 dark:divide-neutral-800", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center gap-3 px-5 py-4 sm:px-6", children: [
|
|
60545
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Dot, {}),
|
|
60546
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: index === 1 ? "38%" : "30%" }),
|
|
60547
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("span", { className: "flex-1" }),
|
|
60548
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "3rem" })
|
|
60549
|
+
] }, index)) })
|
|
60550
|
+
] });
|
|
60551
|
+
|
|
60552
|
+
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
60553
|
+
var import_classnames108 = __toESM(require("classnames"), 1);
|
|
60198
60554
|
|
|
60199
60555
|
// src/components/WorkflowTracker/surfaces.ts
|
|
60200
60556
|
var isTranslucentVariant = (variant) => getSurfaceTextTokens(variant).translucent;
|
|
@@ -60332,13 +60688,13 @@ var getStatusTokens = (status, palette) => {
|
|
|
60332
60688
|
};
|
|
60333
60689
|
|
|
60334
60690
|
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
60335
|
-
var
|
|
60691
|
+
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
60336
60692
|
var sizeTokens11 = {
|
|
60337
60693
|
sm: { node: "h-4 w-4", glyph: "h-2.5 w-2.5" },
|
|
60338
60694
|
md: { node: "h-5 w-5", glyph: "h-3 w-3" },
|
|
60339
60695
|
lg: { node: "h-9 w-9", glyph: "h-5 w-5" }
|
|
60340
60696
|
};
|
|
60341
|
-
var DashedRing = ({ className }) => /* @__PURE__ */ (0,
|
|
60697
|
+
var DashedRing = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("svg", { viewBox: "0 0 20 20", "aria-hidden": "true", className, children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
60342
60698
|
"circle",
|
|
60343
60699
|
{
|
|
60344
60700
|
cx: "10",
|
|
@@ -60351,7 +60707,7 @@ var DashedRing = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime296.js
|
|
|
60351
60707
|
strokeLinecap: "round"
|
|
60352
60708
|
}
|
|
60353
60709
|
) });
|
|
60354
|
-
var AlertGlyph = ({ className }) => /* @__PURE__ */ (0,
|
|
60710
|
+
var AlertGlyph = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", className, children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
60355
60711
|
"path",
|
|
60356
60712
|
{
|
|
60357
60713
|
d: "M12 6.5a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1Zm0 9.25a1.15 1.15 0 1 1 0 2.3 1.15 1.15 0 0 1 0-2.3Z",
|
|
@@ -60366,33 +60722,33 @@ var WorkflowStatusNode = ({
|
|
|
60366
60722
|
}) => {
|
|
60367
60723
|
const tokens = getStatusTokens(status, palette);
|
|
60368
60724
|
const { node, glyph } = sizeTokens11[size];
|
|
60369
|
-
return /* @__PURE__ */ (0,
|
|
60725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
|
|
60370
60726
|
"span",
|
|
60371
60727
|
{
|
|
60372
60728
|
"aria-hidden": "true",
|
|
60373
|
-
className: (0,
|
|
60729
|
+
className: (0, import_classnames108.default)("relative inline-flex shrink-0", node, className),
|
|
60374
60730
|
children: [
|
|
60375
|
-
tokens.pulse && /* @__PURE__ */ (0,
|
|
60731
|
+
tokens.pulse && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
60376
60732
|
"span",
|
|
60377
60733
|
{
|
|
60378
|
-
className: (0,
|
|
60734
|
+
className: (0, import_classnames108.default)(
|
|
60379
60735
|
"absolute inset-0 animate-ping rounded-full opacity-60 motion-reduce:hidden",
|
|
60380
60736
|
`bg-${tokens.tone}-300 dark:bg-${tokens.tone}-500`
|
|
60381
60737
|
)
|
|
60382
60738
|
}
|
|
60383
60739
|
),
|
|
60384
|
-
/* @__PURE__ */ (0,
|
|
60740
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
|
|
60385
60741
|
"span",
|
|
60386
60742
|
{
|
|
60387
|
-
className: (0,
|
|
60743
|
+
className: (0, import_classnames108.default)(
|
|
60388
60744
|
"relative inline-flex h-full w-full items-center justify-center rounded-full",
|
|
60389
60745
|
tokens.node
|
|
60390
60746
|
),
|
|
60391
60747
|
children: [
|
|
60392
|
-
tokens.glyph === "check" && /* @__PURE__ */ (0,
|
|
60393
|
-
tokens.glyph === "pause" && /* @__PURE__ */ (0,
|
|
60394
|
-
tokens.glyph === "alert" && /* @__PURE__ */ (0,
|
|
60395
|
-
tokens.glyph === "dashed" && /* @__PURE__ */ (0,
|
|
60748
|
+
tokens.glyph === "check" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Check, { className: (0, import_classnames108.default)(glyph, tokens.glyphClass) }),
|
|
60749
|
+
tokens.glyph === "pause" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Pause, { className: (0, import_classnames108.default)(glyph, tokens.glyphClass) }),
|
|
60750
|
+
tokens.glyph === "alert" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(AlertGlyph, { className: (0, import_classnames108.default)(glyph, tokens.glyphClass) }),
|
|
60751
|
+
tokens.glyph === "dashed" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(DashedRing, { className: (0, import_classnames108.default)("h-full w-full", tokens.glyphClass) })
|
|
60396
60752
|
]
|
|
60397
60753
|
}
|
|
60398
60754
|
)
|
|
@@ -60402,34 +60758,73 @@ var WorkflowStatusNode = ({
|
|
|
60402
60758
|
};
|
|
60403
60759
|
var WorkflowStatusNode_default = WorkflowStatusNode;
|
|
60404
60760
|
|
|
60761
|
+
// src/components/WorkflowTracker/WorkflowQuickActions.tsx
|
|
60762
|
+
var import_classnames109 = __toESM(require("classnames"), 1);
|
|
60763
|
+
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
60764
|
+
var WorkflowQuickActions = ({
|
|
60765
|
+
stepId,
|
|
60766
|
+
actions,
|
|
60767
|
+
palette,
|
|
60768
|
+
groupLabel,
|
|
60769
|
+
onAction,
|
|
60770
|
+
className,
|
|
60771
|
+
style
|
|
60772
|
+
}) => {
|
|
60773
|
+
if (!onAction || actions.length === 0) return null;
|
|
60774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60775
|
+
"div",
|
|
60776
|
+
{
|
|
60777
|
+
role: "group",
|
|
60778
|
+
"aria-label": groupLabel,
|
|
60779
|
+
className: (0, import_classnames109.default)("flex flex-wrap gap-1.5", className),
|
|
60780
|
+
style,
|
|
60781
|
+
children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60782
|
+
Button_default,
|
|
60783
|
+
{
|
|
60784
|
+
size: "xs",
|
|
60785
|
+
weight: "medium",
|
|
60786
|
+
variant: action.variant ?? "soft",
|
|
60787
|
+
color: action.tone ?? palette.accent,
|
|
60788
|
+
leadingIcon: action.leadingIcon,
|
|
60789
|
+
disabled: action.disabled,
|
|
60790
|
+
onClick: () => onAction(stepId, action.id),
|
|
60791
|
+
children: action.label
|
|
60792
|
+
},
|
|
60793
|
+
action.id
|
|
60794
|
+
))
|
|
60795
|
+
}
|
|
60796
|
+
);
|
|
60797
|
+
};
|
|
60798
|
+
var WorkflowQuickActions_default = WorkflowQuickActions;
|
|
60799
|
+
|
|
60405
60800
|
// src/components/WorkflowTracker/parts.tsx
|
|
60406
|
-
var
|
|
60407
|
-
var
|
|
60801
|
+
var import_classnames110 = __toESM(require("classnames"), 1);
|
|
60802
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
60408
60803
|
var resolve = (surfaces) => surfaces ?? getSurfaceTokens(false);
|
|
60409
|
-
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */ (0,
|
|
60804
|
+
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
60410
60805
|
"div",
|
|
60411
60806
|
{
|
|
60412
|
-
className: (0,
|
|
60807
|
+
className: (0, import_classnames110.default)(
|
|
60413
60808
|
"flex flex-col items-center justify-center gap-3 px-6 py-10 text-center",
|
|
60414
60809
|
className
|
|
60415
60810
|
),
|
|
60416
60811
|
children: [
|
|
60417
|
-
/* @__PURE__ */ (0,
|
|
60418
|
-
/* @__PURE__ */ (0,
|
|
60419
|
-
/* @__PURE__ */ (0,
|
|
60812
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(WorkflowStatusNode_default, { status: "not_started", palette, size: "lg" }),
|
|
60813
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-1", children: [
|
|
60814
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60420
60815
|
"p",
|
|
60421
60816
|
{
|
|
60422
|
-
className: (0,
|
|
60817
|
+
className: (0, import_classnames110.default)(
|
|
60423
60818
|
"text-sm font-semibold",
|
|
60424
60819
|
resolve(surfaces).mutedText
|
|
60425
60820
|
),
|
|
60426
60821
|
children: title
|
|
60427
60822
|
}
|
|
60428
60823
|
),
|
|
60429
|
-
subtitle && /* @__PURE__ */ (0,
|
|
60824
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60430
60825
|
"p",
|
|
60431
60826
|
{
|
|
60432
|
-
className: (0,
|
|
60827
|
+
className: (0, import_classnames110.default)(
|
|
60433
60828
|
"max-w-xs text-xs leading-5",
|
|
60434
60829
|
resolve(surfaces).faintText
|
|
60435
60830
|
),
|
|
@@ -60440,10 +60835,10 @@ var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) =>
|
|
|
60440
60835
|
]
|
|
60441
60836
|
}
|
|
60442
60837
|
);
|
|
60443
|
-
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ (0,
|
|
60838
|
+
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60444
60839
|
"span",
|
|
60445
60840
|
{
|
|
60446
|
-
className: (0,
|
|
60841
|
+
className: (0, import_classnames110.default)(
|
|
60447
60842
|
"text-[10px] font-semibold uppercase tracking-widest",
|
|
60448
60843
|
resolve(surfaces).faintText,
|
|
60449
60844
|
className
|
|
@@ -60451,7 +60846,7 @@ var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ (0, im
|
|
|
60451
60846
|
children
|
|
60452
60847
|
}
|
|
60453
60848
|
);
|
|
60454
|
-
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */ (0,
|
|
60849
|
+
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: (0, import_classnames110.default)("text-xs", resolve(surfaces).mutedText, className), children });
|
|
60455
60850
|
var WorkflowBadge = ({
|
|
60456
60851
|
children,
|
|
60457
60852
|
status,
|
|
@@ -60459,14 +60854,14 @@ var WorkflowBadge = ({
|
|
|
60459
60854
|
tone
|
|
60460
60855
|
}) => {
|
|
60461
60856
|
const tokens = getStatusTokens(status, palette);
|
|
60462
|
-
return /* @__PURE__ */ (0,
|
|
60857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60463
60858
|
Pill_default,
|
|
60464
60859
|
{
|
|
60465
60860
|
size: "xs",
|
|
60466
60861
|
uppercase: true,
|
|
60467
60862
|
tone: tone ?? tokens.pillTone,
|
|
60468
60863
|
variant: "outline",
|
|
60469
|
-
className: (0,
|
|
60864
|
+
className: (0, import_classnames110.default)(
|
|
60470
60865
|
"shrink-0 font-medium",
|
|
60471
60866
|
tone ? `bg-${tone}-100 dark:bg-${tone}-900` : tokens.pillFill
|
|
60472
60867
|
),
|
|
@@ -60474,177 +60869,17 @@ var WorkflowBadge = ({
|
|
|
60474
60869
|
}
|
|
60475
60870
|
);
|
|
60476
60871
|
};
|
|
60477
|
-
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */ (0,
|
|
60478
|
-
/* @__PURE__ */ (0,
|
|
60479
|
-
/* @__PURE__ */ (0,
|
|
60872
|
+
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "min-w-0", children: [
|
|
60873
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(SectionTitle, { surfaces, children: label }),
|
|
60874
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("p", { className: "mt-1 text-sm font-medium text-neutral-800 dark:text-neutral-100", children: value })
|
|
60480
60875
|
] });
|
|
60481
|
-
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */ (0,
|
|
60482
|
-
/* @__PURE__ */ (0,
|
|
60483
|
-
/* @__PURE__ */ (0,
|
|
60484
|
-
] });
|
|
60485
|
-
|
|
60486
|
-
// src/components/WorkflowTracker/WorkflowSummaryCard.tsx
|
|
60487
|
-
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
60488
|
-
var WorkflowSummaryCard = ({
|
|
60489
|
-
title,
|
|
60490
|
-
steps,
|
|
60491
|
-
palette,
|
|
60492
|
-
surfaces
|
|
60493
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: "px-5 py-4", children: [
|
|
60494
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)(SectionTitle, { surfaces, children: title }),
|
|
60495
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("ul", { className: "mt-3 space-y-3", children: steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("li", { className: "flex items-start gap-3", children: [
|
|
60496
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60497
|
-
WorkflowStatusNode_default,
|
|
60498
|
-
{
|
|
60499
|
-
status: normalizeStatus(step.status),
|
|
60500
|
-
palette,
|
|
60501
|
-
className: "mt-0.5"
|
|
60502
|
-
}
|
|
60503
|
-
),
|
|
60504
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
60505
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: step.label }),
|
|
60506
|
-
step.meta && /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60507
|
-
"p",
|
|
60508
|
-
{
|
|
60509
|
-
className: (0, import_classnames109.default)(
|
|
60510
|
-
"mt-0.5 text-xs leading-5",
|
|
60511
|
-
surfaces.mutedText
|
|
60512
|
-
),
|
|
60513
|
-
children: step.meta
|
|
60514
|
-
}
|
|
60515
|
-
)
|
|
60516
|
-
] })
|
|
60517
|
-
] }, step.id)) })
|
|
60876
|
+
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
|
|
60877
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "font-semibold text-neutral-900 dark:text-white", children: count }),
|
|
60878
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: resolve(surfaces).mutedText, children: label })
|
|
60518
60879
|
] });
|
|
60519
|
-
var WorkflowSummaryCard_default = WorkflowSummaryCard;
|
|
60520
|
-
|
|
60521
|
-
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
60522
|
-
var import_react279 = require("react");
|
|
60523
|
-
var import_classnames113 = __toESM(require("classnames"), 1);
|
|
60524
60880
|
|
|
60525
60881
|
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60526
|
-
var import_react277 = __toESM(require("react"), 1);
|
|
60527
|
-
var import_classnames112 = __toESM(require("classnames"), 1);
|
|
60528
|
-
|
|
60529
|
-
// src/components/WorkflowTracker/WorkflowSkeleton.tsx
|
|
60530
|
-
var import_classnames110 = __toESM(require("classnames"), 1);
|
|
60531
|
-
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
60532
|
-
var Bar3 = ({
|
|
60533
|
-
width,
|
|
60534
|
-
className
|
|
60535
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60536
|
-
"span",
|
|
60537
|
-
{
|
|
60538
|
-
className: (0, import_classnames110.default)(
|
|
60539
|
-
"block h-2.5 rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
60540
|
-
className
|
|
60541
|
-
),
|
|
60542
|
-
style: { width }
|
|
60543
|
-
}
|
|
60544
|
-
);
|
|
60545
|
-
var Dot = () => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "h-5 w-5 shrink-0 rounded-full bg-neutral-200 dark:bg-neutral-800" });
|
|
60546
|
-
var WorkflowHeaderSkeleton = ({ hasIcon = false, iconCorner = DEFAULT_SURFACE_CORNER }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "mb-5 flex animate-pulse flex-wrap items-start justify-between gap-3 motion-reduce:animate-none", children: [
|
|
60547
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
60548
|
-
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60549
|
-
Bar3,
|
|
60550
|
-
{
|
|
60551
|
-
width: "3rem",
|
|
60552
|
-
className: (0, import_classnames110.default)("h-12", getSurfaceCornerClass(iconCorner))
|
|
60553
|
-
}
|
|
60554
|
-
),
|
|
60555
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-3", children: [
|
|
60556
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "11rem", className: "h-2" }),
|
|
60557
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "16rem", className: "h-6" })
|
|
60558
|
-
] })
|
|
60559
|
-
] }),
|
|
60560
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "9rem", className: "h-6 rounded-full" })
|
|
60561
|
-
] });
|
|
60562
|
-
var WorkflowRailSkeleton = ({
|
|
60563
|
-
rows = 6
|
|
60564
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60565
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "border-b border-neutral-200 px-5 pb-4 pt-5 dark:border-neutral-800", children: [
|
|
60566
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60567
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "4.5rem" }),
|
|
60568
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "2rem" })
|
|
60569
|
-
] }),
|
|
60570
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "mt-3 block h-1 w-full rounded-full bg-neutral-200 dark:bg-neutral-800" }),
|
|
60571
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "80%", className: "mt-3" })
|
|
60572
|
-
] }),
|
|
60573
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "space-y-5 px-5 py-5", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
60574
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Dot, {}),
|
|
60575
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
60576
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: index % 2 === 0 ? "62%" : "48%" }),
|
|
60577
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "34%", className: "h-2" })
|
|
60578
|
-
] })
|
|
60579
|
-
] }, index)) })
|
|
60580
|
-
] });
|
|
60581
|
-
var WorkflowDetailSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60582
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-4 px-5 pb-6 pt-5 sm:px-6", children: [
|
|
60583
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60584
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "6rem" }),
|
|
60585
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "4rem" })
|
|
60586
|
-
] }),
|
|
60587
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "45%", className: "h-5" }),
|
|
60588
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-2", children: [
|
|
60589
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "92%", className: "h-2" }),
|
|
60590
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "70%", className: "h-2" })
|
|
60591
|
-
] }),
|
|
60592
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex gap-10 pt-2", children: [
|
|
60593
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "5rem" }),
|
|
60594
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "6rem" }),
|
|
60595
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "4rem" })
|
|
60596
|
-
] })
|
|
60597
|
-
] }),
|
|
60598
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "border-y border-neutral-200 bg-neutral-50 px-5 py-3 dark:border-neutral-800 dark:bg-white/5 sm:px-6", children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "5rem" }) }),
|
|
60599
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "divide-y divide-neutral-200 dark:divide-neutral-800", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center gap-3 px-5 py-4 sm:px-6", children: [
|
|
60600
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Dot, {}),
|
|
60601
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: index === 1 ? "38%" : "30%" }),
|
|
60602
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "flex-1" }),
|
|
60603
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "3rem" })
|
|
60604
|
-
] }, index)) })
|
|
60605
|
-
] });
|
|
60606
|
-
|
|
60607
|
-
// src/components/WorkflowTracker/WorkflowQuickActions.tsx
|
|
60608
|
-
var import_classnames111 = __toESM(require("classnames"), 1);
|
|
60609
60882
|
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
60610
|
-
var WorkflowQuickActions = ({
|
|
60611
|
-
stepId,
|
|
60612
|
-
actions,
|
|
60613
|
-
palette,
|
|
60614
|
-
groupLabel,
|
|
60615
|
-
onAction,
|
|
60616
|
-
className,
|
|
60617
|
-
style
|
|
60618
|
-
}) => {
|
|
60619
|
-
if (!onAction || actions.length === 0) return null;
|
|
60620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60621
|
-
"div",
|
|
60622
|
-
{
|
|
60623
|
-
role: "group",
|
|
60624
|
-
"aria-label": groupLabel,
|
|
60625
|
-
className: (0, import_classnames111.default)("flex flex-wrap gap-1.5", className),
|
|
60626
|
-
style,
|
|
60627
|
-
children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60628
|
-
Button_default,
|
|
60629
|
-
{
|
|
60630
|
-
size: "xs",
|
|
60631
|
-
weight: "medium",
|
|
60632
|
-
variant: action.variant ?? "soft",
|
|
60633
|
-
color: action.tone ?? palette.accent,
|
|
60634
|
-
leadingIcon: action.leadingIcon,
|
|
60635
|
-
disabled: action.disabled,
|
|
60636
|
-
onClick: () => onAction(stepId, action.id),
|
|
60637
|
-
children: action.label
|
|
60638
|
-
},
|
|
60639
|
-
action.id
|
|
60640
|
-
))
|
|
60641
|
-
}
|
|
60642
|
-
);
|
|
60643
|
-
};
|
|
60644
|
-
var WorkflowQuickActions_default = WorkflowQuickActions;
|
|
60645
|
-
|
|
60646
|
-
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60647
|
-
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
60648
60883
|
var CONNECTOR_LEFT = 9;
|
|
60649
60884
|
var CONNECTOR_TOP = 24;
|
|
60650
60885
|
var NESTED_INDENT = 32;
|
|
@@ -60662,16 +60897,16 @@ var NestedSubSteps = ({
|
|
|
60662
60897
|
palette,
|
|
60663
60898
|
surfaces,
|
|
60664
60899
|
onSubStepSelect
|
|
60665
|
-
}) => /* @__PURE__ */ (0,
|
|
60900
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60666
60901
|
"div",
|
|
60667
60902
|
{
|
|
60668
|
-
className: (0,
|
|
60903
|
+
className: (0, import_classnames111.default)("mt-3 rounded-lg p-3", surfaces.nestedBox),
|
|
60669
60904
|
style: { marginLeft: NESTED_INDENT },
|
|
60670
|
-
children: /* @__PURE__ */ (0,
|
|
60905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ul", { className: "space-y-2.5", children: subSteps.map((subStep) => {
|
|
60671
60906
|
const status = normalizeStatus(subStep.status);
|
|
60672
60907
|
const isActive = status === "running" || status === "in_progress";
|
|
60673
|
-
const content = /* @__PURE__ */ (0,
|
|
60674
|
-
/* @__PURE__ */ (0,
|
|
60908
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_jsx_runtime300.Fragment, { children: [
|
|
60909
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60675
60910
|
WorkflowStatusNode_default,
|
|
60676
60911
|
{
|
|
60677
60912
|
status,
|
|
@@ -60679,10 +60914,10 @@ var NestedSubSteps = ({
|
|
|
60679
60914
|
size: "sm"
|
|
60680
60915
|
}
|
|
60681
60916
|
),
|
|
60682
|
-
/* @__PURE__ */ (0,
|
|
60917
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60683
60918
|
"span",
|
|
60684
60919
|
{
|
|
60685
|
-
className: (0,
|
|
60920
|
+
className: (0, import_classnames111.default)(
|
|
60686
60921
|
"text-sm",
|
|
60687
60922
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "text-neutral-600 dark:text-neutral-300"
|
|
60688
60923
|
),
|
|
@@ -60690,7 +60925,7 @@ var NestedSubSteps = ({
|
|
|
60690
60925
|
}
|
|
60691
60926
|
)
|
|
60692
60927
|
] });
|
|
60693
|
-
return /* @__PURE__ */ (0,
|
|
60928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("li", { children: onSubStepSelect ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60694
60929
|
"button",
|
|
60695
60930
|
{
|
|
60696
60931
|
type: "button",
|
|
@@ -60698,7 +60933,7 @@ var NestedSubSteps = ({
|
|
|
60698
60933
|
className: "flex w-full items-center gap-2.5 rounded-sm text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400 focus-visible:ring-offset-2 dark:focus-visible:ring-neutral-500",
|
|
60699
60934
|
children: content
|
|
60700
60935
|
}
|
|
60701
|
-
) : /* @__PURE__ */ (0,
|
|
60936
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "flex items-center gap-2.5", children: content }) }, subStep.id);
|
|
60702
60937
|
}) })
|
|
60703
60938
|
}
|
|
60704
60939
|
);
|
|
@@ -60719,7 +60954,7 @@ var WorkflowTimeline = ({
|
|
|
60719
60954
|
onStepAction
|
|
60720
60955
|
}) => {
|
|
60721
60956
|
if (loading) {
|
|
60722
|
-
return /* @__PURE__ */ (0,
|
|
60957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(WorkflowRailSkeleton, { rows: loadingRows });
|
|
60723
60958
|
}
|
|
60724
60959
|
const isEmpty2 = steps.length === 0;
|
|
60725
60960
|
const tallyEntries = [
|
|
@@ -60728,19 +60963,19 @@ var WorkflowTimeline = ({
|
|
|
60728
60963
|
{ count: tallies.flagged, label: labels.flagged },
|
|
60729
60964
|
{ count: tallies.remaining, label: labels.remaining }
|
|
60730
60965
|
].filter((entry) => entry.count > 0);
|
|
60731
|
-
return /* @__PURE__ */ (0,
|
|
60732
|
-
!isEmpty2 && /* @__PURE__ */ (0,
|
|
60733
|
-
/* @__PURE__ */ (0,
|
|
60734
|
-
/* @__PURE__ */ (0,
|
|
60735
|
-
/* @__PURE__ */ (0,
|
|
60966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "flex flex-col", children: [
|
|
60967
|
+
!isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: (0, import_classnames111.default)("border-b px-5 pb-4 pt-5", surfaces.border), children: [
|
|
60968
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
60969
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(SectionTitle, { surfaces, children: labels.progress }),
|
|
60970
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("span", { className: "text-sm font-semibold text-neutral-900 dark:text-white", children: [
|
|
60736
60971
|
progress,
|
|
60737
60972
|
"%"
|
|
60738
60973
|
] })
|
|
60739
60974
|
] }),
|
|
60740
|
-
/* @__PURE__ */ (0,
|
|
60975
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60741
60976
|
Progress_default,
|
|
60742
60977
|
{
|
|
60743
|
-
className: (0,
|
|
60978
|
+
className: (0, import_classnames111.default)(
|
|
60744
60979
|
"mt-2",
|
|
60745
60980
|
surfaces.translucent ? "bg-white/40 dark:bg-white/15" : "bg-neutral-200 dark:bg-neutral-700"
|
|
60746
60981
|
),
|
|
@@ -60750,8 +60985,8 @@ var WorkflowTimeline = ({
|
|
|
60750
60985
|
motion: "none"
|
|
60751
60986
|
}
|
|
60752
60987
|
),
|
|
60753
|
-
tallyEntries.length > 0 && /* @__PURE__ */ (0,
|
|
60754
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
60988
|
+
tallyEntries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "mt-3 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs", children: tallyEntries.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_react277.default.Fragment, { children: [
|
|
60989
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60755
60990
|
"span",
|
|
60756
60991
|
{
|
|
60757
60992
|
"aria-hidden": "true",
|
|
@@ -60759,7 +60994,7 @@ var WorkflowTimeline = ({
|
|
|
60759
60994
|
children: "\xB7"
|
|
60760
60995
|
}
|
|
60761
60996
|
),
|
|
60762
|
-
/* @__PURE__ */ (0,
|
|
60997
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60763
60998
|
Tally,
|
|
60764
60999
|
{
|
|
60765
61000
|
count: entry.count,
|
|
@@ -60769,7 +61004,7 @@ var WorkflowTimeline = ({
|
|
|
60769
61004
|
)
|
|
60770
61005
|
] }, entry.label)) })
|
|
60771
61006
|
] }),
|
|
60772
|
-
/* @__PURE__ */ (0,
|
|
61007
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: (0, import_classnames111.default)(isEmpty2 ? "" : "px-5 py-5"), children: isEmpty2 ? emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60773
61008
|
WorkflowPlaceholder,
|
|
60774
61009
|
{
|
|
60775
61010
|
title: labels.empty,
|
|
@@ -60777,14 +61012,14 @@ var WorkflowTimeline = ({
|
|
|
60777
61012
|
palette,
|
|
60778
61013
|
surfaces
|
|
60779
61014
|
}
|
|
60780
|
-
) : /* @__PURE__ */ (0,
|
|
61015
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ol", { className: "m-0 list-none p-0", children: steps.map((step, index) => {
|
|
60781
61016
|
const status = normalizeStatus(step.status);
|
|
60782
61017
|
const tokens = getStatusTokens(status, palette);
|
|
60783
61018
|
const isActive = step.id === activeStepId;
|
|
60784
61019
|
const isLast = index === steps.length - 1;
|
|
60785
61020
|
const nested = isActive && step.subSteps && step.subSteps.length > 0 ? step.subSteps : void 0;
|
|
60786
|
-
const rowContent = /* @__PURE__ */ (0,
|
|
60787
|
-
/* @__PURE__ */ (0,
|
|
61021
|
+
const rowContent = /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_jsx_runtime300.Fragment, { children: [
|
|
61022
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60788
61023
|
WorkflowStatusNode_default,
|
|
60789
61024
|
{
|
|
60790
61025
|
status,
|
|
@@ -60792,19 +61027,19 @@ var WorkflowTimeline = ({
|
|
|
60792
61027
|
className: "mt-0.5"
|
|
60793
61028
|
}
|
|
60794
61029
|
),
|
|
60795
|
-
/* @__PURE__ */ (0,
|
|
60796
|
-
/* @__PURE__ */ (0,
|
|
60797
|
-
/* @__PURE__ */ (0,
|
|
61030
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
61031
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
61032
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60798
61033
|
"span",
|
|
60799
61034
|
{
|
|
60800
|
-
className: (0,
|
|
61035
|
+
className: (0, import_classnames111.default)(
|
|
60801
61036
|
"text-sm",
|
|
60802
61037
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "font-medium text-neutral-700 dark:text-neutral-200"
|
|
60803
61038
|
),
|
|
60804
61039
|
children: step.label
|
|
60805
61040
|
}
|
|
60806
61041
|
),
|
|
60807
|
-
step.badge && /* @__PURE__ */ (0,
|
|
61042
|
+
step.badge && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60808
61043
|
WorkflowBadge,
|
|
60809
61044
|
{
|
|
60810
61045
|
status,
|
|
@@ -60814,10 +61049,10 @@ var WorkflowTimeline = ({
|
|
|
60814
61049
|
}
|
|
60815
61050
|
)
|
|
60816
61051
|
] }),
|
|
60817
|
-
step.meta && /* @__PURE__ */ (0,
|
|
61052
|
+
step.meta && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60818
61053
|
"p",
|
|
60819
61054
|
{
|
|
60820
|
-
className: (0,
|
|
61055
|
+
className: (0, import_classnames111.default)(
|
|
60821
61056
|
"mt-1 text-xs leading-5",
|
|
60822
61057
|
surfaces.mutedText
|
|
60823
61058
|
),
|
|
@@ -60826,24 +61061,24 @@ var WorkflowTimeline = ({
|
|
|
60826
61061
|
)
|
|
60827
61062
|
] })
|
|
60828
61063
|
] });
|
|
60829
|
-
return /* @__PURE__ */ (0,
|
|
61064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
|
|
60830
61065
|
"li",
|
|
60831
61066
|
{
|
|
60832
|
-
className: (0,
|
|
61067
|
+
className: (0, import_classnames111.default)("relative", !isLast && "pb-5"),
|
|
60833
61068
|
"aria-current": isActive ? "step" : void 0,
|
|
60834
61069
|
children: [
|
|
60835
|
-
!isLast && /* @__PURE__ */ (0,
|
|
61070
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60836
61071
|
"span",
|
|
60837
61072
|
{
|
|
60838
61073
|
"aria-hidden": "true",
|
|
60839
|
-
className: (0,
|
|
61074
|
+
className: (0, import_classnames111.default)(
|
|
60840
61075
|
"absolute bottom-0",
|
|
60841
61076
|
tokens.connectorDashed ? `border-l-2 border-dashed ${tokens.connector}` : `w-0.5 rounded-full ${tokens.connector}`
|
|
60842
61077
|
),
|
|
60843
61078
|
style: { left: CONNECTOR_LEFT, top: CONNECTOR_TOP }
|
|
60844
61079
|
}
|
|
60845
61080
|
),
|
|
60846
|
-
onStepSelect ? /* @__PURE__ */ (0,
|
|
61081
|
+
onStepSelect ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60847
61082
|
"button",
|
|
60848
61083
|
{
|
|
60849
61084
|
type: "button",
|
|
@@ -60851,8 +61086,8 @@ var WorkflowTimeline = ({
|
|
|
60851
61086
|
className: "flex w-full items-start gap-3 rounded-sm text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400 focus-visible:ring-offset-2 dark:focus-visible:ring-neutral-500",
|
|
60852
61087
|
children: rowContent
|
|
60853
61088
|
}
|
|
60854
|
-
) : /* @__PURE__ */ (0,
|
|
60855
|
-
/* @__PURE__ */ (0,
|
|
61089
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "flex items-start gap-3", children: rowContent }),
|
|
61090
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60856
61091
|
WorkflowQuickActions_default,
|
|
60857
61092
|
{
|
|
60858
61093
|
stepId: step.id,
|
|
@@ -60863,7 +61098,7 @@ var WorkflowTimeline = ({
|
|
|
60863
61098
|
className: "ml-8 mt-2"
|
|
60864
61099
|
}
|
|
60865
61100
|
),
|
|
60866
|
-
nested && /* @__PURE__ */ (0,
|
|
61101
|
+
nested && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60867
61102
|
NestedSubSteps,
|
|
60868
61103
|
{
|
|
60869
61104
|
stepId: step.id,
|
|
@@ -60878,8 +61113,8 @@ var WorkflowTimeline = ({
|
|
|
60878
61113
|
step.id
|
|
60879
61114
|
);
|
|
60880
61115
|
}) }) }),
|
|
60881
|
-
showLegend && !isEmpty2 && /* @__PURE__ */ (0,
|
|
60882
|
-
/* @__PURE__ */ (0,
|
|
61116
|
+
showLegend && !isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: (0, import_classnames111.default)("mt-auto border-t px-5 py-4", surfaces.border), children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ul", { className: "flex flex-wrap gap-x-4 gap-y-2", children: LEGEND_ORDER.map((status) => /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("li", { className: "flex items-center gap-2", children: [
|
|
61117
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60883
61118
|
WorkflowStatusNode_default,
|
|
60884
61119
|
{
|
|
60885
61120
|
status,
|
|
@@ -60887,7 +61122,7 @@ var WorkflowTimeline = ({
|
|
|
60887
61122
|
size: "sm"
|
|
60888
61123
|
}
|
|
60889
61124
|
),
|
|
60890
|
-
/* @__PURE__ */ (0,
|
|
61125
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)("span", { className: (0, import_classnames111.default)("text-xs", surfaces.mutedText), children: labels.statuses[status] })
|
|
60891
61126
|
] }, status)) }) })
|
|
60892
61127
|
] });
|
|
60893
61128
|
};
|
|
@@ -61048,7 +61283,7 @@ var resolveActiveStep = (steps, activeStepId) => {
|
|
|
61048
61283
|
};
|
|
61049
61284
|
|
|
61050
61285
|
// src/components/WorkflowTracker/sampleWorkflow.tsx
|
|
61051
|
-
var
|
|
61286
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
61052
61287
|
var sampleWorkflow = {
|
|
61053
61288
|
eyebrow: "VENDOR ONBOARDING \xB7 REQ-4128",
|
|
61054
61289
|
title: "Northwind Logistics GmbH",
|
|
@@ -61093,9 +61328,9 @@ var sampleWorkflow = {
|
|
|
61093
61328
|
status: "attention",
|
|
61094
61329
|
badge: "Needs attention",
|
|
61095
61330
|
meta: "1h 06m \xB7 Liability certificate expired 12 Aug",
|
|
61096
|
-
details: /* @__PURE__ */ (0,
|
|
61097
|
-
/* @__PURE__ */ (0,
|
|
61098
|
-
/* @__PURE__ */ (0,
|
|
61331
|
+
details: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { className: "space-y-3 px-5 py-4 sm:px-6", children: [
|
|
61332
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: "The liability certificate expired on 12 Aug. A reminder went to the vendor\u2019s compliance contact; the underwriter quote is still pending." }),
|
|
61333
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("ul", { className: "flex flex-wrap gap-2", children: ["reminder-12-aug.pdf", "underwriter-quote.pdf"].map((file) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61099
61334
|
"li",
|
|
61100
61335
|
{
|
|
61101
61336
|
className: "rounded-full border border-neutral-200 px-2.5 py-0.5 text-xs text-neutral-500 dark:border-neutral-700 dark:text-neutral-400",
|
|
@@ -61126,18 +61361,18 @@ var sampleWorkflow = {
|
|
|
61126
61361
|
owner: "D. Okafor",
|
|
61127
61362
|
startedAt: "19 Aug \xB7 09:12",
|
|
61128
61363
|
sla: "Due in 6h",
|
|
61129
|
-
details: /* @__PURE__ */ (0,
|
|
61130
|
-
/* @__PURE__ */ (0,
|
|
61131
|
-
/* @__PURE__ */ (0,
|
|
61132
|
-
/* @__PURE__ */ (0,
|
|
61364
|
+
details: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { className: "space-y-5 px-5 py-4 sm:px-6", children: [
|
|
61365
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { children: [
|
|
61366
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Review activity" }),
|
|
61367
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "mt-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: "Reviewer A. Lindqvist is cross-checking the subprocessor list against the master agreement. Uploads appear here as the vendor submits them." })
|
|
61133
61368
|
] }),
|
|
61134
|
-
/* @__PURE__ */ (0,
|
|
61135
|
-
/* @__PURE__ */ (0,
|
|
61136
|
-
/* @__PURE__ */ (0,
|
|
61369
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { children: [
|
|
61370
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Files received" }),
|
|
61371
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("ul", { className: "mt-2 flex flex-wrap gap-2", children: [
|
|
61137
61372
|
"data-handling-v3.pdf",
|
|
61138
61373
|
"pentest-2026.pdf",
|
|
61139
61374
|
"soc2-typeii.pdf"
|
|
61140
|
-
].map((file) => /* @__PURE__ */ (0,
|
|
61375
|
+
].map((file) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61141
61376
|
"li",
|
|
61142
61377
|
{
|
|
61143
61378
|
className: "rounded-full border border-neutral-200 px-2.5 py-0.5 text-xs text-neutral-500 dark:border-neutral-700 dark:text-neutral-400",
|
|
@@ -61146,11 +61381,11 @@ var sampleWorkflow = {
|
|
|
61146
61381
|
file
|
|
61147
61382
|
)) })
|
|
61148
61383
|
] }),
|
|
61149
|
-
/* @__PURE__ */ (0,
|
|
61150
|
-
/* @__PURE__ */ (0,
|
|
61151
|
-
/* @__PURE__ */ (0,
|
|
61152
|
-
/* @__PURE__ */ (0,
|
|
61153
|
-
/* @__PURE__ */ (0,
|
|
61384
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { children: [
|
|
61385
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Open findings" }),
|
|
61386
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("ul", { className: "mt-2 space-y-2", children: [
|
|
61387
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
61388
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61154
61389
|
"span",
|
|
61155
61390
|
{
|
|
61156
61391
|
"aria-hidden": "true",
|
|
@@ -61159,8 +61394,8 @@ var sampleWorkflow = {
|
|
|
61159
61394
|
),
|
|
61160
61395
|
"Subprocessor \u201CCloudDot BV\u201D is not covered by the DPA yet"
|
|
61161
61396
|
] }),
|
|
61162
|
-
/* @__PURE__ */ (0,
|
|
61163
|
-
/* @__PURE__ */ (0,
|
|
61397
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
61398
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61164
61399
|
"span",
|
|
61165
61400
|
{
|
|
61166
61401
|
"aria-hidden": "true",
|
|
@@ -61238,7 +61473,7 @@ var sampleWorkflow = {
|
|
|
61238
61473
|
};
|
|
61239
61474
|
|
|
61240
61475
|
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
61241
|
-
var
|
|
61476
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
61242
61477
|
var WorkflowTrackerRail = ({
|
|
61243
61478
|
data = sampleWorkflow,
|
|
61244
61479
|
loading = false,
|
|
@@ -61265,14 +61500,14 @@ var WorkflowTrackerRail = ({
|
|
|
61265
61500
|
);
|
|
61266
61501
|
const progress = (0, import_react279.useMemo)(() => computeProgress(steps), [steps]);
|
|
61267
61502
|
const tallies = (0, import_react279.useMemo)(() => computeTallies(steps), [steps]);
|
|
61268
|
-
return /* @__PURE__ */ (0,
|
|
61503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
61269
61504
|
Panel_default,
|
|
61270
61505
|
{
|
|
61271
61506
|
...cardProps,
|
|
61272
61507
|
scrollable: cardScrollable ?? false,
|
|
61273
|
-
className: (0,
|
|
61508
|
+
className: (0, import_classnames112.default)(className, cardClassName),
|
|
61274
61509
|
style,
|
|
61275
|
-
children: /* @__PURE__ */ (0,
|
|
61510
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
61276
61511
|
WorkflowTimeline_default,
|
|
61277
61512
|
{
|
|
61278
61513
|
steps,
|
|
@@ -61298,11 +61533,11 @@ var WorkflowTrackerRail_default = WorkflowTrackerRail;
|
|
|
61298
61533
|
|
|
61299
61534
|
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
61300
61535
|
var import_react280 = require("react");
|
|
61301
|
-
var
|
|
61536
|
+
var import_classnames114 = __toESM(require("classnames"), 1);
|
|
61302
61537
|
|
|
61303
61538
|
// src/components/WorkflowTracker/WorkflowDetailPanel.tsx
|
|
61304
|
-
var
|
|
61305
|
-
var
|
|
61539
|
+
var import_classnames113 = __toESM(require("classnames"), 1);
|
|
61540
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
61306
61541
|
var WorkflowDetailPanel = ({
|
|
61307
61542
|
active,
|
|
61308
61543
|
totalSteps,
|
|
@@ -61314,10 +61549,10 @@ var WorkflowDetailPanel = ({
|
|
|
61314
61549
|
onStepAction
|
|
61315
61550
|
}) => {
|
|
61316
61551
|
if (loading) {
|
|
61317
|
-
return /* @__PURE__ */ (0,
|
|
61552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(WorkflowDetailSkeleton, {});
|
|
61318
61553
|
}
|
|
61319
61554
|
if (!active) {
|
|
61320
|
-
return /* @__PURE__ */ (0,
|
|
61555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61321
61556
|
WorkflowPlaceholder,
|
|
61322
61557
|
{
|
|
61323
61558
|
title: labels.noActiveStep,
|
|
@@ -61335,11 +61570,11 @@ var WorkflowDetailPanel = ({
|
|
|
61335
61570
|
step.startedAt ? { label: labels.started, value: step.startedAt } : void 0,
|
|
61336
61571
|
step.sla ? { label: labels.sla, value: step.sla } : void 0
|
|
61337
61572
|
].filter(Boolean);
|
|
61338
|
-
return /* @__PURE__ */ (0,
|
|
61339
|
-
/* @__PURE__ */ (0,
|
|
61340
|
-
/* @__PURE__ */ (0,
|
|
61341
|
-
/* @__PURE__ */ (0,
|
|
61342
|
-
/* @__PURE__ */ (0,
|
|
61573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-col", children: [
|
|
61574
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "px-5 pb-6 pt-5 sm:px-6", children: [
|
|
61575
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
|
|
61576
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
61577
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(SectionTitle, { surfaces, children: [
|
|
61343
61578
|
labels.step,
|
|
61344
61579
|
" ",
|
|
61345
61580
|
index,
|
|
@@ -61348,7 +61583,7 @@ var WorkflowDetailPanel = ({
|
|
|
61348
61583
|
" ",
|
|
61349
61584
|
totalSteps
|
|
61350
61585
|
] }),
|
|
61351
|
-
step.badge && /* @__PURE__ */ (0,
|
|
61586
|
+
step.badge && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61352
61587
|
WorkflowBadge,
|
|
61353
61588
|
{
|
|
61354
61589
|
status,
|
|
@@ -61358,13 +61593,13 @@ var WorkflowDetailPanel = ({
|
|
|
61358
61593
|
}
|
|
61359
61594
|
)
|
|
61360
61595
|
] }),
|
|
61361
|
-
/* @__PURE__ */ (0,
|
|
61362
|
-
step.elapsed && /* @__PURE__ */ (0,
|
|
61596
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-wrap items-center justify-end gap-x-4 gap-y-2", children: [
|
|
61597
|
+
step.elapsed && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(SectionMeta, { surfaces, children: [
|
|
61363
61598
|
labels.elapsed,
|
|
61364
61599
|
" ",
|
|
61365
61600
|
step.elapsed
|
|
61366
61601
|
] }),
|
|
61367
|
-
/* @__PURE__ */ (0,
|
|
61602
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61368
61603
|
WorkflowQuickActions_default,
|
|
61369
61604
|
{
|
|
61370
61605
|
stepId: step.id,
|
|
@@ -61376,18 +61611,18 @@ var WorkflowDetailPanel = ({
|
|
|
61376
61611
|
)
|
|
61377
61612
|
] })
|
|
61378
61613
|
] }),
|
|
61379
|
-
/* @__PURE__ */ (0,
|
|
61380
|
-
step.description && /* @__PURE__ */ (0,
|
|
61614
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("h3", { className: "mt-3 text-xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-2xl", children: step.label }),
|
|
61615
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61381
61616
|
"p",
|
|
61382
61617
|
{
|
|
61383
|
-
className: (0,
|
|
61618
|
+
className: (0, import_classnames113.default)(
|
|
61384
61619
|
"mt-2 max-w-3xl text-sm leading-6",
|
|
61385
61620
|
surfaces.mutedText
|
|
61386
61621
|
),
|
|
61387
61622
|
children: step.description
|
|
61388
61623
|
}
|
|
61389
61624
|
),
|
|
61390
|
-
metaFields.length > 0 && /* @__PURE__ */ (0,
|
|
61625
|
+
metaFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "mt-5 flex flex-wrap gap-x-10 gap-y-4", children: metaFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61391
61626
|
MetaField,
|
|
61392
61627
|
{
|
|
61393
61628
|
label: field.label,
|
|
@@ -61397,18 +61632,18 @@ var WorkflowDetailPanel = ({
|
|
|
61397
61632
|
field.label
|
|
61398
61633
|
)) })
|
|
61399
61634
|
] }),
|
|
61400
|
-
subSteps.length > 0 && /* @__PURE__ */ (0,
|
|
61401
|
-
/* @__PURE__ */ (0,
|
|
61635
|
+
subSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
|
|
61636
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
61402
61637
|
"div",
|
|
61403
61638
|
{
|
|
61404
|
-
className: (0,
|
|
61639
|
+
className: (0, import_classnames113.default)(
|
|
61405
61640
|
"flex flex-wrap items-center justify-between gap-2 border-y px-5 py-2.5 sm:px-6",
|
|
61406
61641
|
surfaces.border,
|
|
61407
61642
|
surfaces.strip
|
|
61408
61643
|
),
|
|
61409
61644
|
children: [
|
|
61410
|
-
/* @__PURE__ */ (0,
|
|
61411
|
-
/* @__PURE__ */ (0,
|
|
61645
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(SectionTitle, { surfaces, children: labels.subSteps }),
|
|
61646
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(SectionMeta, { surfaces, children: [
|
|
61412
61647
|
summary.accepted,
|
|
61413
61648
|
" ",
|
|
61414
61649
|
labels.accepted,
|
|
@@ -61424,24 +61659,24 @@ var WorkflowDetailPanel = ({
|
|
|
61424
61659
|
]
|
|
61425
61660
|
}
|
|
61426
61661
|
),
|
|
61427
|
-
/* @__PURE__ */ (0,
|
|
61662
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61428
61663
|
"ul",
|
|
61429
61664
|
{
|
|
61430
|
-
className: (0,
|
|
61665
|
+
className: (0, import_classnames113.default)(
|
|
61431
61666
|
"m-0 list-none divide-y p-0",
|
|
61432
61667
|
surfaces.divider
|
|
61433
61668
|
),
|
|
61434
61669
|
children: subSteps.map((subStep) => {
|
|
61435
61670
|
const subStatus = normalizeStatus(subStep.status);
|
|
61436
61671
|
const isRunning = subStatus === "running";
|
|
61437
|
-
const rowContent = /* @__PURE__ */ (0,
|
|
61438
|
-
/* @__PURE__ */ (0,
|
|
61439
|
-
/* @__PURE__ */ (0,
|
|
61440
|
-
/* @__PURE__ */ (0,
|
|
61441
|
-
subStep.note && /* @__PURE__ */ (0,
|
|
61672
|
+
const rowContent = /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
|
|
61673
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(WorkflowStatusNode_default, { status: subStatus, palette }),
|
|
61674
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
61675
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: subStep.label }),
|
|
61676
|
+
subStep.note && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61442
61677
|
"p",
|
|
61443
61678
|
{
|
|
61444
|
-
className: (0,
|
|
61679
|
+
className: (0, import_classnames113.default)(
|
|
61445
61680
|
"mt-0.5 text-xs leading-5",
|
|
61446
61681
|
surfaces.mutedText
|
|
61447
61682
|
),
|
|
@@ -61449,7 +61684,7 @@ var WorkflowDetailPanel = ({
|
|
|
61449
61684
|
}
|
|
61450
61685
|
)
|
|
61451
61686
|
] }),
|
|
61452
|
-
subStep.badge && /* @__PURE__ */ (0,
|
|
61687
|
+
subStep.badge && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61453
61688
|
WorkflowBadge,
|
|
61454
61689
|
{
|
|
61455
61690
|
status: subStatus,
|
|
@@ -61458,10 +61693,10 @@ var WorkflowDetailPanel = ({
|
|
|
61458
61693
|
children: subStep.badge
|
|
61459
61694
|
}
|
|
61460
61695
|
),
|
|
61461
|
-
/* @__PURE__ */ (0,
|
|
61696
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61462
61697
|
"span",
|
|
61463
61698
|
{
|
|
61464
|
-
className: (0,
|
|
61699
|
+
className: (0, import_classnames113.default)(
|
|
61465
61700
|
"w-10 shrink-0 text-right text-xs tabular-nums",
|
|
61466
61701
|
surfaces.faintText
|
|
61467
61702
|
),
|
|
@@ -61469,22 +61704,22 @@ var WorkflowDetailPanel = ({
|
|
|
61469
61704
|
}
|
|
61470
61705
|
)
|
|
61471
61706
|
] });
|
|
61472
|
-
const rowClasses = (0,
|
|
61707
|
+
const rowClasses = (0, import_classnames113.default)(
|
|
61473
61708
|
"flex w-full items-center gap-3 px-5 py-3 text-left sm:px-6",
|
|
61474
61709
|
isRunning && getRowHighlight(palette.accent, surfaces.translucent)
|
|
61475
61710
|
);
|
|
61476
|
-
return /* @__PURE__ */ (0,
|
|
61711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("li", { children: onSubStepSelect ? /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61477
61712
|
"button",
|
|
61478
61713
|
{
|
|
61479
61714
|
type: "button",
|
|
61480
61715
|
onClick: () => onSubStepSelect(step.id, subStep.id),
|
|
61481
|
-
className: (0,
|
|
61716
|
+
className: (0, import_classnames113.default)(
|
|
61482
61717
|
rowClasses,
|
|
61483
61718
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-400 dark:focus-visible:ring-neutral-500"
|
|
61484
61719
|
),
|
|
61485
61720
|
children: rowContent
|
|
61486
61721
|
}
|
|
61487
|
-
) : /* @__PURE__ */ (0,
|
|
61722
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: rowClasses, children: rowContent }) }, subStep.id);
|
|
61488
61723
|
})
|
|
61489
61724
|
}
|
|
61490
61725
|
)
|
|
@@ -61494,7 +61729,7 @@ var WorkflowDetailPanel = ({
|
|
|
61494
61729
|
var WorkflowDetailPanel_default = WorkflowDetailPanel;
|
|
61495
61730
|
|
|
61496
61731
|
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
61497
|
-
var
|
|
61732
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
61498
61733
|
var WorkflowTrackerStepDetails = ({
|
|
61499
61734
|
data = sampleWorkflow,
|
|
61500
61735
|
loading = false,
|
|
@@ -61517,13 +61752,13 @@ var WorkflowTrackerStepDetails = ({
|
|
|
61517
61752
|
() => resolveActiveStep(steps, data?.activeStepId),
|
|
61518
61753
|
[steps, data?.activeStepId]
|
|
61519
61754
|
);
|
|
61520
|
-
return /* @__PURE__ */ (0,
|
|
61755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
61521
61756
|
Panel_default,
|
|
61522
61757
|
{
|
|
61523
61758
|
...cardProps,
|
|
61524
|
-
className: (0,
|
|
61759
|
+
className: (0, import_classnames114.default)(className, cardClassName),
|
|
61525
61760
|
style,
|
|
61526
|
-
children: /* @__PURE__ */ (0,
|
|
61761
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
61527
61762
|
WorkflowDetailPanel_default,
|
|
61528
61763
|
{
|
|
61529
61764
|
active,
|
|
@@ -61543,31 +61778,31 @@ var WorkflowTrackerStepDetails_default = WorkflowTrackerStepDetails;
|
|
|
61543
61778
|
|
|
61544
61779
|
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61545
61780
|
var import_react281 = require("react");
|
|
61546
|
-
var
|
|
61781
|
+
var import_classnames116 = __toESM(require("classnames"), 1);
|
|
61547
61782
|
|
|
61548
61783
|
// src/components/WorkflowTracker/WorkflowDetailsCard.tsx
|
|
61549
|
-
var
|
|
61550
|
-
var
|
|
61784
|
+
var import_classnames115 = __toESM(require("classnames"), 1);
|
|
61785
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
61551
61786
|
var WorkflowDetailsCard = ({
|
|
61552
61787
|
details,
|
|
61553
61788
|
ariaLabel,
|
|
61554
61789
|
cardProps,
|
|
61555
61790
|
className,
|
|
61556
61791
|
style
|
|
61557
|
-
}) => /* @__PURE__ */ (0,
|
|
61792
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
61558
61793
|
Panel_default,
|
|
61559
61794
|
{
|
|
61560
61795
|
...cardProps,
|
|
61561
61796
|
flexBody: true,
|
|
61562
|
-
className: (0,
|
|
61797
|
+
className: (0, import_classnames115.default)("flex-1", className),
|
|
61563
61798
|
style,
|
|
61564
|
-
children: /* @__PURE__ */ (0,
|
|
61799
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(ScrollArea_default, { className: "h-full", mask: true, role: "region", "aria-label": ariaLabel, children: details })
|
|
61565
61800
|
}
|
|
61566
61801
|
);
|
|
61567
61802
|
var WorkflowDetailsCard_default = WorkflowDetailsCard;
|
|
61568
61803
|
|
|
61569
61804
|
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61570
|
-
var
|
|
61805
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
61571
61806
|
var WorkflowTrackerDetails = ({
|
|
61572
61807
|
data = sampleWorkflow,
|
|
61573
61808
|
loading = false,
|
|
@@ -61586,21 +61821,110 @@ var WorkflowTrackerDetails = ({
|
|
|
61586
61821
|
);
|
|
61587
61822
|
const details = active?.step.details;
|
|
61588
61823
|
if (loading || details == null || details === "") return null;
|
|
61589
|
-
return /* @__PURE__ */ (0,
|
|
61824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
61590
61825
|
WorkflowDetailsCard_default,
|
|
61591
61826
|
{
|
|
61592
61827
|
details,
|
|
61593
61828
|
ariaLabel: labels.details,
|
|
61594
61829
|
cardProps,
|
|
61595
|
-
className: (0,
|
|
61830
|
+
className: (0, import_classnames116.default)(className, cardClassName),
|
|
61596
61831
|
style
|
|
61597
61832
|
}
|
|
61598
61833
|
);
|
|
61599
61834
|
};
|
|
61600
61835
|
var WorkflowTrackerDetails_default = WorkflowTrackerDetails;
|
|
61601
61836
|
|
|
61602
|
-
// src/components/WorkflowTracker/
|
|
61837
|
+
// src/components/WorkflowTracker/WorkflowTrackerRollups.tsx
|
|
61838
|
+
var import_react282 = require("react");
|
|
61839
|
+
var import_classnames118 = __toESM(require("classnames"), 1);
|
|
61840
|
+
|
|
61841
|
+
// src/components/WorkflowTracker/WorkflowSummaryCard.tsx
|
|
61842
|
+
var import_classnames117 = __toESM(require("classnames"), 1);
|
|
61843
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
61844
|
+
var WorkflowSummaryCard = ({
|
|
61845
|
+
title,
|
|
61846
|
+
steps,
|
|
61847
|
+
palette,
|
|
61848
|
+
surfaces
|
|
61849
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: "px-5 py-4", children: [
|
|
61850
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(SectionTitle, { surfaces, children: title }),
|
|
61851
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)("ul", { className: "mt-3 space-y-3", children: steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("li", { className: "flex items-start gap-3", children: [
|
|
61852
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
61853
|
+
WorkflowStatusNode_default,
|
|
61854
|
+
{
|
|
61855
|
+
status: normalizeStatus(step.status),
|
|
61856
|
+
palette,
|
|
61857
|
+
className: "mt-0.5"
|
|
61858
|
+
}
|
|
61859
|
+
),
|
|
61860
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
61861
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: step.label }),
|
|
61862
|
+
step.meta && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
61863
|
+
"p",
|
|
61864
|
+
{
|
|
61865
|
+
className: (0, import_classnames117.default)(
|
|
61866
|
+
"mt-0.5 text-xs leading-5",
|
|
61867
|
+
surfaces.mutedText
|
|
61868
|
+
),
|
|
61869
|
+
children: step.meta
|
|
61870
|
+
}
|
|
61871
|
+
)
|
|
61872
|
+
] })
|
|
61873
|
+
] }, step.id)) })
|
|
61874
|
+
] });
|
|
61875
|
+
var WorkflowSummaryCard_default = WorkflowSummaryCard;
|
|
61876
|
+
|
|
61877
|
+
// src/components/WorkflowTracker/WorkflowTrackerRollups.tsx
|
|
61603
61878
|
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
61879
|
+
var WorkflowTrackerRollups = ({
|
|
61880
|
+
data = sampleWorkflow,
|
|
61881
|
+
loading = false,
|
|
61882
|
+
labels: labelOverrides,
|
|
61883
|
+
className,
|
|
61884
|
+
style,
|
|
61885
|
+
...styleProps
|
|
61886
|
+
}) => {
|
|
61887
|
+
const steps = data?.steps ?? [];
|
|
61888
|
+
const { palette, surfaces } = useWorkflowChrome(styleProps);
|
|
61889
|
+
const labels = (0, import_react282.useMemo)(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61890
|
+
const cardProps = buildCardProps(styleProps);
|
|
61891
|
+
const attentionSteps = (0, import_react282.useMemo)(() => getAttentionSteps(steps), [steps]);
|
|
61892
|
+
const skippedSteps = (0, import_react282.useMemo)(() => getSkippedSteps(steps), [steps]);
|
|
61893
|
+
if (loading || attentionSteps.length === 0 && skippedSteps.length === 0) {
|
|
61894
|
+
return null;
|
|
61895
|
+
}
|
|
61896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(
|
|
61897
|
+
"div",
|
|
61898
|
+
{
|
|
61899
|
+
className: (0, import_classnames118.default)("grid grid-cols-1 gap-5 @xl:grid-cols-2", className),
|
|
61900
|
+
style,
|
|
61901
|
+
children: [
|
|
61902
|
+
attentionSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Panel_default, { ...cardProps, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
61903
|
+
WorkflowSummaryCard_default,
|
|
61904
|
+
{
|
|
61905
|
+
title: labels.needsAttention,
|
|
61906
|
+
steps: attentionSteps,
|
|
61907
|
+
palette,
|
|
61908
|
+
surfaces
|
|
61909
|
+
}
|
|
61910
|
+
) }),
|
|
61911
|
+
skippedSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Panel_default, { ...cardProps, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
61912
|
+
WorkflowSummaryCard_default,
|
|
61913
|
+
{
|
|
61914
|
+
title: labels.skippedSteps,
|
|
61915
|
+
steps: skippedSteps,
|
|
61916
|
+
palette,
|
|
61917
|
+
surfaces
|
|
61918
|
+
}
|
|
61919
|
+
) })
|
|
61920
|
+
]
|
|
61921
|
+
}
|
|
61922
|
+
);
|
|
61923
|
+
};
|
|
61924
|
+
var WorkflowTrackerRollups_default = WorkflowTrackerRollups;
|
|
61925
|
+
|
|
61926
|
+
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
61927
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
61604
61928
|
var WorkflowTracker = ({
|
|
61605
61929
|
data = sampleWorkflow,
|
|
61606
61930
|
accentColor = "blue",
|
|
@@ -61634,7 +61958,6 @@ var WorkflowTracker = ({
|
|
|
61634
61958
|
style,
|
|
61635
61959
|
...rest
|
|
61636
61960
|
}) => {
|
|
61637
|
-
const steps = data?.steps ?? [];
|
|
61638
61961
|
const styleProps = {
|
|
61639
61962
|
accentColor,
|
|
61640
61963
|
attentionColor,
|
|
@@ -61649,38 +61972,35 @@ var WorkflowTracker = ({
|
|
|
61649
61972
|
padding,
|
|
61650
61973
|
translucentSurfaces
|
|
61651
61974
|
};
|
|
61652
|
-
const {
|
|
61653
|
-
const labels = (0,
|
|
61654
|
-
const cardProps = buildCardProps(styleProps);
|
|
61655
|
-
const attentionSteps = (0, import_react282.useMemo)(() => getAttentionSteps(steps), [steps]);
|
|
61656
|
-
const skippedSteps = (0, import_react282.useMemo)(() => getSkippedSteps(steps), [steps]);
|
|
61975
|
+
const { surfaces } = useWorkflowChrome(styleProps);
|
|
61976
|
+
const labels = (0, import_react283.useMemo)(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61657
61977
|
const railStyle = {
|
|
61658
61978
|
"--wt-rail-width": typeof railWidth === "number" ? `${railWidth}px` : railWidth,
|
|
61659
61979
|
"--wt-fill-offset": typeof fillHeightOffset === "number" ? `${fillHeightOffset}px` : fillHeightOffset
|
|
61660
61980
|
};
|
|
61661
|
-
return /* @__PURE__ */ (0,
|
|
61981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61662
61982
|
"div",
|
|
61663
61983
|
{
|
|
61664
|
-
className: (0,
|
|
61984
|
+
className: (0, import_classnames119.default)("@container w-full", className),
|
|
61665
61985
|
style: { maxWidth, ...railStyle, ...style },
|
|
61666
61986
|
"aria-busy": loading || void 0,
|
|
61667
61987
|
...rest,
|
|
61668
61988
|
children: [
|
|
61669
|
-
showHeader && loading && /* @__PURE__ */ (0,
|
|
61989
|
+
showHeader && loading && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61670
61990
|
WorkflowHeaderSkeleton,
|
|
61671
61991
|
{
|
|
61672
61992
|
hasIcon: Boolean(data?.icon),
|
|
61673
61993
|
iconCorner
|
|
61674
61994
|
}
|
|
61675
61995
|
),
|
|
61676
|
-
showHeader && !loading && /* @__PURE__ */ (0,
|
|
61677
|
-
/* @__PURE__ */ (0,
|
|
61996
|
+
showHeader && !loading && /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("header", { className: "mb-5 flex flex-wrap items-start justify-between gap-3", children: [
|
|
61997
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
61678
61998
|
data?.icon && // `overflow-hidden` plus the shared corner class clips whatever
|
|
61679
61999
|
// the caller passes, so an <img> needs no rounding of its own.
|
|
61680
|
-
/* @__PURE__ */ (0,
|
|
62000
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61681
62001
|
"span",
|
|
61682
62002
|
{
|
|
61683
|
-
className: (0,
|
|
62003
|
+
className: (0, import_classnames119.default)(
|
|
61684
62004
|
"flex h-12 w-12 shrink-0 items-center justify-center overflow-hidden [&>img]:h-full [&>img]:w-full [&>img]:object-cover",
|
|
61685
62005
|
getSurfaceCornerClass(iconCorner),
|
|
61686
62006
|
surfaces.chip
|
|
@@ -61688,33 +62008,33 @@ var WorkflowTracker = ({
|
|
|
61688
62008
|
children: data.icon
|
|
61689
62009
|
}
|
|
61690
62010
|
),
|
|
61691
|
-
/* @__PURE__ */ (0,
|
|
61692
|
-
data?.eyebrow && /* @__PURE__ */ (0,
|
|
62011
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("div", { className: "min-w-0", children: [
|
|
62012
|
+
data?.eyebrow && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61693
62013
|
"p",
|
|
61694
62014
|
{
|
|
61695
|
-
className: (0,
|
|
62015
|
+
className: (0, import_classnames119.default)(
|
|
61696
62016
|
"text-[11px] font-semibold uppercase tracking-widest",
|
|
61697
62017
|
surfaces.faintText
|
|
61698
62018
|
),
|
|
61699
62019
|
children: data.eyebrow
|
|
61700
62020
|
}
|
|
61701
62021
|
),
|
|
61702
|
-
/* @__PURE__ */ (0,
|
|
62022
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)("h2", { className: "mt-1 text-2xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-3xl", children: data?.title })
|
|
61703
62023
|
] })
|
|
61704
62024
|
] }),
|
|
61705
|
-
data?.live && /* @__PURE__ */ (0,
|
|
62025
|
+
data?.live && /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61706
62026
|
Pill_default,
|
|
61707
62027
|
{
|
|
61708
62028
|
size: "md",
|
|
61709
62029
|
tone: mutedColor,
|
|
61710
62030
|
variant: "outline",
|
|
61711
|
-
className: (0,
|
|
62031
|
+
className: (0, import_classnames119.default)("tracking-wide", surfaces.chip),
|
|
61712
62032
|
children: [
|
|
61713
|
-
/* @__PURE__ */ (0,
|
|
62033
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61714
62034
|
"span",
|
|
61715
62035
|
{
|
|
61716
62036
|
"aria-hidden": "true",
|
|
61717
|
-
className: (0,
|
|
62037
|
+
className: (0, import_classnames119.default)(
|
|
61718
62038
|
"mr-2 inline-block h-1.5 w-1.5 rounded-full",
|
|
61719
62039
|
`bg-${accentColor}-500 dark:bg-${accentColor}-400`
|
|
61720
62040
|
)
|
|
@@ -61725,15 +62045,15 @@ var WorkflowTracker = ({
|
|
|
61725
62045
|
}
|
|
61726
62046
|
)
|
|
61727
62047
|
] }),
|
|
61728
|
-
/* @__PURE__ */ (0,
|
|
62048
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61729
62049
|
"div",
|
|
61730
62050
|
{
|
|
61731
|
-
className: (0,
|
|
62051
|
+
className: (0, import_classnames119.default)(
|
|
61732
62052
|
"grid grid-cols-1 items-start gap-5 @4xl:grid-cols-[var(--wt-rail-width)_minmax(0,1fr)]",
|
|
61733
62053
|
fillHeight && "@4xl:h-[calc(100dvh-var(--wt-fill-offset))]"
|
|
61734
62054
|
),
|
|
61735
62055
|
children: [
|
|
61736
|
-
/* @__PURE__ */ (0,
|
|
62056
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61737
62057
|
WorkflowTrackerRail_default,
|
|
61738
62058
|
{
|
|
61739
62059
|
...styleProps,
|
|
@@ -61744,7 +62064,7 @@ var WorkflowTracker = ({
|
|
|
61744
62064
|
emptyState,
|
|
61745
62065
|
labels: labelOverrides,
|
|
61746
62066
|
cardScrollable: fillHeight,
|
|
61747
|
-
cardClassName: (0,
|
|
62067
|
+
cardClassName: (0, import_classnames119.default)(
|
|
61748
62068
|
stickyRail && !fillHeight && "@4xl:sticky @4xl:top-6",
|
|
61749
62069
|
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61750
62070
|
),
|
|
@@ -61753,15 +62073,15 @@ var WorkflowTracker = ({
|
|
|
61753
62073
|
onStepAction
|
|
61754
62074
|
}
|
|
61755
62075
|
),
|
|
61756
|
-
/* @__PURE__ */ (0,
|
|
62076
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61757
62077
|
"div",
|
|
61758
62078
|
{
|
|
61759
|
-
className: (0,
|
|
62079
|
+
className: (0, import_classnames119.default)(
|
|
61760
62080
|
"@container flex min-w-0 flex-col gap-5",
|
|
61761
62081
|
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61762
62082
|
),
|
|
61763
62083
|
children: [
|
|
61764
|
-
/* @__PURE__ */ (0,
|
|
62084
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61765
62085
|
WorkflowTrackerStepDetails_default,
|
|
61766
62086
|
{
|
|
61767
62087
|
...styleProps,
|
|
@@ -61772,7 +62092,7 @@ var WorkflowTracker = ({
|
|
|
61772
62092
|
onStepAction
|
|
61773
62093
|
}
|
|
61774
62094
|
),
|
|
61775
|
-
/* @__PURE__ */ (0,
|
|
62095
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61776
62096
|
WorkflowTrackerDetails_default,
|
|
61777
62097
|
{
|
|
61778
62098
|
...styleProps,
|
|
@@ -61781,26 +62101,15 @@ var WorkflowTracker = ({
|
|
|
61781
62101
|
labels: labelOverrides
|
|
61782
62102
|
}
|
|
61783
62103
|
),
|
|
61784
|
-
|
|
61785
|
-
|
|
61786
|
-
|
|
61787
|
-
|
|
61788
|
-
|
|
61789
|
-
|
|
61790
|
-
|
|
61791
|
-
|
|
61792
|
-
|
|
61793
|
-
) }),
|
|
61794
|
-
skippedSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Panel_default, { ...cardProps, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
61795
|
-
WorkflowSummaryCard_default,
|
|
61796
|
-
{
|
|
61797
|
-
title: labels.skippedSteps,
|
|
61798
|
-
steps: skippedSteps,
|
|
61799
|
-
palette,
|
|
61800
|
-
surfaces
|
|
61801
|
-
}
|
|
61802
|
-
) })
|
|
61803
|
-
] })
|
|
62104
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
62105
|
+
WorkflowTrackerRollups_default,
|
|
62106
|
+
{
|
|
62107
|
+
...styleProps,
|
|
62108
|
+
data,
|
|
62109
|
+
loading,
|
|
62110
|
+
labels: labelOverrides
|
|
62111
|
+
}
|
|
62112
|
+
)
|
|
61804
62113
|
]
|
|
61805
62114
|
}
|
|
61806
62115
|
)
|
|
@@ -61814,9 +62123,9 @@ var WorkflowTracker = ({
|
|
|
61814
62123
|
var WorkflowTracker_default = WorkflowTracker;
|
|
61815
62124
|
|
|
61816
62125
|
// src/components/Gantt/Gantt.tsx
|
|
61817
|
-
var
|
|
62126
|
+
var import_react288 = require("react");
|
|
61818
62127
|
var import_react_dom15 = require("react-dom");
|
|
61819
|
-
var
|
|
62128
|
+
var import_classnames123 = __toESM(require("classnames"), 1);
|
|
61820
62129
|
|
|
61821
62130
|
// ../common/gantt/types.ts
|
|
61822
62131
|
var GANTT_ZOOM_PRESETS = [
|
|
@@ -63162,38 +63471,38 @@ var sampleGantt = {
|
|
|
63162
63471
|
};
|
|
63163
63472
|
|
|
63164
63473
|
// src/components/Gantt/GanttScale.tsx
|
|
63165
|
-
var
|
|
63166
|
-
var
|
|
63474
|
+
var import_classnames120 = __toESM(require("classnames"), 1);
|
|
63475
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
63167
63476
|
var GanttScale = ({ levels, height }) => {
|
|
63168
63477
|
if (levels.length === 0) {
|
|
63169
|
-
return /* @__PURE__ */ (0,
|
|
63478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { style: { height } });
|
|
63170
63479
|
}
|
|
63171
63480
|
const coarseHeight = levels.length > 1 ? 24 : height;
|
|
63172
|
-
return /* @__PURE__ */ (0,
|
|
63481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "flex h-full w-full flex-col", children: levels.map((level, li) => /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
63173
63482
|
"div",
|
|
63174
63483
|
{
|
|
63175
|
-
className: (0,
|
|
63484
|
+
className: (0, import_classnames120.default)("flex w-full", li === 0 ? "shrink-0" : "min-h-0 flex-1"),
|
|
63176
63485
|
style: li === 0 ? { height: coarseHeight } : void 0,
|
|
63177
|
-
children: level.columns.map((col) => /* @__PURE__ */ (0,
|
|
63486
|
+
children: level.columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
|
|
63178
63487
|
"div",
|
|
63179
63488
|
{
|
|
63180
|
-
className: (0,
|
|
63489
|
+
className: (0, import_classnames120.default)(
|
|
63181
63490
|
"flex shrink-0 flex-col items-center justify-center overflow-hidden border-r border-neutral-200/70 dark:border-neutral-800/70",
|
|
63182
63491
|
li === 0 ? "bg-neutral-50/60 dark:bg-neutral-800/40" : "bg-white dark:bg-neutral-900"
|
|
63183
63492
|
),
|
|
63184
63493
|
style: { width: col.width },
|
|
63185
63494
|
children: [
|
|
63186
|
-
/* @__PURE__ */ (0,
|
|
63495
|
+
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
63187
63496
|
"span",
|
|
63188
63497
|
{
|
|
63189
|
-
className: (0,
|
|
63498
|
+
className: (0, import_classnames120.default)(
|
|
63190
63499
|
"max-w-full truncate px-1 text-[10px] font-semibold uppercase leading-none tracking-wide",
|
|
63191
63500
|
li === 0 ? "text-neutral-700 dark:text-neutral-200" : "text-neutral-500 dark:text-neutral-400"
|
|
63192
63501
|
),
|
|
63193
63502
|
children: col.label
|
|
63194
63503
|
}
|
|
63195
63504
|
),
|
|
63196
|
-
col.subLabel != null && /* @__PURE__ */ (0,
|
|
63505
|
+
col.subLabel != null && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("span", { className: "max-w-full truncate px-1 text-[9px] font-medium leading-none text-neutral-400 dark:text-neutral-500", children: col.subLabel })
|
|
63197
63506
|
]
|
|
63198
63507
|
},
|
|
63199
63508
|
col.id
|
|
@@ -63205,9 +63514,9 @@ var GanttScale = ({ levels, height }) => {
|
|
|
63205
63514
|
GanttScale.displayName = "GanttScale";
|
|
63206
63515
|
|
|
63207
63516
|
// src/components/Gantt/GanttLinkLayer.tsx
|
|
63208
|
-
var
|
|
63209
|
-
var
|
|
63210
|
-
var GanttLinkLayer = (0,
|
|
63517
|
+
var import_react284 = require("react");
|
|
63518
|
+
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
63519
|
+
var GanttLinkLayer = (0, import_react284.forwardRef)(
|
|
63211
63520
|
function GanttLinkLayer2({
|
|
63212
63521
|
width,
|
|
63213
63522
|
height,
|
|
@@ -63221,7 +63530,7 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63221
63530
|
onDeleteLink
|
|
63222
63531
|
}, ref) {
|
|
63223
63532
|
const t = useKitT();
|
|
63224
|
-
const svgRef = (0,
|
|
63533
|
+
const svgRef = (0, import_react284.useRef)(null);
|
|
63225
63534
|
const selPath = selected ? paths.find((p) => p.link === selected) : void 0;
|
|
63226
63535
|
const selColor = selPath ? selPath.color ?? color : color;
|
|
63227
63536
|
const selMid = selPath ? { x: (selPath.from.x + selPath.to.x) / 2, y: (selPath.from.y + selPath.to.y) / 2 } : null;
|
|
@@ -63242,24 +63551,24 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63242
63551
|
const pick = pickFromEvent(e) ?? clicked;
|
|
63243
63552
|
if (interactive && onDeleteLink) onDeleteLink(pick.link);
|
|
63244
63553
|
};
|
|
63245
|
-
return /* @__PURE__ */ (0,
|
|
63554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
63246
63555
|
"div",
|
|
63247
63556
|
{
|
|
63248
63557
|
ref,
|
|
63249
63558
|
className: "pointer-events-none absolute top-0 z-10",
|
|
63250
63559
|
style: { left: offsetLeft, width, height },
|
|
63251
63560
|
children: [
|
|
63252
|
-
/* @__PURE__ */ (0,
|
|
63561
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("svg", { ref: svgRef, width, height, className: "block overflow-visible", children: [
|
|
63253
63562
|
paths.map((p, i) => {
|
|
63254
63563
|
const tokens = getGanttLinkTokens(p.color ?? color);
|
|
63255
63564
|
const sel = selected != null && p.link === selected;
|
|
63256
63565
|
const nodeR = sel ? 4.5 : 3.5;
|
|
63257
|
-
return /* @__PURE__ */ (0,
|
|
63566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
63258
63567
|
"g",
|
|
63259
63568
|
{
|
|
63260
63569
|
style: sel ? { filter: `drop-shadow(0 0 3px var(--color-${p.color ?? color}-500))` } : void 0,
|
|
63261
63570
|
children: [
|
|
63262
|
-
/* @__PURE__ */ (0,
|
|
63571
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
63263
63572
|
"path",
|
|
63264
63573
|
{
|
|
63265
63574
|
d: p.d,
|
|
@@ -63275,10 +63584,10 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63275
63584
|
},
|
|
63276
63585
|
onClick: (e) => handlePick(e, p),
|
|
63277
63586
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
63278
|
-
children: /* @__PURE__ */ (0,
|
|
63587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
63279
63588
|
}
|
|
63280
63589
|
),
|
|
63281
|
-
/* @__PURE__ */ (0,
|
|
63590
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
63282
63591
|
"path",
|
|
63283
63592
|
{
|
|
63284
63593
|
d: p.d,
|
|
@@ -63294,14 +63603,14 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63294
63603
|
},
|
|
63295
63604
|
onClick: (e) => handlePick(e, p),
|
|
63296
63605
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
63297
|
-
children: /* @__PURE__ */ (0,
|
|
63606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
63298
63607
|
}
|
|
63299
63608
|
),
|
|
63300
|
-
p.arrow && /* @__PURE__ */ (0,
|
|
63301
|
-
/* @__PURE__ */ (0,
|
|
63302
|
-
/* @__PURE__ */ (0,
|
|
63303
|
-
/* @__PURE__ */ (0,
|
|
63304
|
-
/* @__PURE__ */ (0,
|
|
63609
|
+
p.arrow && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("polygon", { points: p.arrow, className: tokens.fill }),
|
|
63610
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.from.x, cy: p.from.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
63611
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.from.x, cy: p.from.y, r: nodeR, className: tokens.fill }),
|
|
63612
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.to.x, cy: p.to.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
63613
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.to.x, cy: p.to.y, r: nodeR, className: tokens.fill })
|
|
63305
63614
|
]
|
|
63306
63615
|
},
|
|
63307
63616
|
`${p.link.source}->${p.link.target}-${p.type}-${i}`
|
|
@@ -63309,8 +63618,8 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63309
63618
|
}),
|
|
63310
63619
|
rubber && (() => {
|
|
63311
63620
|
const tokens = getGanttLinkTokens(rubber.color);
|
|
63312
|
-
return /* @__PURE__ */ (0,
|
|
63313
|
-
/* @__PURE__ */ (0,
|
|
63621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("g", { children: [
|
|
63622
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
63314
63623
|
"path",
|
|
63315
63624
|
{
|
|
63316
63625
|
d: rubber.d,
|
|
@@ -63321,15 +63630,15 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63321
63630
|
strokeDasharray: "5 3"
|
|
63322
63631
|
}
|
|
63323
63632
|
),
|
|
63324
|
-
rubber.arrow && /* @__PURE__ */ (0,
|
|
63325
|
-
/* @__PURE__ */ (0,
|
|
63326
|
-
/* @__PURE__ */ (0,
|
|
63327
|
-
/* @__PURE__ */ (0,
|
|
63328
|
-
/* @__PURE__ */ (0,
|
|
63633
|
+
rubber.arrow && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("polygon", { points: rubber.arrow, className: tokens.fill }),
|
|
63634
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 6, className: tokens.halo }),
|
|
63635
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 3.5, className: tokens.fill }),
|
|
63636
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 6, className: tokens.halo }),
|
|
63637
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 3.5, className: tokens.fill })
|
|
63329
63638
|
] });
|
|
63330
63639
|
})()
|
|
63331
63640
|
] }),
|
|
63332
|
-
canDelete && selMid && /* @__PURE__ */ (0,
|
|
63641
|
+
canDelete && selMid && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
63333
63642
|
"button",
|
|
63334
63643
|
{
|
|
63335
63644
|
type: "button",
|
|
@@ -63347,7 +63656,7 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63347
63656
|
onClick: () => onDeleteLink(selected),
|
|
63348
63657
|
title: t("kit.gantt.removeDependency"),
|
|
63349
63658
|
children: [
|
|
63350
|
-
/* @__PURE__ */ (0,
|
|
63659
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("span", { "aria-hidden": true, children: "\u2715" }),
|
|
63351
63660
|
" ",
|
|
63352
63661
|
t("kit.gantt.delete")
|
|
63353
63662
|
]
|
|
@@ -63361,9 +63670,9 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63361
63670
|
GanttLinkLayer.displayName = "GanttLinkLayer";
|
|
63362
63671
|
|
|
63363
63672
|
// src/components/Gantt/GanttBodyRow.tsx
|
|
63364
|
-
var
|
|
63365
|
-
var
|
|
63366
|
-
var
|
|
63673
|
+
var import_react285 = require("react");
|
|
63674
|
+
var import_classnames121 = __toESM(require("classnames"), 1);
|
|
63675
|
+
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
63367
63676
|
var BAR_HEIGHT = 24;
|
|
63368
63677
|
var MILESTONE_SIZE = 14;
|
|
63369
63678
|
var GanttBodyRow = ({
|
|
@@ -63402,11 +63711,11 @@ var GanttBodyRow = ({
|
|
|
63402
63711
|
const t = useKitT();
|
|
63403
63712
|
const isDraggingThis = row.task != null && drag?.taskId === row.task.id;
|
|
63404
63713
|
const reorderDragging = isDraggingThis && drag?.kind === "reorder";
|
|
63405
|
-
return /* @__PURE__ */ (0,
|
|
63714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63406
63715
|
"div",
|
|
63407
63716
|
{
|
|
63408
63717
|
"data-row-key": row.key,
|
|
63409
|
-
className: (0,
|
|
63718
|
+
className: (0, import_classnames121.default)(
|
|
63410
63719
|
// No overflow here: an overflow-hidden row root would become the
|
|
63411
63720
|
// sticky halves' (non-scrolling) scrollport and stop them pinning to
|
|
63412
63721
|
// the left edge while the timeline scrolls. The halves pin the
|
|
@@ -63423,7 +63732,7 @@ var GanttBodyRow = ({
|
|
|
63423
63732
|
boxShadow: `inset 2px 0 0 var(--color-${color}-500)`
|
|
63424
63733
|
} : {}
|
|
63425
63734
|
},
|
|
63426
|
-
children: row.task == null ? /* @__PURE__ */ (0,
|
|
63735
|
+
children: row.task == null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63427
63736
|
LaneHeader,
|
|
63428
63737
|
{
|
|
63429
63738
|
row,
|
|
@@ -63434,20 +63743,20 @@ var GanttBodyRow = ({
|
|
|
63434
63743
|
dividerClass,
|
|
63435
63744
|
liveProgress: liveLane
|
|
63436
63745
|
}
|
|
63437
|
-
) : /* @__PURE__ */ (0,
|
|
63438
|
-
/* @__PURE__ */ (0,
|
|
63746
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63747
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63439
63748
|
"div",
|
|
63440
63749
|
{
|
|
63441
|
-
className: (0,
|
|
63750
|
+
className: (0, import_classnames121.default)(
|
|
63442
63751
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
63443
63752
|
dividerClass
|
|
63444
63753
|
),
|
|
63445
63754
|
style: { width: leftWidth },
|
|
63446
63755
|
children: [
|
|
63447
|
-
/* @__PURE__ */ (0,
|
|
63756
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "flex w-9 shrink-0 items-center justify-center", children: interactive && !row.task.locked && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63448
63757
|
"span",
|
|
63449
63758
|
{
|
|
63450
|
-
className: (0,
|
|
63759
|
+
className: (0, import_classnames121.default)(
|
|
63451
63760
|
"flex cursor-grab touch-none items-center text-neutral-300 transition-opacity active:cursor-grabbing dark:text-neutral-600",
|
|
63452
63761
|
reorderDragging ? "opacity-100" : "opacity-0 group-hover/row:opacity-100"
|
|
63453
63762
|
),
|
|
@@ -63455,10 +63764,10 @@ var GanttBodyRow = ({
|
|
|
63455
63764
|
onPointerDown: (e) => onGripPointerDown(row.key, row.task, e),
|
|
63456
63765
|
title: t("kit.gantt.dragReorder"),
|
|
63457
63766
|
"aria-hidden": "true",
|
|
63458
|
-
children: /* @__PURE__ */ (0,
|
|
63767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(Drag, { className: "h-3.5 w-3.5" })
|
|
63459
63768
|
}
|
|
63460
63769
|
) }),
|
|
63461
|
-
columns.map((col, i) => /* @__PURE__ */ (0,
|
|
63770
|
+
columns.map((col, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63462
63771
|
Cell,
|
|
63463
63772
|
{
|
|
63464
63773
|
col,
|
|
@@ -63479,12 +63788,12 @@ var GanttBodyRow = ({
|
|
|
63479
63788
|
]
|
|
63480
63789
|
}
|
|
63481
63790
|
),
|
|
63482
|
-
/* @__PURE__ */ (0,
|
|
63791
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63483
63792
|
"div",
|
|
63484
63793
|
{
|
|
63485
|
-
className: (0,
|
|
63794
|
+
className: (0, import_classnames121.default)("relative shrink-0 border-b", dividerClass),
|
|
63486
63795
|
style: { width: timelineWidth },
|
|
63487
|
-
children: /* @__PURE__ */ (0,
|
|
63796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63488
63797
|
TaskBar,
|
|
63489
63798
|
{
|
|
63490
63799
|
task: row.task,
|
|
@@ -63525,57 +63834,57 @@ var LaneHeader = ({ row, columns, leftWidth, color, onCaretClick, dividerClass =
|
|
|
63525
63834
|
const laneColor = lane.color ?? color;
|
|
63526
63835
|
const tokens = getGanttLaneTokens(laneColor);
|
|
63527
63836
|
const isOpen = lane.open !== false;
|
|
63528
|
-
return /* @__PURE__ */ (0,
|
|
63529
|
-
/* @__PURE__ */ (0,
|
|
63837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63838
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63530
63839
|
"div",
|
|
63531
63840
|
{
|
|
63532
|
-
className: (0,
|
|
63841
|
+
className: (0, import_classnames121.default)(
|
|
63533
63842
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
63534
63843
|
dividerClass
|
|
63535
63844
|
),
|
|
63536
63845
|
style: { width: leftWidth },
|
|
63537
63846
|
children: [
|
|
63538
|
-
/* @__PURE__ */ (0,
|
|
63539
|
-
/* @__PURE__ */ (0,
|
|
63847
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("pointer-events-none absolute inset-0", tokens.band) }),
|
|
63848
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "relative flex w-9 shrink-0 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63540
63849
|
"button",
|
|
63541
63850
|
{
|
|
63542
63851
|
type: "button",
|
|
63543
63852
|
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded text-neutral-500 hover:bg-white/60 focus-visible:ring-2 focus-visible:ring-neutral-400 dark:text-neutral-400 dark:hover:bg-white/10",
|
|
63544
63853
|
onClick: () => onCaretClick(lane.id, isOpen),
|
|
63545
63854
|
"aria-label": t(isOpen ? "kit.gantt.collapse" : "kit.gantt.expand", { name: lane.label }),
|
|
63546
|
-
children: /* @__PURE__ */ (0,
|
|
63855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronRight, { className: (0, import_classnames121.default)("h-3 w-3 transition-transform", isOpen && "rotate-90") })
|
|
63547
63856
|
}
|
|
63548
63857
|
) }),
|
|
63549
|
-
columns.map((col, i) => /* @__PURE__ */ (0,
|
|
63858
|
+
columns.map((col, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63550
63859
|
"div",
|
|
63551
63860
|
{
|
|
63552
|
-
className: (0,
|
|
63861
|
+
className: (0, import_classnames121.default)(
|
|
63553
63862
|
"relative flex shrink-0 items-center gap-2 overflow-hidden border-r px-2 last:border-r-0",
|
|
63554
63863
|
dividerClass
|
|
63555
63864
|
),
|
|
63556
63865
|
style: { width: col.width ?? "160px" },
|
|
63557
|
-
children: i === 0 ? /* @__PURE__ */ (0,
|
|
63558
|
-
/* @__PURE__ */ (0,
|
|
63559
|
-
lane.description && /* @__PURE__ */ (0,
|
|
63560
|
-
row.childCount > 0 && /* @__PURE__ */ (0,
|
|
63561
|
-
] }) : col.key === "progress" ? /* @__PURE__ */ (0,
|
|
63866
|
+
children: i === 0 ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63867
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("truncate text-[13px] font-semibold", tokens.label), children: lane.label }),
|
|
63868
|
+
lane.description && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "hidden truncate text-[11px] text-neutral-500 dark:text-neutral-400 lg:inline", children: lane.description }),
|
|
63869
|
+
row.childCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "shrink-0 rounded-full bg-white/70 px-1.5 py-0.5 text-[10px] font-semibold text-neutral-600 dark:bg-white/10 dark:text-neutral-300", children: row.childCount })
|
|
63870
|
+
] }) : col.key === "progress" ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ProgressCell, { value: liveProgress ?? row.progress ?? 0, barClass: tokens.chip }) : null
|
|
63562
63871
|
},
|
|
63563
63872
|
col.key
|
|
63564
63873
|
))
|
|
63565
63874
|
]
|
|
63566
63875
|
}
|
|
63567
63876
|
),
|
|
63568
|
-
/* @__PURE__ */ (0,
|
|
63877
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("relative min-w-0 flex-1 border-b", dividerClass), children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("absolute inset-0", tokens.band) }) })
|
|
63569
63878
|
] });
|
|
63570
63879
|
};
|
|
63571
63880
|
var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, renderCell, liveProgress, liveRollup, rowProgress, dividerClass = "border-neutral-100 dark:border-neutral-800" }) => {
|
|
63572
63881
|
const t = useKitT();
|
|
63573
63882
|
const value = col.key === "name" ? task.name : col.key === "owner" ? task.owner : col.key === "progress" ? isGroup ? liveRollup ?? rowProgress ?? 0 : liveProgress ?? task.progress ?? 0 : task.values?.[col.key] ?? null;
|
|
63574
63883
|
const custom = col.key !== "name" && renderCell ? renderCell(value, task, col) : null;
|
|
63575
|
-
return /* @__PURE__ */ (0,
|
|
63884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63576
63885
|
"div",
|
|
63577
63886
|
{
|
|
63578
|
-
className: (0,
|
|
63887
|
+
className: (0, import_classnames121.default)(
|
|
63579
63888
|
"flex shrink-0 items-center gap-1.5 overflow-hidden border-r px-2 text-[12.5px] last:border-r-0",
|
|
63580
63889
|
dividerClass
|
|
63581
63890
|
),
|
|
@@ -63583,50 +63892,50 @@ var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, render
|
|
|
63583
63892
|
width: col.width ?? "160px",
|
|
63584
63893
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
63585
63894
|
},
|
|
63586
|
-
children: first ? /* @__PURE__ */ (0,
|
|
63587
|
-
/* @__PURE__ */ (0,
|
|
63895
|
+
children: first ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63896
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "shrink-0", style: { width: depth * 14 + 18 }, children: isGroup && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63588
63897
|
"button",
|
|
63589
63898
|
{
|
|
63590
63899
|
type: "button",
|
|
63591
63900
|
className: "flex h-4 w-4 items-center justify-center rounded text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600 focus-visible:ring-2 focus-visible:ring-neutral-400 dark:hover:bg-white/10 dark:hover:text-neutral-300",
|
|
63592
63901
|
onClick: () => onCaretClick(task.id, task.open !== false),
|
|
63593
63902
|
"aria-label": t(task.open === false ? "kit.gantt.expand" : "kit.gantt.collapse", { name: task.name }),
|
|
63594
|
-
children: /* @__PURE__ */ (0,
|
|
63903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronRight, { className: (0, import_classnames121.default)("h-3 w-3 transition-transform", task.open !== false && "rotate-90") })
|
|
63595
63904
|
}
|
|
63596
63905
|
) }),
|
|
63597
|
-
isGroup && childCount > 0 ? /* @__PURE__ */ (0,
|
|
63598
|
-
/* @__PURE__ */ (0,
|
|
63599
|
-
/* @__PURE__ */ (0,
|
|
63600
|
-
] }) : /* @__PURE__ */ (0,
|
|
63601
|
-
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */ (0,
|
|
63602
|
-
/* @__PURE__ */ (0,
|
|
63906
|
+
isGroup && childCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "flex min-w-0 items-center gap-1 font-semibold text-neutral-800 dark:text-neutral-100", children: [
|
|
63907
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate", children: task.name }),
|
|
63908
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "shrink-0 rounded-full bg-neutral-100 px-1 text-[10px] font-semibold text-neutral-500 dark:bg-white/10 dark:text-neutral-400", children: childCount })
|
|
63909
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate font-medium text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
63910
|
+
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "flex min-w-0 items-center gap-1.5 text-neutral-600 dark:text-neutral-400", children: [
|
|
63911
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63603
63912
|
"span",
|
|
63604
63913
|
{
|
|
63605
|
-
className: (0,
|
|
63914
|
+
className: (0, import_classnames121.default)(
|
|
63606
63915
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[8px] font-bold uppercase text-white",
|
|
63607
63916
|
getGanttBarTokens(task.color ?? "blue").fill
|
|
63608
63917
|
),
|
|
63609
63918
|
children: String(value).slice(0, 1)
|
|
63610
63919
|
}
|
|
63611
63920
|
),
|
|
63612
|
-
/* @__PURE__ */ (0,
|
|
63613
|
-
] }) : /* @__PURE__ */ (0,
|
|
63921
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate", children: String(value) })
|
|
63922
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : col.kind === "progress" ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ProgressCell, { value: typeof value === "number" ? value : 0 }) : col.kind === "badge" ? task.badge != null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63614
63923
|
"span",
|
|
63615
63924
|
{
|
|
63616
|
-
className: (0,
|
|
63925
|
+
className: (0, import_classnames121.default)(
|
|
63617
63926
|
"rounded-full px-1.5 py-0.5 text-[10px] font-semibold",
|
|
63618
63927
|
getGanttBarTokens(task.badgeColor ?? "neutral").fill,
|
|
63619
63928
|
"text-white"
|
|
63620
63929
|
),
|
|
63621
63930
|
children: task.badge
|
|
63622
63931
|
}
|
|
63623
|
-
) : /* @__PURE__ */ (0,
|
|
63932
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : custom != null ? custom : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate text-neutral-600 dark:text-neutral-400", children: value == null || value === "" ? "\u2014" : String(value) })
|
|
63624
63933
|
}
|
|
63625
63934
|
);
|
|
63626
63935
|
};
|
|
63627
|
-
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */ (0,
|
|
63628
|
-
/* @__PURE__ */ (0,
|
|
63629
|
-
/* @__PURE__ */ (0,
|
|
63936
|
+
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "flex w-full items-center gap-1.5", children: [
|
|
63937
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-neutral-200/80 dark:bg-white/10", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("block h-full rounded-full", barClass), style: { width: `${Math.round(value * 100)}%` } }) }),
|
|
63938
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "w-7 shrink-0 text-right text-[10px] font-semibold tabular-nums text-neutral-500 dark:text-neutral-400", children: [
|
|
63630
63939
|
Math.round(value * 100),
|
|
63631
63940
|
"%"
|
|
63632
63941
|
] })
|
|
@@ -63658,7 +63967,7 @@ var TaskBar = ({
|
|
|
63658
63967
|
const t = useKitT();
|
|
63659
63968
|
const milestone = task.type === "milestone";
|
|
63660
63969
|
const barColor = task.color ?? color;
|
|
63661
|
-
const tokens = (0,
|
|
63970
|
+
const tokens = (0, import_react285.useMemo)(() => getGanttBarTokens(barColor), [barColor]);
|
|
63662
63971
|
const startMs = liveDates ? liveDates.start : toMs(task.start);
|
|
63663
63972
|
const endMs = liveDates ? liveDates.end : toMs(task.end);
|
|
63664
63973
|
const left = dateToX(startMs, rangeStart, zoom);
|
|
@@ -63683,7 +63992,7 @@ var TaskBar = ({
|
|
|
63683
63992
|
pct: progressPct
|
|
63684
63993
|
});
|
|
63685
63994
|
if (milestone) {
|
|
63686
|
-
return /* @__PURE__ */ (0,
|
|
63995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63687
63996
|
"div",
|
|
63688
63997
|
{
|
|
63689
63998
|
role: "button",
|
|
@@ -63691,7 +64000,7 @@ var TaskBar = ({
|
|
|
63691
64000
|
"aria-label": ariaLabel,
|
|
63692
64001
|
title: ariaLabel,
|
|
63693
64002
|
"data-gantt-bar": task.id,
|
|
63694
|
-
className: (0,
|
|
64003
|
+
className: (0, import_classnames121.default)(
|
|
63695
64004
|
"absolute z-10 flex cursor-pointer items-center gap-1.5 outline-none",
|
|
63696
64005
|
selected && selectionTokens.ring,
|
|
63697
64006
|
"rounded"
|
|
@@ -63701,13 +64010,13 @@ var TaskBar = ({
|
|
|
63701
64010
|
onClick: () => onSelect(task.id),
|
|
63702
64011
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
63703
64012
|
children: [
|
|
63704
|
-
/* @__PURE__ */ (0,
|
|
63705
|
-
/* @__PURE__ */ (0,
|
|
64013
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("h-3.5 w-3.5 shrink-0 rotate-45 rounded-[2px] shadow-sm", tokens.milestone) }),
|
|
64014
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate text-[11px] font-semibold text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
63706
64015
|
]
|
|
63707
64016
|
}
|
|
63708
64017
|
);
|
|
63709
64018
|
}
|
|
63710
|
-
return /* @__PURE__ */ (0,
|
|
64019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63711
64020
|
"div",
|
|
63712
64021
|
{
|
|
63713
64022
|
role: "button",
|
|
@@ -63715,7 +64024,7 @@ var TaskBar = ({
|
|
|
63715
64024
|
"aria-label": ariaLabel,
|
|
63716
64025
|
title: `${task.name} \xB7 ${formatDateTime(startMs, locale)} \u2192 ${formatDateTime(endMs, locale)} \xB7 ${progressPct}%`,
|
|
63717
64026
|
"data-gantt-bar": task.id,
|
|
63718
|
-
className: (0,
|
|
64027
|
+
className: (0, import_classnames121.default)(
|
|
63719
64028
|
"group/bar absolute z-10 cursor-grab touch-none rounded-md shadow-sm outline-none transition-shadow active:cursor-grabbing",
|
|
63720
64029
|
tokens.base,
|
|
63721
64030
|
tokens.rim,
|
|
@@ -63732,17 +64041,17 @@ var TaskBar = ({
|
|
|
63732
64041
|
onClick: () => onSelect(task.id),
|
|
63733
64042
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
63734
64043
|
children: [
|
|
63735
|
-
progress > 0 && /* @__PURE__ */ (0,
|
|
64044
|
+
progress > 0 && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63736
64045
|
"div",
|
|
63737
64046
|
{
|
|
63738
|
-
className: (0,
|
|
64047
|
+
className: (0, import_classnames121.default)("absolute inset-y-0 left-0 rounded-l-md", tokens.progress),
|
|
63739
64048
|
style: { width: `${progress * 100}%` }
|
|
63740
64049
|
}
|
|
63741
64050
|
),
|
|
63742
|
-
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */ (0,
|
|
64051
|
+
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63743
64052
|
"div",
|
|
63744
64053
|
{
|
|
63745
|
-
className: (0,
|
|
64054
|
+
className: (0, import_classnames121.default)(
|
|
63746
64055
|
"absolute inset-y-0 z-20 w-2 cursor-ew-resize touch-none opacity-0 transition-opacity group-hover/bar:opacity-100",
|
|
63747
64056
|
liveProgress != null && "opacity-100"
|
|
63748
64057
|
),
|
|
@@ -63750,10 +64059,10 @@ var TaskBar = ({
|
|
|
63750
64059
|
onPointerDown: (e) => onProgressPointerDown(task, e),
|
|
63751
64060
|
title: labels.progress,
|
|
63752
64061
|
"aria-hidden": "true",
|
|
63753
|
-
children: /* @__PURE__ */ (0,
|
|
64062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "mx-auto h-full w-0.5 rounded-full bg-white/90" })
|
|
63754
64063
|
}
|
|
63755
64064
|
),
|
|
63756
|
-
liveProgress != null && /* @__PURE__ */ (0,
|
|
64065
|
+
liveProgress != null && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63757
64066
|
"div",
|
|
63758
64067
|
{
|
|
63759
64068
|
className: "pointer-events-none absolute -top-5 z-30 -translate-x-1/2 rounded-full bg-neutral-900/90 px-1.5 py-px text-[10px] font-semibold tabular-nums text-white shadow-md",
|
|
@@ -63764,31 +64073,31 @@ var TaskBar = ({
|
|
|
63764
64073
|
]
|
|
63765
64074
|
}
|
|
63766
64075
|
),
|
|
63767
|
-
showName && (renderBar != null ? /* @__PURE__ */ (0,
|
|
63768
|
-
canEdit && /* @__PURE__ */ (0,
|
|
63769
|
-
/* @__PURE__ */ (0,
|
|
64076
|
+
showName && (renderBar != null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("pointer-events-none absolute inset-0 flex items-center px-1.5 text-[11px] font-medium", labelText), children: renderBar(task, { taskId: task.id, left, width, top, height: row.height, milestone: false }) }) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("pointer-events-none absolute inset-0 flex items-center truncate px-1.5 text-[11px] font-medium", labelText), children: task.name })),
|
|
64077
|
+
canEdit && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
64078
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63770
64079
|
"div",
|
|
63771
64080
|
{
|
|
63772
64081
|
className: "absolute inset-y-0 -left-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63773
64082
|
onPointerDown: (e) => onResizePointerDown(task, "start", e),
|
|
63774
64083
|
title: t("kit.gantt.resizeStart"),
|
|
63775
64084
|
"aria-hidden": "true",
|
|
63776
|
-
children: /* @__PURE__ */ (0,
|
|
64085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63777
64086
|
}
|
|
63778
64087
|
),
|
|
63779
|
-
/* @__PURE__ */ (0,
|
|
64088
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63780
64089
|
"div",
|
|
63781
64090
|
{
|
|
63782
64091
|
className: "absolute inset-y-0 -right-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63783
64092
|
onPointerDown: (e) => onResizePointerDown(task, "end", e),
|
|
63784
64093
|
title: t("kit.gantt.resizeEnd"),
|
|
63785
64094
|
"aria-hidden": "true",
|
|
63786
|
-
children: /* @__PURE__ */ (0,
|
|
64095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63787
64096
|
}
|
|
63788
64097
|
)
|
|
63789
64098
|
] }),
|
|
63790
|
-
canEdit && /* @__PURE__ */ (0,
|
|
63791
|
-
/* @__PURE__ */ (0,
|
|
64099
|
+
canEdit && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
64100
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63792
64101
|
"button",
|
|
63793
64102
|
{
|
|
63794
64103
|
type: "button",
|
|
@@ -63799,7 +64108,7 @@ var TaskBar = ({
|
|
|
63799
64108
|
"aria-label": t("kit.gantt.linkFromStart", { task: task.name })
|
|
63800
64109
|
}
|
|
63801
64110
|
),
|
|
63802
|
-
/* @__PURE__ */ (0,
|
|
64111
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63803
64112
|
"button",
|
|
63804
64113
|
{
|
|
63805
64114
|
type: "button",
|
|
@@ -63817,9 +64126,9 @@ var TaskBar = ({
|
|
|
63817
64126
|
};
|
|
63818
64127
|
|
|
63819
64128
|
// src/components/Gantt/GanttToolbar.tsx
|
|
63820
|
-
var
|
|
63821
|
-
var
|
|
63822
|
-
var
|
|
64129
|
+
var import_react286 = require("react");
|
|
64130
|
+
var import_classnames122 = __toESM(require("classnames"), 1);
|
|
64131
|
+
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
63823
64132
|
function nearestPreset(zoom, presets) {
|
|
63824
64133
|
let best = null;
|
|
63825
64134
|
let bestDist = Infinity;
|
|
@@ -63846,25 +64155,25 @@ var GanttToolbar = ({
|
|
|
63846
64155
|
Month: t("kit.gantt.zoomMonth"),
|
|
63847
64156
|
Quarter: t("kit.gantt.zoomQuarter")
|
|
63848
64157
|
};
|
|
63849
|
-
const active = (0,
|
|
63850
|
-
const chrome = (0,
|
|
64158
|
+
const active = (0, import_react286.useMemo)(() => nearestPreset(zoom, presets), [zoom, presets]);
|
|
64159
|
+
const chrome = (0, import_react286.useMemo)(
|
|
63851
64160
|
() => getSurfaceVariantClasses(variant, "neutral"),
|
|
63852
64161
|
[variant]
|
|
63853
64162
|
);
|
|
63854
|
-
return /* @__PURE__ */ (0,
|
|
64163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(
|
|
63855
64164
|
"div",
|
|
63856
64165
|
{
|
|
63857
|
-
className: (0,
|
|
64166
|
+
className: (0, import_classnames122.default)(
|
|
63858
64167
|
"pointer-events-auto flex items-center gap-1 rounded-lg p-1",
|
|
63859
64168
|
chrome
|
|
63860
64169
|
),
|
|
63861
64170
|
children: [
|
|
63862
|
-
/* @__PURE__ */ (0,
|
|
64171
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "flex items-center rounded-md bg-neutral-100 p-0.5 dark:bg-neutral-800", children: presets.map((p) => /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
63863
64172
|
"button",
|
|
63864
64173
|
{
|
|
63865
64174
|
type: "button",
|
|
63866
64175
|
onClick: () => onZoomTo(p.value),
|
|
63867
|
-
className: (0,
|
|
64176
|
+
className: (0, import_classnames122.default)(
|
|
63868
64177
|
"rounded px-1.5 py-0.5 text-[10.5px] font-semibold transition-colors",
|
|
63869
64178
|
active === p.value ? "bg-white text-neutral-900 shadow-sm dark:bg-neutral-600 dark:text-white" : "text-neutral-500 hover:text-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-200"
|
|
63870
64179
|
),
|
|
@@ -63872,9 +64181,9 @@ var GanttToolbar = ({
|
|
|
63872
64181
|
},
|
|
63873
64182
|
p.label
|
|
63874
64183
|
)) }),
|
|
63875
|
-
/* @__PURE__ */ (0,
|
|
63876
|
-
/* @__PURE__ */ (0,
|
|
63877
|
-
/* @__PURE__ */ (0,
|
|
64184
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "mx-0.5 h-4 w-px bg-neutral-200 dark:bg-neutral-700" }),
|
|
64185
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1 / 1.25), "aria-label": t("kit.gantt.zoomOut"), children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("span", { className: "text-xs font-semibold leading-none", children: "\u2212" }) }),
|
|
64186
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1.25), "aria-label": t("kit.gantt.zoomIn"), children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("span", { className: "text-xs font-semibold leading-none", children: "+" }) })
|
|
63878
64187
|
]
|
|
63879
64188
|
}
|
|
63880
64189
|
);
|
|
@@ -63882,16 +64191,16 @@ var GanttToolbar = ({
|
|
|
63882
64191
|
GanttToolbar.displayName = "GanttToolbar";
|
|
63883
64192
|
|
|
63884
64193
|
// src/components/Gantt/useGanttDrag.ts
|
|
63885
|
-
var
|
|
64194
|
+
var import_react287 = require("react");
|
|
63886
64195
|
function useGanttDrag(opts) {
|
|
63887
|
-
const [drag, setDrag] = (0,
|
|
63888
|
-
const [linkSelected, setLinkSelected] = (0,
|
|
63889
|
-
const optsRef = (0,
|
|
64196
|
+
const [drag, setDrag] = (0, import_react287.useState)(null);
|
|
64197
|
+
const [linkSelected, setLinkSelected] = (0, import_react287.useState)(null);
|
|
64198
|
+
const optsRef = (0, import_react287.useRef)(opts);
|
|
63890
64199
|
optsRef.current = opts;
|
|
63891
|
-
const dragRef = (0,
|
|
64200
|
+
const dragRef = (0, import_react287.useRef)(null);
|
|
63892
64201
|
dragRef.current = drag;
|
|
63893
64202
|
const { rows, zoom, rangeStart, accentColor } = opts;
|
|
63894
|
-
const barGeom = (0,
|
|
64203
|
+
const barGeom = (0, import_react287.useCallback)(
|
|
63895
64204
|
(taskId) => {
|
|
63896
64205
|
const row = rows.find((r) => r.key === `task:${taskId}`);
|
|
63897
64206
|
if (!row?.task) return null;
|
|
@@ -63911,7 +64220,7 @@ function useGanttDrag(opts) {
|
|
|
63911
64220
|
},
|
|
63912
64221
|
[rows, zoom, rangeStart]
|
|
63913
64222
|
);
|
|
63914
|
-
const findTargetBar = (0,
|
|
64223
|
+
const findTargetBar = (0, import_react287.useCallback)(
|
|
63915
64224
|
(x, y, excludeId) => {
|
|
63916
64225
|
const row = rows.find((r) => r.task && y >= r.top && y < r.top + r.height);
|
|
63917
64226
|
if (!row?.task || row.task.id === excludeId) return null;
|
|
@@ -63922,7 +64231,7 @@ function useGanttDrag(opts) {
|
|
|
63922
64231
|
},
|
|
63923
64232
|
[rows, barGeom]
|
|
63924
64233
|
);
|
|
63925
|
-
const allBarGeoms = (0,
|
|
64234
|
+
const allBarGeoms = (0, import_react287.useCallback)(() => {
|
|
63926
64235
|
const out = [];
|
|
63927
64236
|
for (const row of rows) {
|
|
63928
64237
|
if (!row.task) continue;
|
|
@@ -63931,17 +64240,17 @@ function useGanttDrag(opts) {
|
|
|
63931
64240
|
}
|
|
63932
64241
|
return out;
|
|
63933
64242
|
}, [rows, barGeom]);
|
|
63934
|
-
const timelineX = (0,
|
|
64243
|
+
const timelineX = (0, import_react287.useCallback)((clientX) => {
|
|
63935
64244
|
const overlay = optsRef.current.overlayRef.current;
|
|
63936
64245
|
if (!overlay) return 0;
|
|
63937
64246
|
return clientX - overlay.getBoundingClientRect().left;
|
|
63938
64247
|
}, []);
|
|
63939
|
-
const rowY = (0,
|
|
64248
|
+
const rowY = (0, import_react287.useCallback)((clientY) => {
|
|
63940
64249
|
const overlay = optsRef.current.overlayRef.current;
|
|
63941
64250
|
if (!overlay) return 0;
|
|
63942
64251
|
return clientY - overlay.getBoundingClientRect().top;
|
|
63943
64252
|
}, []);
|
|
63944
|
-
(0,
|
|
64253
|
+
(0, import_react287.useEffect)(() => {
|
|
63945
64254
|
if (!drag) return;
|
|
63946
64255
|
const onMove = (e) => {
|
|
63947
64256
|
e.preventDefault();
|
|
@@ -64066,7 +64375,7 @@ function useGanttDrag(opts) {
|
|
|
64066
64375
|
window.removeEventListener("pointerup", onUp);
|
|
64067
64376
|
};
|
|
64068
64377
|
}, [drag != null, timelineX, rowY]);
|
|
64069
|
-
const beginDrag = (0,
|
|
64378
|
+
const beginDrag = (0, import_react287.useCallback)(
|
|
64070
64379
|
(partial, e, focusEl) => {
|
|
64071
64380
|
const o = optsRef.current;
|
|
64072
64381
|
if (!o.interactive) return;
|
|
@@ -64100,7 +64409,7 @@ function useGanttDrag(opts) {
|
|
|
64100
64409
|
},
|
|
64101
64410
|
[timelineX, rowY]
|
|
64102
64411
|
);
|
|
64103
|
-
const onBarPointerDown = (0,
|
|
64412
|
+
const onBarPointerDown = (0, import_react287.useCallback)(
|
|
64104
64413
|
(task, e) => {
|
|
64105
64414
|
if (e.button !== 0) return;
|
|
64106
64415
|
beginDrag(
|
|
@@ -64118,7 +64427,7 @@ function useGanttDrag(opts) {
|
|
|
64118
64427
|
},
|
|
64119
64428
|
[beginDrag, timelineX, rowY]
|
|
64120
64429
|
);
|
|
64121
|
-
const onResizePointerDown = (0,
|
|
64430
|
+
const onResizePointerDown = (0, import_react287.useCallback)(
|
|
64122
64431
|
(task, edge, e) => {
|
|
64123
64432
|
if (e.button !== 0) return;
|
|
64124
64433
|
e.stopPropagation();
|
|
@@ -64137,7 +64446,7 @@ function useGanttDrag(opts) {
|
|
|
64137
64446
|
},
|
|
64138
64447
|
[beginDrag, timelineX, rowY]
|
|
64139
64448
|
);
|
|
64140
|
-
const onGripPointerDown = (0,
|
|
64449
|
+
const onGripPointerDown = (0, import_react287.useCallback)(
|
|
64141
64450
|
(_rowKey, task, e) => {
|
|
64142
64451
|
if (e.button !== 0) return;
|
|
64143
64452
|
const rowEl = e.currentTarget.closest(
|
|
@@ -64162,7 +64471,7 @@ function useGanttDrag(opts) {
|
|
|
64162
64471
|
},
|
|
64163
64472
|
[beginDrag, timelineX, rowY]
|
|
64164
64473
|
);
|
|
64165
|
-
const onLinkHandlePointerDown = (0,
|
|
64474
|
+
const onLinkHandlePointerDown = (0, import_react287.useCallback)(
|
|
64166
64475
|
(task, side, e, fromOffset = 0) => {
|
|
64167
64476
|
if (e.button !== 0) return;
|
|
64168
64477
|
e.stopPropagation();
|
|
@@ -64182,7 +64491,7 @@ function useGanttDrag(opts) {
|
|
|
64182
64491
|
},
|
|
64183
64492
|
[beginDrag, timelineX, rowY]
|
|
64184
64493
|
);
|
|
64185
|
-
const onProgressPointerDown = (0,
|
|
64494
|
+
const onProgressPointerDown = (0, import_react287.useCallback)(
|
|
64186
64495
|
(task, e) => {
|
|
64187
64496
|
if (e.button !== 0) return;
|
|
64188
64497
|
e.stopPropagation();
|
|
@@ -64200,7 +64509,7 @@ function useGanttDrag(opts) {
|
|
|
64200
64509
|
},
|
|
64201
64510
|
[beginDrag, timelineX, rowY]
|
|
64202
64511
|
);
|
|
64203
|
-
const rubber = (0,
|
|
64512
|
+
const rubber = (0, import_react287.useMemo)(() => {
|
|
64204
64513
|
if (!drag || drag.kind !== "link") return null;
|
|
64205
64514
|
const source = barGeom(drag.taskId);
|
|
64206
64515
|
if (!source) return null;
|
|
@@ -64232,7 +64541,7 @@ function useGanttDrag(opts) {
|
|
|
64232
64541
|
}
|
|
64233
64542
|
|
|
64234
64543
|
// src/components/Gantt/Gantt.tsx
|
|
64235
|
-
var
|
|
64544
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
64236
64545
|
var HEADER_HEIGHT = 52;
|
|
64237
64546
|
var GRIP_WIDTH = 36;
|
|
64238
64547
|
var DEFAULT_COLUMNS = [
|
|
@@ -64291,7 +64600,7 @@ var Gantt = ({
|
|
|
64291
64600
|
const t = useKitT();
|
|
64292
64601
|
const kitEngine = useKitEngine();
|
|
64293
64602
|
const dateLocale = locale ?? kitEngine.locale;
|
|
64294
|
-
const allLabels = (0,
|
|
64603
|
+
const allLabels = (0, import_react288.useMemo)(
|
|
64295
64604
|
() => ({
|
|
64296
64605
|
loading: t("kit.gantt.loading"),
|
|
64297
64606
|
empty: t("kit.gantt.empty"),
|
|
@@ -64314,10 +64623,10 @@ var Gantt = ({
|
|
|
64314
64623
|
title: c.key === "name" ? allLabels.task : c.key === "owner" ? t("kit.gantt.colOwner") : t("kit.gantt.colProgress")
|
|
64315
64624
|
}));
|
|
64316
64625
|
const interactive = editable ?? Boolean(onTasksChange || onLinksChange || onReorder);
|
|
64317
|
-
const surfaceText = (0,
|
|
64318
|
-
const [internalZoom, setInternalZoom] = (0,
|
|
64626
|
+
const surfaceText = (0, import_react288.useMemo)(() => getSurfaceTextTokens(variant), [variant]);
|
|
64627
|
+
const [internalZoom, setInternalZoom] = (0, import_react288.useState)(initialZoom);
|
|
64319
64628
|
const zoom = zoomProp ?? internalZoom;
|
|
64320
|
-
const setZoom = (0,
|
|
64629
|
+
const setZoom = (0, import_react288.useCallback)(
|
|
64321
64630
|
(z) => {
|
|
64322
64631
|
const clamped = Math.min(maxZoom, Math.max(minZoom, z));
|
|
64323
64632
|
if (onZoomChange) onZoomChange(clamped);
|
|
@@ -64325,33 +64634,33 @@ var Gantt = ({
|
|
|
64325
64634
|
},
|
|
64326
64635
|
[minZoom, maxZoom, onZoomChange]
|
|
64327
64636
|
);
|
|
64328
|
-
const [internalSelection, setInternalSelection] = (0,
|
|
64637
|
+
const [internalSelection, setInternalSelection] = (0, import_react288.useState)(null);
|
|
64329
64638
|
const selectedId = selectedIdProp !== void 0 ? selectedIdProp : internalSelection;
|
|
64330
|
-
const setSelected = (0,
|
|
64639
|
+
const setSelected = (0, import_react288.useCallback)(
|
|
64331
64640
|
(id) => {
|
|
64332
64641
|
onSelect?.(id);
|
|
64333
64642
|
if (selectedIdProp === void 0) setInternalSelection(id);
|
|
64334
64643
|
},
|
|
64335
64644
|
[onSelect, selectedIdProp]
|
|
64336
64645
|
);
|
|
64337
|
-
const [internalOrder, setInternalOrder] = (0,
|
|
64646
|
+
const [internalOrder, setInternalOrder] = (0, import_react288.useState)(void 0);
|
|
64338
64647
|
const rowOrder = rowOrderProp ?? internalOrder;
|
|
64339
|
-
const handleReorder = (0,
|
|
64648
|
+
const handleReorder = (0, import_react288.useCallback)(
|
|
64340
64649
|
(order) => {
|
|
64341
64650
|
onReorder?.(order);
|
|
64342
64651
|
if (rowOrderProp === void 0) setInternalOrder(order);
|
|
64343
64652
|
},
|
|
64344
64653
|
[onReorder, rowOrderProp]
|
|
64345
64654
|
);
|
|
64346
|
-
const [collapsed, setCollapsed] = (0,
|
|
64655
|
+
const [collapsed, setCollapsed] = (0, import_react288.useState)(
|
|
64347
64656
|
() => new Set(tasks.filter((t2) => t2.open === false).map((t2) => t2.id))
|
|
64348
64657
|
);
|
|
64349
|
-
const [closedLanes, setClosedLanes] = (0,
|
|
64658
|
+
const [closedLanes, setClosedLanes] = (0, import_react288.useState)(
|
|
64350
64659
|
() => new Set((lanes ?? []).filter((l) => l.open === false).map((l) => l.id))
|
|
64351
64660
|
);
|
|
64352
|
-
const tasksRef = (0,
|
|
64353
|
-
const lanesRef = (0,
|
|
64354
|
-
(0,
|
|
64661
|
+
const tasksRef = (0, import_react288.useRef)(tasks);
|
|
64662
|
+
const lanesRef = (0, import_react288.useRef)(lanes);
|
|
64663
|
+
(0, import_react288.useEffect)(() => {
|
|
64355
64664
|
if (tasksRef.current !== tasks) {
|
|
64356
64665
|
tasksRef.current = tasks;
|
|
64357
64666
|
setCollapsed(new Set(tasks.filter((t2) => t2.open === false).map((t2) => t2.id)));
|
|
@@ -64361,7 +64670,7 @@ var Gantt = ({
|
|
|
64361
64670
|
setClosedLanes(new Set((lanes ?? []).filter((l) => l.open === false).map((l) => l.id)));
|
|
64362
64671
|
}
|
|
64363
64672
|
}, [tasks, lanes]);
|
|
64364
|
-
const toggleCollapse = (0,
|
|
64673
|
+
const toggleCollapse = (0, import_react288.useCallback)((taskId, isOpen) => {
|
|
64365
64674
|
setCollapsed((prev) => {
|
|
64366
64675
|
const next = new Set(prev);
|
|
64367
64676
|
if (isOpen) next.add(taskId);
|
|
@@ -64369,7 +64678,7 @@ var Gantt = ({
|
|
|
64369
64678
|
return next;
|
|
64370
64679
|
});
|
|
64371
64680
|
}, []);
|
|
64372
|
-
const toggleLane = (0,
|
|
64681
|
+
const toggleLane = (0, import_react288.useCallback)((laneId, isOpen) => {
|
|
64373
64682
|
setClosedLanes((prev) => {
|
|
64374
64683
|
const next = new Set(prev);
|
|
64375
64684
|
if (isOpen) next.add(laneId);
|
|
@@ -64377,37 +64686,37 @@ var Gantt = ({
|
|
|
64377
64686
|
return next;
|
|
64378
64687
|
});
|
|
64379
64688
|
}, []);
|
|
64380
|
-
const effectiveTasks = (0,
|
|
64689
|
+
const effectiveTasks = (0, import_react288.useMemo)(() => {
|
|
64381
64690
|
let out = tasks;
|
|
64382
64691
|
if (collapsed.size > 0) {
|
|
64383
64692
|
out = out.map((t2) => collapsed.has(t2.id) ? { ...t2, open: false } : t2);
|
|
64384
64693
|
}
|
|
64385
64694
|
return out;
|
|
64386
64695
|
}, [tasks, collapsed]);
|
|
64387
|
-
const effectiveLanes = (0,
|
|
64696
|
+
const effectiveLanes = (0, import_react288.useMemo)(() => {
|
|
64388
64697
|
if (closedLanes.size === 0) return lanes;
|
|
64389
64698
|
return (lanes ?? []).map(
|
|
64390
64699
|
(l) => closedLanes.has(l.id) ? { ...l, open: false } : l
|
|
64391
64700
|
);
|
|
64392
64701
|
}, [lanes, closedLanes]);
|
|
64393
|
-
const committedModel = (0,
|
|
64702
|
+
const committedModel = (0, import_react288.useMemo)(
|
|
64394
64703
|
() => buildRows(effectiveTasks, effectiveLanes, rowOrder, rowHeight2),
|
|
64395
64704
|
[effectiveTasks, effectiveLanes, rowOrder, rowHeight2]
|
|
64396
64705
|
);
|
|
64397
|
-
const range = (0,
|
|
64706
|
+
const range = (0, import_react288.useMemo)(() => {
|
|
64398
64707
|
const starts = tasks.map((t2) => toMs(t2.start));
|
|
64399
64708
|
const ends = tasks.map((t2) => toMs(t2.end));
|
|
64400
64709
|
return computeViewRange(starts, ends);
|
|
64401
64710
|
}, [tasks]);
|
|
64402
64711
|
const timelineWidth = rangeWidth(range.start, range.end, zoom);
|
|
64403
|
-
const scaleLevels = (0,
|
|
64712
|
+
const scaleLevels = (0, import_react288.useMemo)(
|
|
64404
64713
|
() => buildTimeScale(range.start, range.end, zoom, dateLocale),
|
|
64405
64714
|
[range, zoom, dateLocale]
|
|
64406
64715
|
);
|
|
64407
|
-
const [colWidths, setColWidths] = (0,
|
|
64716
|
+
const [colWidths, setColWidths] = (0, import_react288.useState)(
|
|
64408
64717
|
() => columnWidths ? { ...columnWidths } : {}
|
|
64409
64718
|
);
|
|
64410
|
-
(0,
|
|
64719
|
+
(0, import_react288.useEffect)(() => {
|
|
64411
64720
|
if (!columnWidths) return;
|
|
64412
64721
|
setColWidths((prev) => ({ ...prev, ...columnWidths }));
|
|
64413
64722
|
}, [columnWidths]);
|
|
@@ -64417,21 +64726,21 @@ var Gantt = ({
|
|
|
64417
64726
|
const m = /^(\d+(?:\.\d+)?)px$/.exec(col.width ?? "");
|
|
64418
64727
|
return m ? Number(m[1]) : 160;
|
|
64419
64728
|
};
|
|
64420
|
-
const sizedColumns = (0,
|
|
64729
|
+
const sizedColumns = (0, import_react288.useMemo)(
|
|
64421
64730
|
() => resolvedColumns.map((c) => ({ ...c, width: `${effectiveColWidth(c)}px` })),
|
|
64422
64731
|
[resolvedColumns, colWidths]
|
|
64423
64732
|
);
|
|
64424
|
-
const effectiveWidthsRef = (0,
|
|
64733
|
+
const effectiveWidthsRef = (0, import_react288.useRef)({});
|
|
64425
64734
|
effectiveWidthsRef.current = Object.fromEntries(
|
|
64426
64735
|
sizedColumns.map((c) => [c.key, effectiveColWidth(c)])
|
|
64427
64736
|
);
|
|
64428
|
-
const leftWidth = (0,
|
|
64737
|
+
const leftWidth = (0, import_react288.useMemo)(
|
|
64429
64738
|
() => GRIP_WIDTH + resolvedColumns.reduce((sum, c) => sum + effectiveColWidth(c), 0),
|
|
64430
64739
|
[resolvedColumns, colWidths]
|
|
64431
64740
|
);
|
|
64432
|
-
const resizingRef = (0,
|
|
64433
|
-
const [resizingKey, setResizingKey] = (0,
|
|
64434
|
-
const startColumnResize = (0,
|
|
64741
|
+
const resizingRef = (0, import_react288.useRef)(null);
|
|
64742
|
+
const [resizingKey, setResizingKey] = (0, import_react288.useState)(null);
|
|
64743
|
+
const startColumnResize = (0, import_react288.useCallback)(
|
|
64435
64744
|
(e, key) => {
|
|
64436
64745
|
if (e.button !== 0) return;
|
|
64437
64746
|
e.preventDefault();
|
|
@@ -64462,23 +64771,23 @@ var Gantt = ({
|
|
|
64462
64771
|
},
|
|
64463
64772
|
[onColumnWidthChange]
|
|
64464
64773
|
);
|
|
64465
|
-
(0,
|
|
64774
|
+
(0, import_react288.useEffect)(
|
|
64466
64775
|
() => () => {
|
|
64467
64776
|
document.body.style.cursor = "";
|
|
64468
64777
|
document.body.style.userSelect = "";
|
|
64469
64778
|
},
|
|
64470
64779
|
[]
|
|
64471
64780
|
);
|
|
64472
|
-
const scrollRef = (0,
|
|
64473
|
-
const overlayRef = (0,
|
|
64474
|
-
const rootRef = (0,
|
|
64475
|
-
const headerScaleRef = (0,
|
|
64476
|
-
const syncHeaderScale = (0,
|
|
64781
|
+
const scrollRef = (0, import_react288.useRef)(null);
|
|
64782
|
+
const overlayRef = (0, import_react288.useRef)(null);
|
|
64783
|
+
const rootRef = (0, import_react288.useRef)(null);
|
|
64784
|
+
const headerScaleRef = (0, import_react288.useRef)(null);
|
|
64785
|
+
const syncHeaderScale = (0, import_react288.useCallback)(() => {
|
|
64477
64786
|
const s = scrollRef.current;
|
|
64478
64787
|
const h = headerScaleRef.current;
|
|
64479
64788
|
if (s && h) h.style.transform = `translateX(${-s.scrollLeft}px)`;
|
|
64480
64789
|
}, []);
|
|
64481
|
-
const zoomBy = (0,
|
|
64790
|
+
const zoomBy = (0, import_react288.useCallback)(
|
|
64482
64791
|
(factor, pointerClientX) => {
|
|
64483
64792
|
const el = scrollRef.current;
|
|
64484
64793
|
const next = Math.min(maxZoom, Math.max(minZoom, zoom * factor));
|
|
@@ -64497,7 +64806,7 @@ var Gantt = ({
|
|
|
64497
64806
|
},
|
|
64498
64807
|
[zoom, minZoom, maxZoom, leftWidth, setZoom]
|
|
64499
64808
|
);
|
|
64500
|
-
(0,
|
|
64809
|
+
(0, import_react288.useEffect)(() => {
|
|
64501
64810
|
const el = scrollRef.current;
|
|
64502
64811
|
if (!el) return;
|
|
64503
64812
|
const onWheel = (e) => {
|
|
@@ -64509,10 +64818,10 @@ var Gantt = ({
|
|
|
64509
64818
|
el.addEventListener("wheel", onWheel, { passive: false });
|
|
64510
64819
|
return () => el.removeEventListener("wheel", onWheel);
|
|
64511
64820
|
}, [zoomBy]);
|
|
64512
|
-
(0,
|
|
64821
|
+
(0, import_react288.useEffect)(() => {
|
|
64513
64822
|
syncHeaderScale();
|
|
64514
64823
|
}, [syncHeaderScale, timelineWidth, zoom, range.start, leftWidth]);
|
|
64515
|
-
const liveRowsRef = (0,
|
|
64824
|
+
const liveRowsRef = (0, import_react288.useRef)(null);
|
|
64516
64825
|
const dragApi = useGanttDrag({
|
|
64517
64826
|
scrollRef,
|
|
64518
64827
|
overlayRef,
|
|
@@ -64534,12 +64843,12 @@ var Gantt = ({
|
|
|
64534
64843
|
rowOrder,
|
|
64535
64844
|
setSelected
|
|
64536
64845
|
});
|
|
64537
|
-
const liveReorder = (0,
|
|
64846
|
+
const liveReorder = (0, import_react288.useMemo)(() => {
|
|
64538
64847
|
const d = dragApi.drag;
|
|
64539
64848
|
if (d?.kind !== "reorder" || d.beforeId === void 0) return null;
|
|
64540
64849
|
return applyRowReorder(effectiveTasks, d.taskId, d.beforeId, rowOrder);
|
|
64541
64850
|
}, [dragApi.drag, effectiveTasks, rowOrder]);
|
|
64542
|
-
const liveModel = (0,
|
|
64851
|
+
const liveModel = (0, import_react288.useMemo)(
|
|
64543
64852
|
() => liveReorder ? buildRows(
|
|
64544
64853
|
liveReorder.tasks,
|
|
64545
64854
|
effectiveLanes,
|
|
@@ -64549,7 +64858,7 @@ var Gantt = ({
|
|
|
64549
64858
|
[liveReorder, effectiveLanes, rowHeight2, committedModel]
|
|
64550
64859
|
);
|
|
64551
64860
|
liveRowsRef.current = liveModel.rows;
|
|
64552
|
-
const bars = (0,
|
|
64861
|
+
const bars = (0, import_react288.useMemo)(() => {
|
|
64553
64862
|
const map = /* @__PURE__ */ new Map();
|
|
64554
64863
|
for (const row of liveModel.rows) {
|
|
64555
64864
|
if (!row.task) continue;
|
|
@@ -64571,7 +64880,7 @@ var Gantt = ({
|
|
|
64571
64880
|
return map;
|
|
64572
64881
|
}, [liveModel.rows, range, zoom]);
|
|
64573
64882
|
const bodyHeight = liveModel.rows.length > 0 ? liveModel.rows[liveModel.rows.length - 1].top + liveModel.rows[liveModel.rows.length - 1].height : 0;
|
|
64574
|
-
const onBarKeyDown = (0,
|
|
64883
|
+
const onBarKeyDown = (0, import_react288.useCallback)(
|
|
64575
64884
|
(e, task) => {
|
|
64576
64885
|
if (!interactive || task.locked || !onTasksChange) return;
|
|
64577
64886
|
const stepMs = snap2 === "hour" ? 36e5 : snap2 === "week" ? 7 * MS_PER_DAY : MS_PER_DAY;
|
|
@@ -64616,7 +64925,7 @@ var Gantt = ({
|
|
|
64616
64925
|
},
|
|
64617
64926
|
[interactive, snap2, tasks, onTasksChange, setSelected]
|
|
64618
64927
|
);
|
|
64619
|
-
const deleteSelectedLink = (0,
|
|
64928
|
+
const deleteSelectedLink = (0, import_react288.useCallback)(() => {
|
|
64620
64929
|
const sel = dragApi.linkSelected;
|
|
64621
64930
|
if (!sel || !interactive || !onLinksChange) return;
|
|
64622
64931
|
const key = (l) => l.id ?? `${l.source}~${l.target}~${l.type ?? "fs"}`;
|
|
@@ -64624,7 +64933,7 @@ var Gantt = ({
|
|
|
64624
64933
|
onLinksChange(links.filter((l) => key(l) !== selKey));
|
|
64625
64934
|
dragApi.setLinkSelected(null);
|
|
64626
64935
|
}, [dragApi, links, interactive, onLinksChange]);
|
|
64627
|
-
const moveSelection = (0,
|
|
64936
|
+
const moveSelection = (0, import_react288.useCallback)(
|
|
64628
64937
|
(where) => {
|
|
64629
64938
|
const rows = liveModel.rows;
|
|
64630
64939
|
if (!rows.length) return;
|
|
@@ -64637,7 +64946,7 @@ var Gantt = ({
|
|
|
64637
64946
|
},
|
|
64638
64947
|
[liveModel.rows, selectedId, setSelected]
|
|
64639
64948
|
);
|
|
64640
|
-
const onRootKeyDown = (0,
|
|
64949
|
+
const onRootKeyDown = (0, import_react288.useCallback)(
|
|
64641
64950
|
(e) => {
|
|
64642
64951
|
if (dragApi.linkSelected) {
|
|
64643
64952
|
if (e.key === "Escape") {
|
|
@@ -64683,14 +64992,14 @@ var Gantt = ({
|
|
|
64683
64992
|
},
|
|
64684
64993
|
[dragApi, deleteSelectedLink, moveSelection, setZoom, zoom]
|
|
64685
64994
|
);
|
|
64686
|
-
const handleSelectLink = (0,
|
|
64995
|
+
const handleSelectLink = (0, import_react288.useCallback)(
|
|
64687
64996
|
(link) => {
|
|
64688
64997
|
dragApi.setLinkSelected(link);
|
|
64689
64998
|
if (link) rootRef.current?.focus();
|
|
64690
64999
|
},
|
|
64691
65000
|
[dragApi]
|
|
64692
65001
|
);
|
|
64693
|
-
const handleRootPointerDown = (0,
|
|
65002
|
+
const handleRootPointerDown = (0, import_react288.useCallback)(
|
|
64694
65003
|
(e) => {
|
|
64695
65004
|
if (e.target.closest?.("[data-gantt-keep-link-selection]")) return;
|
|
64696
65005
|
if (dragApi.linkSelected) dragApi.setLinkSelected(null);
|
|
@@ -64705,22 +65014,22 @@ var Gantt = ({
|
|
|
64705
65014
|
const drag = dragApi.drag;
|
|
64706
65015
|
const dragTask = drag?.taskId ? committedModel.tasksById.get(drag.taskId) : void 0;
|
|
64707
65016
|
const reorderLineY = drag?.kind === "reorder" && drag.beforeId !== void 0 ? reorderPreviewTop(liveModel.rows, `task:${drag.taskId}`, drag.beforeId) : null;
|
|
64708
|
-
const dragSubtree = (0,
|
|
65017
|
+
const dragSubtree = (0, import_react288.useMemo)(() => {
|
|
64709
65018
|
if (dragApi.drag?.kind !== "reorder") return null;
|
|
64710
65019
|
return reorderDragSubtree(
|
|
64711
65020
|
liveModel.rows,
|
|
64712
65021
|
`task:${dragApi.drag.taskId}`
|
|
64713
65022
|
);
|
|
64714
65023
|
}, [dragApi.drag, liveModel.rows]);
|
|
64715
|
-
const dragSubtreeKeys = (0,
|
|
65024
|
+
const dragSubtreeKeys = (0, import_react288.useMemo)(
|
|
64716
65025
|
() => new Set((dragSubtree ?? []).map((r) => r.key)),
|
|
64717
65026
|
[dragSubtree]
|
|
64718
65027
|
);
|
|
64719
|
-
const dragSubtreeHeight = (0,
|
|
65028
|
+
const dragSubtreeHeight = (0, import_react288.useMemo)(
|
|
64720
65029
|
() => (dragSubtree ?? []).reduce((sum, r) => sum + r.height, 0),
|
|
64721
65030
|
[dragSubtree]
|
|
64722
65031
|
);
|
|
64723
|
-
const liveDragDates = (0,
|
|
65032
|
+
const liveDragDates = (0, import_react288.useMemo)(() => {
|
|
64724
65033
|
if (!drag || !dragTask) return null;
|
|
64725
65034
|
if (drag.kind !== "move" && drag.kind !== "resize-start" && drag.kind !== "resize-end") return null;
|
|
64726
65035
|
return applyDragDates(
|
|
@@ -64731,7 +65040,7 @@ var Gantt = ({
|
|
|
64731
65040
|
);
|
|
64732
65041
|
}, [drag, dragTask, zoom, snap2]);
|
|
64733
65042
|
const liveDragProgress = drag?.kind === "progress" && drag.liveProgress != null ? drag.liveProgress : null;
|
|
64734
|
-
const dragOverride = (0,
|
|
65043
|
+
const dragOverride = (0, import_react288.useMemo)(() => {
|
|
64735
65044
|
if (!drag || !dragTask) return null;
|
|
64736
65045
|
if (drag.kind === "progress" && drag.liveProgress != null) {
|
|
64737
65046
|
return { ...dragTask, progress: drag.liveProgress };
|
|
@@ -64741,11 +65050,11 @@ var Gantt = ({
|
|
|
64741
65050
|
}
|
|
64742
65051
|
return null;
|
|
64743
65052
|
}, [drag, dragTask, liveDragDates]);
|
|
64744
|
-
const liveLaneProgress = (0,
|
|
65053
|
+
const liveLaneProgress = (0, import_react288.useMemo)(
|
|
64745
65054
|
() => dragOverride && dragTask ? laneRollupProgress(effectiveTasks, dragTask.id, dragOverride) : null,
|
|
64746
65055
|
[dragOverride, dragTask, effectiveTasks]
|
|
64747
65056
|
);
|
|
64748
|
-
const liveGroupProgress = (0,
|
|
65057
|
+
const liveGroupProgress = (0, import_react288.useMemo)(() => {
|
|
64749
65058
|
if (!dragOverride || !dragTask) return null;
|
|
64750
65059
|
const byId = new Map(effectiveTasks.map((t2) => [t2.id, t2]));
|
|
64751
65060
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -64757,7 +65066,7 @@ var Gantt = ({
|
|
|
64757
65066
|
}
|
|
64758
65067
|
return m.size > 0 ? m : null;
|
|
64759
65068
|
}, [dragOverride, dragTask, effectiveTasks]);
|
|
64760
|
-
const liveLinkBars = (0,
|
|
65069
|
+
const liveLinkBars = (0, import_react288.useMemo)(() => {
|
|
64761
65070
|
if (!liveDragDates || !dragTask) return bars;
|
|
64762
65071
|
const g = bars.get(dragTask.id);
|
|
64763
65072
|
if (!g) return bars;
|
|
@@ -64766,12 +65075,12 @@ var Gantt = ({
|
|
|
64766
65075
|
if (left === g.left && width === g.width) return bars;
|
|
64767
65076
|
return new Map(bars).set(dragTask.id, { ...g, left, width });
|
|
64768
65077
|
}, [bars, liveDragDates, dragTask, range, zoom]);
|
|
64769
|
-
const linkPaths = (0,
|
|
65078
|
+
const linkPaths = (0, import_react288.useMemo)(
|
|
64770
65079
|
() => computeLinkPaths(links, liveLinkBars, color),
|
|
64771
65080
|
[links, liveLinkBars, color]
|
|
64772
65081
|
);
|
|
64773
|
-
const linkFan = (0,
|
|
64774
|
-
return /* @__PURE__ */ (0,
|
|
65082
|
+
const linkFan = (0, import_react288.useMemo)(() => computeLinkFanOffsets(links, bars), [links, bars]);
|
|
65083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64775
65084
|
Panel_default,
|
|
64776
65085
|
{
|
|
64777
65086
|
ref: rootRef,
|
|
@@ -64789,31 +65098,31 @@ var Gantt = ({
|
|
|
64789
65098
|
"aria-label": t("kit.gantt.root"),
|
|
64790
65099
|
onKeyDown: onRootKeyDown,
|
|
64791
65100
|
onPointerDown: handleRootPointerDown,
|
|
64792
|
-
children: /* @__PURE__ */ (0,
|
|
64793
|
-
/* @__PURE__ */ (0,
|
|
65101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
65102
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64794
65103
|
"div",
|
|
64795
65104
|
{
|
|
64796
|
-
className: (0,
|
|
65105
|
+
className: (0, import_classnames123.default)(
|
|
64797
65106
|
"flex shrink-0 items-center gap-3 border-b px-4 py-3",
|
|
64798
65107
|
surfaceText.divider
|
|
64799
65108
|
),
|
|
64800
65109
|
children: [
|
|
64801
|
-
hasNode(icon) && /* @__PURE__ */ (0,
|
|
65110
|
+
hasNode(icon) && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64802
65111
|
"div",
|
|
64803
65112
|
{
|
|
64804
|
-
className: (0,
|
|
65113
|
+
className: (0, import_classnames123.default)(
|
|
64805
65114
|
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
64806
65115
|
getSurfaceVariantClasses(variant, "neutral")
|
|
64807
65116
|
),
|
|
64808
65117
|
children: icon
|
|
64809
65118
|
}
|
|
64810
65119
|
),
|
|
64811
|
-
(title != null || subtitle != null) && /* @__PURE__ */ (0,
|
|
64812
|
-
subtitle != null && /* @__PURE__ */ (0,
|
|
64813
|
-
title != null && /* @__PURE__ */ (0,
|
|
65120
|
+
(title != null || subtitle != null) && /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
65121
|
+
subtitle != null && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "truncate text-[11px] font-semibold uppercase tracking-wider text-neutral-500 dark:text-neutral-400", children: subtitle }),
|
|
65122
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "truncate text-lg font-semibold text-neutral-900 dark:text-white", children: title })
|
|
64814
65123
|
] }),
|
|
64815
|
-
hasNode(actions) && /* @__PURE__ */ (0,
|
|
64816
|
-
/* @__PURE__ */ (0,
|
|
65124
|
+
hasNode(actions) && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions }),
|
|
65125
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "ml-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64817
65126
|
GanttToolbar,
|
|
64818
65127
|
{
|
|
64819
65128
|
variant,
|
|
@@ -64826,31 +65135,31 @@ var Gantt = ({
|
|
|
64826
65135
|
]
|
|
64827
65136
|
}
|
|
64828
65137
|
),
|
|
64829
|
-
/* @__PURE__ */ (0,
|
|
65138
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64830
65139
|
"div",
|
|
64831
65140
|
{
|
|
64832
|
-
className: (0,
|
|
65141
|
+
className: (0, import_classnames123.default)(
|
|
64833
65142
|
"relative flex shrink-0 items-stretch border-b",
|
|
64834
65143
|
surfaceText.divider
|
|
64835
65144
|
),
|
|
64836
65145
|
style: { height: HEADER_HEIGHT },
|
|
64837
65146
|
children: [
|
|
64838
|
-
/* @__PURE__ */ (0,
|
|
65147
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64839
65148
|
"div",
|
|
64840
65149
|
{
|
|
64841
|
-
className: (0,
|
|
65150
|
+
className: (0, import_classnames123.default)(
|
|
64842
65151
|
"flex items-stretch border-r bg-white dark:bg-neutral-900",
|
|
64843
65152
|
surfaceText.divider
|
|
64844
65153
|
),
|
|
64845
65154
|
style: { width: leftWidth },
|
|
64846
65155
|
children: [
|
|
64847
|
-
/* @__PURE__ */ (0,
|
|
65156
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "w-9 shrink-0" }),
|
|
64848
65157
|
sizedColumns.map((col) => {
|
|
64849
65158
|
const resizable = resizableColumns && col.resizable !== false;
|
|
64850
|
-
return /* @__PURE__ */ (0,
|
|
65159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64851
65160
|
"div",
|
|
64852
65161
|
{
|
|
64853
|
-
className: (0,
|
|
65162
|
+
className: (0, import_classnames123.default)(
|
|
64854
65163
|
"relative flex shrink-0 items-center border-r px-2 text-[11px] font-semibold uppercase tracking-wide text-neutral-600 last:border-r-0 dark:text-neutral-400",
|
|
64855
65164
|
surfaceText.divider
|
|
64856
65165
|
),
|
|
@@ -64859,7 +65168,7 @@ var Gantt = ({
|
|
|
64859
65168
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
64860
65169
|
},
|
|
64861
65170
|
children: [
|
|
64862
|
-
/* @__PURE__ */ (0,
|
|
65171
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "truncate", children: col.title }),
|
|
64863
65172
|
resizable && /* Resize handle — Table's header-edge pattern: an 8px hit
|
|
64864
65173
|
area whose 1px line sits exactly on the column border.
|
|
64865
65174
|
Absolute insets stop at the padding edge (1px inside
|
|
@@ -64868,7 +65177,7 @@ var Gantt = ({
|
|
|
64868
65177
|
the border's own pixel. The cell carries no
|
|
64869
65178
|
overflow-hidden so the line can paint over the border
|
|
64870
65179
|
(the title span truncates itself). */
|
|
64871
|
-
/* @__PURE__ */ (0,
|
|
65180
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64872
65181
|
"div",
|
|
64873
65182
|
{
|
|
64874
65183
|
role: "separator",
|
|
@@ -64877,7 +65186,7 @@ var Gantt = ({
|
|
|
64877
65186
|
className: "group/rh absolute inset-y-0 -right-px z-10 flex w-2 cursor-col-resize select-none items-stretch justify-end",
|
|
64878
65187
|
onPointerDown: (e) => startColumnResize(e, col.key),
|
|
64879
65188
|
title: t("kit.gantt.resizeColumn", { column: col.title }),
|
|
64880
|
-
children: /* @__PURE__ */ (0,
|
|
65189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64881
65190
|
"div",
|
|
64882
65191
|
{
|
|
64883
65192
|
className: "h-full w-px bg-neutral-300 transition-colors group-hover/rh:bg-neutral-400 dark:bg-neutral-600 dark:group-hover/rh:bg-neutral-500",
|
|
@@ -64894,30 +65203,30 @@ var Gantt = ({
|
|
|
64894
65203
|
]
|
|
64895
65204
|
}
|
|
64896
65205
|
),
|
|
64897
|
-
/* @__PURE__ */ (0,
|
|
65206
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "relative min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64898
65207
|
"div",
|
|
64899
65208
|
{
|
|
64900
65209
|
ref: headerScaleRef,
|
|
64901
65210
|
className: "relative h-full",
|
|
64902
65211
|
style: { width: timelineWidth },
|
|
64903
65212
|
children: [
|
|
64904
|
-
/* @__PURE__ */ (0,
|
|
64905
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0,
|
|
65213
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(GanttScale, { levels: scaleLevels, height: HEADER_HEIGHT }),
|
|
65214
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64906
65215
|
"div",
|
|
64907
65216
|
{
|
|
64908
|
-
className: (0,
|
|
65217
|
+
className: (0, import_classnames123.default)(
|
|
64909
65218
|
"pointer-events-none absolute inset-y-0 z-[1] border-l-2",
|
|
64910
65219
|
todayTokens.line
|
|
64911
65220
|
),
|
|
64912
65221
|
style: { left: todayX }
|
|
64913
65222
|
}
|
|
64914
65223
|
),
|
|
64915
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0,
|
|
65224
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64916
65225
|
"div",
|
|
64917
65226
|
{
|
|
64918
65227
|
className: "pointer-events-none absolute top-1 z-10 -translate-x-1/2",
|
|
64919
65228
|
style: { left: todayX },
|
|
64920
|
-
children: /* @__PURE__ */ (0,
|
|
65229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: (0, import_classnames123.default)("rounded-full px-2 py-0.5 text-[10px] font-semibold text-white shadow-sm", todayTokens.chip), children: allLabels.today })
|
|
64921
65230
|
}
|
|
64922
65231
|
)
|
|
64923
65232
|
]
|
|
@@ -64926,20 +65235,20 @@ var Gantt = ({
|
|
|
64926
65235
|
]
|
|
64927
65236
|
}
|
|
64928
65237
|
),
|
|
64929
|
-
/* @__PURE__ */ (0,
|
|
65238
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64930
65239
|
"div",
|
|
64931
65240
|
{
|
|
64932
65241
|
ref: scrollRef,
|
|
64933
65242
|
className: `gantt-scroller min-h-0 flex-1 overflow-auto overscroll-contain [&::-webkit-scrollbar]:h-1.5 ${THIN_SCROLLBAR}`,
|
|
64934
65243
|
onScroll: syncHeaderScale,
|
|
64935
|
-
children: /* @__PURE__ */ (0,
|
|
64936
|
-
/* @__PURE__ */ (0,
|
|
65244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { style: { width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER, minWidth: "100%" }, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(GanttSkeleton, { rows: 12, rowHeight: rowHeight2, leftWidth }) : isEmpty2 ? /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "flex items-center justify-center text-sm text-neutral-500", style: { height: bodyHeight || 160, width: leftWidth + timelineWidth }, children: emptyState ?? allLabels.empty }) : /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "relative", style: { height: bodyHeight }, children: [
|
|
65245
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64937
65246
|
"div",
|
|
64938
65247
|
{
|
|
64939
65248
|
className: "pointer-events-none absolute inset-y-0 z-0",
|
|
64940
65249
|
style: { left: leftWidth, width: timelineWidth },
|
|
64941
65250
|
children: [
|
|
64942
|
-
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */ (0,
|
|
65251
|
+
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64943
65252
|
"div",
|
|
64944
65253
|
{
|
|
64945
65254
|
className: "absolute inset-y-0 border-r border-neutral-100 dark:border-neutral-800",
|
|
@@ -64947,10 +65256,10 @@ var Gantt = ({
|
|
|
64947
65256
|
},
|
|
64948
65257
|
c.id
|
|
64949
65258
|
)),
|
|
64950
|
-
todayVisible && /* @__PURE__ */ (0,
|
|
65259
|
+
todayVisible && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64951
65260
|
"div",
|
|
64952
65261
|
{
|
|
64953
|
-
className: (0,
|
|
65262
|
+
className: (0, import_classnames123.default)("absolute inset-y-0 border-l-2", todayTokens.line),
|
|
64954
65263
|
style: { left: todayX }
|
|
64955
65264
|
}
|
|
64956
65265
|
)
|
|
@@ -64960,7 +65269,7 @@ var Gantt = ({
|
|
|
64960
65269
|
liveModel.rows.map((row) => {
|
|
64961
65270
|
const isDragSource = drag?.kind === "reorder" && row.task != null && row.task.id === drag.taskId;
|
|
64962
65271
|
if (isDragSource) {
|
|
64963
|
-
return /* @__PURE__ */ (0,
|
|
65272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64964
65273
|
"div",
|
|
64965
65274
|
{
|
|
64966
65275
|
"data-row-key": row.key,
|
|
@@ -64968,7 +65277,7 @@ var Gantt = ({
|
|
|
64968
65277
|
"aria-hidden": "true",
|
|
64969
65278
|
className: "pointer-events-none flex border-b",
|
|
64970
65279
|
style: { height: dragSubtreeHeight || row.height },
|
|
64971
|
-
children: /* @__PURE__ */ (0,
|
|
65280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64972
65281
|
"div",
|
|
64973
65282
|
{
|
|
64974
65283
|
className: "m-1 flex-1 rounded-md border-2 border-dashed",
|
|
@@ -64985,7 +65294,7 @@ var Gantt = ({
|
|
|
64985
65294
|
if (drag?.kind === "reorder" && dragSubtreeKeys.has(row.key)) {
|
|
64986
65295
|
return null;
|
|
64987
65296
|
}
|
|
64988
|
-
return /* @__PURE__ */ (0,
|
|
65297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64989
65298
|
GanttBodyRow,
|
|
64990
65299
|
{
|
|
64991
65300
|
row,
|
|
@@ -65023,7 +65332,7 @@ var Gantt = ({
|
|
|
65023
65332
|
row.key
|
|
65024
65333
|
);
|
|
65025
65334
|
}),
|
|
65026
|
-
/* @__PURE__ */ (0,
|
|
65335
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65027
65336
|
GanttLinkLayer,
|
|
65028
65337
|
{
|
|
65029
65338
|
ref: overlayRef,
|
|
@@ -65039,7 +65348,7 @@ var Gantt = ({
|
|
|
65039
65348
|
onDeleteLink: interactive && onLinksChange ? deleteSelectedLink : void 0
|
|
65040
65349
|
}
|
|
65041
65350
|
),
|
|
65042
|
-
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */ (0,
|
|
65351
|
+
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65043
65352
|
"div",
|
|
65044
65353
|
{
|
|
65045
65354
|
className: "pointer-events-none absolute z-30 h-0.5 rounded-full",
|
|
@@ -65059,7 +65368,7 @@ var Gantt = ({
|
|
|
65059
65368
|
// there is no filtered/overflowing ancestor and the fixed
|
|
65060
65369
|
// clone always tracks the viewport pointer.
|
|
65061
65370
|
(0, import_react_dom15.createPortal)(
|
|
65062
|
-
/* @__PURE__ */ (0,
|
|
65371
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65063
65372
|
"div",
|
|
65064
65373
|
{
|
|
65065
65374
|
"data-gantt-drag-clone": "true",
|
|
@@ -65070,14 +65379,14 @@ var Gantt = ({
|
|
|
65070
65379
|
top: drag.clientY - (drag.grabOffset?.y ?? 0),
|
|
65071
65380
|
width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER
|
|
65072
65381
|
},
|
|
65073
|
-
children: /* @__PURE__ */ (0,
|
|
65382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65074
65383
|
"div",
|
|
65075
65384
|
{
|
|
65076
65385
|
className: "overflow-hidden rounded-lg bg-white/95 shadow-2xl backdrop-blur-sm dark:bg-neutral-900/95",
|
|
65077
65386
|
style: {
|
|
65078
65387
|
boxShadow: `0 8px 32px rgba(0, 0, 0, 0.28), inset 2px 0 0 var(--color-${color}-500)`
|
|
65079
65388
|
},
|
|
65080
|
-
children: dragSubtree.map((row) => /* @__PURE__ */ (0,
|
|
65389
|
+
children: dragSubtree.map((row) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65081
65390
|
GanttBodyRow,
|
|
65082
65391
|
{
|
|
65083
65392
|
row,
|
|
@@ -65120,7 +65429,7 @@ var Gantt = ({
|
|
|
65120
65429
|
),
|
|
65121
65430
|
document.body
|
|
65122
65431
|
),
|
|
65123
|
-
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */ (0,
|
|
65432
|
+
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65124
65433
|
"div",
|
|
65125
65434
|
{
|
|
65126
65435
|
className: "pointer-events-none absolute z-50 rounded-md bg-neutral-900/90 px-2 py-1 text-[11px] font-medium text-white shadow-lg dark:bg-neutral-700/95",
|
|
@@ -65151,13 +65460,13 @@ var GanttSkeleton = ({
|
|
|
65151
65460
|
rows,
|
|
65152
65461
|
rowHeight: rowHeight2,
|
|
65153
65462
|
leftWidth
|
|
65154
|
-
}) => /* @__PURE__ */ (0,
|
|
65155
|
-
/* @__PURE__ */ (0,
|
|
65463
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "animate-pulse", "aria-busy": "true", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "flex", style: { height: rowHeight2 }, children: [
|
|
65464
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65156
65465
|
"div",
|
|
65157
65466
|
{
|
|
65158
65467
|
className: "sticky left-0 flex items-center border-b border-neutral-100 bg-white px-3 dark:border-neutral-800 dark:bg-neutral-900",
|
|
65159
65468
|
style: { width: leftWidth },
|
|
65160
|
-
children: /* @__PURE__ */ (0,
|
|
65469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65161
65470
|
"div",
|
|
65162
65471
|
{
|
|
65163
65472
|
className: "h-3 rounded-full bg-neutral-200 dark:bg-neutral-700",
|
|
@@ -65166,7 +65475,7 @@ var GanttSkeleton = ({
|
|
|
65166
65475
|
)
|
|
65167
65476
|
}
|
|
65168
65477
|
),
|
|
65169
|
-
/* @__PURE__ */ (0,
|
|
65478
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "relative flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65170
65479
|
"div",
|
|
65171
65480
|
{
|
|
65172
65481
|
className: "absolute top-1/2 h-4 -translate-y-1/2 rounded-md bg-neutral-200/80 dark:bg-neutral-700/60",
|
|
@@ -65179,11 +65488,11 @@ var GanttSkeleton = ({
|
|
|
65179
65488
|
] }, i)) });
|
|
65180
65489
|
|
|
65181
65490
|
// src/contexts/BottomSheetContext.tsx
|
|
65182
|
-
var
|
|
65491
|
+
var import_react289 = require("react");
|
|
65183
65492
|
var import_react_dom16 = require("react-dom");
|
|
65184
|
-
var
|
|
65185
|
-
var
|
|
65186
|
-
var BottomSheetContext = (0,
|
|
65493
|
+
var import_classnames124 = __toESM(require("classnames"), 1);
|
|
65494
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
65495
|
+
var BottomSheetContext = (0, import_react289.createContext)(null);
|
|
65187
65496
|
var TRANSITION_MS2 = 260;
|
|
65188
65497
|
var renderSlot = (slot, controls) => {
|
|
65189
65498
|
if (!slot) {
|
|
@@ -65194,13 +65503,13 @@ var renderSlot = (slot, controls) => {
|
|
|
65194
65503
|
var BottomSheetProvider = ({
|
|
65195
65504
|
children
|
|
65196
65505
|
}) => {
|
|
65197
|
-
const [sheet, setSheet] = (0,
|
|
65198
|
-
const [isVisible, setIsVisible] = (0,
|
|
65199
|
-
const pendingCloseRef = (0,
|
|
65200
|
-
const dismissSheet = (0,
|
|
65506
|
+
const [sheet, setSheet] = (0, import_react289.useState)(null);
|
|
65507
|
+
const [isVisible, setIsVisible] = (0, import_react289.useState)(false);
|
|
65508
|
+
const pendingCloseRef = (0, import_react289.useRef)(null);
|
|
65509
|
+
const dismissSheet = (0, import_react289.useCallback)(() => {
|
|
65201
65510
|
setIsVisible(false);
|
|
65202
65511
|
}, []);
|
|
65203
|
-
const presentSheet = (0,
|
|
65512
|
+
const presentSheet = (0, import_react289.useCallback)((options) => {
|
|
65204
65513
|
if (pendingCloseRef.current) {
|
|
65205
65514
|
clearTimeout(pendingCloseRef.current);
|
|
65206
65515
|
pendingCloseRef.current = null;
|
|
@@ -65213,7 +65522,7 @@ var BottomSheetProvider = ({
|
|
|
65213
65522
|
setTimeout(animateIn, 0);
|
|
65214
65523
|
}
|
|
65215
65524
|
}, []);
|
|
65216
|
-
(0,
|
|
65525
|
+
(0, import_react289.useEffect)(() => {
|
|
65217
65526
|
if (!isVisible && sheet) {
|
|
65218
65527
|
pendingCloseRef.current = setTimeout(() => {
|
|
65219
65528
|
sheet.onClose?.();
|
|
@@ -65228,7 +65537,7 @@ var BottomSheetProvider = ({
|
|
|
65228
65537
|
}
|
|
65229
65538
|
return void 0;
|
|
65230
65539
|
}, [isVisible, sheet]);
|
|
65231
|
-
(0,
|
|
65540
|
+
(0, import_react289.useEffect)(
|
|
65232
65541
|
() => () => {
|
|
65233
65542
|
if (pendingCloseRef.current) {
|
|
65234
65543
|
clearTimeout(pendingCloseRef.current);
|
|
@@ -65236,13 +65545,13 @@ var BottomSheetProvider = ({
|
|
|
65236
65545
|
},
|
|
65237
65546
|
[]
|
|
65238
65547
|
);
|
|
65239
|
-
const controls = (0,
|
|
65548
|
+
const controls = (0, import_react289.useMemo)(
|
|
65240
65549
|
() => ({
|
|
65241
65550
|
dismiss: dismissSheet
|
|
65242
65551
|
}),
|
|
65243
65552
|
[dismissSheet]
|
|
65244
65553
|
);
|
|
65245
|
-
const contextValue = (0,
|
|
65554
|
+
const contextValue = (0, import_react289.useMemo)(
|
|
65246
65555
|
() => ({
|
|
65247
65556
|
presentSheet,
|
|
65248
65557
|
dismissSheet,
|
|
@@ -65252,11 +65561,11 @@ var BottomSheetProvider = ({
|
|
|
65252
65561
|
[presentSheet, dismissSheet, sheet, isVisible]
|
|
65253
65562
|
);
|
|
65254
65563
|
const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom16.createPortal)(
|
|
65255
|
-
/* @__PURE__ */ (0,
|
|
65256
|
-
/* @__PURE__ */ (0,
|
|
65564
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
|
|
65565
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
65257
65566
|
"div",
|
|
65258
65567
|
{
|
|
65259
|
-
className: (0,
|
|
65568
|
+
className: (0, import_classnames124.default)(
|
|
65260
65569
|
"absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
|
|
65261
65570
|
isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
|
|
65262
65571
|
),
|
|
@@ -65266,24 +65575,24 @@ var BottomSheetProvider = ({
|
|
|
65266
65575
|
}
|
|
65267
65576
|
}
|
|
65268
65577
|
),
|
|
65269
|
-
/* @__PURE__ */ (0,
|
|
65578
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(
|
|
65270
65579
|
"section",
|
|
65271
65580
|
{
|
|
65272
65581
|
role: "dialog",
|
|
65273
65582
|
"aria-modal": "true",
|
|
65274
|
-
className: (0,
|
|
65583
|
+
className: (0, import_classnames124.default)(
|
|
65275
65584
|
"pointer-events-auto ml-auto flex w-full flex-col rounded-t-3xl border border-slate-200 bg-white shadow-2xl transition-transform duration-300 dark:border-slate-700 dark:bg-slate-900",
|
|
65276
65585
|
sheet.className,
|
|
65277
65586
|
isVisible ? "translate-y-0" : "translate-y-full"
|
|
65278
65587
|
),
|
|
65279
65588
|
style: { minHeight: "25vh", maxHeight: "85vh" },
|
|
65280
65589
|
children: [
|
|
65281
|
-
/* @__PURE__ */ (0,
|
|
65282
|
-
/* @__PURE__ */ (0,
|
|
65283
|
-
sheet.title && /* @__PURE__ */ (0,
|
|
65284
|
-
sheet.description && /* @__PURE__ */ (0,
|
|
65590
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
|
|
65591
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "space-y-1", children: [
|
|
65592
|
+
sheet.title && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
|
|
65593
|
+
sheet.description && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
|
|
65285
65594
|
] }),
|
|
65286
|
-
(sheet.showCloseButton ?? true) && /* @__PURE__ */ (0,
|
|
65595
|
+
(sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
65287
65596
|
IconButton_default,
|
|
65288
65597
|
{
|
|
65289
65598
|
icon: "Close",
|
|
@@ -65295,21 +65604,21 @@ var BottomSheetProvider = ({
|
|
|
65295
65604
|
}
|
|
65296
65605
|
)
|
|
65297
65606
|
] }),
|
|
65298
|
-
/* @__PURE__ */ (0,
|
|
65299
|
-
sheet.actions && /* @__PURE__ */ (0,
|
|
65607
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
|
|
65608
|
+
sheet.actions && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "flex flex-wrap items-center justify-end gap-3 border-t border-slate-200 px-6 py-4 dark:border-slate-800", children: renderSlot(sheet.actions, controls) })
|
|
65300
65609
|
]
|
|
65301
65610
|
}
|
|
65302
65611
|
) })
|
|
65303
65612
|
] }),
|
|
65304
65613
|
document.body
|
|
65305
65614
|
) : null;
|
|
65306
|
-
return /* @__PURE__ */ (0,
|
|
65615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
|
|
65307
65616
|
children,
|
|
65308
65617
|
overlayNode
|
|
65309
65618
|
] });
|
|
65310
65619
|
};
|
|
65311
65620
|
var useBottomSheet = () => {
|
|
65312
|
-
const context = (0,
|
|
65621
|
+
const context = (0, import_react289.useContext)(BottomSheetContext);
|
|
65313
65622
|
if (!context) {
|
|
65314
65623
|
throw new Error("useBottomSheet must be used within a BottomSheetProvider");
|
|
65315
65624
|
}
|
|
@@ -65943,8 +66252,8 @@ var SYSTEM_VARIABLES = [
|
|
|
65943
66252
|
];
|
|
65944
66253
|
|
|
65945
66254
|
// src/components/MetricBar.tsx
|
|
65946
|
-
var
|
|
65947
|
-
var
|
|
66255
|
+
var import_classnames125 = __toESM(require("classnames"), 1);
|
|
66256
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
65948
66257
|
var MetricBar = ({
|
|
65949
66258
|
label,
|
|
65950
66259
|
value,
|
|
@@ -65954,7 +66263,7 @@ var MetricBar = ({
|
|
|
65954
66263
|
size = "sm",
|
|
65955
66264
|
className,
|
|
65956
66265
|
...rest
|
|
65957
|
-
}) => /* @__PURE__ */ (0,
|
|
66266
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
65958
66267
|
Progress_default,
|
|
65959
66268
|
{
|
|
65960
66269
|
...rest,
|
|
@@ -65964,7 +66273,7 @@ var MetricBar = ({
|
|
|
65964
66273
|
formatValue: value !== void 0 ? () => String(value) : void 0,
|
|
65965
66274
|
size,
|
|
65966
66275
|
color: tone ?? color ?? "blue",
|
|
65967
|
-
className: (0,
|
|
66276
|
+
className: (0, import_classnames125.default)("w-full", className)
|
|
65968
66277
|
}
|
|
65969
66278
|
);
|
|
65970
66279
|
MetricBar.displayName = "MetricBar";
|
|
@@ -66006,6 +66315,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66006
66315
|
COLLAPSIBLE_HELP_VARIANTS,
|
|
66007
66316
|
COMBOBOX_TONE_CLASSES,
|
|
66008
66317
|
COMBOBOX_VALIDATION_STATUSES,
|
|
66318
|
+
CONNECTION_FLOW_CHILD_LAYOUTS,
|
|
66009
66319
|
CONNECTION_FLOW_EDGE_STYLES,
|
|
66010
66320
|
CONNECTION_FLOW_ITEM_PROGRESS,
|
|
66011
66321
|
CONNECTION_FLOW_LOADERS,
|
|
@@ -66044,6 +66354,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66044
66354
|
DEFAULT_LAYOUT_OPTIONS,
|
|
66045
66355
|
DEFAULT_SERIES_PALETTE,
|
|
66046
66356
|
DEFAULT_SURFACE_CORNER,
|
|
66357
|
+
DEFAULT_SURFACE_GUTTER,
|
|
66047
66358
|
DEFAULT_SURFACE_PADDING,
|
|
66048
66359
|
DEFAULT_SURFACE_TONE,
|
|
66049
66360
|
DEFAULT_TOAST_GAP_PX,
|
|
@@ -66194,6 +66505,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66194
66505
|
STAT_PAGER_PLACEMENTS,
|
|
66195
66506
|
SURFACE_CORNERS,
|
|
66196
66507
|
SURFACE_GLASS_RIM,
|
|
66508
|
+
SURFACE_GUTTER_AXES,
|
|
66197
66509
|
SURFACE_PADDINGS,
|
|
66198
66510
|
SURFACE_TO_BUTTON_VARIANT,
|
|
66199
66511
|
SURFACE_VARIANTS,
|
|
@@ -66288,6 +66600,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66288
66600
|
WorkflowTracker,
|
|
66289
66601
|
WorkflowTrackerDetails,
|
|
66290
66602
|
WorkflowTrackerRail,
|
|
66603
|
+
WorkflowTrackerRollups,
|
|
66291
66604
|
WorkflowTrackerStepDetails,
|
|
66292
66605
|
areaPathFromPoints,
|
|
66293
66606
|
bandAreaPath,
|
|
@@ -66426,6 +66739,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66426
66739
|
getStepperTonePalette,
|
|
66427
66740
|
getSurfaceCornerClass,
|
|
66428
66741
|
getSurfaceCornerRem,
|
|
66742
|
+
getSurfaceGutterClass,
|
|
66429
66743
|
getSurfacePaddingClass,
|
|
66430
66744
|
getSurfacePaddingClasses,
|
|
66431
66745
|
getSurfaceTextTokens,
|
|
@@ -66490,6 +66804,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66490
66804
|
mixHex,
|
|
66491
66805
|
nicePolarMax,
|
|
66492
66806
|
niceRadarMax,
|
|
66807
|
+
nodeHasFailed,
|
|
66493
66808
|
nodeIcon,
|
|
66494
66809
|
nodeIsActive,
|
|
66495
66810
|
nodeIsSkipped,
|
|
@@ -66545,6 +66860,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66545
66860
|
tintColor,
|
|
66546
66861
|
toBoolean,
|
|
66547
66862
|
toDate,
|
|
66863
|
+
toRows,
|
|
66548
66864
|
toSmartVariable,
|
|
66549
66865
|
tracePathTo,
|
|
66550
66866
|
usageTotals,
|