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