@bryntum/taskboard-angular-thin 7.1.1 → 7.1.3

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