@bryntum/gantt-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.
@@ -0,0 +1,1658 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /**
3
+ * Angular wrapper for Bryntum AssignmentField
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 { AlignSpec, Base, ChipViewConfig, CollectionCompareOperator, CollectionFilterConfig, Combo, ComboModel, DomConfig, Duration, DurationConfig, Field, FieldContainer, FieldContainerConfig, FieldTriggerConfig, KeyMapConfig, List, ListConfig, MaskConfig, Model, Rectangle, Scroller, Store, StoreConfig, TabConfig, TooltipConfig, VueConfig, Widget } from '@bryntum/core-thin';
11
+ import { AssignmentField, AssignmentFieldListeners, AssignmentGrid, AssignmentGridConfig, AssignmentModel, GanttContainerItemConfig, TaskModel } from '@bryntum/gantt-thin';
12
+
13
+ import { StringHelper } from '@bryntum/core-thin';
14
+
15
+ export type BryntumAssignmentFieldProps = {
16
+ // Configs
17
+ /**
18
+ * Element (or element id) to adopt as this Widget's encapsulating element. The widget's
19
+ * content will be placed inside this element.
20
+ * ...
21
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-adopt)
22
+ */
23
+ adopt ? : HTMLElement|string
24
+ /**
25
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating).*
26
+ * ...
27
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-align)
28
+ */
29
+ align ? : AlignSpec|string
30
+ /**
31
+ * When this widget is a child of a [Container](https://bryntum.com/products/gantt/docs/api/Core/widget/Container), it will by default be participating in a
32
+ * flexbox layout. This config allows you to set this widget's
33
+ * [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) style.
34
+ */
35
+ alignSelf ? : string
36
+ /**
37
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating) and being shown through [showBy](#Core/widget/Widget#function-showBy).*
38
+ * `true` to show a connector arrow pointing to the align target.
39
+ */
40
+ anchor ? : boolean
41
+ /**
42
+ * Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
43
+ * runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#property-element).
44
+ */
45
+ appendTo ? : HTMLElement|string
46
+ /**
47
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
48
+ * into an element which will be linked using the `aria-describedby` attribute.
49
+ * ...
50
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-ariaDescription)
51
+ */
52
+ ariaDescription ? : string
53
+ /**
54
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
55
+ * the `aria-label` attribute.
56
+ * ...
57
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-ariaLabel)
58
+ */
59
+ ariaLabel ? : string
60
+ /**
61
+ * Sets the native `autocomplete` property of the underlying input element. For more information, please refer to
62
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
63
+ */
64
+ autoComplete ? : string
65
+ /**
66
+ * Configure as `true` to have the picker expand upon focus enter.
67
+ */
68
+ autoExpand ? : boolean
69
+ /**
70
+ * Specify `true` to auto select field contents on focus
71
+ */
72
+ autoSelect ? : boolean
73
+ /**
74
+ * Initial text to show in badge.
75
+ */
76
+ badge ? : string
77
+ /**
78
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
79
+ * hierarchy when triggered.
80
+ * ...
81
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-bubbleEvents)
82
+ */
83
+ bubbleEvents ? : object
84
+ /**
85
+ * Enable caching of the last retrieved result until the timeout is reached.
86
+ * ...
87
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-cacheLastResult)
88
+ */
89
+ cacheLastResult ? : number|string|Duration|DurationConfig
90
+ /**
91
+ * Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
92
+ * ...
93
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-callOnFunctions)
94
+ */
95
+ callOnFunctions ? : boolean
96
+ /**
97
+ * Configure as `true` to force case matching when filtering the dropdown list based upon the typed value.
98
+ */
99
+ caseSensitive ? : boolean
100
+ /**
101
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
102
+ * application state is undefined. Code which follows the event handler will *not* be executed.
103
+ * ...
104
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-catchEventHandlerExceptions)
105
+ */
106
+ catchEventHandlerExceptions ? : boolean
107
+ /**
108
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating).*
109
+ * Set to `true` to centre the Widget in browser viewport space.
110
+ */
111
+ centered ? : boolean
112
+ /**
113
+ * A config object to configure the [ChipView](https://bryntum.com/products/gantt/docs/api/Core/widget/ChipView) to display the
114
+ * selected value set when [multiSelect](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiSelect) is `true`.
115
+ * ...
116
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-chipView)
117
+ */
118
+ chipView ? : ChipViewConfig
119
+ /**
120
+ * Show a trigger to clear field, if this field is not [readOnly](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#config-readOnly). The trigger is available
121
+ * in the [triggers](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#property-triggers) object under the name `clear`. May also be an object which
122
+ * configures the `clear` [trigger](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#property-triggers).
123
+ */
124
+ clearable ? : boolean|FieldTriggerConfig
125
+ /**
126
+ * `true` to clear value typed to a multiselect combo when picker is collapsed
127
+ */
128
+ clearTextOnPickerHide ? : boolean
129
+ /**
130
+ * Specify `false` to not clear value typed to a multiselect combo when an item is selected.
131
+ */
132
+ clearTextOnSelection ? : boolean
133
+ /**
134
+ * Set to `true` to clear this field when user empties the input element
135
+ */
136
+ clearWhenInputEmpty ? : boolean
137
+ /**
138
+ * Custom CSS classes to add to element.
139
+ * May be specified as a space separated string, or as an object in which property names
140
+ * with truthy values are used as the class names:
141
+ * ...
142
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-cls)
143
+ */
144
+ cls ? : string|object
145
+ /**
146
+ * Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
147
+ * `style` block.
148
+ * ...
149
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-color)
150
+ */
151
+ color ? : string
152
+ /**
153
+ * Programmatic control over which column to start in when used in a grid layout.
154
+ */
155
+ column ? : number
156
+ config ? : object
157
+ /**
158
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating) or [positioned](#Core/widget/Widget#config-positioned).*
159
+ * Element, Widget or Rectangle to which this Widget is constrained.
160
+ */
161
+ constrainTo ? : HTMLElement|Widget|Rectangle
162
+ /**
163
+ * The configuration for additional items associated to this field. This is typically used to add contextual
164
+ * fields related to a [checkbox](https://bryntum.com/products/gantt/docs/api/Core/widget/Checkbox) or [radio button](#Core/widget/Radio). See
165
+ * these classes for examples of nested fields.
166
+ * ...
167
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-container)
168
+ */
169
+ container ? : Record<string, GanttContainerItemConfig>|GanttContainerItemConfig[]|FieldContainerConfig|FieldContainer
170
+ /**
171
+ * The config controls how the value of nested items are handled when a parent container gets or sets its
172
+ * [values](https://bryntum.com/products/gantt/docs/api/Core/widget/Container#property-values).
173
+ * ...
174
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-containValues)
175
+ * @param {Core.widget.Field} field Field instance
176
+ * @returns {boolean}
177
+ */
178
+ containValues ? : boolean|string|((field: Field) => boolean)
179
+ /**
180
+ * Custom CSS classes to add to the [contentElement](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#property-contentElement).
181
+ * May be specified as a space separated string, or as an object in which property names
182
+ * with truthy values are used as the class names:
183
+ * ...
184
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-contentElementCls)
185
+ */
186
+ contentElementCls ? : string|object
187
+ /**
188
+ * If configured as `true`, this means that when an unmatched string is typed into the
189
+ * combo's input field, and `ENTER`, or the [multiValueSeparator](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiValueSeparator) is typed,
190
+ * a new record will be created using the typed string as the [displayField](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-displayField).
191
+ * ...
192
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-createOnUnmatched)
193
+ * @param {string} name Record name
194
+ * @param {Core.widget.Combo} combo Combo instance
195
+ * @returns {Core.data.Model} New record
196
+ */
197
+ createOnUnmatched ? : ((name: string, combo: Combo) => Model)|string|boolean
198
+ /**
199
+ * When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
200
+ * field on the expanded record to use for populating this widget's store (if applicable)
201
+ */
202
+ dataField ? : string
203
+ /**
204
+ * Object to apply to elements dataset (each key will be used as a data-attribute on the element)
205
+ */
206
+ dataset ? : Record<string, string>
207
+ /**
208
+ * The name of the property to set when a single value is to be applied to this Widget. Such as when used
209
+ * in a grid WidgetColumn, this is the property to which the column's `field` is applied.
210
+ */
211
+ defaultBindProperty ? : string
212
+ /**
213
+ * Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
214
+ * ...
215
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-detectCSSCompatibilityIssues)
216
+ */
217
+ detectCSSCompatibilityIssues ? : boolean
218
+ /**
219
+ * Disable or enable the widget. It is similar to [readOnly](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-readOnly) except a disabled widget
220
+ * cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
221
+ * ...
222
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-disabled)
223
+ */
224
+ disabled ? : boolean|'inert'
225
+ /**
226
+ * Field used for item text when populating from store
227
+ */
228
+ displayField ? : string
229
+ /**
230
+ * Template function that can be used to customize the displayed value
231
+ * @param {Core.data.Model} record The record to provide a textual value for
232
+ * @param {Core.widget.Combo} combo A reference to this Combo
233
+ * @returns {string,void}
234
+ */
235
+ displayValueRenderer ? : (record: Model|ComboModel, combo: Combo) => string|void
236
+ /**
237
+ * Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/gantt/docs/api/Core/widget/Panel)
238
+ * [strips collection](https://bryntum.com/products/gantt/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
239
+ * `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
240
+ * body. Such widgets are called "edge strips".
241
+ * ...
242
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-dock)
243
+ */
244
+ dock ? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
245
+ /**
246
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating).*
247
+ * Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
248
+ * property which controls when a drag should start.
249
+ * ...
250
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-draggable)
251
+ */
252
+ draggable ? : boolean|{
253
+ handleSelector?: string
254
+ }
255
+ /**
256
+ * User can edit text in text field (otherwise only pick from attached picker)
257
+ */
258
+ editable ? : boolean
259
+ /**
260
+ * An object specifying attributes to assign to the root element of this widget.
261
+ * Set `null` value to attribute to remove it.
262
+ * ...
263
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-elementAttributes)
264
+ */
265
+ elementAttributes ? : Record<string, string|null>
266
+ /**
267
+ * Text to display in the drop down when there are no items in the underlying store.
268
+ * ...
269
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-emptyText)
270
+ */
271
+ emptyText ? : string
272
+ /**
273
+ * A function which creates an array of values for the [filterParamName](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-filterParamName) to pass
274
+ * any filters to the server upon load.
275
+ * ...
276
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-encodeFilterParams)
277
+ * @param {object[]} filters filters
278
+ * @returns {object[]} array of values
279
+ */
280
+ encodeFilterParams ? : (filters: object[]) => object[]
281
+ extraData ? : any
282
+ /**
283
+ * If `false`, filtering will be triggered once you exceed [minChars](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-minChars). To filter only when
284
+ * hitting Enter key, set this to `true`;
285
+ */
286
+ filterOnEnter ? : boolean
287
+ /**
288
+ * The name of an operator type as implemented in [operator](https://bryntum.com/products/gantt/docs/api/Core/util/CollectionFilter#config-operator)
289
+ * to use when filtering the dropdown list based upon the typed value.
290
+ * ...
291
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-filterOperator)
292
+ */
293
+ filterOperator ? : CollectionCompareOperator
294
+ /**
295
+ * If the dropdown is to be populated with a filtered query to a remote server, specify the
296
+ * name of the parameter to pass the typed string here. By default, the string is simply sent
297
+ * as the value of the parameter. For special encoding, configure the combo with [encodeFilterParams](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-encodeFilterParams)
298
+ */
299
+ filterParamName ? : string
300
+ /**
301
+ * When [multiSelect](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiSelect) is `true`, you may configure `filterSelected` as
302
+ * `true` to hide items in the dropdown when they are added to the selection.
303
+ * It will appear as if the requested item has "moved" into the field's
304
+ * [ChipView](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-chipView).
305
+ */
306
+ filterSelected ? : boolean
307
+ /**
308
+ * When this widget is a child of a [Container](https://bryntum.com/products/gantt/docs/api/Core/widget/Container), it will by default be participating in a
309
+ * flexbox layout. This config allows you to set this widget's
310
+ * [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
311
+ * This may be configured as a single number or a `&lt;flex-grow&gt; &lt;flex-shrink&gt; &lt;flex-basis&gt;` format string.
312
+ * numeric-only values are interpreted as the `flex-grow` value.
313
+ */
314
+ flex ? : number|string
315
+ /**
316
+ * Set to `true` to move the widget out of the document flow and position it
317
+ * absolutely in browser viewport space.
318
+ */
319
+ floating ? : boolean
320
+ /**
321
+ * Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
322
+ * which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
323
+ * cases this config is convenient.
324
+ */
325
+ height ? : string|number
326
+ /**
327
+ * Configure with true to make widget initially hidden.
328
+ */
329
+ hidden ? : boolean
330
+ /**
331
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating).*
332
+ * ...
333
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-hideAnimation)
334
+ */
335
+ hideAnimation ? : boolean|object
336
+ /**
337
+ * By default, the picker is hidden on selection in single select mode, and
338
+ * remains to allow more selections when [multiSelect](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiSelect) is `true`.
339
+ * Setting this to a `Boolean` value can override that default.
340
+ */
341
+ hidePickerOnSelect ? : boolean
342
+ /**
343
+ * Configure as `true` to hide the expand trigger. This is automatically set to `true` if
344
+ * remote filtering is enabled by setting the [filterParamName](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-filterParamName) config.
345
+ */
346
+ hideTrigger ? : boolean
347
+ /**
348
+ * Specify `true` to highlight field after external value changes
349
+ */
350
+ highlightExternalChange ? : boolean
351
+ /**
352
+ * An optional string to display inside the input field as an overlay. This can be useful for displaying
353
+ * a field's units.
354
+ * ...
355
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-hint)
356
+ * @param {object} data A data object
357
+ * @param {Core.widget.Field} data.source A reference to the field instance
358
+ * @param {any} data.value The current value of the field
359
+ * @returns {string}
360
+ */
361
+ hint ? : string|((data: { source: Field, value: any }) => string)
362
+ /**
363
+ * This config is similar to [hint](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#config-hint) except that this config is used to display HTML content.
364
+ * Since this can allow malicious content to be executed, be sure not to include user-entered data or to
365
+ * encode such data (see [encodeHtml](https://bryntum.com/products/gantt/docs/api/Core/helper/StringHelper#function-encodeHtml-static)).
366
+ * ...
367
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-hintHtml)
368
+ * @param {object} data A data object
369
+ * @param {Core.widget.Field} data.source A reference to the field instance
370
+ * @param {any} data.value The current value of the field
371
+ * @returns {string}
372
+ */
373
+ hintHtml ? : string|((data: { source: Field, value: any }) => string)
374
+ /**
375
+ * Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
376
+ */
377
+ id ? : string
378
+ /**
379
+ * Determines if the widgets read-only state should be controlled by its parent.
380
+ * ...
381
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-ignoreParentReadOnly)
382
+ */
383
+ ignoreParentReadOnly ? : boolean
384
+ /**
385
+ * Set this config to `true` to always display items horizontally along with this field. This assigns an
386
+ * [hbox](https://bryntum.com/products/gantt/docs/api/Core/widget/layout/Box) as the [layout](#Core/widget/Container#config-layout) to the
387
+ * [container](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#config-container).
388
+ * ...
389
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-inline)
390
+ */
391
+ inline ? : boolean
392
+ /**
393
+ * Configure this as `true` to render the dropdown list as a permanently visible list
394
+ * in the document flow immediately below the input area instead of as a popup.
395
+ * ...
396
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-inlinePicker)
397
+ */
398
+ inlinePicker ? : boolean
399
+ /**
400
+ * Text alignment for the input field.
401
+ */
402
+ inputAlign ? : string
403
+ /**
404
+ * Sets custom attributes of the underlying input element. For more information, please refer to
405
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes)
406
+ */
407
+ inputAttributes ? : Record<string, string>
408
+ /**
409
+ * If you need to use something else than a default `input` element, as the input element, provide the tag
410
+ * name here. Please note that this is used for advanced usage only, for example when using WebComponents
411
+ * (custom elements), and that the configured element must fulfil the same contract as a regular input
412
+ * element.
413
+ */
414
+ inputTag ? : string
415
+ /**
416
+ * Sets the `type` attribute of the underlying input element (password, hidden, date, color, etc.).
417
+ */
418
+ inputType ? : string
419
+ /**
420
+ * The width to apply to the `.b-field-inner` element, which encompasses the `input` element and any
421
+ * triggers. If a number is specified, `px` will be used.
422
+ */
423
+ inputWidth ? : string|number
424
+ /**
425
+ * Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
426
+ */
427
+ insertBefore ? : HTMLElement|string
428
+ /**
429
+ * Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
430
+ */
431
+ insertFirst ? : HTMLElement|string
432
+ /**
433
+ * Rows to display in the dropdown (list items).
434
+ * ...
435
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-items)
436
+ */
437
+ items ? : object[]|string[]|object
438
+ /**
439
+ * An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
440
+ * and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
441
+ * are the name of the instance method to call when the keystroke is received.
442
+ * ...
443
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-keyMap)
444
+ */
445
+ keyMap ? : Record<string, KeyMapConfig>
446
+ /**
447
+ * The delay in milliseconds to wait after the last keystroke before triggering a change event.
448
+ * Set to 0 to not trigger change events from keystrokes (listen for input event instead to have
449
+ * immediate feedback, change will still be triggered on blur).
450
+ * ...
451
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-keyStrokeChangeDelay)
452
+ */
453
+ keyStrokeChangeDelay ? : number
454
+ /**
455
+ * The delay in milliseconds to wait after the last keystroke before filtering the list.
456
+ * ...
457
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-keyStrokeFilterDelay)
458
+ */
459
+ keyStrokeFilterDelay ? : number
460
+ /**
461
+ * Label, prepended to field
462
+ */
463
+ label ? : string
464
+ /**
465
+ * CSS class name or class names to add to any configured [label](https://bryntum.com/products/gantt/docs/api/Core/widget/mixin/Labelable#config-label)
466
+ */
467
+ labelCls ? : string|object
468
+ /**
469
+ * Label position, either 'before' the field or 'above' the field
470
+ * ...
471
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-labelPosition)
472
+ */
473
+ labelPosition ? : 'before'|'above'|null
474
+ /**
475
+ * The labels to add either before or after the input field.
476
+ * Each label may have the following properties:
477
+ * ...
478
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-labels)
479
+ */
480
+ labels ? : object[]
481
+ /**
482
+ * The width to apply to the `&lt;label&gt;` element. If a number is specified, `px` will be used.
483
+ */
484
+ labelWidth ? : string|number
485
+ /**
486
+ * CSS class to add to picker
487
+ */
488
+ listCls ? : string
489
+ /**
490
+ * The listener set for this object.
491
+ * ...
492
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-listeners)
493
+ */
494
+ listeners ? : AssignmentFieldListeners
495
+ /**
496
+ * Template string used to render the list items in the dropdown list
497
+ * ...
498
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-listItemTpl)
499
+ * @param {Core.data.Model} record The record representing the item being rendered
500
+ * @returns {string,void}
501
+ */
502
+ listItemTpl ? : (record: Model|ComboModel) => string|void
503
+ /**
504
+ * A class translations of which are used for translating this entity.
505
+ * This is often used when translations of an item are defined on its container class.
506
+ * For example:
507
+ * ...
508
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-localeClass)
509
+ */
510
+ localeClass ? : typeof Base
511
+ /**
512
+ * Set to `false` to disable localization of this object.
513
+ */
514
+ localizable ? : boolean
515
+ /**
516
+ * List of properties which values should be translated automatically upon a locale applying.
517
+ * In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
518
+ * you could use 'localeKey' meta configuration.
519
+ * Example:
520
+ * ...
521
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-localizableProperties)
522
+ */
523
+ localizableProperties ? : string[]
524
+ /**
525
+ * Widget's margin. This may be configured as a single number or a `TRBL` format string.
526
+ * numeric-only values are interpreted as pixels.
527
+ */
528
+ margin ? : number|string
529
+ /**
530
+ * This config object contains the defaults for the [Mask](https://bryntum.com/products/gantt/docs/api/Core/widget/Mask) created for the
531
+ * [masked](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
532
+ * values.
533
+ */
534
+ maskDefaults ? : MaskConfig
535
+ /**
536
+ * Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
537
+ * [Mask](https://bryntum.com/products/gantt/docs/api/Core/widget/Mask) config object.
538
+ */
539
+ masked ? : boolean|string|MaskConfig
540
+ /**
541
+ * The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
542
+ * like [height](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
543
+ */
544
+ maxHeight ? : string|number
545
+ /**
546
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating).*
547
+ * ...
548
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-maximizeOnMobile)
549
+ */
550
+ maximizeOnMobile ? : number|string
551
+ /**
552
+ * The max number of characters for the input field
553
+ */
554
+ maxLength ? : number
555
+ /**
556
+ * The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
557
+ * like [width](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
558
+ */
559
+ maxWidth ? : string|number
560
+ /**
561
+ * The minimum string length to trigger the filtering, only relevant when [editable](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-editable) is `true`.
562
+ * ...
563
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-minChars)
564
+ */
565
+ minChars ? : number
566
+ /**
567
+ * The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
568
+ * like [height](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
569
+ */
570
+ minHeight ? : string|number
571
+ /**
572
+ * The min number of characters for the input field
573
+ */
574
+ minLength ? : number
575
+ /**
576
+ * The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
577
+ * like [width](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
578
+ */
579
+ minWidth ? : string|number
580
+ /**
581
+ * When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
582
+ * is used to monitor this element for size changes caused by either style manipulation, or by CSS
583
+ * layout.
584
+ * ...
585
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-monitorResize)
586
+ */
587
+ monitorResize ? : boolean|{
588
+ immediate?: boolean
589
+ }
590
+ /**
591
+ * Set to `true` to allow selection of multiple values from the dropdown list.
592
+ * ...
593
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-multiSelect)
594
+ */
595
+ multiSelect ? : boolean
596
+ /**
597
+ * A key value which, when typed in a [multiSelect](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiSelect) Combo, selects the
598
+ * currently active item in the picker, and clears the input field ready for another
599
+ * match to be typed.
600
+ */
601
+ multiValueSeparator ? : string
602
+ /**
603
+ * Name of the field which is used as a key to get/set values from/to the field.
604
+ * Used prior to [ref](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-ref) and [id](#Core/widget/Widget#config-id) in
605
+ * [Container.values](https://bryntum.com/products/gantt/docs/api/Core/widget/Container#property-values).
606
+ * ...
607
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-name)
608
+ */
609
+ name ? : string
610
+ /**
611
+ * This implies that the picker will display an anchor pointer, but also means that the picker will align closer
612
+ * to the input field so that the pointer pierces the [pickerAlignElement](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-pickerAlignElement)
613
+ */
614
+ overlayAnchor ? : boolean
615
+ /**
616
+ * The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
617
+ * [items](https://bryntum.com/products/gantt/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
618
+ * the owner is <strong>always</strong> the encapsulating Container.
619
+ * ...
620
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-owner)
621
+ */
622
+ owner ? : Widget|any
623
+ /**
624
+ * A config object used to configure the [assignment grid](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentGrid)
625
+ * used to select resources to assign.
626
+ * ...
627
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-picker)
628
+ */
629
+ picker ? : AssignmentGridConfig|AssignmentGrid
630
+ /**
631
+ * The name of the element property to which the picker should size and align itself.
632
+ */
633
+ pickerAlignElement ? : string
634
+ /**
635
+ * Width of picker, defaults to this field's [pickerAlignElement](https://bryntum.com/products/gantt/docs/api/Core/widget/PickerField#config-pickerAlignElement) width
636
+ */
637
+ pickerWidth ? : number|string
638
+ /**
639
+ * Text to display in empty field.
640
+ */
641
+ placeholder ? : string
642
+ /**
643
+ * Set to `true` when a widget is rendered into another widget's [contentElement](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#property-contentElement), but must
644
+ * not participate in the standard layout of that widget, and must be positioned relatively to that
645
+ * widget's [contentElement](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#property-contentElement).
646
+ * ...
647
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-positioned)
648
+ */
649
+ positioned ? : boolean
650
+ /**
651
+ * Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
652
+ * menu on click etc, since the tooltip would be displayed at the same time.
653
+ */
654
+ preventTooltipOnTouch ? : boolean
655
+ /**
656
+ * Optionally a [Filter](https://bryntum.com/products/gantt/docs/api/Core/util/CollectionFilter) config object which the combo should use for
657
+ * filtering using the typed value.
658
+ * This may use a `filterBy` property to test its `value` against any field in the passed record.
659
+ * ...
660
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-primaryFilter)
661
+ */
662
+ primaryFilter ? : CollectionFilterConfig
663
+ /**
664
+ * Event to load resource assignments for.
665
+ * Either event or [store](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-store) should be given.
666
+ */
667
+ projectEvent ? : TaskModel
668
+ /**
669
+ * Makes the field unmodifiable by user action. The input area is not editable, and triggers
670
+ * are unresponsive.
671
+ * ...
672
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-readOnly)
673
+ */
674
+ readOnly ? : boolean
675
+ relayStoreEvents ? : boolean
676
+ /**
677
+ * Predefined style to use for the field. Possible values are:
678
+ * ...
679
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-rendition)
680
+ */
681
+ rendition ? : 'outlined'|'filled'|string
682
+ /**
683
+ * Configure as `true` to indicate that a `null` field value is to be marked as invalid. This will
684
+ * optionally append a * to the field label if [showRequiredIndicator](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#property-showRequiredIndicator) is set.
685
+ */
686
+ required ? : boolean
687
+ /**
688
+ * If this field is not [readOnly](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#config-readOnly), then setting this option means that pressing
689
+ * the `ESCAPE` key after editing the field will revert the field to the value it had when
690
+ * the user focused the field. If the field is *not* changed from when focused, the [clearable](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#config-clearable)
691
+ * behaviour will be activated.
692
+ */
693
+ revertOnEscape ? : boolean
694
+ /**
695
+ * Configure as `true` to have the component display a translucent ripple when its
696
+ * [focusElement](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#property-focusElement), or [element](#Core/widget/Widget#property-element) is tapped <em>if the
697
+ * current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
698
+ * ...
699
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-ripple)
700
+ */
701
+ ripple ? : boolean|{
702
+ delegate?: string
703
+ color?: string
704
+ radius?: number
705
+ clip?: string
706
+ }
707
+ /**
708
+ * If you are rendering this widget to a shadow root inside a web component, set this config to the shadowRoot. If not inside a web component, set it to `document.body`
709
+ */
710
+ rootElement ? : ShadowRoot|HTMLElement
711
+ /**
712
+ * This may be configured as `true` to make the widget's element use the `direction:rtl` style.
713
+ * ...
714
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-rtl)
715
+ */
716
+ rtl ? : boolean
717
+ /**
718
+ * Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
719
+ * Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
720
+ */
721
+ scrollAction ? : 'hide'|'realign'|null
722
+ /**
723
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-floating).*
724
+ * ...
725
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-showAnimation)
726
+ */
727
+ showAnimation ? : boolean|object
728
+ /**
729
+ * `true` to automatically display a * after the label for this field when it is [required](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#property-required).
730
+ */
731
+ showRequiredIndicator ? : string
732
+ /**
733
+ * Set to `false` to not show the tooltip when this widget is [disabled](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#property-disabled)
734
+ */
735
+ showTooltipWhenDisabled ? : boolean
736
+ /**
737
+ * Set to `true`, completely bypasses validation logic (could be userful if your field is not `editable`
738
+ * to the user).
739
+ */
740
+ skipValidation ? : boolean
741
+ /**
742
+ * Programmatic control over how many columns to span when used in a grid layout.
743
+ */
744
+ span ? : number
745
+ /**
746
+ * Sets the native `spellcheck` property of the underlying input element. For more information, please refer to
747
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck)
748
+ */
749
+ spellCheck ? : boolean
750
+ /**
751
+ * Assignment manipulation store to use, or it's configuration object.
752
+ * Either store or [projectEvent](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-projectEvent) should be given
753
+ */
754
+ store ? : Store|StoreConfig
755
+ /**
756
+ * A configuration for the [tab](https://bryntum.com/products/gantt/docs/api/Core/widget/Tab) created for this widget when it is placed in a
757
+ * [TabPanel](https://bryntum.com/products/gantt/docs/api/Core/widget/TabPanel). For example, this config can be used to control the icon of the `tab` for
758
+ * this widget:
759
+ * ...
760
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-tab)
761
+ */
762
+ tab ? : boolean|TabConfig
763
+ /**
764
+ * The tab index of the input field or fields, or `null` for natural tab order (recommended). Setting to `0`
765
+ * is equivalent to natural tab order, but is unnecessary for fields since they are naturally tabbable
766
+ * (i.e., accessible via the TAB key). Setting to `-1` disables tabbability but allows for focus to be set
767
+ * to the element programmatically.
768
+ * ...
769
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-tabIndex)
770
+ */
771
+ tabIndex ? : number
772
+ /**
773
+ * Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
774
+ * ...
775
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-textAlign)
776
+ */
777
+ textAlign ? : 'left'|'center'|'right'|'start'|'end'
778
+ /**
779
+ * A title to display for the widget. Only in effect when inside a container that uses it (such as TabPanel)
780
+ */
781
+ title ? : string
782
+ /**
783
+ * Tooltip for the widget, either as a string or as a Tooltip config object.
784
+ * ...
785
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-tooltip)
786
+ */
787
+ tooltip ? : string|TooltipConfig|null
788
+ /**
789
+ * A template function used to generate the tooltip contents when hovering this field. Defaults to
790
+ * showing "[Name] [%]"
791
+ * ...
792
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-tooltipTemplate)
793
+ * @param {object} data Tooltip data
794
+ * @param {Gantt.model.TaskModel} data.taskRecord The taskRecord the assignments are associated with
795
+ * @param {Gantt.model.AssignmentModel} data.assignmentRecords The field value represented as assignment records
796
+ * @returns {string,DomConfig,DomConfig[]}
797
+ */
798
+ tooltipTemplate ? : (data: { taskRecord: TaskModel, assignmentRecords: AssignmentModel }) => string|DomConfig|DomConfig[]
799
+ /**
800
+ * How to query the store upon click of the expand trigger. Specify one of these values:
801
+ * ...
802
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-triggerAction)
803
+ */
804
+ triggerAction ? : 'all'|'last'|null
805
+ /**
806
+ * The triggers to add either before or after the input field. Each property name is the reference by which
807
+ * an instantiated Trigger Widget may be retrieved from the live `triggers` property.
808
+ * ...
809
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-triggers)
810
+ */
811
+ triggers ? : Record<string, FieldTriggerConfig>|Record<string, Widget>
812
+ type ? : 'assignmentfield'
813
+ /**
814
+ * Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
815
+ * as a space separated string, an array of strings, or as an object in which property names with truthy
816
+ * values are used as the class names.
817
+ * ...
818
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-ui)
819
+ */
820
+ ui ? : string|object
821
+ /**
822
+ * `true` to cause the field to be in an invalid state while the typed filter string does not match a record in the store.
823
+ */
824
+ validateFilter ? : boolean
825
+ /**
826
+ * Set to `false` to not highlight a field as invalid while typing, to instead show it on ENTER key press
827
+ * or similar.
828
+ */
829
+ validateOnInput ? : boolean
830
+ /**
831
+ * The initial value of this Combo box. In single select mode (default) it's a simple string value, for
832
+ * [multiSelect](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiSelect) mode, it should be an array of record ids.
833
+ */
834
+ value ? : string|number|string[]|number[]
835
+ /**
836
+ * Field used for item value when populating from store. Setting this to `null` will
837
+ * yield the selected record as the Combo's [value](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#property-value).
838
+ * ...
839
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-valueField)
840
+ */
841
+ valueField ? : string|null
842
+ /**
843
+ * A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/gantt/docs/api/Core/widget/Container).
844
+ * Higher weights go further down.
845
+ */
846
+ weight ? : number
847
+ /**
848
+ * Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
849
+ * will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
850
+ * this config is convenient.
851
+ */
852
+ width ? : string|number
853
+ /**
854
+ * The x position for the widget.
855
+ * ...
856
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-x)
857
+ */
858
+ x ? : number
859
+ /**
860
+ * The y position for the widget.
861
+ * ...
862
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#config-y)
863
+ */
864
+ y ? : number
865
+
866
+ }
867
+
868
+ @Component({
869
+ selector : 'bryntum-assignment-field',
870
+ template : ''
871
+ })
872
+ export class BryntumAssignmentFieldComponent implements OnInit, OnDestroy {
873
+
874
+ public static instanceClass = AssignmentField;
875
+
876
+ public static instanceName = 'AssignmentField';
877
+
878
+ private static bryntumEvents: string[] = [
879
+ 'onAction',
880
+ 'onBeforeDestroy',
881
+ 'onBeforeHide',
882
+ 'onBeforeShow',
883
+ 'onCatchAll',
884
+ 'onChange',
885
+ 'onClear',
886
+ 'onDestroy',
887
+ 'onElementCreated',
888
+ 'onFocusIn',
889
+ 'onFocusOut',
890
+ 'onHide',
891
+ 'onInput',
892
+ 'onPaint',
893
+ 'onReadOnly',
894
+ 'onRecompose',
895
+ 'onResize',
896
+ 'onSelect',
897
+ 'onShow',
898
+ 'onTrigger'
899
+ ];
900
+
901
+ private static bryntumFeatureNames: string[] = [
902
+
903
+ ];
904
+
905
+ private static bryntumConfigs: string[] = BryntumAssignmentFieldComponent.bryntumFeatureNames.concat([
906
+ 'adopt',
907
+ 'align',
908
+ 'alignSelf',
909
+ 'anchor',
910
+ 'appendTo',
911
+ 'ariaDescription',
912
+ 'ariaLabel',
913
+ 'autoComplete',
914
+ 'autoExpand',
915
+ 'autoSelect',
916
+ 'badge',
917
+ 'bubbleEvents',
918
+ 'cacheLastResult',
919
+ 'callOnFunctions',
920
+ 'caseSensitive',
921
+ 'catchEventHandlerExceptions',
922
+ 'centered',
923
+ 'chipView',
924
+ 'clearable',
925
+ 'clearTextOnPickerHide',
926
+ 'clearTextOnSelection',
927
+ 'clearWhenInputEmpty',
928
+ 'cls',
929
+ 'color',
930
+ 'column',
931
+ 'config',
932
+ 'constrainTo',
933
+ 'container',
934
+ 'containValues',
935
+ 'contentElementCls',
936
+ 'createOnUnmatched',
937
+ 'dataField',
938
+ 'dataset',
939
+ 'defaultBindProperty',
940
+ 'detectCSSCompatibilityIssues',
941
+ 'disabled',
942
+ 'displayField',
943
+ 'displayValueRenderer',
944
+ 'dock',
945
+ 'draggable',
946
+ 'editable',
947
+ 'elementAttributes',
948
+ 'emptyText',
949
+ 'encodeFilterParams',
950
+ 'extraData',
951
+ 'filterOnEnter',
952
+ 'filterOperator',
953
+ 'filterParamName',
954
+ 'filterSelected',
955
+ 'flex',
956
+ 'floating',
957
+ 'height',
958
+ 'hidden',
959
+ 'hideAnimation',
960
+ 'hidePickerOnSelect',
961
+ 'hideTrigger',
962
+ 'highlightExternalChange',
963
+ 'hint',
964
+ 'hintHtml',
965
+ 'id',
966
+ 'ignoreParentReadOnly',
967
+ 'inline',
968
+ 'inlinePicker',
969
+ 'inputAlign',
970
+ 'inputAttributes',
971
+ 'inputTag',
972
+ 'inputType',
973
+ 'inputWidth',
974
+ 'insertBefore',
975
+ 'insertFirst',
976
+ 'items',
977
+ 'keyMap',
978
+ 'keyStrokeChangeDelay',
979
+ 'keyStrokeFilterDelay',
980
+ 'label',
981
+ 'labelCls',
982
+ 'labelPosition',
983
+ 'labels',
984
+ 'labelWidth',
985
+ 'listCls',
986
+ 'listeners',
987
+ 'listItemTpl',
988
+ 'localeClass',
989
+ 'localizable',
990
+ 'localizableProperties',
991
+ 'margin',
992
+ 'maskDefaults',
993
+ 'masked',
994
+ 'maxHeight',
995
+ 'maximizeOnMobile',
996
+ 'maxLength',
997
+ 'maxWidth',
998
+ 'minChars',
999
+ 'minHeight',
1000
+ 'minLength',
1001
+ 'minWidth',
1002
+ 'monitorResize',
1003
+ 'multiSelect',
1004
+ 'multiValueSeparator',
1005
+ 'name',
1006
+ 'overlayAnchor',
1007
+ 'owner',
1008
+ 'picker',
1009
+ 'pickerAlignElement',
1010
+ 'pickerWidth',
1011
+ 'placeholder',
1012
+ 'positioned',
1013
+ 'preventTooltipOnTouch',
1014
+ 'primaryFilter',
1015
+ 'projectEvent',
1016
+ 'readOnly',
1017
+ 'relayStoreEvents',
1018
+ 'rendition',
1019
+ 'required',
1020
+ 'revertOnEscape',
1021
+ 'ripple',
1022
+ 'rootElement',
1023
+ 'rtl',
1024
+ 'scrollAction',
1025
+ 'showAnimation',
1026
+ 'showRequiredIndicator',
1027
+ 'showTooltipWhenDisabled',
1028
+ 'skipValidation',
1029
+ 'span',
1030
+ 'spellCheck',
1031
+ 'store',
1032
+ 'tab',
1033
+ 'tabIndex',
1034
+ 'textAlign',
1035
+ 'title',
1036
+ 'tooltip',
1037
+ 'tooltipTemplate',
1038
+ 'triggerAction',
1039
+ 'triggers',
1040
+ 'type',
1041
+ 'ui',
1042
+ 'validateFilter',
1043
+ 'validateOnInput',
1044
+ 'value',
1045
+ 'valueField',
1046
+ 'weight',
1047
+ 'width',
1048
+ 'x',
1049
+ 'y'
1050
+ ]);
1051
+
1052
+ private static bryntumConfigsOnly: string[] = [
1053
+ 'adopt',
1054
+ 'align',
1055
+ 'anchor',
1056
+ 'ariaDescription',
1057
+ 'ariaLabel',
1058
+ 'autoComplete',
1059
+ 'autoExpand',
1060
+ 'autoSelect',
1061
+ 'bubbleEvents',
1062
+ 'cacheLastResult',
1063
+ 'caseSensitive',
1064
+ 'centered',
1065
+ 'chipView',
1066
+ 'clearable',
1067
+ 'clearTextOnPickerHide',
1068
+ 'clearTextOnSelection',
1069
+ 'clearWhenInputEmpty',
1070
+ 'color',
1071
+ 'config',
1072
+ 'constrainTo',
1073
+ 'container',
1074
+ 'containValues',
1075
+ 'contentElementCls',
1076
+ 'createOnUnmatched',
1077
+ 'dataField',
1078
+ 'defaultBindProperty',
1079
+ 'detectCSSCompatibilityIssues',
1080
+ 'displayField',
1081
+ 'displayValueRenderer',
1082
+ 'dock',
1083
+ 'draggable',
1084
+ 'elementAttributes',
1085
+ 'emptyText',
1086
+ 'encodeFilterParams',
1087
+ 'filterOnEnter',
1088
+ 'filterParamName',
1089
+ 'filterSelected',
1090
+ 'floating',
1091
+ 'hideAnimation',
1092
+ 'hidePickerOnSelect',
1093
+ 'hideTrigger',
1094
+ 'highlightExternalChange',
1095
+ 'hint',
1096
+ 'hintHtml',
1097
+ 'ignoreParentReadOnly',
1098
+ 'inline',
1099
+ 'inlinePicker',
1100
+ 'inputAlign',
1101
+ 'inputAttributes',
1102
+ 'inputTag',
1103
+ 'inputType',
1104
+ 'inputWidth',
1105
+ 'items',
1106
+ 'keyStrokeChangeDelay',
1107
+ 'keyStrokeFilterDelay',
1108
+ 'labelCls',
1109
+ 'labelPosition',
1110
+ 'labels',
1111
+ 'labelWidth',
1112
+ 'listCls',
1113
+ 'listeners',
1114
+ 'listItemTpl',
1115
+ 'localeClass',
1116
+ 'localizable',
1117
+ 'localizableProperties',
1118
+ 'maskDefaults',
1119
+ 'masked',
1120
+ 'maxLength',
1121
+ 'minChars',
1122
+ 'minLength',
1123
+ 'monitorResize',
1124
+ 'multiValueSeparator',
1125
+ 'name',
1126
+ 'overlayAnchor',
1127
+ 'owner',
1128
+ 'pickerAlignElement',
1129
+ 'pickerWidth',
1130
+ 'positioned',
1131
+ 'preventTooltipOnTouch',
1132
+ 'primaryFilter',
1133
+ 'projectEvent',
1134
+ 'relayStoreEvents',
1135
+ 'revertOnEscape',
1136
+ 'ripple',
1137
+ 'rootElement',
1138
+ 'scrollAction',
1139
+ 'showAnimation',
1140
+ 'showTooltipWhenDisabled',
1141
+ 'skipValidation',
1142
+ 'spellCheck',
1143
+ 'tab',
1144
+ 'tabIndex',
1145
+ 'textAlign',
1146
+ 'title',
1147
+ 'tooltipTemplate',
1148
+ 'triggerAction',
1149
+ 'type',
1150
+ 'ui',
1151
+ 'validateFilter',
1152
+ 'validateOnInput',
1153
+ 'valueField',
1154
+ 'weight'
1155
+ ];
1156
+
1157
+ private static bryntumProps: string[] = BryntumAssignmentFieldComponent.bryntumFeatureNames.concat([
1158
+ 'alignSelf',
1159
+ 'anchorSize',
1160
+ 'appendTo',
1161
+ 'badge',
1162
+ 'callOnFunctions',
1163
+ 'catchEventHandlerExceptions',
1164
+ 'cls',
1165
+ 'column',
1166
+ 'content',
1167
+ 'dataset',
1168
+ 'disabled',
1169
+ 'editable',
1170
+ 'extraData',
1171
+ 'filterOperator',
1172
+ 'flex',
1173
+ 'focusVisible',
1174
+ 'formula',
1175
+ 'height',
1176
+ 'hidden',
1177
+ 'html',
1178
+ 'id',
1179
+ 'input',
1180
+ 'insertBefore',
1181
+ 'insertFirst',
1182
+ 'keyMap',
1183
+ 'label',
1184
+ 'margin',
1185
+ 'maxHeight',
1186
+ 'maximizeOnMobile',
1187
+ 'maxWidth',
1188
+ 'minHeight',
1189
+ 'minWidth',
1190
+ 'multiSelect',
1191
+ 'parent',
1192
+ 'picker',
1193
+ 'placeholder',
1194
+ 'readOnly',
1195
+ 'rendition',
1196
+ 'required',
1197
+ 'rtl',
1198
+ 'scrollable',
1199
+ 'showRequiredIndicator',
1200
+ 'span',
1201
+ 'store',
1202
+ 'tooltip',
1203
+ 'triggers',
1204
+ 'value',
1205
+ 'width',
1206
+ 'x',
1207
+ 'y'
1208
+ ]);
1209
+
1210
+ private elementRef: ElementRef;
1211
+ public instance!: AssignmentField;
1212
+
1213
+ private bryntumConfig = {
1214
+ adopt : undefined,
1215
+ appendTo : undefined,
1216
+ href : undefined,
1217
+ angularComponent : this,
1218
+ features : {},
1219
+ listeners : {}
1220
+ };
1221
+
1222
+ constructor(element: ElementRef) {
1223
+ this.elementRef = element;
1224
+ }
1225
+
1226
+ // Configs only
1227
+ @Input() adopt ! : HTMLElement|string;
1228
+ @Input() align ! : AlignSpec|string;
1229
+ @Input() anchor ! : boolean;
1230
+ @Input() ariaDescription ! : string;
1231
+ @Input() ariaLabel ! : string;
1232
+ @Input() autoComplete ! : string;
1233
+ @Input() autoExpand ! : boolean;
1234
+ @Input() autoSelect ! : boolean;
1235
+ @Input() bubbleEvents ! : object;
1236
+ @Input() cacheLastResult ! : number|string|Duration|DurationConfig;
1237
+ @Input() caseSensitive ! : boolean;
1238
+ @Input() centered ! : boolean;
1239
+ @Input() chipView ! : ChipViewConfig;
1240
+ @Input() clearable ! : boolean|FieldTriggerConfig;
1241
+ @Input() clearTextOnPickerHide ! : boolean;
1242
+ @Input() clearTextOnSelection ! : boolean;
1243
+ @Input() clearWhenInputEmpty ! : boolean;
1244
+ @Input() color ! : string;
1245
+ @Input() config ! : object;
1246
+ @Input() constrainTo ! : HTMLElement|Widget|Rectangle;
1247
+ @Input() container ! : Record<string, GanttContainerItemConfig>|GanttContainerItemConfig[]|FieldContainerConfig|FieldContainer;
1248
+ @Input() containValues ! : boolean|string|((field: Field) => boolean);
1249
+ @Input() contentElementCls ! : string|object;
1250
+ @Input() createOnUnmatched ! : ((name: string, combo: Combo) => Model)|string|boolean;
1251
+ @Input() dataField ! : string;
1252
+ @Input() defaultBindProperty ! : string;
1253
+ @Input() detectCSSCompatibilityIssues ! : boolean;
1254
+ @Input() displayField ! : string;
1255
+ @Input() displayValueRenderer ! : (record: Model|ComboModel, combo: Combo) => string|void;
1256
+ @Input() dock ! : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object;
1257
+ @Input() draggable ! : boolean|{
1258
+ handleSelector?: string
1259
+ };
1260
+ @Input() elementAttributes ! : Record<string, string|null>;
1261
+ @Input() emptyText ! : string;
1262
+ @Input() encodeFilterParams ! : (filters: object[]) => object[];
1263
+ @Input() filterOnEnter ! : boolean;
1264
+ @Input() filterParamName ! : string;
1265
+ @Input() filterSelected ! : boolean;
1266
+ @Input() floating ! : boolean;
1267
+ @Input() hideAnimation ! : boolean|object;
1268
+ @Input() hidePickerOnSelect ! : boolean;
1269
+ @Input() hideTrigger ! : boolean;
1270
+ @Input() highlightExternalChange ! : boolean;
1271
+ @Input() hint ! : string|((data: { source: Field, value: any }) => string);
1272
+ @Input() hintHtml ! : string|((data: { source: Field, value: any }) => string);
1273
+ @Input() ignoreParentReadOnly ! : boolean;
1274
+ @Input() inline ! : boolean;
1275
+ @Input() inlinePicker ! : boolean;
1276
+ @Input() inputAlign ! : string;
1277
+ @Input() inputAttributes ! : Record<string, string>;
1278
+ @Input() inputTag ! : string;
1279
+ @Input() inputType ! : string;
1280
+ @Input() inputWidth ! : string|number;
1281
+ @Input() items ! : object[]|string[]|object;
1282
+ @Input() keyStrokeChangeDelay ! : number;
1283
+ @Input() keyStrokeFilterDelay ! : number;
1284
+ @Input() labelCls ! : string|object;
1285
+ @Input() labelPosition ! : 'before'|'above'|null;
1286
+ @Input() labels ! : object[];
1287
+ @Input() labelWidth ! : string|number;
1288
+ @Input() listCls ! : string;
1289
+ @Input() listeners ! : AssignmentFieldListeners;
1290
+ @Input() listItemTpl ! : (record: Model|ComboModel) => string|void;
1291
+ @Input() localeClass ! : typeof Base;
1292
+ @Input() localizable ! : boolean;
1293
+ @Input() localizableProperties ! : string[];
1294
+ @Input() maskDefaults ! : MaskConfig;
1295
+ @Input() masked ! : boolean|string|MaskConfig;
1296
+ @Input() maxLength ! : number;
1297
+ @Input() minChars ! : number;
1298
+ @Input() minLength ! : number;
1299
+ @Input() monitorResize ! : boolean|{
1300
+ immediate?: boolean
1301
+ };
1302
+ @Input() multiValueSeparator ! : string;
1303
+ @Input() name ! : string;
1304
+ @Input() overlayAnchor ! : boolean;
1305
+ @Input() owner ! : Widget|any;
1306
+ @Input() pickerAlignElement ! : string;
1307
+ @Input() pickerWidth ! : number|string;
1308
+ @Input() positioned ! : boolean;
1309
+ @Input() preventTooltipOnTouch ! : boolean;
1310
+ @Input() primaryFilter ! : CollectionFilterConfig;
1311
+ @Input() projectEvent ! : TaskModel;
1312
+ @Input() relayStoreEvents ! : boolean;
1313
+ @Input() revertOnEscape ! : boolean;
1314
+ @Input() ripple ! : boolean|{
1315
+ delegate?: string
1316
+ color?: string
1317
+ radius?: number
1318
+ clip?: string
1319
+ };
1320
+ @Input() rootElement ! : ShadowRoot|HTMLElement;
1321
+ @Input() scrollAction ! : 'hide'|'realign'|null;
1322
+ @Input() showAnimation ! : boolean|object;
1323
+ @Input() showTooltipWhenDisabled ! : boolean;
1324
+ @Input() skipValidation ! : boolean;
1325
+ @Input() spellCheck ! : boolean;
1326
+ @Input() tab ! : boolean|TabConfig;
1327
+ @Input() tabIndex ! : number;
1328
+ @Input() textAlign ! : 'left'|'center'|'right'|'start'|'end';
1329
+ @Input() title ! : string;
1330
+ @Input() tooltipTemplate ! : (data: { taskRecord: TaskModel, assignmentRecords: AssignmentModel }) => string|DomConfig|DomConfig[];
1331
+ @Input() triggerAction ! : 'all'|'last'|null;
1332
+ @Input() type ! : 'assignmentfield';
1333
+ @Input() ui ! : string|object;
1334
+ @Input() validateFilter ! : boolean;
1335
+ @Input() validateOnInput ! : boolean;
1336
+ @Input() valueField ! : string|null;
1337
+ @Input() weight ! : number;
1338
+
1339
+ // Configs and properties
1340
+ @Input() alignSelf ! : string;
1341
+ @Input() appendTo ! : HTMLElement|string;
1342
+ @Input() badge ! : string;
1343
+ @Input() callOnFunctions ! : boolean;
1344
+ @Input() catchEventHandlerExceptions ! : boolean;
1345
+ @Input() cls ! : string|object;
1346
+ @Input() column ! : number;
1347
+ @Input() dataset ! : object|Record<string, string>;
1348
+ @Input() disabled ! : boolean|'inert';
1349
+ @Input() editable ! : boolean;
1350
+ @Input() extraData ! : any;
1351
+ @Input() filterOperator ! : CollectionCompareOperator;
1352
+ @Input() flex ! : number|string;
1353
+ @Input() height ! : number|string;
1354
+ @Input() hidden ! : boolean;
1355
+ @Input() id ! : string;
1356
+ @Input() insertBefore ! : HTMLElement|string;
1357
+ @Input() insertFirst ! : HTMLElement|string;
1358
+ @Input() keyMap ! : Record<string, KeyMapConfig>;
1359
+ @Input() label ! : string;
1360
+ @Input() margin ! : number|string;
1361
+ @Input() maxHeight ! : string|number;
1362
+ @Input() maximizeOnMobile ! : number|string;
1363
+ @Input() maxWidth ! : string|number;
1364
+ @Input() minHeight ! : string|number;
1365
+ @Input() minWidth ! : string|number;
1366
+ @Input() multiSelect ! : boolean;
1367
+ @Input() picker ! : ListConfig|List|AssignmentGridConfig|AssignmentGrid;
1368
+ @Input() placeholder ! : string;
1369
+ @Input() readOnly ! : boolean;
1370
+ @Input() rendition ! : 'outlined'|'filled'|string;
1371
+ @Input() required ! : boolean;
1372
+ @Input() rtl ! : boolean;
1373
+ @Input() showRequiredIndicator ! : string;
1374
+ @Input() span ! : number;
1375
+ @Input() store ! : Store|StoreConfig;
1376
+ @Input() tooltip ! : string|TooltipConfig|null;
1377
+ @Input() triggers ! : Record<string, FieldTriggerConfig>|Record<string, Widget>;
1378
+ @Input() value ! : object|number|string|string[]|number[];
1379
+ @Input() width ! : number|string;
1380
+ @Input() x ! : number;
1381
+ @Input() y ! : number;
1382
+
1383
+ // Properties only
1384
+ @Input() anchorSize ! : number[];
1385
+ @Input() content ! : string;
1386
+ @Input() focusVisible ! : boolean;
1387
+ @Input() formula ! : string;
1388
+ @Input() html ! : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig;
1389
+ @Input() input ! : HTMLElement;
1390
+ @Input() parent ! : Widget;
1391
+ @Input() scrollable ! : Scroller;
1392
+
1393
+ // Events emitters
1394
+ /**
1395
+ * The default action was performed (an item in the list was selected)
1396
+ * @param {object} event Event object
1397
+ * @param {Core.widget.Combo} event.source The combo
1398
+ * @param {any} event.value The [value](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-valueField) of the selected record
1399
+ * @param {Core.data.Model} event.record Selected record
1400
+ * @param {Core.data.Model[]} event.records Selected records as an array if [multiSelect](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiSelect) is `true`
1401
+ * @param {boolean} event.userAction `true` if the value change is due to user interaction
1402
+ */
1403
+ @Output() onAction: any = new EventEmitter<((event: { source: Combo, value: any, record: Model, records: Model[], userAction: boolean }) => void)|string>();
1404
+ /**
1405
+ * Fires before an object is destroyed.
1406
+ * @param {object} event Event object
1407
+ * @param {Core.Base} event.source The Object that is being destroyed.
1408
+ */
1409
+ @Output() onBeforeDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
1410
+ /**
1411
+ * Triggered before a widget is hidden. Return `false` to prevent the action.
1412
+ * @param {object} event Event object
1413
+ * @param {Core.widget.Widget} event.source The widget being hidden.
1414
+ */
1415
+ @Output() onBeforeHide: any = new EventEmitter<((event: { source: Widget }) => Promise<boolean>|boolean|void)|string>();
1416
+ /**
1417
+ * Triggered before a widget is shown. Return `false` to prevent the action.
1418
+ * @param {object} event Event object
1419
+ * @param {Core.widget.Widget,any} event.source The widget being shown
1420
+ */
1421
+ @Output() onBeforeShow: any = new EventEmitter<((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string>();
1422
+ /**
1423
+ * Fires when any other event is fired from the object.
1424
+ * ...
1425
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#event-catchAll)
1426
+ * @param {object} event Event object
1427
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
1428
+ * @param {string} event.event.type The type of the event which is caught by the listener
1429
+ */
1430
+ @Output() onCatchAll: any = new EventEmitter<((event: {[key: string]: any, type: string}) => void)|string>();
1431
+ /**
1432
+ * Fired when this field's value changes.
1433
+ * @param {object} event Event object
1434
+ * @param {Core.widget.Field,any} event.source This Field
1435
+ * @param {string,number,boolean,any} event.value This field's value
1436
+ * @param {string,number,boolean,any} event.oldValue This field's previous value
1437
+ * @param {boolean} event.valid True if this field is in a valid state
1438
+ * @param {Event} event.event The triggering DOM event if any
1439
+ * @param {boolean} event.userAction Triggered by user taking an action (`true`) or by setting a value (`false`)
1440
+ * @param {boolean} event.checked
1441
+ */
1442
+ @Output() onChange: any = new EventEmitter<((event: { source: Field|any, value: string|number|boolean|any, oldValue: string|number|boolean|any, valid: boolean, event: Event, userAction: boolean, checked: boolean }) => void)|string>();
1443
+ /**
1444
+ * Fired when this field is [cleared](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#function-clear).
1445
+ * ...
1446
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#event-clear)
1447
+ * @param {object} event Event object
1448
+ * @param {Core.widget.Field,any} event.source This Field
1449
+ */
1450
+ @Output() onClear: any = new EventEmitter<((event: { source: Field|any }) => void)|string>();
1451
+ /**
1452
+ * Fires when an object is destroyed.
1453
+ * @param {object} event Event object
1454
+ * @param {Core.Base} event.source The Object that is being destroyed.
1455
+ */
1456
+ @Output() onDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
1457
+ /**
1458
+ * Triggered when a widget's [element](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#property-element) is available.
1459
+ * @param {object} event Event object
1460
+ * @param {HTMLElement} event.element The Widget's element.
1461
+ */
1462
+ @Output() onElementCreated: any = new EventEmitter<((event: { element: HTMLElement }) => void)|string>();
1463
+ /**
1464
+ * Fired when focus enters this Widget.
1465
+ * @param {object} event Event object
1466
+ * @param {Core.widget.Widget} event.source This Widget
1467
+ * @param {HTMLElement} event.fromElement The element which lost focus.
1468
+ * @param {HTMLElement} event.toElement The element which gained focus.
1469
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1470
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1471
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1472
+ */
1473
+ @Output() onFocusIn: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1474
+ /**
1475
+ * Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
1476
+ * focus moving from within this Widget's ownership tree, even if there are floating widgets
1477
+ * will not trigger this event. This is when focus exits this widget completely.
1478
+ * @param {object} event Event object
1479
+ * @param {Core.widget.Widget} event.source This Widget
1480
+ * @param {HTMLElement} event.fromElement The element which lost focus.
1481
+ * @param {HTMLElement} event.toElement The element which gained focus.
1482
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1483
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1484
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1485
+ */
1486
+ @Output() onFocusOut: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1487
+ /**
1488
+ * Triggered after a widget was hidden
1489
+ * @param {object} event Event object
1490
+ * @param {Core.widget.Widget} event.source The widget
1491
+ */
1492
+ @Output() onHide: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1493
+ /**
1494
+ * User typed into the field. Please note that the value attached to this event is the raw input field value and
1495
+ * not the combos value
1496
+ * @param {object} event Event object
1497
+ * @param {Core.widget.Combo} event.source The combo.
1498
+ * @param {string} event.value Raw input value
1499
+ * @param {Event} event.event The triggering DOM event if any.
1500
+ */
1501
+ @Output() onInput: any = new EventEmitter<((event: { source: Combo, value: string, event: Event }) => void)|string>();
1502
+ /**
1503
+ * Triggered when a widget which had been in a non-visible state for any reason
1504
+ * achieves visibility.
1505
+ * ...
1506
+ * [View online docs...](https://bryntum.com/products/gantt/docs/api/Gantt/widget/AssignmentField#event-paint)
1507
+ * @param {object} event Event object
1508
+ * @param {Core.widget.Widget} event.source The widget being painted.
1509
+ * @param {boolean} event.firstPaint `true` if this is the first paint.
1510
+ */
1511
+ @Output() onPaint: any = new EventEmitter<((event: { source: Widget, firstPaint: boolean }) => void)|string>();
1512
+ /**
1513
+ * Fired when a Widget's read only state is toggled
1514
+ * @param {object} event Event object
1515
+ * @param {boolean} event.readOnly Read only or not
1516
+ */
1517
+ @Output() onReadOnly: any = new EventEmitter<((event: { readOnly: boolean }) => void)|string>();
1518
+ /**
1519
+ * This event is fired after a widget's elements have been synchronized due to a direct or indirect call
1520
+ * to [recompose](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#function-recompose), if this results in some change to the widget's rendered DOM elements.
1521
+ */
1522
+ @Output() onRecompose: any = new EventEmitter<(() => void)|string>();
1523
+ /**
1524
+ * Fired when the encapsulating element of a Widget resizes *only when [monitorResize](https://bryntum.com/products/gantt/docs/api/Core/widget/Widget#config-monitorResize) is `true`*.
1525
+ * @param {object} event Event object
1526
+ * @param {Core.widget.Widget} event.source This Widget
1527
+ * @param {number} event.width The new width
1528
+ * @param {number} event.height The new height
1529
+ * @param {number} event.oldWidth The old width
1530
+ * @param {number} event.oldHeight The old height
1531
+ */
1532
+ @Output() onResize: any = new EventEmitter<((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string>();
1533
+ /**
1534
+ * An item in the list was selected
1535
+ * @param {object} event Event object
1536
+ * @param {Core.widget.Combo} event.source The combo
1537
+ * @param {Core.data.Model} event.record Selected record
1538
+ * @param {Core.data.Model[]} event.records Selected records as an array if [multiSelect](https://bryntum.com/products/gantt/docs/api/Core/widget/Combo#config-multiSelect) is `true`
1539
+ * @param {boolean} event.userAction `true` if the value change is due to user interaction
1540
+ */
1541
+ @Output() onSelect: any = new EventEmitter<((event: { source: Combo, record: Model, records: Model[], userAction: boolean }) => void)|string>();
1542
+ /**
1543
+ * Triggered after a widget is shown.
1544
+ * @param {object} event Event object
1545
+ * @param {Core.widget.Widget} event.source The widget
1546
+ */
1547
+ @Output() onShow: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1548
+ /**
1549
+ * User clicked one of this field's [triggers](https://bryntum.com/products/gantt/docs/api/Core/widget/Field#property-triggers)
1550
+ * @param {object} event Event object
1551
+ * @param {Core.widget.Field,any} event.source This field
1552
+ * @param {Core.widget.Widget} event.trigger The trigger activated by click or touch tap.
1553
+ */
1554
+ @Output() onTrigger: any = new EventEmitter<((event: { source: Field|any, trigger: Widget }) => void)|string>();
1555
+
1556
+ /**
1557
+ * Create and append the underlying widget
1558
+ */
1559
+ ngOnInit(): void {
1560
+ const
1561
+ me = this,
1562
+ {
1563
+ elementRef,
1564
+ bryntumConfig
1565
+ } = me,
1566
+ {
1567
+ instanceClass,
1568
+ instanceName,
1569
+ bryntumConfigs,
1570
+ bryntumEvents
1571
+ } = BryntumAssignmentFieldComponent;
1572
+
1573
+ bryntumConfigs.filter(prop => prop in this).forEach(prop => {
1574
+ // @ts-ignore
1575
+ WrapperHelper.applyPropValue(bryntumConfig, prop, this[prop]);
1576
+ if (['features', 'config'].includes(prop)) {
1577
+ WrapperHelper.devWarningConfigProp(instanceName, prop);
1578
+ }
1579
+ });
1580
+ // @ts-ignore
1581
+ bryntumEvents.filter(event => this[event] && this[event].observers.length > 0).forEach(event => {
1582
+ const
1583
+ uncapitalize = (str: string) => str.charAt(0).toLowerCase() + str.slice(1),
1584
+ eventName = (str: string) => uncapitalize(str.slice(2));
1585
+
1586
+ // @ts-ignore
1587
+ bryntumConfig.listeners[eventName(event)] = e => {
1588
+ // @ts-ignore
1589
+ me[event].emit(e);
1590
+ // EventEmitter does not return values in the normal way, work around it by setting `returnValue` flag
1591
+ // in Angular listeners
1592
+ return e.returnValue;
1593
+ };
1594
+ });
1595
+
1596
+ // If component has no container specified in config then use adopt to Wrapper's element
1597
+ const
1598
+ containerParam = [
1599
+ 'adopt',
1600
+ 'appendTo',
1601
+ 'insertAfter',
1602
+ 'insertBefore'
1603
+ // @ts-ignore
1604
+ ].find(prop => bryntumConfig[prop]);
1605
+ if (!containerParam) {
1606
+ if (instanceName === 'Button' || elementRef.nativeElement.getRootNode() instanceof ShadowRoot) {
1607
+ // Button should always be <a> or <button> inside owner element
1608
+ bryntumConfig.appendTo = elementRef.nativeElement;
1609
+ }
1610
+ else {
1611
+ bryntumConfig.adopt = elementRef.nativeElement;
1612
+ }
1613
+ }
1614
+ else {
1615
+ WrapperHelper.devWarningContainer(instanceName, containerParam);
1616
+ }
1617
+
1618
+ // @ts-ignore
1619
+ me.instance = instanceName === 'Widget' ? Widget.create(bryntumConfig) : new instanceClass(bryntumConfig);
1620
+
1621
+ }
1622
+
1623
+ /**
1624
+ * Watch for changes
1625
+ * @param changes
1626
+ */
1627
+ ngOnChanges(changes: SimpleChanges): void {
1628
+ const
1629
+ { instance } = this,
1630
+ { instanceName } = BryntumAssignmentFieldComponent;
1631
+ if (!instance) {
1632
+ return;
1633
+ }
1634
+ // Iterate over all changes
1635
+ Object.entries(changes).forEach(([prop, change]) => {
1636
+ const
1637
+ newValue = (change as SimpleChange).currentValue,
1638
+ { instance } = this,
1639
+ { bryntumConfigsOnly, bryntumProps } = BryntumAssignmentFieldComponent;
1640
+ if (bryntumProps.includes(prop)) {
1641
+ WrapperHelper.applyPropValue(instance, prop, newValue, false);
1642
+ if (bryntumConfigsOnly.includes(prop)) {
1643
+ WrapperHelper.devWarningUpdateProp(instanceName, prop);
1644
+ }
1645
+ }
1646
+ });
1647
+ }
1648
+
1649
+ /**
1650
+ * Destroy the component
1651
+ */
1652
+ ngOnDestroy(): void {
1653
+ // @ts-ignore
1654
+ if (this.instance && this.instance.destroy) {
1655
+ this.instance.destroy();
1656
+ }
1657
+ }
1658
+ }