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