@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,729 @@
1
+ /**
2
+ * React wrapper for Bryntum GridChartDesigner
3
+ */
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ import React, { RefObject } from 'react';
6
+ import { AlignSpec, Base, DomConfig, KeyMapConfig, MaskConfig, Rectangle, Scroller, ScrollerConfig, TabConfig, TooltipConfig, VueConfig, Widget } from '@bryntum/core-thin';
7
+ import { Grid, GridChartDesigner, GridChartDesignerListeners } from '@bryntum/grid-thin';
8
+
9
+ import { createWidget, shouldComponentUpdate, processWidgetContent } from './WrapperHelper.js';
10
+
11
+ export type BryntumGridChartDesignerProps = {
12
+ // Configs
13
+ /**
14
+ * Element (or element id) to adopt as this Widget's encapsulating element. The widget's
15
+ * content will be placed inside this element.
16
+ * ...
17
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-adopt)
18
+ */
19
+ adopt? : HTMLElement|string
20
+ /**
21
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-floating).*
22
+ * ...
23
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-align)
24
+ */
25
+ align? : AlignSpec|string
26
+ /**
27
+ * 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
28
+ * flexbox layout. This config allows you to set this widget's
29
+ * [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) style.
30
+ */
31
+ alignSelf? : string
32
+ /**
33
+ * *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).*
34
+ * `true` to show a connector arrow pointing to the align target.
35
+ */
36
+ anchor? : boolean
37
+ /**
38
+ * Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
39
+ * runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#property-element).
40
+ */
41
+ appendTo? : HTMLElement|string
42
+ /**
43
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
44
+ * into an element which will be linked using the `aria-describedby` attribute.
45
+ * ...
46
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-ariaDescription)
47
+ */
48
+ ariaDescription? : string
49
+ /**
50
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
51
+ * the `aria-label` attribute.
52
+ * ...
53
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-ariaLabel)
54
+ */
55
+ ariaLabel? : string
56
+ /**
57
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
58
+ * hierarchy when triggered.
59
+ * ...
60
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-bubbleEvents)
61
+ */
62
+ bubbleEvents? : object
63
+ /**
64
+ * Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
65
+ * ...
66
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-callOnFunctions)
67
+ */
68
+ callOnFunctions? : boolean
69
+ /**
70
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
71
+ * application state is undefined. Code which follows the event handler will *not* be executed.
72
+ * ...
73
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-catchEventHandlerExceptions)
74
+ */
75
+ catchEventHandlerExceptions? : boolean
76
+ /**
77
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-floating).*
78
+ * Set to `true` to centre the Widget in browser viewport space.
79
+ */
80
+ centered? : boolean
81
+ /**
82
+ * Custom CSS classes to add to element.
83
+ * May be specified as a space separated string, or as an object in which property names
84
+ * with truthy values are used as the class names:
85
+ * ...
86
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-cls)
87
+ */
88
+ cls? : string|object
89
+ /**
90
+ * Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
91
+ * `style` block.
92
+ * ...
93
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-color)
94
+ */
95
+ color? : string
96
+ /**
97
+ * Programmatic control over which column to start in when used in a grid layout.
98
+ */
99
+ column? : number
100
+ config? : object
101
+ /**
102
+ * *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).*
103
+ * Element, Widget or Rectangle to which this Widget is constrained.
104
+ */
105
+ constrainTo? : HTMLElement|Widget|Rectangle
106
+ /**
107
+ * The HTML content that coexists with sibling elements which may have been added to the
108
+ * [contentElement](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#property-contentElement) by plugins and features.
109
+ * When specifying html, this widget's element will also have the [htmlCls](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-htmlCls)
110
+ * class added to its classList, to allow targeted styling.
111
+ */
112
+ content? : string
113
+ /**
114
+ * Custom CSS classes to add to the [contentElement](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#property-contentElement).
115
+ * May be specified as a space separated string, or as an object in which property names
116
+ * with truthy values are used as the class names:
117
+ * ...
118
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-contentElementCls)
119
+ */
120
+ contentElementCls? : string|object
121
+ /**
122
+ * When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
123
+ * field on the expanded record to use for populating this widget's store (if applicable)
124
+ */
125
+ dataField? : string
126
+ /**
127
+ * Object to apply to elements dataset (each key will be used as a data-attribute on the element)
128
+ */
129
+ dataset? : Record<string, string>
130
+ /**
131
+ * The name of the property to set when a single value is to be applied to this Widget. Such as when used
132
+ * in a grid WidgetColumn, this is the property to which the column's `field` is applied.
133
+ */
134
+ defaultBindProperty? : string
135
+ /**
136
+ * Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
137
+ * ...
138
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-detectCSSCompatibilityIssues)
139
+ */
140
+ detectCSSCompatibilityIssues? : boolean
141
+ /**
142
+ * 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
143
+ * cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
144
+ * ...
145
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-disabled)
146
+ */
147
+ disabled? : boolean|'inert'
148
+ /**
149
+ * Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/grid/docs/api/Core/widget/Panel)
150
+ * [strips collection](https://bryntum.com/products/grid/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
151
+ * `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
152
+ * body. Such widgets are called "edge strips".
153
+ * ...
154
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-dock)
155
+ */
156
+ dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
157
+ /**
158
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-floating).*
159
+ * Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
160
+ * property which controls when a drag should start.
161
+ * ...
162
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-draggable)
163
+ */
164
+ draggable? : boolean|{
165
+ handleSelector?: string
166
+ }
167
+ /**
168
+ * An object specifying attributes to assign to the root element of this widget.
169
+ * Set `null` value to attribute to remove it.
170
+ * ...
171
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-elementAttributes)
172
+ */
173
+ elementAttributes? : Record<string, string|null>
174
+ extraData? : any
175
+ /**
176
+ * 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
177
+ * flexbox layout. This config allows you to set this widget's
178
+ * [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
179
+ * This may be configured as a single number or a `&lt;flex-grow&gt; &lt;flex-shrink&gt; &lt;flex-basis&gt;` format string.
180
+ * numeric-only values are interpreted as the `flex-grow` value.
181
+ */
182
+ flex? : number|string
183
+ /**
184
+ * Set to `true` to move the widget out of the document flow and position it
185
+ * absolutely in browser viewport space.
186
+ */
187
+ floating? : boolean
188
+ /**
189
+ * [Grid](https://bryntum.com/products/grid/docs/api/Grid/view/Grid) whose selected cells will provide the data series for the chart.
190
+ * Columns in the grid will become series available for use in the chart designer, and cell values
191
+ * in the selected cells becomes data values shown in the preview chart.
192
+ */
193
+ grid? : Grid
194
+ /**
195
+ * Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
196
+ * which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
197
+ * cases this config is convenient.
198
+ */
199
+ height? : string|number
200
+ /**
201
+ * Configure with true to make widget initially hidden.
202
+ */
203
+ hidden? : boolean
204
+ /**
205
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-floating).*
206
+ * ...
207
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-hideAnimation)
208
+ */
209
+ hideAnimation? : boolean|object
210
+ /**
211
+ * The HTML to display initially or a function returning the markup (called at widget construction time).
212
+ * ...
213
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-html)
214
+ * @param {Core.widget.Widget} widget The calling Widget
215
+ * @returns {string}
216
+ */
217
+ html? : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig
218
+ /**
219
+ * The CSS class(es) to add when HTML content is being applied to this widget.
220
+ */
221
+ htmlCls? : string|object
222
+ /**
223
+ * Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
224
+ */
225
+ id? : string
226
+ /**
227
+ * Determines if the widgets read-only state should be controlled by its parent.
228
+ * ...
229
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-ignoreParentReadOnly)
230
+ */
231
+ ignoreParentReadOnly? : boolean
232
+ /**
233
+ * 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.
234
+ */
235
+ insertBefore? : HTMLElement|string
236
+ /**
237
+ * 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.
238
+ */
239
+ insertFirst? : HTMLElement|string
240
+ /**
241
+ * An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
242
+ * and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
243
+ * are the name of the instance method to call when the keystroke is received.
244
+ * ...
245
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-keyMap)
246
+ */
247
+ keyMap? : Record<string, KeyMapConfig>
248
+ /**
249
+ * The listener set for this object.
250
+ * ...
251
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-listeners)
252
+ */
253
+ listeners? : GridChartDesignerListeners
254
+ /**
255
+ * A class translations of which are used for translating this entity.
256
+ * This is often used when translations of an item are defined on its container class.
257
+ * For example:
258
+ * ...
259
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-localeClass)
260
+ */
261
+ localeClass? : typeof Base
262
+ /**
263
+ * Set to `false` to disable localization of this object.
264
+ */
265
+ localizable? : boolean
266
+ /**
267
+ * List of properties which values should be translated automatically upon a locale applying.
268
+ * In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
269
+ * you could use 'localeKey' meta configuration.
270
+ * Example:
271
+ * ...
272
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-localizableProperties)
273
+ */
274
+ localizableProperties? : string[]
275
+ /**
276
+ * Widget's margin. This may be configured as a single number or a `TRBL` format string.
277
+ * numeric-only values are interpreted as pixels.
278
+ */
279
+ margin? : number|string
280
+ /**
281
+ * This config object contains the defaults for the [Mask](https://bryntum.com/products/grid/docs/api/Core/widget/Mask) created for the
282
+ * [masked](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
283
+ * values.
284
+ */
285
+ maskDefaults? : MaskConfig
286
+ /**
287
+ * Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
288
+ * [Mask](https://bryntum.com/products/grid/docs/api/Core/widget/Mask) config object.
289
+ */
290
+ masked? : boolean|string|MaskConfig
291
+ /**
292
+ * The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
293
+ * like [height](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
294
+ */
295
+ maxHeight? : string|number
296
+ /**
297
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-floating).*
298
+ * ...
299
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-maximizeOnMobile)
300
+ */
301
+ maximizeOnMobile? : number|string
302
+ /**
303
+ * The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
304
+ * like [width](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
305
+ */
306
+ maxWidth? : string|number
307
+ /**
308
+ * The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
309
+ * like [height](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
310
+ */
311
+ minHeight? : string|number
312
+ /**
313
+ * The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
314
+ * like [width](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
315
+ */
316
+ minWidth? : string|number
317
+ /**
318
+ * When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
319
+ * is used to monitor this element for size changes caused by either style manipulation, or by CSS
320
+ * layout.
321
+ * ...
322
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-monitorResize)
323
+ */
324
+ monitorResize? : boolean|{
325
+ immediate?: boolean
326
+ }
327
+ /**
328
+ * The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
329
+ * [items](https://bryntum.com/products/grid/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
330
+ * the owner is <strong>always</strong> the encapsulating Container.
331
+ * ...
332
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-owner)
333
+ */
334
+ owner? : Widget|any
335
+ /**
336
+ * 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
337
+ * not participate in the standard layout of that widget, and must be positioned relatively to that
338
+ * widget's [contentElement](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#property-contentElement).
339
+ * ...
340
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-positioned)
341
+ */
342
+ positioned? : boolean
343
+ /**
344
+ * Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
345
+ * menu on click etc, since the tooltip would be displayed at the same time.
346
+ */
347
+ preventTooltipOnTouch? : boolean
348
+ /**
349
+ * Whether this widget is read-only. This is only valid if the widget is an input
350
+ * field, <strong>or contains input fields at any depth</strong>.
351
+ * ...
352
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-readOnly)
353
+ */
354
+ readOnly? : boolean
355
+ relayStoreEvents? : boolean
356
+ /**
357
+ * Configure as `true` to have the component display a translucent ripple when its
358
+ * [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
359
+ * current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
360
+ * ...
361
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-ripple)
362
+ */
363
+ ripple? : boolean|{
364
+ delegate?: string
365
+ color?: string
366
+ radius?: number
367
+ clip?: string
368
+ }
369
+ /**
370
+ * 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`
371
+ */
372
+ rootElement? : ShadowRoot|HTMLElement
373
+ /**
374
+ * This may be configured as `true` to make the widget's element use the `direction:rtl` style.
375
+ * ...
376
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-rtl)
377
+ */
378
+ rtl? : boolean
379
+ /**
380
+ * Specifies whether (and optionally in which axes) a Widget may scroll. `true` means this widget may scroll
381
+ * in both axes. May be an object containing boolean `overflowX` and `overflowY` properties which are
382
+ * applied to CSS style properties `overflowX` and `overflowY`. If they are boolean, they are translated to
383
+ * CSS overflow properties thus:
384
+ * ...
385
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-scrollable)
386
+ */
387
+ scrollable? : boolean|ScrollerConfig|Scroller
388
+ /**
389
+ * Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
390
+ * Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
391
+ */
392
+ scrollAction? : 'hide'|'realign'|null
393
+ /**
394
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-floating).*
395
+ * ...
396
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-showAnimation)
397
+ */
398
+ showAnimation? : boolean|object
399
+ /**
400
+ * 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)
401
+ */
402
+ showTooltipWhenDisabled? : boolean
403
+ /**
404
+ * Programmatic control over how many columns to span when used in a grid layout.
405
+ */
406
+ span? : number
407
+ /**
408
+ * Whether to update the chart designer's data series options and preview data as the
409
+ * grid selection changes.
410
+ */
411
+ sync? : boolean
412
+ /**
413
+ * 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
414
+ * [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
415
+ * this widget:
416
+ * ...
417
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-tab)
418
+ */
419
+ tab? : boolean|TabConfig
420
+ /**
421
+ * The tag name of this Widget's root element
422
+ */
423
+ tag? : string
424
+ /**
425
+ * Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
426
+ * ...
427
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-textAlign)
428
+ */
429
+ textAlign? : 'left'|'center'|'right'|'start'|'end'
430
+ /**
431
+ * A title to display for the widget. Only in effect when inside a container that uses it (such as TabPanel)
432
+ */
433
+ title? : string
434
+ /**
435
+ * Tooltip for the widget, either as a string or as a Tooltip config object.
436
+ * ...
437
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-tooltip)
438
+ */
439
+ tooltip? : string|TooltipConfig|null
440
+ type? : 'gridchartdesigner'
441
+ /**
442
+ * Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
443
+ * as a space separated string, an array of strings, or as an object in which property names with truthy
444
+ * values are used as the class names.
445
+ * ...
446
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-ui)
447
+ */
448
+ ui? : string|object
449
+ /**
450
+ * A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/grid/docs/api/Core/widget/Container).
451
+ * Higher weights go further down.
452
+ */
453
+ weight? : number
454
+ /**
455
+ * Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
456
+ * will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
457
+ * this config is convenient.
458
+ */
459
+ width? : string|number
460
+ /**
461
+ * The x position for the widget.
462
+ * ...
463
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-x)
464
+ */
465
+ x? : number
466
+ /**
467
+ * The y position for the widget.
468
+ * ...
469
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#config-y)
470
+ */
471
+ y? : number
472
+
473
+ // Events
474
+ /**
475
+ * Fires before an object is destroyed.
476
+ * @param {object} event Event object
477
+ * @param {Core.Base} event.source The Object that is being destroyed.
478
+ */
479
+ onBeforeDestroy? : ((event: { source: Base }) => void)|string
480
+ /**
481
+ * Triggered before a widget is hidden. Return `false` to prevent the action.
482
+ * @param {object} event Event object
483
+ * @param {Core.widget.Widget} event.source The widget being hidden.
484
+ */
485
+ onBeforeHide? : ((event: { source: Widget }) => Promise<boolean>|boolean|void)|string
486
+ /**
487
+ * Triggered before a widget is shown. Return `false` to prevent the action.
488
+ * @param {object} event Event object
489
+ * @param {Core.widget.Widget,any} event.source The widget being shown
490
+ */
491
+ onBeforeShow? : ((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string
492
+ /**
493
+ * Fires when any other event is fired from the object.
494
+ * ...
495
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#event-catchAll)
496
+ * @param {object} event Event object
497
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
498
+ * @param {string} event.event.type The type of the event which is caught by the listener
499
+ */
500
+ onCatchAll? : ((event: {[key: string]: any, type: string}) => void)|string
501
+ /**
502
+ * Fires when an object is destroyed.
503
+ * @param {object} event Event object
504
+ * @param {Core.Base} event.source The Object that is being destroyed.
505
+ */
506
+ onDestroy? : ((event: { source: Base }) => void)|string
507
+ /**
508
+ * Triggered when a widget's [element](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#property-element) is available.
509
+ * @param {object} event Event object
510
+ * @param {HTMLElement} event.element The Widget's element.
511
+ */
512
+ onElementCreated? : ((event: { element: HTMLElement }) => void)|string
513
+ /**
514
+ * Fired when focus enters this Widget.
515
+ * @param {object} event Event object
516
+ * @param {Core.widget.Widget} event.source This Widget
517
+ * @param {HTMLElement} event.fromElement The element which lost focus.
518
+ * @param {HTMLElement} event.toElement The element which gained focus.
519
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
520
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
521
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
522
+ */
523
+ onFocusIn? : ((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string
524
+ /**
525
+ * Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
526
+ * focus moving from within this Widget's ownership tree, even if there are floating widgets
527
+ * will not trigger this event. This is when focus exits this widget completely.
528
+ * @param {object} event Event object
529
+ * @param {Core.widget.Widget} event.source This Widget
530
+ * @param {HTMLElement} event.fromElement The element which lost focus.
531
+ * @param {HTMLElement} event.toElement The element which gained focus.
532
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
533
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
534
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
535
+ */
536
+ onFocusOut? : ((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string
537
+ /**
538
+ * Triggered after a widget was hidden
539
+ * @param {object} event Event object
540
+ * @param {Core.widget.Widget} event.source The widget
541
+ */
542
+ onHide? : ((event: { source: Widget }) => void)|string
543
+ /**
544
+ * Triggered when a widget which had been in a non-visible state for any reason
545
+ * achieves visibility.
546
+ * ...
547
+ * [View online docs...](https://bryntum.com/products/grid/docs/api/Grid/widget/GridChartDesigner#event-paint)
548
+ * @param {object} event Event object
549
+ * @param {Core.widget.Widget} event.source The widget being painted.
550
+ * @param {boolean} event.firstPaint `true` if this is the first paint.
551
+ */
552
+ onPaint? : ((event: { source: Widget, firstPaint: boolean }) => void)|string
553
+ /**
554
+ * Fired when a Widget's read only state is toggled
555
+ * @param {object} event Event object
556
+ * @param {boolean} event.readOnly Read only or not
557
+ */
558
+ onReadOnly? : ((event: { readOnly: boolean }) => void)|string
559
+ /**
560
+ * This event is fired after a widget's elements have been synchronized due to a direct or indirect call
561
+ * 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.
562
+ */
563
+ onRecompose? : (() => void)|string
564
+ /**
565
+ * 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`*.
566
+ * @param {object} event Event object
567
+ * @param {Core.widget.Widget} event.source This Widget
568
+ * @param {number} event.width The new width
569
+ * @param {number} event.height The new height
570
+ * @param {number} event.oldWidth The old width
571
+ * @param {number} event.oldHeight The old height
572
+ */
573
+ onResize? : ((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string
574
+ /**
575
+ * Triggered after a widget is shown.
576
+ * @param {object} event Event object
577
+ * @param {Core.widget.Widget} event.source The widget
578
+ */
579
+ onShow? : ((event: { source: Widget }) => void)|string
580
+
581
+ }
582
+
583
+ export class BryntumGridChartDesigner extends React.Component<BryntumGridChartDesignerProps> {
584
+
585
+ static instanceClass = GridChartDesigner;
586
+
587
+ static instanceName = 'GridChartDesigner';
588
+
589
+ processWidgetContent = processWidgetContent;
590
+
591
+ static configNames = [
592
+ 'adopt',
593
+ 'align',
594
+ 'anchor',
595
+ 'ariaDescription',
596
+ 'ariaLabel',
597
+ 'bubbleEvents',
598
+ 'centered',
599
+ 'color',
600
+ 'config',
601
+ 'constrainTo',
602
+ 'contentElementCls',
603
+ 'dataField',
604
+ 'defaultBindProperty',
605
+ 'detectCSSCompatibilityIssues',
606
+ 'dock',
607
+ 'draggable',
608
+ 'elementAttributes',
609
+ 'floating',
610
+ 'grid',
611
+ 'hideAnimation',
612
+ 'htmlCls',
613
+ 'ignoreParentReadOnly',
614
+ 'listeners',
615
+ 'localeClass',
616
+ 'localizable',
617
+ 'localizableProperties',
618
+ 'maskDefaults',
619
+ 'masked',
620
+ 'monitorResize',
621
+ 'owner',
622
+ 'positioned',
623
+ 'preventTooltipOnTouch',
624
+ 'relayStoreEvents',
625
+ 'ripple',
626
+ 'rootElement',
627
+ 'scrollAction',
628
+ 'showAnimation',
629
+ 'showTooltipWhenDisabled',
630
+ 'sync',
631
+ 'tab',
632
+ 'tag',
633
+ 'textAlign',
634
+ 'title',
635
+ 'type',
636
+ 'ui',
637
+ 'weight'
638
+ ];
639
+
640
+ static propertyConfigNames = [
641
+ 'alignSelf',
642
+ 'appendTo',
643
+ 'callOnFunctions',
644
+ 'catchEventHandlerExceptions',
645
+ 'cls',
646
+ 'column',
647
+ 'content',
648
+ 'dataset',
649
+ 'disabled',
650
+ 'extraData',
651
+ 'flex',
652
+ 'height',
653
+ 'hidden',
654
+ 'html',
655
+ 'id',
656
+ 'insertBefore',
657
+ 'insertFirst',
658
+ 'keyMap',
659
+ 'margin',
660
+ 'maxHeight',
661
+ 'maximizeOnMobile',
662
+ 'maxWidth',
663
+ 'minHeight',
664
+ 'minWidth',
665
+ 'onBeforeDestroy',
666
+ 'onBeforeHide',
667
+ 'onBeforeShow',
668
+ 'onCatchAll',
669
+ 'onDestroy',
670
+ 'onElementCreated',
671
+ 'onFocusIn',
672
+ 'onFocusOut',
673
+ 'onHide',
674
+ 'onPaint',
675
+ 'onReadOnly',
676
+ 'onRecompose',
677
+ 'onResize',
678
+ 'onShow',
679
+ 'readOnly',
680
+ 'rtl',
681
+ 'scrollable',
682
+ 'span',
683
+ 'tooltip',
684
+ 'width',
685
+ 'x',
686
+ 'y'
687
+ ];
688
+
689
+ static propertyNames = [
690
+ 'anchorSize',
691
+ 'focusVisible',
692
+ 'parent'
693
+ ];
694
+
695
+ // Component instance
696
+ instance!: GridChartDesigner;
697
+
698
+ // Component element
699
+ element! : HTMLElement;
700
+
701
+ componentDidMount(): void {
702
+ this.instance = createWidget(this);
703
+ }
704
+
705
+ componentWillUnmount(): void {
706
+ // @ts-ignore
707
+ this.instance?.destroy?.();
708
+ }
709
+
710
+ /**
711
+ * Component about to be updated, from changing a prop using state.
712
+ * React to it depending on what changed and prevent react from re-rendering our component.
713
+ * @param nextProps
714
+ * @param nextState
715
+ * @returns {boolean}
716
+ */
717
+ shouldComponentUpdate(nextProps: Readonly<BryntumGridChartDesignerProps>, nextState: Readonly<{}>): boolean {
718
+ return shouldComponentUpdate(this, nextProps, nextState);
719
+ }
720
+
721
+ render(): React.ReactNode {
722
+
723
+ const className = `b-react-grid-chart-designer-container`;
724
+ return (
725
+ <div className={className} ref={(element) => (this.element = element!)}></div>
726
+ );
727
+
728
+ }
729
+ }