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