@bryntum/grid-react-thin 7.1.1

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