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