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