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