@bryntum/taskboard-angular 7.1.1 → 7.1.2

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 (76) hide show
  1. package/README.md +230 -15
  2. package/package.json +1 -1
  3. package/src/lib/bryntum-button-group.component.ts +1213 -0
  4. package/src/lib/bryntum-button.component.ts +1190 -0
  5. package/src/lib/bryntum-chat-panel.component.ts +1435 -0
  6. package/src/lib/bryntum-checkbox-group.component.ts +1478 -0
  7. package/src/lib/bryntum-checkbox.component.ts +1333 -0
  8. package/src/lib/bryntum-chip-view.component.ts +1225 -0
  9. package/src/lib/bryntum-code-editor.component.ts +1419 -0
  10. package/src/lib/bryntum-color-field.component.ts +1334 -0
  11. package/src/lib/bryntum-column-combo.component.ts +1645 -0
  12. package/src/lib/bryntum-column-filter-field.component.ts +1360 -0
  13. package/src/lib/bryntum-column-picker-button.component.ts +1200 -0
  14. package/src/lib/bryntum-column-scroll-button.component.ts +1200 -0
  15. package/src/lib/bryntum-combo.component.ts +1634 -0
  16. package/src/lib/bryntum-container.component.ts +1166 -0
  17. package/src/lib/bryntum-date-field.component.ts +1413 -0
  18. package/src/lib/bryntum-date-picker.component.ts +1756 -0
  19. package/src/lib/bryntum-date-range-field.component.ts +1417 -0
  20. package/src/lib/bryntum-date-time-field.component.ts +1261 -0
  21. package/src/lib/bryntum-demo-code-editor.component.ts +1441 -0
  22. package/src/lib/bryntum-demo-header.component.ts +141 -0
  23. package/src/lib/bryntum-display-field.component.ts +1308 -0
  24. package/src/lib/bryntum-duration-field.component.ts +1390 -0
  25. package/src/lib/bryntum-editor.component.ts +1343 -0
  26. package/src/lib/bryntum-field-filter-picker-group.component.ts +1308 -0
  27. package/src/lib/bryntum-field-filter-picker.component.ts +1272 -0
  28. package/src/lib/bryntum-field-set.component.ts +1408 -0
  29. package/src/lib/bryntum-file-field.component.ts +1313 -0
  30. package/src/lib/bryntum-file-picker.component.ts +1199 -0
  31. package/src/lib/bryntum-filter-field.component.ts +1367 -0
  32. package/src/lib/bryntum-fullscreen-button.component.ts +53 -0
  33. package/src/lib/bryntum-hint.component.ts +1506 -0
  34. package/src/lib/bryntum-label.component.ts +989 -0
  35. package/src/lib/bryntum-list.component.ts +1196 -0
  36. package/src/lib/bryntum-menu.component.ts +1520 -0
  37. package/src/lib/bryntum-month-picker.component.ts +1400 -0
  38. package/src/lib/bryntum-number-field.component.ts +1368 -0
  39. package/src/lib/bryntum-paging-toolbar.component.ts +1243 -0
  40. package/src/lib/bryntum-panel.component.ts +1377 -0
  41. package/src/lib/bryntum-password-field.component.ts +1296 -0
  42. package/src/lib/bryntum-project-combo.component.ts +1648 -0
  43. package/src/lib/bryntum-radio-group.component.ts +1446 -0
  44. package/src/lib/bryntum-radio.component.ts +1333 -0
  45. package/src/lib/bryntum-resources-combo.component.ts +1644 -0
  46. package/src/lib/bryntum-scheduler-project-combo.component.ts +1638 -0
  47. package/src/lib/bryntum-slide-toggle.component.ts +1333 -0
  48. package/src/lib/bryntum-slider.component.ts +1112 -0
  49. package/src/lib/bryntum-splitter.component.ts +1025 -0
  50. package/src/lib/bryntum-swimlane-combo.component.ts +1644 -0
  51. package/src/lib/bryntum-swimlane-filter-field.component.ts +1377 -0
  52. package/src/lib/bryntum-swimlane-picker-button.component.ts +1200 -0
  53. package/src/lib/bryntum-swimlane-scroll-button.component.ts +1200 -0
  54. package/src/lib/bryntum-tab-panel.component.ts +1441 -0
  55. package/src/lib/bryntum-tag-combo.component.ts +1651 -0
  56. package/src/lib/bryntum-task-board-base.component.ts +2388 -0
  57. package/src/lib/bryntum-task-board-field-filter-picker-group.component.ts +1316 -0
  58. package/src/lib/bryntum-task-board-field-filter-picker.component.ts +1254 -0
  59. package/src/lib/bryntum-task-board-project-model.component.ts +1026 -0
  60. package/src/lib/bryntum-task-board.component.ts +2392 -0
  61. package/src/lib/bryntum-task-color-combo.component.ts +1334 -0
  62. package/src/lib/bryntum-task-filter-field.component.ts +1377 -0
  63. package/src/lib/bryntum-text-area-field.component.ts +1312 -0
  64. package/src/lib/bryntum-text-area-picker-field.component.ts +1343 -0
  65. package/src/lib/bryntum-text-field.component.ts +1321 -0
  66. package/src/lib/bryntum-time-field.component.ts +1388 -0
  67. package/src/lib/bryntum-time-picker.component.ts +1207 -0
  68. package/src/lib/bryntum-todo-list-field.component.ts +1318 -0
  69. package/src/lib/bryntum-toolbar.component.ts +1234 -0
  70. package/src/lib/bryntum-undo-redo.component.ts +1179 -0
  71. package/src/lib/bryntum-widget.component.ts +982 -0
  72. package/src/lib/bryntum-year-picker.component.ts +1423 -0
  73. package/src/lib/bryntum-zoom-slider.component.ts +1122 -0
  74. package/src/lib/taskboard.module.ts +232 -0
  75. package/src/lib/wrapper.helper.ts +89 -0
  76. package/src/public-api.ts +77 -0
@@ -0,0 +1,1026 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /**
3
+ * Angular wrapper for Bryntum ProjectModel
4
+ */
5
+
6
+ import { Component, ElementRef, EventEmitter, Output, Input, SimpleChange, SimpleChanges, OnDestroy, OnInit } from '@angular/core';
7
+
8
+ import WrapperHelper from './wrapper.helper';
9
+
10
+ import { AbstractCrudManager, AssignmentModel, AssignmentModelConfig, AssignmentStore, AssignmentStoreConfig, Base, CrudManagerStoreDescriptor, DependencyModel, DependencyModelConfig, DependencyStore, DependencyStoreConfig, EventModel, EventModelConfig, EventStore, EventStoreConfig, Model, ModelConfig, ProjectModel, ProjectModelListeners, ResourceModel, ResourceModelConfig, ResourceStore, ResourceStoreConfig, ResourceTimeRangeModel, ResourceTimeRangeModelConfig, SchedulerProjectModel, StateTrackingManager, StateTrackingManagerConfig, Store, StoreConfig, TaskModel, TaskModelConfig, TaskStore, TaskStoreConfig, TimeRangeModel, TimeRangeModelConfig } from '@bryntum/taskboard';
11
+
12
+ import { StringHelper } from '@bryntum/taskboard';
13
+
14
+ export type BryntumTaskBoardProjectModelProps = {
15
+ // Configs
16
+ /**
17
+ * A flag, indicating whether the dates and duration calculations should adjust the result to DST time shift.
18
+ */
19
+ adjustDurationToDST ? : boolean
20
+ /**
21
+ * The constructor of the assignment model class, to be used in the project. Will be set as the
22
+ * [modelClass](https://bryntum.com/products/taskboard/docs/api/Core/data/Store#config-modelClass) property of the [assignmentStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-assignmentStore)
23
+ */
24
+ assignmentModelClass ? : typeof AssignmentModel
25
+ /**
26
+ * Data use to fill the [assignmentStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-assignmentStore). Should be an array of
27
+ * [AssignmentModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/AssignmentModel) or its configuration objects.
28
+ */
29
+ assignments ? : AssignmentModel[]|AssignmentModelConfig[]
30
+ /**
31
+ * The initial data, to fill the [assignmentStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-assignmentStore) with.
32
+ * Should be an array of [AssignmentModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/AssignmentModel) or its configuration
33
+ * objects.
34
+ * @deprecated 6.3.0 Use [assignments](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#config-assignments) instead
35
+ */
36
+ assignmentsData ? : AssignmentModel[]|AssignmentModelConfig[]
37
+ /**
38
+ * An [AssignmentStore](https://bryntum.com/products/scheduler/docs#Scheduler/data/AssignmentStore) instance or a config object.
39
+ */
40
+ assignmentStore ? : AssignmentStore|AssignmentStoreConfig
41
+ /**
42
+ * The constructor to create an assignment store instance with. Should be a class, subclassing the
43
+ * [AssignmentStore](https://bryntum.com/products/scheduler/docs#Scheduler/data/AssignmentStore)
44
+ */
45
+ assignmentStoreClass ? : typeof AssignmentStore|object
46
+ /**
47
+ * Specify `true` to automatically call [load](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-load) method on the next frame after creation.
48
+ * ...
49
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-autoLoad)
50
+ */
51
+ autoLoad ? : boolean
52
+ /**
53
+ * `true` to automatically persist store changes after edits are made in any of the stores monitored.
54
+ * Please note that sync request will not be invoked immediately but only after
55
+ * [autoSyncTimeout](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#config-autoSyncTimeout) interval.
56
+ */
57
+ autoSync ? : boolean
58
+ /**
59
+ * The timeout in milliseconds to wait before persisting changes to the server.
60
+ * Used when [autoSync](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#config-autoSync) is set to `true`.
61
+ */
62
+ autoSyncTimeout ? : number
63
+ /**
64
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
65
+ * hierarchy when triggered.
66
+ * ...
67
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-bubbleEvents)
68
+ */
69
+ bubbleEvents ? : object
70
+ /**
71
+ * Set to `true` to call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
72
+ * ...
73
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-callOnFunctions)
74
+ */
75
+ callOnFunctions ? : boolean
76
+ /**
77
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
78
+ * application state is undefined. Code which follows the event handler will *not* be executed.
79
+ * ...
80
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-catchEventHandlerExceptions)
81
+ */
82
+ catchEventHandlerExceptions ? : boolean
83
+ /**
84
+ * Child nodes. To allow loading children on demand, specify `children : true` in your data. Omit the field for leaf
85
+ * tasks.
86
+ * ...
87
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-children)
88
+ */
89
+ children ? : boolean|object[]|Model[]|ModelConfig[]
90
+ /**
91
+ * Sets the list of stores controlled by the CRUD manager.
92
+ * ...
93
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-crudStores)
94
+ */
95
+ crudStores ? : Store[]|string[]|CrudManagerStoreDescriptor[]|StoreConfig[]
96
+ /**
97
+ * Data use to fill the [dependencyStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-dependencyStore). Should be an array of
98
+ * [DependencyModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/DependencyModel) or its configuration objects.
99
+ */
100
+ dependencies ? : DependencyModel[]|DependencyModelConfig[]
101
+ /**
102
+ * The initial data, to fill the [dependencyStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-dependencyStore) with.
103
+ * Should be an array of [DependencyModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/DependencyModel) or its configuration
104
+ * objects.
105
+ * @deprecated 6.3.0 Use [dependencies](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#config-dependencies) instead
106
+ */
107
+ dependenciesData ? : DependencyModel[]|DependencyModelConfig[]
108
+ /**
109
+ * The constructor of the dependency model class, to be used in the project. Will be set as the
110
+ * [modelClass](https://bryntum.com/products/taskboard/docs/api/Core/data/Store#config-modelClass) property of the [dependencyStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-dependencyStore)
111
+ */
112
+ dependencyModelClass ? : typeof DependencyModel
113
+ /**
114
+ * A [DependencyStore](https://bryntum.com/products/scheduler/docs#Scheduler/data/DependencyStore) instance or a config object.
115
+ */
116
+ dependencyStore ? : DependencyStore|DependencyStoreConfig
117
+ /**
118
+ * The constructor to create a dependency store instance with. Should be a class, subclassing the
119
+ * [DependencyStore](https://bryntum.com/products/scheduler/docs#Scheduler/data/DependencyStore)
120
+ */
121
+ dependencyStoreClass ? : typeof DependencyStore|object
122
+ /**
123
+ * Configuration of the JSON encoder used by the *Crud Manager*.
124
+ */
125
+ encoder ? : {
126
+ requestData?: object
127
+ }
128
+ /**
129
+ * Data use to fill the [eventStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-eventStore). Should be an array of
130
+ * [EventModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/EventModel) or its configuration objects.
131
+ */
132
+ events ? : EventModel[]|EventModelConfig[]
133
+ /**
134
+ * The initial data, to fill the [eventStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-eventStore) with.
135
+ * Should be an array of [EventModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/EventModel) or its configuration objects.
136
+ * @deprecated 6.3.0 Use [events](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#config-events) instead
137
+ */
138
+ eventsData ? : EventModel[]|EventModelConfig[]
139
+ /**
140
+ * An [EventStore](https://bryntum.com/products/scheduler/docs#Scheduler/data/EventStore) instance or a config object.
141
+ */
142
+ eventStore ? : EventStore|EventStoreConfig
143
+ /**
144
+ * Start expanded or not (only valid for tree data)
145
+ */
146
+ expanded ? : boolean
147
+ /**
148
+ * Specify as `true` to force sync requests to be sent when calling `sync()`, even if there are no local
149
+ * changes. Useful in a polling scenario, to keep client up to date with the backend.
150
+ */
151
+ forceSync ? : boolean
152
+ /**
153
+ * Unique identifier for the record. Might be mapped to another dataSource using idField, but always exposed as
154
+ * record.id. Will get a generated value if none is specified in records data.
155
+ * ...
156
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-id)
157
+ */
158
+ id ? : string|number
159
+ /**
160
+ * Set to `true` to make STM ignore changes coming from the backend. This will allow user to only undo redo
161
+ * local changes.
162
+ */
163
+ ignoreRemoteChangesInSTM ? : boolean
164
+ /**
165
+ * Set to `false` to only include the id of a removed parent node in the request to the backend (also
166
+ * affects programmatic calls to get [changes](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#property-changes) etc.), and not the ids of its children.
167
+ * ...
168
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-includeChildrenInRemoveRequest)
169
+ */
170
+ includeChildrenInRemoveRequest ? : boolean
171
+ /**
172
+ * Whether to include legacy data properties in the JSON / inlineData output. The legacy data properties are
173
+ * the `xxData` (`eventsData`, `resourcesData` etc.) properties that are deprecated and will be removed in
174
+ * the future.
175
+ * @deprecated 6.3.0 This config will be removed when the eventsData, resourcesData etc. properties are removed in a future release.
176
+ */
177
+ includeLegacyDataProperties ? : boolean
178
+ /**
179
+ * This field is added to the class at runtime when the Store is configured with
180
+ * [lazyLoad](https://bryntum.com/products/taskboard/docs/api/Core/data/Store#config-lazyLoad). If set on a parent record at load time, that parent will not cause any
181
+ * more child load requests. If omitted, it will be automatically set to `true` when a load request receives fewer
182
+ * child records than requested.
183
+ * ...
184
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-isFullyLoaded)
185
+ */
186
+ isFullyLoaded ? : boolean
187
+ /**
188
+ * Project data as a JSON string, used to populate its stores.
189
+ * ...
190
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-json)
191
+ */
192
+ json ? : string
193
+ /**
194
+ * The listener set for this object.
195
+ * ...
196
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-listeners)
197
+ */
198
+ listeners ? : ProjectModelListeners
199
+ /**
200
+ * Convenience shortcut to set only the url to load from, when you do not need to supply any other config
201
+ * options in the `load` section of the `transport` config.
202
+ * ...
203
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-loadUrl)
204
+ */
205
+ loadUrl ? : string
206
+ /**
207
+ * This is a read-only field provided in server synchronization packets to specify
208
+ * which position the node takes in the parent's ordered children array.
209
+ * This index is set on load and gets updated on reordering nodes in tree. Sorting and filtering
210
+ * have no effect on it.
211
+ */
212
+ orderedParentIndex ? : number
213
+ /**
214
+ * This is a read-only field provided in server synchronization packets to specify
215
+ * which record id is the parent of the record.
216
+ */
217
+ parentId ? : string|number|null
218
+ /**
219
+ * This is a read-only field provided in server synchronization packets to specify
220
+ * which position the node takes in the parent's children array.
221
+ * This index is set on load and gets updated automatically after row reordering, sorting, etc.
222
+ * To save the order, need to persist the field on the server and when data is fetched to be loaded,
223
+ * need to sort by this field.
224
+ */
225
+ parentIndex ? : number
226
+ /**
227
+ * Field name to be used to transfer a phantom record identifier.
228
+ */
229
+ phantomIdField ? : string
230
+ /**
231
+ * Field name to be used to transfer a phantom parent record identifier.
232
+ */
233
+ phantomParentIdField ? : string
234
+ /**
235
+ * Flag the record as read-only on the UI level, preventing the end user from manipulating it using editing
236
+ * features such as cell editing and event dragging.
237
+ * ...
238
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-readOnly)
239
+ */
240
+ readOnly ? : boolean
241
+ /**
242
+ * This field is added to the class at runtime when the Store is configured with
243
+ * [lazyLoad](https://bryntum.com/products/taskboard/docs/api/Core/data/Store#config-lazyLoad). The
244
+ * number specified should reflect the <strong>total</strong> amount of children of a parent node, including nested descendants.
245
+ * @deprecated This field has been deprecated. Please read the [guide](https://bryntum.com/products/grid/docs/guide/Grid/data/lazyloading) to find out if your app needs to use the new [isFullyLoaded](https://bryntum.com/products/taskboard/docs/api/Core/data/mixin/TreeNode#field-isFullyLoaded) field.
246
+ */
247
+ remoteChildCount ? : number
248
+ /**
249
+ * `True` to reset identifiers (defined by `idField` config) of phantom records before submitting them
250
+ * to the server.
251
+ */
252
+ resetIdsBeforeSync ? : boolean
253
+ /**
254
+ * The constructor of the resource model class, to be used in the project. Will be set as the
255
+ * [modelClass](https://bryntum.com/products/taskboard/docs/api/Core/data/Store#config-modelClass) property of the [resourceStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-resourceStore)
256
+ */
257
+ resourceModelClass ? : typeof ResourceModel
258
+ /**
259
+ * Data use to fill the [resourceStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-resourceStore). Should be an array of
260
+ * [ResourceModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/ResourceModel) or its configuration objects.
261
+ */
262
+ resources ? : ResourceModel[]|ResourceModelConfig[]
263
+ /**
264
+ * The initial data, to fill the [resourceStore](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#property-resourceStore) with.
265
+ * Should be an array of [ResourceModels](https://bryntum.com/products/scheduler/docs#Scheduler/model/ResourceModel) or its configuration objects.
266
+ * @deprecated 6.3.0 Use [resources](https://bryntum.com/products/scheduler/docs#Scheduler/model/ProjectModel#config-resources) instead
267
+ */
268
+ resourcesData ? : ResourceModel[]|ResourceModelConfig[]
269
+ /**
270
+ * A [ResourceStore](https://bryntum.com/products/scheduler/docs#Scheduler/data/ResourceStore) instance or a config object.
271
+ */
272
+ resourceStore ? : ResourceStore|ResourceStoreConfig
273
+ /**
274
+ * The constructor to create a resource store instance with. Should be a class, subclassing the
275
+ * [ResourceStore](https://bryntum.com/products/scheduler/docs#Scheduler/data/ResourceStore)
276
+ */
277
+ resourceStoreClass ? : typeof ResourceStore|object
278
+ /**
279
+ * Experimental hook that lets the app determine if a bound dataset needs syncing with the store or not, and
280
+ * if it does - which records that should be processed. Only called for stores that are configured with
281
+ * `syncDataOnLoad: true` (which is the default in the React, Angular and Vue wrappers).
282
+ * ...
283
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-shouldSyncDataOnLoad)
284
+ * @param {object} options Options passed by the store to this hook
285
+ * @param {Core.data.Store} options.store Store about to be synced
286
+ * @param {Core.data.Model} options.records Records currently in the store
287
+ * @param {object[]} options.data Incoming data
288
+ * @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)
289
+ */
290
+ shouldSyncDataOnLoad ? : (options: { store: Store, records: Model, data: object[] }) => Set<any>|boolean
291
+ /**
292
+ * Silences propagations caused by the project loading.
293
+ * ...
294
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-silenceInitialCommit)
295
+ */
296
+ silenceInitialCommit ? : boolean
297
+ /**
298
+ * When `true` treats parsed responses without `success` property as successful.
299
+ * In this mode a parsed response is treated as invalid if it has explicitly set `success : false`.
300
+ */
301
+ skipSuccessProperty ? : boolean
302
+ /**
303
+ * Configuration options to provide to the STM manager
304
+ */
305
+ stm ? : StateTrackingManagerConfig|StateTrackingManager
306
+ /**
307
+ * Name of a store property to retrieve store identifiers from. Make sure you have an instance of a
308
+ * store to use it by id. Store identifier is used as a container name holding corresponding store data
309
+ * while transferring them to/from the server. By default, `id` property is used. And in case a
310
+ * container identifier has to differ this config can be used:
311
+ * ...
312
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-storeIdProperty)
313
+ */
314
+ storeIdProperty ? : string
315
+ /**
316
+ * When `true` the Crud Manager does not require all updated and removed records to be mentioned in the
317
+ * *sync* response. In this case response should include only server side changes.
318
+ * ...
319
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-supportShortSyncResponse)
320
+ */
321
+ supportShortSyncResponse ? : boolean
322
+ /**
323
+ * An array of store identifiers sets an alternative sync responses apply order.
324
+ * By default, the order in which sync responses are applied to the stores is the same as they
325
+ * registered in. But in case of some tricky dependencies between stores this order can be changed:
326
+ * ...
327
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-syncApplySequence)
328
+ */
329
+ syncApplySequence ? : string[]|CrudManagerStoreDescriptor[]
330
+ /**
331
+ * Convenience shortcut to set only the url to sync to, when you do not need to supply any other config
332
+ * options in the `sync` section of the `transport` config.
333
+ * ...
334
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-syncUrl)
335
+ */
336
+ syncUrl ? : string
337
+ /**
338
+ * The constructor of the task model class, to be used in the project.
339
+ * Will be set as the [modelClass](https://bryntum.com/products/taskboard/docs/api/Core/data/Store#config-modelClass)
340
+ * property of the [taskStore](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#property-taskStore).
341
+ */
342
+ taskModelClass ? : typeof TaskModel
343
+ /**
344
+ * The initial data, to fill the [taskStore](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#property-taskStore) with. Should be an array of
345
+ * [TaskModel](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/TaskModel) or its configuration objects.
346
+ */
347
+ tasks ? : TaskModel[]|TaskModelConfig[]
348
+ /**
349
+ * The initial data, to fill the [taskStore](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#property-taskStore) with.
350
+ * Should be an array of [TaskModel](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/TaskModel) instances or its configuration objects.
351
+ * @deprecated 6.3.0 Use [tasks](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-tasks) instead
352
+ */
353
+ tasksData ? : TaskModel[]|TaskModelConfig[]
354
+ /**
355
+ * An [TaskStore](https://bryntum.com/products/taskboard/docs/api/TaskBoard/store/TaskStore) instance or a config object.
356
+ */
357
+ taskStore ? : TaskStoreConfig|TaskStore
358
+ /**
359
+ * The constructor to create a task store instance with.
360
+ * Should be a class, subclassing the [TaskStore](https://bryntum.com/products/taskboard/docs/api/TaskBoard/store/TaskStore).
361
+ */
362
+ taskStoreClass ? : typeof TaskStore
363
+ /**
364
+ * Set to a IANA time zone (i.e. `Europe/Stockholm`) or a UTC offset in minutes (i.e. `-120`). This will
365
+ * convert all events, tasks and time ranges to the specified time zone or offset. It will also affect the
366
+ * displayed timeline's headers as well at the start and end date of it.
367
+ * ...
368
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-timeZone)
369
+ */
370
+ timeZone ? : string|number
371
+ /**
372
+ * Specifies the output format of [toJSON](https://bryntum.com/products/scheduler/docs#Scheduler/model/mixin/ProjectModelCommon#function-toJSON).
373
+ * ...
374
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-toJSONResultFormat)
375
+ */
376
+ toJSONResultFormat ? : 'inlineData'|'model'
377
+ /**
378
+ * When `true` forces the CRUD manager to process responses depending on their `type` attribute.
379
+ * So `load` request may be responded with `sync` response for example.
380
+ * Can be used for smart server logic allowing the server to decide when it's better to respond with a
381
+ * complete data set (`load` response) or it's enough to return just a delta (`sync` response).
382
+ */
383
+ trackResponseType ? : boolean
384
+ /**
385
+ * Configuration of the AJAX requests used by *Crud Manager* to communicate with a server-side.
386
+ * ...
387
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-transport)
388
+ */
389
+ transport ? : {
390
+ load?: object
391
+ sync?: object
392
+ }
393
+ /**
394
+ * By default, the stores of a project use the raw data objects passed to them as the data source for their
395
+ * records if data is loaded remotely (using an `AjaxStore` or a `CrudManager`). For data supplied inline,
396
+ * the data objects are instead by default cloned to avoid the original data object being modified by the
397
+ * store.
398
+ * ...
399
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-useRawData)
400
+ */
401
+ useRawData ? : boolean
402
+ /**
403
+ * This config validates the response structure for requests made by the Crud Manager.
404
+ * When `true`, the Crud Manager checks every parsed response structure for errors
405
+ * and if the response format is invalid, a warning is logged to the browser console.
406
+ * ...
407
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#config-validateResponse)
408
+ */
409
+ validateResponse ? : boolean
410
+ /**
411
+ * `true` to write all fields from the record to the server.
412
+ * If set to `false` it will only send the fields that were modified.
413
+ * Note that any fields that have [persist](https://bryntum.com/products/taskboard/docs/api/Core/data/field/DataField#config-persist) set to `false` will
414
+ * still be ignored and fields having [alwaysWrite](https://bryntum.com/products/taskboard/docs/api/Core/data/field/DataField#config-alwaysWrite) set to `true`
415
+ * will always be included.
416
+ */
417
+ writeAllFields ? : boolean
418
+
419
+ }
420
+
421
+ @Component({
422
+ selector : 'bryntum-task-board-project-model',
423
+ template : ''
424
+ })
425
+ export class BryntumTaskBoardProjectModelComponent implements OnInit, OnDestroy {
426
+
427
+ public static instanceClass = ProjectModel;
428
+
429
+ public static instanceName = 'ProjectModel';
430
+
431
+ private static bryntumEvents: string[] = [
432
+ 'onBeforeDestroy',
433
+ 'onBeforeLoad',
434
+ 'onBeforeLoadApply',
435
+ 'onBeforeResponseApply',
436
+ 'onBeforeSend',
437
+ 'onBeforeSync',
438
+ 'onBeforeSyncApply',
439
+ 'onCatchAll',
440
+ 'onChange',
441
+ 'onDataReady',
442
+ 'onDestroy',
443
+ 'onHasChanges',
444
+ 'onLoad',
445
+ 'onLoadCanceled',
446
+ 'onLoadFail',
447
+ 'onNoChanges',
448
+ 'onRequestDone',
449
+ 'onRequestFail',
450
+ 'onSync',
451
+ 'onSyncCanceled',
452
+ 'onSyncDelayed',
453
+ 'onSyncFail'
454
+ ];
455
+
456
+ private static bryntumFeatureNames: string[] = [
457
+
458
+ ];
459
+
460
+ private static bryntumConfigs: string[] = BryntumTaskBoardProjectModelComponent.bryntumFeatureNames.concat([
461
+ 'adjustDurationToDST',
462
+ 'assignmentModelClass',
463
+ 'assignments',
464
+ 'assignmentsData',
465
+ 'assignmentStore',
466
+ 'assignmentStoreClass',
467
+ 'autoLoad',
468
+ 'autoSync',
469
+ 'autoSyncTimeout',
470
+ 'bubbleEvents',
471
+ 'callOnFunctions',
472
+ 'catchEventHandlerExceptions',
473
+ 'children',
474
+ 'crudStores',
475
+ 'dependencies',
476
+ 'dependenciesData',
477
+ 'dependencyModelClass',
478
+ 'dependencyStore',
479
+ 'dependencyStoreClass',
480
+ 'encoder',
481
+ 'events',
482
+ 'eventsData',
483
+ 'eventStore',
484
+ 'expanded',
485
+ 'forceSync',
486
+ 'id',
487
+ 'ignoreRemoteChangesInSTM',
488
+ 'includeChildrenInRemoveRequest',
489
+ 'includeLegacyDataProperties',
490
+ 'isFullyLoaded',
491
+ 'json',
492
+ 'listeners',
493
+ 'loadUrl',
494
+ 'orderedParentIndex',
495
+ 'parentId',
496
+ 'parentIndex',
497
+ 'phantomIdField',
498
+ 'phantomParentIdField',
499
+ 'readOnly',
500
+ 'remoteChildCount',
501
+ 'resetIdsBeforeSync',
502
+ 'resourceModelClass',
503
+ 'resources',
504
+ 'resourcesData',
505
+ 'resourceStore',
506
+ 'resourceStoreClass',
507
+ 'shouldSyncDataOnLoad',
508
+ 'silenceInitialCommit',
509
+ 'skipSuccessProperty',
510
+ 'stm',
511
+ 'storeIdProperty',
512
+ 'supportShortSyncResponse',
513
+ 'syncApplySequence',
514
+ 'syncUrl',
515
+ 'taskModelClass',
516
+ 'tasks',
517
+ 'tasksData',
518
+ 'taskStore',
519
+ 'taskStoreClass',
520
+ 'timeZone',
521
+ 'toJSONResultFormat',
522
+ 'trackResponseType',
523
+ 'transport',
524
+ 'useRawData',
525
+ 'validateResponse',
526
+ 'writeAllFields'
527
+ ]);
528
+
529
+ private static bryntumConfigsOnly: string[] = [
530
+ 'adjustDurationToDST',
531
+ 'assignmentModelClass',
532
+ 'assignmentsData',
533
+ 'assignmentStoreClass',
534
+ 'autoLoad',
535
+ 'autoSync',
536
+ 'autoSyncTimeout',
537
+ 'bubbleEvents',
538
+ 'children',
539
+ 'dependenciesData',
540
+ 'dependencyModelClass',
541
+ 'dependencyStoreClass',
542
+ 'encoder',
543
+ 'eventsData',
544
+ 'expanded',
545
+ 'ignoreRemoteChangesInSTM',
546
+ 'includeChildrenInRemoveRequest',
547
+ 'listeners',
548
+ 'orderedParentIndex',
549
+ 'parentIndex',
550
+ 'phantomIdField',
551
+ 'phantomParentIdField',
552
+ 'resetIdsBeforeSync',
553
+ 'resourceModelClass',
554
+ 'resourcesData',
555
+ 'resourceStoreClass',
556
+ 'silenceInitialCommit',
557
+ 'skipSuccessProperty',
558
+ 'storeIdProperty',
559
+ 'supportShortSyncResponse',
560
+ 'taskModelClass',
561
+ 'tasksData',
562
+ 'taskStoreClass',
563
+ 'toJSONResultFormat',
564
+ 'trackResponseType',
565
+ 'transport',
566
+ 'useRawData',
567
+ 'validateResponse',
568
+ 'writeAllFields'
569
+ ];
570
+
571
+ private static bryntumProps: string[] = BryntumTaskBoardProjectModelComponent.bryntumFeatureNames.concat([
572
+ 'allChildren',
573
+ 'allUnfilteredChildren',
574
+ 'assignments',
575
+ 'assignmentStore',
576
+ 'callOnFunctions',
577
+ 'catchEventHandlerExceptions',
578
+ 'crudStores',
579
+ 'dependencies',
580
+ 'dependencyStore',
581
+ 'descendantCount',
582
+ 'events',
583
+ 'eventStore',
584
+ 'forceSync',
585
+ 'hasGeneratedId',
586
+ 'id',
587
+ 'includeLegacyDataProperties',
588
+ 'inlineData',
589
+ 'internalId',
590
+ 'isCommitting',
591
+ 'isCreating',
592
+ 'isFullyLoaded',
593
+ 'isValid',
594
+ 'json',
595
+ 'loadUrl',
596
+ 'parentId',
597
+ 'previousSiblingsTotalCount',
598
+ 'readOnly',
599
+ 'remoteChildCount',
600
+ 'resources',
601
+ 'resourceStore',
602
+ 'resourceTimeRanges',
603
+ 'shouldSyncDataOnLoad',
604
+ 'stm',
605
+ 'syncApplySequence',
606
+ 'syncUrl',
607
+ 'tasks',
608
+ 'taskStore',
609
+ 'timeRanges',
610
+ 'timeZone',
611
+ 'visibleDescendantCount'
612
+ ]);
613
+
614
+ private elementRef: ElementRef;
615
+ public instance!: ProjectModel;
616
+
617
+ private bryntumConfig = {
618
+ adopt : undefined,
619
+ appendTo : undefined,
620
+ href : undefined,
621
+ angularComponent : this,
622
+ features : {},
623
+ listeners : {}
624
+ };
625
+
626
+ constructor(element: ElementRef) {
627
+ this.elementRef = element;
628
+ }
629
+
630
+ // Configs only
631
+ @Input() adjustDurationToDST ! : boolean;
632
+ @Input() assignmentModelClass ! : typeof AssignmentModel;
633
+ @Input() assignmentsData ! : AssignmentModel[]|AssignmentModelConfig[];
634
+ @Input() assignmentStoreClass ! : typeof AssignmentStore|object;
635
+ @Input() autoLoad ! : boolean;
636
+ @Input() autoSync ! : boolean;
637
+ @Input() autoSyncTimeout ! : number;
638
+ @Input() bubbleEvents ! : object;
639
+ @Input() children ! : boolean|object[]|Model[]|ModelConfig[];
640
+ @Input() dependenciesData ! : DependencyModel[]|DependencyModelConfig[];
641
+ @Input() dependencyModelClass ! : typeof DependencyModel;
642
+ @Input() dependencyStoreClass ! : typeof DependencyStore|object;
643
+ @Input() encoder ! : {
644
+ requestData?: object
645
+ };
646
+ @Input() eventsData ! : EventModel[]|EventModelConfig[];
647
+ @Input() expanded ! : boolean;
648
+ @Input() ignoreRemoteChangesInSTM ! : boolean;
649
+ @Input() includeChildrenInRemoveRequest ! : boolean;
650
+ @Input() listeners ! : ProjectModelListeners;
651
+ @Input() orderedParentIndex ! : number;
652
+ @Input() parentIndex ! : number;
653
+ @Input() phantomIdField ! : string;
654
+ @Input() phantomParentIdField ! : string;
655
+ @Input() resetIdsBeforeSync ! : boolean;
656
+ @Input() resourceModelClass ! : typeof ResourceModel;
657
+ @Input() resourcesData ! : ResourceModel[]|ResourceModelConfig[];
658
+ @Input() resourceStoreClass ! : typeof ResourceStore|object;
659
+ @Input() silenceInitialCommit ! : boolean;
660
+ @Input() skipSuccessProperty ! : boolean;
661
+ @Input() storeIdProperty ! : string;
662
+ @Input() supportShortSyncResponse ! : boolean;
663
+ @Input() taskModelClass ! : typeof TaskModel;
664
+ @Input() tasksData ! : TaskModel[]|TaskModelConfig[];
665
+ @Input() taskStoreClass ! : typeof TaskStore;
666
+ @Input() toJSONResultFormat ! : 'inlineData'|'model';
667
+ @Input() trackResponseType ! : boolean;
668
+ @Input() transport ! : {
669
+ load?: object
670
+ sync?: object
671
+ };
672
+ @Input() useRawData ! : boolean;
673
+ @Input() validateResponse ! : boolean;
674
+ @Input() writeAllFields ! : boolean;
675
+
676
+ // Configs and properties
677
+ @Input() assignments ! : AssignmentModel[]|AssignmentModelConfig[];
678
+ @Input() assignmentStore ! : AssignmentStore|AssignmentStoreConfig;
679
+ @Input() callOnFunctions ! : boolean;
680
+ @Input() catchEventHandlerExceptions ! : boolean;
681
+ @Input() crudStores ! : CrudManagerStoreDescriptor[]|Store[]|string[]|StoreConfig[];
682
+ @Input() dependencies ! : DependencyModel[]|DependencyModelConfig[];
683
+ @Input() dependencyStore ! : DependencyStore|DependencyStoreConfig;
684
+ @Input() events ! : EventModel[]|EventModelConfig[];
685
+ @Input() eventStore ! : EventStore|EventStoreConfig;
686
+ @Input() forceSync ! : boolean;
687
+ @Input() id ! : string|number;
688
+ @Input() includeLegacyDataProperties ! : boolean;
689
+ @Input() isFullyLoaded ! : boolean;
690
+ @Input() json ! : string;
691
+ @Input() loadUrl ! : string;
692
+ @Input() parentId ! : number|string|null;
693
+ @Input() readOnly ! : boolean;
694
+ @Input() remoteChildCount ! : number;
695
+ @Input() resources ! : ResourceModel[]|ResourceModelConfig[];
696
+ @Input() resourceStore ! : ResourceStore|ResourceStoreConfig;
697
+ @Input() shouldSyncDataOnLoad ! : (options: { store: Store, records: Model, data: object[] }) => Set<any>|boolean;
698
+ @Input() stm ! : StateTrackingManager|StateTrackingManagerConfig;
699
+ @Input() syncApplySequence ! : string[]|CrudManagerStoreDescriptor[];
700
+ @Input() syncUrl ! : string;
701
+ @Input() tasks ! : TaskModel[]|TaskModelConfig[];
702
+ @Input() taskStore ! : TaskStore|TaskStoreConfig;
703
+ @Input() timeZone ! : string|number;
704
+
705
+ // Properties only
706
+ @Input() allChildren ! : Model[];
707
+ @Input() allUnfilteredChildren ! : Model[];
708
+ @Input() descendantCount ! : number;
709
+ @Input() hasGeneratedId ! : boolean;
710
+ @Input() inlineData ! : object;
711
+ @Input() internalId ! : number;
712
+ @Input() isCommitting ! : boolean;
713
+ @Input() isCreating ! : boolean;
714
+ @Input() isValid ! : boolean;
715
+ @Input() previousSiblingsTotalCount ! : number;
716
+ @Input() resourceTimeRanges ! : ResourceTimeRangeModel[]|ResourceTimeRangeModelConfig[];
717
+ @Input() timeRanges ! : TimeRangeModel[]|TimeRangeModelConfig[];
718
+ @Input() visibleDescendantCount ! : number;
719
+
720
+ // Events emitters
721
+ /**
722
+ * Fires before an object is destroyed.
723
+ * @param {object} event Event object
724
+ * @param {Core.Base} event.source The Object that is being destroyed.
725
+ */
726
+ @Output() onBeforeDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
727
+ /**
728
+ * Fires before [load request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-load) is sent. Return `false` to cancel load request.
729
+ * @param {object} event Event object
730
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
731
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
732
+ */
733
+ @Output() onBeforeLoad: any = new EventEmitter<((event: { source: AbstractCrudManager, pack: object }) => Promise<boolean>|boolean|void)|string>();
734
+ /**
735
+ * Fires before loaded data get applied to the stores. Return `false` to prevent data applying.
736
+ * This event can be used for server data preprocessing. To achieve it user can modify the `response` object.
737
+ * @param {object} event Event object
738
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
739
+ * @param {object} event.response The decoded server response object.
740
+ * @param {object} event.options Options provided to the [load](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-load) method.
741
+ */
742
+ @Output() onBeforeLoadApply: any = new EventEmitter<((event: { source: AbstractCrudManager, response: object, options: object }) => Promise<boolean>|boolean|void)|string>();
743
+ /**
744
+ * Fires before server response gets applied to the stores. Return `false` to prevent data applying.
745
+ * This event can be used for server data preprocessing. To achieve it user can modify the `response` object.
746
+ * @param {object} event Event object
747
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
748
+ * @param {'sync','load'} event.requestType The request type (`sync` or `load`).
749
+ * @param {object} event.response The decoded server response object.
750
+ */
751
+ @Output() onBeforeResponseApply: any = new EventEmitter<((event: { source: AbstractCrudManager, requestType: 'sync'|'load', response: object }) => Promise<boolean>|boolean|void)|string>();
752
+ /**
753
+ * Fires before a request is sent to the server.
754
+ * ...
755
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#event-beforeSend)
756
+ * @param {object} event Event object
757
+ * @param {Scheduler.crud.AbstractCrudManager} event.crudManager The CRUD manager.
758
+ * @param {object} event.params HTTP request params to be passed in the request URL.
759
+ * @param {'sync','load'} event.requestType CrudManager request type (`load`/`sync`)
760
+ * @param {object} event.requestConfig Configuration object for Ajax request call
761
+ */
762
+ @Output() onBeforeSend: any = new EventEmitter<((event: { crudManager: AbstractCrudManager, params: object, requestType: 'sync'|'load', requestConfig: object }) => Promise<void>)|string>();
763
+ /**
764
+ * Fires before [sync request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-sync) is sent. Return `false` to cancel sync request.
765
+ * ...
766
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#event-beforeSync)
767
+ * @param {object} event Event object
768
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
769
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
770
+ */
771
+ @Output() onBeforeSync: any = new EventEmitter<((event: { source: AbstractCrudManager, pack: object }) => Promise<boolean>|boolean|void)|string>();
772
+ /**
773
+ * Fires before sync response data get applied to the stores. Return `false` to prevent data applying.
774
+ * This event can be used for server data preprocessing. To achieve it user can modify the `response` object.
775
+ * @param {object} event Event object
776
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
777
+ * @param {object} event.response The decoded server response object.
778
+ */
779
+ @Output() onBeforeSyncApply: any = new EventEmitter<((event: { source: AbstractCrudManager, response: object }) => Promise<boolean>|boolean|void)|string>();
780
+ /**
781
+ * Fires when any other event is fired from the object.
782
+ * ...
783
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#event-catchAll)
784
+ * @param {object} event Event object
785
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
786
+ * @param {string} event.event.type The type of the event which is caught by the listener
787
+ */
788
+ @Output() onCatchAll: any = new EventEmitter<((event: {[key: string]: any, type: string}) => void)|string>();
789
+ /**
790
+ * Fired when data in any of the projects stores changes.
791
+ * ...
792
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#event-change)
793
+ * @param {object} event Event object
794
+ * @param {Scheduler.model.SchedulerProjectModel,any} event.source This project
795
+ * @param {Core.data.Store} event.store Affected store
796
+ * @param {'remove','removeAll','add','clearchanges','filter','update','dataset','replace'} event.action Name of action which triggered the change. May be one of: * `'remove'` * `'removeAll'` * `'add'` * `'clearchanges'` * `'filter'` * `'update'` * `'dataset'` * `'replace'`
797
+ * @param {Core.data.Model} event.record Changed record, for actions that affects exactly one record (`'update'`)
798
+ * @param {Core.data.Model[]} event.records Changed records, passed for all actions except `'removeAll'`
799
+ * @param {object} event.changes Passed for the `'update'` action, info on which record fields changed
800
+ */
801
+ @Output() onChange: any = new EventEmitter<((event: { source: SchedulerProjectModel|any, store: Store, action: 'remove'|'removeAll'|'add'|'clearchanges'|'filter'|'update'|'dataset'|'replace', record: Model, records: Model[], changes: object }) => void)|string>();
802
+ /**
803
+ * Fired when the engine has finished its calculations and the results has been written back to the records.
804
+ * ...
805
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#event-dataReady)
806
+ * @param {object} event Event object
807
+ * @param {Scheduler.model.SchedulerProjectModel,any} event.source The project
808
+ * @param {boolean} event.isInitialCommit Flag that shows if this commit is initial
809
+ * @param {Set<any>} event.records Set of all [Model](https://bryntum.com/products/taskboard/docs/api/Core/data/Model)s that were modified in the completed transaction. Use the [modifications](https://bryntum.com/products/taskboard/docs/api/Core/data/Model#property-modifications) property of each Model to identify modified fields.
810
+ */
811
+ @Output() onDataReady: any = new EventEmitter<((event: { source: SchedulerProjectModel|any, isInitialCommit: boolean, records: Set<any> }) => void)|string>();
812
+ /**
813
+ * Fires when an object is destroyed.
814
+ * @param {object} event Event object
815
+ * @param {Core.Base} event.source The Object that is being destroyed.
816
+ */
817
+ @Output() onDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
818
+ /**
819
+ * Fires when data in any of the registered data stores is changed.
820
+ * ...
821
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#event-hasChanges)
822
+ * @param {object} event Event object
823
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
824
+ */
825
+ @Output() onHasChanges: any = new EventEmitter<((event: { source: AbstractCrudManager }) => void)|string>();
826
+ /**
827
+ * Fires on successful [load request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-load) completion after data gets loaded to the stores.
828
+ * @param {object} event Event object
829
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
830
+ * @param {object} event.response The decoded server response object.
831
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
832
+ * @param {object} event.requestOptions The request options passed to the request.
833
+ * @param {Response} event.rawResponse The native Response object
834
+ */
835
+ @Output() onLoad: any = new EventEmitter<((event: { source: AbstractCrudManager, response: object, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string>();
836
+ /**
837
+ * Fired after [load request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-load) was canceled by some [beforeLoad](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#event-beforeLoad)
838
+ * listener or due to incomplete prior load request.
839
+ * @param {object} event Event object
840
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
841
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
842
+ */
843
+ @Output() onLoadCanceled: any = new EventEmitter<((event: { source: AbstractCrudManager, pack: object }) => void)|string>();
844
+ /**
845
+ * Fires when a [load request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-load) fails.
846
+ * @param {object} event Event object
847
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager instance.
848
+ * @param {object} event.response The decoded server response object.
849
+ * @param {string} event.responseText The raw server response text
850
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
851
+ * @param {object} event.requestOptions The request options passed to the request.
852
+ * @param {Response} event.rawResponse The native Response object
853
+ */
854
+ @Output() onLoadFail: any = new EventEmitter<((event: { source: AbstractCrudManager, response: object, responseText: string, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string>();
855
+ /**
856
+ * Fires when registered stores get into state when they don't have any
857
+ * not persisted change. This happens after [load](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-load) or [sync](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-sync) request
858
+ * completion. Or this may happen after a record update which turns its fields back to their original state.
859
+ * ...
860
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/ProjectModel#event-noChanges)
861
+ * @param {object} event Event object
862
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
863
+ */
864
+ @Output() onNoChanges: any = new EventEmitter<((event: { source: AbstractCrudManager }) => void)|string>();
865
+ /**
866
+ * Fires on successful request completion after data gets applied to the stores.
867
+ * @param {object} event Event object
868
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
869
+ * @param {'sync','load'} event.requestType The request type (`sync` or `load`).
870
+ * @param {object} event.response The decoded server response object.
871
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
872
+ * @param {object} event.requestOptions The request options passed to the request.
873
+ * @param {Response} event.rawResponse The native Response object
874
+ */
875
+ @Output() onRequestDone: any = new EventEmitter<((event: { source: AbstractCrudManager, requestType: 'sync'|'load', response: object, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string>();
876
+ /**
877
+ * Fires when a request fails.
878
+ * @param {object} event Event object
879
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager instance.
880
+ * @param {'sync','load'} event.requestType The request type (`sync` or `load`).
881
+ * @param {object} event.response The decoded server response object.
882
+ * @param {string} event.responseText The raw server response text
883
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
884
+ * @param {object} event.requestOptions The request options passed to the request.
885
+ * @param {Response} event.rawResponse The native Response object
886
+ */
887
+ @Output() onRequestFail: any = new EventEmitter<((event: { source: AbstractCrudManager, requestType: 'sync'|'load', response: object, responseText: string, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string>();
888
+ /**
889
+ * Fires on successful [sync request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-sync) completion.
890
+ * @param {object} event Event object
891
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
892
+ * @param {object} event.response The decoded server response object.
893
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
894
+ * @param {object} event.requestOptions The request options passed to the request.
895
+ * @param {Response} event.rawResponse The native Response object
896
+ */
897
+ @Output() onSync: any = new EventEmitter<((event: { source: AbstractCrudManager, response: object, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string>();
898
+ /**
899
+ * Fires after [sync request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-sync) was canceled by some [beforeSync](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#event-beforeSync) listener.
900
+ * @param {object} event Event object
901
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
902
+ * @param {object} event.pack The data package which contains data for all stores managed by the crud manager.
903
+ */
904
+ @Output() onSyncCanceled: any = new EventEmitter<((event: { source: AbstractCrudManager, pack: object }) => void)|string>();
905
+ /**
906
+ * Fires after [sync request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-sync) was delayed due to incomplete previous one.
907
+ * @param {object} event Event object
908
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager.
909
+ * @param {object} event.arguments The arguments of [sync](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-sync) call.
910
+ */
911
+ @Output() onSyncDelayed: any = new EventEmitter<((event: { source: AbstractCrudManager, arguments: object }) => void)|string>();
912
+ /**
913
+ * Fires when a [sync request](https://bryntum.com/products/scheduler/docs#Scheduler/crud/AbstractCrudManagerMixin#function-sync) fails.
914
+ * @param {object} event Event object
915
+ * @param {Scheduler.crud.AbstractCrudManager} event.source The CRUD manager instance.
916
+ * @param {object} event.response The decoded server response object.
917
+ * @param {string} event.responseText The raw server response text
918
+ * @param {object} event.responseOptions [DEPRECATED] see `requestOptions`
919
+ * @param {object} event.requestOptions The request options passed to the request.
920
+ * @param {Response} event.rawResponse The native Response object
921
+ */
922
+ @Output() onSyncFail: any = new EventEmitter<((event: { source: AbstractCrudManager, response: object, responseText: string, responseOptions: object, requestOptions: object, rawResponse: any }) => void)|string>();
923
+
924
+ /**
925
+ * Create and append the underlying widget
926
+ */
927
+ ngOnInit(): void {
928
+ const
929
+ me = this,
930
+ {
931
+ elementRef,
932
+ bryntumConfig
933
+ } = me,
934
+ {
935
+ instanceClass,
936
+ instanceName,
937
+ bryntumConfigs,
938
+ bryntumEvents
939
+ } = BryntumTaskBoardProjectModelComponent;
940
+
941
+ bryntumConfigs.filter(prop => prop in this).forEach(prop => {
942
+ // @ts-ignore
943
+ WrapperHelper.applyPropValue(bryntumConfig, prop, this[prop]);
944
+ if (['features', 'config'].includes(prop)) {
945
+ WrapperHelper.devWarningConfigProp(instanceName, prop);
946
+ }
947
+ });
948
+ // @ts-ignore
949
+ bryntumEvents.filter(event => this[event] && this[event].observers.length > 0).forEach(event => {
950
+ const
951
+ uncapitalize = (str: string) => str.charAt(0).toLowerCase() + str.slice(1),
952
+ eventName = (str: string) => uncapitalize(str.slice(2));
953
+
954
+ // @ts-ignore
955
+ bryntumConfig.listeners[eventName(event)] = e => {
956
+ // @ts-ignore
957
+ me[event].emit(e);
958
+ // EventEmitter does not return values in the normal way, work around it by setting `returnValue` flag
959
+ // in Angular listeners
960
+ return e.returnValue;
961
+ };
962
+ });
963
+
964
+ // If component has no container specified in config then use adopt to Wrapper's element
965
+ const
966
+ containerParam = [
967
+ 'adopt',
968
+ 'appendTo',
969
+ 'insertAfter',
970
+ 'insertBefore'
971
+ // @ts-ignore
972
+ ].find(prop => bryntumConfig[prop]);
973
+ if (!containerParam) {
974
+ if (instanceName === 'Button' || elementRef.nativeElement.getRootNode() instanceof ShadowRoot) {
975
+ // Button should always be <a> or <button> inside owner element
976
+ bryntumConfig.appendTo = elementRef.nativeElement;
977
+ }
978
+ else {
979
+ bryntumConfig.adopt = elementRef.nativeElement;
980
+ }
981
+ }
982
+ else {
983
+ WrapperHelper.devWarningContainer(instanceName, containerParam);
984
+ }
985
+
986
+ // @ts-ignore
987
+ me.instance = instanceName === 'Widget' ? Widget.create(bryntumConfig) : new instanceClass(bryntumConfig);
988
+
989
+ }
990
+
991
+ /**
992
+ * Watch for changes
993
+ * @param changes
994
+ */
995
+ ngOnChanges(changes: SimpleChanges): void {
996
+ const
997
+ { instance } = this,
998
+ { instanceName } = BryntumTaskBoardProjectModelComponent;
999
+ if (!instance) {
1000
+ return;
1001
+ }
1002
+ // Iterate over all changes
1003
+ Object.entries(changes).forEach(([prop, change]) => {
1004
+ const
1005
+ newValue = (change as SimpleChange).currentValue,
1006
+ { instance } = this,
1007
+ { bryntumConfigsOnly, bryntumProps } = BryntumTaskBoardProjectModelComponent;
1008
+ if (bryntumProps.includes(prop)) {
1009
+ WrapperHelper.applyPropValue(instance, prop, newValue, false);
1010
+ if (bryntumConfigsOnly.includes(prop)) {
1011
+ WrapperHelper.devWarningUpdateProp(instanceName, prop);
1012
+ }
1013
+ }
1014
+ });
1015
+ }
1016
+
1017
+ /**
1018
+ * Destroy the component
1019
+ */
1020
+ ngOnDestroy(): void {
1021
+ // @ts-ignore
1022
+ if (this.instance && this.instance.destroy) {
1023
+ this.instance.destroy();
1024
+ }
1025
+ }
1026
+ }