@bryntum/taskboard-angular-thin 7.1.1 → 7.1.2

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