@cardenelabs/cdl 0.66.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -1
- package/dist/index.cjs +48 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -48
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +48 -48
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +48 -48
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/kinds/gantt.tsx +57 -24
package/dist/react.cjs
CHANGED
|
@@ -14491,6 +14491,7 @@ function GanttNode({
|
|
|
14491
14491
|
const \u5E2F\u306E\u5DE6 = (idx) => xAt(idx) + \u5E2F\u306E\u4F59\u767D / 2;
|
|
14492
14492
|
const \u5E2F\u306E\u53F3 = (idx) => xAt(idx) + cellW - \u5E2F\u306E\u4F59\u767D / 2;
|
|
14493
14493
|
const \u4F38\u3073 = \u9032\u307F\u3092\u7573\u3080(drawing, progress);
|
|
14494
|
+
const \u884C\u306E\u4F38\u3073 = (row) => \u6BB5\u306E\u4F38\u3073(\u4F38\u3073, row + 1, rowCount);
|
|
14494
14495
|
const taskById = new Map(\u6574\u3048\u305F.map((t) => [t.id, t]));
|
|
14495
14496
|
const rowOf = new Map(\u6574\u3048\u305F.map((t, i) => [t.id, i]));
|
|
14496
14497
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: `translate(${x0} ${y0})`, children: [
|
|
@@ -14565,12 +14566,13 @@ function GanttNode({
|
|
|
14565
14566
|
const bx = \u5E2F\u306E\u5DE6(t.startIdx);
|
|
14566
14567
|
const by = yAt(row);
|
|
14567
14568
|
const bw = Math.max(0, \u5E2F\u306E\u53F3(t.endIdx) - bx);
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14569
|
+
const \u3053\u306E\u884C = \u884C\u306E\u4F38\u3073(row);
|
|
14570
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
14571
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14572
|
+
"g",
|
|
14573
|
+
{
|
|
14574
|
+
...drawing ? { transform: `translate(${bx} 0) scale(${\u3053\u306E\u884C} 1) translate(${-bx} 0)` } : {},
|
|
14575
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14574
14576
|
"rect",
|
|
14575
14577
|
{
|
|
14576
14578
|
"data-cdl-role": "gantt-bar",
|
|
@@ -14584,22 +14586,23 @@ function GanttNode({
|
|
|
14584
14586
|
fill: toneColor4(t.tone),
|
|
14585
14587
|
fillOpacity: 0.9
|
|
14586
14588
|
}
|
|
14587
|
-
),
|
|
14588
|
-
t.owner && rowH >= 22 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14589
|
-
"text",
|
|
14590
|
-
{
|
|
14591
|
-
x: bx + 8,
|
|
14592
|
-
y: by + rowH / 2 + 4,
|
|
14593
|
-
fontSize: 11,
|
|
14594
|
-
fill: "var(--cdl-node-fill, #ffffff)",
|
|
14595
|
-
fontWeight: 600,
|
|
14596
|
-
children: t.owner
|
|
14597
|
-
}
|
|
14598
14589
|
)
|
|
14599
|
-
|
|
14600
|
-
|
|
14601
|
-
|
|
14602
|
-
|
|
14590
|
+
}
|
|
14591
|
+
),
|
|
14592
|
+
t.owner && rowH >= 22 && \u3053\u306E\u884C >= 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14593
|
+
"text",
|
|
14594
|
+
{
|
|
14595
|
+
"data-cdl-role": "gantt-owner",
|
|
14596
|
+
x: bx + bw / 2,
|
|
14597
|
+
y: by + rowH / 2 + 4,
|
|
14598
|
+
fontSize: 11,
|
|
14599
|
+
textAnchor: "middle",
|
|
14600
|
+
fill: "var(--cdl-node-fill, #ffffff)",
|
|
14601
|
+
fontWeight: 600,
|
|
14602
|
+
children: t.owner
|
|
14603
|
+
}
|
|
14604
|
+
)
|
|
14605
|
+
] }, `bar-${t.id}`);
|
|
14603
14606
|
}),
|
|
14604
14607
|
\u6574\u3048\u305F.filter((t) => t.dependsOn && taskById.has(t.dependsOn)).map((t) => {
|
|
14605
14608
|
const parent = taskById.get(t.dependsOn);
|
|
@@ -14619,33 +14622,30 @@ function GanttNode({
|
|
|
14619
14622
|
const hasRoom = enterX - startX >= elbowGap;
|
|
14620
14623
|
const path = hasRoom ? `M ${startX} ${parentMidY} L ${enterX} ${parentMidY} L ${enterX} ${tipY} L ${tipX} ${tipY}` : `M ${startX} ${parentMidY} L ${startX + elbowGap} ${parentMidY} L ${startX + elbowGap} ${(parentMidY + tipY) / 2} L ${enterX} ${(parentMidY + tipY) / 2} L ${enterX} ${tipY} L ${tipX} ${tipY}`;
|
|
14621
14624
|
const arrowHeadPath = `M ${tipX + arrowHeadSize} ${tipY} L ${tipX} ${tipY - arrowHeadSize / 2} L ${tipX} ${tipY + arrowHeadSize / 2} Z`;
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
)
|
|
14647
|
-
] }, `dep-${parent.id}-${t.id}`)
|
|
14648
|
-
);
|
|
14625
|
+
const \u4E21\u7AEF\u304C\u51FA\u305F = \u884C\u306E\u4F38\u3073(parentRow) >= 1 && \u884C\u306E\u4F38\u3073(childRow) >= 1;
|
|
14626
|
+
return drawing && !\u4E21\u7AEF\u304C\u51FA\u305F ? null : /* @__PURE__ */ jsxRuntime.jsxs("g", { "data-cdl-role": "gantt-arrow", children: [
|
|
14627
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14628
|
+
"path",
|
|
14629
|
+
{
|
|
14630
|
+
d: path,
|
|
14631
|
+
fill: "none",
|
|
14632
|
+
stroke: "var(--cdl-text-mute, #8a8678)",
|
|
14633
|
+
strokeWidth: 1.75,
|
|
14634
|
+
strokeLinejoin: "round",
|
|
14635
|
+
strokeLinecap: "round"
|
|
14636
|
+
}
|
|
14637
|
+
),
|
|
14638
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14639
|
+
"path",
|
|
14640
|
+
{
|
|
14641
|
+
d: arrowHeadPath,
|
|
14642
|
+
fill: "var(--cdl-text-mute, #8a8678)",
|
|
14643
|
+
stroke: "var(--cdl-text-mute, #8a8678)",
|
|
14644
|
+
strokeWidth: 0.5,
|
|
14645
|
+
strokeLinejoin: "round"
|
|
14646
|
+
}
|
|
14647
|
+
)
|
|
14648
|
+
] }, `dep-${parent.id}-${t.id}`);
|
|
14649
14649
|
})
|
|
14650
14650
|
] });
|
|
14651
14651
|
}
|