@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,138 @@
|
|
|
1
1
|
# @object-ui/plugin-gantt
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7cf4051: chore(deps): align every `@objectstack/*` dependency to `^16.0.0-rc.0`
|
|
8
|
+
|
|
9
|
+
Bumps `@objectstack/spec` / `client` / `formula` / `lint` from `^15.1.1` to the
|
|
10
|
+
`16.0.0-rc.0` pre-release across the workspace (root + `apps/console` +
|
|
11
|
+
`apps/site` + all consuming packages). ObjectUI's own packages are already on
|
|
12
|
+
major 16, so this closes the 15↔16 skew between ObjectUI and the `@objectstack`
|
|
13
|
+
contract libraries (which publish in lockstep with `spec`).
|
|
14
|
+
|
|
15
|
+
This is a dependency alignment, not a behavioral migration: the full workspace
|
|
16
|
+
build (43/43) and the `@objectstack`-consuming package test suites
|
|
17
|
+
(`core` / `app-shell` / `data-objectstack` / `plugin-form` / `types`) are green
|
|
18
|
+
against `16.0.0-rc.0` with no source changes required.
|
|
19
|
+
|
|
20
|
+
Practical effect: `@objectstack/client@16.0.0-rc.0` now ships
|
|
21
|
+
`data.batchTransaction` (framework #3271), so `ObjectStackAdapter`'s feature
|
|
22
|
+
detect (`typeof client.data.batchTransaction === 'function'`) routes
|
|
23
|
+
master-detail cross-object saves through the typed SDK method instead of the
|
|
24
|
+
raw `fetch('/api/v1/batch')` fallback — realizing the "verify SDK path" half of
|
|
25
|
+
#2694. The raw-fetch branch stays as a defensive fallback (removal tracked in
|
|
26
|
+
#2694).
|
|
27
|
+
|
|
28
|
+
- 803558e: feat(data): thread the host's authenticated fetch into `provider: 'api'` data sources (#2725)
|
|
29
|
+
|
|
30
|
+
`provider: 'api'` view data sources went through a bare `globalThis.fetch`, so
|
|
31
|
+
custom endpoints (gantt composite trees, report aggregates) carried only
|
|
32
|
+
same-origin cookies while every native `/api/v1/*` request carried
|
|
33
|
+
`Authorization: Bearer` — the moment cookie HMAC verification failed (dev
|
|
34
|
+
restart rotating the fallback auth secret, cookie expiry/rotation in prod)
|
|
35
|
+
those views 401'd while the rest of the app kept working.
|
|
36
|
+
|
|
37
|
+
- **`@object-ui/react`** — `SchemaRendererProvider` accepts an optional
|
|
38
|
+
`apiFetch`; nested providers inherit it from their parent so re-wrapped
|
|
39
|
+
subtrees (react pages, preview surfaces) keep the host's authentication.
|
|
40
|
+
`useViewData` defaults the api-provider adapter's fetch to the context
|
|
41
|
+
`apiFetch` (explicit `adapterOptions.fetch` still wins).
|
|
42
|
+
- **`@object-ui/auth`** — `createAuthenticatedFetch` gains a
|
|
43
|
+
`sameOriginOnly` option: cross-origin URLs pass through to the bare fetch
|
|
44
|
+
with no `Authorization` / `X-Tenant-ID` / `Accept-Language`, so metadata-
|
|
45
|
+
supplied third-party URLs never see the platform token.
|
|
46
|
+
- **`@object-ui/app-shell`** — the console wires
|
|
47
|
+
`createAuthenticatedFetch({ sameOriginOnly: true })` (settle-signal wrapped)
|
|
48
|
+
as `apiFetch` on the root `SchemaRendererProvider`.
|
|
49
|
+
- **`@object-ui/plugin-gantt`** — `ObjectGantt` resolves its api-provider
|
|
50
|
+
DataSource with the context `apiFetch`, covering reads and write-backs.
|
|
51
|
+
|
|
52
|
+
Behaviour is unchanged for hosts that don't provide `apiFetch` (bare fetch +
|
|
53
|
+
cookies, as before).
|
|
54
|
+
|
|
55
|
+
- 5606ca8: fix(plugin-gantt): align the task-list header with the row date columns
|
|
56
|
+
|
|
57
|
+
Every data row reserves a trailing w-6 (+4px) slot for the 「→」 open-details
|
|
58
|
+
button whenever `onTaskClick` is live, but the header row didn't — so the
|
|
59
|
+
开始/结束 header labels sat 28px to the right of the date values they caption.
|
|
60
|
+
The header now mirrors the slot under the same condition.
|
|
61
|
+
|
|
62
|
+
- 1100a8b: feat(plugin-gantt)!: remove the 移动端二维码 (mobile QR share) context-menu item
|
|
63
|
+
|
|
64
|
+
The QR-share feature is removed outright: the context-menu item, the QR dialog,
|
|
65
|
+
the `taskUrl` prop on `GanttView`, the URL wiring in `ObjectGantt`, the
|
|
66
|
+
`gantt.menu.qrcode` / `gantt.qr.*` i18n keys (en/zh) and the `qrcode`
|
|
67
|
+
dependency are all deleted. It baked one consumer's app-specific requirement
|
|
68
|
+
(scan-to-open on mobile) into the generic gantt renderer, and what it encoded —
|
|
69
|
+
the desktop console record URL — was not even the right target for that
|
|
70
|
+
requirement. Apps that need scan-to-mobile flows should implement them
|
|
71
|
+
app-side against their own mobile surface.
|
|
72
|
+
|
|
73
|
+
- 7a5750e: chore(lint): clear the baseline lint errors in plugin-gantt (objectui#2713 Wave 3)
|
|
74
|
+
|
|
75
|
+
Wave 3 of the #2713 lint-gate restoration. `@object-ui/plugin-gantt` was red at
|
|
76
|
+
baseline on `main`; cleared every **error** (no behavior change; warnings out of
|
|
77
|
+
scope). 18 of the 21 were in the demo harness:
|
|
78
|
+
|
|
79
|
+
- **`react-hooks/static-components` (demo, ×8)** — the `Swatch` legend cell was
|
|
80
|
+
defined inside `ManufacturingLegend`; hoisted to module scope (purely
|
|
81
|
+
props-driven, so nothing from render scope is captured).
|
|
82
|
+
- **`react-hooks/rules-of-hooks` (demo, ×9)** — `App` had a `?quickfilter=1`
|
|
83
|
+
early return before ~9 hooks; moved that route below all hooks so hook order
|
|
84
|
+
is stable (the quick-filter branch renders `<QuickFilterDemo />` regardless).
|
|
85
|
+
- **`react-hooks/purity` (demo, ×1)** — the demo render-timer necessarily reads
|
|
86
|
+
`performance.now()` during render (paired with an effect that measures elapsed
|
|
87
|
+
ms); justified scoped disable, demo-only.
|
|
88
|
+
- **`object-ui/no-synthetic-event-trigger`** (`GanttView.interactions.test`) —
|
|
89
|
+
the Escape-closes-menu test dispatched a raw `window` `KeyboardEvent`; switched
|
|
90
|
+
to `fireEvent.keyDown(window, { key: 'Escape' })` (the pattern already used
|
|
91
|
+
elsewhere in the same file). The window-level Escape listener behaves
|
|
92
|
+
identically.
|
|
93
|
+
- **`no-useless-assignment`** (`GanttView`, `ObjectGantt`) — dropped two dead
|
|
94
|
+
initializers (`ok`, `options`) that their exhaustive `try`/`catch` and
|
|
95
|
+
`if`/`else` branches overwrite before reading.
|
|
96
|
+
|
|
97
|
+
- Updated dependencies [0318118]
|
|
98
|
+
- Updated dependencies [1c8935a]
|
|
99
|
+
- Updated dependencies [af1b0db]
|
|
100
|
+
- Updated dependencies [8b8b744]
|
|
101
|
+
- Updated dependencies [7cf4051]
|
|
102
|
+
- Updated dependencies [803558e]
|
|
103
|
+
- Updated dependencies [aefcf39]
|
|
104
|
+
- Updated dependencies [2e7d7f0]
|
|
105
|
+
- Updated dependencies [ef14f69]
|
|
106
|
+
- Updated dependencies [94d4876]
|
|
107
|
+
- Updated dependencies [53513a4]
|
|
108
|
+
- Updated dependencies [1100a8b]
|
|
109
|
+
- Updated dependencies [7abe4cd]
|
|
110
|
+
- Updated dependencies [69fa5d1]
|
|
111
|
+
- Updated dependencies [f329ec5]
|
|
112
|
+
- Updated dependencies [549c67d]
|
|
113
|
+
- Updated dependencies [ebe6494]
|
|
114
|
+
- Updated dependencies [2b17339]
|
|
115
|
+
- Updated dependencies [31b77d4]
|
|
116
|
+
- Updated dependencies [6d4fbe6]
|
|
117
|
+
- Updated dependencies [0a3710b]
|
|
118
|
+
- Updated dependencies [f80aaf2]
|
|
119
|
+
- Updated dependencies [62b9ab5]
|
|
120
|
+
- Updated dependencies [14cb729]
|
|
121
|
+
- Updated dependencies [1629313]
|
|
122
|
+
- Updated dependencies [29c6040]
|
|
123
|
+
- Updated dependencies [faebac3]
|
|
124
|
+
- Updated dependencies [2331ac9]
|
|
125
|
+
- Updated dependencies [199fa83]
|
|
126
|
+
- Updated dependencies [eee4ded]
|
|
127
|
+
- Updated dependencies [3b2e4d9]
|
|
128
|
+
- @object-ui/fields@16.1.0
|
|
129
|
+
- @object-ui/i18n@16.1.0
|
|
130
|
+
- @object-ui/core@16.1.0
|
|
131
|
+
- @object-ui/types@16.1.0
|
|
132
|
+
- @object-ui/react@16.1.0
|
|
133
|
+
- @object-ui/plugin-detail@16.1.0
|
|
134
|
+
- @object-ui/components@16.1.0
|
|
135
|
+
|
|
3
136
|
## 16.0.0
|
|
4
137
|
|
|
5
138
|
### Patch Changes
|
package/dist/GanttView.d.ts
CHANGED
|
@@ -107,6 +107,21 @@ export type GanttViewMode = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
|
107
107
|
*/
|
|
108
108
|
export declare const NOMINAL_DAYS: Record<GanttViewMode, number>;
|
|
109
109
|
export declare const MS_PER_DAY: number;
|
|
110
|
+
/**
|
|
111
|
+
* "Shifted clock" for business-time-zone rendering (业务时区渲染): translate
|
|
112
|
+
* real instants into a display space where the browser's local clock reads
|
|
113
|
+
* the CONFIGURED zone's wall time. All existing local-clock logic — shift
|
|
114
|
+
* bands, day columns, snapping, the today line, date labels — then renders
|
|
115
|
+
* that zone correctly for every viewer; writes translate back so persisted
|
|
116
|
+
* data stays real instants. Per-instant offsets keep DST zones close;
|
|
117
|
+
* fixed-offset zones (Asia/Shanghai) are exact.
|
|
118
|
+
*/
|
|
119
|
+
export declare function makeTzShift(timeZone?: string): {
|
|
120
|
+
delta: number;
|
|
121
|
+
to: (d: Date) => Date;
|
|
122
|
+
from: (d: Date) => Date;
|
|
123
|
+
now: () => Date;
|
|
124
|
+
};
|
|
110
125
|
/** Floor a date to the start of its column unit (Monday for weeks). */
|
|
111
126
|
export declare function startOfUnit(date: Date, mode: GanttViewMode): Date;
|
|
112
127
|
/** Add whole column units; month/quarter clamp the day (Jan 31 + 1mo = Feb 28). */
|
|
@@ -117,6 +132,23 @@ export interface GanttMarker {
|
|
|
117
132
|
label?: string;
|
|
118
133
|
color?: string;
|
|
119
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Per-interaction switches (交互开关) — the DHTMLX `drag_move` / `drag_resize` /
|
|
137
|
+
* `drag_progress` / `drag_links` model. Each defaults to true; flipping one off
|
|
138
|
+
* hides that affordance everywhere while the others keep working. They only
|
|
139
|
+
* NARROW what the write callbacks / `readOnly` / row locks already allow —
|
|
140
|
+
* never widen.
|
|
141
|
+
*/
|
|
142
|
+
export interface GanttInteractions {
|
|
143
|
+
/** Bar / subtree dragging (move along the timeline). */
|
|
144
|
+
move?: boolean;
|
|
145
|
+
/** Edge resize grips (change duration). */
|
|
146
|
+
resize?: boolean;
|
|
147
|
+
/** The progress drag handle. */
|
|
148
|
+
progress?: boolean;
|
|
149
|
+
/** Dependency UI: drag-to-link dots AND the create/delete menu entries. */
|
|
150
|
+
link?: boolean;
|
|
151
|
+
}
|
|
120
152
|
export interface GanttViewProps {
|
|
121
153
|
tasks: GanttTask[];
|
|
122
154
|
/** Initial timeline granularity (also switchable from the toolbar). */
|
|
@@ -126,13 +158,6 @@ export interface GanttViewProps {
|
|
|
126
158
|
/** Extra vertical marker lines rendered like the Today marker. */
|
|
127
159
|
markers?: GanttMarker[];
|
|
128
160
|
onTaskClick?: (task: GanttTask) => void;
|
|
129
|
-
/**
|
|
130
|
-
* Absolute detail-page URL for a task, used by the context menu's
|
|
131
|
-
* 「移动端二维码」 item (QR + copy link for opening on a phone). Return
|
|
132
|
-
* null/undefined for rows without a detail page (synthetic group rows) to
|
|
133
|
-
* hide the item.
|
|
134
|
-
*/
|
|
135
|
-
taskUrl?: (task: GanttTask) => string | null | undefined;
|
|
136
161
|
onTaskUpdate?: (task: GanttTask, changes: Partial<Pick<GanttTask, 'title' | 'start' | 'end' | 'progress'>>) => void;
|
|
137
162
|
onTaskDelete?: (task: GanttTask) => void;
|
|
138
163
|
/** Notified when the user switches granularity from the toolbar. */
|
|
@@ -274,6 +299,49 @@ export interface GanttViewProps {
|
|
|
274
299
|
onRefresh?: () => void | Promise<void>;
|
|
275
300
|
/** Disables the refresh button while a host-driven reload is in flight. */
|
|
276
301
|
refreshing?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Whether the data source can persist dependency LINK TYPES (fs/ss/ff/sf).
|
|
304
|
+
* Default true. Set false when dependencies are stored as bare predecessor
|
|
305
|
+
* ids (仅存紧前 id,无类型位) — the link context menu then hides the type
|
|
306
|
+
* switcher (a switch would be silently reverted on refetch) and drag-created
|
|
307
|
+
* links are always FS regardless of which endpoints were connected.
|
|
308
|
+
*/
|
|
309
|
+
dependencyTypes?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* Business time zone for rendering (业务时区), an IANA name like
|
|
312
|
+
* 'Asia/Shanghai'. The chart's calendar math — shift bands, day columns,
|
|
313
|
+
* drag snapping, the today line, start/end labels — renders this zone's
|
|
314
|
+
* wall time for EVERY viewer instead of the browser's; without it, a
|
|
315
|
+
* viewer in another zone sees bands and dates shifted (班次错位). Writes
|
|
316
|
+
* still persist real instants. Note: dates handed to `onBeforeTaskUpdate`
|
|
317
|
+
* are in this display space (durations/deltas are unaffected).
|
|
318
|
+
*/
|
|
319
|
+
timeZone?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Base name for exported files (导出文件名), e.g. the view or object label —
|
|
322
|
+
* "排班计划甘特图" exports as `排班计划甘特图-20260719-1530.png`. Falls back
|
|
323
|
+
* to "gantt". The timestamp suffix keeps repeated exports from silently
|
|
324
|
+
* overwriting each other in the Downloads folder.
|
|
325
|
+
*/
|
|
326
|
+
exportFileName?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Per-interaction switches (交互开关). Omit for all-on. See
|
|
329
|
+
* {@link GanttInteractions}: e.g. `{ resize: false }` keeps bars movable and
|
|
330
|
+
* links drawable but pins every duration; `{ link: false }` removes the
|
|
331
|
+
* dependency drag-dots and the create/delete menu entries. Subject to
|
|
332
|
+
* `readOnly` and per-row locks — these switches only narrow.
|
|
333
|
+
*/
|
|
334
|
+
interactions?: GanttInteractions;
|
|
335
|
+
/**
|
|
336
|
+
* Veto hook for task edits (the MS-Project/Bryntum `beforeTaskDrag` /
|
|
337
|
+
* `beforeTaskEdit` pattern). Runs on the central commit path — bar drag,
|
|
338
|
+
* edge resize, group move, progress drag, inline edit, conflict
|
|
339
|
+
* auto-reschedule — AFTER the built-in guards (locked rows never reach it).
|
|
340
|
+
* Return false (sync or async) to cancel that task's update; other tasks in
|
|
341
|
+
* the same batch still apply. Undo/redo bypasses it: restoring a previous
|
|
342
|
+
* state must not be vetoable.
|
|
343
|
+
*/
|
|
344
|
+
onBeforeTaskUpdate?: (task: GanttTask, changes: Partial<Pick<GanttTask, 'title' | 'start' | 'end' | 'progress'>>) => boolean | Promise<boolean>;
|
|
277
345
|
}
|
|
278
346
|
/** Persisted layout snapshot written by the "保存布局" toolbar button. */
|
|
279
347
|
export interface GanttLayout {
|
|
@@ -290,5 +358,5 @@ export interface GanttLayout {
|
|
|
290
358
|
*/
|
|
291
359
|
collapsedIds?: string[];
|
|
292
360
|
}
|
|
293
|
-
export declare function GanttView({ tasks, viewMode: viewModeProp, startDate, endDate, markers, onTaskClick,
|
|
361
|
+
export declare function GanttView({ tasks: tasksProp, viewMode: viewModeProp, startDate: startDateProp, endDate: endDateProp, markers: markersProp, onTaskClick, onTaskUpdate: onTaskUpdateProp, onTaskDelete: onTaskDeleteProp, onViewChange, onDependencyCreate: onDependencyCreateProp, onBeforeDependencyCreate, onDependencyDelete: onDependencyDeleteProp, onTaskReorder: onTaskReorderProp, className, inlineEdit: inlineEditProp, autoSchedule: autoScheduleProp, rescheduleOnConflict: rescheduleOnConflictProp, criticalPathDefault, workingCalendar, shiftSegments, showBaselines, readOnly, mobileReadOnly, groupBy, ungroupedLabel, defaultCollapsedDepth, summaryExtent, persistLayoutKey, onLayoutChange, onRefresh, refreshing, dependencyTypes, timeZone, exportFileName, interactions, onBeforeTaskUpdate, }: GanttViewProps): React.JSX.Element;
|
|
294
362
|
//# sourceMappingURL=GanttView.d.ts.map
|
package/dist/GanttView.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GanttView.d.ts","sourceRoot":"","sources":["../src/GanttView.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"GanttView.d.ts","sourceRoot":"","sources":["../src/GanttView.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA6B9B,OAAO,EAAqF,KAAK,eAAe,EAAiD,MAAM,cAAc,CAAA;AACrL,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAahE;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC,MAAM,GAAG,aAAa,GAAG,cAAc,CAOzC;AAgCD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;AAED,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,qBAAqB,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAEvE,MAAM,WAAW,SAAS;IACxB,EAAE,E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,CAAC,EACxB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,WAAW,EACX,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EACZ,kBAAkB,EAAE,sBAAsB,EAC1C,wBAAwB,EACxB,kBAAkB,EAAE,sBAAsB,EAC1C,aAAa,EAAE,iBAAiB,EAChC,SAAS,EACT,UAAU,EAAE,cAAsB,EAClC,YAAY,EAAE,gBAAwB,EACtC,oBAAoB,EAAE,wBAAgC,EACtD,mBAA2B,EAC3B,eAAe,EACf,aAAa,EACb,aAAoB,EACpB,QAAgB,EAChB,cAAsB,EACtB,OAAO,EACP,cAA4B,EAC5B,qBAAqB,EACrB,aAA0B,EAC1B,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,UAAkB,EAClB,eAAsB,EACtB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,kBAAkB,GACnB,EAAE,cAAc,qBA+tIhB"}
|
package/dist/ObjectGantt.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ObjectGridSchema, DataSource } from '@object-ui/types';
|
|
3
|
-
import { GanttDependency, GanttTaskType } from './GanttView';
|
|
3
|
+
import { GanttTask, GanttDependency, GanttTaskType } from './GanttView';
|
|
4
4
|
/**
|
|
5
5
|
* One quick-filter dimension (快速筛选维度). Generic by design: the page configures
|
|
6
6
|
* which record fields become filter dropdowns; the plugin resolves each one's
|
|
@@ -33,6 +33,13 @@ export interface ObjectGanttProps {
|
|
|
33
33
|
onRowClick?: (record: any) => void;
|
|
34
34
|
onEdit?: (record: any) => void;
|
|
35
35
|
onDelete?: (record: any) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Veto hook for task edits, forwarded to {@link GanttView}. Called with the
|
|
38
|
+
* gantt task and the pending changes on every commit path (drag, resize,
|
|
39
|
+
* group move, progress, inline edit, auto-reschedule); return false (sync or
|
|
40
|
+
* async) to cancel that task's update before it reaches the data source.
|
|
41
|
+
*/
|
|
42
|
+
onBeforeTaskUpdate?: (task: GanttTask, changes: Partial<Pick<GanttTask, 'title' | 'start' | 'end' | 'progress'>>) => boolean | Promise<boolean>;
|
|
36
43
|
}
|
|
37
44
|
export declare const ObjectGantt: React.FC<ObjectGanttProps>;
|
|
38
45
|
//# sourceMappingURL=ObjectGantt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectGantt.d.ts","sourceRoot":"","sources":["../src/ObjectGantt.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"ObjectGantt.d.ts","sourceRoot":"","sources":["../src/ObjectGantt.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAwE,MAAM,OAAO,CAAC;AAE7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAyB,MAAM,kBAAkB,CAAC;AA2B5F,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,eAAe,EAA8C,KAAK,aAAa,EAAsB,MAAM,aAAa,CAAC;AAOlK;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtE;AA0ID,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAUzE;AAiBD,wBAAgB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