@object-ui/plugin-gantt 17.5.0 → 17.7.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
@@ -24,12 +24,20 @@ export type SchedLinkType = 'fs' | 'ss' | 'ff' | 'sf';
24
24
  /**
25
25
  * Working-calendar model. When supplied to the scheduling functions, durations
26
26
  * are measured in *working* days and rescheduled tasks never start on a
27
- * non-working day. Days are evaluated at UTC midnight granularity.
27
+ * non-working day. Days are the chart's LOCAL calendar days — the days
28
+ * `GanttView` draws its columns on (display space, which a business
29
+ * `timeZone` makes that zone's wall clock), and the days its own column fold
30
+ * (`isWorkingColumn`) keys weekends and holidays by.
31
+ *
32
+ * They were UTC days until objectui#10866. That agreed with a date-only value
33
+ * only while the value was READ as UTC midnight; it now reads as local
34
+ * midnight of its day, and a UTC floor put a rescheduled successor on the
35
+ * previous calendar day in every zone but UTC.
28
36
  */
29
37
  export interface WorkingCalendar {
30
38
  /** Treat Saturday/Sunday as non-working. */
31
39
  skipWeekends?: boolean;
32
- /** ISO `yyyy-mm-dd` (UTC) keys to treat as non-working (holidays). */
40
+ /** ISO `yyyy-mm-dd` calendar-day keys to treat as non-working (holidays). */
33
41
  holidays?: Set<string>;
34
42
  }
35
43
  export interface SchedulableTask {
@@ -43,7 +51,7 @@ export interface SchedulableTask {
43
51
  parent?: string | number | null;
44
52
  type?: string;
45
53
  /**
46
- * Row-level lock (仅查看). A locked task is never moved by the reschedule;
54
+ * Row-level lock (view-only row). A locked task is never moved by the reschedule;
47
55
  * when it VIOLATES a link it is reported in `skippedLocked` instead.
48
56
  */
49
57
  locked?: boolean;
@@ -87,9 +95,9 @@ export interface RescheduleOptions {
87
95
  */
88
96
  summaryExtent?: 'children' | 'self';
89
97
  /**
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).
98
+ * Snap a computed start instant onto a grid — e.g. shift-band boundaries, so
99
+ * a pushed task never starts mid-band. Must return an instant `>=` the input
100
+ * (this is forward-only; snapping may only push later).
93
101
  * Applied only to tasks that actually move, and only in non-calendar mode
94
102
  * (a WorkingCalendar already owns the day-granularity snapping).
95
103
  */
@@ -99,7 +107,7 @@ export interface RescheduleResult {
99
107
  changes: RescheduleChange[];
100
108
  /**
101
109
  * Tasks that VIOLATE a link but stayed put because they are locked
102
- * (仅查看). Lets the UI report "N skipped" honestly instead of implying
110
+ * (view-only rows). Lets the UI report "N skipped" honestly instead of implying
103
111
  * the schedule is fully repaired.
104
112
  */
105
113
  skippedLocked: string[];
@@ -112,7 +120,7 @@ export interface RescheduleResult {
112
120
  * Summary handling follows {@link RescheduleOptions.summaryExtent}: rollup
113
121
  * summaries are fixed predecessor nodes; self-dated summaries move and carry
114
122
  * 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
123
+ * links keeps the later position — forward-only, so max wins). The cascade is a
116
124
  * single forward pass: carried positions don't re-propagate through links,
117
125
  * matching the function's minimal-repair pragmatism (no constraint solver).
118
126
  *
@@ -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,4CA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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/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":["../src/shifts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,QAAA,MAAM,UAAU,QAAuB,CAAC;AAGxC,uD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ACH,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"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * "Shifted clock" for business-time-zone rendering: translate
10
+ * real instants into a display space where the browser's local clock reads
11
+ * the CONFIGURED zone's wall time. All existing local-clock logic — shift
12
+ * bands, day columns, snapping, the today line, date labels — then renders
13
+ * that zone correctly for every viewer. `from` translates an emitted date
14
+ * back into the real instant, which is what a `datetime` field persists.
15
+ * `to` and `from` read each zone's offset at the instant they are handed, so
16
+ * they are exact inverses except near a DST change of the configured zone or
17
+ * the viewer's, where they can disagree by an hour: `to(from(midnight))` can
18
+ * then be 23:00 of the day before. A `datetime` value takes the shim as it is.
19
+ * A date-only value is a calendar day, not an instant (objectui#10866), so
20
+ * `ObjectGantt` does not round-trip it: it hands the view the instant
21
+ * {@link invertTo} finds for the day's local midnight, and writes a dropped
22
+ * `date` field as the day of the display date {@link invertFrom} recovers,
23
+ * never as an instant (`readTaskDate`, `toStoredDateValue`).
24
+ */
25
+ export declare function makeTzShift(timeZone?: string): {
26
+ delta: number;
27
+ to: (d: Date) => Date;
28
+ from: (d: Date) => Date;
29
+ now: () => Date;
30
+ };
31
+ /** The part of a shim the two inverses below read. */
32
+ type Shim = Pick<ReturnType<typeof makeTzShift>, 'delta' | 'to' | 'from'>;
33
+ /**
34
+ * The instant a shim's `to` maps EXACTLY onto `display`: how `ObjectGantt`
35
+ * hands `GanttView` a date-only day, so the bar is drawn from that day's local
36
+ * midnight in the view's display space on a DST day too (objectui#10866),
37
+ * where `from(display)` is drawn from 23:00 of the day before or 01:00. When
38
+ * `to` maps no instant onto that midnight (for example, the chart zone's
39
+ * clocks change at 00:00 that day), an instant it maps a step later, 01:00 of
40
+ * that day for an hour's step. The identity shim hands `display` back.
41
+ */
42
+ export declare function invertTo(shift: Shim, display: Date): Date;
43
+ /**
44
+ * The display-space `Date` a shim's `from` was handed, recovered EXACTLY from
45
+ * the instant it returned: how `ObjectGantt` reads the day a `date` field was
46
+ * dropped on (objectui#10866), where `to(instant)` can fall on 23:00 of the
47
+ * day before. Where `from` maps two display instants an hour apart onto one
48
+ * instant, the later is taken: the two sit on either side of the chart zone's
49
+ * clock stepping forward against the viewer's, and when that step falls at a
50
+ * display midnight, a day dropped there is the later one.
51
+ * The identity shim hands `instant` back.
52
+ */
53
+ export declare function invertFrom(shift: Shim, instant: Date): Date;
54
+ export {};
55
+ //# sourceMappingURL=tzShift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tzShift.d.ts","sourceRoot":"","sources":["../src/tzShift.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA4BH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,IAAI,CAAC;CACjB,CAkBA;AAED,sDAAsD;AACtD,KAAK,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;AA8C1E;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,CAE3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGanttTranslation.d.ts","sourceRoot":"","sources":["../src/useGanttTranslation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6F7D,CAAC;AA4BF,wBAAgB,mBAAmB;aAqBjB,MAAM,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAM;;EAMnE"}
1
+ {"version":3,"file":"useGanttTranslation.d.ts","sourceRoot":"","sources":["../src/useGanttTranslation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsG7D,CAAC;AAwCF,wBAAgB,mBAAmB;aAqBjB,MAAM,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAM;;EAMnE"}
@@ -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.7.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Gantt chart plugin for Object UI",
@@ -24,16 +24,17 @@
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.5.0",
28
+ "lucide-react": "^1.43.0",
29
+ "sonner": "^2.0.8",
30
+ "@object-ui/components": "17.7.0",
31
+ "@object-ui/core": "17.7.0",
32
+ "@object-ui/fields": "17.7.0",
33
+ "@object-ui/i18n": "17.7.0",
34
+ "@object-ui/permissions": "17.7.0",
35
+ "@object-ui/plugin-detail": "17.7.0",
36
+ "@object-ui/react": "17.7.0",
37
+ "@object-ui/types": "17.7.0"
37
38
  },
38
39
  "peerDependencies": {
39
40
  "react": "^18.0.0 || ^19.0.0",
@@ -45,7 +46,9 @@
45
46
  "@vitejs/plugin-react": "^6.0.5",
46
47
  "typescript": "^6.0.3",
47
48
  "vite": "^8.2.1",
48
- "vite-plugin-dts": "^5.0.3"
49
+ "vite-plugin-dts": "^5.0.3",
50
+ "@object-ui/test-support": "17.4.0",
51
+ "@object-ui/sdui-parser": "17.7.0"
49
52
  },
50
53
  "keywords": [
51
54
  "objectui",
@@ -72,8 +75,8 @@
72
75
  ],
73
76
  "scripts": {
74
77
  "build": "vite build",
75
- "test": "vitest run",
76
- "test:watch": "vitest",
78
+ "test": "vitest run --root ../.. packages/plugin-gantt/",
79
+ "test:watch": "vitest --root ../.. packages/plugin-gantt/",
77
80
  "type-check": "tsc --noEmit && tsc -p tsconfig.test.json",
78
81
  "lint": "eslint ."
79
82
  }