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