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