@object-ui/plugin-gantt 17.5.0 → 17.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.
@@ -6,7 +6,7 @@
6
6
  * passes) to find the zero-slack chain that drives the project end.
7
7
  * - `computeProjectReschedule` — dependency-driven forward shifting: push
8
8
  * successors later until every link constraint holds, preserving each
9
- * task's duration. Tasks are only ever moved *later* (顺延), never pulled
9
+ * task's duration. Tasks are only ever moved *later* (forward-only), never pulled
10
10
  * earlier, so the result is a minimal repair, not an ASAP recompute.
11
11
  *
12
12
  * Both treat the dependency on a task as a *predecessor* edge: if task B lists
@@ -43,7 +43,7 @@ export interface SchedulableTask {
43
43
  parent?: string | number | null;
44
44
  type?: string;
45
45
  /**
46
- * Row-level lock (仅查看). A locked task is never moved by the reschedule;
46
+ * Row-level lock (view-only row). A locked task is never moved by the reschedule;
47
47
  * when it VIOLATES a link it is reported in `skippedLocked` instead.
48
48
  */
49
49
  locked?: boolean;
@@ -87,9 +87,9 @@ export interface RescheduleOptions {
87
87
  */
88
88
  summaryExtent?: 'children' | 'self';
89
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).
90
+ * Snap a computed start instant onto a grid — e.g. shift-band boundaries, so
91
+ * a pushed task never starts mid-band. Must return an instant `>=` the input
92
+ * (this is forward-only; snapping may only push later).
93
93
  * Applied only to tasks that actually move, and only in non-calendar mode
94
94
  * (a WorkingCalendar already owns the day-granularity snapping).
95
95
  */
@@ -99,7 +99,7 @@ export interface RescheduleResult {
99
99
  changes: RescheduleChange[];
100
100
  /**
101
101
  * Tasks that VIOLATE a link but stayed put because they are locked
102
- * (仅查看). Lets the UI report "N skipped" honestly instead of implying
102
+ * (view-only rows). Lets the UI report "N skipped" honestly instead of implying
103
103
  * the schedule is fully repaired.
104
104
  */
105
105
  skippedLocked: string[];
@@ -112,7 +112,7 @@ export interface RescheduleResult {
112
112
  * Summary handling follows {@link RescheduleOptions.summaryExtent}: rollup
113
113
  * summaries are fixed predecessor nodes; self-dated summaries move and carry
114
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
115
+ * links keeps the later position — forward-only, so max wins). The cascade is a
116
116
  * single forward pass: carried positions don't re-propagate through links,
117
117
  * matching the function's minimal-repair pragmatism (no constraint solver).
118
118
  *
package/dist/shifts.d.ts CHANGED
@@ -1,21 +1,24 @@
1
1
  /**
2
- * Shift segmentation (班次/排班) for the Gantt — pure, side-effect-free helpers.
2
+ * Shift segmentation (shift bands / rostering) for the Gantt — pure,
3
+ * side-effect-free helpers.
3
4
  *
4
- * A factory's day is split into named time bands (白班 08:00–20:00, 夜班
5
- * 20:00–次日08:00). The Gantt is positioned in continuous milliseconds, so a
6
- * band is just a recurring time window; this module turns a declarative config
7
- * into a normalized model the renderer can lay columns and snap drags against.
5
+ * A factory's day is split into named time bands (day shift 08:00–20:00, night
6
+ * shift 20:00–08:00 the next day). The Gantt is positioned in continuous
7
+ * milliseconds, so a band is just a recurring time window; this module turns a
8
+ * declarative config into a normalized model the renderer can lay columns and
9
+ * snap drags against.
8
10
  *
9
11
  * Two ideas make cross-midnight shifts a non-problem:
10
12
  *
11
- * - **Shift-day (排班日):** the "day" column does NOT start at calendar
13
+ * - **Shift-day:** the "day" column does NOT start at calendar
12
14
  * midnight but at the configured `dayStart` (e.g. 08:00) and runs a full 24h
13
15
  * to the next `dayStart`. A night shift that crosses 00:00 therefore sits
14
16
  * wholly inside one shift-day column instead of straddling two date cells.
15
17
  *
16
18
  * - **Attribution by start:** a record belongs to the shift-day that contains
17
- * its START instant. The 夜班 starting 6/4 20:00 belongs to 6/4 even though
18
- * it ends 6/5 08:00. {@link shiftDayStart} / {@link bandAt} encode this.
19
+ * its START instant. A night shift starting 6/4 20:00 belongs to 6/4 even
20
+ * though it ends 6/5 08:00. {@link shiftDayStart} / {@link bandAt} encode
21
+ * this.
19
22
  *
20
23
  * Bands are laid out by *cumulative duration* from `dayStart`, never by absolute
21
24
  * clock math, so a band whose `end` < `start` (crosses midnight) needs no
@@ -26,7 +29,7 @@ declare const MS_PER_DAY: number;
26
29
  export interface ShiftBandConfig {
27
30
  /** Stable identifier (e.g. 'day' / 'night'); defaults to `band{index}`. */
28
31
  key?: string;
29
- /** Display label (白班 / 夜班) — already localized by the caller. */
32
+ /** Display label ('Day shift' / 'Night shift') — already localized by the caller. */
30
33
  label: string;
31
34
  /** Band start, 'HH:mm' (24h). */
32
35
  start: string;
@@ -39,13 +42,13 @@ export interface ShiftBandConfig {
39
42
  export interface ShiftSegmentsConfig {
40
43
  /**
41
44
  * Clock time the shift-day begins, 'HH:mm'. The day column starts here and
42
- * runs 24h. Defaults to '00:00' (calendar day). For 8点交接 set '08:00'.
45
+ * runs 24h. Defaults to '00:00' (calendar day). For an 08:00 handover set '08:00'.
43
46
  */
44
47
  dayStart?: string;
45
48
  /** Ordered bands covering the 24h shift-day, beginning at `dayStart`. */
46
49
  bands: ShiftBandConfig[];
47
50
  /**
48
- * Draw the dashed calendar-midnight (日历午夜 0:00) cue inside cross-midnight
51
+ * Draw the dashed calendar-midnight (00:00) cue inside cross-midnight
49
52
  * bands. Defaults to `true`; set `false` to hide it.
50
53
  */
51
54
  showMidnight?: boolean;
@@ -86,8 +89,8 @@ export declare function shiftDayStart(date: Date, dayStartMin: number): Date;
86
89
  /**
87
90
  * The band a START instant falls into, by cumulative duration from its
88
91
  * shift-day start. Used both to tint/label columns and to derive the band of a
89
- * record (the 夜班/白班 of `startDateField`). Returns null only for an empty
90
- * model.
92
+ * record (the night/day band of `startDateField`). Returns null only for an
93
+ * empty model.
91
94
  */
92
95
  export declare function bandAt(date: Date, seg: NormShiftSegments): NormShiftBand | null;
93
96
  export { MS_PER_DAY as SHIFT_MS_PER_DAY };
@@ -1 +1 @@
1
- {"version":3,"file":"shifts.d.ts","sourceRoot":"","sources":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E,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAQzE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAC1C,iBAAiB,GAAG,IAAI,CAkB1B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAMnE;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,GAAG,aAAa,GAAG,IAAI,CAU/E;AAED,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,CAAC"}
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  /**
9
- * Resource / workload model (资源/工作负载视图).
9
+ * Resource / workload model.
10
10
  *
11
11
  * Pure, framework-free aggregation that turns a flat task list into a
12
12
  * per-resource, per-time-column load histogram. The renderer (ResourceWorkload)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/plugin-gantt",
3
- "version": "17.5.0",
3
+ "version": "17.6.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Gantt chart plugin for Object UI",
@@ -24,16 +24,16 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@objectstack/spec": "^17.0.0-rc.6",
28
- "lucide-react": "^1.29.0",
29
- "sonner": "^2.0.7",
30
- "@object-ui/components": "17.5.0",
31
- "@object-ui/core": "17.5.0",
32
- "@object-ui/fields": "17.5.0",
33
- "@object-ui/i18n": "17.5.0",
34
- "@object-ui/plugin-detail": "17.5.0",
35
- "@object-ui/react": "17.5.0",
36
- "@object-ui/types": "17.5.0"
27
+ "@objectstack/spec": "^17.0.0",
28
+ "lucide-react": "^1.31.0",
29
+ "sonner": "^2.0.8",
30
+ "@object-ui/components": "17.6.0",
31
+ "@object-ui/core": "17.6.0",
32
+ "@object-ui/fields": "17.6.0",
33
+ "@object-ui/i18n": "17.6.0",
34
+ "@object-ui/plugin-detail": "17.6.0",
35
+ "@object-ui/react": "17.6.0",
36
+ "@object-ui/types": "17.6.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "^18.0.0 || ^19.0.0",