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