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