@bryntum/taskboard-angular-thin 7.1.1 → 7.1.3

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