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