@bryntum/taskboard-angular 7.1.1 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +230 -15
  2. package/package.json +1 -1
  3. package/src/lib/bryntum-button-group.component.ts +1213 -0
  4. package/src/lib/bryntum-button.component.ts +1190 -0
  5. package/src/lib/bryntum-chat-panel.component.ts +1435 -0
  6. package/src/lib/bryntum-checkbox-group.component.ts +1478 -0
  7. package/src/lib/bryntum-checkbox.component.ts +1333 -0
  8. package/src/lib/bryntum-chip-view.component.ts +1225 -0
  9. package/src/lib/bryntum-code-editor.component.ts +1419 -0
  10. package/src/lib/bryntum-color-field.component.ts +1334 -0
  11. package/src/lib/bryntum-column-combo.component.ts +1645 -0
  12. package/src/lib/bryntum-column-filter-field.component.ts +1360 -0
  13. package/src/lib/bryntum-column-picker-button.component.ts +1200 -0
  14. package/src/lib/bryntum-column-scroll-button.component.ts +1200 -0
  15. package/src/lib/bryntum-combo.component.ts +1634 -0
  16. package/src/lib/bryntum-container.component.ts +1166 -0
  17. package/src/lib/bryntum-date-field.component.ts +1413 -0
  18. package/src/lib/bryntum-date-picker.component.ts +1756 -0
  19. package/src/lib/bryntum-date-range-field.component.ts +1417 -0
  20. package/src/lib/bryntum-date-time-field.component.ts +1261 -0
  21. package/src/lib/bryntum-demo-code-editor.component.ts +1441 -0
  22. package/src/lib/bryntum-demo-header.component.ts +141 -0
  23. package/src/lib/bryntum-display-field.component.ts +1308 -0
  24. package/src/lib/bryntum-duration-field.component.ts +1390 -0
  25. package/src/lib/bryntum-editor.component.ts +1343 -0
  26. package/src/lib/bryntum-field-filter-picker-group.component.ts +1308 -0
  27. package/src/lib/bryntum-field-filter-picker.component.ts +1272 -0
  28. package/src/lib/bryntum-field-set.component.ts +1408 -0
  29. package/src/lib/bryntum-file-field.component.ts +1313 -0
  30. package/src/lib/bryntum-file-picker.component.ts +1199 -0
  31. package/src/lib/bryntum-filter-field.component.ts +1367 -0
  32. package/src/lib/bryntum-fullscreen-button.component.ts +53 -0
  33. package/src/lib/bryntum-hint.component.ts +1506 -0
  34. package/src/lib/bryntum-label.component.ts +989 -0
  35. package/src/lib/bryntum-list.component.ts +1196 -0
  36. package/src/lib/bryntum-menu.component.ts +1520 -0
  37. package/src/lib/bryntum-month-picker.component.ts +1400 -0
  38. package/src/lib/bryntum-number-field.component.ts +1368 -0
  39. package/src/lib/bryntum-paging-toolbar.component.ts +1243 -0
  40. package/src/lib/bryntum-panel.component.ts +1377 -0
  41. package/src/lib/bryntum-password-field.component.ts +1296 -0
  42. package/src/lib/bryntum-project-combo.component.ts +1648 -0
  43. package/src/lib/bryntum-radio-group.component.ts +1446 -0
  44. package/src/lib/bryntum-radio.component.ts +1333 -0
  45. package/src/lib/bryntum-resources-combo.component.ts +1644 -0
  46. package/src/lib/bryntum-scheduler-project-combo.component.ts +1638 -0
  47. package/src/lib/bryntum-slide-toggle.component.ts +1333 -0
  48. package/src/lib/bryntum-slider.component.ts +1112 -0
  49. package/src/lib/bryntum-splitter.component.ts +1025 -0
  50. package/src/lib/bryntum-swimlane-combo.component.ts +1644 -0
  51. package/src/lib/bryntum-swimlane-filter-field.component.ts +1377 -0
  52. package/src/lib/bryntum-swimlane-picker-button.component.ts +1200 -0
  53. package/src/lib/bryntum-swimlane-scroll-button.component.ts +1200 -0
  54. package/src/lib/bryntum-tab-panel.component.ts +1441 -0
  55. package/src/lib/bryntum-tag-combo.component.ts +1651 -0
  56. package/src/lib/bryntum-task-board-base.component.ts +2388 -0
  57. package/src/lib/bryntum-task-board-field-filter-picker-group.component.ts +1316 -0
  58. package/src/lib/bryntum-task-board-field-filter-picker.component.ts +1254 -0
  59. package/src/lib/bryntum-task-board-project-model.component.ts +1026 -0
  60. package/src/lib/bryntum-task-board.component.ts +2392 -0
  61. package/src/lib/bryntum-task-color-combo.component.ts +1334 -0
  62. package/src/lib/bryntum-task-filter-field.component.ts +1377 -0
  63. package/src/lib/bryntum-text-area-field.component.ts +1312 -0
  64. package/src/lib/bryntum-text-area-picker-field.component.ts +1343 -0
  65. package/src/lib/bryntum-text-field.component.ts +1321 -0
  66. package/src/lib/bryntum-time-field.component.ts +1388 -0
  67. package/src/lib/bryntum-time-picker.component.ts +1207 -0
  68. package/src/lib/bryntum-todo-list-field.component.ts +1318 -0
  69. package/src/lib/bryntum-toolbar.component.ts +1234 -0
  70. package/src/lib/bryntum-undo-redo.component.ts +1179 -0
  71. package/src/lib/bryntum-widget.component.ts +982 -0
  72. package/src/lib/bryntum-year-picker.component.ts +1423 -0
  73. package/src/lib/bryntum-zoom-slider.component.ts +1122 -0
  74. package/src/lib/taskboard.module.ts +232 -0
  75. package/src/lib/wrapper.helper.ts +89 -0
  76. package/src/public-api.ts +77 -0
@@ -0,0 +1,1196 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /**
3
+ * Angular wrapper for Bryntum List
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, Collection, CollectionConfig, DomConfig, KeyMapConfig, List, ListListeners, MaskConfig, Model, ModelConfig, Rectangle, Scroller, ScrollerConfig, Store, StoreConfig, TabConfig, TooltipConfig, VueConfig, Widget } from '@bryntum/taskboard';
11
+
12
+ import { StringHelper } from '@bryntum/taskboard';
13
+
14
+ export type BryntumListProps = {
15
+ // Configs
16
+ /**
17
+ * Configure as `true` to activate items on mouseover. This is used by the Combo
18
+ * field when using a List as its dropdown.
19
+ */
20
+ activateOnMouseover ? : boolean
21
+ /**
22
+ * Element (or element id) to adopt as this Widget's encapsulating element. The widget's
23
+ * content will be placed inside this element.
24
+ * ...
25
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-adopt)
26
+ */
27
+ adopt ? : HTMLElement|string
28
+ /**
29
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
30
+ * ...
31
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-align)
32
+ */
33
+ align ? : AlignSpec|string
34
+ /**
35
+ * When this widget is a child of a [Container](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container), it will by default be participating in a
36
+ * flexbox layout. This config allows you to set this widget's
37
+ * [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) style.
38
+ */
39
+ alignSelf ? : string
40
+ /**
41
+ * Configure as `true` to allow selecting groups (all the group child records will be toggled). Only
42
+ * applicable when the store is grouped.
43
+ */
44
+ allowGroupSelect ? : boolean
45
+ /**
46
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating) and being shown through [showBy](#Core/widget/Widget#function-showBy).*
47
+ * `true` to show a connector arrow pointing to the align target.
48
+ */
49
+ anchor ? : boolean
50
+ /**
51
+ * Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
52
+ * runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-element).
53
+ */
54
+ appendTo ? : HTMLElement|string
55
+ /**
56
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
57
+ * into an element which will be linked using the `aria-describedby` attribute.
58
+ * ...
59
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-ariaDescription)
60
+ */
61
+ ariaDescription ? : string
62
+ /**
63
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
64
+ * the `aria-label` attribute.
65
+ * ...
66
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-ariaLabel)
67
+ */
68
+ ariaLabel ? : string
69
+ /**
70
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
71
+ * hierarchy when triggered.
72
+ * ...
73
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-bubbleEvents)
74
+ */
75
+ bubbleEvents ? : object
76
+ /**
77
+ * Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
78
+ * ...
79
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-callOnFunctions)
80
+ */
81
+ callOnFunctions ? : boolean
82
+ /**
83
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
84
+ * application state is undefined. Code which follows the event handler will *not* be executed.
85
+ * ...
86
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-catchEventHandlerExceptions)
87
+ */
88
+ catchEventHandlerExceptions ? : boolean
89
+ /**
90
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
91
+ * Set to `true` to centre the Widget in browser viewport space.
92
+ */
93
+ centered ? : boolean
94
+ /**
95
+ * Configure as `true` to clear selection when clicking on empty space inside the List´s element.
96
+ */
97
+ clearSelectionOnEmptySpaceClick ? : boolean
98
+ /**
99
+ * Custom CSS classes to add to element.
100
+ * May be specified as a space separated string, or as an object in which property names
101
+ * with truthy values are used as the class names:
102
+ * ...
103
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-cls)
104
+ */
105
+ cls ? : string|object
106
+ /**
107
+ * True to add a collapse icon to toggle groups being collapsed or expanded
108
+ */
109
+ collapsibleGroups ? : boolean
110
+ /**
111
+ * Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
112
+ * `style` block.
113
+ * ...
114
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-color)
115
+ */
116
+ color ? : string
117
+ /**
118
+ * Programmatic control over which column to start in when used in a grid layout.
119
+ */
120
+ column ? : number
121
+ config ? : object
122
+ /**
123
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating) or [positioned](#Core/widget/Widget#config-positioned).*
124
+ * Element, Widget or Rectangle to which this Widget is constrained.
125
+ */
126
+ constrainTo ? : HTMLElement|Widget|Rectangle
127
+ /**
128
+ * The HTML content that coexists with sibling elements which may have been added to the
129
+ * [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement) by plugins and features.
130
+ * When specifying html, this widget's element will also have the [htmlCls](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-htmlCls)
131
+ * class added to its classList, to allow targeted styling.
132
+ */
133
+ content ? : string
134
+ /**
135
+ * Custom CSS classes to add to the [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement).
136
+ * May be specified as a space separated string, or as an object in which property names
137
+ * with truthy values are used as the class names:
138
+ * ...
139
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-contentElementCls)
140
+ */
141
+ contentElementCls ? : string|object
142
+ /**
143
+ * When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
144
+ * field on the expanded record to use for populating this widget's store (if applicable)
145
+ */
146
+ dataField ? : string
147
+ /**
148
+ * Object to apply to elements dataset (each key will be used as a data-attribute on the element)
149
+ */
150
+ dataset ? : Record<string, string>
151
+ /**
152
+ * The name of the property to set when a single value is to be applied to this Widget. Such as when used
153
+ * in a grid WidgetColumn, this is the property to which the column's `field` is applied.
154
+ */
155
+ defaultBindProperty ? : string
156
+ /**
157
+ * Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
158
+ * ...
159
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-detectCSSCompatibilityIssues)
160
+ */
161
+ detectCSSCompatibilityIssues ? : boolean
162
+ /**
163
+ * Disable or enable the widget. It is similar to [readOnly](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-readOnly) except a disabled widget
164
+ * cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
165
+ * ...
166
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-disabled)
167
+ */
168
+ disabled ? : boolean|'inert'
169
+ /**
170
+ * The model field to render into each list item
171
+ */
172
+ displayField ? : string
173
+ /**
174
+ * Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/taskboard/docs/api/Core/widget/Panel)
175
+ * [strips collection](https://bryntum.com/products/taskboard/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
176
+ * `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
177
+ * body. Such widgets are called "edge strips".
178
+ * ...
179
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-dock)
180
+ */
181
+ dock ? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
182
+ /**
183
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
184
+ * Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
185
+ * property which controls when a drag should start.
186
+ * ...
187
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-draggable)
188
+ */
189
+ draggable ? : boolean|{
190
+ handleSelector?: string
191
+ }
192
+ /**
193
+ * An object specifying attributes to assign to the root element of this widget.
194
+ * Set `null` value to attribute to remove it.
195
+ * ...
196
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-elementAttributes)
197
+ */
198
+ elementAttributes ? : Record<string, string|null>
199
+ /**
200
+ * The text to show when the list is empty. If not set, the list will be empty.
201
+ */
202
+ emptyText ? : string
203
+ extraData ? : any
204
+ /**
205
+ * When this widget is a child of a [Container](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container), it will by default be participating in a
206
+ * flexbox layout. This config allows you to set this widget's
207
+ * [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
208
+ * This may be configured as a single number or a `&lt;flex-grow&gt; &lt;flex-shrink&gt; &lt;flex-basis&gt;` format string.
209
+ * numeric-only values are interpreted as the `flex-grow` value.
210
+ */
211
+ flex ? : number|string
212
+ /**
213
+ * Set to `true` to move the widget out of the document flow and position it
214
+ * absolutely in browser viewport space.
215
+ */
216
+ floating ? : boolean
217
+ /**
218
+ * Configure this as a function or the name of a function, which when passed a record in the
219
+ * list, returns a CSS class name string to apply to its list item.
220
+ * @param {Core.data.Model} record The record
221
+ * @returns {string}
222
+ */
223
+ getItemCls ? : ((record: Model) => string)|string
224
+ /**
225
+ * Configure this as a function or the name of a function, which when passed a record in the
226
+ * list, returns a style string to apply to its list item.
227
+ * @param {Core.data.Model} record The record
228
+ * @returns {string}
229
+ */
230
+ getItemStyle ? : ((record: Model) => string)|string
231
+ /**
232
+ * Template function which is passed a group record and the uppercased group field name. The text returned
233
+ * will be rendered as the group header.
234
+ * @param {Core.data.Model} record The record
235
+ * @param {string} groupName The current group name
236
+ * @returns {string}
237
+ */
238
+ groupHeaderTpl ? : (record: Model, groupName: string) => string
239
+ /**
240
+ * Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
241
+ * which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
242
+ * cases this config is convenient.
243
+ */
244
+ height ? : string|number
245
+ /**
246
+ * Configure with true to make widget initially hidden.
247
+ */
248
+ hidden ? : boolean
249
+ /**
250
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
251
+ * ...
252
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-hideAnimation)
253
+ */
254
+ hideAnimation ? : boolean|object
255
+ /**
256
+ * The HTML to display initially or a function returning the markup (called at widget construction time).
257
+ * ...
258
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-html)
259
+ * @param {Core.widget.Widget} widget The calling Widget
260
+ * @returns {string}
261
+ */
262
+ html ? : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig
263
+ /**
264
+ * The CSS class(es) to add when HTML content is being applied to this widget.
265
+ */
266
+ htmlCls ? : string|object
267
+ /**
268
+ * Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
269
+ */
270
+ id ? : string
271
+ /**
272
+ * Determines if the widgets read-only state should be controlled by its parent.
273
+ * ...
274
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-ignoreParentReadOnly)
275
+ */
276
+ ignoreParentReadOnly ? : boolean
277
+ /**
278
+ * Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
279
+ */
280
+ insertBefore ? : HTMLElement|string
281
+ /**
282
+ * Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
283
+ */
284
+ insertFirst ? : HTMLElement|string
285
+ /**
286
+ * A function, or the name of a function in the ownership hierarchy which is used to determine
287
+ * whether a record is selectable. By default, all records are selectable except group header
288
+ * records in a grouped store.
289
+ * @returns {boolean} `true` if the record is selectable
290
+ */
291
+ isSelectable ? : (() => boolean)|string
292
+ /**
293
+ * An array of Objects which are converted into records and used to create this
294
+ * List's [store](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-store)
295
+ */
296
+ items ? : object[]
297
+ /**
298
+ * Template function (or name of a template function), which, when passed a record, returns the textual HTML for
299
+ * that item. Defaults to a function returning the value of the record´s [displayField](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-displayField)
300
+ * @param {Core.data.Model} record The record
301
+ * @returns {string}
302
+ */
303
+ itemTpl ? : ((record: Model) => string)|string
304
+ /**
305
+ * An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
306
+ * and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
307
+ * are the name of the instance method to call when the keystroke is received.
308
+ * ...
309
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-keyMap)
310
+ */
311
+ keyMap ? : Record<string, KeyMapConfig>
312
+ /**
313
+ * The listener set for this object.
314
+ * ...
315
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-listeners)
316
+ */
317
+ listeners ? : ListListeners
318
+ /**
319
+ * A class translations of which are used for translating this entity.
320
+ * This is often used when translations of an item are defined on its container class.
321
+ * For example:
322
+ * ...
323
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-localeClass)
324
+ */
325
+ localeClass ? : typeof Base
326
+ /**
327
+ * Set to `false` to disable localization of this object.
328
+ */
329
+ localizable ? : boolean
330
+ /**
331
+ * List of properties which values should be translated automatically upon a locale applying.
332
+ * In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
333
+ * you could use 'localeKey' meta configuration.
334
+ * Example:
335
+ * ...
336
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-localizableProperties)
337
+ */
338
+ localizableProperties ? : string[]
339
+ /**
340
+ * Widget's margin. This may be configured as a single number or a `TRBL` format string.
341
+ * numeric-only values are interpreted as pixels.
342
+ */
343
+ margin ? : number|string
344
+ /**
345
+ * This config object contains the defaults for the [Mask](https://bryntum.com/products/taskboard/docs/api/Core/widget/Mask) created for the
346
+ * [masked](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
347
+ * values.
348
+ */
349
+ maskDefaults ? : MaskConfig
350
+ /**
351
+ * Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
352
+ * [Mask](https://bryntum.com/products/taskboard/docs/api/Core/widget/Mask) config object.
353
+ */
354
+ masked ? : boolean|string|MaskConfig
355
+ /**
356
+ * The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
357
+ * like [height](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
358
+ */
359
+ maxHeight ? : string|number
360
+ /**
361
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
362
+ * ...
363
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-maximizeOnMobile)
364
+ */
365
+ maximizeOnMobile ? : number|string
366
+ /**
367
+ * The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
368
+ * like [width](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
369
+ */
370
+ maxWidth ? : string|number
371
+ /**
372
+ * The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
373
+ * like [height](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
374
+ */
375
+ minHeight ? : string|number
376
+ /**
377
+ * The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
378
+ * like [width](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
379
+ */
380
+ minWidth ? : string|number
381
+ /**
382
+ * When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
383
+ * is used to monitor this element for size changes caused by either style manipulation, or by CSS
384
+ * layout.
385
+ * ...
386
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-monitorResize)
387
+ */
388
+ monitorResize ? : boolean|{
389
+ immediate?: boolean
390
+ }
391
+ /**
392
+ * Configure as `true` to allow multi select and add checkboxes to the items
393
+ */
394
+ multiSelect ? : boolean
395
+ /**
396
+ * The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
397
+ * [items](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
398
+ * the owner is <strong>always</strong> the encapsulating Container.
399
+ * ...
400
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-owner)
401
+ */
402
+ owner ? : Widget|any
403
+ /**
404
+ * Set to `true` when a widget is rendered into another widget's [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement), but must
405
+ * not participate in the standard layout of that widget, and must be positioned relatively to that
406
+ * widget's [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement).
407
+ * ...
408
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-positioned)
409
+ */
410
+ positioned ? : boolean
411
+ /**
412
+ * Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
413
+ * menu on click etc, since the tooltip would be displayed at the same time.
414
+ */
415
+ preventTooltipOnTouch ? : boolean
416
+ /**
417
+ * Whether this widget is read-only. This is only valid if the widget is an input
418
+ * field, <strong>or contains input fields at any depth</strong>.
419
+ * ...
420
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-readOnly)
421
+ */
422
+ readOnly ? : boolean
423
+ relayStoreEvents ? : boolean
424
+ /**
425
+ * Configure as `true` to have the component display a translucent ripple when its
426
+ * [focusElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-focusElement), or [element](#Core/widget/Widget#property-element) is tapped <em>if the
427
+ * current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
428
+ * ...
429
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-ripple)
430
+ */
431
+ ripple ? : boolean|{
432
+ delegate?: string
433
+ color?: string
434
+ radius?: number
435
+ clip?: string
436
+ }
437
+ /**
438
+ * 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`
439
+ */
440
+ rootElement ? : ShadowRoot|HTMLElement
441
+ /**
442
+ * This may be configured as `true` to make the widget's element use the `direction:rtl` style.
443
+ * ...
444
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-rtl)
445
+ */
446
+ rtl ? : boolean
447
+ /**
448
+ * Specifies whether (and optionally in which axes) a Widget may scroll. `true` means this widget may scroll
449
+ * in both axes. May be an object containing boolean `overflowX` and `overflowY` properties which are
450
+ * applied to CSS style properties `overflowX` and `overflowY`. If they are boolean, they are translated to
451
+ * CSS overflow properties thus:
452
+ * ...
453
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-scrollable)
454
+ */
455
+ scrollable ? : boolean|ScrollerConfig|Scroller
456
+ /**
457
+ * Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
458
+ * Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
459
+ */
460
+ scrollAction ? : 'hide'|'realign'|null
461
+ /**
462
+ * Set to `true` to add a "Select all" item to the list to select/unselect all items at once.
463
+ * Only applies when [multiSelect](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-multiSelect) mode is enabled.
464
+ */
465
+ selectAllItem ? : boolean|string
466
+ /**
467
+ * A [Collection](https://bryntum.com/products/taskboard/docs/api/Core/util/Collection), or Collection config object to use to contain this List's selected
468
+ * records.
469
+ * ...
470
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-selected)
471
+ */
472
+ selected ? : object[]|number[]|string[]|Collection|CollectionConfig|CollectionConfig[]
473
+ /**
474
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
475
+ * ...
476
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-showAnimation)
477
+ */
478
+ showAnimation ? : boolean|object
479
+ /**
480
+ * Set to `false` to not show the tooltip when this widget is [disabled](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-disabled)
481
+ */
482
+ showTooltipWhenDisabled ? : boolean
483
+ /**
484
+ * Programmatic control over how many columns to span when used in a grid layout.
485
+ */
486
+ span ? : number
487
+ /**
488
+ * A [Store](https://bryntum.com/products/taskboard/docs/api/Core/data/Store) which provides the records which map to List items. Each record is passed through the
489
+ * [itemTpl](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-itemTpl) to produce the DOM structure of the List. May be generated from an array of [items](#Core/widget/List#config-items).
490
+ * ...
491
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-store)
492
+ */
493
+ store ? : object|object[]|StoreConfig|Store|StoreConfig[]
494
+ /**
495
+ * A configuration for the [tab](https://bryntum.com/products/taskboard/docs/api/Core/widget/Tab) created for this widget when it is placed in a
496
+ * [TabPanel](https://bryntum.com/products/taskboard/docs/api/Core/widget/TabPanel). For example, this config can be used to control the icon of the `tab` for
497
+ * this widget:
498
+ * ...
499
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-tab)
500
+ */
501
+ tab ? : boolean|TabConfig
502
+ /**
503
+ * The tag name of this Widget's root element
504
+ */
505
+ tag ? : string
506
+ /**
507
+ * Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
508
+ * ...
509
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-textAlign)
510
+ */
511
+ textAlign ? : 'left'|'center'|'right'|'start'|'end'
512
+ /**
513
+ * The title to show at the top of the list.
514
+ */
515
+ title ? : string
516
+ /**
517
+ * Select/deselect all if `CMD`/`CTRL` is pressed when clicking
518
+ */
519
+ toggleAllIfCtrlPressed ? : boolean
520
+ /**
521
+ * Tooltip for the widget, either as a string or as a Tooltip config object.
522
+ * ...
523
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-tooltip)
524
+ */
525
+ tooltip ? : string|TooltipConfig|null
526
+ /**
527
+ * Template function to provide a tooltip (textual, will be automatically HTML-encoded) shown when hovering an item.
528
+ * @param {Core.data.Model} record The record representing the item
529
+ * @returns {string}
530
+ */
531
+ tooltipTemplate ? : (record: Model) => string
532
+ type ? : 'list'
533
+ /**
534
+ * Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
535
+ * as a space separated string, an array of strings, or as an object in which property names with truthy
536
+ * values are used as the class names.
537
+ * ...
538
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-ui)
539
+ */
540
+ ui ? : string|object
541
+ /**
542
+ * Controls virtualization of list items using the `IntersectionObserver` API to render items only when
543
+ * scrolled into view. This is only useful for lists with complex markup, for simple lists it likely adds
544
+ * overhead.
545
+ * ...
546
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-virtualize)
547
+ */
548
+ virtualize ? : boolean|number
549
+ /**
550
+ * A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container).
551
+ * Higher weights go further down.
552
+ */
553
+ weight ? : number
554
+ /**
555
+ * Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
556
+ * will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
557
+ * this config is convenient.
558
+ */
559
+ width ? : string|number
560
+ /**
561
+ * The x position for the widget.
562
+ * ...
563
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-x)
564
+ */
565
+ x ? : number
566
+ /**
567
+ * The y position for the widget.
568
+ * ...
569
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#config-y)
570
+ */
571
+ y ? : number
572
+
573
+ }
574
+
575
+ @Component({
576
+ selector : 'bryntum-list',
577
+ template : ''
578
+ })
579
+ export class BryntumListComponent implements OnInit, OnDestroy {
580
+
581
+ public static instanceClass = List;
582
+
583
+ public static instanceName = 'List';
584
+
585
+ private static bryntumEvents: string[] = [
586
+ 'onBeforeDestroy',
587
+ 'onBeforeHide',
588
+ 'onBeforeItem',
589
+ 'onBeforeShow',
590
+ 'onCatchAll',
591
+ 'onDestroy',
592
+ 'onElementCreated',
593
+ 'onFocusIn',
594
+ 'onFocusOut',
595
+ 'onHide',
596
+ 'onItem',
597
+ 'onPaint',
598
+ 'onReadOnly',
599
+ 'onRecompose',
600
+ 'onResize',
601
+ 'onSelectionChange',
602
+ 'onShow',
603
+ 'onToggleGroup',
604
+ 'onToggleNode'
605
+ ];
606
+
607
+ private static bryntumFeatureNames: string[] = [
608
+
609
+ ];
610
+
611
+ private static bryntumConfigs: string[] = BryntumListComponent.bryntumFeatureNames.concat([
612
+ 'activateOnMouseover',
613
+ 'adopt',
614
+ 'align',
615
+ 'alignSelf',
616
+ 'allowGroupSelect',
617
+ 'anchor',
618
+ 'appendTo',
619
+ 'ariaDescription',
620
+ 'ariaLabel',
621
+ 'bubbleEvents',
622
+ 'callOnFunctions',
623
+ 'catchEventHandlerExceptions',
624
+ 'centered',
625
+ 'clearSelectionOnEmptySpaceClick',
626
+ 'cls',
627
+ 'collapsibleGroups',
628
+ 'color',
629
+ 'column',
630
+ 'config',
631
+ 'constrainTo',
632
+ 'content',
633
+ 'contentElementCls',
634
+ 'dataField',
635
+ 'dataset',
636
+ 'defaultBindProperty',
637
+ 'detectCSSCompatibilityIssues',
638
+ 'disabled',
639
+ 'displayField',
640
+ 'dock',
641
+ 'draggable',
642
+ 'elementAttributes',
643
+ 'emptyText',
644
+ 'extraData',
645
+ 'flex',
646
+ 'floating',
647
+ 'getItemCls',
648
+ 'getItemStyle',
649
+ 'groupHeaderTpl',
650
+ 'height',
651
+ 'hidden',
652
+ 'hideAnimation',
653
+ 'html',
654
+ 'htmlCls',
655
+ 'id',
656
+ 'ignoreParentReadOnly',
657
+ 'insertBefore',
658
+ 'insertFirst',
659
+ 'isSelectable',
660
+ 'items',
661
+ 'itemTpl',
662
+ 'keyMap',
663
+ 'listeners',
664
+ 'localeClass',
665
+ 'localizable',
666
+ 'localizableProperties',
667
+ 'margin',
668
+ 'maskDefaults',
669
+ 'masked',
670
+ 'maxHeight',
671
+ 'maximizeOnMobile',
672
+ 'maxWidth',
673
+ 'minHeight',
674
+ 'minWidth',
675
+ 'monitorResize',
676
+ 'multiSelect',
677
+ 'owner',
678
+ 'positioned',
679
+ 'preventTooltipOnTouch',
680
+ 'readOnly',
681
+ 'relayStoreEvents',
682
+ 'ripple',
683
+ 'rootElement',
684
+ 'rtl',
685
+ 'scrollable',
686
+ 'scrollAction',
687
+ 'selectAllItem',
688
+ 'selected',
689
+ 'showAnimation',
690
+ 'showTooltipWhenDisabled',
691
+ 'span',
692
+ 'store',
693
+ 'tab',
694
+ 'tag',
695
+ 'textAlign',
696
+ 'title',
697
+ 'toggleAllIfCtrlPressed',
698
+ 'tooltip',
699
+ 'tooltipTemplate',
700
+ 'type',
701
+ 'ui',
702
+ 'virtualize',
703
+ 'weight',
704
+ 'width',
705
+ 'x',
706
+ 'y'
707
+ ]);
708
+
709
+ private static bryntumConfigsOnly: string[] = [
710
+ 'activateOnMouseover',
711
+ 'adopt',
712
+ 'align',
713
+ 'allowGroupSelect',
714
+ 'anchor',
715
+ 'ariaDescription',
716
+ 'ariaLabel',
717
+ 'bubbleEvents',
718
+ 'centered',
719
+ 'clearSelectionOnEmptySpaceClick',
720
+ 'color',
721
+ 'config',
722
+ 'constrainTo',
723
+ 'contentElementCls',
724
+ 'dataField',
725
+ 'defaultBindProperty',
726
+ 'detectCSSCompatibilityIssues',
727
+ 'displayField',
728
+ 'dock',
729
+ 'draggable',
730
+ 'elementAttributes',
731
+ 'floating',
732
+ 'getItemCls',
733
+ 'getItemStyle',
734
+ 'groupHeaderTpl',
735
+ 'hideAnimation',
736
+ 'htmlCls',
737
+ 'ignoreParentReadOnly',
738
+ 'isSelectable',
739
+ 'itemTpl',
740
+ 'listeners',
741
+ 'localeClass',
742
+ 'localizable',
743
+ 'localizableProperties',
744
+ 'maskDefaults',
745
+ 'masked',
746
+ 'monitorResize',
747
+ 'owner',
748
+ 'positioned',
749
+ 'preventTooltipOnTouch',
750
+ 'relayStoreEvents',
751
+ 'ripple',
752
+ 'rootElement',
753
+ 'scrollAction',
754
+ 'selectAllItem',
755
+ 'showAnimation',
756
+ 'showTooltipWhenDisabled',
757
+ 'tab',
758
+ 'tag',
759
+ 'textAlign',
760
+ 'tooltipTemplate',
761
+ 'type',
762
+ 'ui',
763
+ 'virtualize',
764
+ 'weight'
765
+ ];
766
+
767
+ private static bryntumProps: string[] = BryntumListComponent.bryntumFeatureNames.concat([
768
+ 'alignSelf',
769
+ 'anchorSize',
770
+ 'appendTo',
771
+ 'callOnFunctions',
772
+ 'catchEventHandlerExceptions',
773
+ 'cls',
774
+ 'collapsibleGroups',
775
+ 'column',
776
+ 'content',
777
+ 'dataset',
778
+ 'disabled',
779
+ 'emptyText',
780
+ 'extraData',
781
+ 'flex',
782
+ 'focusVisible',
783
+ 'height',
784
+ 'hidden',
785
+ 'html',
786
+ 'id',
787
+ 'insertBefore',
788
+ 'insertFirst',
789
+ 'items',
790
+ 'keyMap',
791
+ 'margin',
792
+ 'maxHeight',
793
+ 'maximizeOnMobile',
794
+ 'maxWidth',
795
+ 'minHeight',
796
+ 'minWidth',
797
+ 'multiSelect',
798
+ 'parent',
799
+ 'readOnly',
800
+ 'rtl',
801
+ 'scrollable',
802
+ 'selected',
803
+ 'span',
804
+ 'store',
805
+ 'title',
806
+ 'toggleAllIfCtrlPressed',
807
+ 'tooltip',
808
+ 'width',
809
+ 'x',
810
+ 'y'
811
+ ]);
812
+
813
+ private elementRef: ElementRef;
814
+ public instance!: List;
815
+
816
+ private bryntumConfig = {
817
+ adopt : undefined,
818
+ appendTo : undefined,
819
+ href : undefined,
820
+ angularComponent : this,
821
+ features : {},
822
+ listeners : {}
823
+ };
824
+
825
+ constructor(element: ElementRef) {
826
+ this.elementRef = element;
827
+ }
828
+
829
+ // Configs only
830
+ @Input() activateOnMouseover ! : boolean;
831
+ @Input() adopt ! : HTMLElement|string;
832
+ @Input() align ! : AlignSpec|string;
833
+ @Input() allowGroupSelect ! : boolean;
834
+ @Input() anchor ! : boolean;
835
+ @Input() ariaDescription ! : string;
836
+ @Input() ariaLabel ! : string;
837
+ @Input() bubbleEvents ! : object;
838
+ @Input() centered ! : boolean;
839
+ @Input() clearSelectionOnEmptySpaceClick ! : boolean;
840
+ @Input() color ! : string;
841
+ @Input() config ! : object;
842
+ @Input() constrainTo ! : HTMLElement|Widget|Rectangle;
843
+ @Input() contentElementCls ! : string|object;
844
+ @Input() dataField ! : string;
845
+ @Input() defaultBindProperty ! : string;
846
+ @Input() detectCSSCompatibilityIssues ! : boolean;
847
+ @Input() displayField ! : string;
848
+ @Input() dock ! : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object;
849
+ @Input() draggable ! : boolean|{
850
+ handleSelector?: string
851
+ };
852
+ @Input() elementAttributes ! : Record<string, string|null>;
853
+ @Input() floating ! : boolean;
854
+ @Input() getItemCls ! : ((record: Model) => string)|string;
855
+ @Input() getItemStyle ! : ((record: Model) => string)|string;
856
+ @Input() groupHeaderTpl ! : (record: Model, groupName: string) => string;
857
+ @Input() hideAnimation ! : boolean|object;
858
+ @Input() htmlCls ! : string|object;
859
+ @Input() ignoreParentReadOnly ! : boolean;
860
+ @Input() isSelectable ! : (() => boolean)|string;
861
+ @Input() itemTpl ! : ((record: Model) => string)|string;
862
+ @Input() listeners ! : ListListeners;
863
+ @Input() localeClass ! : typeof Base;
864
+ @Input() localizable ! : boolean;
865
+ @Input() localizableProperties ! : string[];
866
+ @Input() maskDefaults ! : MaskConfig;
867
+ @Input() masked ! : boolean|string|MaskConfig;
868
+ @Input() monitorResize ! : boolean|{
869
+ immediate?: boolean
870
+ };
871
+ @Input() owner ! : Widget|any;
872
+ @Input() positioned ! : boolean;
873
+ @Input() preventTooltipOnTouch ! : boolean;
874
+ @Input() relayStoreEvents ! : boolean;
875
+ @Input() ripple ! : boolean|{
876
+ delegate?: string
877
+ color?: string
878
+ radius?: number
879
+ clip?: string
880
+ };
881
+ @Input() rootElement ! : ShadowRoot|HTMLElement;
882
+ @Input() scrollAction ! : 'hide'|'realign'|null;
883
+ @Input() selectAllItem ! : boolean|string;
884
+ @Input() showAnimation ! : boolean|object;
885
+ @Input() showTooltipWhenDisabled ! : boolean;
886
+ @Input() tab ! : boolean|TabConfig;
887
+ @Input() tag ! : string;
888
+ @Input() textAlign ! : 'left'|'center'|'right'|'start'|'end';
889
+ @Input() tooltipTemplate ! : (record: Model) => string;
890
+ @Input() type ! : 'list';
891
+ @Input() ui ! : string|object;
892
+ @Input() virtualize ! : boolean|number;
893
+ @Input() weight ! : number;
894
+
895
+ // Configs and properties
896
+ @Input() alignSelf ! : string;
897
+ @Input() appendTo ! : HTMLElement|string;
898
+ @Input() callOnFunctions ! : boolean;
899
+ @Input() catchEventHandlerExceptions ! : boolean;
900
+ @Input() cls ! : string|object;
901
+ @Input() collapsibleGroups ! : boolean;
902
+ @Input() column ! : number;
903
+ @Input() content ! : string;
904
+ @Input() dataset ! : object|Record<string, string>;
905
+ @Input() disabled ! : boolean|'inert';
906
+ @Input() emptyText ! : string;
907
+ @Input() extraData ! : any;
908
+ @Input() flex ! : number|string;
909
+ @Input() height ! : number|string;
910
+ @Input() hidden ! : boolean;
911
+ @Input() html ! : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig;
912
+ @Input() id ! : string;
913
+ @Input() insertBefore ! : HTMLElement|string;
914
+ @Input() insertFirst ! : HTMLElement|string;
915
+ @Input() items ! : object[];
916
+ @Input() keyMap ! : Record<string, KeyMapConfig>;
917
+ @Input() margin ! : number|string;
918
+ @Input() maxHeight ! : string|number;
919
+ @Input() maximizeOnMobile ! : number|string;
920
+ @Input() maxWidth ! : string|number;
921
+ @Input() minHeight ! : string|number;
922
+ @Input() minWidth ! : string|number;
923
+ @Input() multiSelect ! : boolean;
924
+ @Input() readOnly ! : boolean;
925
+ @Input() rtl ! : boolean;
926
+ @Input() scrollable ! : Scroller|boolean|ScrollerConfig;
927
+ @Input() selected ! : Model|Model[]|string|string[]|number|number[]|Collection|object[]|CollectionConfig|ModelConfig[]|CollectionConfig[];
928
+ @Input() span ! : number;
929
+ @Input() store ! : object|object[]|StoreConfig|Store|StoreConfig[];
930
+ @Input() title ! : string;
931
+ @Input() toggleAllIfCtrlPressed ! : boolean;
932
+ @Input() tooltip ! : string|TooltipConfig|null;
933
+ @Input() width ! : number|string;
934
+ @Input() x ! : number;
935
+ @Input() y ! : number;
936
+
937
+ // Properties only
938
+ @Input() anchorSize ! : number[];
939
+ @Input() focusVisible ! : boolean;
940
+ @Input() parent ! : Widget;
941
+
942
+ // Events emitters
943
+ /**
944
+ * Fires before an object is destroyed.
945
+ * @param {object} event Event object
946
+ * @param {Core.Base} event.source The Object that is being destroyed.
947
+ */
948
+ @Output() onBeforeDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
949
+ /**
950
+ * Triggered before a widget is hidden. Return `false` to prevent the action.
951
+ * @param {object} event Event object
952
+ * @param {Core.widget.Widget} event.source The widget being hidden.
953
+ */
954
+ @Output() onBeforeHide: any = new EventEmitter<((event: { source: Widget }) => Promise<boolean>|boolean|void)|string>();
955
+ /**
956
+ * User going to activate an item in the list either by pointer or keyboard.
957
+ * The active record, list item index, and the triggering event are passed.
958
+ * It is preventable by returning `false`
959
+ * @param {object} event Event object
960
+ * @param {Core.widget.List} event.source The List instance
961
+ * @param {HTMLElement} event.item The clicked list element
962
+ * @param {Core.data.Model} event.record Activated record
963
+ * @param {number} event.index List item index
964
+ * @param {Event} event.event Triggering event
965
+ */
966
+ @Output() onBeforeItem: any = new EventEmitter<((event: { source: List, item: HTMLElement, record: Model, index: number, event: Event }) => Promise<boolean>|boolean|void)|string>();
967
+ /**
968
+ * Triggered before a widget is shown. Return `false` to prevent the action.
969
+ * @param {object} event Event object
970
+ * @param {Core.widget.Widget,any} event.source The widget being shown
971
+ */
972
+ @Output() onBeforeShow: any = new EventEmitter<((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string>();
973
+ /**
974
+ * Fires when any other event is fired from the object.
975
+ * ...
976
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#event-catchAll)
977
+ * @param {object} event Event object
978
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
979
+ * @param {string} event.event.type The type of the event which is caught by the listener
980
+ */
981
+ @Output() onCatchAll: any = new EventEmitter<((event: {[key: string]: any, type: string}) => void)|string>();
982
+ /**
983
+ * Fires when an object is destroyed.
984
+ * @param {object} event Event object
985
+ * @param {Core.Base} event.source The Object that is being destroyed.
986
+ */
987
+ @Output() onDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
988
+ /**
989
+ * Triggered when a widget's [element](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-element) is available.
990
+ * @param {object} event Event object
991
+ * @param {HTMLElement} event.element The Widget's element.
992
+ */
993
+ @Output() onElementCreated: any = new EventEmitter<((event: { element: HTMLElement }) => void)|string>();
994
+ /**
995
+ * Fired when focus enters this Widget.
996
+ * @param {object} event Event object
997
+ * @param {Core.widget.Widget} event.source This Widget
998
+ * @param {HTMLElement} event.fromElement The element which lost focus.
999
+ * @param {HTMLElement} event.toElement The element which gained focus.
1000
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1001
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1002
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1003
+ */
1004
+ @Output() onFocusIn: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1005
+ /**
1006
+ * Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
1007
+ * focus moving from within this Widget's ownership tree, even if there are floating widgets
1008
+ * will not trigger this event. This is when focus exits this widget completely.
1009
+ * @param {object} event Event object
1010
+ * @param {Core.widget.Widget} event.source This Widget
1011
+ * @param {HTMLElement} event.fromElement The element which lost focus.
1012
+ * @param {HTMLElement} event.toElement The element which gained focus.
1013
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1014
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1015
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1016
+ */
1017
+ @Output() onFocusOut: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1018
+ /**
1019
+ * Triggered after a widget was hidden
1020
+ * @param {object} event Event object
1021
+ * @param {Core.widget.Widget} event.source The widget
1022
+ */
1023
+ @Output() onHide: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1024
+ /**
1025
+ * User activated an item in the list either by pointer or keyboard.
1026
+ * The active record, list item index, and the triggering event are passed.
1027
+ * @param {object} event Event object
1028
+ * @param {Core.widget.List} event.source The List instance
1029
+ * @param {HTMLElement} event.item The clicked list element
1030
+ * @param {Core.data.Model} event.record Activated record
1031
+ * @param {number} event.index List item index
1032
+ * @param {Event} event.event Triggering event
1033
+ */
1034
+ @Output() onItem: any = new EventEmitter<((event: { source: List, item: HTMLElement, record: Model, index: number, event: Event }) => void)|string>();
1035
+ /**
1036
+ * Triggered when a widget which had been in a non-visible state for any reason
1037
+ * achieves visibility.
1038
+ * ...
1039
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/List#event-paint)
1040
+ * @param {object} event Event object
1041
+ * @param {Core.widget.Widget} event.source The widget being painted.
1042
+ * @param {boolean} event.firstPaint `true` if this is the first paint.
1043
+ */
1044
+ @Output() onPaint: any = new EventEmitter<((event: { source: Widget, firstPaint: boolean }) => void)|string>();
1045
+ /**
1046
+ * Fired when a Widget's read only state is toggled
1047
+ * @param {object} event Event object
1048
+ * @param {boolean} event.readOnly Read only or not
1049
+ */
1050
+ @Output() onReadOnly: any = new EventEmitter<((event: { readOnly: boolean }) => void)|string>();
1051
+ /**
1052
+ * This event is fired after a widget's elements have been synchronized due to a direct or indirect call
1053
+ * to [recompose](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#function-recompose), if this results in some change to the widget's rendered DOM elements.
1054
+ */
1055
+ @Output() onRecompose: any = new EventEmitter<(() => void)|string>();
1056
+ /**
1057
+ * Fired when the encapsulating element of a Widget resizes *only when [monitorResize](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-monitorResize) is `true`*.
1058
+ * @param {object} event Event object
1059
+ * @param {Core.widget.Widget} event.source This Widget
1060
+ * @param {number} event.width The new width
1061
+ * @param {number} event.height The new height
1062
+ * @param {number} event.oldWidth The old width
1063
+ * @param {number} event.oldHeight The old height
1064
+ */
1065
+ @Output() onResize: any = new EventEmitter<((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string>();
1066
+ /**
1067
+ * Fired when selection changes
1068
+ * @param {object} event Event object
1069
+ * @param {Core.widget.List} event.source The List instance
1070
+ * @param {Core.data.Model[]} event.selected An array of the currently selected records
1071
+ */
1072
+ @Output() onSelectionChange: any = new EventEmitter<((event: { source: List, selected: Model[] }) => void)|string>();
1073
+ /**
1074
+ * Triggered after a widget is shown.
1075
+ * @param {object} event Event object
1076
+ * @param {Core.widget.Widget} event.source The widget
1077
+ */
1078
+ @Output() onShow: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1079
+ /**
1080
+ * Group item expanded or collapsed
1081
+ * @param {object} event Event object
1082
+ * @param {Core.data.Model} event.groupRecord Group record
1083
+ * @param {boolean} event.collapse Collapsed (true) or expanded (false)
1084
+ */
1085
+ @Output() onToggleGroup: any = new EventEmitter<((event: { groupRecord: Model, collapse: boolean }) => void)|string>();
1086
+ /**
1087
+ * Tree parent node expanded or collapsed
1088
+ * @param {object} event Event object
1089
+ * @param {Core.data.Model} event.record The parent record which has been toggled
1090
+ * @param {boolean} event.collapse Collapsed (true) or expanded (false)
1091
+ */
1092
+ @Output() onToggleNode: any = new EventEmitter<((event: { record: Model, collapse: boolean }) => void)|string>();
1093
+
1094
+ /**
1095
+ * Create and append the underlying widget
1096
+ */
1097
+ ngOnInit(): void {
1098
+ const
1099
+ me = this,
1100
+ {
1101
+ elementRef,
1102
+ bryntumConfig
1103
+ } = me,
1104
+ {
1105
+ instanceClass,
1106
+ instanceName,
1107
+ bryntumConfigs,
1108
+ bryntumEvents
1109
+ } = BryntumListComponent;
1110
+
1111
+ bryntumConfigs.filter(prop => prop in this).forEach(prop => {
1112
+ // @ts-ignore
1113
+ WrapperHelper.applyPropValue(bryntumConfig, prop, this[prop]);
1114
+ if (['features', 'config'].includes(prop)) {
1115
+ WrapperHelper.devWarningConfigProp(instanceName, prop);
1116
+ }
1117
+ });
1118
+ // @ts-ignore
1119
+ bryntumEvents.filter(event => this[event] && this[event].observers.length > 0).forEach(event => {
1120
+ const
1121
+ uncapitalize = (str: string) => str.charAt(0).toLowerCase() + str.slice(1),
1122
+ eventName = (str: string) => uncapitalize(str.slice(2));
1123
+
1124
+ // @ts-ignore
1125
+ bryntumConfig.listeners[eventName(event)] = e => {
1126
+ // @ts-ignore
1127
+ me[event].emit(e);
1128
+ // EventEmitter does not return values in the normal way, work around it by setting `returnValue` flag
1129
+ // in Angular listeners
1130
+ return e.returnValue;
1131
+ };
1132
+ });
1133
+
1134
+ // If component has no container specified in config then use adopt to Wrapper's element
1135
+ const
1136
+ containerParam = [
1137
+ 'adopt',
1138
+ 'appendTo',
1139
+ 'insertAfter',
1140
+ 'insertBefore'
1141
+ // @ts-ignore
1142
+ ].find(prop => bryntumConfig[prop]);
1143
+ if (!containerParam) {
1144
+ if (instanceName === 'Button' || elementRef.nativeElement.getRootNode() instanceof ShadowRoot) {
1145
+ // Button should always be <a> or <button> inside owner element
1146
+ bryntumConfig.appendTo = elementRef.nativeElement;
1147
+ }
1148
+ else {
1149
+ bryntumConfig.adopt = elementRef.nativeElement;
1150
+ }
1151
+ }
1152
+ else {
1153
+ WrapperHelper.devWarningContainer(instanceName, containerParam);
1154
+ }
1155
+
1156
+ // @ts-ignore
1157
+ me.instance = instanceName === 'Widget' ? Widget.create(bryntumConfig) : new instanceClass(bryntumConfig);
1158
+
1159
+ }
1160
+
1161
+ /**
1162
+ * Watch for changes
1163
+ * @param changes
1164
+ */
1165
+ ngOnChanges(changes: SimpleChanges): void {
1166
+ const
1167
+ { instance } = this,
1168
+ { instanceName } = BryntumListComponent;
1169
+ if (!instance) {
1170
+ return;
1171
+ }
1172
+ // Iterate over all changes
1173
+ Object.entries(changes).forEach(([prop, change]) => {
1174
+ const
1175
+ newValue = (change as SimpleChange).currentValue,
1176
+ { instance } = this,
1177
+ { bryntumConfigsOnly, bryntumProps } = BryntumListComponent;
1178
+ if (bryntumProps.includes(prop)) {
1179
+ WrapperHelper.applyPropValue(instance, prop, newValue, false);
1180
+ if (bryntumConfigsOnly.includes(prop)) {
1181
+ WrapperHelper.devWarningUpdateProp(instanceName, prop);
1182
+ }
1183
+ }
1184
+ });
1185
+ }
1186
+
1187
+ /**
1188
+ * Destroy the component
1189
+ */
1190
+ ngOnDestroy(): void {
1191
+ // @ts-ignore
1192
+ if (this.instance && this.instance.destroy) {
1193
+ this.instance.destroy();
1194
+ }
1195
+ }
1196
+ }