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