@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,989 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /**
3
+ * Angular wrapper for Bryntum Label
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, DomConfig, KeyMapConfig, Label, LabelListeners, MaskConfig, Rectangle, Scroller, ScrollerConfig, TabConfig, TooltipConfig, VueConfig, Widget } from '@bryntum/taskboard';
11
+
12
+ import { StringHelper } from '@bryntum/taskboard';
13
+
14
+ export type BryntumLabelProps = {
15
+ // Configs
16
+ /**
17
+ * Element (or element id) to adopt as this Widget's encapsulating element. The widget's
18
+ * content will be placed inside this element.
19
+ * ...
20
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-adopt)
21
+ */
22
+ adopt ? : HTMLElement|string
23
+ /**
24
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
25
+ * ...
26
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-align)
27
+ */
28
+ align ? : AlignSpec|string
29
+ /**
30
+ * 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
31
+ * flexbox layout. This config allows you to set this widget's
32
+ * [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) style.
33
+ */
34
+ alignSelf ? : string
35
+ /**
36
+ * *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).*
37
+ * `true` to show a connector arrow pointing to the align target.
38
+ */
39
+ anchor ? : boolean
40
+ /**
41
+ * Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
42
+ * runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-element).
43
+ */
44
+ appendTo ? : HTMLElement|string
45
+ /**
46
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
47
+ * into an element which will be linked using the `aria-describedby` attribute.
48
+ * ...
49
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-ariaDescription)
50
+ */
51
+ ariaDescription ? : string
52
+ /**
53
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
54
+ * the `aria-label` attribute.
55
+ * ...
56
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-ariaLabel)
57
+ */
58
+ ariaLabel ? : string
59
+ /**
60
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
61
+ * hierarchy when triggered.
62
+ * ...
63
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-bubbleEvents)
64
+ */
65
+ bubbleEvents ? : object
66
+ /**
67
+ * Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
68
+ * ...
69
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-callOnFunctions)
70
+ */
71
+ callOnFunctions ? : boolean
72
+ /**
73
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
74
+ * application state is undefined. Code which follows the event handler will *not* be executed.
75
+ * ...
76
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-catchEventHandlerExceptions)
77
+ */
78
+ catchEventHandlerExceptions ? : boolean
79
+ /**
80
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
81
+ * Set to `true` to centre the Widget in browser viewport space.
82
+ */
83
+ centered ? : boolean
84
+ /**
85
+ * Custom CSS classes to add to element.
86
+ * May be specified as a space separated string, or as an object in which property names
87
+ * with truthy values are used as the class names:
88
+ * ...
89
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-cls)
90
+ */
91
+ cls ? : string|object
92
+ /**
93
+ * Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
94
+ * `style` block.
95
+ * ...
96
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-color)
97
+ */
98
+ color ? : string
99
+ /**
100
+ * Programmatic control over which column to start in when used in a grid layout.
101
+ */
102
+ column ? : number
103
+ config ? : object
104
+ /**
105
+ * *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).*
106
+ * Element, Widget or Rectangle to which this Widget is constrained.
107
+ */
108
+ constrainTo ? : HTMLElement|Widget|Rectangle
109
+ /**
110
+ * The HTML content that coexists with sibling elements which may have been added to the
111
+ * [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement) by plugins and features.
112
+ * When specifying html, this widget's element will also have the [htmlCls](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-htmlCls)
113
+ * class added to its classList, to allow targeted styling.
114
+ */
115
+ content ? : string
116
+ /**
117
+ * Custom CSS classes to add to the [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement).
118
+ * May be specified as a space separated string, or as an object in which property names
119
+ * with truthy values are used as the class names:
120
+ * ...
121
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-contentElementCls)
122
+ */
123
+ contentElementCls ? : string|object
124
+ /**
125
+ * When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
126
+ * field on the expanded record to use for populating this widget's store (if applicable)
127
+ */
128
+ dataField ? : string
129
+ /**
130
+ * Object to apply to elements dataset (each key will be used as a data-attribute on the element)
131
+ */
132
+ dataset ? : Record<string, string>
133
+ /**
134
+ * The name of the property to set when a single value is to be applied to this Widget. Such as when used
135
+ * in a grid WidgetColumn, this is the property to which the column's `field` is applied.
136
+ */
137
+ defaultBindProperty ? : string
138
+ /**
139
+ * Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
140
+ * ...
141
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-detectCSSCompatibilityIssues)
142
+ */
143
+ detectCSSCompatibilityIssues ? : boolean
144
+ /**
145
+ * 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
146
+ * cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
147
+ * ...
148
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-disabled)
149
+ */
150
+ disabled ? : boolean|'inert'
151
+ /**
152
+ * Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/taskboard/docs/api/Core/widget/Panel)
153
+ * [strips collection](https://bryntum.com/products/taskboard/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
154
+ * `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
155
+ * body. Such widgets are called "edge strips".
156
+ * ...
157
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-dock)
158
+ */
159
+ dock ? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
160
+ /**
161
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
162
+ * Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
163
+ * property which controls when a drag should start.
164
+ * ...
165
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-draggable)
166
+ */
167
+ draggable ? : boolean|{
168
+ handleSelector?: string
169
+ }
170
+ /**
171
+ * An object specifying attributes to assign to the root element of this widget.
172
+ * Set `null` value to attribute to remove it.
173
+ * ...
174
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-elementAttributes)
175
+ */
176
+ elementAttributes ? : Record<string, string|null>
177
+ extraData ? : any
178
+ /**
179
+ * 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
180
+ * flexbox layout. This config allows you to set this widget's
181
+ * [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
182
+ * This may be configured as a single number or a `&lt;flex-grow&gt; &lt;flex-shrink&gt; &lt;flex-basis&gt;` format string.
183
+ * numeric-only values are interpreted as the `flex-grow` value.
184
+ */
185
+ flex ? : number|string
186
+ /**
187
+ * Set to `true` to move the widget out of the document flow and position it
188
+ * absolutely in browser viewport space.
189
+ */
190
+ floating ? : boolean
191
+ /**
192
+ * Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
193
+ * which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
194
+ * cases this config is convenient.
195
+ */
196
+ height ? : string|number
197
+ /**
198
+ * Configure with true to make widget initially hidden.
199
+ */
200
+ hidden ? : boolean
201
+ /**
202
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
203
+ * ...
204
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-hideAnimation)
205
+ */
206
+ hideAnimation ? : boolean|object
207
+ /**
208
+ * The HTML to display initially or a function returning the markup (called at widget construction time).
209
+ * ...
210
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-html)
211
+ * @param {Core.widget.Widget} widget The calling Widget
212
+ * @returns {string}
213
+ */
214
+ html ? : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig
215
+ /**
216
+ * The CSS class(es) to add when HTML content is being applied to this widget.
217
+ */
218
+ htmlCls ? : string|object
219
+ /**
220
+ * Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
221
+ */
222
+ id ? : string
223
+ /**
224
+ * Determines if the widgets read-only state should be controlled by its parent.
225
+ * ...
226
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-ignoreParentReadOnly)
227
+ */
228
+ ignoreParentReadOnly ? : boolean
229
+ /**
230
+ * 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.
231
+ */
232
+ insertBefore ? : HTMLElement|string
233
+ /**
234
+ * 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.
235
+ */
236
+ insertFirst ? : HTMLElement|string
237
+ /**
238
+ * An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
239
+ * and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
240
+ * are the name of the instance method to call when the keystroke is received.
241
+ * ...
242
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-keyMap)
243
+ */
244
+ keyMap ? : Record<string, KeyMapConfig>
245
+ /**
246
+ * The listener set for this object.
247
+ * ...
248
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-listeners)
249
+ */
250
+ listeners ? : LabelListeners
251
+ /**
252
+ * A class translations of which are used for translating this entity.
253
+ * This is often used when translations of an item are defined on its container class.
254
+ * For example:
255
+ * ...
256
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-localeClass)
257
+ */
258
+ localeClass ? : typeof Base
259
+ /**
260
+ * Set to `false` to disable localization of this object.
261
+ */
262
+ localizable ? : boolean
263
+ /**
264
+ * List of properties which values should be translated automatically upon a locale applying.
265
+ * In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
266
+ * you could use 'localeKey' meta configuration.
267
+ * Example:
268
+ * ...
269
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-localizableProperties)
270
+ */
271
+ localizableProperties ? : string[]
272
+ /**
273
+ * Widget's margin. This may be configured as a single number or a `TRBL` format string.
274
+ * numeric-only values are interpreted as pixels.
275
+ */
276
+ margin ? : number|string
277
+ /**
278
+ * This config object contains the defaults for the [Mask](https://bryntum.com/products/taskboard/docs/api/Core/widget/Mask) created for the
279
+ * [masked](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
280
+ * values.
281
+ */
282
+ maskDefaults ? : MaskConfig
283
+ /**
284
+ * Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
285
+ * [Mask](https://bryntum.com/products/taskboard/docs/api/Core/widget/Mask) config object.
286
+ */
287
+ masked ? : boolean|string|MaskConfig
288
+ /**
289
+ * The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
290
+ * like [height](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
291
+ */
292
+ maxHeight ? : string|number
293
+ /**
294
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
295
+ * ...
296
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-maximizeOnMobile)
297
+ */
298
+ maximizeOnMobile ? : number|string
299
+ /**
300
+ * The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
301
+ * like [width](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
302
+ */
303
+ maxWidth ? : string|number
304
+ /**
305
+ * The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
306
+ * like [height](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
307
+ */
308
+ minHeight ? : string|number
309
+ /**
310
+ * The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
311
+ * like [width](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
312
+ */
313
+ minWidth ? : string|number
314
+ /**
315
+ * When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
316
+ * is used to monitor this element for size changes caused by either style manipulation, or by CSS
317
+ * layout.
318
+ * ...
319
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-monitorResize)
320
+ */
321
+ monitorResize ? : boolean|{
322
+ immediate?: boolean
323
+ }
324
+ /**
325
+ * The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
326
+ * [items](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
327
+ * the owner is <strong>always</strong> the encapsulating Container.
328
+ * ...
329
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-owner)
330
+ */
331
+ owner ? : Widget|any
332
+ /**
333
+ * 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
334
+ * not participate in the standard layout of that widget, and must be positioned relatively to that
335
+ * widget's [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement).
336
+ * ...
337
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-positioned)
338
+ */
339
+ positioned ? : boolean
340
+ /**
341
+ * Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
342
+ * menu on click etc, since the tooltip would be displayed at the same time.
343
+ */
344
+ preventTooltipOnTouch ? : boolean
345
+ /**
346
+ * Whether this widget is read-only. This is only valid if the widget is an input
347
+ * field, <strong>or contains input fields at any depth</strong>.
348
+ * ...
349
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-readOnly)
350
+ */
351
+ readOnly ? : boolean
352
+ relayStoreEvents ? : boolean
353
+ /**
354
+ * Configure as `true` to have the component display a translucent ripple when its
355
+ * [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
356
+ * current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
357
+ * ...
358
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-ripple)
359
+ */
360
+ ripple ? : boolean|{
361
+ delegate?: string
362
+ color?: string
363
+ radius?: number
364
+ clip?: string
365
+ }
366
+ /**
367
+ * 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`
368
+ */
369
+ rootElement ? : ShadowRoot|HTMLElement
370
+ /**
371
+ * This may be configured as `true` to make the widget's element use the `direction:rtl` style.
372
+ * ...
373
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-rtl)
374
+ */
375
+ rtl ? : boolean
376
+ /**
377
+ * Specifies whether (and optionally in which axes) a Widget may scroll. `true` means this widget may scroll
378
+ * in both axes. May be an object containing boolean `overflowX` and `overflowY` properties which are
379
+ * applied to CSS style properties `overflowX` and `overflowY`. If they are boolean, they are translated to
380
+ * CSS overflow properties thus:
381
+ * ...
382
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-scrollable)
383
+ */
384
+ scrollable ? : boolean|ScrollerConfig|Scroller
385
+ /**
386
+ * Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
387
+ * Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
388
+ */
389
+ scrollAction ? : 'hide'|'realign'|null
390
+ /**
391
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
392
+ * ...
393
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-showAnimation)
394
+ */
395
+ showAnimation ? : boolean|object
396
+ /**
397
+ * 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)
398
+ */
399
+ showTooltipWhenDisabled ? : boolean
400
+ /**
401
+ * Programmatic control over how many columns to span when used in a grid layout.
402
+ */
403
+ span ? : number
404
+ /**
405
+ * 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
406
+ * [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
407
+ * this widget:
408
+ * ...
409
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-tab)
410
+ */
411
+ tab ? : boolean|TabConfig
412
+ /**
413
+ * The tag name of this Widget's root element
414
+ */
415
+ tag ? : string
416
+ /**
417
+ * Get/set label text
418
+ */
419
+ text ? : string
420
+ /**
421
+ * Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
422
+ * ...
423
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-textAlign)
424
+ */
425
+ textAlign ? : 'left'|'center'|'right'|'start'|'end'
426
+ /**
427
+ * A title to display for the widget. Only in effect when inside a container that uses it (such as TabPanel)
428
+ */
429
+ title ? : string
430
+ /**
431
+ * Tooltip for the widget, either as a string or as a Tooltip config object.
432
+ * ...
433
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-tooltip)
434
+ */
435
+ tooltip ? : string|TooltipConfig|null
436
+ type ? : 'label'
437
+ /**
438
+ * Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
439
+ * as a space separated string, an array of strings, or as an object in which property names with truthy
440
+ * values are used as the class names.
441
+ * ...
442
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-ui)
443
+ */
444
+ ui ? : string|object
445
+ /**
446
+ * A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container).
447
+ * Higher weights go further down.
448
+ */
449
+ weight ? : number
450
+ /**
451
+ * Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
452
+ * will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
453
+ * this config is convenient.
454
+ */
455
+ width ? : string|number
456
+ /**
457
+ * The x position for the widget.
458
+ * ...
459
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-x)
460
+ */
461
+ x ? : number
462
+ /**
463
+ * The y position for the widget.
464
+ * ...
465
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#config-y)
466
+ */
467
+ y ? : number
468
+
469
+ }
470
+
471
+ @Component({
472
+ selector : 'bryntum-label',
473
+ template : ''
474
+ })
475
+ export class BryntumLabelComponent implements OnInit, OnDestroy {
476
+
477
+ public static instanceClass = Label;
478
+
479
+ public static instanceName = 'Label';
480
+
481
+ private static bryntumEvents: string[] = [
482
+ 'onBeforeDestroy',
483
+ 'onBeforeHide',
484
+ 'onBeforeShow',
485
+ 'onCatchAll',
486
+ 'onDestroy',
487
+ 'onElementCreated',
488
+ 'onFocusIn',
489
+ 'onFocusOut',
490
+ 'onHide',
491
+ 'onPaint',
492
+ 'onReadOnly',
493
+ 'onRecompose',
494
+ 'onResize',
495
+ 'onShow'
496
+ ];
497
+
498
+ private static bryntumFeatureNames: string[] = [
499
+
500
+ ];
501
+
502
+ private static bryntumConfigs: string[] = BryntumLabelComponent.bryntumFeatureNames.concat([
503
+ 'adopt',
504
+ 'align',
505
+ 'alignSelf',
506
+ 'anchor',
507
+ 'appendTo',
508
+ 'ariaDescription',
509
+ 'ariaLabel',
510
+ 'bubbleEvents',
511
+ 'callOnFunctions',
512
+ 'catchEventHandlerExceptions',
513
+ 'centered',
514
+ 'cls',
515
+ 'color',
516
+ 'column',
517
+ 'config',
518
+ 'constrainTo',
519
+ 'content',
520
+ 'contentElementCls',
521
+ 'dataField',
522
+ 'dataset',
523
+ 'defaultBindProperty',
524
+ 'detectCSSCompatibilityIssues',
525
+ 'disabled',
526
+ 'dock',
527
+ 'draggable',
528
+ 'elementAttributes',
529
+ 'extraData',
530
+ 'flex',
531
+ 'floating',
532
+ 'height',
533
+ 'hidden',
534
+ 'hideAnimation',
535
+ 'html',
536
+ 'htmlCls',
537
+ 'id',
538
+ 'ignoreParentReadOnly',
539
+ 'insertBefore',
540
+ 'insertFirst',
541
+ 'keyMap',
542
+ 'listeners',
543
+ 'localeClass',
544
+ 'localizable',
545
+ 'localizableProperties',
546
+ 'margin',
547
+ 'maskDefaults',
548
+ 'masked',
549
+ 'maxHeight',
550
+ 'maximizeOnMobile',
551
+ 'maxWidth',
552
+ 'minHeight',
553
+ 'minWidth',
554
+ 'monitorResize',
555
+ 'owner',
556
+ 'positioned',
557
+ 'preventTooltipOnTouch',
558
+ 'readOnly',
559
+ 'relayStoreEvents',
560
+ 'ripple',
561
+ 'rootElement',
562
+ 'rtl',
563
+ 'scrollable',
564
+ 'scrollAction',
565
+ 'showAnimation',
566
+ 'showTooltipWhenDisabled',
567
+ 'span',
568
+ 'tab',
569
+ 'tag',
570
+ 'text',
571
+ 'textAlign',
572
+ 'title',
573
+ 'tooltip',
574
+ 'type',
575
+ 'ui',
576
+ 'weight',
577
+ 'width',
578
+ 'x',
579
+ 'y'
580
+ ]);
581
+
582
+ private static bryntumConfigsOnly: string[] = [
583
+ 'adopt',
584
+ 'align',
585
+ 'anchor',
586
+ 'ariaDescription',
587
+ 'ariaLabel',
588
+ 'bubbleEvents',
589
+ 'centered',
590
+ 'color',
591
+ 'config',
592
+ 'constrainTo',
593
+ 'contentElementCls',
594
+ 'dataField',
595
+ 'defaultBindProperty',
596
+ 'detectCSSCompatibilityIssues',
597
+ 'dock',
598
+ 'draggable',
599
+ 'elementAttributes',
600
+ 'floating',
601
+ 'hideAnimation',
602
+ 'htmlCls',
603
+ 'ignoreParentReadOnly',
604
+ 'listeners',
605
+ 'localeClass',
606
+ 'localizable',
607
+ 'localizableProperties',
608
+ 'maskDefaults',
609
+ 'masked',
610
+ 'monitorResize',
611
+ 'owner',
612
+ 'positioned',
613
+ 'preventTooltipOnTouch',
614
+ 'relayStoreEvents',
615
+ 'ripple',
616
+ 'rootElement',
617
+ 'scrollAction',
618
+ 'showAnimation',
619
+ 'showTooltipWhenDisabled',
620
+ 'tab',
621
+ 'tag',
622
+ 'textAlign',
623
+ 'title',
624
+ 'type',
625
+ 'ui',
626
+ 'weight'
627
+ ];
628
+
629
+ private static bryntumProps: string[] = BryntumLabelComponent.bryntumFeatureNames.concat([
630
+ 'alignSelf',
631
+ 'anchorSize',
632
+ 'appendTo',
633
+ 'callOnFunctions',
634
+ 'catchEventHandlerExceptions',
635
+ 'cls',
636
+ 'column',
637
+ 'content',
638
+ 'dataset',
639
+ 'disabled',
640
+ 'extraData',
641
+ 'flex',
642
+ 'focusVisible',
643
+ 'height',
644
+ 'hidden',
645
+ 'html',
646
+ 'id',
647
+ 'insertBefore',
648
+ 'insertFirst',
649
+ 'keyMap',
650
+ 'margin',
651
+ 'maxHeight',
652
+ 'maximizeOnMobile',
653
+ 'maxWidth',
654
+ 'minHeight',
655
+ 'minWidth',
656
+ 'parent',
657
+ 'readOnly',
658
+ 'rtl',
659
+ 'scrollable',
660
+ 'span',
661
+ 'text',
662
+ 'tooltip',
663
+ 'width',
664
+ 'x',
665
+ 'y'
666
+ ]);
667
+
668
+ private elementRef: ElementRef;
669
+ public instance!: Label;
670
+
671
+ private bryntumConfig = {
672
+ adopt : undefined,
673
+ appendTo : undefined,
674
+ href : undefined,
675
+ angularComponent : this,
676
+ features : {},
677
+ listeners : {}
678
+ };
679
+
680
+ constructor(element: ElementRef) {
681
+ this.elementRef = element;
682
+ }
683
+
684
+ // Configs only
685
+ @Input() adopt ! : HTMLElement|string;
686
+ @Input() align ! : AlignSpec|string;
687
+ @Input() anchor ! : boolean;
688
+ @Input() ariaDescription ! : string;
689
+ @Input() ariaLabel ! : string;
690
+ @Input() bubbleEvents ! : object;
691
+ @Input() centered ! : boolean;
692
+ @Input() color ! : string;
693
+ @Input() config ! : object;
694
+ @Input() constrainTo ! : HTMLElement|Widget|Rectangle;
695
+ @Input() contentElementCls ! : string|object;
696
+ @Input() dataField ! : string;
697
+ @Input() defaultBindProperty ! : string;
698
+ @Input() detectCSSCompatibilityIssues ! : boolean;
699
+ @Input() dock ! : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object;
700
+ @Input() draggable ! : boolean|{
701
+ handleSelector?: string
702
+ };
703
+ @Input() elementAttributes ! : Record<string, string|null>;
704
+ @Input() floating ! : boolean;
705
+ @Input() hideAnimation ! : boolean|object;
706
+ @Input() htmlCls ! : string|object;
707
+ @Input() ignoreParentReadOnly ! : boolean;
708
+ @Input() listeners ! : LabelListeners;
709
+ @Input() localeClass ! : typeof Base;
710
+ @Input() localizable ! : boolean;
711
+ @Input() localizableProperties ! : string[];
712
+ @Input() maskDefaults ! : MaskConfig;
713
+ @Input() masked ! : boolean|string|MaskConfig;
714
+ @Input() monitorResize ! : boolean|{
715
+ immediate?: boolean
716
+ };
717
+ @Input() owner ! : Widget|any;
718
+ @Input() positioned ! : boolean;
719
+ @Input() preventTooltipOnTouch ! : boolean;
720
+ @Input() relayStoreEvents ! : boolean;
721
+ @Input() ripple ! : boolean|{
722
+ delegate?: string
723
+ color?: string
724
+ radius?: number
725
+ clip?: string
726
+ };
727
+ @Input() rootElement ! : ShadowRoot|HTMLElement;
728
+ @Input() scrollAction ! : 'hide'|'realign'|null;
729
+ @Input() showAnimation ! : boolean|object;
730
+ @Input() showTooltipWhenDisabled ! : boolean;
731
+ @Input() tab ! : boolean|TabConfig;
732
+ @Input() tag ! : string;
733
+ @Input() textAlign ! : 'left'|'center'|'right'|'start'|'end';
734
+ @Input() title ! : string;
735
+ @Input() type ! : 'label';
736
+ @Input() ui ! : string|object;
737
+ @Input() weight ! : number;
738
+
739
+ // Configs and properties
740
+ @Input() alignSelf ! : string;
741
+ @Input() appendTo ! : HTMLElement|string;
742
+ @Input() callOnFunctions ! : boolean;
743
+ @Input() catchEventHandlerExceptions ! : boolean;
744
+ @Input() cls ! : string|object;
745
+ @Input() column ! : number;
746
+ @Input() content ! : string;
747
+ @Input() dataset ! : object|Record<string, string>;
748
+ @Input() disabled ! : boolean|'inert';
749
+ @Input() extraData ! : any;
750
+ @Input() flex ! : number|string;
751
+ @Input() height ! : number|string;
752
+ @Input() hidden ! : boolean;
753
+ @Input() html ! : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig;
754
+ @Input() id ! : string;
755
+ @Input() insertBefore ! : HTMLElement|string;
756
+ @Input() insertFirst ! : HTMLElement|string;
757
+ @Input() keyMap ! : Record<string, KeyMapConfig>;
758
+ @Input() margin ! : number|string;
759
+ @Input() maxHeight ! : string|number;
760
+ @Input() maximizeOnMobile ! : number|string;
761
+ @Input() maxWidth ! : string|number;
762
+ @Input() minHeight ! : string|number;
763
+ @Input() minWidth ! : string|number;
764
+ @Input() readOnly ! : boolean;
765
+ @Input() rtl ! : boolean;
766
+ @Input() scrollable ! : Scroller|boolean|ScrollerConfig;
767
+ @Input() span ! : number;
768
+ @Input() text ! : string;
769
+ @Input() tooltip ! : string|TooltipConfig|null;
770
+ @Input() width ! : number|string;
771
+ @Input() x ! : number;
772
+ @Input() y ! : number;
773
+
774
+ // Properties only
775
+ @Input() anchorSize ! : number[];
776
+ @Input() focusVisible ! : boolean;
777
+ @Input() parent ! : Widget;
778
+
779
+ // Events emitters
780
+ /**
781
+ * Fires before an object is destroyed.
782
+ * @param {object} event Event object
783
+ * @param {Core.Base} event.source The Object that is being destroyed.
784
+ */
785
+ @Output() onBeforeDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
786
+ /**
787
+ * Triggered before a widget is hidden. Return `false` to prevent the action.
788
+ * @param {object} event Event object
789
+ * @param {Core.widget.Widget} event.source The widget being hidden.
790
+ */
791
+ @Output() onBeforeHide: any = new EventEmitter<((event: { source: Widget }) => Promise<boolean>|boolean|void)|string>();
792
+ /**
793
+ * Triggered before a widget is shown. Return `false` to prevent the action.
794
+ * @param {object} event Event object
795
+ * @param {Core.widget.Widget,any} event.source The widget being shown
796
+ */
797
+ @Output() onBeforeShow: any = new EventEmitter<((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string>();
798
+ /**
799
+ * Fires when any other event is fired from the object.
800
+ * ...
801
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#event-catchAll)
802
+ * @param {object} event Event object
803
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
804
+ * @param {string} event.event.type The type of the event which is caught by the listener
805
+ */
806
+ @Output() onCatchAll: any = new EventEmitter<((event: {[key: string]: any, type: string}) => void)|string>();
807
+ /**
808
+ * Fires when an object is destroyed.
809
+ * @param {object} event Event object
810
+ * @param {Core.Base} event.source The Object that is being destroyed.
811
+ */
812
+ @Output() onDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
813
+ /**
814
+ * Triggered when a widget's [element](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-element) is available.
815
+ * @param {object} event Event object
816
+ * @param {HTMLElement} event.element The Widget's element.
817
+ */
818
+ @Output() onElementCreated: any = new EventEmitter<((event: { element: HTMLElement }) => void)|string>();
819
+ /**
820
+ * Fired when focus enters this Widget.
821
+ * @param {object} event Event object
822
+ * @param {Core.widget.Widget} event.source This Widget
823
+ * @param {HTMLElement} event.fromElement The element which lost focus.
824
+ * @param {HTMLElement} event.toElement The element which gained focus.
825
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
826
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
827
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
828
+ */
829
+ @Output() onFocusIn: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
830
+ /**
831
+ * Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
832
+ * focus moving from within this Widget's ownership tree, even if there are floating widgets
833
+ * will not trigger this event. This is when focus exits this widget completely.
834
+ * @param {object} event Event object
835
+ * @param {Core.widget.Widget} event.source This Widget
836
+ * @param {HTMLElement} event.fromElement The element which lost focus.
837
+ * @param {HTMLElement} event.toElement The element which gained focus.
838
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
839
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
840
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
841
+ */
842
+ @Output() onFocusOut: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
843
+ /**
844
+ * Triggered after a widget was hidden
845
+ * @param {object} event Event object
846
+ * @param {Core.widget.Widget} event.source The widget
847
+ */
848
+ @Output() onHide: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
849
+ /**
850
+ * Triggered when a widget which had been in a non-visible state for any reason
851
+ * achieves visibility.
852
+ * ...
853
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/Label#event-paint)
854
+ * @param {object} event Event object
855
+ * @param {Core.widget.Widget} event.source The widget being painted.
856
+ * @param {boolean} event.firstPaint `true` if this is the first paint.
857
+ */
858
+ @Output() onPaint: any = new EventEmitter<((event: { source: Widget, firstPaint: boolean }) => void)|string>();
859
+ /**
860
+ * Fired when a Widget's read only state is toggled
861
+ * @param {object} event Event object
862
+ * @param {boolean} event.readOnly Read only or not
863
+ */
864
+ @Output() onReadOnly: any = new EventEmitter<((event: { readOnly: boolean }) => void)|string>();
865
+ /**
866
+ * This event is fired after a widget's elements have been synchronized due to a direct or indirect call
867
+ * 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.
868
+ */
869
+ @Output() onRecompose: any = new EventEmitter<(() => void)|string>();
870
+ /**
871
+ * 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`*.
872
+ * @param {object} event Event object
873
+ * @param {Core.widget.Widget} event.source This Widget
874
+ * @param {number} event.width The new width
875
+ * @param {number} event.height The new height
876
+ * @param {number} event.oldWidth The old width
877
+ * @param {number} event.oldHeight The old height
878
+ */
879
+ @Output() onResize: any = new EventEmitter<((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string>();
880
+ /**
881
+ * Triggered after a widget is shown.
882
+ * @param {object} event Event object
883
+ * @param {Core.widget.Widget} event.source The widget
884
+ */
885
+ @Output() onShow: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
886
+
887
+ /**
888
+ * Create and append the underlying widget
889
+ */
890
+ ngOnInit(): void {
891
+ const
892
+ me = this,
893
+ {
894
+ elementRef,
895
+ bryntumConfig
896
+ } = me,
897
+ {
898
+ instanceClass,
899
+ instanceName,
900
+ bryntumConfigs,
901
+ bryntumEvents
902
+ } = BryntumLabelComponent;
903
+
904
+ bryntumConfigs.filter(prop => prop in this).forEach(prop => {
905
+ // @ts-ignore
906
+ WrapperHelper.applyPropValue(bryntumConfig, prop, this[prop]);
907
+ if (['features', 'config'].includes(prop)) {
908
+ WrapperHelper.devWarningConfigProp(instanceName, prop);
909
+ }
910
+ });
911
+ // @ts-ignore
912
+ bryntumEvents.filter(event => this[event] && this[event].observers.length > 0).forEach(event => {
913
+ const
914
+ uncapitalize = (str: string) => str.charAt(0).toLowerCase() + str.slice(1),
915
+ eventName = (str: string) => uncapitalize(str.slice(2));
916
+
917
+ // @ts-ignore
918
+ bryntumConfig.listeners[eventName(event)] = e => {
919
+ // @ts-ignore
920
+ me[event].emit(e);
921
+ // EventEmitter does not return values in the normal way, work around it by setting `returnValue` flag
922
+ // in Angular listeners
923
+ return e.returnValue;
924
+ };
925
+ });
926
+
927
+ // If component has no container specified in config then use adopt to Wrapper's element
928
+ const
929
+ containerParam = [
930
+ 'adopt',
931
+ 'appendTo',
932
+ 'insertAfter',
933
+ 'insertBefore'
934
+ // @ts-ignore
935
+ ].find(prop => bryntumConfig[prop]);
936
+ if (!containerParam) {
937
+ if (instanceName === 'Button' || elementRef.nativeElement.getRootNode() instanceof ShadowRoot) {
938
+ // Button should always be <a> or <button> inside owner element
939
+ bryntumConfig.appendTo = elementRef.nativeElement;
940
+ }
941
+ else {
942
+ bryntumConfig.adopt = elementRef.nativeElement;
943
+ }
944
+ }
945
+ else {
946
+ WrapperHelper.devWarningContainer(instanceName, containerParam);
947
+ }
948
+
949
+ // @ts-ignore
950
+ me.instance = instanceName === 'Widget' ? Widget.create(bryntumConfig) : new instanceClass(bryntumConfig);
951
+
952
+ }
953
+
954
+ /**
955
+ * Watch for changes
956
+ * @param changes
957
+ */
958
+ ngOnChanges(changes: SimpleChanges): void {
959
+ const
960
+ { instance } = this,
961
+ { instanceName } = BryntumLabelComponent;
962
+ if (!instance) {
963
+ return;
964
+ }
965
+ // Iterate over all changes
966
+ Object.entries(changes).forEach(([prop, change]) => {
967
+ const
968
+ newValue = (change as SimpleChange).currentValue,
969
+ { instance } = this,
970
+ { bryntumConfigsOnly, bryntumProps } = BryntumLabelComponent;
971
+ if (bryntumProps.includes(prop)) {
972
+ WrapperHelper.applyPropValue(instance, prop, newValue, false);
973
+ if (bryntumConfigsOnly.includes(prop)) {
974
+ WrapperHelper.devWarningUpdateProp(instanceName, prop);
975
+ }
976
+ }
977
+ });
978
+ }
979
+
980
+ /**
981
+ * Destroy the component
982
+ */
983
+ ngOnDestroy(): void {
984
+ // @ts-ignore
985
+ if (this.instance && this.instance.destroy) {
986
+ this.instance.destroy();
987
+ }
988
+ }
989
+ }