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