@object-ui/plugin-gantt 16.0.0 → 16.1.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 +133 -0
- package/dist/GanttView.d.ts +76 -8
- package/dist/GanttView.d.ts.map +1 -1
- package/dist/ObjectGantt.d.ts +8 -1
- package/dist/ObjectGantt.d.ts.map +1 -1
- package/dist/index.js +2324 -1959
- package/dist/index.umd.cjs +13 -45
- package/dist/scheduling.d.ts +49 -4
- package/dist/scheduling.d.ts.map +1 -1
- package/package.json +11 -13
package/dist/scheduling.d.ts
CHANGED
|
@@ -42,6 +42,17 @@ export interface SchedulableTask {
|
|
|
42
42
|
}>;
|
|
43
43
|
parent?: string | number | null;
|
|
44
44
|
type?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Row-level lock (仅查看). A locked task is never moved by the reschedule;
|
|
47
|
+
* when it VIOLATES a link it is reported in `skippedLocked` instead.
|
|
48
|
+
*/
|
|
49
|
+
locked?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the task's own start/end are real data (mirrors
|
|
52
|
+
* GanttTask.hasOwnDates). Only consulted for summaries under
|
|
53
|
+
* `summaryExtent: 'self'` — a date-less grouping level still never moves.
|
|
54
|
+
*/
|
|
55
|
+
hasOwnDates?: boolean;
|
|
45
56
|
}
|
|
46
57
|
export interface CriticalPathResult {
|
|
47
58
|
/** Ids of tasks on the critical path (zero slack). */
|
|
@@ -66,19 +77,53 @@ export interface RescheduleChange {
|
|
|
66
77
|
start: Date;
|
|
67
78
|
end: Date;
|
|
68
79
|
}
|
|
80
|
+
export interface RescheduleOptions {
|
|
81
|
+
/**
|
|
82
|
+
* How summary (parent) tasks participate. `'children'` (default): their
|
|
83
|
+
* dates are derived rollups — they constrain successors but are never
|
|
84
|
+
* moved. `'self'`: a summary whose dates are its OWN (`hasOwnDates !==
|
|
85
|
+
* false`, not locked) shifts like a task, and its unlocked descendants
|
|
86
|
+
* ride along by the same delta (the group-drag semantics).
|
|
87
|
+
*/
|
|
88
|
+
summaryExtent?: 'children' | 'self';
|
|
89
|
+
/**
|
|
90
|
+
* Snap a computed start instant onto a grid — e.g. shift-band boundaries
|
|
91
|
+
* (班次边界), so a pushed task never starts mid-band. Must return an
|
|
92
|
+
* instant `>=` the input (this is 顺延; snapping may only push later).
|
|
93
|
+
* Applied only to tasks that actually move, and only in non-calendar mode
|
|
94
|
+
* (a WorkingCalendar already owns the day-granularity snapping).
|
|
95
|
+
*/
|
|
96
|
+
snapStart?: (ms: number) => number;
|
|
97
|
+
}
|
|
98
|
+
export interface RescheduleResult {
|
|
99
|
+
changes: RescheduleChange[];
|
|
100
|
+
/**
|
|
101
|
+
* Tasks that VIOLATE a link but stayed put because they are locked
|
|
102
|
+
* (仅查看). Lets the UI report "N skipped" honestly instead of implying
|
|
103
|
+
* the schedule is fully repaired.
|
|
104
|
+
*/
|
|
105
|
+
skippedLocked: string[];
|
|
106
|
+
}
|
|
69
107
|
/**
|
|
70
108
|
* Dependency-driven forward reschedule. Walks the graph in topological order
|
|
71
109
|
* and pushes each task as late as its predecessors require, preserving its
|
|
72
|
-
* duration and never moving it earlier than its current start.
|
|
73
|
-
*
|
|
74
|
-
*
|
|
110
|
+
* duration and never moving it earlier than its current start.
|
|
111
|
+
*
|
|
112
|
+
* Summary handling follows {@link RescheduleOptions.summaryExtent}: rollup
|
|
113
|
+
* summaries are fixed predecessor nodes; self-dated summaries move and carry
|
|
114
|
+
* their unlocked subtree (a descendant already pushed further by its own
|
|
115
|
+
* links keeps the later position — 顺延 only, so max wins). The cascade is a
|
|
116
|
+
* single forward pass: carried positions don't re-propagate through links,
|
|
117
|
+
* matching the function's minimal-repair pragmatism (no constraint solver).
|
|
75
118
|
*
|
|
76
119
|
* When a {@link WorkingCalendar} is supplied, each task's duration is measured
|
|
77
120
|
* in working days and rescheduled tasks are snapped to start (and finish) on
|
|
78
121
|
* working days only — weekends/holidays are stepped over rather than consumed.
|
|
79
122
|
*
|
|
80
|
-
* Returns
|
|
123
|
+
* Returns empty results when the graph has a cycle (ambiguous ordering).
|
|
81
124
|
*/
|
|
125
|
+
export declare function computeProjectRescheduleDetailed(tasks: SchedulableTask[], cal?: WorkingCalendar, opts?: RescheduleOptions): RescheduleResult;
|
|
126
|
+
/** Back-compat wrapper: changes only, default (rollup-summary) semantics. */
|
|
82
127
|
export declare function computeProjectReschedule(tasks: SchedulableTask[], cal?: WorkingCalendar): RescheduleChange[];
|
|
83
128
|
/**
|
|
84
129
|
* Would adding the dependency edge `sourceId → targetId` (predecessor →
|
package/dist/scheduling.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduling.d.ts","sourceRoot":"","sources":["../src/scheduling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACxB;AAuED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,IAAI,CAAC;IACV,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduling.d.ts","sourceRoot":"","sources":["../src/scheduling.ts"],"names":[],"mappings":"AAAA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EAAE,UAAU,GAAG,MAAM,CAAC;IACpC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;;OAIG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,eAAe,EAAE,EACxB,GAAG,CAAC,EAAE,eAAe,EACrB,IAAI,CAAC,EAAE,iBAAiB,GACvB,gBAAgB,CAoIlB;AAED,6EAA6E;AAC7E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,GAAG,CAAC,EAAE,eAAe,GAAG,gBAAgB,EAAE,CAE5G;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC9B,QAAQ,EAAE,MAAM,GAAG,MAAM,EACzB,QAAQ,EAAE,MAAM,GAAG,MAAM,GACxB,OAAO,CAuBT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-gantt",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Gantt chart plugin for Object UI",
|
|
@@ -24,29 +24,27 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@objectstack/spec": "^
|
|
28
|
-
"lucide-react": "^1.
|
|
29
|
-
"qrcode": "^1.5.4",
|
|
27
|
+
"@objectstack/spec": "^16.0.0-rc.0",
|
|
28
|
+
"lucide-react": "^1.25.0",
|
|
30
29
|
"sonner": "^2.0.7",
|
|
31
|
-
"@object-ui/components": "16.
|
|
32
|
-
"@object-ui/core": "16.
|
|
33
|
-
"@object-ui/fields": "16.
|
|
34
|
-
"@object-ui/i18n": "16.
|
|
35
|
-
"@object-ui/plugin-detail": "16.
|
|
36
|
-
"@object-ui/react": "16.
|
|
37
|
-
"@object-ui/types": "16.
|
|
30
|
+
"@object-ui/components": "16.1.0",
|
|
31
|
+
"@object-ui/core": "16.1.0",
|
|
32
|
+
"@object-ui/fields": "16.1.0",
|
|
33
|
+
"@object-ui/i18n": "16.1.0",
|
|
34
|
+
"@object-ui/plugin-detail": "16.1.0",
|
|
35
|
+
"@object-ui/react": "16.1.0",
|
|
36
|
+
"@object-ui/types": "16.1.0"
|
|
38
37
|
},
|
|
39
38
|
"peerDependencies": {
|
|
40
39
|
"react": "^18.0.0 || ^19.0.0",
|
|
41
40
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@types/qrcode": "^1.5.6",
|
|
45
43
|
"@types/react": "19.2.17",
|
|
46
44
|
"@types/react-dom": "19.2.3",
|
|
47
45
|
"@vitejs/plugin-react": "^6.0.3",
|
|
48
46
|
"typescript": "^6.0.3",
|
|
49
|
-
"vite": "^8.1.
|
|
47
|
+
"vite": "^8.1.5",
|
|
50
48
|
"vite-plugin-dts": "^5.0.3"
|
|
51
49
|
},
|
|
52
50
|
"keywords": [
|