@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,1321 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /**
3
+ * Angular wrapper for Bryntum TextField
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, ContainerItemConfig, DomConfig, Field, FieldContainer, FieldContainerConfig, FieldTriggerConfig, KeyMapConfig, MaskConfig, Model, Rectangle, Scroller, TabConfig, TextField, TextFieldListeners, TooltipConfig, VueConfig, Widget } from '@bryntum/taskboard';
11
+
12
+ import { StringHelper } from '@bryntum/taskboard';
13
+
14
+ export type BryntumTextFieldProps = {
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/TextField#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/TextField#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/TextField#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/TextField#config-ariaLabel)
57
+ */
58
+ ariaLabel ? : string
59
+ /**
60
+ * Sets the native `autocomplete` property of the underlying input element. For more information, please refer to
61
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
62
+ */
63
+ autoComplete ? : string
64
+ /**
65
+ * Specify `true` to auto select field contents on focus
66
+ */
67
+ autoSelect ? : boolean
68
+ /**
69
+ * Initial text to show in badge.
70
+ */
71
+ badge ? : string
72
+ /**
73
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
74
+ * hierarchy when triggered.
75
+ * ...
76
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-bubbleEvents)
77
+ */
78
+ bubbleEvents ? : object
79
+ /**
80
+ * Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
81
+ * ...
82
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-callOnFunctions)
83
+ */
84
+ callOnFunctions ? : boolean
85
+ /**
86
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
87
+ * application state is undefined. Code which follows the event handler will *not* be executed.
88
+ * ...
89
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-catchEventHandlerExceptions)
90
+ */
91
+ catchEventHandlerExceptions ? : boolean
92
+ /**
93
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
94
+ * Set to `true` to centre the Widget in browser viewport space.
95
+ */
96
+ centered ? : boolean
97
+ /**
98
+ * Show a trigger to clear field, if this field is not [readOnly](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#config-readOnly). The trigger is available
99
+ * in the [triggers](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#property-triggers) object under the name `clear`. May also be an object which
100
+ * configures the `clear` [trigger](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#property-triggers).
101
+ */
102
+ clearable ? : boolean|FieldTriggerConfig
103
+ /**
104
+ * Custom CSS classes to add to element.
105
+ * May be specified as a space separated string, or as an object in which property names
106
+ * with truthy values are used as the class names:
107
+ * ...
108
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-cls)
109
+ */
110
+ cls ? : string|object
111
+ /**
112
+ * Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
113
+ * `style` block.
114
+ * ...
115
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-color)
116
+ */
117
+ color ? : string
118
+ /**
119
+ * Programmatic control over which column to start in when used in a grid layout.
120
+ */
121
+ column ? : number
122
+ config ? : object
123
+ /**
124
+ * *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).*
125
+ * Element, Widget or Rectangle to which this Widget is constrained.
126
+ */
127
+ constrainTo ? : HTMLElement|Widget|Rectangle
128
+ /**
129
+ * The configuration for additional items associated to this field. This is typically used to add contextual
130
+ * fields related to a [checkbox](https://bryntum.com/products/taskboard/docs/api/Core/widget/Checkbox) or [radio button](#Core/widget/Radio). See
131
+ * these classes for examples of nested fields.
132
+ * ...
133
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-container)
134
+ */
135
+ container ? : Record<string, ContainerItemConfig>|ContainerItemConfig[]|FieldContainerConfig|FieldContainer
136
+ /**
137
+ * The config controls how the value of nested items are handled when a parent container gets or sets its
138
+ * [values](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container#property-values).
139
+ * ...
140
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-containValues)
141
+ * @param {Core.widget.Field} field Field instance
142
+ * @returns {boolean}
143
+ */
144
+ containValues ? : boolean|string|((field: Field) => boolean)
145
+ /**
146
+ * Custom CSS classes to add to the [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement).
147
+ * May be specified as a space separated string, or as an object in which property names
148
+ * with truthy values are used as the class names:
149
+ * ...
150
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-contentElementCls)
151
+ */
152
+ contentElementCls ? : string|object
153
+ /**
154
+ * When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
155
+ * field on the expanded record to use for populating this widget's store (if applicable)
156
+ */
157
+ dataField ? : string
158
+ /**
159
+ * Object to apply to elements dataset (each key will be used as a data-attribute on the element)
160
+ */
161
+ dataset ? : Record<string, string>
162
+ /**
163
+ * The name of the property to set when a single value is to be applied to this Widget. Such as when used
164
+ * in a grid WidgetColumn, this is the property to which the column's `field` is applied.
165
+ */
166
+ defaultBindProperty ? : string
167
+ /**
168
+ * Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
169
+ * ...
170
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-detectCSSCompatibilityIssues)
171
+ */
172
+ detectCSSCompatibilityIssues ? : boolean
173
+ /**
174
+ * 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
175
+ * cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
176
+ * ...
177
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-disabled)
178
+ */
179
+ disabled ? : boolean|'inert'
180
+ /**
181
+ * Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/taskboard/docs/api/Core/widget/Panel)
182
+ * [strips collection](https://bryntum.com/products/taskboard/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
183
+ * `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
184
+ * body. Such widgets are called "edge strips".
185
+ * ...
186
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-dock)
187
+ */
188
+ dock ? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
189
+ /**
190
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
191
+ * Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
192
+ * property which controls when a drag should start.
193
+ * ...
194
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-draggable)
195
+ */
196
+ draggable ? : boolean|{
197
+ handleSelector?: string
198
+ }
199
+ /**
200
+ * Set to `false` to prevent user from editing the field. For TextFields it is basically the same as setting
201
+ * [readOnly](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#config-readOnly), but for PickerFields there is a distinction where it allows you to pick a value
202
+ * but not to type one in the field.
203
+ * ...
204
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-editable)
205
+ */
206
+ editable ? : boolean
207
+ /**
208
+ * An object specifying attributes to assign to the root element of this widget.
209
+ * Set `null` value to attribute to remove it.
210
+ * ...
211
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-elementAttributes)
212
+ */
213
+ elementAttributes ? : Record<string, string|null>
214
+ extraData ? : any
215
+ /**
216
+ * 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
217
+ * flexbox layout. This config allows you to set this widget's
218
+ * [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
219
+ * This may be configured as a single number or a `&lt;flex-grow&gt; &lt;flex-shrink&gt; &lt;flex-basis&gt;` format string.
220
+ * numeric-only values are interpreted as the `flex-grow` value.
221
+ */
222
+ flex ? : number|string
223
+ /**
224
+ * Set to `true` to move the widget out of the document flow and position it
225
+ * absolutely in browser viewport space.
226
+ */
227
+ floating ? : boolean
228
+ /**
229
+ * Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
230
+ * which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
231
+ * cases this config is convenient.
232
+ */
233
+ height ? : string|number
234
+ /**
235
+ * Configure with true to make widget initially hidden.
236
+ */
237
+ hidden ? : boolean
238
+ /**
239
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
240
+ * ...
241
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-hideAnimation)
242
+ */
243
+ hideAnimation ? : boolean|object
244
+ /**
245
+ * Specify `true` to highlight field after external value changes
246
+ */
247
+ highlightExternalChange ? : boolean
248
+ /**
249
+ * An optional string to display inside the input field as an overlay. This can be useful for displaying
250
+ * a field's units.
251
+ * ...
252
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-hint)
253
+ * @param {object} data A data object
254
+ * @param {Core.widget.Field} data.source A reference to the field instance
255
+ * @param {any} data.value The current value of the field
256
+ * @returns {string}
257
+ */
258
+ hint ? : string|((data: { source: Field, value: any }) => string)
259
+ /**
260
+ * This config is similar to [hint](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#config-hint) except that this config is used to display HTML content.
261
+ * Since this can allow malicious content to be executed, be sure not to include user-entered data or to
262
+ * encode such data (see [encodeHtml](https://bryntum.com/products/taskboard/docs/api/Core/helper/StringHelper#function-encodeHtml-static)).
263
+ * ...
264
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-hintHtml)
265
+ * @param {object} data A data object
266
+ * @param {Core.widget.Field} data.source A reference to the field instance
267
+ * @param {any} data.value The current value of the field
268
+ * @returns {string}
269
+ */
270
+ hintHtml ? : string|((data: { source: Field, value: any }) => string)
271
+ /**
272
+ * Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
273
+ */
274
+ id ? : string
275
+ /**
276
+ * Determines if the widgets read-only state should be controlled by its parent.
277
+ * ...
278
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-ignoreParentReadOnly)
279
+ */
280
+ ignoreParentReadOnly ? : boolean
281
+ /**
282
+ * Set this config to `true` to always display items horizontally along with this field. This assigns an
283
+ * [hbox](https://bryntum.com/products/taskboard/docs/api/Core/widget/layout/Box) as the [layout](#Core/widget/Container#config-layout) to the
284
+ * [container](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#config-container).
285
+ * ...
286
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-inline)
287
+ */
288
+ inline ? : boolean
289
+ /**
290
+ * Text alignment for the input field.
291
+ */
292
+ inputAlign ? : string
293
+ /**
294
+ * Sets custom attributes of the underlying input element. For more information, please refer to
295
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes)
296
+ */
297
+ inputAttributes ? : Record<string, string>
298
+ /**
299
+ * If you need to use something else than a default `input` element, as the input element, provide the tag
300
+ * name here. Please note that this is used for advanced usage only, for example when using WebComponents
301
+ * (custom elements), and that the configured element must fulfil the same contract as a regular input
302
+ * element.
303
+ */
304
+ inputTag ? : string
305
+ /**
306
+ * Sets the `type` attribute of the underlying input element (password, hidden, date, color, etc.).
307
+ */
308
+ inputType ? : string
309
+ /**
310
+ * The width to apply to the `.b-field-inner` element, which encompasses the `input` element and any
311
+ * triggers. If a number is specified, `px` will be used.
312
+ */
313
+ inputWidth ? : string|number
314
+ /**
315
+ * 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.
316
+ */
317
+ insertBefore ? : HTMLElement|string
318
+ /**
319
+ * 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.
320
+ */
321
+ insertFirst ? : HTMLElement|string
322
+ /**
323
+ * An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
324
+ * and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
325
+ * are the name of the instance method to call when the keystroke is received.
326
+ * ...
327
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-keyMap)
328
+ */
329
+ keyMap ? : Record<string, KeyMapConfig>
330
+ /**
331
+ * The delay in milliseconds to wait after the last keystroke before triggering a change event.
332
+ * Set to 0 to not trigger change events from keystrokes (listen for input event instead to have
333
+ * immediate feedback, change will still be triggered on blur).
334
+ * ...
335
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-keyStrokeChangeDelay)
336
+ */
337
+ keyStrokeChangeDelay ? : number
338
+ /**
339
+ * Label, prepended to field
340
+ */
341
+ label ? : string
342
+ /**
343
+ * CSS class name or class names to add to any configured [label](https://bryntum.com/products/taskboard/docs/api/Core/widget/mixin/Labelable#config-label)
344
+ */
345
+ labelCls ? : string|object
346
+ /**
347
+ * Label position, either 'before' the field or 'above' the field
348
+ * ...
349
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-labelPosition)
350
+ */
351
+ labelPosition ? : 'before'|'above'|null
352
+ /**
353
+ * The labels to add either before or after the input field.
354
+ * Each label may have the following properties:
355
+ * ...
356
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-labels)
357
+ */
358
+ labels ? : object[]
359
+ /**
360
+ * The width to apply to the `&lt;label&gt;` element. If a number is specified, `px` will be used.
361
+ */
362
+ labelWidth ? : string|number
363
+ /**
364
+ * The listener set for this object.
365
+ * ...
366
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-listeners)
367
+ */
368
+ listeners ? : TextFieldListeners
369
+ /**
370
+ * A class translations of which are used for translating this entity.
371
+ * This is often used when translations of an item are defined on its container class.
372
+ * For example:
373
+ * ...
374
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-localeClass)
375
+ */
376
+ localeClass ? : typeof Base
377
+ /**
378
+ * Set to `false` to disable localization of this object.
379
+ */
380
+ localizable ? : boolean
381
+ /**
382
+ * List of properties which values should be translated automatically upon a locale applying.
383
+ * In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
384
+ * you could use 'localeKey' meta configuration.
385
+ * Example:
386
+ * ...
387
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-localizableProperties)
388
+ */
389
+ localizableProperties ? : string[]
390
+ /**
391
+ * Widget's margin. This may be configured as a single number or a `TRBL` format string.
392
+ * numeric-only values are interpreted as pixels.
393
+ */
394
+ margin ? : number|string
395
+ /**
396
+ * This config object contains the defaults for the [Mask](https://bryntum.com/products/taskboard/docs/api/Core/widget/Mask) created for the
397
+ * [masked](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
398
+ * values.
399
+ */
400
+ maskDefaults ? : MaskConfig
401
+ /**
402
+ * Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
403
+ * [Mask](https://bryntum.com/products/taskboard/docs/api/Core/widget/Mask) config object.
404
+ */
405
+ masked ? : boolean|string|MaskConfig
406
+ /**
407
+ * The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
408
+ * like [height](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
409
+ */
410
+ maxHeight ? : string|number
411
+ /**
412
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
413
+ * ...
414
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-maximizeOnMobile)
415
+ */
416
+ maximizeOnMobile ? : number|string
417
+ /**
418
+ * The max number of characters for the input field
419
+ */
420
+ maxLength ? : number
421
+ /**
422
+ * The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
423
+ * like [width](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
424
+ */
425
+ maxWidth ? : string|number
426
+ /**
427
+ * The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
428
+ * like [height](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
429
+ */
430
+ minHeight ? : string|number
431
+ /**
432
+ * The min number of characters for the input field
433
+ */
434
+ minLength ? : number
435
+ /**
436
+ * The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
437
+ * like [width](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
438
+ */
439
+ minWidth ? : string|number
440
+ /**
441
+ * When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
442
+ * is used to monitor this element for size changes caused by either style manipulation, or by CSS
443
+ * layout.
444
+ * ...
445
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-monitorResize)
446
+ */
447
+ monitorResize ? : boolean|{
448
+ immediate?: boolean
449
+ }
450
+ /**
451
+ * Name of the field which is used as a key to get/set values from/to the field.
452
+ * Used prior to [ref](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-ref) and [id](#Core/widget/Widget#config-id) in
453
+ * [Container.values](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container#property-values).
454
+ * ...
455
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-name)
456
+ */
457
+ name ? : string
458
+ /**
459
+ * The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
460
+ * [items](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
461
+ * the owner is <strong>always</strong> the encapsulating Container.
462
+ * ...
463
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-owner)
464
+ */
465
+ owner ? : Widget|any
466
+ /**
467
+ * Text to display in empty field.
468
+ */
469
+ placeholder ? : string
470
+ /**
471
+ * 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
472
+ * not participate in the standard layout of that widget, and must be positioned relatively to that
473
+ * widget's [contentElement](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-contentElement).
474
+ * ...
475
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-positioned)
476
+ */
477
+ positioned ? : boolean
478
+ /**
479
+ * Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
480
+ * menu on click etc, since the tooltip would be displayed at the same time.
481
+ */
482
+ preventTooltipOnTouch ? : boolean
483
+ /**
484
+ * Makes the field unmodifiable by user action. The input area is not editable, and triggers
485
+ * are unresponsive.
486
+ * ...
487
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-readOnly)
488
+ */
489
+ readOnly ? : boolean
490
+ relayStoreEvents ? : boolean
491
+ /**
492
+ * Predefined style to use for the field. Possible values are:
493
+ * ...
494
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-rendition)
495
+ */
496
+ rendition ? : 'outlined'|'filled'|string
497
+ /**
498
+ * Configure as `true` to indicate that a `null` field value is to be marked as invalid. This will
499
+ * optionally append a * to the field label if [showRequiredIndicator](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#property-showRequiredIndicator) is set.
500
+ */
501
+ required ? : boolean
502
+ /**
503
+ * If this field is not [readOnly](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#config-readOnly), then setting this option means that pressing
504
+ * the `ESCAPE` key after editing the field will revert the field to the value it had when
505
+ * the user focused the field. If the field is *not* changed from when focused, the [clearable](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#config-clearable)
506
+ * behaviour will be activated.
507
+ */
508
+ revertOnEscape ? : boolean
509
+ /**
510
+ * Configure as `true` to have the component display a translucent ripple when its
511
+ * [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
512
+ * current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
513
+ * ...
514
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-ripple)
515
+ */
516
+ ripple ? : boolean|{
517
+ delegate?: string
518
+ color?: string
519
+ radius?: number
520
+ clip?: string
521
+ }
522
+ /**
523
+ * 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`
524
+ */
525
+ rootElement ? : ShadowRoot|HTMLElement
526
+ /**
527
+ * This may be configured as `true` to make the widget's element use the `direction:rtl` style.
528
+ * ...
529
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-rtl)
530
+ */
531
+ rtl ? : boolean
532
+ /**
533
+ * Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
534
+ * Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
535
+ */
536
+ scrollAction ? : 'hide'|'realign'|null
537
+ /**
538
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#config-floating).*
539
+ * ...
540
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-showAnimation)
541
+ */
542
+ showAnimation ? : boolean|object
543
+ /**
544
+ * `true` to automatically display a * after the label for this field when it is [required](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#property-required).
545
+ */
546
+ showRequiredIndicator ? : string
547
+ /**
548
+ * 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)
549
+ */
550
+ showTooltipWhenDisabled ? : boolean
551
+ /**
552
+ * Set to `true`, completely bypasses validation logic (could be userful if your field is not `editable`
553
+ * to the user).
554
+ */
555
+ skipValidation ? : boolean
556
+ /**
557
+ * Programmatic control over how many columns to span when used in a grid layout.
558
+ */
559
+ span ? : number
560
+ /**
561
+ * Sets the native `spellcheck` property of the underlying input element. For more information, please refer to
562
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck)
563
+ */
564
+ spellCheck ? : boolean
565
+ /**
566
+ * 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
567
+ * [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
568
+ * this widget:
569
+ * ...
570
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-tab)
571
+ */
572
+ tab ? : boolean|TabConfig
573
+ /**
574
+ * The tab index of the input field or fields, or `null` for natural tab order (recommended). Setting to `0`
575
+ * is equivalent to natural tab order, but is unnecessary for fields since they are naturally tabbable
576
+ * (i.e., accessible via the TAB key). Setting to `-1` disables tabbability but allows for focus to be set
577
+ * to the element programmatically.
578
+ * ...
579
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-tabIndex)
580
+ */
581
+ tabIndex ? : number
582
+ /**
583
+ * Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
584
+ * ...
585
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-textAlign)
586
+ */
587
+ textAlign ? : 'left'|'center'|'right'|'start'|'end'
588
+ /**
589
+ * A title to display for the widget. Only in effect when inside a container that uses it (such as TabPanel)
590
+ */
591
+ title ? : string
592
+ /**
593
+ * Tooltip for the widget, either as a string or as a Tooltip config object.
594
+ * ...
595
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-tooltip)
596
+ */
597
+ tooltip ? : string|TooltipConfig|null
598
+ /**
599
+ * The triggers to add either before or after the input field. Each property name is the reference by which
600
+ * an instantiated Trigger Widget may be retrieved from the live `triggers` property.
601
+ * ...
602
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-triggers)
603
+ */
604
+ triggers ? : Record<string, FieldTriggerConfig>|Record<string, Widget>
605
+ type ? : 'textfield'|'text'
606
+ /**
607
+ * Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
608
+ * as a space separated string, an array of strings, or as an object in which property names with truthy
609
+ * values are used as the class names.
610
+ * ...
611
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-ui)
612
+ */
613
+ ui ? : string|object
614
+ /**
615
+ * Set to `false` to not highlight a field as invalid while typing, to instead show it on ENTER key press
616
+ * or similar.
617
+ */
618
+ validateOnInput ? : boolean
619
+ /**
620
+ * Default value
621
+ */
622
+ value ? : string
623
+ /**
624
+ * A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/taskboard/docs/api/Core/widget/Container).
625
+ * Higher weights go further down.
626
+ */
627
+ weight ? : number
628
+ /**
629
+ * Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
630
+ * will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
631
+ * this config is convenient.
632
+ */
633
+ width ? : string|number
634
+ /**
635
+ * The x position for the widget.
636
+ * ...
637
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-x)
638
+ */
639
+ x ? : number
640
+ /**
641
+ * The y position for the widget.
642
+ * ...
643
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#config-y)
644
+ */
645
+ y ? : number
646
+
647
+ }
648
+
649
+ @Component({
650
+ selector : 'bryntum-text-field',
651
+ template : ''
652
+ })
653
+ export class BryntumTextFieldComponent implements OnInit, OnDestroy {
654
+
655
+ public static instanceClass = TextField;
656
+
657
+ public static instanceName = 'TextField';
658
+
659
+ private static bryntumEvents: string[] = [
660
+ 'onAction',
661
+ 'onBeforeDestroy',
662
+ 'onBeforeHide',
663
+ 'onBeforeShow',
664
+ 'onCatchAll',
665
+ 'onChange',
666
+ 'onClear',
667
+ 'onDestroy',
668
+ 'onElementCreated',
669
+ 'onFocusIn',
670
+ 'onFocusOut',
671
+ 'onHide',
672
+ 'onInput',
673
+ 'onPaint',
674
+ 'onReadOnly',
675
+ 'onRecompose',
676
+ 'onResize',
677
+ 'onShow',
678
+ 'onTrigger'
679
+ ];
680
+
681
+ private static bryntumFeatureNames: string[] = [
682
+
683
+ ];
684
+
685
+ private static bryntumConfigs: string[] = BryntumTextFieldComponent.bryntumFeatureNames.concat([
686
+ 'adopt',
687
+ 'align',
688
+ 'alignSelf',
689
+ 'anchor',
690
+ 'appendTo',
691
+ 'ariaDescription',
692
+ 'ariaLabel',
693
+ 'autoComplete',
694
+ 'autoSelect',
695
+ 'badge',
696
+ 'bubbleEvents',
697
+ 'callOnFunctions',
698
+ 'catchEventHandlerExceptions',
699
+ 'centered',
700
+ 'clearable',
701
+ 'cls',
702
+ 'color',
703
+ 'column',
704
+ 'config',
705
+ 'constrainTo',
706
+ 'container',
707
+ 'containValues',
708
+ 'contentElementCls',
709
+ 'dataField',
710
+ 'dataset',
711
+ 'defaultBindProperty',
712
+ 'detectCSSCompatibilityIssues',
713
+ 'disabled',
714
+ 'dock',
715
+ 'draggable',
716
+ 'editable',
717
+ 'elementAttributes',
718
+ 'extraData',
719
+ 'flex',
720
+ 'floating',
721
+ 'height',
722
+ 'hidden',
723
+ 'hideAnimation',
724
+ 'highlightExternalChange',
725
+ 'hint',
726
+ 'hintHtml',
727
+ 'id',
728
+ 'ignoreParentReadOnly',
729
+ 'inline',
730
+ 'inputAlign',
731
+ 'inputAttributes',
732
+ 'inputTag',
733
+ 'inputType',
734
+ 'inputWidth',
735
+ 'insertBefore',
736
+ 'insertFirst',
737
+ 'keyMap',
738
+ 'keyStrokeChangeDelay',
739
+ 'label',
740
+ 'labelCls',
741
+ 'labelPosition',
742
+ 'labels',
743
+ 'labelWidth',
744
+ 'listeners',
745
+ 'localeClass',
746
+ 'localizable',
747
+ 'localizableProperties',
748
+ 'margin',
749
+ 'maskDefaults',
750
+ 'masked',
751
+ 'maxHeight',
752
+ 'maximizeOnMobile',
753
+ 'maxLength',
754
+ 'maxWidth',
755
+ 'minHeight',
756
+ 'minLength',
757
+ 'minWidth',
758
+ 'monitorResize',
759
+ 'name',
760
+ 'owner',
761
+ 'placeholder',
762
+ 'positioned',
763
+ 'preventTooltipOnTouch',
764
+ 'readOnly',
765
+ 'relayStoreEvents',
766
+ 'rendition',
767
+ 'required',
768
+ 'revertOnEscape',
769
+ 'ripple',
770
+ 'rootElement',
771
+ 'rtl',
772
+ 'scrollAction',
773
+ 'showAnimation',
774
+ 'showRequiredIndicator',
775
+ 'showTooltipWhenDisabled',
776
+ 'skipValidation',
777
+ 'span',
778
+ 'spellCheck',
779
+ 'tab',
780
+ 'tabIndex',
781
+ 'textAlign',
782
+ 'title',
783
+ 'tooltip',
784
+ 'triggers',
785
+ 'type',
786
+ 'ui',
787
+ 'validateOnInput',
788
+ 'value',
789
+ 'weight',
790
+ 'width',
791
+ 'x',
792
+ 'y'
793
+ ]);
794
+
795
+ private static bryntumConfigsOnly: string[] = [
796
+ 'adopt',
797
+ 'align',
798
+ 'anchor',
799
+ 'ariaDescription',
800
+ 'ariaLabel',
801
+ 'autoComplete',
802
+ 'autoSelect',
803
+ 'bubbleEvents',
804
+ 'centered',
805
+ 'clearable',
806
+ 'color',
807
+ 'config',
808
+ 'constrainTo',
809
+ 'container',
810
+ 'containValues',
811
+ 'contentElementCls',
812
+ 'dataField',
813
+ 'defaultBindProperty',
814
+ 'detectCSSCompatibilityIssues',
815
+ 'dock',
816
+ 'draggable',
817
+ 'elementAttributes',
818
+ 'floating',
819
+ 'hideAnimation',
820
+ 'highlightExternalChange',
821
+ 'hint',
822
+ 'hintHtml',
823
+ 'ignoreParentReadOnly',
824
+ 'inline',
825
+ 'inputAlign',
826
+ 'inputAttributes',
827
+ 'inputTag',
828
+ 'inputType',
829
+ 'inputWidth',
830
+ 'keyStrokeChangeDelay',
831
+ 'labelCls',
832
+ 'labelPosition',
833
+ 'labels',
834
+ 'labelWidth',
835
+ 'listeners',
836
+ 'localeClass',
837
+ 'localizable',
838
+ 'localizableProperties',
839
+ 'maskDefaults',
840
+ 'masked',
841
+ 'maxLength',
842
+ 'minLength',
843
+ 'monitorResize',
844
+ 'name',
845
+ 'owner',
846
+ 'positioned',
847
+ 'preventTooltipOnTouch',
848
+ 'relayStoreEvents',
849
+ 'revertOnEscape',
850
+ 'ripple',
851
+ 'rootElement',
852
+ 'scrollAction',
853
+ 'showAnimation',
854
+ 'showTooltipWhenDisabled',
855
+ 'skipValidation',
856
+ 'spellCheck',
857
+ 'tab',
858
+ 'tabIndex',
859
+ 'textAlign',
860
+ 'title',
861
+ 'type',
862
+ 'ui',
863
+ 'validateOnInput',
864
+ 'weight'
865
+ ];
866
+
867
+ private static bryntumProps: string[] = BryntumTextFieldComponent.bryntumFeatureNames.concat([
868
+ 'alignSelf',
869
+ 'anchorSize',
870
+ 'appendTo',
871
+ 'badge',
872
+ 'callOnFunctions',
873
+ 'catchEventHandlerExceptions',
874
+ 'cls',
875
+ 'column',
876
+ 'content',
877
+ 'dataset',
878
+ 'disabled',
879
+ 'editable',
880
+ 'extraData',
881
+ 'flex',
882
+ 'focusVisible',
883
+ 'formula',
884
+ 'height',
885
+ 'hidden',
886
+ 'html',
887
+ 'id',
888
+ 'input',
889
+ 'insertBefore',
890
+ 'insertFirst',
891
+ 'keyMap',
892
+ 'label',
893
+ 'margin',
894
+ 'maxHeight',
895
+ 'maximizeOnMobile',
896
+ 'maxWidth',
897
+ 'minHeight',
898
+ 'minWidth',
899
+ 'parent',
900
+ 'placeholder',
901
+ 'readOnly',
902
+ 'rendition',
903
+ 'required',
904
+ 'rtl',
905
+ 'scrollable',
906
+ 'showRequiredIndicator',
907
+ 'span',
908
+ 'tooltip',
909
+ 'triggers',
910
+ 'value',
911
+ 'width',
912
+ 'x',
913
+ 'y'
914
+ ]);
915
+
916
+ private elementRef: ElementRef;
917
+ public instance!: TextField;
918
+
919
+ private bryntumConfig = {
920
+ adopt : undefined,
921
+ appendTo : undefined,
922
+ href : undefined,
923
+ angularComponent : this,
924
+ features : {},
925
+ listeners : {}
926
+ };
927
+
928
+ constructor(element: ElementRef) {
929
+ this.elementRef = element;
930
+ }
931
+
932
+ // Configs only
933
+ @Input() adopt ! : HTMLElement|string;
934
+ @Input() align ! : AlignSpec|string;
935
+ @Input() anchor ! : boolean;
936
+ @Input() ariaDescription ! : string;
937
+ @Input() ariaLabel ! : string;
938
+ @Input() autoComplete ! : string;
939
+ @Input() autoSelect ! : boolean;
940
+ @Input() bubbleEvents ! : object;
941
+ @Input() centered ! : boolean;
942
+ @Input() clearable ! : boolean|FieldTriggerConfig;
943
+ @Input() color ! : string;
944
+ @Input() config ! : object;
945
+ @Input() constrainTo ! : HTMLElement|Widget|Rectangle;
946
+ @Input() container ! : Record<string, ContainerItemConfig>|ContainerItemConfig[]|FieldContainerConfig|FieldContainer;
947
+ @Input() containValues ! : boolean|string|((field: Field) => boolean);
948
+ @Input() contentElementCls ! : string|object;
949
+ @Input() dataField ! : string;
950
+ @Input() defaultBindProperty ! : string;
951
+ @Input() detectCSSCompatibilityIssues ! : boolean;
952
+ @Input() dock ! : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object;
953
+ @Input() draggable ! : boolean|{
954
+ handleSelector?: string
955
+ };
956
+ @Input() elementAttributes ! : Record<string, string|null>;
957
+ @Input() floating ! : boolean;
958
+ @Input() hideAnimation ! : boolean|object;
959
+ @Input() highlightExternalChange ! : boolean;
960
+ @Input() hint ! : string|((data: { source: Field, value: any }) => string);
961
+ @Input() hintHtml ! : string|((data: { source: Field, value: any }) => string);
962
+ @Input() ignoreParentReadOnly ! : boolean;
963
+ @Input() inline ! : boolean;
964
+ @Input() inputAlign ! : string;
965
+ @Input() inputAttributes ! : Record<string, string>;
966
+ @Input() inputTag ! : string;
967
+ @Input() inputType ! : string;
968
+ @Input() inputWidth ! : string|number;
969
+ @Input() keyStrokeChangeDelay ! : number;
970
+ @Input() labelCls ! : string|object;
971
+ @Input() labelPosition ! : 'before'|'above'|null;
972
+ @Input() labels ! : object[];
973
+ @Input() labelWidth ! : string|number;
974
+ @Input() listeners ! : TextFieldListeners;
975
+ @Input() localeClass ! : typeof Base;
976
+ @Input() localizable ! : boolean;
977
+ @Input() localizableProperties ! : string[];
978
+ @Input() maskDefaults ! : MaskConfig;
979
+ @Input() masked ! : boolean|string|MaskConfig;
980
+ @Input() maxLength ! : number;
981
+ @Input() minLength ! : number;
982
+ @Input() monitorResize ! : boolean|{
983
+ immediate?: boolean
984
+ };
985
+ @Input() name ! : string;
986
+ @Input() owner ! : Widget|any;
987
+ @Input() positioned ! : boolean;
988
+ @Input() preventTooltipOnTouch ! : boolean;
989
+ @Input() relayStoreEvents ! : boolean;
990
+ @Input() revertOnEscape ! : boolean;
991
+ @Input() ripple ! : boolean|{
992
+ delegate?: string
993
+ color?: string
994
+ radius?: number
995
+ clip?: string
996
+ };
997
+ @Input() rootElement ! : ShadowRoot|HTMLElement;
998
+ @Input() scrollAction ! : 'hide'|'realign'|null;
999
+ @Input() showAnimation ! : boolean|object;
1000
+ @Input() showTooltipWhenDisabled ! : boolean;
1001
+ @Input() skipValidation ! : boolean;
1002
+ @Input() spellCheck ! : boolean;
1003
+ @Input() tab ! : boolean|TabConfig;
1004
+ @Input() tabIndex ! : number;
1005
+ @Input() textAlign ! : 'left'|'center'|'right'|'start'|'end';
1006
+ @Input() title ! : string;
1007
+ @Input() type ! : 'textfield'|'text';
1008
+ @Input() ui ! : string|object;
1009
+ @Input() validateOnInput ! : boolean;
1010
+ @Input() weight ! : number;
1011
+
1012
+ // Configs and properties
1013
+ @Input() alignSelf ! : string;
1014
+ @Input() appendTo ! : HTMLElement|string;
1015
+ @Input() badge ! : string;
1016
+ @Input() callOnFunctions ! : boolean;
1017
+ @Input() catchEventHandlerExceptions ! : boolean;
1018
+ @Input() cls ! : string|object;
1019
+ @Input() column ! : number;
1020
+ @Input() dataset ! : object|Record<string, string>;
1021
+ @Input() disabled ! : boolean|'inert';
1022
+ @Input() editable ! : boolean;
1023
+ @Input() extraData ! : any;
1024
+ @Input() flex ! : number|string;
1025
+ @Input() height ! : number|string;
1026
+ @Input() hidden ! : boolean;
1027
+ @Input() id ! : string;
1028
+ @Input() insertBefore ! : HTMLElement|string;
1029
+ @Input() insertFirst ! : HTMLElement|string;
1030
+ @Input() keyMap ! : Record<string, KeyMapConfig>;
1031
+ @Input() label ! : string;
1032
+ @Input() margin ! : number|string;
1033
+ @Input() maxHeight ! : string|number;
1034
+ @Input() maximizeOnMobile ! : number|string;
1035
+ @Input() maxWidth ! : string|number;
1036
+ @Input() minHeight ! : string|number;
1037
+ @Input() minWidth ! : string|number;
1038
+ @Input() placeholder ! : string;
1039
+ @Input() readOnly ! : boolean;
1040
+ @Input() rendition ! : 'outlined'|'filled'|string;
1041
+ @Input() required ! : boolean;
1042
+ @Input() rtl ! : boolean;
1043
+ @Input() showRequiredIndicator ! : string;
1044
+ @Input() span ! : number;
1045
+ @Input() tooltip ! : string|TooltipConfig|null;
1046
+ @Input() triggers ! : Record<string, FieldTriggerConfig>|Record<string, Widget>;
1047
+ @Input() value ! : any|string;
1048
+ @Input() width ! : number|string;
1049
+ @Input() x ! : number;
1050
+ @Input() y ! : number;
1051
+
1052
+ // Properties only
1053
+ @Input() anchorSize ! : number[];
1054
+ @Input() content ! : string;
1055
+ @Input() focusVisible ! : boolean;
1056
+ @Input() formula ! : string;
1057
+ @Input() html ! : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig;
1058
+ @Input() input ! : HTMLElement;
1059
+ @Input() parent ! : Widget;
1060
+ @Input() scrollable ! : Scroller;
1061
+
1062
+ // Events emitters
1063
+ /**
1064
+ * User performed default action (typed into this field).
1065
+ * @param {object} event Event object
1066
+ * @param {Core.widget.Field,any} event.source This Field
1067
+ * @param {string,number,boolean,any} event.value This field's value
1068
+ * @param {string,number,boolean,any} event.oldValue This field's previous value
1069
+ * @param {boolean} event.valid True if this field is in a valid state
1070
+ * @param {Event} event.event The triggering DOM event if any
1071
+ * @param {Core.data.Model} event.record Selected record. Available for fields with records selection functionality
1072
+ * @param {Core.data.Model[]} event.records Selected records as an array. Available for fields with records selection functionality
1073
+ * @param {boolean} event.userAction Triggered by user taking an action (`true`) or by setting a value (`false`)
1074
+ * @param {boolean} event.checked
1075
+ */
1076
+ @Output() onAction: any = new EventEmitter<((event: { source: Field|any, value: string|number|boolean|any, oldValue: string|number|boolean|any, valid: boolean, event: Event, record: Model, records: Model[], userAction: boolean, checked: boolean }) => void)|string>();
1077
+ /**
1078
+ * Fires before an object is destroyed.
1079
+ * @param {object} event Event object
1080
+ * @param {Core.Base} event.source The Object that is being destroyed.
1081
+ */
1082
+ @Output() onBeforeDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
1083
+ /**
1084
+ * Triggered before a widget is hidden. Return `false` to prevent the action.
1085
+ * @param {object} event Event object
1086
+ * @param {Core.widget.Widget} event.source The widget being hidden.
1087
+ */
1088
+ @Output() onBeforeHide: any = new EventEmitter<((event: { source: Widget }) => Promise<boolean>|boolean|void)|string>();
1089
+ /**
1090
+ * Triggered before a widget is shown. Return `false` to prevent the action.
1091
+ * @param {object} event Event object
1092
+ * @param {Core.widget.Widget,any} event.source The widget being shown
1093
+ */
1094
+ @Output() onBeforeShow: any = new EventEmitter<((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string>();
1095
+ /**
1096
+ * Fires when any other event is fired from the object.
1097
+ * ...
1098
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#event-catchAll)
1099
+ * @param {object} event Event object
1100
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
1101
+ * @param {string} event.event.type The type of the event which is caught by the listener
1102
+ */
1103
+ @Output() onCatchAll: any = new EventEmitter<((event: {[key: string]: any, type: string}) => void)|string>();
1104
+ /**
1105
+ * Fired when this field's value changes.
1106
+ * @param {object} event Event object
1107
+ * @param {Core.widget.Field,any} event.source This Field
1108
+ * @param {string,number,boolean,any} event.value This field's value
1109
+ * @param {string,number,boolean,any} event.oldValue This field's previous value
1110
+ * @param {boolean} event.valid True if this field is in a valid state
1111
+ * @param {Event} event.event The triggering DOM event if any
1112
+ * @param {boolean} event.userAction Triggered by user taking an action (`true`) or by setting a value (`false`)
1113
+ * @param {boolean} event.checked
1114
+ */
1115
+ @Output() onChange: any = new EventEmitter<((event: { source: Field|any, value: string|number|boolean|any, oldValue: string|number|boolean|any, valid: boolean, event: Event, userAction: boolean, checked: boolean }) => void)|string>();
1116
+ /**
1117
+ * Fired when this field is [cleared](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#function-clear).
1118
+ * ...
1119
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#event-clear)
1120
+ * @param {object} event Event object
1121
+ * @param {Core.widget.Field,any} event.source This Field
1122
+ */
1123
+ @Output() onClear: any = new EventEmitter<((event: { source: Field|any }) => void)|string>();
1124
+ /**
1125
+ * Fires when an object is destroyed.
1126
+ * @param {object} event Event object
1127
+ * @param {Core.Base} event.source The Object that is being destroyed.
1128
+ */
1129
+ @Output() onDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
1130
+ /**
1131
+ * Triggered when a widget's [element](https://bryntum.com/products/taskboard/docs/api/Core/widget/Widget#property-element) is available.
1132
+ * @param {object} event Event object
1133
+ * @param {HTMLElement} event.element The Widget's element.
1134
+ */
1135
+ @Output() onElementCreated: any = new EventEmitter<((event: { element: HTMLElement }) => void)|string>();
1136
+ /**
1137
+ * Fired when focus enters this Widget.
1138
+ * @param {object} event Event object
1139
+ * @param {Core.widget.Widget} event.source This Widget
1140
+ * @param {HTMLElement} event.fromElement The element which lost focus.
1141
+ * @param {HTMLElement} event.toElement The element which gained focus.
1142
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1143
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1144
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1145
+ */
1146
+ @Output() onFocusIn: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1147
+ /**
1148
+ * Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
1149
+ * focus moving from within this Widget's ownership tree, even if there are floating widgets
1150
+ * will not trigger this event. This is when focus exits this widget completely.
1151
+ * @param {object} event Event object
1152
+ * @param {Core.widget.Widget} event.source This Widget
1153
+ * @param {HTMLElement} event.fromElement The element which lost focus.
1154
+ * @param {HTMLElement} event.toElement The element which gained focus.
1155
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1156
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1157
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1158
+ */
1159
+ @Output() onFocusOut: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1160
+ /**
1161
+ * Triggered after a widget was hidden
1162
+ * @param {object} event Event object
1163
+ * @param {Core.widget.Widget} event.source The widget
1164
+ */
1165
+ @Output() onHide: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1166
+ /**
1167
+ * Fired when the user types into this field.
1168
+ * @param {object} event Event object
1169
+ * @param {Core.widget.Field,any} event.source This field
1170
+ * @param {string,number,boolean,any} event.value This field's value
1171
+ * @param {Event} event.event The triggering DOM event
1172
+ */
1173
+ @Output() onInput: any = new EventEmitter<((event: { source: Field|any, value: string|number|boolean|any, event: Event }) => void)|string>();
1174
+ /**
1175
+ * Triggered when a widget which had been in a non-visible state for any reason
1176
+ * achieves visibility.
1177
+ * ...
1178
+ * [View online docs...](https://bryntum.com/products/taskboard/docs/api/Core/widget/TextField#event-paint)
1179
+ * @param {object} event Event object
1180
+ * @param {Core.widget.Widget} event.source The widget being painted.
1181
+ * @param {boolean} event.firstPaint `true` if this is the first paint.
1182
+ */
1183
+ @Output() onPaint: any = new EventEmitter<((event: { source: Widget, firstPaint: boolean }) => void)|string>();
1184
+ /**
1185
+ * Fired when a Widget's read only state is toggled
1186
+ * @param {object} event Event object
1187
+ * @param {boolean} event.readOnly Read only or not
1188
+ */
1189
+ @Output() onReadOnly: any = new EventEmitter<((event: { readOnly: boolean }) => void)|string>();
1190
+ /**
1191
+ * This event is fired after a widget's elements have been synchronized due to a direct or indirect call
1192
+ * 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.
1193
+ */
1194
+ @Output() onRecompose: any = new EventEmitter<(() => void)|string>();
1195
+ /**
1196
+ * 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`*.
1197
+ * @param {object} event Event object
1198
+ * @param {Core.widget.Widget} event.source This Widget
1199
+ * @param {number} event.width The new width
1200
+ * @param {number} event.height The new height
1201
+ * @param {number} event.oldWidth The old width
1202
+ * @param {number} event.oldHeight The old height
1203
+ */
1204
+ @Output() onResize: any = new EventEmitter<((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string>();
1205
+ /**
1206
+ * Triggered after a widget is shown.
1207
+ * @param {object} event Event object
1208
+ * @param {Core.widget.Widget} event.source The widget
1209
+ */
1210
+ @Output() onShow: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1211
+ /**
1212
+ * User clicked one of this field's [triggers](https://bryntum.com/products/taskboard/docs/api/Core/widget/Field#property-triggers)
1213
+ * @param {object} event Event object
1214
+ * @param {Core.widget.Field,any} event.source This field
1215
+ * @param {Core.widget.Widget} event.trigger The trigger activated by click or touch tap.
1216
+ */
1217
+ @Output() onTrigger: any = new EventEmitter<((event: { source: Field|any, trigger: Widget }) => void)|string>();
1218
+
1219
+ /**
1220
+ * Create and append the underlying widget
1221
+ */
1222
+ ngOnInit(): void {
1223
+ const
1224
+ me = this,
1225
+ {
1226
+ elementRef,
1227
+ bryntumConfig
1228
+ } = me,
1229
+ {
1230
+ instanceClass,
1231
+ instanceName,
1232
+ bryntumConfigs,
1233
+ bryntumEvents
1234
+ } = BryntumTextFieldComponent;
1235
+
1236
+ bryntumConfigs.filter(prop => prop in this).forEach(prop => {
1237
+ // @ts-ignore
1238
+ WrapperHelper.applyPropValue(bryntumConfig, prop, this[prop]);
1239
+ if (['features', 'config'].includes(prop)) {
1240
+ WrapperHelper.devWarningConfigProp(instanceName, prop);
1241
+ }
1242
+ });
1243
+ // @ts-ignore
1244
+ bryntumEvents.filter(event => this[event] && this[event].observers.length > 0).forEach(event => {
1245
+ const
1246
+ uncapitalize = (str: string) => str.charAt(0).toLowerCase() + str.slice(1),
1247
+ eventName = (str: string) => uncapitalize(str.slice(2));
1248
+
1249
+ // @ts-ignore
1250
+ bryntumConfig.listeners[eventName(event)] = e => {
1251
+ // @ts-ignore
1252
+ me[event].emit(e);
1253
+ // EventEmitter does not return values in the normal way, work around it by setting `returnValue` flag
1254
+ // in Angular listeners
1255
+ return e.returnValue;
1256
+ };
1257
+ });
1258
+
1259
+ // If component has no container specified in config then use adopt to Wrapper's element
1260
+ const
1261
+ containerParam = [
1262
+ 'adopt',
1263
+ 'appendTo',
1264
+ 'insertAfter',
1265
+ 'insertBefore'
1266
+ // @ts-ignore
1267
+ ].find(prop => bryntumConfig[prop]);
1268
+ if (!containerParam) {
1269
+ if (instanceName === 'Button' || elementRef.nativeElement.getRootNode() instanceof ShadowRoot) {
1270
+ // Button should always be <a> or <button> inside owner element
1271
+ bryntumConfig.appendTo = elementRef.nativeElement;
1272
+ }
1273
+ else {
1274
+ bryntumConfig.adopt = elementRef.nativeElement;
1275
+ }
1276
+ }
1277
+ else {
1278
+ WrapperHelper.devWarningContainer(instanceName, containerParam);
1279
+ }
1280
+
1281
+ // @ts-ignore
1282
+ me.instance = instanceName === 'Widget' ? Widget.create(bryntumConfig) : new instanceClass(bryntumConfig);
1283
+
1284
+ }
1285
+
1286
+ /**
1287
+ * Watch for changes
1288
+ * @param changes
1289
+ */
1290
+ ngOnChanges(changes: SimpleChanges): void {
1291
+ const
1292
+ { instance } = this,
1293
+ { instanceName } = BryntumTextFieldComponent;
1294
+ if (!instance) {
1295
+ return;
1296
+ }
1297
+ // Iterate over all changes
1298
+ Object.entries(changes).forEach(([prop, change]) => {
1299
+ const
1300
+ newValue = (change as SimpleChange).currentValue,
1301
+ { instance } = this,
1302
+ { bryntumConfigsOnly, bryntumProps } = BryntumTextFieldComponent;
1303
+ if (bryntumProps.includes(prop)) {
1304
+ WrapperHelper.applyPropValue(instance, prop, newValue, false);
1305
+ if (bryntumConfigsOnly.includes(prop)) {
1306
+ WrapperHelper.devWarningUpdateProp(instanceName, prop);
1307
+ }
1308
+ }
1309
+ });
1310
+ }
1311
+
1312
+ /**
1313
+ * Destroy the component
1314
+ */
1315
+ ngOnDestroy(): void {
1316
+ // @ts-ignore
1317
+ if (this.instance && this.instance.destroy) {
1318
+ this.instance.destroy();
1319
+ }
1320
+ }
1321
+ }