@mogura/moguchart-core 1.5.0 → 1.6.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.ja.md +45 -0
- package/CHANGELOG.md +45 -0
- package/README.ja.md +62 -15
- package/README.md +68 -15
- package/dist/components/controllers/drag-drop-controller.d.ts +3 -3
- package/dist/components/gantt-chart-dependency-path.d.ts +6 -3
- package/dist/components/gantt-chart.d.ts +8 -0
- package/dist/core/auto-schedule.d.ts +101 -0
- package/dist/core/history.d.ts +1 -1
- package/dist/core/types.d.ts +63 -2
- package/dist/index.d.ts +1 -0
- package/dist/moguchart-core.mjs +858 -444
- package/dist/moguchart-core.umd.js +79 -58
- package/package.json +4 -4
package/CHANGELOG.ja.md
CHANGED
|
@@ -5,6 +5,51 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.6.0] - 2026-10-25
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **自動スケジューリング(Auto-Scheduling)& 拡張依存関係タイプ(`FS` / `SS` / `FF` / `SF`)・ラグ設定のサポート**:
|
|
13
|
+
- **拡張された依存関係リンク定義 (`GanttDependencyLink`)**:
|
|
14
|
+
- `task.dependencies`(`GanttDependency[]`)において、従来のタスクID文字列(`string`)との完全な後方互換性を保ちつつ、オブジェクト形式 `GanttDependencyLink`(`{ taskId: string, type?: 'FS' | 'SS' | 'FF' | 'SF', lag?: number }`)の指定に対応
|
|
15
|
+
- 4種類の標準依存関係タイプをサポート:
|
|
16
|
+
- `FS` (Finish-to-Start / 終了-開始、デフォルト): 先行タスク終了後に後続タスクを開始
|
|
17
|
+
- `SS` (Start-to-Start / 開始-開始): 先行タスク開始に合わせて後続タスクを開始
|
|
18
|
+
- `FF` (Finish-to-Finish / 終了-終了): 先行タスク終了に合わせて後続タスクを終了
|
|
19
|
+
- `SF` (Start-to-Finish / 開始-終了): 先行タスク開始に合わせて後続タスクを終了
|
|
20
|
+
- 分単位のラグ(遅延: 正の値)およびリード(前倒し: 負の値)期間(`lag`)の設定に対応
|
|
21
|
+
- **トポロジカルカスケード自動スケジューリングエンジン (`option.dependency.autoSchedule`)**:
|
|
22
|
+
- `option.dependency` に `autoSchedule?: boolean`(デフォルト: `false`)、`scheduleMode?: 'push-only' | 'strict'`(デフォルト: `'push-only'`)、`respectMovable?: boolean`(デフォルト: `true`)、`calendarMode?: 'calendar' | 'weekends' | 'weekends-holidays'`(デフォルト: `'calendar'`)、`isHoliday?: (date: Date) => boolean`(未指定時は `option.calendar.isHoliday` にフォールバック)を追加
|
|
23
|
+
- 依存制約に違反(逆転)する場合のみ後続タスクを後ろへ押し出す `'push-only'` モードと、先行タスクの移動およびラグに常時厳密追従させる `'strict'` モードをサポート
|
|
24
|
+
- **営業日ベース(土日除外・土日祝日除外)の稼働日・ラグ計算 (`calendarMode`)**: `'weekends'`(土日除外)または `'weekends-holidays'`(土日・祝日除外)を指定した場合、後続タスクの着地日が非稼働日にあたる際に翌営業日へ自動スキップし、各タスクの実稼働日数(営業日数)および依存関係のラグ・リード期間(`lag`)を営業日ベースで維持したまま期間を自動伸縮
|
|
25
|
+
- タスクバーのドラッグ移動・期間リサイズ、複数タスク一括移動、キーボード(`Shift + 矢印キー`)移動、マルチカラムグリッドのインラインセル編集(`startDate`, `endDate`, `duration`)のすべてと自動連動し、連鎖更新された全タスクの変更を単一の Undo / Redo 履歴コマンドとして記録
|
|
26
|
+
- プログラムから任意のタイミングで後続タスクの再計算を実行できるパブリックメソッド `chart.autoSchedule(changedTaskIds?, options?)` を `GanttChartElement` および `@mogura/moguchart-vue`(`GanttChartPublicApi`)に追加
|
|
27
|
+
- **エンドポイント連動の依存関係線描画・コネクタ作成・Excelエクスポート対応**:
|
|
28
|
+
- 直角折れ線(`'orthogonal'`)およびベジェ曲線(`'curve'`)のSVGパス計算において、`FS` / `SS` / `FF` / `SF` の各始点・終点(左端 `start` / 右端 `end`)に応じた正確なルートおよび矢印向きの描画に対応
|
|
29
|
+
- タスクバー左右端のコネクタドラッグによる依存関係作成時、接続元・接続先のエンドポイントから依存関係種別(`type: 'FS' | 'SS' | 'FF' | 'SF'`)を自動判定し、`DependencyCreateEventDetail.type` に格納
|
|
30
|
+
- クリティカルパス計算(`computeCriticalPath`)および Excel エクスポートプラグイン(`@mogura/moguchart-plugin-excel`)で `GanttDependencyLink` に対応(Excel 出力時は `FS` 以外の種別を `1 (SS)` のように表記)
|
|
31
|
+
- 操作履歴の `GanttCommandType` に `'dependency-update'` を追加
|
|
32
|
+
- 自動スケジューリング・営業日計算および依存関係操作用のユーティリティ関数(`propagateAutoSchedule`, `computeRequiredStartMs`, `createNonWorkingDayChecker`, `computeWorkingDurationMs`, `snapToWorkingStartMs`, `addWorkingTimeMs`, `getDependencyTaskId`, `normalizeDependencyLink`, `endpointsToDependencyType`, `dependencyTypeToEndpoints`, `createDependencyEntry`, `hasDependencyTarget`, `removeDependencyTarget`)をエクスポート
|
|
33
|
+
- **依存関係線の操作性向上 & 同一行内タスクのレーン配置改善**:
|
|
34
|
+
- 依存関係線のヒット領域において、通常のクリック(`click`)に加えてダブルクリック(`dblclick`)および右クリック(`contextmenu`)での `dependency-click` イベント発火に対応(`e.detail.event.type` で判別可能)
|
|
35
|
+
- 同一行内で `FS`(`lag: 0`)の依存関係を持ち、先行タスクの終了日時と後続タスクの開始日時が接している(`pred.end === succ.start`)場合に、依存関係線が潰れて選択不能になるのを防ぐため自動的に別レーン(上下段)へ分離する改善(`calculateTaskLanes`)
|
|
36
|
+
- 依存関係線上のカーソル表示と削除「×」ボタンのヒット領域半径を調整
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **マルチカラムグリッドにおける排他的終了日時(翌日 `00:00`)タスクの表示・期間日数集計・インライン編集の修正**:
|
|
41
|
+
- 日単位モードで終了日時が翌日 `00:00`(排他的終了境界)として保持されているタスクについて、`calculateRowSummaryDates` の期間日数(`durationDays`)計算、`formatGridCellValue` / `formatGridCellEditValue` の「終了日」表示(前日表記への補正)、および `applyGridCellEdit` での「終了日」「期間」インライン編集時に排他的終了日時のセマンティクスが正確に維持されるよう修正
|
|
42
|
+
- **複数タスク一括ドラッグ移動の状態委譲 & Shadow DOM 内での矩形範囲選択(Marquee Selection)の修正**:
|
|
43
|
+
- `GanttChartElement` と `DragDropController` 間で `TaskDragController` / `RowReorderController` のインスタンスを共有するよう修正し、複数選択したタスクのドラッグ&ドロップ時に選択状態が維持され全選択タスクへ移動量が反映されるよう修正
|
|
44
|
+
- `MarqueeController` で `composedPath()` および固定行ヘッダー領域の座標判定を行うよう修正し、行ヘッダーやスプリッター操作時に誤って矩形選択が開始される問題や、矩形ドラッグ中に行ヘッダーのテキストが選択される問題を解消
|
|
45
|
+
- **マルチカラムグリッド有効時のツリートグルボタン位置の整合性修正**:
|
|
46
|
+
- グリッド表示モード時における階層展開・折りたたみボタン(`.tree-toggle-btn`)の配置位置を非グリッド表示時と一致するよう修正
|
|
47
|
+
- **タスクバーのリサイズハンドル優先度 & 進捗操作ハンドルのヒット領域修正**:
|
|
48
|
+
- タスクバー端において期間リサイズハンドル(`.resize-handle`)と依存関係コネクタ(`.connector-handle`)が重なる領域で、期間リサイズ操作を優先するよう修正
|
|
49
|
+
- 進捗率ドラッグ操作ハンドルのヒット領域を下部の逆三角形ノブ部分のみに限定し、タスクバー本体のホバーやドラッグ時に意図せず進捗変更モードに入る問題を修正
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
8
53
|
## [1.5.0] - 2026-10-17
|
|
9
54
|
|
|
10
55
|
### Added
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,51 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.6.0] - 2026-10-25
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Auto-Scheduling & Extended Dependency Types (`FS` / `SS` / `FF` / `SF`) with Lag**:
|
|
13
|
+
- **Extended Dependency Link Model (`GanttDependencyLink`)**:
|
|
14
|
+
- `task.dependencies` (`GanttDependency[]`) now supports rich `GanttDependencyLink` objects (`{ taskId: string, type?: 'FS' | 'SS' | 'FF' | 'SF', lag?: number }`) in addition to plain task ID strings (`string`), maintaining 100% backward compatibility.
|
|
15
|
+
- Support all four standard dependency relationships:
|
|
16
|
+
- `FS` (Finish-to-Start, default): Successor starts after predecessor finishes (`+ lag`).
|
|
17
|
+
- `SS` (Start-to-Start): Successor starts relative to predecessor start (`+ lag`).
|
|
18
|
+
- `FF` (Finish-to-Finish): Successor finishes relative to predecessor finish (`+ lag`).
|
|
19
|
+
- `SF` (Start-to-Finish): Successor finishes relative to predecessor start (`+ lag`).
|
|
20
|
+
- Support positive lag (delay) and negative lag (lead time) in minutes (`lag`).
|
|
21
|
+
- **Topological Cascade Auto-Scheduling Engine (`option.dependency.autoSchedule`)**:
|
|
22
|
+
- Added `autoSchedule?: boolean` (default: `false`), `scheduleMode?: 'push-only' | 'strict'` (default: `'push-only'`), `respectMovable?: boolean` (default: `true`), `calendarMode?: 'calendar' | 'weekends' | 'weekends-holidays'` (default: `'calendar'`), and `isHoliday?: (date: Date) => boolean` (falls back to `option.calendar.isHoliday`) to `option.dependency`.
|
|
23
|
+
- `'push-only'` mode shifts successor tasks forward only when a dependency constraint is violated, whereas `'strict'` mode locks successor dates strictly to predecessor dates plus lag.
|
|
24
|
+
- **Working-Day & Holiday-Aware Scheduling (`calendarMode`)**: When set to `'weekends'` (skip Saturdays and Sundays) or `'weekends-holidays'` (skip weekends and holidays), successor start dates automatically snap forward to the next working day, while both task working durations and dependency lag/lead times (`lag`) are calculated and preserved in working days.
|
|
25
|
+
- Automatically cascades schedule updates across downstream tasks during task bar drag/resize, multi-task batch move, keyboard `Shift + Arrow` movement, and inline grid cell editing (`startDate`, `endDate`, `duration`), recording all cascaded changes in a single atomic Undo / Redo command.
|
|
26
|
+
- Added programmatic `chart.autoSchedule(changedTaskIds?, options?)` public method on `GanttChartElement` and `@mogura/moguchart-vue` (`GanttChartPublicApi`).
|
|
27
|
+
- **Endpoint-Aware Dependency Rendering, Creation & Export**:
|
|
28
|
+
- Orthogonal (`'orthogonal'`) and Bezier (`'curve'`) SVG dependency path builders now route from and to the appropriate left (`start`) or right (`end`) task bar endpoints based on `FS`, `SS`, `FF`, and `SF` types.
|
|
29
|
+
- Dragging between left/right task bar connectors automatically infers the corresponding `type` (`'FS' | 'SS' | 'FF' | 'SF'`) and includes it in `DependencyCreateEventDetail.type`.
|
|
30
|
+
- Updated `computeCriticalPath` and `@mogura/moguchart-plugin-excel` to support `GanttDependencyLink` entries (formatting non-FS dependencies such as `1 (SS)` in Excel exports).
|
|
31
|
+
- Added `'dependency-update'` to `GanttCommandType` for Undo / Redo history tracking of dependency link edits.
|
|
32
|
+
- Exported auto-scheduling, working-day calculation, and dependency helper utilities (`propagateAutoSchedule`, `computeRequiredStartMs`, `createNonWorkingDayChecker`, `computeWorkingDurationMs`, `snapToWorkingStartMs`, `addWorkingTimeMs`, `getDependencyTaskId`, `normalizeDependencyLink`, `endpointsToDependencyType`, `dependencyTypeToEndpoints`, `createDependencyEntry`, `hasDependencyTarget`, `removeDependencyTarget`).
|
|
33
|
+
- **Dependency Line Interaction & Intra-Row Lane Layout Enhancements**:
|
|
34
|
+
- Supported `dblclick` and `contextmenu` (right-click) events on dependency line hit areas via `dependency-click` (inspect `e.detail.event.type` for `'click' | 'dblclick' | 'contextmenu'`).
|
|
35
|
+
- Improved `calculateTaskLanes` so intra-row successor tasks connected via `FS` (`lag: 0`) with touching boundary dates (`pred.end.getTime() === succ.start.getTime()`) are separated into distinct lanes, keeping the connecting dependency line visible and clickable.
|
|
36
|
+
- Refined cursor styles on dependency lines and adjusted delete button hit area radius.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **Multi-Column Grid Exclusive Midnight (`00:00`) End Date Display, Duration Count & Inline Editing**:
|
|
41
|
+
- Fixed `calculateRowSummaryDates`, `formatGridCellValue`, `formatGridCellEditValue`, and `applyGridCellEdit` so day-mode tasks stored with exclusive midnight end timestamps (next day `00:00`) display inclusive calendar end dates (previous day) and accurate `durationDays` counts, while preserving exclusive midnight semantics when inline editing `endDate` or `duration`.
|
|
42
|
+
- **Multi-Task Drag-and-Drop State Delegation & Marquee Selection in Shadow DOM**:
|
|
43
|
+
- Fixed controller instance sharing between `GanttChartElement` and `DragDropController` (`TaskDragController`, `RowReorderController`) so multi-task selection is preserved and movement is applied to all selected tasks upon drop.
|
|
44
|
+
- Updated `MarqueeController` to inspect `composedPath()` and sticky row header viewport bounds, preventing unintended marquee selection activation when dragging from row headers/splitters and suppressing text selection during marquee drag.
|
|
45
|
+
- **Multi-Column Grid Tree Toggle Button Alignment**:
|
|
46
|
+
- Aligned the vertical and horizontal position of `.tree-toggle-btn` in multi-column grid mode with the classic non-grid row header.
|
|
47
|
+
- **Task Bar Resize Handle Priority & Progress Knob Hit Area**:
|
|
48
|
+
- Prioritized task duration resize handles (`.resize-handle`) over dependency connector circles (`.connector-handle`) in overlapping edge regions.
|
|
49
|
+
- Restricted the progress resize handle hit area exclusively to the bottom triangular knob so hovering or dragging the main task bar body no longer triggers accidental progress changes.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
8
53
|
## [1.5.0] - 2026-10-17
|
|
9
54
|
|
|
10
55
|
### Added
|
package/README.ja.md
CHANGED
|
@@ -28,9 +28,11 @@ Vue, React, Angular, Svelte など、どのフレームワークでも動作す
|
|
|
28
28
|
- ライト/ダーク/システムテーマの切り替え+カスタムカラーテーマ
|
|
29
29
|
- タスクバーの塗りつぶしパターン(ストライプ、ドット、チェッカーボードなど13種類)
|
|
30
30
|
- CSSによるスタイリング
|
|
31
|
-
- 🔗
|
|
32
|
-
-
|
|
33
|
-
-
|
|
31
|
+
- 🔗 **依存関係の対話的操作 & 自動スケジューリング**:
|
|
32
|
+
- 4種類の標準依存関係タイプ(`FS`: 終了-開始、`SS`: 開始-開始、`FF`: 終了-終了、`SF`: 開始-終了)およびラグ・リード期間(`lag`: 分単位)を `GanttDependencyLink` で指定可能(文字列タスクIDとも100%後方互換)
|
|
33
|
+
- トポロジカルソートによる **自動スケジューリング(Auto-Scheduling)** に対応(`autoSchedule`, `scheduleMode: 'push-only' | 'strict'`, `respectMovable`, `calendarMode: 'calendar' | 'weekends' | 'weekends-holidays'`, `isHoliday`)。営業日ベース(土日除外・土日祝日除外)での非稼働日スキップと実稼働期間・ラグ維持、ドラッグ移動・リサイズ、複数選択移動、キーボード移動、グリッドのインラインセル編集、および `chart.autoSchedule()` メソッドと完全連動
|
|
34
|
+
- タスク間の依存関係を矢印付き直線・曲線(直角折れ線/ベジェ曲線)で左右端エンドポイントに応じて可視化
|
|
35
|
+
- 依存関係線のクリック選択・ハイライト表示に加え、ダブルクリック(`dblclick`)・右クリック(`contextmenu`)イベントにも対応
|
|
34
36
|
- 選択中の線上の削除「×」ボタンまたは `Delete` / `Backspace` キーによるワンクリック削除
|
|
35
37
|
- クリティカルパス(最長チェーン)の自動検出+ハイライト表示
|
|
36
38
|
- 📅 **柔軟なカレンダー**:
|
|
@@ -126,7 +128,7 @@ pnpm add @mogura/moguchart-vue @mogura/moguchart-core
|
|
|
126
128
|
|
|
127
129
|
## React での使用例(公式ラッパー)
|
|
128
130
|
|
|
129
|
-
[`@mogura/moguchart-react`](
|
|
131
|
+
[`@mogura/moguchart-react`](../react/README.ja.md) を使用すると、React の合成イベントや Props、`ref` を通じた命令的メソッド呼び出しが完全に型安全に動作します:
|
|
130
132
|
|
|
131
133
|
```tsx
|
|
132
134
|
import React, { useRef } from 'react'
|
|
@@ -202,7 +204,7 @@ export default function App() {
|
|
|
202
204
|
|
|
203
205
|
## Vue 3 での使用例(公式ラッパー)
|
|
204
206
|
|
|
205
|
-
[`@mogura/moguchart-vue`](
|
|
207
|
+
[`@mogura/moguchart-vue`](../vue/README.ja.md) を使用すると、Composition API(`<script setup>`)でリアクティブな Props や Vue 標準のイベントハンドリング(`@task-update` 等)を直感的に扱えます:
|
|
206
208
|
|
|
207
209
|
```vue
|
|
208
210
|
<script setup lang="ts">
|
|
@@ -511,13 +513,32 @@ gantt-chart {
|
|
|
511
513
|
|
|
512
514
|
フォント倍率はカレンダーヘッダー(年月・週・日・時・バッジ)、行ヘッダー、WBSコードバッジ、ツリー開閉トグル、タスクバーラベル、進捗率ラベル、マーカー、ツールチップ、ドラッグ情報オーバーレイに自動反映されます。
|
|
513
515
|
|
|
514
|
-
### 依存関係線の設定
|
|
516
|
+
### 依存関係線の設定 & 自動スケジューリング
|
|
515
517
|
|
|
516
|
-
`dependency`
|
|
517
|
-
|
|
518
|
-
|
|
518
|
+
`dependency` オプションで依存関係線の表示や操作、および先行タスク変更時の自動スケジューリング(カスケード移動)をカスタマイズできます。
|
|
519
|
+
|
|
520
|
+
- `task.dependencies` の各要素には、シンプルなタスクID文字列(`'task-1'`:`FS` / ラグ `0` として扱われます)または拡張オブジェクト `GanttDependencyLink`(`{ taskId: 'task-1', type: 'FS' | 'SS' | 'FF' | 'SF', lag: 1440 }`、`lag` は分単位)を指定できます。
|
|
521
|
+
- 線のクリック・ダブルクリック・右クリック(`dependency-click`)、選択(`dependency-select`)、選択時の削除「×」ボタンや `Delete` / `Backspace` キーによる直感的な削除に対応しています。
|
|
519
522
|
|
|
520
523
|
```javascript
|
|
524
|
+
const rows = [
|
|
525
|
+
{
|
|
526
|
+
id: 'row-1',
|
|
527
|
+
name: 'バックエンド開発',
|
|
528
|
+
tasks: [
|
|
529
|
+
{ id: 't-1', name: 'スキーマ設計', start: new Date('2026-04-01'), end: new Date('2026-04-05') },
|
|
530
|
+
{
|
|
531
|
+
id: 't-2',
|
|
532
|
+
name: 'API実装',
|
|
533
|
+
start: new Date('2026-04-06'),
|
|
534
|
+
end: new Date('2026-04-12'),
|
|
535
|
+
// タスクID文字列、または GanttDependencyLink ({ taskId, type: 'FS' | 'SS' | 'FF' | 'SF', lag }) を指定可能
|
|
536
|
+
dependencies: [{ taskId: 't-1', type: 'FS', lag: 1440 }], // +1日 (1440分) のラグ
|
|
537
|
+
},
|
|
538
|
+
],
|
|
539
|
+
},
|
|
540
|
+
]
|
|
541
|
+
|
|
521
542
|
const option = {
|
|
522
543
|
dependency: {
|
|
523
544
|
lineStyle: 'orthogonal', // 接続線の形状 ('orthogonal': 角丸直角折れ線, 'curve': ベジェ曲線)
|
|
@@ -529,10 +550,18 @@ const option = {
|
|
|
529
550
|
creatable: true, // コネクタからのドラッグによる依存関係作成を許可 (デフォルト: true)
|
|
530
551
|
deletable: true, // 依存関係の削除を許可 (デフォルト: true)
|
|
531
552
|
showDeleteButton: true, // 選択時の削除「×」ボタンを表示 (デフォルト: true)
|
|
553
|
+
autoSchedule: true, // 先行タスク変更時に後続タスクを自動カスケード移動 (デフォルト: false)
|
|
554
|
+
scheduleMode: 'push-only', // 'push-only' (制約違反時のみ押し出し) | 'strict' (常に厳密追従)
|
|
555
|
+
respectMovable: true, // movable: 'none' | 'y' のタスクを自動移動対象から除外 (デフォルト: true)
|
|
556
|
+
calendarMode: 'weekends-holidays', // 'calendar' (暦日, デフォルト) | 'weekends' (土日除外) | 'weekends-holidays' (土日・祝日除外)
|
|
557
|
+
// isHoliday: (date) => false, // 祝日判定関数(省略時は option.calendar.isHoliday を使用)
|
|
532
558
|
},
|
|
533
559
|
// ...
|
|
534
560
|
}
|
|
535
561
|
|
|
562
|
+
// プログラムから全依存関係または指定タスク起点で自動スケジューリングを実行
|
|
563
|
+
const updatedTaskIds = chart.autoSchedule()
|
|
564
|
+
|
|
536
565
|
// 依存関係の選択・削除イベント
|
|
537
566
|
chart.addEventListener('dependency-select', (e) => {
|
|
538
567
|
console.log('選択された依存関係:', e.detail.selected)
|
|
@@ -1032,12 +1061,16 @@ chart.addEventListener('history-change', (e) => {
|
|
|
1032
1061
|
})
|
|
1033
1062
|
```
|
|
1034
1063
|
|
|
1035
|
-
#### 依存関係の削除 (triggerDependencyDelete)
|
|
1064
|
+
#### 依存関係の削除 & 自動スケジューリング (`triggerDependencyDelete` / `autoSchedule`)
|
|
1036
1065
|
|
|
1037
|
-
|
|
1066
|
+
プログラムから特定の依存関係線を削除したり、依存関係に基づく後続タスクの自動スケジューリングを実行できます。
|
|
1038
1067
|
|
|
1039
1068
|
```javascript
|
|
1040
1069
|
chart.triggerDependencyDelete('task-1', 'task-2')
|
|
1070
|
+
|
|
1071
|
+
// 依存関係に基づき後続タスクの日程を一括再計算(更新されたタスクID配列を返す)
|
|
1072
|
+
const updatedIds = chart.autoSchedule()
|
|
1073
|
+
const cascadedFromTask1 = chart.autoSchedule(['task-1'], { mode: 'strict' })
|
|
1041
1074
|
```
|
|
1042
1075
|
|
|
1043
1076
|
#### WBS・折りたたみ操作 (toggleRowCollapse / collapseAll / expandAll)
|
|
@@ -1077,6 +1110,20 @@ import {
|
|
|
1077
1110
|
canDropRow,
|
|
1078
1111
|
// クリティカルパス計算
|
|
1079
1112
|
computeCriticalPath,
|
|
1113
|
+
// 自動スケジューリング・依存関係ヘルパー
|
|
1114
|
+
propagateAutoSchedule,
|
|
1115
|
+
computeRequiredStartMs,
|
|
1116
|
+
createNonWorkingDayChecker,
|
|
1117
|
+
computeWorkingDurationMs,
|
|
1118
|
+
snapToWorkingStartMs,
|
|
1119
|
+
addWorkingTimeMs,
|
|
1120
|
+
getDependencyTaskId,
|
|
1121
|
+
normalizeDependencyLink,
|
|
1122
|
+
endpointsToDependencyType,
|
|
1123
|
+
dependencyTypeToEndpoints,
|
|
1124
|
+
createDependencyEntry,
|
|
1125
|
+
hasDependencyTarget,
|
|
1126
|
+
removeDependencyTarget,
|
|
1080
1127
|
// 進捗率計算
|
|
1081
1128
|
clampProgress,
|
|
1082
1129
|
calculateRowProgress,
|
|
@@ -1118,8 +1165,8 @@ const isSafe = canDropRow('source-row-id', 'target-row-id', rows) // boolean
|
|
|
1118
1165
|
// 7. クリティカルパス(最長依存関係チェーン)の計算
|
|
1119
1166
|
const criticalTaskIds = computeCriticalPath(allTasks) // Set<string>
|
|
1120
1167
|
|
|
1121
|
-
// 8.
|
|
1122
|
-
const summaryDates = calculateRowSummaryDates(rows[0].tasks) // { start, end, durationDays }
|
|
1168
|
+
// 8. 行内のタスク配列から最小開始日・最大終了日・期間日数・期間(ミリ秒)・加重平均進捗率を算出
|
|
1169
|
+
const summaryDates = calculateRowSummaryDates(rows[0].tasks) // { start, end, durationDays, durationMs, progress }
|
|
1123
1170
|
```
|
|
1124
1171
|
|
|
1125
1172
|
### キーボード操作
|
|
@@ -1160,9 +1207,9 @@ const option = {
|
|
|
1160
1207
|
|
|
1161
1208
|
## 更新履歴
|
|
1162
1209
|
|
|
1163
|
-
変更履歴の詳細は [CHANGELOG.ja.md](CHANGELOG.ja.md)([英語版: CHANGELOG.md](CHANGELOG.md))をご覧ください。
|
|
1210
|
+
変更履歴の詳細は [CHANGELOG.ja.md](../../CHANGELOG.ja.md)([英語版: CHANGELOG.md](../../CHANGELOG.md))をご覧ください。
|
|
1164
1211
|
|
|
1165
1212
|
## ライセンス
|
|
1166
1213
|
|
|
1167
|
-
MIT
|
|
1214
|
+
[MIT License](./LICENSE)
|
|
1168
1215
|
|
package/README.md
CHANGED
|
@@ -29,9 +29,11 @@ A lightweight yet feature-rich Gantt chart Web Component built with Lit. Works s
|
|
|
29
29
|
- Light / Dark / System theme switching + custom color palettes
|
|
30
30
|
- 13 built-in task bar fill patterns (stripes, dots, checkerboard, grid, etc.)
|
|
31
31
|
- Native CSS variable-driven styling
|
|
32
|
-
- 🔗 **Interactive Dependencies**:
|
|
33
|
-
-
|
|
34
|
-
-
|
|
32
|
+
- 🔗 **Interactive Dependencies & Auto-Scheduling**:
|
|
33
|
+
- Support all 4 standard dependency relationships (`FS`: Finish-to-Start, `SS`: Start-to-Start, `FF`: Finish-to-Finish, `SF`: Start-to-Finish) and lag/lead time (`lag` in minutes) via `GanttDependencyLink` (with 100% backward compatibility for string task IDs)
|
|
34
|
+
- Topological cascade **Auto-Scheduling** (`autoSchedule`, `scheduleMode: 'push-only' | 'strict'`, `respectMovable`, `calendarMode: 'calendar' | 'weekends' | 'weekends-holidays'`, `isHoliday`) with working-day/holiday skipping and working-duration/lag preservation across drag/resize, multi-task move, keyboard movement, inline grid cell editing, and programmatic `chart.autoSchedule()`
|
|
35
|
+
- Direct task dependencies visualised with orthogonal segmented lines or Bezier curves routed accurately to left/right bar endpoints
|
|
36
|
+
- Click, double-click, and right-click (`contextmenu`) support on dependency lines with dedicated highlight styling
|
|
35
37
|
- One-click deletion via on-line "×" button or `Delete` / `Backspace` key
|
|
36
38
|
- Proximity connector toggle (`showConnectors`)
|
|
37
39
|
- Automatic critical path detection and highlighted visualization (`showCriticalPath`)
|
|
@@ -131,7 +133,7 @@ For exhaustive configuration properties, methods, and event signatures, refer to
|
|
|
131
133
|
|
|
132
134
|
## Usage with React (Official Wrapper)
|
|
133
135
|
|
|
134
|
-
Use [`@mogura/moguchart-react`](
|
|
136
|
+
Use [`@mogura/moguchart-react`](../react/README.md) for first-class React support with full TypeScript typing, React synthetic events, and imperative `ref` calls:
|
|
135
137
|
|
|
136
138
|
```tsx
|
|
137
139
|
import React, { useRef } from 'react'
|
|
@@ -207,7 +209,7 @@ export default function App() {
|
|
|
207
209
|
|
|
208
210
|
## Usage with Vue 3 (Official Wrapper)
|
|
209
211
|
|
|
210
|
-
Use [`@mogura/moguchart-vue`](
|
|
212
|
+
Use [`@mogura/moguchart-vue`](../vue/README.md) for seamless Vue 3 reactivity, Composition API (`<script setup>`), and native event listeners (`@task-update`):
|
|
211
213
|
|
|
212
214
|
```vue
|
|
213
215
|
<script setup lang="ts">
|
|
@@ -519,22 +521,47 @@ gantt-chart {
|
|
|
519
521
|
|
|
520
522
|
Font scaling is automatically applied to calendar headers (year/month, weeks, days, hours, badges), row headers, WBS code badges, tree toggle icons, task bar labels, progress labels, markers, tooltips, and drag info overlays.
|
|
521
523
|
|
|
522
|
-
### Dependency Line Settings
|
|
524
|
+
### Dependency Line Settings & Auto-Scheduling
|
|
523
525
|
|
|
524
|
-
Configure task dependency curves
|
|
526
|
+
Configure task dependency curves, interactive operations, and topological cascade auto-scheduling with the `dependency` option:
|
|
525
527
|
|
|
526
528
|
- `lineStyle`: `'orthogonal'` (rounded segmented lines, default) or `'curve'` (Bezier curves).
|
|
527
529
|
- `showArrows`: Toggle directional arrow heads (default: `true`).
|
|
528
530
|
- `arrowSize`: Arrow dimensions in pixels (default: `8`).
|
|
529
531
|
- `showConnectors`: Control whether circular connection handles appear on hover (default: `true`).
|
|
530
532
|
- `showCriticalPath`: Automatically detect the longest chain (critical path) and highlight connected tasks and lines.
|
|
531
|
-
- `creatable`: Allow creating links via connector drag (default: `true`).
|
|
533
|
+
- `creatable`: Allow creating links via connector drag (default: `true`). Dragging between left/right connectors automatically infers `'FS' | 'SS' | 'FF' | 'SF'`.
|
|
532
534
|
- `deletable`: Allow deleting links via keyboard or button (default: `true`).
|
|
533
535
|
- `showDeleteButton`: Display "×" delete button on selected link (default: `true`).
|
|
536
|
+
- `autoSchedule`: Automatically cascade date changes to successor tasks when a predecessor task is moved, resized, or edited (default: `false`).
|
|
537
|
+
- `scheduleMode`: `'push-only'` (default: shifts successors forward only when constraints are violated) or `'strict'` (always shifts successors in lockstep with predecessor dates and lag).
|
|
538
|
+
- `respectMovable`: Exclude tasks with `movable: 'none' | 'y'` from automatic cascade movement (default: `true`).
|
|
539
|
+
- `calendarMode`: `'calendar'` (default: calendar days), `'weekends'` (skip Saturdays/Sundays and preserve working days/lag), or `'weekends-holidays'` (skip weekends and holidays).
|
|
540
|
+
- `isHoliday`: Custom holiday predicate `(date: Date) => boolean` used when `calendarMode === 'weekends-holidays'` (falls back to `option.calendar.isHoliday`).
|
|
534
541
|
|
|
535
|
-
|
|
542
|
+
Each item in `task.dependencies` can be a simple task ID string (`'task-1'`, treated as `FS` with `0` lag) or a `GanttDependencyLink` object (`{ taskId: 'task-1', type: 'FS' | 'SS' | 'FF' | 'SF', lag: 1440 }`, where `lag` is in minutes).
|
|
543
|
+
|
|
544
|
+
Lines can be clicked, double-clicked, or right-clicked (`dependency-click`), selected (`dependency-select`), and deleted by clicking the "×" button or pressing `Delete` / `Backspace`.
|
|
536
545
|
|
|
537
546
|
```javascript
|
|
547
|
+
const rows = [
|
|
548
|
+
{
|
|
549
|
+
id: 'row-1',
|
|
550
|
+
name: 'Backend API',
|
|
551
|
+
tasks: [
|
|
552
|
+
{ id: 't-1', name: 'Schema Design', start: new Date('2026-04-01'), end: new Date('2026-04-05') },
|
|
553
|
+
{
|
|
554
|
+
id: 't-2',
|
|
555
|
+
name: 'API Implementation',
|
|
556
|
+
start: new Date('2026-04-06'),
|
|
557
|
+
end: new Date('2026-04-12'),
|
|
558
|
+
// Supports string taskId or GanttDependencyLink ({ taskId, type: 'FS' | 'SS' | 'FF' | 'SF', lag })
|
|
559
|
+
dependencies: [{ taskId: 't-1', type: 'FS', lag: 1440 }], // +1 day (1440 min) lag
|
|
560
|
+
},
|
|
561
|
+
],
|
|
562
|
+
},
|
|
563
|
+
]
|
|
564
|
+
|
|
538
565
|
const option = {
|
|
539
566
|
dependency: {
|
|
540
567
|
lineStyle: 'orthogonal',
|
|
@@ -546,10 +573,18 @@ const option = {
|
|
|
546
573
|
creatable: true,
|
|
547
574
|
deletable: true,
|
|
548
575
|
showDeleteButton: true,
|
|
576
|
+
autoSchedule: true, // Enable topological cascade auto-scheduling
|
|
577
|
+
scheduleMode: 'push-only', // 'push-only' | 'strict'
|
|
578
|
+
respectMovable: true,
|
|
579
|
+
calendarMode: 'weekends-holidays', // 'calendar' | 'weekends' | 'weekends-holidays'
|
|
580
|
+
// isHoliday: (date) => false, // Optional holiday checker (falls back to option.calendar.isHoliday)
|
|
549
581
|
},
|
|
550
582
|
// ...
|
|
551
583
|
}
|
|
552
584
|
|
|
585
|
+
// Programmatically recalculate and cascade all dependencies
|
|
586
|
+
const updatedTaskIds = chart.autoSchedule()
|
|
587
|
+
|
|
553
588
|
// Dependency selection and deletion events
|
|
554
589
|
chart.addEventListener('dependency-select', (e) => {
|
|
555
590
|
console.log('Selected dependency:', e.detail.selected)
|
|
@@ -1050,12 +1085,16 @@ chart.addEventListener('history-change', (e) => {
|
|
|
1050
1085
|
})
|
|
1051
1086
|
```
|
|
1052
1087
|
|
|
1053
|
-
#### Dependency Deletion (`triggerDependencyDelete`)
|
|
1088
|
+
#### Dependency Deletion & Auto-Scheduling (`triggerDependencyDelete`, `autoSchedule`)
|
|
1054
1089
|
|
|
1055
|
-
Programmatically remove a dependency connection between two tasks:
|
|
1090
|
+
Programmatically remove a dependency connection between two tasks or execute topological cascade auto-scheduling:
|
|
1056
1091
|
|
|
1057
1092
|
```javascript
|
|
1058
1093
|
chart.triggerDependencyDelete('task-1', 'task-2')
|
|
1094
|
+
|
|
1095
|
+
// Recalculate downstream schedules (returns array of updated task IDs)
|
|
1096
|
+
const updatedIds = chart.autoSchedule()
|
|
1097
|
+
const cascadedFromTask1 = chart.autoSchedule(['task-1'], { mode: 'strict' })
|
|
1059
1098
|
```
|
|
1060
1099
|
|
|
1061
1100
|
#### WBS & Collapse Operations (`toggleRowCollapse`, `collapseAll`, `expandAll`)
|
|
@@ -1095,6 +1134,20 @@ import {
|
|
|
1095
1134
|
canDropRow,
|
|
1096
1135
|
// Critical path computation
|
|
1097
1136
|
computeCriticalPath,
|
|
1137
|
+
// Auto-scheduling & dependency helpers
|
|
1138
|
+
propagateAutoSchedule,
|
|
1139
|
+
computeRequiredStartMs,
|
|
1140
|
+
createNonWorkingDayChecker,
|
|
1141
|
+
computeWorkingDurationMs,
|
|
1142
|
+
snapToWorkingStartMs,
|
|
1143
|
+
addWorkingTimeMs,
|
|
1144
|
+
getDependencyTaskId,
|
|
1145
|
+
normalizeDependencyLink,
|
|
1146
|
+
endpointsToDependencyType,
|
|
1147
|
+
dependencyTypeToEndpoints,
|
|
1148
|
+
createDependencyEntry,
|
|
1149
|
+
hasDependencyTarget,
|
|
1150
|
+
removeDependencyTarget,
|
|
1098
1151
|
// Progress calculations
|
|
1099
1152
|
clampProgress,
|
|
1100
1153
|
calculateRowProgress,
|
|
@@ -1129,8 +1182,8 @@ const summaryTask = computeSummaryTask(childTasks, 'project-1') // Min start, ma
|
|
|
1129
1182
|
const isDropAllowed = canDropRow('source-row-id', 'target-row-id', rows) // boolean
|
|
1130
1183
|
// 7. Find longest task dependency chains (critical path)
|
|
1131
1184
|
const criticalTaskIds = computeCriticalPath(allTasks) // Set<string>
|
|
1132
|
-
// 8. Calculate earliest start, latest end,
|
|
1133
|
-
const summaryDates = calculateRowSummaryDates(rows[0].tasks) // { start, end, durationDays }
|
|
1185
|
+
// 8. Calculate earliest start, latest end, calendar days, duration (ms), and weighted progress across tasks in a row
|
|
1186
|
+
const summaryDates = calculateRowSummaryDates(rows[0].tasks) // { start, end, durationDays, durationMs, progress }
|
|
1134
1187
|
```
|
|
1135
1188
|
|
|
1136
1189
|
### Keyboard Operations
|
|
@@ -1170,8 +1223,8 @@ const option = {
|
|
|
1170
1223
|
|
|
1171
1224
|
## Changelog
|
|
1172
1225
|
|
|
1173
|
-
See [CHANGELOG.md](CHANGELOG.md) ([日本語版: CHANGELOG.ja.md](CHANGELOG.ja.md)) for release history and migration details.
|
|
1226
|
+
See [CHANGELOG.md](../../CHANGELOG.md) ([日本語版: CHANGELOG.ja.md](../../CHANGELOG.ja.md)) for release history and migration details.
|
|
1174
1227
|
|
|
1175
1228
|
## License
|
|
1176
1229
|
|
|
1177
|
-
[MIT License](LICENSE)
|
|
1230
|
+
[MIT License](./LICENSE)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
2
|
import type { GanttChartOption, GanttRow, GanttTask, GanttTaskMoveMode, TaskUpdateEventDetail } from '../../core/types';
|
|
3
3
|
import type { GanttCommandType } from '../../core/history';
|
|
4
|
-
import { type DragOverlayInfo, type DragPreviewState, type DraggingTaskState, type TaskDragControllerHost } from './task-drag-controller';
|
|
5
|
-
import { type RowReorderControllerHost } from './row-reorder-controller';
|
|
4
|
+
import { TaskDragController, type DragOverlayInfo, type DragPreviewState, type DraggingTaskState, type TaskDragControllerHost } from './task-drag-controller';
|
|
5
|
+
import { RowReorderController, type RowReorderControllerHost } from './row-reorder-controller';
|
|
6
6
|
export type { DragOverlayInfo, DragPreviewState, DraggingTaskState };
|
|
7
7
|
export interface DragDropControllerHost extends ReactiveControllerHost, HTMLElement, TaskDragControllerHost, RowReorderControllerHost {
|
|
8
8
|
rows: GanttRow[];
|
|
@@ -39,7 +39,7 @@ export interface DragDropControllerHost extends ReactiveControllerHost, HTMLElem
|
|
|
39
39
|
export declare class DragDropController implements ReactiveController {
|
|
40
40
|
private taskDrag;
|
|
41
41
|
private rowReorder;
|
|
42
|
-
constructor(host: DragDropControllerHost);
|
|
42
|
+
constructor(host: DragDropControllerHost, taskDrag?: TaskDragController, rowReorder?: RowReorderController);
|
|
43
43
|
hostConnected(): void;
|
|
44
44
|
hostDisconnected(): void;
|
|
45
45
|
get draggingTask(): DraggingTaskState | null;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import type { DependencyEndpoint } from '../core/types';
|
|
1
2
|
/**
|
|
2
3
|
* 直角折れ線(角丸)の SVG パスを生成するヘルパー関数。
|
|
3
|
-
* @param startX 接続元 X
|
|
4
|
+
* @param startX 接続元 X(バー右端または左端)
|
|
4
5
|
* @param startY 接続元 Y(バー中央)
|
|
5
|
-
* @param endX 接続先 X
|
|
6
|
+
* @param endX 接続先 X(バー左端または右端、矢印なし時と共通)
|
|
6
7
|
* @param endY 接続先 Y(バー中央)
|
|
7
8
|
* @param adjustedEndX 矢印表示時の終端 X(矢印サイズ分手前)
|
|
8
9
|
* @param barHeight バー高さ(迂回ルート計算用)
|
|
9
10
|
* @param barMargin バーマージン(迂回ルート計算用)
|
|
10
11
|
* @param r 角丸半径 (px)
|
|
12
|
+
* @param sourceEndpoint 接続元の端点 ('end'=右端 | 'start'=左端、デフォルト: 'end')
|
|
13
|
+
* @param targetEndpoint 接続先の端点 ('start'=左端 | 'end'=右端、デフォルト: 'start')
|
|
11
14
|
*/
|
|
12
|
-
export declare function buildOrthogonalPath(startX: number, startY: number, endX: number, endY: number, adjustedEndX: number, barHeight: number, barMargin: number, r: number): {
|
|
15
|
+
export declare function buildOrthogonalPath(startX: number, startY: number, endX: number, endY: number, adjustedEndX: number, barHeight: number, barMargin: number, r: number, sourceEndpoint?: DependencyEndpoint, targetEndpoint?: DependencyEndpoint): {
|
|
13
16
|
pathD: string;
|
|
14
17
|
hitPathD: string;
|
|
15
18
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GanttChartOption, GanttChartOptionZoom, GanttRow, GanttTask, GanttTaskMoveMode, TaskUpdateEventDetail, GanttColumn } from '../core/types';
|
|
2
2
|
import { HistoryManager, type GanttCommand, type GanttCommandType } from '../core/history';
|
|
3
|
+
import { type AutoScheduleOptions } from '../core/auto-schedule';
|
|
3
4
|
import { LitElement, type PropertyValues } from 'lit';
|
|
4
5
|
import './gantt-calendar';
|
|
5
6
|
import './gantt-row';
|
|
@@ -285,6 +286,13 @@ export declare class GanttChartElement extends LitElement {
|
|
|
285
286
|
collapseAll(): void;
|
|
286
287
|
expandAll(): void;
|
|
287
288
|
private handleRowCellEdit;
|
|
289
|
+
/**
|
|
290
|
+
* 依存関係に基づいて後続タスクの日程を自動的に再計算・カスケード更新する
|
|
291
|
+
* @param changedTaskIds 変更の起点となるタスクID配列(省略時は依存関係を持つ全タスクを対象に再計算)
|
|
292
|
+
* @param options 自動スケジューリング設定
|
|
293
|
+
* @returns 日時が更新されたタスクIDの配列
|
|
294
|
+
*/
|
|
295
|
+
autoSchedule(changedTaskIds?: string[], options?: AutoScheduleOptions): string[];
|
|
288
296
|
/**
|
|
289
297
|
* 指定された行とカラムのインライン編集を開始する
|
|
290
298
|
*/
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { AutoScheduleCalendarMode, AutoScheduleMode, DependencyEndpoint, DependencyType, GanttDependency, GanttDependencyLink, GanttRow } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 自動スケジューリング実行オプション
|
|
4
|
+
*/
|
|
5
|
+
export interface AutoScheduleOptions {
|
|
6
|
+
/**
|
|
7
|
+
* スケジュール制約モード (デフォルト: 'push-only')
|
|
8
|
+
* - 'push-only': 先行タスクとの依存制約(+ラグ)に違反する場合のみ後続タスクを後ろへ押し出す
|
|
9
|
+
* - 'strict': 先行タスクの位置(+ラグ)に合わせて後続タスクを常に厳密に追従させる
|
|
10
|
+
*/
|
|
11
|
+
mode?: AutoScheduleMode;
|
|
12
|
+
/**
|
|
13
|
+
* タスクの movable 設定 ('none' | 'y') を尊重して自動移動対象から除外するか (デフォルト: true)
|
|
14
|
+
*/
|
|
15
|
+
respectMovable?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 稼働日(休日除外)計算モード (デフォルト: 'calendar')
|
|
18
|
+
* - 'calendar': カレンダー通り(土日・祝日を含めて計算)
|
|
19
|
+
* - 'weekends': 営業日ベース(土日を非営業日として除外)
|
|
20
|
+
* - 'weekends-holidays': 営業日ベース(土日および祝日を非営業日として除外)
|
|
21
|
+
*/
|
|
22
|
+
calendarMode?: AutoScheduleCalendarMode;
|
|
23
|
+
/**
|
|
24
|
+
* 祝日判定関数 ('weekends-holidays' モード時に使用)
|
|
25
|
+
*/
|
|
26
|
+
isHoliday?: (date: Date) => boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 自動スケジューリング計算結果
|
|
30
|
+
*/
|
|
31
|
+
export interface AutoScheduleResult {
|
|
32
|
+
/** 更新後の行配列(変更がない場合は元の参照を維持) */
|
|
33
|
+
rows: GanttRow[];
|
|
34
|
+
/** 自動スケジューリングによって日時が更新されたタスクIDの配列 */
|
|
35
|
+
updatedTaskIds: string[];
|
|
36
|
+
/** 1つ以上のタスクが更新されたかどうか */
|
|
37
|
+
hasChanges: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 依存関係要素(文字列またはオブジェクト)から先行タスクIDを取得する
|
|
41
|
+
*/
|
|
42
|
+
export declare function getDependencyTaskId(dep: GanttDependency): string;
|
|
43
|
+
/**
|
|
44
|
+
* 依存関係要素を正規化された GanttDependencyLink オブジェクトに変換する
|
|
45
|
+
*/
|
|
46
|
+
export declare function normalizeDependencyLink(dep: GanttDependency): Required<GanttDependencyLink>;
|
|
47
|
+
/**
|
|
48
|
+
* 接続元・接続先のエンドポイントから依存関係タイプ ('FS' | 'SS' | 'FF' | 'SF') を判定する
|
|
49
|
+
*/
|
|
50
|
+
export declare function endpointsToDependencyType(sourceEndpoint?: DependencyEndpoint | string | null, targetEndpoint?: DependencyEndpoint | string | null): DependencyType;
|
|
51
|
+
/**
|
|
52
|
+
* 依存関係タイプ ('FS' | 'SS' | 'FF' | 'SF') から接続元・接続先のエンドポイントを取得する
|
|
53
|
+
*/
|
|
54
|
+
export declare function dependencyTypeToEndpoints(type?: DependencyType): {
|
|
55
|
+
sourceEndpoint: DependencyEndpoint;
|
|
56
|
+
targetEndpoint: DependencyEndpoint;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* 後方互換性を保ちつつ依存関係エントリを生成する。
|
|
60
|
+
* 標準の 'FS' かつ lag === 0 の場合はシンプルなタスクID文字列を返し、
|
|
61
|
+
* それ以外('SS', 'FF', 'SF' または lag 指定あり)の場合は GanttDependencyLink オブジェクトを返す。
|
|
62
|
+
*/
|
|
63
|
+
export declare function createDependencyEntry(sourceTaskId: string, type?: DependencyType, lag?: number): GanttDependency;
|
|
64
|
+
/**
|
|
65
|
+
* 依存関係配列の中に指定した先行タスクIDが含まれているか判定する
|
|
66
|
+
*/
|
|
67
|
+
export declare function hasDependencyTarget(dependencies: GanttDependency[] | undefined, sourceTaskId: string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 依存関係配列から指定した先行タスクIDを除外した新しい配列を返す
|
|
70
|
+
*/
|
|
71
|
+
export declare function removeDependencyTarget(dependencies: GanttDependency[] | undefined, sourceTaskId: string): GanttDependency[];
|
|
72
|
+
/**
|
|
73
|
+
* 稼働日計算モードと祝日判定関数から、非営業日判定関数を生成する
|
|
74
|
+
* ('calendar' の場合は null を返す)
|
|
75
|
+
*/
|
|
76
|
+
export declare function createNonWorkingDayChecker(calendarMode?: AutoScheduleCalendarMode, isHoliday?: (date: Date) => boolean): ((dayStartMs: number) => boolean) | null;
|
|
77
|
+
/**
|
|
78
|
+
* 指定された期間 [startMs, endMs] に含まれる営業日ベースの所要時間(ミリ秒)を算出する。
|
|
79
|
+
* タスク全体が非営業日のみに配置されていた場合は、期間が0に潰れるのを防ぐため暦日期間を返す。
|
|
80
|
+
*/
|
|
81
|
+
export declare function computeWorkingDurationMs(startMs: number, endMs: number, isNonWorkingDay: (dayStartMs: number) => boolean): number;
|
|
82
|
+
/**
|
|
83
|
+
* 指定時刻が非営業日に該当する場合、翌営業日の開始時刻 (00:00:00) へ進める
|
|
84
|
+
*/
|
|
85
|
+
export declare function snapToWorkingStartMs(ms: number, isNonWorkingDay: (dayStartMs: number) => boolean): number;
|
|
86
|
+
/**
|
|
87
|
+
* 基準時刻から営業日ベースで指定ミリ秒(正: 未来方向 / 負: 過去方向)を進めた時刻を算出する
|
|
88
|
+
*/
|
|
89
|
+
export declare function addWorkingTimeMs(anchorMs: number, deltaMs: number, isNonWorkingDay: (dayStartMs: number) => boolean): number;
|
|
90
|
+
/**
|
|
91
|
+
* 単一の先行タスク制約に基づき、後続タスクに要求される開始時刻(ミリ秒)を計算する
|
|
92
|
+
*/
|
|
93
|
+
export declare function computeRequiredStartMs(predStartMs: number, predEndMs: number, succDurationMs: number, type?: DependencyType, lagMinutes?: number, isNonWorkingDay?: ((dayStartMs: number) => boolean) | null): number;
|
|
94
|
+
/**
|
|
95
|
+
* 先行タスクの変更に伴い、依存関係を持つ後続タスクの日程をトポロジカルソート順でカスケード更新する。
|
|
96
|
+
*
|
|
97
|
+
* @param rows 全行データ
|
|
98
|
+
* @param changedTaskIds 変更の起点となったタスクIDの配列または集合(省略時は依存関係を持つ全タスクを対象にスケジュール計算)
|
|
99
|
+
* @param options 自動スケジューリング設定
|
|
100
|
+
*/
|
|
101
|
+
export declare function propagateAutoSchedule(rows: GanttRow[], changedTaskIds?: Iterable<string>, options?: AutoScheduleOptions): AutoScheduleResult;
|
package/dist/core/history.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ガントチャートのUndo/Redo(操作履歴)管理
|
|
3
3
|
*/
|
|
4
|
-
export type GanttCommandType = 'task-move' | 'task-resize' | 'task-progress' | 'task-delete' | 'row-reorder' | 'dependency-create' | 'dependency-delete' | 'cell-edit' | 'custom';
|
|
4
|
+
export type GanttCommandType = 'task-move' | 'task-resize' | 'task-progress' | 'task-delete' | 'row-reorder' | 'dependency-create' | 'dependency-delete' | 'dependency-update' | 'cell-edit' | 'custom';
|
|
5
5
|
/**
|
|
6
6
|
* ガントチャートに対する単一の編集操作を表すコマンドインターフェース
|
|
7
7
|
*/
|