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