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