@bryntum/gantt-react-thin 7.1.1

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.
Files changed (40) hide show
  1. package/README.md +52 -0
  2. package/lib/BryntumAssignmentField.d.ts +272 -0
  3. package/lib/BryntumAssignmentField.js +204 -0
  4. package/lib/BryntumAssignmentField.js.map +1 -0
  5. package/lib/BryntumAssignmentGrid.d.ts +836 -0
  6. package/lib/BryntumAssignmentGrid.js +283 -0
  7. package/lib/BryntumAssignmentGrid.js.map +1 -0
  8. package/lib/BryntumCalendarPicker.d.ts +267 -0
  9. package/lib/BryntumCalendarPicker.js +202 -0
  10. package/lib/BryntumCalendarPicker.js.map +1 -0
  11. package/lib/BryntumDependencyField.d.ts +274 -0
  12. package/lib/BryntumDependencyField.js +209 -0
  13. package/lib/BryntumDependencyField.js.map +1 -0
  14. package/lib/BryntumGantt.d.ts +1776 -0
  15. package/lib/BryntumGantt.js +601 -0
  16. package/lib/BryntumGantt.js.map +1 -0
  17. package/lib/BryntumGanttBase.d.ts +1775 -0
  18. package/lib/BryntumGanttBase.js +600 -0
  19. package/lib/BryntumGanttBase.js.map +1 -0
  20. package/lib/BryntumGanttProjectModel.d.ts +306 -0
  21. package/lib/BryntumGanttProjectModel.js +188 -0
  22. package/lib/BryntumGanttProjectModel.js.map +1 -0
  23. package/lib/WrapperHelper.d.ts +26 -0
  24. package/lib/WrapperHelper.js +569 -0
  25. package/lib/WrapperHelper.js.map +1 -0
  26. package/lib/index.d.ts +7 -0
  27. package/lib/index.js +8 -0
  28. package/lib/index.js.map +1 -0
  29. package/license.pdf +0 -0
  30. package/licenses.md +310 -0
  31. package/package.json +25 -0
  32. package/src/BryntumAssignmentField.tsx +1250 -0
  33. package/src/BryntumAssignmentGrid.tsx +2349 -0
  34. package/src/BryntumCalendarPicker.tsx +1231 -0
  35. package/src/BryntumDependencyField.tsx +1272 -0
  36. package/src/BryntumGantt.tsx +4698 -0
  37. package/src/BryntumGanttBase.tsx +4696 -0
  38. package/src/BryntumGanttProjectModel.tsx +1147 -0
  39. package/src/WrapperHelper.tsx +1125 -0
  40. package/src/index.ts +11 -0
@@ -0,0 +1,1147 @@
1
+ /**
2
+ * React wrapper for Bryntum ProjectModel
3
+ */
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ import React, { RefObject } from 'react';
6
+ import { Base, DurationUnit, Model, ModelConfig, StateTrackingManager as CoreStateTrackingManager, Store, StoreConfig } from '@bryntum/core-thin';
7
+ import { AbstractCrudManager, CrudManagerRequestResponse, CrudManagerStoreDescriptor, LazyLoadCrudManagerRequestParams, TimeRangeModel, TimeRangeModelConfig, TimeRangeStore, TimeRangeStoreConfig, TimeSpan, TimeSpanConfig } from '@bryntum/scheduler-thin';
8
+ import { EventSegmentModel, StateTrackingManagerConfig } from '@bryntum/schedulerpro-thin';
9
+ import { AssignmentModel, AssignmentModelConfig, AssignmentStore, AssignmentStoreConfig, CalendarManagerStore, CalendarManagerStoreConfig, CalendarModel, CalendarModelConfig, DependencyModel, DependencyModelConfig, DependencyStore, DependencyStoreConfig, ProjectModel, ProjectModelListeners, ResourceModel, ResourceModelConfig, ResourceStore, ResourceStoreConfig, TaskModel, TaskModelConfig, TaskStore, TaskStoreConfig } from '@bryntum/gantt-thin';
10
+
11
+ import { createWidget, shouldComponentUpdate, processWidgetContent } from './WrapperHelper.js';
12
+
13
+ export type BryntumGanttProjectModelProps = {
14
+ // Configs
15
+ /**
16
+ * If this flag is set to `true` (default) when a start/end date is set on the event, a corresponding
17
+ * `start-no-earlier/later-than` constraint is added, automatically. This is done in order to
18
+ * keep the event "attached" to this date, according to the user intention.
19
+ * ...
20
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-addConstraintOnDateSet)
21
+ */
22
+ addConstraintOnDateSet? : boolean
23
+ /**
24
+ * This config manages DST correction in the scheduling engine. It only has effect when DST transition hour is
25
+ * working time. Usually DST transition occurs on Sunday, so with non working weekends the DST correction logic
26
+ * is not involved.
27
+ * ...
28
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-adjustDurationToDST)
29
+ */
30
+ adjustDurationToDST? : boolean
31
+ /**
32
+ * If this field is set to `true` scheduling conflicts
33
+ * will include an additional resolution option to "postpone" the conflict resolution.
34
+ * The conflict then is stored in the task
35
+ * [postponedConflict](https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel#field-postponedConflict) field
36
+ * and can be visualized with the [TaskInfoColumn](https://bryntum.com/products/gantt/docs/api/Gantt/column/TaskInfoColumn).
37
+ * ...
38
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-allowPostponedConflicts)
39
+ */
40
+ allowPostponedConflicts? : boolean
41
+ /**
42
+ * The constructor of the assignment model class, to be used in the project. Will be set as the [modelClass](https://bryntum.com/products/gantt/docs/api/Core/data/Store#config-modelClass)
43
+ * property of the [assignmentStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-assignmentStore)
44
+ */
45
+ assignmentModelClass? : typeof AssignmentModel
46
+ /**
47
+ * Data use to fill the [assignmentStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-assignmentStore). Should be an array of
48
+ * [AssignmentModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/AssignmentModel) or its configuration objects.
49
+ */
50
+ assignments? : AssignmentModel[]|AssignmentModelConfig[]
51
+ /**
52
+ * The initial data, to fill the [assignmentStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-assignmentStore) with.
53
+ * Should be an array of [AssignmentModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/AssignmentModel) or configuration objects.
54
+ * @deprecated 6.3.0 Use [assignments](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-assignments) instead
55
+ */
56
+ assignmentsData? : AssignmentModelConfig[]|AssignmentModel[]
57
+ /**
58
+ * An [AssignmentStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/AssignmentStore) instance or a config object.
59
+ */
60
+ assignmentStore? : AssignmentStore|AssignmentStoreConfig
61
+ /**
62
+ * The constructor to create a dependency store instance with. Should be a class, subclassing the [AssignmentStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/AssignmentStore)
63
+ */
64
+ assignmentStoreClass? : typeof AssignmentStore
65
+ /**
66
+ * `true` to enable automatic [% done](https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel#field-percentDone) calculation for summary
67
+ * tasks, `false` to disable it.
68
+ */
69
+ autoCalculatePercentDoneForParentTasks? : boolean
70
+ /**
71
+ * Specify `true` to automatically call [load](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-load) method on the next frame after creation.
72
+ * ...
73
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-autoLoad)
74
+ */
75
+ autoLoad? : boolean
76
+ /**
77
+ * When `true` (default) adjacent or overlapping task segments get merged automatically.
78
+ */
79
+ autoMergeAdjacentSegments? : boolean
80
+ /**
81
+ * If this field is set to `true` scheduling conflicts
82
+ * will not show the conflict resolution popup but instead will be saved into
83
+ * tasks [postponedConflict](https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel#field-postponedConflict) field.
84
+ * ...
85
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-autoPostponeConflicts)
86
+ */
87
+ autoPostponeConflicts? : boolean
88
+ /**
89
+ * If this field is set to `true` scheduling conflicts
90
+ * will not show the conflict resolution popup but instead will be saved into
91
+ * tasks [postponedConflict](https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel#field-postponedConflict) field.
92
+ * @deprecated Please use [autoPostponeConflicts](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#field-autoPostponeConflicts) field name.
93
+ */
94
+ autoPostponedConflicts? : boolean
95
+ /**
96
+ * When this flag is enabled (default), manually scheduled tasks are scheduled automatically on the 2nd scheduling pass.
97
+ * This is a backward pass ("late" start/end dates) for forward-scheduled project and forward pass
98
+ * ("early" start/end dates) for backward-scheduled project. Because of it, manually scheduled tasks
99
+ * may have non-zero slack.
100
+ * ...
101
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-autoScheduleManualTasksOnSecondPass)
102
+ */
103
+ autoScheduleManualTasksOnSecondPass? : boolean
104
+ /**
105
+ * When set to `true`, pins a task at its starting date. Otherwise, it is rescheduled to the
106
+ * project's starting date if there is no predecessor or constraint supplied.
107
+ * ...
108
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-autoSetConstraints)
109
+ */
110
+ autoSetConstraints? : boolean
111
+ /**
112
+ * `true` to automatically persist store changes after edits are made in any of the stores monitored.
113
+ * Please note that sync request will not be invoked immediately but only after
114
+ * [autoSyncTimeout](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#config-autoSyncTimeout) interval.
115
+ */
116
+ autoSync? : boolean
117
+ /**
118
+ * The timeout in milliseconds to wait before persisting changes to the server.
119
+ * Used when [autoSync](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#config-autoSync) is set to `true`.
120
+ */
121
+ autoSyncTimeout? : number
122
+ /**
123
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
124
+ * hierarchy when triggered.
125
+ * ...
126
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-bubbleEvents)
127
+ */
128
+ bubbleEvents? : object
129
+ /**
130
+ * Enables backward compatible conflicts postponing logic
131
+ * covering only conflicts between a task constraint and its incoming dependencies.
132
+ * @deprecated The flag is added as a temporary solution and is going to be removed in a next release. Please contact us if you need that old behavior.
133
+ */
134
+ bwcConflictPostpone? : boolean
135
+ /**
136
+ * The project calendar.
137
+ */
138
+ calendar? : string|CalendarModelConfig|CalendarModel
139
+ /**
140
+ * A [CalendarManagerStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/CalendarManagerStore) instance or a config object.
141
+ */
142
+ calendarManagerStore? : CalendarManagerStore|CalendarManagerStoreConfig
143
+ /**
144
+ * The constructor to create a calendar store instance with. Should be a class, subclassing the [CalendarManagerStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/CalendarManagerStore)
145
+ */
146
+ calendarManagerStoreClass? : typeof CalendarManagerStore
147
+ /**
148
+ * The constructor of the calendar model class, to be used in the project. Will be set as the [modelClass](https://bryntum.com/products/gantt/docs/api/Core/data/Store#config-modelClass)
149
+ * property of the [calendarManagerStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-calendarManagerStore)
150
+ */
151
+ calendarModelClass? : typeof CalendarModel
152
+ /**
153
+ * Data use to fill the [calendarManagerStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-calendarManagerStore). Should be a
154
+ * [CalendarModel](https://bryntum.com/products/gantt/docs/api/Gantt/model/CalendarModel) array or its configuration objects.
155
+ */
156
+ calendars? : CalendarModel[]|CalendarModelConfig[]
157
+ /**
158
+ * The initial data, to fill the [calendarManagerStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-calendarManagerStore) with.
159
+ * Should be an array of [CalendarModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/CalendarModel) or configuration objects.
160
+ * @deprecated 6.3.0 Use [calendars](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-calendars) instead
161
+ */
162
+ calendarsData? : CalendarModelConfig[]|CalendarModel[]
163
+ /**
164
+ * Set to `true` to call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
165
+ * ...
166
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-callOnFunctions)
167
+ */
168
+ callOnFunctions? : boolean
169
+ /**
170
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
171
+ * application state is undefined. Code which follows the event handler will *not* be executed.
172
+ * ...
173
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-catchEventHandlerExceptions)
174
+ */
175
+ catchEventHandlerExceptions? : boolean
176
+ /**
177
+ * Child nodes. To allow loading children on demand, specify `children : true` in your data. Omit the field for leaf
178
+ * tasks.
179
+ * ...
180
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-children)
181
+ */
182
+ children? : boolean|object[]|Model[]|ModelConfig[]
183
+ /**
184
+ * Sets the list of stores controlled by the CRUD manager.
185
+ * ...
186
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-crudStores)
187
+ */
188
+ crudStores? : Store[]|string[]|CrudManagerStoreDescriptor[]|StoreConfig[]
189
+ /**
190
+ * The number of days per month.
191
+ * ...
192
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-daysPerMonth)
193
+ */
194
+ daysPerMonth? : number
195
+ /**
196
+ * The number of days per week.
197
+ * ...
198
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-daysPerWeek)
199
+ */
200
+ daysPerWeek? : number
201
+ /**
202
+ * Enables early rendering in Gantt, by postponing calculations to after the first refresh.
203
+ * ...
204
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-delayCalculation)
205
+ */
206
+ delayCalculation? : boolean
207
+ /**
208
+ * Data use to fill the [dependencyStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-dependencyStore). Should be an array of
209
+ * [DependencyModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/DependencyModel) or its configuration objects.
210
+ */
211
+ dependencies? : DependencyModel[]|DependencyModelConfig[]
212
+ /**
213
+ * The source of the calendar for dependencies (the calendar used for taking dependencies lag into account).
214
+ * Possible values are:
215
+ * ...
216
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-dependenciesCalendar)
217
+ */
218
+ dependenciesCalendar? : 'ToEvent'|'FromEvent'|'Project'|'AllWorking'
219
+ /**
220
+ * The initial data, to fill the [dependencyStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-dependencyStore) with.
221
+ * Should be an array of [DependencyModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/DependencyModel) or configuration objects.
222
+ * @deprecated 6.3.0 Use [dependencies](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-dependencies) instead
223
+ */
224
+ dependenciesData? : DependencyModelConfig[]|DependencyModel[]
225
+ /**
226
+ * The constructor of the dependency model class, to be used in the project. Will be set as the [modelClass](https://bryntum.com/products/gantt/docs/api/Core/data/Store#config-modelClass)
227
+ * property of the [dependencyStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-dependencyStore)
228
+ */
229
+ dependencyModelClass? : typeof DependencyModel
230
+ /**
231
+ * A [DependencyStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/DependencyStore) instance or a config object.
232
+ */
233
+ dependencyStore? : DependencyStore|DependencyStoreConfig
234
+ /**
235
+ * The constructor to create a dependency store instance with. Should be a class, subclassing the [DependencyStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/DependencyStore)
236
+ */
237
+ dependencyStoreClass? : typeof DependencyStore
238
+ /**
239
+ * Description of the project
240
+ */
241
+ description? : string
242
+ /**
243
+ * The scheduling direction of the project tasks.
244
+ * The `Forward` direction corresponds to the As-Soon-As-Possible (ASAP) scheduling,
245
+ * `Backward` - to As-Late-As-Possible (ALAP).
246
+ * ...
247
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-direction)
248
+ */
249
+ direction? : 'Forward'|'Backward'
250
+ /**
251
+ * Set to `true` to enable calculation progress notifications.
252
+ * When enabled, the project fires [progress](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-progress) events and the Gantt chart load mask reacts by showing a progress bar for the Engine calculations.
253
+ * ...
254
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-enableProgressNotifications)
255
+ */
256
+ enableProgressNotifications? : boolean
257
+ /**
258
+ * Configuration of the JSON encoder used by the *Crud Manager*.
259
+ */
260
+ encoder? : {
261
+ requestData?: object
262
+ }
263
+ /**
264
+ * End date of the project in the ISO 8601 format.
265
+ * The value is calculated as the latest date among all tasks.
266
+ * ...
267
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-endDate)
268
+ */
269
+ endDate? : string|Date
270
+ /**
271
+ * Alias to [tasksData](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-tasksData).
272
+ * @deprecated 6.3.0 Use [tasks](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-tasks) instead
273
+ */
274
+ eventsData? : TaskModelConfig[]|TaskModel[]
275
+ /**
276
+ * A [TaskStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/TaskStore) instance or a config object.
277
+ */
278
+ eventStore? : TaskStore|TaskStoreConfig
279
+ /**
280
+ * Start expanded or not (only valid for tree data)
281
+ */
282
+ expanded? : boolean
283
+ /**
284
+ * Specify as `true` to force sync requests to be sent when calling `sync()`, even if there are no local
285
+ * changes. Useful in a polling scenario, to keep client up to date with the backend.
286
+ */
287
+ forceSync? : boolean
288
+ /**
289
+ * The number of hours per day.
290
+ * ...
291
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-hoursPerDay)
292
+ */
293
+ hoursPerDay? : number
294
+ /**
295
+ * Unique identifier for the record. Might be mapped to another dataSource using idField, but always exposed as
296
+ * record.id. Will get a generated value if none is specified in records data.
297
+ * ...
298
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-id)
299
+ */
300
+ id? : string|number
301
+ /**
302
+ * <strong>This option is experimental and subject for possible change</strong>.
303
+ * ...
304
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-ignoreConstraintsOnConflictDuringSecondPass)
305
+ * @deprecated The option is no longer needed since the code now by default ignores conflicts faced on the second pass.
306
+ */
307
+ ignoreConstraintsOnConflictDuringSecondPass? : boolean
308
+ /**
309
+ * Set to `true` to make STM ignore changes coming from the backend. This will allow user to only undo redo
310
+ * local changes.
311
+ */
312
+ ignoreRemoteChangesInSTM? : boolean
313
+ /**
314
+ * Whether to include "As soon as possible" and "As late as possible" in the list of the constraints,
315
+ * for compatibility with the MS Project. Enabled by default.
316
+ * ...
317
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-includeAsapAlapAsConstraints)
318
+ */
319
+ includeAsapAlapAsConstraints? : boolean
320
+ /**
321
+ * Set to `false` to only include the id of a removed parent node in the request to the backend (also
322
+ * affects programmatic calls to get [changes](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#property-changes) etc.), and not the ids of its children.
323
+ * ...
324
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-includeChildrenInRemoveRequest)
325
+ */
326
+ includeChildrenInRemoveRequest? : boolean
327
+ /**
328
+ * Whether to include legacy data properties in the JSON / inlineData output. The legacy data properties are
329
+ * the `xxData` (`eventsData`, `resourcesData` etc.) properties that are deprecated and will be removed in
330
+ * the future.
331
+ * @deprecated 6.3.0 This config will be removed when the eventsData, resourcesData etc. properties are removed in a future release.
332
+ */
333
+ includeLegacyDataProperties? : boolean
334
+ /**
335
+ * This field is added to the class at runtime when the Store is configured with
336
+ * [lazyLoad](https://bryntum.com/products/gantt/docs/api/Core/data/Store#config-lazyLoad). If set on a parent record at load time, that parent will not cause any
337
+ * more child load requests. If omitted, it will be automatically set to `true` when a load request receives fewer
338
+ * child records than requested.
339
+ * ...
340
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-isFullyLoaded)
341
+ */
342
+ isFullyLoaded? : boolean
343
+ /**
344
+ * Project data as a JSON string, used to populate its stores.
345
+ * ...
346
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-json)
347
+ */
348
+ json? : string
349
+ /**
350
+ * If set to `true`, or a config object, this makes the CrudManager load records only when needed. When a record
351
+ * or a date range that is not already loaded is requested, a load request will be made to the specified URL.
352
+ * More more details about lazy loading, see the [guide](https://bryntum.com/products/gantt/docs/api/Grid/guides/data/lazyloading.md)
353
+ * @param {object} lazyLoad Lazy load config
354
+ * @param {number} lazyLoad.chunkSize The number of records to be loaded before and after the requested index (only affects the ResourceStore).
355
+ * @param {DurationUnit} bufferUnit Used together with bufferAmount to calculate the start and end dates of each load request. The value is added to the current visible start or end date. Defaults to the visible time span length (does not affect ResourceStore).
356
+ * @param {number} bufferAmount See `bufferUnit`
357
+ */
358
+ lazyLoad? : boolean|{lazyLoad: { chunkSize: number }, bufferUnit: DurationUnit, bufferAmount: number}
359
+ /**
360
+ * The listener set for this object.
361
+ * ...
362
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-listeners)
363
+ */
364
+ listeners? : ProjectModelListeners
365
+ /**
366
+ * Convenience shortcut to set only the url to load from, when you do not need to supply any other config
367
+ * options in the `load` section of the `transport` config.
368
+ * ...
369
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-loadUrl)
370
+ */
371
+ loadUrl? : string
372
+ /**
373
+ * Maximum range the project calendars can iterate.
374
+ * The value is defined in milliseconds and by default equals `5 years` roughly.
375
+ * ...
376
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-maxCalendarRange)
377
+ */
378
+ maxCalendarRange? : number
379
+ /**
380
+ * The maximum number of *critical paths* to collect in [criticalPaths](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-criticalPaths).
381
+ * When critical tasks connectivity is high (there are many of such tasks having many
382
+ * critical predecessors) the tasks might produce a huge number of critical paths which
383
+ * can't really be handled by a browser.
384
+ * So this value limits the number of paths to collect to protect from such cases.
385
+ * ...
386
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-maxCriticalPathsCount)
387
+ */
388
+ maxCriticalPathsCount? : number
389
+ /**
390
+ * Name of the project
391
+ */
392
+ name? : string
393
+ /**
394
+ * This is a read-only field provided in server synchronization packets to specify
395
+ * which position the node takes in the parent's ordered children array.
396
+ * This index is set on load and gets updated on reordering nodes in tree. Sorting and filtering
397
+ * have no effect on it.
398
+ */
399
+ orderedParentIndex? : number
400
+ /**
401
+ * The number of Resource records each page should contain, when using [remotePaging](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/mixin/LazyLoadCrudManager#config-remotePaging)
402
+ */
403
+ pageSize? : number
404
+ /**
405
+ * This is a read-only field provided in server synchronization packets to specify
406
+ * which record id is the parent of the record.
407
+ */
408
+ parentId? : string|number|null
409
+ /**
410
+ * This is a read-only field provided in server synchronization packets to specify
411
+ * which position the node takes in the parent's children array.
412
+ * This index is set on load and gets updated automatically after row reordering, sorting, etc.
413
+ * To save the order, need to persist the field on the server and when data is fetched to be loaded,
414
+ * need to sort by this field.
415
+ */
416
+ parentIndex? : number
417
+ /**
418
+ * Field name to be used to transfer a phantom record identifier.
419
+ */
420
+ phantomIdField? : string
421
+ /**
422
+ * Field name to be used to transfer a phantom parent record identifier.
423
+ */
424
+ phantomParentIdField? : string
425
+ /**
426
+ * Flag the record as read-only on the UI level, preventing the end user from manipulating it using editing
427
+ * features such as cell editing and event dragging.
428
+ * ...
429
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-readOnly)
430
+ */
431
+ readOnly? : boolean
432
+ /**
433
+ * This field is added to the class at runtime when the Store is configured with
434
+ * [lazyLoad](https://bryntum.com/products/gantt/docs/api/Core/data/Store#config-lazyLoad). The
435
+ * number specified should reflect the <strong>total</strong> amount of children of a parent node, including nested descendants.
436
+ * @deprecated This field has been deprecated. Please read the [guide](https://bryntum.com/products/gantt/docs/api/Grid/guides/data/lazyloading.md) to find out if your app needs to use the new [isFullyLoaded](https://bryntum.com/products/gantt/docs/api/Core/data/mixin/TreeNode#field-isFullyLoaded) field.
437
+ */
438
+ remoteChildCount? : number
439
+ /**
440
+ * If set to `true`, this makes the CrudManager load pages of data, instead of loading the complete dataset at
441
+ * once. The requests made to the [loadUrl](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#config-loadUrl) will contain
442
+ * params with info about the current dataset being requested:
443
+ * ...
444
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-remotePaging)
445
+ */
446
+ remotePaging? : boolean
447
+ /**
448
+ * When the CrudManager/Project is configured with [lazyLoad](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/mixin/LazyLoadCrudManager#config-lazyLoad) set to `true`, you can configure
449
+ * your own data fetching logic by implementing this function. Doing this will override the built-in fetching
450
+ * mechanism using the [loadUrl](https://bryntum.com/products/gantt/docs/api/Scheduler/data/CrudManager#config-loadUrl).
451
+ * ...
452
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-requestData)
453
+ * @param {LazyLoadCrudManagerRequestParams} params Object containing info of what data is requested
454
+ * @returns {CrudManagerRequestResponse}
455
+ */
456
+ requestData? : (params: LazyLoadCrudManagerRequestParams) => Promise<CrudManagerRequestResponse>
457
+ /**
458
+ * `True` to reset identifiers (defined by `idField` config) of phantom records before submitting them
459
+ * to the server.
460
+ */
461
+ resetIdsBeforeSync? : boolean
462
+ /**
463
+ * Set to `true` to reset the undo/redo queues of the internal [StateTrackingManager](https://bryntum.com/products/gantt/docs/api/Core/data/stm/StateTrackingManager)
464
+ * after the Project has loaded. Defaults to `false`
465
+ */
466
+ resetUndoRedoQueuesAfterLoad? : boolean
467
+ /**
468
+ * The constructor of the resource model class, to be used in the project. Will be set as the [modelClass](https://bryntum.com/products/gantt/docs/api/Core/data/Store#config-modelClass)
469
+ * property of the [resourceStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-resourceStore)
470
+ */
471
+ resourceModelClass? : typeof ResourceModel
472
+ /**
473
+ * Data use to fill the [resourceStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-resourceStore). Should be an array of
474
+ * [ResourceModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/ResourceModel) or its configuration objects.
475
+ */
476
+ resources? : ResourceModel[]|ResourceModelConfig[]
477
+ /**
478
+ * The initial data, to fill the [resourceStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-resourceStore) with.
479
+ * Should be an array of [ResourceModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/ResourceModel) or configuration objects.
480
+ * @deprecated 6.3.0 Use [resources](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-resources) instead
481
+ */
482
+ resourcesData? : ResourceModelConfig[]|ResourceModel[]
483
+ /**
484
+ * A [ResourceStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/ResourceStore) instance or a config object.
485
+ */
486
+ resourceStore? : ResourceStore|ResourceStoreConfig
487
+ /**
488
+ * The constructor to create a dependency store instance with. Should be a class, subclassing the [ResourceStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/ResourceStore)
489
+ */
490
+ resourceStoreClass? : typeof ResourceStore
491
+ /**
492
+ * Experimental hook that lets the app determine if a bound dataset needs syncing with the store or not, and
493
+ * if it does - which records that should be processed. Only called for stores that are configured with
494
+ * `syncDataOnLoad: true` (which is the default in the React, Angular and Vue wrappers).
495
+ * ...
496
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-shouldSyncDataOnLoad)
497
+ * @param {object} options Options passed by the store to this hook
498
+ * @param {Core.data.Store} options.store Store about to be synced
499
+ * @param {Core.data.Model} options.records Records currently in the store
500
+ * @param {object[]} options.data Incoming data
501
+ * @returns {Set<any>,boolean} Return `false` to prevent the store from syncing, or a set of record ids that need further processing (for records that has some kind of change, eg. an update, removal or addition)
502
+ */
503
+ shouldSyncDataOnLoad? : (options: { store: Store, records: Model, data: object[] }) => Set<any>|boolean
504
+ /**
505
+ * Silences propagations caused by the project loading.
506
+ * ...
507
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-silenceInitialCommit)
508
+ */
509
+ silenceInitialCommit? : boolean
510
+ /**
511
+ * When `true` the project's manually scheduled tasks duration will include only working periods of time.
512
+ * When `false` such tasks will ignore working time calendars and treat all intervals as working.
513
+ * ...
514
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-skipNonWorkingTimeInDurationWhenSchedulingManually)
515
+ */
516
+ skipNonWorkingTimeInDurationWhenSchedulingManually? : boolean
517
+ /**
518
+ * When `true` the project manually scheduled tasks will adjust their proposed start/end dates
519
+ * to skip non working time.
520
+ * ...
521
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-skipNonWorkingTimeWhenSchedulingManually)
522
+ */
523
+ skipNonWorkingTimeWhenSchedulingManually? : boolean
524
+ /**
525
+ * When `true` treats parsed responses without `success` property as successful.
526
+ * In this mode a parsed response is treated as invalid if it has explicitly set `success : false`.
527
+ */
528
+ skipSuccessProperty? : boolean
529
+ /**
530
+ * Start date of the project in the ISO 8601 format. Setting this date will constrain all other tasks in the
531
+ * project to start no earlier than it.
532
+ * ...
533
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-startDate)
534
+ */
535
+ startDate? : string|Date
536
+ /**
537
+ * Specifies how started tasks are scheduled. Possible values are:
538
+ * ...
539
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-startedTaskScheduling)
540
+ */
541
+ startedTaskScheduling? : string
542
+ /**
543
+ * The status date of the project. It is just a date, that sets a reference point to various reporting facilities,
544
+ * like [ProgressLine](https://bryntum.com/products/gantt/docs/api/Gantt/feature/ProgressLine) or [PlannedPercentDoneColumn](#Gantt/column/PlannedPercentDoneColumn).
545
+ * ...
546
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-statusDate)
547
+ */
548
+ statusDate? : Date
549
+ /**
550
+ * Configuration options to provide to the STM manager
551
+ */
552
+ stm? : StateTrackingManagerConfig|CoreStateTrackingManager
553
+ /**
554
+ * Name of a store property to retrieve store identifiers from. Make sure you have an instance of a
555
+ * store to use it by id. Store identifier is used as a container name holding corresponding store data
556
+ * while transferring them to/from the server. By default, `id` property is used. And in case a
557
+ * container identifier has to differ this config can be used:
558
+ * ...
559
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-storeIdProperty)
560
+ */
561
+ storeIdProperty? : string
562
+ /**
563
+ * When `true` the Crud Manager does not require all updated and removed records to be mentioned in the
564
+ * *sync* response. In this case response should include only server side changes.
565
+ * ...
566
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-supportShortSyncResponse)
567
+ */
568
+ supportShortSyncResponse? : boolean
569
+ /**
570
+ * An array of store identifiers sets an alternative sync responses apply order.
571
+ * By default, the order in which sync responses are applied to the stores is the same as they
572
+ * registered in. But in case of some tricky dependencies between stores this order can be changed:
573
+ * ...
574
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-syncApplySequence)
575
+ */
576
+ syncApplySequence? : string[]|CrudManagerStoreDescriptor[]
577
+ /**
578
+ * Convenience shortcut to set only the url to sync to, when you do not need to supply any other config
579
+ * options in the `sync` section of the `transport` config.
580
+ * ...
581
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-syncUrl)
582
+ */
583
+ syncUrl? : string
584
+ /**
585
+ * The constructor of the event model class, to be used in the project. Will be set as the [modelClass](https://bryntum.com/products/gantt/docs/api/Core/data/Store#config-modelClass)
586
+ * property of the [eventStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-eventStore)
587
+ */
588
+ taskModelClass? : typeof TaskModel
589
+ /**
590
+ * Data use to fill the [taskStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-taskStore). Should be an array of
591
+ * [TaskModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel) or its configuration objects.
592
+ */
593
+ tasks? : TaskModel[]|TaskModelConfig[]
594
+ /**
595
+ * The initial data, to fill the [taskStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-taskStore) with.
596
+ * Should be an array of [TaskModels](https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel) or configuration objects.
597
+ * @deprecated 6.3.0 Use [tasks](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-tasks) instead
598
+ */
599
+ tasksData? : TaskModelConfig[]|TaskModel[]
600
+ /**
601
+ * An alias for the [eventStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-eventStore).
602
+ */
603
+ taskStore? : TaskStore|TaskStoreConfig
604
+ /**
605
+ * The constructor to create an task store instance with. Should be a class, subclassing the [TaskStore](https://bryntum.com/products/gantt/docs/api/Gantt/data/TaskStore)
606
+ */
607
+ taskStoreClass? : typeof TaskStore
608
+ /**
609
+ * Data use to fill the [timeRangeStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-timeRangeStore). Should be an array of
610
+ * [TimeRangeModels](https://bryntum.com/products/gantt/docs/api/Scheduler/model/TimeRangeModel) or its configuration objects.
611
+ */
612
+ timeRanges? : TimeRangeModel[]|TimeRangeModelConfig[]
613
+ /**
614
+ * The initial data, to fill the [timeRangeStore](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#property-timeRangeStore) with.
615
+ * Should be an array of [TimeRangeModels](https://bryntum.com/products/gantt/docs/api/Scheduler/model/TimeRangeModel) or configuration objects.
616
+ * @deprecated 6.3.0 Use [timeRanges](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-timeRanges) instead
617
+ */
618
+ timeRangesData? : TimeSpanConfig[]|TimeSpan[]
619
+ /**
620
+ * Store that holds time ranges - instances of [TimeRangeModel](https://bryntum.com/products/gantt/docs/api/Scheduler/model/TimeRangeModel) for the
621
+ * [TimeRanges](https://bryntum.com/products/gantt/docs/api/Scheduler/feature/TimeRanges) feature. A store will be automatically created if none is specified.
622
+ */
623
+ timeRangeStore? : TimeRangeStoreConfig|TimeRangeStore
624
+ /**
625
+ * Set to a IANA time zone (i.e. `Europe/Stockholm`) or a UTC offset in minutes (i.e. `-120`). This will
626
+ * convert all events, tasks and time ranges to the specified time zone or offset. It will also affect the
627
+ * displayed timeline's headers as well at the start and end date of it.
628
+ * ...
629
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-timeZone)
630
+ */
631
+ timeZone? : string|number
632
+ /**
633
+ * Specifies the output format of [toJSON](https://bryntum.com/products/gantt/docs/api/Scheduler/model/mixin/ProjectModelCommon#function-toJSON).
634
+ * ...
635
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-toJSONResultFormat)
636
+ */
637
+ toJSONResultFormat? : 'inlineData'|'model'
638
+ /**
639
+ * If `true`, project [changes](https://bryntum.com/products/gantt/docs/api/SchedulerPro/data/mixin/ProjectCrudManager#property-changes) API will also report project model changes: start/end date,
640
+ * calendar, effort, duration, etc.
641
+ */
642
+ trackProjectModelChanges? : boolean
643
+ /**
644
+ * When `true` forces the CRUD manager to process responses depending on their `type` attribute.
645
+ * So `load` request may be responded with `sync` response for example.
646
+ * Can be used for smart server logic allowing the server to decide when it's better to respond with a
647
+ * complete data set (`load` response) or it's enough to return just a delta (`sync` response).
648
+ */
649
+ trackResponseType? : boolean
650
+ /**
651
+ * Configuration of the AJAX requests used by *Crud Manager* to communicate with a server-side.
652
+ * ...
653
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-transport)
654
+ */
655
+ transport? : {
656
+ load?: object
657
+ sync?: object
658
+ }
659
+ /**
660
+ * By default, the stores of a project use the raw data objects passed to them as the data source for their
661
+ * records if data is loaded remotely (using an `AjaxStore` or a `CrudManager`). For data supplied inline,
662
+ * the data objects are instead by default cloned to avoid the original data object being modified by the
663
+ * store.
664
+ * ...
665
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-useRawData)
666
+ */
667
+ useRawData? : boolean
668
+ /**
669
+ * This config validates the response structure for requests made by the Crud Manager.
670
+ * When `true`, the Crud Manager checks every parsed response structure for errors
671
+ * and if the response format is invalid, a warning is logged to the browser console.
672
+ * ...
673
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-validateResponse)
674
+ */
675
+ validateResponse? : boolean
676
+ /**
677
+ * `true` to write all fields from the record to the server.
678
+ * If set to `false` it will only send the fields that were modified.
679
+ * Note that any fields that have [persist](https://bryntum.com/products/gantt/docs/api/Core/data/field/DataField#config-persist) set to `false` will
680
+ * still be ignored and fields having [alwaysWrite](https://bryntum.com/products/gantt/docs/api/Core/data/field/DataField#config-alwaysWrite) set to `true`
681
+ * will always be included.
682
+ */
683
+ writeAllFields? : boolean
684
+
685
+ // Events
686
+ /**
687
+ * Fires before an object is destroyed.
688
+ * @param {object} event Event object
689
+ * @param {Core.Base} event.source The Object that is being destroyed.
690
+ */
691
+ onBeforeDestroy? : ((event: { source: Base }) => void)|string
692
+ /**
693
+ * Fires before [load request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-load) is sent. Return `false` to cancel load request.
694
+ * @param {object} event Event object
695
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
696
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
697
+ */
698
+ onBeforeLoad? : ((event: { source: AbstractCrudManager, pack: object }) => Promise<boolean>|boolean|void)|string
699
+ /**
700
+ * Fires before loaded data get applied to the stores. Return `false` to prevent data applying.
701
+ * This event can be used for server data preprocessing. To achieve it user can modify the `response` object.
702
+ * @param {object} event Event object
703
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
704
+ * @param {object} event.response The decoded server response object.
705
+ * @param {object} event.options Options provided to the [load](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-load) method.
706
+ */
707
+ onBeforeLoadApply? : ((event: { source: AbstractCrudManager, response: object, options: object }) => Promise<boolean>|boolean|void)|string
708
+ /**
709
+ * Fires before server response gets applied to the stores. Return `false` to prevent data applying.
710
+ * This event can be used for server data preprocessing. To achieve it user can modify the `response` object.
711
+ * @param {object} event Event object
712
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
713
+ * @param {'sync','load'} event.requestType The request type (`sync` or `load`).
714
+ * @param {object} event.response The decoded server response object.
715
+ */
716
+ onBeforeResponseApply? : ((event: { source: AbstractCrudManager, requestType: 'sync'|'load', response: object }) => Promise<boolean>|boolean|void)|string
717
+ /**
718
+ * Fires before a request is sent to the server.
719
+ * ...
720
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-beforeSend)
721
+ * @param {object} event Event object
722
+ * @param {Scheduler.crud.AbstractCrudManager} event.crudManager The CRUD manager.
723
+ * @param {object} event.params HTTP request params to be passed in the request URL.
724
+ * @param {'sync','load'} event.requestType CrudManager request type (`load`/`sync`)
725
+ * @param {object} event.requestConfig Configuration object for Ajax request call
726
+ */
727
+ onBeforeSend? : ((event: { crudManager: AbstractCrudManager, params: object, requestType: 'sync'|'load', requestConfig: object }) => Promise<void>)|string
728
+ /**
729
+ * Fires before [sync request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync) is sent. Return `false` to cancel sync request.
730
+ * ...
731
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-beforeSync)
732
+ * @param {object} event Event object
733
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
734
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
735
+ */
736
+ onBeforeSync? : ((event: { source: AbstractCrudManager, pack: object }) => Promise<boolean>|boolean|void)|string
737
+ /**
738
+ * Fires before sync response data get applied to the stores. Return `false` to prevent data applying.
739
+ * This event can be used for server data preprocessing. To achieve it user can modify the `response` object.
740
+ * @param {object} event Event object
741
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
742
+ * @param {object} event.response The decoded server response object.
743
+ */
744
+ onBeforeSyncApply? : ((event: { source: AbstractCrudManager, response: object }) => Promise<boolean>|boolean|void)|string
745
+ /**
746
+ * Fires when any other event is fired from the object.
747
+ * ...
748
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-catchAll)
749
+ * @param {object} event Event object
750
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
751
+ * @param {string} event.event.type The type of the event which is caught by the listener
752
+ */
753
+ onCatchAll? : ((event: {[key: string]: any, type: string}) => void)|string
754
+ /**
755
+ * Fired when data in any of the projects stores changes.
756
+ * ...
757
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-change)
758
+ * @param {object} event Event object
759
+ * @param {Gantt.model.ProjectModel} event.source This project
760
+ * @param {Core.data.Store} event.store Affected store
761
+ * @param {'remove','removeAll','add','clearchanges','filter','update','dataset','replace'} event.action Name of action which triggered the change. May be one of the options listed above.
762
+ * @param {Core.data.Model} event.record Changed record, for actions that affects exactly one record (`'update'`)
763
+ * @param {Core.data.Model[]} event.records Changed records, passed for all actions except `'removeAll'`
764
+ * @param {object} event.changes Passed for the `'update'` action, info on which record fields changed
765
+ */
766
+ onChange? : ((event: { source: ProjectModel, store: Store, action: 'remove'|'removeAll'|'add'|'clearchanges'|'filter'|'update'|'dataset'|'replace', record: Model, records: Model[], changes: object }) => void)|string
767
+ /**
768
+ * Fired when the Engine detects a computation cycle.
769
+ * @param {object} event Event object
770
+ * @param {object} event.schedulingIssue Scheduling error describing the case:
771
+ * @param {Function} event.schedulingIssue.getDescription Returns the cycle description
772
+ * @param {object} event.schedulingIssue.cycle Object providing the cycle info
773
+ * @param {Function} event.schedulingIssue.getResolutions Returns possible resolutions
774
+ * @param {Function} event.continueWithResolutionResult Function to call after a resolution is chosen to proceed with the Engine calculations: ```javascript project.on('cycle', ({ continueWithResolutionResult }) => { // cancel changes in case of a cycle continueWithResolutionResult(EffectResolutionResult.Cancel); }) ``` Where `EffectResolutionResult.Cancel` results in cancelling the changes.
775
+ */
776
+ onCycle? : ((event: { schedulingIssue: { getDescription: Function, cycle: object, getResolutions: Function }, continueWithResolutionResult: Function }) => void)|string
777
+ /**
778
+ * Fired when the engine has finished its calculations and the results has been written back to the records.
779
+ * ...
780
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-dataReady)
781
+ * @param {object} event Event object
782
+ * @param {Gantt.model.ProjectModel} event.source The project
783
+ * @param {boolean} event.isInitialCommit Flag that shows if this commit is initial
784
+ * @param {Set<any>} event.records Set of all [Model](https://bryntum.com/products/gantt/docs/api/Core/data/Model)s that were modified in the completed transaction. Use the [modifications](https://bryntum.com/products/gantt/docs/api/Core/data/Model#property-modifications) property of each Model to identify modified fields.
785
+ */
786
+ onDataReady? : ((event: { source: ProjectModel, isInitialCommit: boolean, records: Set<any> }) => void)|string
787
+ /**
788
+ * Fires when an object is destroyed.
789
+ * @param {object} event Event object
790
+ * @param {Core.Base} event.source The Object that is being destroyed.
791
+ */
792
+ onDestroy? : ((event: { source: Base }) => void)|string
793
+ /**
794
+ * Fired when the Engine detects a calendar misconfiguration when the calendar does
795
+ * not provide any working periods of time which makes usage impossible.
796
+ * @param {object} event Event object
797
+ * @param {object} event.schedulingIssue Scheduling error describing the case:
798
+ * @param {Function} event.schedulingIssue.getDescription Returns the error description
799
+ * @param {Function} event.schedulingIssue.getCalendar Returns the calendar that must be fixed
800
+ * @param {Function} event.schedulingIssue.getResolutions Returns possible resolutions
801
+ * @param {Function} event.continueWithResolutionResult Function to call after a resolution is chosen to proceed with the Engine calculations: ```javascript project.on('emptyCalendar', ({ schedulingIssue, continueWithResolutionResult }) => { // apply the first resolution and continue schedulingIssue.getResolutions()[0].resolve(); continueWithResolutionResult(EffectResolutionResult.Resume); }) ```
802
+ */
803
+ onEmptyCalendar? : ((event: { schedulingIssue: { getDescription: Function, getCalendar: Function, getResolutions: Function }, continueWithResolutionResult: Function }) => void)|string
804
+ /**
805
+ * Fires when data in any of the registered data stores is changed.
806
+ * ...
807
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-hasChanges)
808
+ * @param {object} event Event object
809
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
810
+ */
811
+ onHasChanges? : ((event: { source: AbstractCrudManager }) => void)|string
812
+ /**
813
+ * Fires on successful [load request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-load) completion after data gets loaded to the stores.
814
+ * @param {object} event Event object
815
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
816
+ * @param {object} event.response The decoded server response object.
817
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
818
+ * @param {object} event.requestOptions The request options passed to the request.
819
+ * @param {Response} event.rawResponse The native Response object
820
+ */
821
+ onLoad? : ((event: { source: AbstractCrudManager, response: object, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string
822
+ /**
823
+ * Fired after [load request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-load) was canceled by some [beforeLoad](#Scheduler/crud/AbstractCrudManagerMixin#event-beforeLoad)
824
+ * listener or due to incomplete prior load request.
825
+ * @param {object} event Event object
826
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
827
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
828
+ */
829
+ onLoadCanceled? : ((event: { source: AbstractCrudManager, pack: object }) => void)|string
830
+ /**
831
+ * Fires when a [load request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-load) fails.
832
+ * @param {object} event Event object
833
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager instance.
834
+ * @param {object} event.response The decoded server response object.
835
+ * @param {string} event.responseText The raw server response text
836
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
837
+ * @param {object} event.requestOptions The request options passed to the request.
838
+ * @param {Response} event.rawResponse The native Response object
839
+ */
840
+ onLoadFail? : ((event: { source: AbstractCrudManager, response: object, responseText: string, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string
841
+ /**
842
+ * Fires when registered stores get into state when they don't have any
843
+ * not persisted change. This happens after [load](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-load) or [sync](#Scheduler/crud/AbstractCrudManagerMixin#function-sync) request
844
+ * completion. Or this may happen after a record update which turns its fields back to their original state.
845
+ * ...
846
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-noChanges)
847
+ * @param {object} event Event object
848
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
849
+ */
850
+ onNoChanges? : ((event: { source: AbstractCrudManager }) => void)|string
851
+ /**
852
+ * Fired during the Engine calculation if [enableProgressNotifications](https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#config-enableProgressNotifications) config is `true`
853
+ * @param {object} event Event object
854
+ * @param {Gantt.model.ProjectModel} event.source The owning project
855
+ * @param {number} event.total The total number of operations
856
+ * @param {number} event.remaining The number of remaining operations
857
+ * @param {'storePopulation','propagating'} event.phase The phase of the calculation, either 'storePopulation' when data is getting loaded, or 'propagating' when data is getting calculated
858
+ */
859
+ onProgress? : ((event: { source: ProjectModel, total: number, remaining: number, phase: 'storePopulation'|'propagating' }) => void)|string
860
+ /**
861
+ * Fires on successful request completion after data gets applied to the stores.
862
+ * @param {object} event Event object
863
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
864
+ * @param {'sync','load'} event.requestType The request type (`sync` or `load`).
865
+ * @param {object} event.response The decoded server response object.
866
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
867
+ * @param {object} event.requestOptions The request options passed to the request.
868
+ * @param {Response} event.rawResponse The native Response object
869
+ */
870
+ onRequestDone? : ((event: { source: AbstractCrudManager, requestType: 'sync'|'load', response: object, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string
871
+ /**
872
+ * Fires when a request fails.
873
+ * @param {object} event Event object
874
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager instance.
875
+ * @param {'sync','load'} event.requestType The request type (`sync` or `load`).
876
+ * @param {object} event.response The decoded server response object.
877
+ * @param {string} event.responseText The raw server response text
878
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
879
+ * @param {object} event.requestOptions The request options passed to the request.
880
+ * @param {Response} event.rawResponse The native Response object
881
+ */
882
+ onRequestFail? : ((event: { source: AbstractCrudManager, requestType: 'sync'|'load', response: object, responseText: string, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string
883
+ /**
884
+ * This event triggers when a new revision is added to the project. It is used to notify the backend about the
885
+ * new revision.
886
+ * @param {object} event Event object
887
+ * @param {string} event.localRevisionId ID of the local revision. Backend should send it in the broadcast channel
888
+ * @param {string} event.conflictResolutionFor ID of the revision with a conflict which was resolved by this revision
889
+ * @param {string} event.clientId ID of the client instance. Used to distinguish own revisions from the broadcast channel
890
+ * @param {object} event.changes Object with changes constituting revision
891
+ */
892
+ onRevisionNotification? : ((event: { localRevisionId: string, conflictResolutionFor?: string, clientId: string, changes: object }) => void)|string
893
+ /**
894
+ * Fired when the Engine detects a scheduling conflict.
895
+ * @param {object} event Event object
896
+ * @param {object} event.schedulingIssue The conflict details:
897
+ * @param {Function} event.schedulingIssue.getDescription Returns the conflict description
898
+ * @param {object[]} event.schedulingIssue.intervals Array of conflicting intervals
899
+ * @param {Function} event.schedulingIssue.getResolutions Function to get possible resolutions
900
+ * @param {Function} event.continueWithResolutionResult Function to call after a resolution is chosen to proceed with the Engine calculations: ```javascript project.on('schedulingConflict', ({ schedulingIssue, continueWithResolutionResult }) => { // apply the first resolution and continue schedulingIssue.getResolutions()[0].resolve(); continueWithResolutionResult(EffectResolutionResult.Resume); }) ``` Where `EffectResolutionResult.Resume` results in a resolution being applied and current transaction should be continued.
901
+ */
902
+ onSchedulingConflict? : ((event: { schedulingIssue: { getDescription: Function, intervals: object[], getResolutions: Function }, continueWithResolutionResult: Function }) => void)|string
903
+ /**
904
+ * Fires on successful [sync request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync) completion.
905
+ * @param {object} event Event object
906
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
907
+ * @param {object} event.response The decoded server response object.
908
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
909
+ * @param {object} event.requestOptions The request options passed to the request.
910
+ * @param {Response} event.rawResponse The native Response object
911
+ */
912
+ onSync? : ((event: { source: AbstractCrudManager, response: object, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string
913
+ /**
914
+ * Fires after [sync request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync) was canceled by some [beforeSync](#Scheduler/crud/AbstractCrudManagerMixin#event-beforeSync) listener.
915
+ * @param {object} event Event object
916
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
917
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
918
+ */
919
+ onSyncCanceled? : ((event: { source: AbstractCrudManager, pack: object }) => void)|string
920
+ /**
921
+ * Fires after [sync request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync) was delayed due to incomplete previous one.
922
+ * @param {object} event Event object
923
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
924
+ * @param {object} event.arguments The arguments of [sync](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync) call.
925
+ */
926
+ onSyncDelayed? : ((event: { source: AbstractCrudManager, arguments: object }) => void)|string
927
+ /**
928
+ * Fires when a [sync request](https://bryntum.com/products/gantt/docs/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync) fails.
929
+ * @param {object} event Event object
930
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager instance.
931
+ * @param {object} event.response The decoded server response object.
932
+ * @param {string} event.responseText The raw server response text
933
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
934
+ * @param {object} event.requestOptions The request options passed to the request.
935
+ * @param {Response} event.rawResponse The native Response object
936
+ */
937
+ onSyncFail? : ((event: { source: AbstractCrudManager, response: object, responseText: string, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string
938
+
939
+ }
940
+
941
+ export class BryntumGanttProjectModel extends React.Component<BryntumGanttProjectModelProps> {
942
+
943
+ static instanceClass = ProjectModel;
944
+
945
+ static instanceName = 'ProjectModel';
946
+
947
+ processWidgetContent = processWidgetContent;
948
+
949
+ dataStores = {
950
+ 'assignmentStore': 'assignments',
951
+ 'calendarManagerStore': 'calendars',
952
+ 'dependencyStore': 'dependencies',
953
+ 'eventStore': 'events',
954
+ 'resourceStore': 'resources',
955
+ 'taskStore': 'tasks',
956
+ 'timeRangeStore': 'timeRanges'
957
+ };
958
+
959
+ static configNames = [
960
+ 'adjustDurationToDST',
961
+ 'assignmentModelClass',
962
+ 'assignmentsData',
963
+ 'assignmentStoreClass',
964
+ 'autoLoad',
965
+ 'autoSetConstraints',
966
+ 'autoSync',
967
+ 'autoSyncTimeout',
968
+ 'bubbleEvents',
969
+ 'bwcConflictPostpone',
970
+ 'calendarManagerStoreClass',
971
+ 'calendarModelClass',
972
+ 'calendarsData',
973
+ 'children',
974
+ 'delayCalculation',
975
+ 'dependenciesData',
976
+ 'dependencyModelClass',
977
+ 'dependencyStoreClass',
978
+ 'encoder',
979
+ 'eventsData',
980
+ 'expanded',
981
+ 'includeAsapAlapAsConstraints',
982
+ 'includeChildrenInRemoveRequest',
983
+ 'listeners',
984
+ 'maxCalendarRange',
985
+ 'orderedParentIndex',
986
+ 'pageSize',
987
+ 'parentIndex',
988
+ 'phantomIdField',
989
+ 'phantomParentIdField',
990
+ 'remotePaging',
991
+ 'requestData',
992
+ 'resetIdsBeforeSync',
993
+ 'resetUndoRedoQueuesAfterLoad',
994
+ 'resourceModelClass',
995
+ 'resourcesData',
996
+ 'resourceStoreClass',
997
+ 'silenceInitialCommit',
998
+ 'skipSuccessProperty',
999
+ 'storeIdProperty',
1000
+ 'supportShortSyncResponse',
1001
+ 'taskModelClass',
1002
+ 'tasksData',
1003
+ 'taskStoreClass',
1004
+ 'timeRangesData',
1005
+ 'toJSONResultFormat',
1006
+ 'trackResponseType',
1007
+ 'transport',
1008
+ 'useRawData',
1009
+ 'validateResponse',
1010
+ 'writeAllFields'
1011
+ ];
1012
+
1013
+ static propertyConfigNames = [
1014
+ 'addConstraintOnDateSet',
1015
+ 'allowPostponedConflicts',
1016
+ 'assignments',
1017
+ 'assignmentStore',
1018
+ 'autoCalculatePercentDoneForParentTasks',
1019
+ 'autoMergeAdjacentSegments',
1020
+ 'autoPostponeConflicts',
1021
+ 'autoPostponedConflicts',
1022
+ 'autoScheduleManualTasksOnSecondPass',
1023
+ 'calendar',
1024
+ 'calendarManagerStore',
1025
+ 'calendars',
1026
+ 'callOnFunctions',
1027
+ 'catchEventHandlerExceptions',
1028
+ 'crudStores',
1029
+ 'daysPerMonth',
1030
+ 'daysPerWeek',
1031
+ 'dependencies',
1032
+ 'dependenciesCalendar',
1033
+ 'dependencyStore',
1034
+ 'description',
1035
+ 'direction',
1036
+ 'enableProgressNotifications',
1037
+ 'endDate',
1038
+ 'eventStore',
1039
+ 'forceSync',
1040
+ 'hoursPerDay',
1041
+ 'id',
1042
+ 'ignoreConstraintsOnConflictDuringSecondPass',
1043
+ 'ignoreRemoteChangesInSTM',
1044
+ 'includeLegacyDataProperties',
1045
+ 'isFullyLoaded',
1046
+ 'json',
1047
+ 'lazyLoad',
1048
+ 'loadUrl',
1049
+ 'maxCriticalPathsCount',
1050
+ 'name',
1051
+ 'onBeforeDestroy',
1052
+ 'onBeforeLoad',
1053
+ 'onBeforeLoadApply',
1054
+ 'onBeforeResponseApply',
1055
+ 'onBeforeSend',
1056
+ 'onBeforeSync',
1057
+ 'onBeforeSyncApply',
1058
+ 'onCatchAll',
1059
+ 'onChange',
1060
+ 'onCycle',
1061
+ 'onDataReady',
1062
+ 'onDestroy',
1063
+ 'onEmptyCalendar',
1064
+ 'onHasChanges',
1065
+ 'onLoad',
1066
+ 'onLoadCanceled',
1067
+ 'onLoadFail',
1068
+ 'onNoChanges',
1069
+ 'onProgress',
1070
+ 'onRequestDone',
1071
+ 'onRequestFail',
1072
+ 'onRevisionNotification',
1073
+ 'onSchedulingConflict',
1074
+ 'onSync',
1075
+ 'onSyncCanceled',
1076
+ 'onSyncDelayed',
1077
+ 'onSyncFail',
1078
+ 'parentId',
1079
+ 'readOnly',
1080
+ 'remoteChildCount',
1081
+ 'resources',
1082
+ 'resourceStore',
1083
+ 'shouldSyncDataOnLoad',
1084
+ 'skipNonWorkingTimeInDurationWhenSchedulingManually',
1085
+ 'skipNonWorkingTimeWhenSchedulingManually',
1086
+ 'startDate',
1087
+ 'startedTaskScheduling',
1088
+ 'statusDate',
1089
+ 'stm',
1090
+ 'syncApplySequence',
1091
+ 'syncUrl',
1092
+ 'tasks',
1093
+ 'taskStore',
1094
+ 'timeRanges',
1095
+ 'timeRangeStore',
1096
+ 'timeZone',
1097
+ 'trackProjectModelChanges'
1098
+ ];
1099
+
1100
+ static propertyNames = [
1101
+ 'allChildren',
1102
+ 'allUnfilteredChildren',
1103
+ 'criticalPaths',
1104
+ 'descendantCount',
1105
+ 'hasGeneratedId',
1106
+ 'inlineData',
1107
+ 'internalId',
1108
+ 'isCommitting',
1109
+ 'isCreating',
1110
+ 'isValid',
1111
+ 'previousSiblingsTotalCount',
1112
+ 'segmentModelClass',
1113
+ 'visibleDescendantCount'
1114
+ ];
1115
+
1116
+ // Component instance
1117
+ instance!: ProjectModel;
1118
+
1119
+ // Component element
1120
+ element! : HTMLElement;
1121
+
1122
+ componentDidMount(): void {
1123
+ this.instance = createWidget(this);
1124
+ }
1125
+
1126
+ componentWillUnmount(): void {
1127
+ // @ts-ignore
1128
+ this.instance?.destroy?.();
1129
+ }
1130
+
1131
+ /**
1132
+ * Component about to be updated, from changing a prop using state.
1133
+ * React to it depending on what changed and prevent react from re-rendering our component.
1134
+ * @param nextProps
1135
+ * @param nextState
1136
+ * @returns {boolean}
1137
+ */
1138
+ shouldComponentUpdate(nextProps: Readonly<BryntumGanttProjectModelProps>, nextState: Readonly<{}>): boolean {
1139
+ return shouldComponentUpdate(this, nextProps, nextState);
1140
+ }
1141
+
1142
+ render(): React.ReactNode {
1143
+
1144
+ return null
1145
+
1146
+ }
1147
+ }