@exhaustive-ui/core 3.0.0-alpha.0 → 3.0.0-alpha.1
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.
- package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
- package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-api.mjs +6 -13
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
- package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
- package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
- package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
- package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
- package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-carousel.mjs +379 -451
- package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
- package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
- package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +157 -332
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
- package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +1012 -1157
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
- package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
- package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +486 -541
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
- package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
- package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
- package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inplace.mjs +64 -98
- package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
- package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
- package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
- package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
- package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +365 -546
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
- package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +647 -835
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
- package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +557 -655
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
- package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
- package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +581 -784
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
- package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
- package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
- package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +2213 -2543
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
- package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
- package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +318 -394
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
- package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
- package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
- package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +327 -421
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/package.json +5 -5
- package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
- package/schematics/migrations/renamed-inputs/migration.js +97 -0
- package/schematics/migrations/styleclass-to-class/migration.js +92 -1
- package/schematics/migrations.json +7 -2
- package/schematics/utils/removed-inputs.js +0 -0
- package/schematics/utils/renamed-inputs.js +175 -0
- package/schematics/utils/styleclass.js +24 -8
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-accordion.d.ts +8 -24
- package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
- package/types/exhaustive-ui-core-api.d.ts +2 -3
- package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
- package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
- package/types/exhaustive-ui-core-avatar.d.ts +18 -25
- package/types/exhaustive-ui-core-badge.d.ts +13 -27
- package/types/exhaustive-ui-core-blockui.d.ts +18 -30
- package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
- package/types/exhaustive-ui-core-button.d.ts +57 -89
- package/types/exhaustive-ui-core-carousel.d.ts +56 -82
- package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
- package/types/exhaustive-ui-core-chart.d.ts +21 -29
- package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
- package/types/exhaustive-ui-core-chip.d.ts +31 -38
- package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
- package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
- package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
- package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
- package/types/exhaustive-ui-core-dataview.d.ts +42 -65
- package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
- package/types/exhaustive-ui-core-dialog.d.ts +73 -123
- package/types/exhaustive-ui-core-dock.d.ts +16 -25
- package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
- package/types/exhaustive-ui-core-drawer.d.ts +32 -64
- package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
- package/types/exhaustive-ui-core-editor.d.ts +15 -25
- package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
- package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
- package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
- package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
- package/types/exhaustive-ui-core-galleria.d.ts +124 -194
- package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
- package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
- package/types/exhaustive-ui-core-image.d.ts +35 -68
- package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
- package/types/exhaustive-ui-core-inplace.d.ts +30 -42
- package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
- package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
- package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
- package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
- package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
- package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
- package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
- package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
- package/types/exhaustive-ui-core-knob.d.ts +45 -60
- package/types/exhaustive-ui-core-listbox.d.ts +90 -126
- package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
- package/types/exhaustive-ui-core-menu.d.ts +33 -53
- package/types/exhaustive-ui-core-menubar.d.ts +38 -85
- package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
- package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
- package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
- package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
- package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
- package/types/exhaustive-ui-core-paginator.d.ts +41 -69
- package/types/exhaustive-ui-core-panel.d.ts +18 -45
- package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
- package/types/exhaustive-ui-core-password.d.ts +56 -93
- package/types/exhaustive-ui-core-picklist.d.ts +107 -121
- package/types/exhaustive-ui-core-popover.d.ts +23 -47
- package/types/exhaustive-ui-core-rating.d.ts +18 -26
- package/types/exhaustive-ui-core-scroller.d.ts +90 -120
- package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
- package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
- package/types/exhaustive-ui-core-select.d.ts +137 -188
- package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
- package/types/exhaustive-ui-core-slider.d.ts +52 -67
- package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
- package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
- package/types/exhaustive-ui-core-splitter.d.ts +47 -59
- package/types/exhaustive-ui-core-steps.d.ts +24 -31
- package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
- package/types/exhaustive-ui-core-table.d.ts +349 -453
- package/types/exhaustive-ui-core-terminal.d.ts +10 -22
- package/types/exhaustive-ui-core-textarea.d.ts +7 -10
- package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
- package/types/exhaustive-ui-core-timeline.d.ts +20 -28
- package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
- package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
- package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
- package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
- package/types/exhaustive-ui-core-tree.d.ts +82 -119
- package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
- package/types/exhaustive-ui-core-treetable.d.ts +203 -280
- package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
|
@@ -2,10 +2,11 @@ export * from '@exhaustive-ui/core/types/autocomplete';
|
|
|
2
2
|
import * as i2 from '@angular/common';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, InjectionToken, forwardRef, inject, NgZone, input, output, viewChild,
|
|
5
|
+
import { Injectable, InjectionToken, forwardRef, inject, NgZone, input, numberAttribute, booleanAttribute, output, viewChild, signal, contentChild, computed, contentChildren, effect, untracked, afterEveryRender, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
6
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
6
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { uuid, isNotEmpty, findLastIndex, resolveFieldData, equals, focus, isEmpty, findSingle } from '@exhaustive-ui/utils';
|
|
9
|
+
import { TranslationKeys, PrimeTemplate, SharedModule } from '@exhaustive-ui/core/api';
|
|
9
10
|
import { AutoFocus } from '@exhaustive-ui/core/autofocus';
|
|
10
11
|
import { PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';
|
|
11
12
|
import { BaseInput } from '@exhaustive-ui/core/baseinput';
|
|
@@ -61,11 +62,11 @@ const classes = {
|
|
|
61
62
|
'p-autocomplete p-component p-inputwrapper',
|
|
62
63
|
{
|
|
63
64
|
'p-invalid': instance.invalid(),
|
|
64
|
-
'p-focus': instance.focused,
|
|
65
|
+
'p-focus': instance.focused(),
|
|
65
66
|
'p-inputwrapper-filled': instance.$filled(),
|
|
66
|
-
'p-inputwrapper-focus': (instance.focused && !instance.$disabled()) || instance.autofocus || instance.overlayVisible,
|
|
67
|
-
'p-autocomplete-open': instance.overlayVisible,
|
|
68
|
-
'p-autocomplete-clearable': instance.showClear && !instance.$disabled(),
|
|
67
|
+
'p-inputwrapper-focus': (instance.focused() && !instance.$disabled()) || instance.autofocus() || instance.overlayVisible(),
|
|
68
|
+
'p-autocomplete-open': instance.overlayVisible(),
|
|
69
|
+
'p-autocomplete-clearable': instance.showClear() && !instance.$disabled(),
|
|
69
70
|
'p-autocomplete-fluid': instance.hasFluid
|
|
70
71
|
}
|
|
71
72
|
],
|
|
@@ -196,321 +197,309 @@ const AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
|
196
197
|
* @group Components
|
|
197
198
|
*/
|
|
198
199
|
class AutoComplete extends BaseInput {
|
|
199
|
-
overlayService = inject(OverlayService);
|
|
200
200
|
zone = inject(NgZone);
|
|
201
201
|
componentName = 'AutoComplete';
|
|
202
202
|
$pcAutoComplete = inject(AUTOCOMPLETE_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
203
203
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
204
204
|
/**
|
|
205
|
-
* Minimum number of characters to initiate a search.
|
|
206
|
-
* @deprecated since v20.0.0, use `minQueryLength` instead.
|
|
205
|
+
* Minimum number of characters to initiate a search, 1 when not set.
|
|
207
206
|
* @group Props
|
|
208
207
|
*/
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Minimum number of characters to initiate a search.
|
|
212
|
-
* @group Props
|
|
213
|
-
*/
|
|
214
|
-
minQueryLength;
|
|
208
|
+
minQueryLength = input(undefined, { ...(ngDevMode ? { debugName: "minQueryLength" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
215
209
|
/**
|
|
216
210
|
* Delay between keystrokes to wait before sending a query.
|
|
217
211
|
* @group Props
|
|
218
212
|
*/
|
|
219
|
-
delay = 300;
|
|
213
|
+
delay = input(300, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
220
214
|
/**
|
|
221
215
|
* Inline style of the overlay panel element.
|
|
222
216
|
* @group Props
|
|
223
217
|
*/
|
|
224
|
-
panelStyle
|
|
225
|
-
|
|
226
|
-
* Style class of the component.
|
|
227
|
-
* @deprecated since v20.0.0, use `class` instead.
|
|
228
|
-
* @group Props
|
|
229
|
-
*/
|
|
230
|
-
styleClass;
|
|
218
|
+
panelStyle = input(/* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
231
220
|
/**
|
|
232
221
|
* Style class of the overlay panel element.
|
|
233
222
|
* @group Props
|
|
234
223
|
*/
|
|
235
|
-
panelStyleClass
|
|
224
|
+
panelStyleClass = input(/* @ts-ignore */
|
|
225
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
|
|
236
226
|
/**
|
|
237
227
|
* Inline style of the input field.
|
|
238
228
|
* @group Props
|
|
239
229
|
*/
|
|
240
|
-
inputStyle
|
|
230
|
+
inputStyle = input(/* @ts-ignore */
|
|
231
|
+
...(ngDevMode ? [undefined, { debugName: "inputStyle" }] : /* istanbul ignore next */ []));
|
|
241
232
|
/**
|
|
242
233
|
* Identifier of the focus input to match a label defined for the component.
|
|
243
234
|
* @group Props
|
|
244
235
|
*/
|
|
245
|
-
inputId
|
|
236
|
+
inputId = input(/* @ts-ignore */
|
|
237
|
+
...(ngDevMode ? [undefined, { debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
246
238
|
/**
|
|
247
239
|
* Inline style of the input field.
|
|
248
240
|
* @group Props
|
|
249
241
|
*/
|
|
250
|
-
inputStyleClass
|
|
242
|
+
inputStyleClass = input(/* @ts-ignore */
|
|
243
|
+
...(ngDevMode ? [undefined, { debugName: "inputStyleClass" }] : /* istanbul ignore next */ []));
|
|
251
244
|
/**
|
|
252
245
|
* Hint text for the input field.
|
|
253
246
|
* @group Props
|
|
254
247
|
*/
|
|
255
|
-
placeholder
|
|
248
|
+
placeholder = input(/* @ts-ignore */
|
|
249
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
256
250
|
/**
|
|
257
251
|
* When present, it specifies that the input cannot be typed.
|
|
258
252
|
* @group Props
|
|
259
253
|
*/
|
|
260
|
-
readonly;
|
|
254
|
+
readonly = input(undefined, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
261
255
|
/**
|
|
262
256
|
* Maximum height of the suggestions panel.
|
|
263
257
|
* @group Props
|
|
264
258
|
*/
|
|
265
|
-
scrollHeight = '200px'
|
|
259
|
+
scrollHeight = input('200px', /* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
|
|
266
261
|
/**
|
|
267
262
|
* Defines if data is loaded and interacted with in lazy manner.
|
|
268
263
|
* @group Props
|
|
269
264
|
*/
|
|
270
|
-
lazy = false;
|
|
265
|
+
lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
271
266
|
/**
|
|
272
267
|
* Whether the data should be loaded on demand during scroll.
|
|
273
268
|
* @group Props
|
|
274
269
|
*/
|
|
275
|
-
virtualScroll;
|
|
270
|
+
virtualScroll = input(undefined, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
276
271
|
/**
|
|
277
272
|
* Height of an item in the list for VirtualScrolling.
|
|
278
273
|
* @group Props
|
|
279
274
|
*/
|
|
280
|
-
virtualScrollItemSize;
|
|
275
|
+
virtualScrollItemSize = input(undefined, { ...(ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
281
276
|
/**
|
|
282
277
|
* Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
|
|
283
278
|
* @group Props
|
|
284
279
|
*/
|
|
285
|
-
virtualScrollOptions
|
|
280
|
+
virtualScrollOptions = input(/* @ts-ignore */
|
|
281
|
+
...(ngDevMode ? [undefined, { debugName: "virtualScrollOptions" }] : /* istanbul ignore next */ []));
|
|
286
282
|
/**
|
|
287
283
|
* When enabled, highlights the first item in the list by default.
|
|
288
284
|
* @group Props
|
|
289
285
|
*/
|
|
290
|
-
autoHighlight;
|
|
286
|
+
autoHighlight = input(undefined, { ...(ngDevMode ? { debugName: "autoHighlight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
291
287
|
/**
|
|
292
288
|
* When present, autocomplete clears the manual input if it does not match of the suggestions to force only accepting values from the suggestions.
|
|
293
289
|
* @group Props
|
|
294
290
|
*/
|
|
295
|
-
forceSelection;
|
|
291
|
+
forceSelection = input(undefined, { ...(ngDevMode ? { debugName: "forceSelection" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
296
292
|
/**
|
|
297
293
|
* Type of the input, defaults to "text".
|
|
298
294
|
* @group Props
|
|
299
295
|
*/
|
|
300
|
-
type = 'text'
|
|
301
|
-
|
|
302
|
-
* Whether to automatically manage layering.
|
|
303
|
-
* @group Props
|
|
304
|
-
*/
|
|
305
|
-
autoZIndex = true;
|
|
306
|
-
/**
|
|
307
|
-
* Base zIndex value to use in layering.
|
|
308
|
-
* @group Props
|
|
309
|
-
*/
|
|
310
|
-
baseZIndex = 0;
|
|
296
|
+
type = input('text', /* @ts-ignore */
|
|
297
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
311
298
|
/**
|
|
312
299
|
* Defines a string that labels the input for accessibility.
|
|
313
300
|
* @group Props
|
|
314
301
|
*/
|
|
315
|
-
ariaLabel
|
|
302
|
+
ariaLabel = input(/* @ts-ignore */
|
|
303
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
316
304
|
/**
|
|
317
305
|
* Defines a string that labels the dropdown button for accessibility.
|
|
318
306
|
* @group Props
|
|
319
307
|
*/
|
|
320
|
-
dropdownAriaLabel
|
|
308
|
+
dropdownAriaLabel = input(/* @ts-ignore */
|
|
309
|
+
...(ngDevMode ? [undefined, { debugName: "dropdownAriaLabel" }] : /* istanbul ignore next */ []));
|
|
321
310
|
/**
|
|
322
311
|
* Specifies one or more IDs in the DOM that labels the input field.
|
|
323
312
|
* @group Props
|
|
324
313
|
*/
|
|
325
|
-
ariaLabelledBy
|
|
314
|
+
ariaLabelledBy = input(/* @ts-ignore */
|
|
315
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
326
316
|
/**
|
|
327
317
|
* Icon class of the dropdown icon.
|
|
328
318
|
* @group Props
|
|
329
319
|
*/
|
|
330
|
-
dropdownIcon
|
|
320
|
+
dropdownIcon = input(/* @ts-ignore */
|
|
321
|
+
...(ngDevMode ? [undefined, { debugName: "dropdownIcon" }] : /* istanbul ignore next */ []));
|
|
331
322
|
/**
|
|
332
323
|
* Ensures uniqueness of selected items on multiple mode.
|
|
333
324
|
* @group Props
|
|
334
325
|
*/
|
|
335
|
-
unique = true;
|
|
326
|
+
unique = input(true, { ...(ngDevMode ? { debugName: "unique" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
336
327
|
/**
|
|
337
328
|
* Whether to display options as grouped when nested options are provided.
|
|
338
329
|
* @group Props
|
|
339
330
|
*/
|
|
340
|
-
group;
|
|
331
|
+
group = input(undefined, { ...(ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
341
332
|
/**
|
|
342
333
|
* Whether to run a query when input receives focus.
|
|
343
334
|
* @group Props
|
|
344
335
|
*/
|
|
345
|
-
completeOnFocus = false;
|
|
336
|
+
completeOnFocus = input(false, { ...(ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
346
337
|
/**
|
|
347
338
|
* When enabled, a clear icon is displayed to clear the value.
|
|
348
339
|
* @group Props
|
|
349
340
|
*/
|
|
350
|
-
showClear = false;
|
|
341
|
+
showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
351
342
|
/**
|
|
352
343
|
* Displays a button next to the input field when enabled.
|
|
353
344
|
* @group Props
|
|
354
345
|
*/
|
|
355
|
-
dropdown;
|
|
346
|
+
dropdown = input(undefined, { ...(ngDevMode ? { debugName: "dropdown" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
356
347
|
/**
|
|
357
348
|
* Whether to show the empty message or not.
|
|
358
349
|
* @group Props
|
|
359
350
|
*/
|
|
360
|
-
showEmptyMessage = true;
|
|
351
|
+
showEmptyMessage = input(true, { ...(ngDevMode ? { debugName: "showEmptyMessage" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
361
352
|
/**
|
|
362
353
|
* Specifies the behavior dropdown button. Default "blank" mode sends an empty string and "current" mode sends the input value.
|
|
363
354
|
* @group Props
|
|
364
355
|
*/
|
|
365
|
-
dropdownMode = 'blank'
|
|
356
|
+
dropdownMode = input('blank', /* @ts-ignore */
|
|
357
|
+
...(ngDevMode ? [{ debugName: "dropdownMode" }] : /* istanbul ignore next */ []));
|
|
366
358
|
/**
|
|
367
359
|
* Specifies if multiple values can be selected.
|
|
368
360
|
* @group Props
|
|
369
361
|
*/
|
|
370
|
-
multiple;
|
|
362
|
+
multiple = input(undefined, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
371
363
|
/**
|
|
372
364
|
* When enabled, the input value is added to the selected items on tab key press when multiple is true and typeahead is false.
|
|
373
365
|
* @group Props
|
|
374
366
|
*/
|
|
375
|
-
addOnTab = false;
|
|
367
|
+
addOnTab = input(false, { ...(ngDevMode ? { debugName: "addOnTab" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
376
368
|
/**
|
|
377
369
|
* Index of the element in tabbing order.
|
|
378
370
|
* @group Props
|
|
379
371
|
*/
|
|
380
|
-
tabindex;
|
|
372
|
+
tabindex = input(undefined, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
381
373
|
/**
|
|
382
374
|
* A property to uniquely identify a value in options.
|
|
383
375
|
* @group Props
|
|
384
376
|
*/
|
|
385
|
-
dataKey
|
|
377
|
+
dataKey = input(/* @ts-ignore */
|
|
378
|
+
...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
|
|
386
379
|
/**
|
|
387
380
|
* Text to display when there is no data. Defaults to global value in i18n translation configuration.
|
|
388
381
|
* @group Props
|
|
389
382
|
*/
|
|
390
|
-
emptyMessage
|
|
391
|
-
|
|
392
|
-
* Transition options of the show animation.
|
|
393
|
-
* @group Props
|
|
394
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
395
|
-
*/
|
|
396
|
-
showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
397
|
-
/**
|
|
398
|
-
* Transition options of the hide animation.
|
|
399
|
-
* @group Props
|
|
400
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
401
|
-
*/
|
|
402
|
-
hideTransitionOptions = '.1s linear';
|
|
383
|
+
emptyMessage = input(/* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [undefined, { debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
403
385
|
/**
|
|
404
386
|
* When present, it specifies that the component should automatically get focus on load.
|
|
405
387
|
* @group Props
|
|
406
388
|
*/
|
|
407
|
-
autofocus;
|
|
389
|
+
autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
408
390
|
/**
|
|
409
391
|
* Used to define a string that autocomplete attribute the current element.
|
|
410
392
|
* @group Props
|
|
411
393
|
*/
|
|
412
|
-
autocomplete = 'off'
|
|
394
|
+
autocomplete = input('off', /* @ts-ignore */
|
|
395
|
+
...(ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []));
|
|
413
396
|
/**
|
|
414
397
|
* Name of the options field of an option group.
|
|
415
398
|
* @group Props
|
|
416
399
|
*/
|
|
417
|
-
optionGroupChildren = 'items'
|
|
400
|
+
optionGroupChildren = input('items', /* @ts-ignore */
|
|
401
|
+
...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
|
|
418
402
|
/**
|
|
419
403
|
* Name of the label field of an option group.
|
|
420
404
|
* @group Props
|
|
421
405
|
*/
|
|
422
|
-
optionGroupLabel = 'label'
|
|
406
|
+
optionGroupLabel = input('label', /* @ts-ignore */
|
|
407
|
+
...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
|
|
423
408
|
/**
|
|
424
409
|
* Options for the overlay element.
|
|
425
410
|
* @group Props
|
|
426
411
|
*/
|
|
427
|
-
overlayOptions
|
|
412
|
+
overlayOptions = input(/* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [undefined, { debugName: "overlayOptions" }] : /* istanbul ignore next */ []));
|
|
428
414
|
/**
|
|
429
415
|
* An array of suggestions to display.
|
|
430
416
|
* @group Props
|
|
431
417
|
*/
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
set suggestions(value) {
|
|
436
|
-
this._suggestions.set(value);
|
|
437
|
-
this.handleSuggestionsChange();
|
|
438
|
-
}
|
|
418
|
+
suggestions = input(null, /* @ts-ignore */
|
|
419
|
+
...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
|
|
439
420
|
/**
|
|
440
421
|
* Property name or getter function to use as the label of an option.
|
|
441
422
|
* @group Props
|
|
442
423
|
*/
|
|
443
|
-
optionLabel
|
|
424
|
+
optionLabel = input(/* @ts-ignore */
|
|
425
|
+
...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
444
426
|
/**
|
|
445
427
|
* Property name or getter function to use as the value of an option.
|
|
446
428
|
* @group Props
|
|
447
429
|
*/
|
|
448
|
-
optionValue
|
|
430
|
+
optionValue = input(/* @ts-ignore */
|
|
431
|
+
...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
449
432
|
/**
|
|
450
433
|
* Unique identifier of the component.
|
|
451
434
|
* @group Props
|
|
452
435
|
*/
|
|
453
|
-
id
|
|
436
|
+
id = input(/* @ts-ignore */
|
|
437
|
+
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
454
438
|
/**
|
|
455
439
|
* Text to display when the search is active. Defaults to global value in i18n translation configuration.
|
|
456
440
|
* @group Props
|
|
457
441
|
* @defaultValue '{0} results are available'
|
|
458
442
|
*/
|
|
459
|
-
searchMessage
|
|
443
|
+
searchMessage = input(/* @ts-ignore */
|
|
444
|
+
...(ngDevMode ? [undefined, { debugName: "searchMessage" }] : /* istanbul ignore next */ []));
|
|
460
445
|
/**
|
|
461
446
|
* Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration.
|
|
462
447
|
* @group Props
|
|
463
448
|
* @defaultValue 'No selected item'
|
|
464
449
|
*/
|
|
465
|
-
emptySelectionMessage
|
|
450
|
+
emptySelectionMessage = input(/* @ts-ignore */
|
|
451
|
+
...(ngDevMode ? [undefined, { debugName: "emptySelectionMessage" }] : /* istanbul ignore next */ []));
|
|
466
452
|
/**
|
|
467
453
|
* Text to be displayed in hidden accessible field when options are selected. Defaults to global value in i18n translation configuration.
|
|
468
454
|
* @group Props
|
|
469
455
|
* @defaultValue '{0} items selected'
|
|
470
456
|
*/
|
|
471
|
-
selectionMessage
|
|
457
|
+
selectionMessage = input(/* @ts-ignore */
|
|
458
|
+
...(ngDevMode ? [undefined, { debugName: "selectionMessage" }] : /* istanbul ignore next */ []));
|
|
472
459
|
/**
|
|
473
460
|
* Whether to focus on the first visible or selected element when the overlay panel is shown.
|
|
474
461
|
* @group Props
|
|
475
462
|
*/
|
|
476
|
-
autoOptionFocus = false;
|
|
463
|
+
autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
477
464
|
/**
|
|
478
465
|
* When enabled, the focused option is selected.
|
|
479
466
|
* @group Props
|
|
480
467
|
*/
|
|
481
|
-
selectOnFocus;
|
|
468
|
+
selectOnFocus = input(undefined, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
482
469
|
/**
|
|
483
470
|
* Locale to use in searching. The default locale is the host environment's current locale.
|
|
484
471
|
* @group Props
|
|
485
472
|
*/
|
|
486
|
-
searchLocale;
|
|
473
|
+
searchLocale = input(undefined, { ...(ngDevMode ? { debugName: "searchLocale" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
487
474
|
/**
|
|
488
475
|
* Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.
|
|
489
476
|
* @group Props
|
|
490
477
|
*/
|
|
491
|
-
optionDisabled
|
|
478
|
+
optionDisabled = input(/* @ts-ignore */
|
|
479
|
+
...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
|
|
492
480
|
/**
|
|
493
481
|
* When enabled, the hovered option will be focused.
|
|
494
482
|
* @group Props
|
|
495
483
|
*/
|
|
496
|
-
focusOnHover = true;
|
|
484
|
+
focusOnHover = input(true, { ...(ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
497
485
|
/**
|
|
498
486
|
* Whether typeahead is active or not.
|
|
499
487
|
* @defaultValue true
|
|
500
488
|
* @group Props
|
|
501
489
|
*/
|
|
502
|
-
typeahead = true;
|
|
490
|
+
typeahead = input(true, { ...(ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
503
491
|
/**
|
|
504
492
|
* Whether to add an item on blur event if the input has value and typeahead is false with multiple mode.
|
|
505
493
|
* @defaultValue false
|
|
506
494
|
* @group Props
|
|
507
495
|
*/
|
|
508
|
-
addOnBlur = false;
|
|
496
|
+
addOnBlur = input(false, { ...(ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
509
497
|
/**
|
|
510
498
|
* Separator char to add item when typeahead is false and multiple mode is enabled.
|
|
511
499
|
* @group Props
|
|
512
500
|
*/
|
|
513
|
-
separator
|
|
501
|
+
separator = input(/* @ts-ignore */
|
|
502
|
+
...(ngDevMode ? [undefined, { debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
514
503
|
/**
|
|
515
504
|
* Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
|
|
516
505
|
* @defaultValue 'self'
|
|
@@ -616,7 +605,8 @@ class AutoComplete extends BaseInput {
|
|
|
616
605
|
...(ngDevMode ? [{ debugName: "scroller" }] : /* istanbul ignore next */ []));
|
|
617
606
|
overlayViewChild = viewChild.required('overlay', /* @ts-ignore */
|
|
618
607
|
...(ngDevMode ? [{ debugName: "overlayViewChild" }] : /* istanbul ignore next */ []));
|
|
619
|
-
itemsWrapper
|
|
608
|
+
itemsWrapper = signal(undefined, /* @ts-ignore */
|
|
609
|
+
...(ngDevMode ? [{ debugName: "itemsWrapper" }] : /* istanbul ignore next */ []));
|
|
620
610
|
/**
|
|
621
611
|
* Custom item template.
|
|
622
612
|
* @group Templates
|
|
@@ -686,31 +676,66 @@ class AutoComplete extends BaseInput {
|
|
|
686
676
|
onHostClick(event) {
|
|
687
677
|
this.onContainerClick(event);
|
|
688
678
|
}
|
|
689
|
-
value
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
overlayVisible
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
focused = false
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
searchTimeout
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
679
|
+
value = signal(undefined, /* @ts-ignore */
|
|
680
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
681
|
+
hideTimeout = signal(undefined, /* @ts-ignore */
|
|
682
|
+
...(ngDevMode ? [{ debugName: "hideTimeout" }] : /* istanbul ignore next */ []));
|
|
683
|
+
overlayVisible = signal(undefined, /* @ts-ignore */
|
|
684
|
+
...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
|
|
685
|
+
suggestionsUpdated = signal(undefined, /* @ts-ignore */
|
|
686
|
+
...(ngDevMode ? [{ debugName: "suggestionsUpdated" }] : /* istanbul ignore next */ []));
|
|
687
|
+
focused = signal(false, /* @ts-ignore */
|
|
688
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
689
|
+
loading = signal(undefined, /* @ts-ignore */
|
|
690
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
691
|
+
searchTimeout = signal(undefined, /* @ts-ignore */
|
|
692
|
+
...(ngDevMode ? [{ debugName: "searchTimeout" }] : /* istanbul ignore next */ []));
|
|
693
|
+
dirty = signal(false, /* @ts-ignore */
|
|
694
|
+
...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
|
|
695
|
+
_itemTemplate = computed(() => this.templates()
|
|
696
|
+
.filter((item) => !['group', 'selecteditem', 'selectedItem', 'header', 'empty', 'footer', 'loader', 'removetokenicon', 'loadingicon', 'clearicon', 'dropdownicon'].includes(item.getType()))
|
|
697
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
698
|
+
...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
|
|
699
|
+
_groupTemplate = computed(() => this.templates()
|
|
700
|
+
.filter((item) => item.getType() === 'group')
|
|
701
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
702
|
+
...(ngDevMode ? [{ debugName: "_groupTemplate" }] : /* istanbul ignore next */ []));
|
|
703
|
+
_selectedItemTemplate = computed(() => this.templates()
|
|
704
|
+
.filter((item) => item.getType() === 'selecteditem' || item.getType() === 'selectedItem')
|
|
705
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
706
|
+
...(ngDevMode ? [{ debugName: "_selectedItemTemplate" }] : /* istanbul ignore next */ []));
|
|
707
|
+
_headerTemplate = computed(() => this.templates()
|
|
708
|
+
.filter((item) => item.getType() === 'header')
|
|
709
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
710
|
+
...(ngDevMode ? [{ debugName: "_headerTemplate" }] : /* istanbul ignore next */ []));
|
|
711
|
+
_emptyTemplate = computed(() => this.templates()
|
|
712
|
+
.filter((item) => item.getType() === 'empty')
|
|
713
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
714
|
+
...(ngDevMode ? [{ debugName: "_emptyTemplate" }] : /* istanbul ignore next */ []));
|
|
715
|
+
_footerTemplate = computed(() => this.templates()
|
|
716
|
+
.filter((item) => item.getType() === 'footer')
|
|
717
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
718
|
+
...(ngDevMode ? [{ debugName: "_footerTemplate" }] : /* istanbul ignore next */ []));
|
|
719
|
+
_loaderTemplate = computed(() => this.templates()
|
|
720
|
+
.filter((item) => item.getType() === 'loader')
|
|
721
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
722
|
+
...(ngDevMode ? [{ debugName: "_loaderTemplate" }] : /* istanbul ignore next */ []));
|
|
723
|
+
_removeIconTemplate = computed(() => this.templates()
|
|
724
|
+
.filter((item) => item.getType() === 'removetokenicon')
|
|
725
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
726
|
+
...(ngDevMode ? [{ debugName: "_removeIconTemplate" }] : /* istanbul ignore next */ []));
|
|
727
|
+
_loadingIconTemplate = computed(() => this.templates()
|
|
728
|
+
.filter((item) => item.getType() === 'loadingicon')
|
|
729
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
730
|
+
...(ngDevMode ? [{ debugName: "_loadingIconTemplate" }] : /* istanbul ignore next */ []));
|
|
731
|
+
_clearIconTemplate = computed(() => this.templates()
|
|
732
|
+
.filter((item) => item.getType() === 'clearicon')
|
|
733
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
734
|
+
...(ngDevMode ? [{ debugName: "_clearIconTemplate" }] : /* istanbul ignore next */ []));
|
|
735
|
+
_dropdownIconTemplate = computed(() => this.templates()
|
|
736
|
+
.filter((item) => item.getType() === 'dropdownicon')
|
|
737
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
738
|
+
...(ngDevMode ? [{ debugName: "_dropdownIconTemplate" }] : /* istanbul ignore next */ []));
|
|
714
739
|
focusedMultipleOptionIndex = signal(-1, /* @ts-ignore */
|
|
715
740
|
...(ngDevMode ? [{ debugName: "focusedMultipleOptionIndex" }] : /* istanbul ignore next */ []));
|
|
716
741
|
focusedOptionIndex = signal(-1, /* @ts-ignore */
|
|
@@ -718,17 +743,20 @@ class AutoComplete extends BaseInput {
|
|
|
718
743
|
selectedItemTemplateLabel = signal(null, /* @ts-ignore */
|
|
719
744
|
...(ngDevMode ? [{ debugName: "selectedItemTemplateLabel" }] : /* istanbul ignore next */ []));
|
|
720
745
|
_componentStyle = inject(AutoCompleteStyle);
|
|
746
|
+
translation = toSignal(this.config.translationObserver, { initialValue: this.config.translation });
|
|
747
|
+
_id = computed(() => this.id() || uuid('pn_id_'), /* @ts-ignore */
|
|
748
|
+
...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
|
|
721
749
|
$appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
|
|
722
750
|
...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
|
|
723
751
|
visibleOptions = computed(() => {
|
|
724
|
-
return this.group ? this.flatOptions(this.
|
|
752
|
+
return this.group() ? this.flatOptions(this.suggestions()) : this.suggestions() || [];
|
|
725
753
|
}, /* @ts-ignore */
|
|
726
754
|
...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
|
|
727
755
|
inputValue = computed(() => {
|
|
728
756
|
const modelValue = this.modelValue();
|
|
729
|
-
const selectedOption = this.optionValueSelected ? (this.suggestions || []).find((option) => this.isOptionEqualToValue(option, modelValue)) : modelValue;
|
|
757
|
+
const selectedOption = this.optionValueSelected() ? (this.suggestions() || []).find((option) => this.isOptionEqualToValue(option, modelValue)) : modelValue;
|
|
730
758
|
if (isNotEmpty(modelValue)) {
|
|
731
|
-
if (typeof modelValue === 'object' || this.optionValueSelected) {
|
|
759
|
+
if (typeof modelValue === 'object' || this.optionValueSelected()) {
|
|
732
760
|
const selectedItemTemplateLabel = this.selectedItemTemplateLabel();
|
|
733
761
|
if (selectedItemTemplateLabel) {
|
|
734
762
|
return selectedItemTemplateLabel;
|
|
@@ -745,116 +773,58 @@ class AutoComplete extends BaseInput {
|
|
|
745
773
|
}
|
|
746
774
|
}, /* @ts-ignore */
|
|
747
775
|
...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
772
|
-
get ariaSetSize() {
|
|
773
|
-
return this.visibleOptions().filter((option) => !this.isOptionGroup(option)).length;
|
|
774
|
-
}
|
|
775
|
-
get listLabel() {
|
|
776
|
-
return this.config.getTranslation(TranslationKeys.ARIA)['listLabel'];
|
|
777
|
-
}
|
|
778
|
-
get virtualScrollerDisabled() {
|
|
779
|
-
return !this.virtualScroll;
|
|
780
|
-
}
|
|
781
|
-
get optionValueSelected() {
|
|
782
|
-
return this.isResolvedOptionValue(this.modelValue());
|
|
783
|
-
}
|
|
784
|
-
chipItemClass(index) {
|
|
785
|
-
return this._componentStyle.classes.chipItem({ instance: this, i: index });
|
|
786
|
-
}
|
|
787
|
-
onInit() {
|
|
788
|
-
this.id = this.id || uuid('pn_id_');
|
|
789
|
-
this.cd.detectChanges();
|
|
790
|
-
}
|
|
776
|
+
focusedMultipleOptionId = computed(() => (this.focusedMultipleOptionIndex() !== -1 ? `${this._id()}_multiple_option_${this.focusedMultipleOptionIndex()}` : null), /* @ts-ignore */
|
|
777
|
+
...(ngDevMode ? [{ debugName: "focusedMultipleOptionId" }] : /* istanbul ignore next */ []));
|
|
778
|
+
focusedOptionId = computed(() => (this.focusedOptionIndex() !== -1 ? `${this._id()}_${this.focusedOptionIndex()}` : null), /* @ts-ignore */
|
|
779
|
+
...(ngDevMode ? [{ debugName: "focusedOptionId" }] : /* istanbul ignore next */ []));
|
|
780
|
+
searchResultMessageText = computed(() => (isNotEmpty(this.visibleOptions()) && this.overlayVisible() ? this.searchMessageText().replaceAll('{0}', this.visibleOptions().length) : this.emptySearchMessageText()), /* @ts-ignore */
|
|
781
|
+
...(ngDevMode ? [{ debugName: "searchResultMessageText" }] : /* istanbul ignore next */ []));
|
|
782
|
+
searchMessageText = computed(() => this.searchMessage() || this.translation().searchMessage || '', /* @ts-ignore */
|
|
783
|
+
...(ngDevMode ? [{ debugName: "searchMessageText" }] : /* istanbul ignore next */ []));
|
|
784
|
+
emptySearchMessageText = computed(() => this.emptyMessage() || this.translation().emptySearchMessage || '', /* @ts-ignore */
|
|
785
|
+
...(ngDevMode ? [{ debugName: "emptySearchMessageText" }] : /* istanbul ignore next */ []));
|
|
786
|
+
selectionMessageText = computed(() => this.selectionMessage() || this.translation().selectionMessage || '', /* @ts-ignore */
|
|
787
|
+
...(ngDevMode ? [{ debugName: "selectionMessageText" }] : /* istanbul ignore next */ []));
|
|
788
|
+
emptySelectionMessageText = computed(() => this.emptySelectionMessage() || this.translation().emptySelectionMessage || '', /* @ts-ignore */
|
|
789
|
+
...(ngDevMode ? [{ debugName: "emptySelectionMessageText" }] : /* istanbul ignore next */ []));
|
|
790
|
+
selectedMessageText = computed(() => (this.hasSelectedOption() ? this.selectionMessageText().replaceAll('{0}', this.multiple() ? this.modelValue()?.length : '1') : this.emptySelectionMessageText()), /* @ts-ignore */
|
|
791
|
+
...(ngDevMode ? [{ debugName: "selectedMessageText" }] : /* istanbul ignore next */ []));
|
|
792
|
+
ariaSetSize = computed(() => this.visibleOptions().filter((option) => !this.isOptionGroup(option)).length, /* @ts-ignore */
|
|
793
|
+
...(ngDevMode ? [{ debugName: "ariaSetSize" }] : /* istanbul ignore next */ []));
|
|
794
|
+
listLabel = computed(() => this.translation()[TranslationKeys.ARIA]['listLabel'], /* @ts-ignore */
|
|
795
|
+
...(ngDevMode ? [{ debugName: "listLabel" }] : /* istanbul ignore next */ []));
|
|
796
|
+
virtualScrollerDisabled = computed(() => !this.virtualScroll(), /* @ts-ignore */
|
|
797
|
+
...(ngDevMode ? [{ debugName: "virtualScrollerDisabled" }] : /* istanbul ignore next */ []));
|
|
798
|
+
optionValueSelected = computed(() => this.isResolvedOptionValue(this.modelValue()), /* @ts-ignore */
|
|
799
|
+
...(ngDevMode ? [{ debugName: "optionValueSelected" }] : /* istanbul ignore next */ []));
|
|
791
800
|
templates = contentChildren(PrimeTemplate, /* @ts-ignore */
|
|
792
801
|
...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
this._headerTemplate = item.template;
|
|
810
|
-
break;
|
|
811
|
-
case 'empty':
|
|
812
|
-
this._emptyTemplate = item.template;
|
|
813
|
-
break;
|
|
814
|
-
case 'footer':
|
|
815
|
-
this._footerTemplate = item.template;
|
|
816
|
-
break;
|
|
817
|
-
case 'loader':
|
|
818
|
-
this._loaderTemplate = item.template;
|
|
819
|
-
break;
|
|
820
|
-
case 'removetokenicon':
|
|
821
|
-
this._removeIconTemplate = item.template;
|
|
822
|
-
break;
|
|
823
|
-
case 'loadingicon':
|
|
824
|
-
this._loadingIconTemplate = item.template;
|
|
825
|
-
break;
|
|
826
|
-
case 'clearicon':
|
|
827
|
-
this._clearIconTemplate = item.template;
|
|
828
|
-
break;
|
|
829
|
-
case 'dropdownicon':
|
|
830
|
-
this._dropdownIconTemplate = item.template;
|
|
831
|
-
break;
|
|
832
|
-
default:
|
|
833
|
-
this._itemTemplate = item.template;
|
|
834
|
-
break;
|
|
802
|
+
constructor() {
|
|
803
|
+
super();
|
|
804
|
+
effect(() => {
|
|
805
|
+
this.suggestions();
|
|
806
|
+
untracked(() => this.handleSuggestionsChange());
|
|
807
|
+
});
|
|
808
|
+
afterEveryRender(() => {
|
|
809
|
+
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
810
|
+
//Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
|
|
811
|
+
if (this.suggestionsUpdated()) {
|
|
812
|
+
this.zone.runOutsideAngular(() => {
|
|
813
|
+
setTimeout(() => {
|
|
814
|
+
this.overlayViewChild().alignOverlay();
|
|
815
|
+
}, 1);
|
|
816
|
+
this.suggestionsUpdated.set(false);
|
|
817
|
+
});
|
|
835
818
|
}
|
|
836
819
|
});
|
|
837
820
|
}
|
|
838
|
-
onAfterViewChecked() {
|
|
839
|
-
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
840
|
-
//Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
|
|
841
|
-
if (this.suggestionsUpdated) {
|
|
842
|
-
this.zone.runOutsideAngular(() => {
|
|
843
|
-
setTimeout(() => {
|
|
844
|
-
this.overlayViewChild().alignOverlay();
|
|
845
|
-
}, 1);
|
|
846
|
-
this.suggestionsUpdated = false;
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
821
|
handleSuggestionsChange() {
|
|
851
|
-
if (this.loading) {
|
|
852
|
-
this.
|
|
853
|
-
const focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
822
|
+
if (this.loading()) {
|
|
823
|
+
(this.suggestions()?.length ?? 0) > 0 || this.showEmptyMessage() || !!this.emptyTemplate() ? this.show() : this.hide();
|
|
824
|
+
const focusedOptionIndex = this.overlayVisible() && this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : -1;
|
|
854
825
|
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
855
|
-
this.suggestionsUpdated
|
|
856
|
-
this.loading
|
|
857
|
-
this.cd.markForCheck();
|
|
826
|
+
this.suggestionsUpdated.set(true);
|
|
827
|
+
this.loading.set(false);
|
|
858
828
|
}
|
|
859
829
|
}
|
|
860
830
|
flatOptions(options) {
|
|
@@ -866,25 +836,24 @@ class AutoComplete extends BaseInput {
|
|
|
866
836
|
}, []);
|
|
867
837
|
}
|
|
868
838
|
isOptionGroup(option) {
|
|
869
|
-
return this.optionGroupLabel && option.optionGroup && option.group;
|
|
870
|
-
}
|
|
871
|
-
findFirstOptionIndex() {
|
|
872
|
-
return this.visibleOptions().findIndex((option) => this.isValidOption(option));
|
|
873
|
-
}
|
|
874
|
-
findLastOptionIndex() {
|
|
875
|
-
return findLastIndex(this.visibleOptions(), (option) => this.isValidOption(option));
|
|
839
|
+
return this.optionGroupLabel() && option.optionGroup && option.group;
|
|
876
840
|
}
|
|
877
|
-
|
|
841
|
+
findFirstOptionIndex = computed(() => this.visibleOptions().findIndex((option) => this.isValidOption(option)), /* @ts-ignore */
|
|
842
|
+
...(ngDevMode ? [{ debugName: "findFirstOptionIndex" }] : /* istanbul ignore next */ []));
|
|
843
|
+
findLastOptionIndex = computed(() => findLastIndex(this.visibleOptions(), (option) => this.isValidOption(option)), /* @ts-ignore */
|
|
844
|
+
...(ngDevMode ? [{ debugName: "findLastOptionIndex" }] : /* istanbul ignore next */ []));
|
|
845
|
+
findFirstFocusedOptionIndex = computed(() => {
|
|
878
846
|
const selectedIndex = this.findSelectedOptionIndex();
|
|
879
847
|
return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
|
|
880
|
-
}
|
|
881
|
-
|
|
848
|
+
}, /* @ts-ignore */
|
|
849
|
+
...(ngDevMode ? [{ debugName: "findFirstFocusedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
850
|
+
findLastFocusedOptionIndex = computed(() => {
|
|
882
851
|
const selectedIndex = this.findSelectedOptionIndex();
|
|
883
852
|
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
}
|
|
853
|
+
}, /* @ts-ignore */
|
|
854
|
+
...(ngDevMode ? [{ debugName: "findLastFocusedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
855
|
+
findSelectedOptionIndex = computed(() => (this.hasSelectedOption() ? this.visibleOptions().findIndex((option) => this.isValidSelectedOption(option)) : -1), /* @ts-ignore */
|
|
856
|
+
...(ngDevMode ? [{ debugName: "findSelectedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
888
857
|
findNextOptionIndex(index) {
|
|
889
858
|
const matchedOptionIndex = index < this.visibleOptions().length - 1
|
|
890
859
|
? this.visibleOptions()
|
|
@@ -904,11 +873,11 @@ class AutoComplete extends BaseInput {
|
|
|
904
873
|
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
|
905
874
|
}
|
|
906
875
|
isOptionDisabled(option) {
|
|
907
|
-
return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;
|
|
876
|
+
return this.optionDisabled() ? resolveFieldData(option, this.optionDisabled()) : false;
|
|
908
877
|
}
|
|
909
878
|
isSelected(option) {
|
|
910
|
-
if (this.multiple) {
|
|
911
|
-
return this.unique ? this.modelValue()?.some((model) => this.isOptionEqualToValue(option, model)) : false;
|
|
879
|
+
if (this.multiple()) {
|
|
880
|
+
return this.unique() ? this.modelValue()?.some((model) => this.isOptionEqualToValue(option, model)) : false;
|
|
912
881
|
}
|
|
913
882
|
return this.isOptionEqualToValue(option, this.modelValue());
|
|
914
883
|
}
|
|
@@ -917,7 +886,7 @@ class AutoComplete extends BaseInput {
|
|
|
917
886
|
* This happens when a value is written before the matching option is available in the suggestions.
|
|
918
887
|
*/
|
|
919
888
|
isResolvedOptionValue(value) {
|
|
920
|
-
return !!this.optionValue && value != null && typeof value !== 'object';
|
|
889
|
+
return !!this.optionValue() && value != null && typeof value !== 'object';
|
|
921
890
|
}
|
|
922
891
|
/**
|
|
923
892
|
* Whether an option corresponds to a model value, regardless of whether the model holds
|
|
@@ -927,7 +896,7 @@ class AutoComplete extends BaseInput {
|
|
|
927
896
|
return equals(value, option, this.equalityKey()) || (this.isResolvedOptionValue(value) && equals(this.getOptionValue(option), value));
|
|
928
897
|
}
|
|
929
898
|
isOptionMatched(option, value) {
|
|
930
|
-
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.searchLocale) === value.toLocaleLowerCase(this.searchLocale);
|
|
899
|
+
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.searchLocale()) === value.toLocaleLowerCase(this.searchLocale());
|
|
931
900
|
}
|
|
932
901
|
isInputClicked(event) {
|
|
933
902
|
return event.target === this.inputEL()?.nativeElement;
|
|
@@ -936,11 +905,10 @@ class AutoComplete extends BaseInput {
|
|
|
936
905
|
const dropdownButton = this.dropdownButton();
|
|
937
906
|
return dropdownButton?.nativeElement ? event.target === dropdownButton.nativeElement || dropdownButton.nativeElement.contains(event.target) : false;
|
|
938
907
|
}
|
|
939
|
-
equalityKey()
|
|
940
|
-
|
|
941
|
-
}
|
|
908
|
+
equalityKey = computed(() => (this.optionValue() ? undefined : this.dataKey()), /* @ts-ignore */
|
|
909
|
+
...(ngDevMode ? [{ debugName: "equalityKey" }] : /* istanbul ignore next */ []));
|
|
942
910
|
onContainerClick(event) {
|
|
943
|
-
if (this.$disabled() || this.loading || this.isInputClicked(event) || this.isDropdownClicked(event)) {
|
|
911
|
+
if (this.$disabled() || this.loading() || this.isInputClicked(event) || this.isDropdownClicked(event)) {
|
|
944
912
|
return;
|
|
945
913
|
}
|
|
946
914
|
if (!this.overlayViewChild().overlayViewChild()?.nativeElement.contains(event.target)) {
|
|
@@ -949,45 +917,45 @@ class AutoComplete extends BaseInput {
|
|
|
949
917
|
}
|
|
950
918
|
handleDropdownClick(event) {
|
|
951
919
|
let query = undefined;
|
|
952
|
-
if (this.overlayVisible) {
|
|
920
|
+
if (this.overlayVisible()) {
|
|
953
921
|
this.hide(true);
|
|
954
922
|
}
|
|
955
923
|
else {
|
|
956
924
|
const inputEL = this.inputEL();
|
|
957
925
|
focus(inputEL?.nativeElement);
|
|
958
926
|
query = inputEL?.nativeElement?.value;
|
|
959
|
-
if (this.dropdownMode === 'blank')
|
|
927
|
+
if (this.dropdownMode() === 'blank')
|
|
960
928
|
this.search(event, '', 'dropdown');
|
|
961
|
-
else if (this.dropdownMode === 'current')
|
|
929
|
+
else if (this.dropdownMode() === 'current')
|
|
962
930
|
this.search(event, query, 'dropdown');
|
|
963
931
|
}
|
|
964
932
|
this.onDropdownClick.emit({ originalEvent: event, query });
|
|
965
933
|
}
|
|
966
934
|
onInput(event) {
|
|
967
|
-
if (this.typeahead) {
|
|
968
|
-
const _minLength = this.minQueryLength ||
|
|
969
|
-
if (this.searchTimeout) {
|
|
970
|
-
clearTimeout(this.searchTimeout);
|
|
935
|
+
if (this.typeahead()) {
|
|
936
|
+
const _minLength = this.minQueryLength() || 1;
|
|
937
|
+
if (this.searchTimeout()) {
|
|
938
|
+
clearTimeout(this.searchTimeout());
|
|
971
939
|
}
|
|
972
940
|
let query = event.target.value;
|
|
973
941
|
if (this.maxlength() !== null) {
|
|
974
942
|
query = query.split('').slice(0, this.maxlength()).join('');
|
|
975
943
|
}
|
|
976
|
-
if (!this.multiple && !this.forceSelection) {
|
|
944
|
+
if (!this.multiple() && !this.forceSelection()) {
|
|
977
945
|
this.updateModel(query);
|
|
978
946
|
}
|
|
979
|
-
if (query.length === 0 && !this.multiple) {
|
|
947
|
+
if (query.length === 0 && !this.multiple()) {
|
|
980
948
|
this.onClear.emit(undefined);
|
|
981
|
-
setTimeout(() => {
|
|
949
|
+
this.hideTimeout.set(setTimeout(() => {
|
|
982
950
|
this.hide();
|
|
983
|
-
}, this.delay / 2);
|
|
951
|
+
}, this.delay() / 2));
|
|
984
952
|
}
|
|
985
953
|
else {
|
|
986
954
|
if (query.length >= _minLength) {
|
|
987
955
|
this.focusedOptionIndex.set(-1);
|
|
988
|
-
this.searchTimeout
|
|
956
|
+
this.searchTimeout.set(setTimeout(() => {
|
|
989
957
|
this.search(event, query, 'input');
|
|
990
|
-
}, this.delay);
|
|
958
|
+
}, this.delay()));
|
|
991
959
|
}
|
|
992
960
|
else {
|
|
993
961
|
this.hide();
|
|
@@ -1003,14 +971,14 @@ class AutoComplete extends BaseInput {
|
|
|
1003
971
|
// For ScreenReaders
|
|
1004
972
|
return;
|
|
1005
973
|
}
|
|
1006
|
-
if (!this.dirty && this.completeOnFocus) {
|
|
974
|
+
if (!this.dirty() && this.completeOnFocus()) {
|
|
1007
975
|
this.search(event, event.target.value, 'focus');
|
|
1008
976
|
}
|
|
1009
|
-
this.dirty
|
|
1010
|
-
this.focused
|
|
1011
|
-
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
977
|
+
this.dirty.set(true);
|
|
978
|
+
this.focused.set(true);
|
|
979
|
+
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.overlayVisible() && this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : -1;
|
|
1012
980
|
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
1013
|
-
this.overlayVisible && this.scrollInView(this.focusedOptionIndex());
|
|
981
|
+
this.overlayVisible() && this.scrollInView(this.focusedOptionIndex());
|
|
1014
982
|
this.onFocus.emit(event);
|
|
1015
983
|
}
|
|
1016
984
|
onMultipleContainerFocus(event) {
|
|
@@ -1018,11 +986,11 @@ class AutoComplete extends BaseInput {
|
|
|
1018
986
|
// For ScreenReaders
|
|
1019
987
|
return;
|
|
1020
988
|
}
|
|
1021
|
-
this.focused
|
|
989
|
+
this.focused.set(true);
|
|
1022
990
|
}
|
|
1023
991
|
onMultipleContainerBlur(event) {
|
|
1024
992
|
this.focusedMultipleOptionIndex.set(-1);
|
|
1025
|
-
this.focused
|
|
993
|
+
this.focused.set(false);
|
|
1026
994
|
}
|
|
1027
995
|
onMultipleContainerKeyDown(event) {
|
|
1028
996
|
if (this.$disabled()) {
|
|
@@ -1044,10 +1012,10 @@ class AutoComplete extends BaseInput {
|
|
|
1044
1012
|
}
|
|
1045
1013
|
}
|
|
1046
1014
|
onInputBlur(event) {
|
|
1047
|
-
this.dirty
|
|
1048
|
-
this.focused
|
|
1015
|
+
this.dirty.set(false);
|
|
1016
|
+
this.focused.set(false);
|
|
1049
1017
|
this.focusedOptionIndex.set(-1);
|
|
1050
|
-
if (this.addOnBlur && this.multiple && !this.typeahead) {
|
|
1018
|
+
if (this.addOnBlur() && this.multiple() && !this.typeahead()) {
|
|
1051
1019
|
const inputValue = (this.multiInputEl()?.nativeElement?.value || event.target.value || '').trim();
|
|
1052
1020
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1053
1021
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
@@ -1065,10 +1033,10 @@ class AutoComplete extends BaseInput {
|
|
|
1065
1033
|
this.onBlur.emit(event);
|
|
1066
1034
|
}
|
|
1067
1035
|
onInputPaste(event) {
|
|
1068
|
-
if (this.separator && this.multiple && !this.typeahead) {
|
|
1036
|
+
if (this.separator() && this.multiple() && !this.typeahead()) {
|
|
1069
1037
|
const pastedData = (event.clipboardData || window['clipboardData'])?.getData('Text');
|
|
1070
1038
|
if (pastedData) {
|
|
1071
|
-
const values = pastedData.split(this.separator);
|
|
1039
|
+
const values = pastedData.split(this.separator());
|
|
1072
1040
|
const newValues = [...(this.modelValue() || [])];
|
|
1073
1041
|
values.forEach((value) => {
|
|
1074
1042
|
const trimmedValue = value.trim();
|
|
@@ -1155,8 +1123,8 @@ class AutoComplete extends BaseInput {
|
|
|
1155
1123
|
}
|
|
1156
1124
|
}
|
|
1157
1125
|
handleSeparatorKey(event) {
|
|
1158
|
-
if (this.separator && this.multiple && !this.typeahead) {
|
|
1159
|
-
if (this.separator === event.key || (typeof this.separator === 'string' && event.key === this.separator) || (this.separator instanceof RegExp && event.key.match(this.separator))) {
|
|
1126
|
+
if (this.separator() && this.multiple() && !this.typeahead()) {
|
|
1127
|
+
if (this.separator() === event.key || (typeof this.separator() === 'string' && event.key === this.separator()) || (this.separator() instanceof RegExp && event.key.match(this.separator()))) {
|
|
1160
1128
|
const inputValue = (this.multiInputEl()?.nativeElement?.value || event.target.value || '').trim();
|
|
1161
1129
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1162
1130
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
@@ -1174,7 +1142,7 @@ class AutoComplete extends BaseInput {
|
|
|
1174
1142
|
}
|
|
1175
1143
|
}
|
|
1176
1144
|
onArrowDownKey(event) {
|
|
1177
|
-
if (!this.overlayVisible) {
|
|
1145
|
+
if (!this.overlayVisible()) {
|
|
1178
1146
|
return;
|
|
1179
1147
|
}
|
|
1180
1148
|
const optionIndex = this.focusedOptionIndex() !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex()) : this.findFirstFocusedOptionIndex();
|
|
@@ -1183,14 +1151,14 @@ class AutoComplete extends BaseInput {
|
|
|
1183
1151
|
event.stopPropagation();
|
|
1184
1152
|
}
|
|
1185
1153
|
onArrowUpKey(event) {
|
|
1186
|
-
if (!this.overlayVisible) {
|
|
1154
|
+
if (!this.overlayVisible()) {
|
|
1187
1155
|
return;
|
|
1188
1156
|
}
|
|
1189
1157
|
if (event.altKey) {
|
|
1190
1158
|
if (this.focusedOptionIndex() !== -1) {
|
|
1191
1159
|
this.onOptionSelect(event, this.visibleOptions()[this.focusedOptionIndex()]);
|
|
1192
1160
|
}
|
|
1193
|
-
this.overlayVisible && this.hide();
|
|
1161
|
+
this.overlayVisible() && this.hide();
|
|
1194
1162
|
event.preventDefault();
|
|
1195
1163
|
}
|
|
1196
1164
|
else {
|
|
@@ -1203,7 +1171,7 @@ class AutoComplete extends BaseInput {
|
|
|
1203
1171
|
onArrowLeftKey(event) {
|
|
1204
1172
|
const target = event.currentTarget;
|
|
1205
1173
|
this.focusedOptionIndex.set(-1);
|
|
1206
|
-
if (this.multiple) {
|
|
1174
|
+
if (this.multiple()) {
|
|
1207
1175
|
if (isEmpty(target.value) && this.hasSelectedOption()) {
|
|
1208
1176
|
focus(this.multiContainerEL()?.nativeElement);
|
|
1209
1177
|
this.focusedMultipleOptionIndex.set(this.modelValue().length);
|
|
@@ -1215,7 +1183,7 @@ class AutoComplete extends BaseInput {
|
|
|
1215
1183
|
}
|
|
1216
1184
|
onArrowRightKey(event) {
|
|
1217
1185
|
this.focusedOptionIndex.set(-1);
|
|
1218
|
-
this.multiple && event.stopPropagation(); // To prevent onArrowRightKeyOnMultiple method
|
|
1186
|
+
this.multiple() && event.stopPropagation(); // To prevent onArrowRightKeyOnMultiple method
|
|
1219
1187
|
}
|
|
1220
1188
|
onHomeKey(event) {
|
|
1221
1189
|
const { currentTarget } = event;
|
|
@@ -1240,8 +1208,8 @@ class AutoComplete extends BaseInput {
|
|
|
1240
1208
|
event.preventDefault();
|
|
1241
1209
|
}
|
|
1242
1210
|
onEnterKey(event) {
|
|
1243
|
-
if (!this.typeahead && !this.forceSelection) {
|
|
1244
|
-
if (this.multiple) {
|
|
1211
|
+
if (!this.typeahead() && !this.forceSelection()) {
|
|
1212
|
+
if (this.multiple()) {
|
|
1245
1213
|
const inputValue = event.target.value?.trim();
|
|
1246
1214
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1247
1215
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
@@ -1251,7 +1219,7 @@ class AutoComplete extends BaseInput {
|
|
|
1251
1219
|
}
|
|
1252
1220
|
}
|
|
1253
1221
|
}
|
|
1254
|
-
if (!this.overlayVisible) {
|
|
1222
|
+
if (!this.overlayVisible()) {
|
|
1255
1223
|
return;
|
|
1256
1224
|
}
|
|
1257
1225
|
else {
|
|
@@ -1263,7 +1231,7 @@ class AutoComplete extends BaseInput {
|
|
|
1263
1231
|
event.preventDefault();
|
|
1264
1232
|
}
|
|
1265
1233
|
onEscapeKey(event) {
|
|
1266
|
-
this.overlayVisible && this.hide(true);
|
|
1234
|
+
this.overlayVisible() && this.hide(true);
|
|
1267
1235
|
event.preventDefault();
|
|
1268
1236
|
}
|
|
1269
1237
|
onTabKey(event) {
|
|
@@ -1273,9 +1241,9 @@ class AutoComplete extends BaseInput {
|
|
|
1273
1241
|
return;
|
|
1274
1242
|
}
|
|
1275
1243
|
// Handle tab key behavior for multiple mode without typeahead
|
|
1276
|
-
if (this.multiple && !this.typeahead) {
|
|
1244
|
+
if (this.multiple() && !this.typeahead()) {
|
|
1277
1245
|
const inputValue = (this.multiInputEl()?.nativeElement?.value || this.inputEL()?.nativeElement?.value || '').trim();
|
|
1278
|
-
if (this.addOnTab) {
|
|
1246
|
+
if (this.addOnTab()) {
|
|
1279
1247
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1280
1248
|
// Add the value and keep focus
|
|
1281
1249
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
@@ -1290,7 +1258,7 @@ class AutoComplete extends BaseInput {
|
|
|
1290
1258
|
}
|
|
1291
1259
|
this.updateInputValue();
|
|
1292
1260
|
event.preventDefault(); // Keep focus on the component
|
|
1293
|
-
this.overlayVisible && this.hide();
|
|
1261
|
+
this.overlayVisible() && this.hide();
|
|
1294
1262
|
return;
|
|
1295
1263
|
}
|
|
1296
1264
|
// If no value or already selected, allow normal tab behavior (blur)
|
|
@@ -1298,10 +1266,10 @@ class AutoComplete extends BaseInput {
|
|
|
1298
1266
|
// If addOnTab is false or no value to add, allow normal tab behavior
|
|
1299
1267
|
// which will trigger blur and potentially addOnBlur
|
|
1300
1268
|
}
|
|
1301
|
-
this.overlayVisible && this.hide();
|
|
1269
|
+
this.overlayVisible() && this.hide();
|
|
1302
1270
|
}
|
|
1303
1271
|
onBackspaceKey(event) {
|
|
1304
|
-
if (this.multiple) {
|
|
1272
|
+
if (this.multiple()) {
|
|
1305
1273
|
if (isNotEmpty(this.modelValue()) && !this.inputEL()?.nativeElement?.value) {
|
|
1306
1274
|
const removedValue = this.modelValue()[this.modelValue().length - 1];
|
|
1307
1275
|
const newValue = this.modelValue().slice(0, -1);
|
|
@@ -1330,7 +1298,7 @@ class AutoComplete extends BaseInput {
|
|
|
1330
1298
|
}
|
|
1331
1299
|
}
|
|
1332
1300
|
onOptionSelect(event, option, isHide = true) {
|
|
1333
|
-
if (this.multiple) {
|
|
1301
|
+
if (this.multiple()) {
|
|
1334
1302
|
const inputEL = this.inputEL();
|
|
1335
1303
|
inputEL?.nativeElement && (inputEL.nativeElement.value = '');
|
|
1336
1304
|
if (!this.isSelected(option)) {
|
|
@@ -1344,7 +1312,7 @@ class AutoComplete extends BaseInput {
|
|
|
1344
1312
|
isHide && this.hide(true);
|
|
1345
1313
|
}
|
|
1346
1314
|
onOptionMouseEnter(event, index) {
|
|
1347
|
-
if (this.focusOnHover) {
|
|
1315
|
+
if (this.focusOnHover()) {
|
|
1348
1316
|
this.changeFocusedOptionIndex(event, index);
|
|
1349
1317
|
}
|
|
1350
1318
|
}
|
|
@@ -1357,7 +1325,7 @@ class AutoComplete extends BaseInput {
|
|
|
1357
1325
|
if (source === 'input' && query.trim().length === 0) {
|
|
1358
1326
|
return;
|
|
1359
1327
|
}
|
|
1360
|
-
this.loading
|
|
1328
|
+
this.loading.set(true);
|
|
1361
1329
|
this.completeMethod.emit({ originalEvent: event, query });
|
|
1362
1330
|
}
|
|
1363
1331
|
removeOption(event, index) {
|
|
@@ -1371,19 +1339,18 @@ class AutoComplete extends BaseInput {
|
|
|
1371
1339
|
updateModel(options) {
|
|
1372
1340
|
let value = null;
|
|
1373
1341
|
if (options) {
|
|
1374
|
-
value = this.multiple ? options.map((option) => this.getOptionValue(option)) : this.getOptionValue(options);
|
|
1342
|
+
value = this.multiple() ? options.map((option) => this.getOptionValue(option)) : this.getOptionValue(options);
|
|
1375
1343
|
}
|
|
1376
|
-
this.value
|
|
1344
|
+
this.value.set(value);
|
|
1377
1345
|
this.updateSelectedItemTemplateLabel(options);
|
|
1378
1346
|
this.writeModelValue(options);
|
|
1379
1347
|
this.onModelChange(value);
|
|
1380
1348
|
this.updateInputValue();
|
|
1381
|
-
this.cd.markForCheck();
|
|
1382
1349
|
}
|
|
1383
1350
|
updateInputValue() {
|
|
1384
1351
|
const inputEL = this.inputEL();
|
|
1385
1352
|
if (inputEL && inputEL.nativeElement) {
|
|
1386
|
-
if (!this.multiple) {
|
|
1353
|
+
if (!this.multiple()) {
|
|
1387
1354
|
inputEL.nativeElement.value = this.inputValue();
|
|
1388
1355
|
}
|
|
1389
1356
|
else {
|
|
@@ -1394,17 +1361,17 @@ class AutoComplete extends BaseInput {
|
|
|
1394
1361
|
updateInputWithForceSelection(event) {
|
|
1395
1362
|
const input = this.inputEL()?.nativeElement;
|
|
1396
1363
|
const inputCleared = !input?.value && isNotEmpty(this.modelValue());
|
|
1397
|
-
if (!this.forceSelection || this.overlayVisible || (!input?.value && !inputCleared)) {
|
|
1364
|
+
if (!this.forceSelection() || this.overlayVisible() || (!input?.value && !inputCleared)) {
|
|
1398
1365
|
return;
|
|
1399
1366
|
}
|
|
1400
|
-
const _minLength = this.minQueryLength ??
|
|
1367
|
+
const _minLength = this.minQueryLength() ?? 1;
|
|
1401
1368
|
if (!inputCleared && input.value.length < _minLength) {
|
|
1402
1369
|
return;
|
|
1403
1370
|
}
|
|
1404
1371
|
const matchedOption = this.visibleOptions()?.find((option) => this.isOptionMatched(option, input.value));
|
|
1405
1372
|
if (!matchedOption) {
|
|
1406
1373
|
input.value = '';
|
|
1407
|
-
if (!this.multiple) {
|
|
1374
|
+
if (!this.multiple()) {
|
|
1408
1375
|
this.clear();
|
|
1409
1376
|
}
|
|
1410
1377
|
return;
|
|
@@ -1413,24 +1380,17 @@ class AutoComplete extends BaseInput {
|
|
|
1413
1380
|
this.onOptionSelect(event, matchedOption);
|
|
1414
1381
|
}
|
|
1415
1382
|
}
|
|
1416
|
-
autoUpdateModel() {
|
|
1417
|
-
if ((this.selectOnFocus || this.autoHighlight) && this.autoOptionFocus && !this.hasSelectedOption()) {
|
|
1418
|
-
const focusedOptionIndex = this.findFirstFocusedOptionIndex();
|
|
1419
|
-
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
1420
|
-
this.onOptionSelect(null, this.visibleOptions()[this.focusedOptionIndex()], false);
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
1383
|
scrollInView(index = -1) {
|
|
1424
|
-
const id = index !== -1 ? `${this.
|
|
1384
|
+
const id = index !== -1 ? `${this._id()}_${index}` : this.focusedOptionId();
|
|
1425
1385
|
const itemsViewChild = this.itemsViewChild();
|
|
1426
1386
|
if (itemsViewChild && itemsViewChild.nativeElement) {
|
|
1427
1387
|
const element = findSingle(itemsViewChild.nativeElement, `li[id="${id}"]`);
|
|
1428
1388
|
if (element) {
|
|
1429
1389
|
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
1430
1390
|
}
|
|
1431
|
-
else if (!this.virtualScrollerDisabled) {
|
|
1391
|
+
else if (!this.virtualScrollerDisabled()) {
|
|
1432
1392
|
setTimeout(() => {
|
|
1433
|
-
this.virtualScroll && this.scroller()?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
|
|
1393
|
+
this.virtualScroll() && this.scroller()?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
|
|
1434
1394
|
}, 0);
|
|
1435
1395
|
}
|
|
1436
1396
|
}
|
|
@@ -1439,36 +1399,34 @@ class AutoComplete extends BaseInput {
|
|
|
1439
1399
|
if (this.focusedOptionIndex() !== index) {
|
|
1440
1400
|
this.focusedOptionIndex.set(index);
|
|
1441
1401
|
this.scrollInView();
|
|
1442
|
-
if (this.selectOnFocus) {
|
|
1402
|
+
if (this.selectOnFocus()) {
|
|
1443
1403
|
this.onOptionSelect(event, this.visibleOptions()[index], false);
|
|
1444
1404
|
}
|
|
1445
1405
|
}
|
|
1446
1406
|
}
|
|
1447
1407
|
show(isFocus = false) {
|
|
1448
|
-
this.dirty
|
|
1449
|
-
this.overlayVisible
|
|
1450
|
-
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
1408
|
+
this.dirty.set(true);
|
|
1409
|
+
this.overlayVisible.set(true);
|
|
1410
|
+
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : -1;
|
|
1451
1411
|
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
1452
1412
|
isFocus && focus(this.inputEL()?.nativeElement);
|
|
1453
1413
|
if (isFocus) {
|
|
1454
1414
|
focus(this.inputEL()?.nativeElement);
|
|
1455
1415
|
}
|
|
1456
1416
|
this.onShow.emit(undefined);
|
|
1457
|
-
this.cd.markForCheck();
|
|
1458
1417
|
}
|
|
1459
1418
|
hide(isFocus = false) {
|
|
1460
1419
|
const _hide = () => {
|
|
1461
|
-
this.dirty
|
|
1462
|
-
this.overlayVisible
|
|
1420
|
+
this.dirty.set(isFocus);
|
|
1421
|
+
this.overlayVisible.set(false);
|
|
1463
1422
|
this.focusedOptionIndex.set(-1);
|
|
1464
1423
|
isFocus && focus(this.inputEL()?.nativeElement);
|
|
1465
1424
|
this.onHide.emit(undefined);
|
|
1466
1425
|
this.updateInputWithForceSelection(null);
|
|
1467
|
-
this.cd.markForCheck();
|
|
1468
1426
|
};
|
|
1469
|
-
setTimeout(() => {
|
|
1427
|
+
this.hideTimeout.set(setTimeout(() => {
|
|
1470
1428
|
_hide();
|
|
1471
|
-
}, 0); // For ScreenReaders
|
|
1429
|
+
}, 0)); // For ScreenReaders
|
|
1472
1430
|
}
|
|
1473
1431
|
clear() {
|
|
1474
1432
|
this.updateModel(null);
|
|
@@ -1476,11 +1434,10 @@ class AutoComplete extends BaseInput {
|
|
|
1476
1434
|
inputEL?.nativeElement && (inputEL.nativeElement.value = '');
|
|
1477
1435
|
this.onClear.emit(undefined);
|
|
1478
1436
|
}
|
|
1479
|
-
hasSelectedOption()
|
|
1480
|
-
|
|
1481
|
-
}
|
|
1437
|
+
hasSelectedOption = computed(() => isNotEmpty(this.modelValue()), /* @ts-ignore */
|
|
1438
|
+
...(ngDevMode ? [{ debugName: "hasSelectedOption" }] : /* istanbul ignore next */ []));
|
|
1482
1439
|
getAriaPosInset(index) {
|
|
1483
|
-
return ((this.optionGroupLabel
|
|
1440
|
+
return ((this.optionGroupLabel()
|
|
1484
1441
|
? index -
|
|
1485
1442
|
this.visibleOptions()
|
|
1486
1443
|
.slice(0, index)
|
|
@@ -1488,10 +1445,10 @@ class AutoComplete extends BaseInput {
|
|
|
1488
1445
|
: index) + 1);
|
|
1489
1446
|
}
|
|
1490
1447
|
getOptionLabel(option) {
|
|
1491
|
-
return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option && option.label != undefined ? option.label : option;
|
|
1448
|
+
return this.optionLabel() ? resolveFieldData(option, this.optionLabel()) : option && option.label != undefined ? option.label : option;
|
|
1492
1449
|
}
|
|
1493
1450
|
getSelectedItemTemplateLabel(option) {
|
|
1494
|
-
const template = this.selectedItemTemplate() || this._selectedItemTemplate;
|
|
1451
|
+
const template = this.selectedItemTemplate() || this._selectedItemTemplate();
|
|
1495
1452
|
if (!template || option == null) {
|
|
1496
1453
|
return null;
|
|
1497
1454
|
}
|
|
@@ -1506,19 +1463,19 @@ class AutoComplete extends BaseInput {
|
|
|
1506
1463
|
return label || null;
|
|
1507
1464
|
}
|
|
1508
1465
|
updateSelectedItemTemplateLabel(option) {
|
|
1509
|
-
this.selectedItemTemplateLabel.set(!this.multiple ? this.getSelectedItemTemplateLabel(option) : null);
|
|
1466
|
+
this.selectedItemTemplateLabel.set(!this.multiple() ? this.getSelectedItemTemplateLabel(option) : null);
|
|
1510
1467
|
}
|
|
1511
1468
|
getOptionValue(option) {
|
|
1512
|
-
return this.optionValue ? resolveFieldData(option, this.optionValue) : option;
|
|
1469
|
+
return this.optionValue() ? resolveFieldData(option, this.optionValue()) : option;
|
|
1513
1470
|
}
|
|
1514
1471
|
getOptionIndex(index, scrollerOptions) {
|
|
1515
|
-
return this.virtualScrollerDisabled ? index : scrollerOptions && scrollerOptions.getItemOptions(index)['index'];
|
|
1472
|
+
return this.virtualScrollerDisabled() ? index : scrollerOptions && scrollerOptions.getItemOptions(index)['index'];
|
|
1516
1473
|
}
|
|
1517
1474
|
getOptionGroupLabel(optionGroup) {
|
|
1518
|
-
return this.optionGroupLabel ? resolveFieldData(optionGroup, this.optionGroupLabel) : optionGroup && optionGroup.label != undefined ? optionGroup.label : optionGroup;
|
|
1475
|
+
return this.optionGroupLabel() ? resolveFieldData(optionGroup, this.optionGroupLabel()) : optionGroup && optionGroup.label != undefined ? optionGroup.label : optionGroup;
|
|
1519
1476
|
}
|
|
1520
1477
|
getOptionGroupChildren(optionGroup) {
|
|
1521
|
-
return this.optionGroupChildren ? resolveFieldData(optionGroup, this.optionGroupChildren) : optionGroup.items;
|
|
1478
|
+
return this.optionGroupChildren() ? resolveFieldData(optionGroup, this.optionGroupChildren()) : optionGroup.items;
|
|
1522
1479
|
}
|
|
1523
1480
|
getPTOptions(option, scrollerOptions, index, key) {
|
|
1524
1481
|
return this.ptm(key, {
|
|
@@ -1532,48 +1489,45 @@ class AutoComplete extends BaseInput {
|
|
|
1532
1489
|
});
|
|
1533
1490
|
}
|
|
1534
1491
|
onOverlayBeforeEnter() {
|
|
1535
|
-
this.itemsWrapper
|
|
1492
|
+
this.itemsWrapper.set(findSingle(this.overlayViewChild().overlayViewChild()?.nativeElement, this.virtualScroll() ? '[data-pc-name="virtualscroller"]' : '[data-pc-name="pcoverlay"]'));
|
|
1536
1493
|
const scroller = this.scroller();
|
|
1537
|
-
if (this.virtualScroll) {
|
|
1494
|
+
if (this.virtualScroll()) {
|
|
1538
1495
|
scroller?.setContentEl(this.itemsViewChild()?.nativeElement);
|
|
1539
1496
|
scroller?.viewInit();
|
|
1540
1497
|
}
|
|
1541
1498
|
if (this.visibleOptions() && this.visibleOptions().length) {
|
|
1542
|
-
if (this.virtualScroll) {
|
|
1499
|
+
if (this.virtualScroll()) {
|
|
1543
1500
|
const selectedIndex = this.modelValue() ? this.focusedOptionIndex() : -1;
|
|
1544
1501
|
if (selectedIndex !== -1) {
|
|
1545
1502
|
scroller?.scrollToIndex(selectedIndex);
|
|
1546
1503
|
}
|
|
1547
1504
|
}
|
|
1548
1505
|
else {
|
|
1549
|
-
let selectedListItem = findSingle(this.itemsWrapper, '[data-pc-section="option"][data-p-selected="true"]');
|
|
1506
|
+
let selectedListItem = findSingle(this.itemsWrapper(), '[data-pc-section="option"][data-p-selected="true"]');
|
|
1550
1507
|
if (selectedListItem) {
|
|
1551
1508
|
selectedListItem.scrollIntoView({ block: 'nearest', inline: 'center' });
|
|
1552
1509
|
}
|
|
1553
1510
|
}
|
|
1554
1511
|
}
|
|
1555
1512
|
}
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
[this.size()]: this.size()
|
|
1575
|
-
});
|
|
1576
|
-
}
|
|
1513
|
+
containerDataP = computed(() => this.cn({
|
|
1514
|
+
fluid: this.hasFluid
|
|
1515
|
+
}), /* @ts-ignore */
|
|
1516
|
+
...(ngDevMode ? [{ debugName: "containerDataP" }] : /* istanbul ignore next */ []));
|
|
1517
|
+
overlayDataP = computed(() => this.cn({
|
|
1518
|
+
[`overlay-${this.$appendTo()}`]: true
|
|
1519
|
+
}), /* @ts-ignore */
|
|
1520
|
+
...(ngDevMode ? [{ debugName: "overlayDataP" }] : /* istanbul ignore next */ []));
|
|
1521
|
+
inputMultipleDataP = computed(() => this.cn({
|
|
1522
|
+
invalid: this.invalid(),
|
|
1523
|
+
disabled: this.$disabled(),
|
|
1524
|
+
focus: this.focused(),
|
|
1525
|
+
fluid: this.hasFluid,
|
|
1526
|
+
filled: this.$variant() === 'filled',
|
|
1527
|
+
empty: !this.$filled(),
|
|
1528
|
+
[this.size()]: this.size()
|
|
1529
|
+
}), /* @ts-ignore */
|
|
1530
|
+
...(ngDevMode ? [{ debugName: "inputMultipleDataP" }] : /* istanbul ignore next */ []));
|
|
1577
1531
|
/**
|
|
1578
1532
|
* @override
|
|
1579
1533
|
*
|
|
@@ -1582,7 +1536,7 @@ class AutoComplete extends BaseInput {
|
|
|
1582
1536
|
*/
|
|
1583
1537
|
writeControlValue(value, setModelValue) {
|
|
1584
1538
|
let resolvedValue = value;
|
|
1585
|
-
if (this.multiple) {
|
|
1539
|
+
if (this.multiple()) {
|
|
1586
1540
|
const resolved = (value || []).map((val) => {
|
|
1587
1541
|
const match = this.visibleOptions().find((option) => this.isOptionEqualToValue(option, val));
|
|
1588
1542
|
return match ?? val;
|
|
@@ -1594,40 +1548,36 @@ class AutoComplete extends BaseInput {
|
|
|
1594
1548
|
resolvedValue = isEmpty(option) ? value : option;
|
|
1595
1549
|
}
|
|
1596
1550
|
setModelValue(resolvedValue);
|
|
1597
|
-
this.value
|
|
1551
|
+
this.value.set(value);
|
|
1598
1552
|
this.updateInputValue();
|
|
1599
1553
|
queueMicrotask(() => {
|
|
1600
1554
|
this.updateSelectedItemTemplateLabel(resolvedValue);
|
|
1601
1555
|
this.updateInputValue();
|
|
1602
|
-
this.cd.markForCheck();
|
|
1603
1556
|
});
|
|
1604
|
-
this.cd.markForCheck();
|
|
1605
1557
|
}
|
|
1606
1558
|
onDestroy() {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
this.scrollHandler = null;
|
|
1610
|
-
}
|
|
1559
|
+
clearTimeout(this.searchTimeout());
|
|
1560
|
+
clearTimeout(this.hideTimeout());
|
|
1611
1561
|
}
|
|
1612
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoComplete, deps:
|
|
1613
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.1", type: AutoComplete, isStandalone: true, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: { minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: false, isRequired: false, transformFunction: numberAttribute }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: false, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: false, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, dropdownAriaLabel: { classPropertyName: "dropdownAriaLabel", publicName: "dropdownAriaLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: false, isRequired: false, transformFunction: null }, unique: { classPropertyName: "unique", publicName: "unique", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, group: { classPropertyName: "group", publicName: "group", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showEmptyMessage: { classPropertyName: "showEmptyMessage", publicName: "showEmptyMessage", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdownMode: { classPropertyName: "dropdownMode", publicName: "dropdownMode", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, addOnTab: { classPropertyName: "addOnTab", publicName: "addOnTab", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: false, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: false, isRequired: false, transformFunction: null }, showTransitionOptions: { classPropertyName: "showTransitionOptions", publicName: "showTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, hideTransitionOptions: { classPropertyName: "hideTransitionOptions", publicName: "hideTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: false, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: false, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: false, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: false, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: false, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, searchMessage: { classPropertyName: "searchMessage", publicName: "searchMessage", isSignal: false, isRequired: false, transformFunction: null }, emptySelectionMessage: { classPropertyName: "emptySelectionMessage", publicName: "emptySelectionMessage", isSignal: false, isRequired: false, transformFunction: null }, selectionMessage: { classPropertyName: "selectionMessage", publicName: "selectionMessage", isSignal: false, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, searchLocale: { classPropertyName: "searchLocale", publicName: "searchLocale", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: false, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: false, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onAdd: "onAdd", onFocus: "onFocus", onBlur: "onBlur", onDropdownClick: "onDropdownClick", onClear: "onClear", onInputKeydown: "onInputKeydown", onKeyUp: "onKeyUp", onShow: "onShow", onHide: "onHide", onLazyLoad: "onLazyLoad" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "cn(cx('root'), styleClass)", "style": "sx('root')", "attr.data-p": "containerDataP" } }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR, AutoCompleteStyle, { provide: AUTOCOMPLETE_INSTANCE, useExisting: AutoComplete }, { provide: PARENT_INSTANCE, useExisting: AutoComplete }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selecteditem"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], descendants: true, isSignal: true }, { propertyName: "removeIconTemplate", first: true, predicate: ["removeicon"], descendants: true, isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true, isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], descendants: true, isSignal: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"], descendants: true, isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "inputEL", first: true, predicate: ["focusInput"], descendants: true, isSignal: true }, { propertyName: "multiInputEl", first: true, predicate: ["multiIn"], descendants: true, isSignal: true }, { propertyName: "multiContainerEL", first: true, predicate: ["multiContainer"], descendants: true, isSignal: true }, { propertyName: "dropdownButton", first: true, predicate: ["ddBtn"], descendants: true, isSignal: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true, isSignal: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
1562
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoComplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1563
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.1", type: AutoComplete, isStandalone: true, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: { minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: true, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, dropdownAriaLabel: { classPropertyName: "dropdownAriaLabel", publicName: "dropdownAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, unique: { classPropertyName: "unique", publicName: "unique", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: true, isRequired: false, transformFunction: null }, showEmptyMessage: { classPropertyName: "showEmptyMessage", publicName: "showEmptyMessage", isSignal: true, isRequired: false, transformFunction: null }, dropdownMode: { classPropertyName: "dropdownMode", publicName: "dropdownMode", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, addOnTab: { classPropertyName: "addOnTab", publicName: "addOnTab", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, searchMessage: { classPropertyName: "searchMessage", publicName: "searchMessage", isSignal: true, isRequired: false, transformFunction: null }, emptySelectionMessage: { classPropertyName: "emptySelectionMessage", publicName: "emptySelectionMessage", isSignal: true, isRequired: false, transformFunction: null }, selectionMessage: { classPropertyName: "selectionMessage", publicName: "selectionMessage", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, searchLocale: { classPropertyName: "searchLocale", publicName: "searchLocale", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onAdd: "onAdd", onFocus: "onFocus", onBlur: "onBlur", onDropdownClick: "onDropdownClick", onClear: "onClear", onInputKeydown: "onInputKeydown", onKeyUp: "onKeyUp", onShow: "onShow", onHide: "onHide", onLazyLoad: "onLazyLoad" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "cx('root')", "style": "sx('root')", "attr.data-p": "containerDataP()" } }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR, AutoCompleteStyle, { provide: AUTOCOMPLETE_INSTANCE, useExisting: AutoComplete }, { provide: PARENT_INSTANCE, useExisting: AutoComplete }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selecteditem"], descendants: true, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], descendants: true, isSignal: true }, { propertyName: "removeIconTemplate", first: true, predicate: ["removeicon"], descendants: true, isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true, isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], descendants: true, isSignal: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"], descendants: true, isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "inputEL", first: true, predicate: ["focusInput"], descendants: true, isSignal: true }, { propertyName: "multiInputEl", first: true, predicate: ["multiIn"], descendants: true, isSignal: true }, { propertyName: "multiContainerEL", first: true, predicate: ["multiContainer"], descendants: true, isSignal: true }, { propertyName: "dropdownButton", first: true, predicate: ["ddBtn"], descendants: true, isSignal: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true, isSignal: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
1614
1564
|
<input
|
|
1615
|
-
*ngIf="!multiple"
|
|
1565
|
+
*ngIf="!multiple()"
|
|
1616
1566
|
#focusInput
|
|
1617
|
-
[pAutoFocus]="autofocus"
|
|
1567
|
+
[pAutoFocus]="autofocus()"
|
|
1618
1568
|
pInputText
|
|
1619
1569
|
[pt]="ptm('pcInputText')"
|
|
1620
|
-
[class]="cn(cx('pcInputText'), inputStyleClass)"
|
|
1621
|
-
[ngStyle]="inputStyle"
|
|
1622
|
-
[attr.type]="type"
|
|
1570
|
+
[class]="cn(cx('pcInputText'), inputStyleClass())"
|
|
1571
|
+
[ngStyle]="inputStyle()"
|
|
1572
|
+
[attr.type]="type()"
|
|
1623
1573
|
[attr.value]="inputValue()"
|
|
1624
1574
|
[variant]="$variant()"
|
|
1625
1575
|
[invalid]="invalid()"
|
|
1626
|
-
[attr.id]="inputId"
|
|
1627
|
-
[attr.autocomplete]="autocomplete"
|
|
1576
|
+
[attr.id]="inputId()"
|
|
1577
|
+
[attr.autocomplete]="autocomplete()"
|
|
1628
1578
|
aria-autocomplete="list"
|
|
1629
1579
|
role="combobox"
|
|
1630
|
-
[attr.placeholder]="placeholder"
|
|
1580
|
+
[attr.placeholder]="placeholder()"
|
|
1631
1581
|
[attr.name]="name()"
|
|
1632
1582
|
[attr.minlength]="minlength()"
|
|
1633
1583
|
[pSize]="size()"
|
|
@@ -1636,16 +1586,16 @@ class AutoComplete extends BaseInput {
|
|
|
1636
1586
|
[attr.pattern]="pattern()"
|
|
1637
1587
|
[attr.size]="inputSize()"
|
|
1638
1588
|
[attr.maxlength]="maxlength()"
|
|
1639
|
-
[attr.tabindex]="!$disabled() ? tabindex : -1"
|
|
1589
|
+
[attr.tabindex]="!$disabled() ? tabindex() : -1"
|
|
1640
1590
|
[attr.required]="required() ? '' : undefined"
|
|
1641
|
-
[attr.readonly]="readonly ? '' : undefined"
|
|
1591
|
+
[attr.readonly]="readonly() ? '' : undefined"
|
|
1642
1592
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
1643
|
-
[attr.aria-label]="ariaLabel"
|
|
1644
|
-
[attr.aria-labelledby]="ariaLabelledBy"
|
|
1593
|
+
[attr.aria-label]="ariaLabel()"
|
|
1594
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1645
1595
|
[attr.aria-required]="required()"
|
|
1646
|
-
[attr.aria-expanded]="overlayVisible ?? false"
|
|
1647
|
-
[attr.aria-controls]="overlayVisible ?
|
|
1648
|
-
[attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
|
|
1596
|
+
[attr.aria-expanded]="overlayVisible() ?? false"
|
|
1597
|
+
[attr.aria-controls]="overlayVisible() ? _id() + '_list' : null"
|
|
1598
|
+
[attr.aria-activedescendant]="focused() ? focusedOptionId() : undefined"
|
|
1649
1599
|
(input)="onInput($event)"
|
|
1650
1600
|
(keydown)="onKeyDown($event)"
|
|
1651
1601
|
(change)="onInputChange($event)"
|
|
@@ -1656,23 +1606,23 @@ class AutoComplete extends BaseInput {
|
|
|
1656
1606
|
[fluid]="hasFluid"
|
|
1657
1607
|
[pInputTextUnstyled]="unstyled()"
|
|
1658
1608
|
/>
|
|
1659
|
-
<ng-container *ngIf="$filled() && !$disabled() && showClear && !loading">
|
|
1660
|
-
<svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
|
|
1661
|
-
<span *ngIf="clearIconTemplate() || _clearIconTemplate" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true">
|
|
1662
|
-
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
|
|
1609
|
+
<ng-container *ngIf="$filled() && !$disabled() && showClear() && !loading()">
|
|
1610
|
+
<svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate()" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
|
|
1611
|
+
<span *ngIf="clearIconTemplate() || _clearIconTemplate()" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true">
|
|
1612
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
|
|
1663
1613
|
</span>
|
|
1664
1614
|
</ng-container>
|
|
1665
1615
|
|
|
1666
1616
|
<ul
|
|
1667
|
-
*ngIf="multiple"
|
|
1617
|
+
*ngIf="multiple()"
|
|
1668
1618
|
#multiContainer
|
|
1669
1619
|
[pBind]="ptm('inputMultiple')"
|
|
1670
1620
|
[class]="cx('inputMultiple')"
|
|
1671
|
-
[attr.data-p]="inputMultipleDataP"
|
|
1621
|
+
[attr.data-p]="inputMultipleDataP()"
|
|
1672
1622
|
[tabindex]="-1"
|
|
1673
1623
|
role="listbox"
|
|
1674
1624
|
[attr.aria-orientation]="'horizontal'"
|
|
1675
|
-
[attr.aria-activedescendant]="focused ? focusedMultipleOptionId : undefined"
|
|
1625
|
+
[attr.aria-activedescendant]="focused() ? focusedMultipleOptionId() : undefined"
|
|
1676
1626
|
(focus)="onMultipleContainerFocus($event)"
|
|
1677
1627
|
(blur)="onMultipleContainerBlur($event)"
|
|
1678
1628
|
(keydown)="onMultipleContainerKeyDown($event)"
|
|
@@ -1682,7 +1632,7 @@ class AutoComplete extends BaseInput {
|
|
|
1682
1632
|
*ngFor="let option of modelValue(); let i = index"
|
|
1683
1633
|
[pBind]="ptm('chipItem')"
|
|
1684
1634
|
[class]="cx('chipItem', { i })"
|
|
1685
|
-
[attr.id]="
|
|
1635
|
+
[attr.id]="_id() + '_multiple_option_' + i"
|
|
1686
1636
|
role="option"
|
|
1687
1637
|
[attr.aria-label]="getOptionLabel(option)"
|
|
1688
1638
|
[attr.aria-setsize]="modelValue().length"
|
|
@@ -1692,19 +1642,19 @@ class AutoComplete extends BaseInput {
|
|
|
1692
1642
|
<p-chip
|
|
1693
1643
|
[pt]="ptm('pcChip')"
|
|
1694
1644
|
[class]="cx('pcChip')"
|
|
1695
|
-
[label]="!selectedItemTemplate() && !_selectedItemTemplate && getOptionLabel(option)"
|
|
1645
|
+
[label]="!selectedItemTemplate() && !_selectedItemTemplate() && getOptionLabel(option)"
|
|
1696
1646
|
[disabled]="$disabled()"
|
|
1697
1647
|
[removable]="true"
|
|
1698
|
-
(onRemove)="!readonly ? removeOption($event, i) : ''"
|
|
1648
|
+
(onRemove)="!readonly() ? removeOption($event, i) : ''"
|
|
1699
1649
|
[unstyled]="unstyled()"
|
|
1700
1650
|
>
|
|
1701
|
-
<ng-container *ngTemplateOutlet="selectedItemTemplate() || _selectedItemTemplate; context: { $implicit: option }"></ng-container>
|
|
1651
|
+
<ng-container *ngTemplateOutlet="selectedItemTemplate() || _selectedItemTemplate(); context: { $implicit: option }"></ng-container>
|
|
1702
1652
|
<ng-template #removeicon>
|
|
1703
|
-
<span *ngIf="!removeIconTemplate() && !_removeIconTemplate" [pBind]="ptm('chipIcon')" [class]="cx('chipIcon')" (click)="!readonly && !$disabled() ? removeOption($event, i) : ''">
|
|
1653
|
+
<span *ngIf="!removeIconTemplate() && !_removeIconTemplate()" [pBind]="ptm('chipIcon')" [class]="cx('chipIcon')" (click)="!readonly() && !$disabled() ? removeOption($event, i) : ''">
|
|
1704
1654
|
<svg data-p-icon="times-circle" [class]="cx('chipIcon')" [attr.aria-hidden]="true" />
|
|
1705
1655
|
</span>
|
|
1706
|
-
<span *ngIf="removeIconTemplate() || _removeIconTemplate" [pBind]="ptm('chipIcon')" [attr.aria-hidden]="true">
|
|
1707
|
-
<ng-template *ngTemplateOutlet="removeIconTemplate() || _removeIconTemplate; context: { removeCallback: removeOption.bind(this), index: i, class: cx('chipIcon') }"></ng-template>
|
|
1656
|
+
<span *ngIf="removeIconTemplate() || _removeIconTemplate()" [pBind]="ptm('chipIcon')" [attr.aria-hidden]="true">
|
|
1657
|
+
<ng-template *ngTemplateOutlet="removeIconTemplate() || _removeIconTemplate(); context: { removeCallback: removeOption.bind(this), index: i, class: cx('chipIcon') }"></ng-template>
|
|
1708
1658
|
</span>
|
|
1709
1659
|
</ng-template>
|
|
1710
1660
|
</p-chip>
|
|
@@ -1713,13 +1663,13 @@ class AutoComplete extends BaseInput {
|
|
|
1713
1663
|
<input
|
|
1714
1664
|
#focusInput
|
|
1715
1665
|
#multiIn
|
|
1716
|
-
[pAutoFocus]="autofocus"
|
|
1666
|
+
[pAutoFocus]="autofocus()"
|
|
1717
1667
|
[pBind]="ptm('input')"
|
|
1718
1668
|
[class]="cx('pcInputText')"
|
|
1719
|
-
[ngStyle]="inputStyle"
|
|
1720
|
-
[attr.type]="type"
|
|
1721
|
-
[attr.id]="inputId"
|
|
1722
|
-
[attr.autocomplete]="autocomplete"
|
|
1669
|
+
[ngStyle]="inputStyle()"
|
|
1670
|
+
[attr.type]="type()"
|
|
1671
|
+
[attr.id]="inputId()"
|
|
1672
|
+
[attr.autocomplete]="autocomplete()"
|
|
1723
1673
|
[attr.name]="name()"
|
|
1724
1674
|
[attr.minlength]="minlength()"
|
|
1725
1675
|
[attr.maxlength]="maxlength()"
|
|
@@ -1728,18 +1678,18 @@ class AutoComplete extends BaseInput {
|
|
|
1728
1678
|
[attr.max]="max()"
|
|
1729
1679
|
[attr.pattern]="pattern()"
|
|
1730
1680
|
role="combobox"
|
|
1731
|
-
[attr.placeholder]="!$filled() ? placeholder : null"
|
|
1681
|
+
[attr.placeholder]="!$filled() ? placeholder() : null"
|
|
1732
1682
|
aria-autocomplete="list"
|
|
1733
|
-
[attr.tabindex]="!$disabled() ? tabindex : -1"
|
|
1683
|
+
[attr.tabindex]="!$disabled() ? tabindex() : -1"
|
|
1734
1684
|
[attr.required]="required() ? '' : undefined"
|
|
1735
|
-
[attr.readonly]="readonly ? '' : undefined"
|
|
1685
|
+
[attr.readonly]="readonly() ? '' : undefined"
|
|
1736
1686
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
1737
|
-
[attr.aria-label]="ariaLabel"
|
|
1738
|
-
[attr.aria-labelledby]="ariaLabelledBy"
|
|
1687
|
+
[attr.aria-label]="ariaLabel()"
|
|
1688
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1739
1689
|
[attr.aria-required]="required()"
|
|
1740
|
-
[attr.aria-expanded]="overlayVisible ?? false"
|
|
1741
|
-
[attr.aria-controls]="overlayVisible ?
|
|
1742
|
-
[attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
|
|
1690
|
+
[attr.aria-expanded]="overlayVisible() ?? false"
|
|
1691
|
+
[attr.aria-controls]="overlayVisible() ? _id() + '_list' : null"
|
|
1692
|
+
[attr.aria-activedescendant]="focused() ? focusedOptionId() : undefined"
|
|
1743
1693
|
(input)="onInput($event)"
|
|
1744
1694
|
(keydown)="onKeyDown($event)"
|
|
1745
1695
|
(change)="onInputChange($event)"
|
|
@@ -1750,24 +1700,24 @@ class AutoComplete extends BaseInput {
|
|
|
1750
1700
|
/>
|
|
1751
1701
|
</li>
|
|
1752
1702
|
</ul>
|
|
1753
|
-
<ng-container *ngIf="loading">
|
|
1754
|
-
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate() && !_loadingIconTemplate" [pBind]="ptm('loader')" [class]="cx('loader')" [spin]="true" [attr.aria-hidden]="true" />
|
|
1755
|
-
<span *ngIf="loadingIconTemplate() || _loadingIconTemplate" [pBind]="ptm('loader')" [class]="cx('loader')" [attr.aria-hidden]="true">
|
|
1756
|
-
<ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate"></ng-template>
|
|
1703
|
+
<ng-container *ngIf="loading()">
|
|
1704
|
+
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate() && !_loadingIconTemplate()" [pBind]="ptm('loader')" [class]="cx('loader')" [spin]="true" [attr.aria-hidden]="true" />
|
|
1705
|
+
<span *ngIf="loadingIconTemplate() || _loadingIconTemplate()" [pBind]="ptm('loader')" [class]="cx('loader')" [attr.aria-hidden]="true">
|
|
1706
|
+
<ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate()"></ng-template>
|
|
1757
1707
|
</span>
|
|
1758
1708
|
</ng-container>
|
|
1759
|
-
<button #ddBtn type="button" [pBind]="ptm('dropdown')" [attr.aria-label]="dropdownAriaLabel" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" *ngIf="dropdown" [attr.tabindex]="tabindex">
|
|
1760
|
-
<span *ngIf="dropdownIcon" [ngClass]="dropdownIcon" [attr.aria-hidden]="true"></span>
|
|
1761
|
-
<ng-container *ngIf="!dropdownIcon">
|
|
1762
|
-
<svg data-p-icon="chevron-down" [pBind]="ptm('dropdown')" *ngIf="!dropdownIconTemplate() && !_dropdownIconTemplate" />
|
|
1763
|
-
<ng-template *ngTemplateOutlet="dropdownIconTemplate() || _dropdownIconTemplate"></ng-template>
|
|
1709
|
+
<button #ddBtn type="button" [pBind]="ptm('dropdown')" [attr.aria-label]="dropdownAriaLabel()" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" *ngIf="dropdown()" [attr.tabindex]="tabindex()">
|
|
1710
|
+
<span *ngIf="dropdownIcon()" [ngClass]="dropdownIcon()" [attr.aria-hidden]="true"></span>
|
|
1711
|
+
<ng-container *ngIf="!dropdownIcon()">
|
|
1712
|
+
<svg data-p-icon="chevron-down" [pBind]="ptm('dropdown')" *ngIf="!dropdownIconTemplate() && !_dropdownIconTemplate()" />
|
|
1713
|
+
<ng-template *ngTemplateOutlet="dropdownIconTemplate() || _dropdownIconTemplate()"></ng-template>
|
|
1764
1714
|
</ng-container>
|
|
1765
1715
|
</button>
|
|
1766
1716
|
<p-overlay
|
|
1767
1717
|
#overlay
|
|
1768
1718
|
[hostAttrSelector]="$attrSelector"
|
|
1769
1719
|
[(visible)]="overlayVisible"
|
|
1770
|
-
[options]="overlayOptions"
|
|
1720
|
+
[options]="overlayOptions()"
|
|
1771
1721
|
[target]="'@parent'"
|
|
1772
1722
|
[appendTo]="$appendTo()"
|
|
1773
1723
|
[unstyled]="unstyled()"
|
|
@@ -1775,46 +1725,46 @@ class AutoComplete extends BaseInput {
|
|
|
1775
1725
|
[motionOptions]="motionOptions()"
|
|
1776
1726
|
(onBeforeEnter)="onOverlayBeforeEnter()"
|
|
1777
1727
|
(onHide)="hide()"
|
|
1778
|
-
[attr.data-p]="overlayDataP"
|
|
1728
|
+
[attr.data-p]="overlayDataP()"
|
|
1779
1729
|
>
|
|
1780
1730
|
<ng-template #content>
|
|
1781
|
-
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle">
|
|
1782
|
-
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
|
|
1783
|
-
<div [pBind]="ptm('listContainer')" [class]="cx('listContainer')" [style.max-height]="virtualScroll ? 'auto' : scrollHeight" [tabindex]="-1">
|
|
1731
|
+
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass())" [ngStyle]="panelStyle()">
|
|
1732
|
+
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
|
|
1733
|
+
<div [pBind]="ptm('listContainer')" [class]="cx('listContainer')" [style.max-height]="virtualScroll() ? 'auto' : scrollHeight()" [tabindex]="-1">
|
|
1784
1734
|
<p-scroller
|
|
1785
|
-
*ngIf="virtualScroll"
|
|
1735
|
+
*ngIf="virtualScroll()"
|
|
1786
1736
|
#scroller
|
|
1787
1737
|
[tabindex]="-1"
|
|
1788
1738
|
[pt]="ptm('virtualScroller')"
|
|
1789
1739
|
[items]="visibleOptions()"
|
|
1790
|
-
[style]="{ height: scrollHeight }"
|
|
1791
|
-
[itemSize]="virtualScrollItemSize"
|
|
1740
|
+
[style]="{ height: scrollHeight() }"
|
|
1741
|
+
[itemSize]="virtualScrollItemSize()"
|
|
1792
1742
|
[autoSize]="true"
|
|
1793
|
-
[lazy]="lazy"
|
|
1743
|
+
[lazy]="lazy()"
|
|
1794
1744
|
(onLazyLoad)="onLazyLoad.emit($event)"
|
|
1795
|
-
[options]="virtualScrollOptions"
|
|
1745
|
+
[options]="virtualScrollOptions()"
|
|
1796
1746
|
>
|
|
1797
1747
|
<ng-template #content let-items let-scrollerOptions="options">
|
|
1798
1748
|
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
|
|
1799
1749
|
</ng-template>
|
|
1800
|
-
<ng-container *ngIf="loaderTemplate() || _loaderTemplate">
|
|
1750
|
+
<ng-container *ngIf="loaderTemplate() || _loaderTemplate()">
|
|
1801
1751
|
<ng-template #loader let-scrollerOptions="options">
|
|
1802
|
-
<ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
|
|
1752
|
+
<ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate(); context: { options: scrollerOptions }"></ng-container>
|
|
1803
1753
|
</ng-template>
|
|
1804
1754
|
</ng-container>
|
|
1805
1755
|
</p-scroller>
|
|
1806
|
-
<ng-container *ngIf="!virtualScroll">
|
|
1756
|
+
<ng-container *ngIf="!virtualScroll()">
|
|
1807
1757
|
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: visibleOptions(), options: {} }"></ng-container>
|
|
1808
1758
|
</ng-container>
|
|
1809
1759
|
</div>
|
|
1810
1760
|
|
|
1811
1761
|
<ng-template #buildInItems let-items let-scrollerOptions="options">
|
|
1812
|
-
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="
|
|
1762
|
+
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="_id() + '_list'" [attr.aria-label]="listLabel()">
|
|
1813
1763
|
<ng-template ngFor let-option [ngForOf]="items" let-i="index">
|
|
1814
1764
|
<ng-container *ngIf="isOptionGroup(option)">
|
|
1815
|
-
<li [pBind]="ptm('optionGroup')" [attr.id]="
|
|
1816
|
-
<span *ngIf="!groupTemplate()">{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
1817
|
-
<ng-container *ngTemplateOutlet="groupTemplate(); context: { $implicit: option.optionGroup }"></ng-container>
|
|
1765
|
+
<li [pBind]="ptm('optionGroup')" [attr.id]="_id() + '_' + getOptionIndex(i, scrollerOptions)" [class]="cx('optionGroup')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
|
|
1766
|
+
<span *ngIf="!groupTemplate() && !_groupTemplate()">{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
1767
|
+
<ng-container *ngTemplateOutlet="groupTemplate() || _groupTemplate(); context: { $implicit: option.optionGroup }"></ng-container>
|
|
1818
1768
|
</li>
|
|
1819
1769
|
</ng-container>
|
|
1820
1770
|
<ng-container *ngIf="!isOptionGroup(option)">
|
|
@@ -1823,22 +1773,22 @@ class AutoComplete extends BaseInput {
|
|
|
1823
1773
|
[pBind]="getPTOptions(option, scrollerOptions, i, 'option')"
|
|
1824
1774
|
[ngStyle]="{ height: scrollerOptions.itemSize + 'px' }"
|
|
1825
1775
|
[class]="cx('option', { option, i, scrollerOptions })"
|
|
1826
|
-
[attr.id]="
|
|
1776
|
+
[attr.id]="_id() + '_' + getOptionIndex(i, scrollerOptions)"
|
|
1827
1777
|
role="option"
|
|
1828
1778
|
[attr.aria-label]="getOptionLabel(option)"
|
|
1829
1779
|
[attr.aria-selected]="isSelected(option)"
|
|
1830
1780
|
[attr.data-p-selected]="isSelected(option)"
|
|
1831
1781
|
[attr.aria-disabled]="isOptionDisabled(option)"
|
|
1832
1782
|
[attr.data-p-focused]="focusedOptionIndex() === getOptionIndex(i, scrollerOptions)"
|
|
1833
|
-
[attr.aria-setsize]="ariaSetSize"
|
|
1783
|
+
[attr.aria-setsize]="ariaSetSize()"
|
|
1834
1784
|
[attr.aria-posinset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
|
|
1835
1785
|
(click)="onOptionSelect($event, option)"
|
|
1836
1786
|
(mouseenter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
|
|
1837
1787
|
>
|
|
1838
|
-
<span *ngIf="!itemTemplate() && !_itemTemplate">{{ getOptionLabel(option) }}</span>
|
|
1788
|
+
<span *ngIf="!itemTemplate() && !_itemTemplate()">{{ getOptionLabel(option) }}</span>
|
|
1839
1789
|
<ng-container
|
|
1840
1790
|
*ngTemplateOutlet="
|
|
1841
|
-
itemTemplate() || _itemTemplate;
|
|
1791
|
+
itemTemplate() || _itemTemplate();
|
|
1842
1792
|
context: {
|
|
1843
1793
|
$implicit: option,
|
|
1844
1794
|
index: scrollerOptions.getOptions ? scrollerOptions.getOptions(i) : i
|
|
@@ -1848,47 +1798,46 @@ class AutoComplete extends BaseInput {
|
|
|
1848
1798
|
</li>
|
|
1849
1799
|
</ng-container>
|
|
1850
1800
|
</ng-template>
|
|
1851
|
-
<li *ngIf="!items || (items && items.length === 0 && showEmptyMessage)" [pBind]="ptm('emptyMessage')" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
|
|
1852
|
-
<ng-container *ngIf="!emptyTemplate() && !_emptyTemplate; else empty">
|
|
1853
|
-
{{ searchResultMessageText }}
|
|
1801
|
+
<li *ngIf="!items || (items && items.length === 0 && showEmptyMessage())" [pBind]="ptm('emptyMessage')" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
|
|
1802
|
+
<ng-container *ngIf="!emptyTemplate() && !_emptyTemplate(); else empty">
|
|
1803
|
+
{{ searchResultMessageText() }}
|
|
1854
1804
|
</ng-container>
|
|
1855
|
-
<ng-container #empty *ngTemplateOutlet="emptyTemplate() || _emptyTemplate"></ng-container>
|
|
1805
|
+
<ng-container #empty *ngTemplateOutlet="emptyTemplate() || _emptyTemplate()"></ng-container>
|
|
1856
1806
|
</li>
|
|
1857
1807
|
</ul>
|
|
1858
1808
|
</ng-template>
|
|
1859
|
-
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
|
|
1809
|
+
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
|
|
1860
1810
|
</div>
|
|
1861
1811
|
<span role="status" aria-live="polite" class="p-hidden-accessible">
|
|
1862
|
-
{{ selectedMessageText }}
|
|
1812
|
+
{{ selectedMessageText() }}
|
|
1863
1813
|
</span>
|
|
1864
1814
|
</ng-template>
|
|
1865
1815
|
</p-overlay>
|
|
1866
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: TimesCircleIcon, selector: "[data-p-icon=\"times-circle\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "
|
|
1816
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: TimesCircleIcon, selector: "[data-p-icon=\"times-circle\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1867
1817
|
}
|
|
1868
1818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoComplete, decorators: [{
|
|
1869
1819
|
type: Component,
|
|
1870
1820
|
args: [{
|
|
1871
1821
|
selector: 'p-autoComplete, p-autocomplete, p-auto-complete',
|
|
1872
|
-
standalone: true,
|
|
1873
1822
|
imports: [CommonModule, Overlay, InputText, Ripple, Scroller, AutoFocus, TimesCircleIcon, SpinnerIcon, ChevronDownIcon, Chip, SharedModule, TimesIcon, BindModule],
|
|
1874
1823
|
template: `
|
|
1875
1824
|
<input
|
|
1876
|
-
*ngIf="!multiple"
|
|
1825
|
+
*ngIf="!multiple()"
|
|
1877
1826
|
#focusInput
|
|
1878
|
-
[pAutoFocus]="autofocus"
|
|
1827
|
+
[pAutoFocus]="autofocus()"
|
|
1879
1828
|
pInputText
|
|
1880
1829
|
[pt]="ptm('pcInputText')"
|
|
1881
|
-
[class]="cn(cx('pcInputText'), inputStyleClass)"
|
|
1882
|
-
[ngStyle]="inputStyle"
|
|
1883
|
-
[attr.type]="type"
|
|
1830
|
+
[class]="cn(cx('pcInputText'), inputStyleClass())"
|
|
1831
|
+
[ngStyle]="inputStyle()"
|
|
1832
|
+
[attr.type]="type()"
|
|
1884
1833
|
[attr.value]="inputValue()"
|
|
1885
1834
|
[variant]="$variant()"
|
|
1886
1835
|
[invalid]="invalid()"
|
|
1887
|
-
[attr.id]="inputId"
|
|
1888
|
-
[attr.autocomplete]="autocomplete"
|
|
1836
|
+
[attr.id]="inputId()"
|
|
1837
|
+
[attr.autocomplete]="autocomplete()"
|
|
1889
1838
|
aria-autocomplete="list"
|
|
1890
1839
|
role="combobox"
|
|
1891
|
-
[attr.placeholder]="placeholder"
|
|
1840
|
+
[attr.placeholder]="placeholder()"
|
|
1892
1841
|
[attr.name]="name()"
|
|
1893
1842
|
[attr.minlength]="minlength()"
|
|
1894
1843
|
[pSize]="size()"
|
|
@@ -1897,16 +1846,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1897
1846
|
[attr.pattern]="pattern()"
|
|
1898
1847
|
[attr.size]="inputSize()"
|
|
1899
1848
|
[attr.maxlength]="maxlength()"
|
|
1900
|
-
[attr.tabindex]="!$disabled() ? tabindex : -1"
|
|
1849
|
+
[attr.tabindex]="!$disabled() ? tabindex() : -1"
|
|
1901
1850
|
[attr.required]="required() ? '' : undefined"
|
|
1902
|
-
[attr.readonly]="readonly ? '' : undefined"
|
|
1851
|
+
[attr.readonly]="readonly() ? '' : undefined"
|
|
1903
1852
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
1904
|
-
[attr.aria-label]="ariaLabel"
|
|
1905
|
-
[attr.aria-labelledby]="ariaLabelledBy"
|
|
1853
|
+
[attr.aria-label]="ariaLabel()"
|
|
1854
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1906
1855
|
[attr.aria-required]="required()"
|
|
1907
|
-
[attr.aria-expanded]="overlayVisible ?? false"
|
|
1908
|
-
[attr.aria-controls]="overlayVisible ?
|
|
1909
|
-
[attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
|
|
1856
|
+
[attr.aria-expanded]="overlayVisible() ?? false"
|
|
1857
|
+
[attr.aria-controls]="overlayVisible() ? _id() + '_list' : null"
|
|
1858
|
+
[attr.aria-activedescendant]="focused() ? focusedOptionId() : undefined"
|
|
1910
1859
|
(input)="onInput($event)"
|
|
1911
1860
|
(keydown)="onKeyDown($event)"
|
|
1912
1861
|
(change)="onInputChange($event)"
|
|
@@ -1917,23 +1866,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1917
1866
|
[fluid]="hasFluid"
|
|
1918
1867
|
[pInputTextUnstyled]="unstyled()"
|
|
1919
1868
|
/>
|
|
1920
|
-
<ng-container *ngIf="$filled() && !$disabled() && showClear && !loading">
|
|
1921
|
-
<svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
|
|
1922
|
-
<span *ngIf="clearIconTemplate() || _clearIconTemplate" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true">
|
|
1923
|
-
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
|
|
1869
|
+
<ng-container *ngIf="$filled() && !$disabled() && showClear() && !loading()">
|
|
1870
|
+
<svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate()" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
|
|
1871
|
+
<span *ngIf="clearIconTemplate() || _clearIconTemplate()" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true">
|
|
1872
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
|
|
1924
1873
|
</span>
|
|
1925
1874
|
</ng-container>
|
|
1926
1875
|
|
|
1927
1876
|
<ul
|
|
1928
|
-
*ngIf="multiple"
|
|
1877
|
+
*ngIf="multiple()"
|
|
1929
1878
|
#multiContainer
|
|
1930
1879
|
[pBind]="ptm('inputMultiple')"
|
|
1931
1880
|
[class]="cx('inputMultiple')"
|
|
1932
|
-
[attr.data-p]="inputMultipleDataP"
|
|
1881
|
+
[attr.data-p]="inputMultipleDataP()"
|
|
1933
1882
|
[tabindex]="-1"
|
|
1934
1883
|
role="listbox"
|
|
1935
1884
|
[attr.aria-orientation]="'horizontal'"
|
|
1936
|
-
[attr.aria-activedescendant]="focused ? focusedMultipleOptionId : undefined"
|
|
1885
|
+
[attr.aria-activedescendant]="focused() ? focusedMultipleOptionId() : undefined"
|
|
1937
1886
|
(focus)="onMultipleContainerFocus($event)"
|
|
1938
1887
|
(blur)="onMultipleContainerBlur($event)"
|
|
1939
1888
|
(keydown)="onMultipleContainerKeyDown($event)"
|
|
@@ -1943,7 +1892,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1943
1892
|
*ngFor="let option of modelValue(); let i = index"
|
|
1944
1893
|
[pBind]="ptm('chipItem')"
|
|
1945
1894
|
[class]="cx('chipItem', { i })"
|
|
1946
|
-
[attr.id]="
|
|
1895
|
+
[attr.id]="_id() + '_multiple_option_' + i"
|
|
1947
1896
|
role="option"
|
|
1948
1897
|
[attr.aria-label]="getOptionLabel(option)"
|
|
1949
1898
|
[attr.aria-setsize]="modelValue().length"
|
|
@@ -1953,19 +1902,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1953
1902
|
<p-chip
|
|
1954
1903
|
[pt]="ptm('pcChip')"
|
|
1955
1904
|
[class]="cx('pcChip')"
|
|
1956
|
-
[label]="!selectedItemTemplate() && !_selectedItemTemplate && getOptionLabel(option)"
|
|
1905
|
+
[label]="!selectedItemTemplate() && !_selectedItemTemplate() && getOptionLabel(option)"
|
|
1957
1906
|
[disabled]="$disabled()"
|
|
1958
1907
|
[removable]="true"
|
|
1959
|
-
(onRemove)="!readonly ? removeOption($event, i) : ''"
|
|
1908
|
+
(onRemove)="!readonly() ? removeOption($event, i) : ''"
|
|
1960
1909
|
[unstyled]="unstyled()"
|
|
1961
1910
|
>
|
|
1962
|
-
<ng-container *ngTemplateOutlet="selectedItemTemplate() || _selectedItemTemplate; context: { $implicit: option }"></ng-container>
|
|
1911
|
+
<ng-container *ngTemplateOutlet="selectedItemTemplate() || _selectedItemTemplate(); context: { $implicit: option }"></ng-container>
|
|
1963
1912
|
<ng-template #removeicon>
|
|
1964
|
-
<span *ngIf="!removeIconTemplate() && !_removeIconTemplate" [pBind]="ptm('chipIcon')" [class]="cx('chipIcon')" (click)="!readonly && !$disabled() ? removeOption($event, i) : ''">
|
|
1913
|
+
<span *ngIf="!removeIconTemplate() && !_removeIconTemplate()" [pBind]="ptm('chipIcon')" [class]="cx('chipIcon')" (click)="!readonly() && !$disabled() ? removeOption($event, i) : ''">
|
|
1965
1914
|
<svg data-p-icon="times-circle" [class]="cx('chipIcon')" [attr.aria-hidden]="true" />
|
|
1966
1915
|
</span>
|
|
1967
|
-
<span *ngIf="removeIconTemplate() || _removeIconTemplate" [pBind]="ptm('chipIcon')" [attr.aria-hidden]="true">
|
|
1968
|
-
<ng-template *ngTemplateOutlet="removeIconTemplate() || _removeIconTemplate; context: { removeCallback: removeOption.bind(this), index: i, class: cx('chipIcon') }"></ng-template>
|
|
1916
|
+
<span *ngIf="removeIconTemplate() || _removeIconTemplate()" [pBind]="ptm('chipIcon')" [attr.aria-hidden]="true">
|
|
1917
|
+
<ng-template *ngTemplateOutlet="removeIconTemplate() || _removeIconTemplate(); context: { removeCallback: removeOption.bind(this), index: i, class: cx('chipIcon') }"></ng-template>
|
|
1969
1918
|
</span>
|
|
1970
1919
|
</ng-template>
|
|
1971
1920
|
</p-chip>
|
|
@@ -1974,13 +1923,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1974
1923
|
<input
|
|
1975
1924
|
#focusInput
|
|
1976
1925
|
#multiIn
|
|
1977
|
-
[pAutoFocus]="autofocus"
|
|
1926
|
+
[pAutoFocus]="autofocus()"
|
|
1978
1927
|
[pBind]="ptm('input')"
|
|
1979
1928
|
[class]="cx('pcInputText')"
|
|
1980
|
-
[ngStyle]="inputStyle"
|
|
1981
|
-
[attr.type]="type"
|
|
1982
|
-
[attr.id]="inputId"
|
|
1983
|
-
[attr.autocomplete]="autocomplete"
|
|
1929
|
+
[ngStyle]="inputStyle()"
|
|
1930
|
+
[attr.type]="type()"
|
|
1931
|
+
[attr.id]="inputId()"
|
|
1932
|
+
[attr.autocomplete]="autocomplete()"
|
|
1984
1933
|
[attr.name]="name()"
|
|
1985
1934
|
[attr.minlength]="minlength()"
|
|
1986
1935
|
[attr.maxlength]="maxlength()"
|
|
@@ -1989,18 +1938,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1989
1938
|
[attr.max]="max()"
|
|
1990
1939
|
[attr.pattern]="pattern()"
|
|
1991
1940
|
role="combobox"
|
|
1992
|
-
[attr.placeholder]="!$filled() ? placeholder : null"
|
|
1941
|
+
[attr.placeholder]="!$filled() ? placeholder() : null"
|
|
1993
1942
|
aria-autocomplete="list"
|
|
1994
|
-
[attr.tabindex]="!$disabled() ? tabindex : -1"
|
|
1943
|
+
[attr.tabindex]="!$disabled() ? tabindex() : -1"
|
|
1995
1944
|
[attr.required]="required() ? '' : undefined"
|
|
1996
|
-
[attr.readonly]="readonly ? '' : undefined"
|
|
1945
|
+
[attr.readonly]="readonly() ? '' : undefined"
|
|
1997
1946
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
1998
|
-
[attr.aria-label]="ariaLabel"
|
|
1999
|
-
[attr.aria-labelledby]="ariaLabelledBy"
|
|
1947
|
+
[attr.aria-label]="ariaLabel()"
|
|
1948
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
2000
1949
|
[attr.aria-required]="required()"
|
|
2001
|
-
[attr.aria-expanded]="overlayVisible ?? false"
|
|
2002
|
-
[attr.aria-controls]="overlayVisible ?
|
|
2003
|
-
[attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
|
|
1950
|
+
[attr.aria-expanded]="overlayVisible() ?? false"
|
|
1951
|
+
[attr.aria-controls]="overlayVisible() ? _id() + '_list' : null"
|
|
1952
|
+
[attr.aria-activedescendant]="focused() ? focusedOptionId() : undefined"
|
|
2004
1953
|
(input)="onInput($event)"
|
|
2005
1954
|
(keydown)="onKeyDown($event)"
|
|
2006
1955
|
(change)="onInputChange($event)"
|
|
@@ -2011,24 +1960,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
2011
1960
|
/>
|
|
2012
1961
|
</li>
|
|
2013
1962
|
</ul>
|
|
2014
|
-
<ng-container *ngIf="loading">
|
|
2015
|
-
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate() && !_loadingIconTemplate" [pBind]="ptm('loader')" [class]="cx('loader')" [spin]="true" [attr.aria-hidden]="true" />
|
|
2016
|
-
<span *ngIf="loadingIconTemplate() || _loadingIconTemplate" [pBind]="ptm('loader')" [class]="cx('loader')" [attr.aria-hidden]="true">
|
|
2017
|
-
<ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate"></ng-template>
|
|
1963
|
+
<ng-container *ngIf="loading()">
|
|
1964
|
+
<svg data-p-icon="spinner" *ngIf="!loadingIconTemplate() && !_loadingIconTemplate()" [pBind]="ptm('loader')" [class]="cx('loader')" [spin]="true" [attr.aria-hidden]="true" />
|
|
1965
|
+
<span *ngIf="loadingIconTemplate() || _loadingIconTemplate()" [pBind]="ptm('loader')" [class]="cx('loader')" [attr.aria-hidden]="true">
|
|
1966
|
+
<ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate()"></ng-template>
|
|
2018
1967
|
</span>
|
|
2019
1968
|
</ng-container>
|
|
2020
|
-
<button #ddBtn type="button" [pBind]="ptm('dropdown')" [attr.aria-label]="dropdownAriaLabel" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" *ngIf="dropdown" [attr.tabindex]="tabindex">
|
|
2021
|
-
<span *ngIf="dropdownIcon" [ngClass]="dropdownIcon" [attr.aria-hidden]="true"></span>
|
|
2022
|
-
<ng-container *ngIf="!dropdownIcon">
|
|
2023
|
-
<svg data-p-icon="chevron-down" [pBind]="ptm('dropdown')" *ngIf="!dropdownIconTemplate() && !_dropdownIconTemplate" />
|
|
2024
|
-
<ng-template *ngTemplateOutlet="dropdownIconTemplate() || _dropdownIconTemplate"></ng-template>
|
|
1969
|
+
<button #ddBtn type="button" [pBind]="ptm('dropdown')" [attr.aria-label]="dropdownAriaLabel()" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" *ngIf="dropdown()" [attr.tabindex]="tabindex()">
|
|
1970
|
+
<span *ngIf="dropdownIcon()" [ngClass]="dropdownIcon()" [attr.aria-hidden]="true"></span>
|
|
1971
|
+
<ng-container *ngIf="!dropdownIcon()">
|
|
1972
|
+
<svg data-p-icon="chevron-down" [pBind]="ptm('dropdown')" *ngIf="!dropdownIconTemplate() && !_dropdownIconTemplate()" />
|
|
1973
|
+
<ng-template *ngTemplateOutlet="dropdownIconTemplate() || _dropdownIconTemplate()"></ng-template>
|
|
2025
1974
|
</ng-container>
|
|
2026
1975
|
</button>
|
|
2027
1976
|
<p-overlay
|
|
2028
1977
|
#overlay
|
|
2029
1978
|
[hostAttrSelector]="$attrSelector"
|
|
2030
1979
|
[(visible)]="overlayVisible"
|
|
2031
|
-
[options]="overlayOptions"
|
|
1980
|
+
[options]="overlayOptions()"
|
|
2032
1981
|
[target]="'@parent'"
|
|
2033
1982
|
[appendTo]="$appendTo()"
|
|
2034
1983
|
[unstyled]="unstyled()"
|
|
@@ -2036,46 +1985,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
2036
1985
|
[motionOptions]="motionOptions()"
|
|
2037
1986
|
(onBeforeEnter)="onOverlayBeforeEnter()"
|
|
2038
1987
|
(onHide)="hide()"
|
|
2039
|
-
[attr.data-p]="overlayDataP"
|
|
1988
|
+
[attr.data-p]="overlayDataP()"
|
|
2040
1989
|
>
|
|
2041
1990
|
<ng-template #content>
|
|
2042
|
-
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle">
|
|
2043
|
-
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
|
|
2044
|
-
<div [pBind]="ptm('listContainer')" [class]="cx('listContainer')" [style.max-height]="virtualScroll ? 'auto' : scrollHeight" [tabindex]="-1">
|
|
1991
|
+
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass())" [ngStyle]="panelStyle()">
|
|
1992
|
+
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
|
|
1993
|
+
<div [pBind]="ptm('listContainer')" [class]="cx('listContainer')" [style.max-height]="virtualScroll() ? 'auto' : scrollHeight()" [tabindex]="-1">
|
|
2045
1994
|
<p-scroller
|
|
2046
|
-
*ngIf="virtualScroll"
|
|
1995
|
+
*ngIf="virtualScroll()"
|
|
2047
1996
|
#scroller
|
|
2048
1997
|
[tabindex]="-1"
|
|
2049
1998
|
[pt]="ptm('virtualScroller')"
|
|
2050
1999
|
[items]="visibleOptions()"
|
|
2051
|
-
[style]="{ height: scrollHeight }"
|
|
2052
|
-
[itemSize]="virtualScrollItemSize"
|
|
2000
|
+
[style]="{ height: scrollHeight() }"
|
|
2001
|
+
[itemSize]="virtualScrollItemSize()"
|
|
2053
2002
|
[autoSize]="true"
|
|
2054
|
-
[lazy]="lazy"
|
|
2003
|
+
[lazy]="lazy()"
|
|
2055
2004
|
(onLazyLoad)="onLazyLoad.emit($event)"
|
|
2056
|
-
[options]="virtualScrollOptions"
|
|
2005
|
+
[options]="virtualScrollOptions()"
|
|
2057
2006
|
>
|
|
2058
2007
|
<ng-template #content let-items let-scrollerOptions="options">
|
|
2059
2008
|
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
|
|
2060
2009
|
</ng-template>
|
|
2061
|
-
<ng-container *ngIf="loaderTemplate() || _loaderTemplate">
|
|
2010
|
+
<ng-container *ngIf="loaderTemplate() || _loaderTemplate()">
|
|
2062
2011
|
<ng-template #loader let-scrollerOptions="options">
|
|
2063
|
-
<ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
|
|
2012
|
+
<ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate(); context: { options: scrollerOptions }"></ng-container>
|
|
2064
2013
|
</ng-template>
|
|
2065
2014
|
</ng-container>
|
|
2066
2015
|
</p-scroller>
|
|
2067
|
-
<ng-container *ngIf="!virtualScroll">
|
|
2016
|
+
<ng-container *ngIf="!virtualScroll()">
|
|
2068
2017
|
<ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: visibleOptions(), options: {} }"></ng-container>
|
|
2069
2018
|
</ng-container>
|
|
2070
2019
|
</div>
|
|
2071
2020
|
|
|
2072
2021
|
<ng-template #buildInItems let-items let-scrollerOptions="options">
|
|
2073
|
-
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="
|
|
2022
|
+
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="_id() + '_list'" [attr.aria-label]="listLabel()">
|
|
2074
2023
|
<ng-template ngFor let-option [ngForOf]="items" let-i="index">
|
|
2075
2024
|
<ng-container *ngIf="isOptionGroup(option)">
|
|
2076
|
-
<li [pBind]="ptm('optionGroup')" [attr.id]="
|
|
2077
|
-
<span *ngIf="!groupTemplate()">{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
2078
|
-
<ng-container *ngTemplateOutlet="groupTemplate(); context: { $implicit: option.optionGroup }"></ng-container>
|
|
2025
|
+
<li [pBind]="ptm('optionGroup')" [attr.id]="_id() + '_' + getOptionIndex(i, scrollerOptions)" [class]="cx('optionGroup')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
|
|
2026
|
+
<span *ngIf="!groupTemplate() && !_groupTemplate()">{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
2027
|
+
<ng-container *ngTemplateOutlet="groupTemplate() || _groupTemplate(); context: { $implicit: option.optionGroup }"></ng-container>
|
|
2079
2028
|
</li>
|
|
2080
2029
|
</ng-container>
|
|
2081
2030
|
<ng-container *ngIf="!isOptionGroup(option)">
|
|
@@ -2084,22 +2033,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
2084
2033
|
[pBind]="getPTOptions(option, scrollerOptions, i, 'option')"
|
|
2085
2034
|
[ngStyle]="{ height: scrollerOptions.itemSize + 'px' }"
|
|
2086
2035
|
[class]="cx('option', { option, i, scrollerOptions })"
|
|
2087
|
-
[attr.id]="
|
|
2036
|
+
[attr.id]="_id() + '_' + getOptionIndex(i, scrollerOptions)"
|
|
2088
2037
|
role="option"
|
|
2089
2038
|
[attr.aria-label]="getOptionLabel(option)"
|
|
2090
2039
|
[attr.aria-selected]="isSelected(option)"
|
|
2091
2040
|
[attr.data-p-selected]="isSelected(option)"
|
|
2092
2041
|
[attr.aria-disabled]="isOptionDisabled(option)"
|
|
2093
2042
|
[attr.data-p-focused]="focusedOptionIndex() === getOptionIndex(i, scrollerOptions)"
|
|
2094
|
-
[attr.aria-setsize]="ariaSetSize"
|
|
2043
|
+
[attr.aria-setsize]="ariaSetSize()"
|
|
2095
2044
|
[attr.aria-posinset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
|
|
2096
2045
|
(click)="onOptionSelect($event, option)"
|
|
2097
2046
|
(mouseenter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
|
|
2098
2047
|
>
|
|
2099
|
-
<span *ngIf="!itemTemplate() && !_itemTemplate">{{ getOptionLabel(option) }}</span>
|
|
2048
|
+
<span *ngIf="!itemTemplate() && !_itemTemplate()">{{ getOptionLabel(option) }}</span>
|
|
2100
2049
|
<ng-container
|
|
2101
2050
|
*ngTemplateOutlet="
|
|
2102
|
-
itemTemplate() || _itemTemplate;
|
|
2051
|
+
itemTemplate() || _itemTemplate();
|
|
2103
2052
|
context: {
|
|
2104
2053
|
$implicit: option,
|
|
2105
2054
|
index: scrollerOptions.getOptions ? scrollerOptions.getOptions(i) : i
|
|
@@ -2109,18 +2058,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
2109
2058
|
</li>
|
|
2110
2059
|
</ng-container>
|
|
2111
2060
|
</ng-template>
|
|
2112
|
-
<li *ngIf="!items || (items && items.length === 0 && showEmptyMessage)" [pBind]="ptm('emptyMessage')" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
|
|
2113
|
-
<ng-container *ngIf="!emptyTemplate() && !_emptyTemplate; else empty">
|
|
2114
|
-
{{ searchResultMessageText }}
|
|
2061
|
+
<li *ngIf="!items || (items && items.length === 0 && showEmptyMessage())" [pBind]="ptm('emptyMessage')" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
|
|
2062
|
+
<ng-container *ngIf="!emptyTemplate() && !_emptyTemplate(); else empty">
|
|
2063
|
+
{{ searchResultMessageText() }}
|
|
2115
2064
|
</ng-container>
|
|
2116
|
-
<ng-container #empty *ngTemplateOutlet="emptyTemplate() || _emptyTemplate"></ng-container>
|
|
2065
|
+
<ng-container #empty *ngTemplateOutlet="emptyTemplate() || _emptyTemplate()"></ng-container>
|
|
2117
2066
|
</li>
|
|
2118
2067
|
</ul>
|
|
2119
2068
|
</ng-template>
|
|
2120
|
-
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
|
|
2069
|
+
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
|
|
2121
2070
|
</div>
|
|
2122
2071
|
<span role="status" aria-live="polite" class="p-hidden-accessible">
|
|
2123
|
-
{{ selectedMessageText }}
|
|
2072
|
+
{{ selectedMessageText() }}
|
|
2124
2073
|
</span>
|
|
2125
2074
|
</ng-template>
|
|
2126
2075
|
</p-overlay>
|
|
@@ -2129,161 +2078,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
2129
2078
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2130
2079
|
encapsulation: ViewEncapsulation.None,
|
|
2131
2080
|
host: {
|
|
2132
|
-
'[class]': "
|
|
2081
|
+
'[class]': "cx('root')",
|
|
2133
2082
|
'[style]': "sx('root')",
|
|
2134
|
-
'[attr.data-p]': 'containerDataP'
|
|
2083
|
+
'[attr.data-p]': 'containerDataP()',
|
|
2084
|
+
'(click)': 'onHostClick($event)'
|
|
2135
2085
|
},
|
|
2136
2086
|
hostDirectives: [Bind]
|
|
2137
2087
|
}]
|
|
2138
|
-
}], propDecorators: {
|
|
2139
|
-
type: Input,
|
|
2140
|
-
args: [{ transform: numberAttribute }]
|
|
2141
|
-
}], minQueryLength: [{
|
|
2142
|
-
type: Input,
|
|
2143
|
-
args: [{ transform: numberAttribute }]
|
|
2144
|
-
}], delay: [{
|
|
2145
|
-
type: Input,
|
|
2146
|
-
args: [{ transform: numberAttribute }]
|
|
2147
|
-
}], panelStyle: [{
|
|
2148
|
-
type: Input
|
|
2149
|
-
}], styleClass: [{
|
|
2150
|
-
type: Input
|
|
2151
|
-
}], panelStyleClass: [{
|
|
2152
|
-
type: Input
|
|
2153
|
-
}], inputStyle: [{
|
|
2154
|
-
type: Input
|
|
2155
|
-
}], inputId: [{
|
|
2156
|
-
type: Input
|
|
2157
|
-
}], inputStyleClass: [{
|
|
2158
|
-
type: Input
|
|
2159
|
-
}], placeholder: [{
|
|
2160
|
-
type: Input
|
|
2161
|
-
}], readonly: [{
|
|
2162
|
-
type: Input,
|
|
2163
|
-
args: [{ transform: booleanAttribute }]
|
|
2164
|
-
}], scrollHeight: [{
|
|
2165
|
-
type: Input
|
|
2166
|
-
}], lazy: [{
|
|
2167
|
-
type: Input,
|
|
2168
|
-
args: [{ transform: booleanAttribute }]
|
|
2169
|
-
}], virtualScroll: [{
|
|
2170
|
-
type: Input,
|
|
2171
|
-
args: [{ transform: booleanAttribute }]
|
|
2172
|
-
}], virtualScrollItemSize: [{
|
|
2173
|
-
type: Input,
|
|
2174
|
-
args: [{ transform: numberAttribute }]
|
|
2175
|
-
}], virtualScrollOptions: [{
|
|
2176
|
-
type: Input
|
|
2177
|
-
}], autoHighlight: [{
|
|
2178
|
-
type: Input,
|
|
2179
|
-
args: [{ transform: booleanAttribute }]
|
|
2180
|
-
}], forceSelection: [{
|
|
2181
|
-
type: Input,
|
|
2182
|
-
args: [{ transform: booleanAttribute }]
|
|
2183
|
-
}], type: [{
|
|
2184
|
-
type: Input
|
|
2185
|
-
}], autoZIndex: [{
|
|
2186
|
-
type: Input,
|
|
2187
|
-
args: [{ transform: booleanAttribute }]
|
|
2188
|
-
}], baseZIndex: [{
|
|
2189
|
-
type: Input,
|
|
2190
|
-
args: [{ transform: numberAttribute }]
|
|
2191
|
-
}], ariaLabel: [{
|
|
2192
|
-
type: Input
|
|
2193
|
-
}], dropdownAriaLabel: [{
|
|
2194
|
-
type: Input
|
|
2195
|
-
}], ariaLabelledBy: [{
|
|
2196
|
-
type: Input
|
|
2197
|
-
}], dropdownIcon: [{
|
|
2198
|
-
type: Input
|
|
2199
|
-
}], unique: [{
|
|
2200
|
-
type: Input,
|
|
2201
|
-
args: [{ transform: booleanAttribute }]
|
|
2202
|
-
}], group: [{
|
|
2203
|
-
type: Input,
|
|
2204
|
-
args: [{ transform: booleanAttribute }]
|
|
2205
|
-
}], completeOnFocus: [{
|
|
2206
|
-
type: Input,
|
|
2207
|
-
args: [{ transform: booleanAttribute }]
|
|
2208
|
-
}], showClear: [{
|
|
2209
|
-
type: Input,
|
|
2210
|
-
args: [{ transform: booleanAttribute }]
|
|
2211
|
-
}], dropdown: [{
|
|
2212
|
-
type: Input,
|
|
2213
|
-
args: [{ transform: booleanAttribute }]
|
|
2214
|
-
}], showEmptyMessage: [{
|
|
2215
|
-
type: Input,
|
|
2216
|
-
args: [{ transform: booleanAttribute }]
|
|
2217
|
-
}], dropdownMode: [{
|
|
2218
|
-
type: Input
|
|
2219
|
-
}], multiple: [{
|
|
2220
|
-
type: Input,
|
|
2221
|
-
args: [{ transform: booleanAttribute }]
|
|
2222
|
-
}], addOnTab: [{
|
|
2223
|
-
type: Input,
|
|
2224
|
-
args: [{ transform: booleanAttribute }]
|
|
2225
|
-
}], tabindex: [{
|
|
2226
|
-
type: Input,
|
|
2227
|
-
args: [{ transform: numberAttribute }]
|
|
2228
|
-
}], dataKey: [{
|
|
2229
|
-
type: Input
|
|
2230
|
-
}], emptyMessage: [{
|
|
2231
|
-
type: Input
|
|
2232
|
-
}], showTransitionOptions: [{
|
|
2233
|
-
type: Input
|
|
2234
|
-
}], hideTransitionOptions: [{
|
|
2235
|
-
type: Input
|
|
2236
|
-
}], autofocus: [{
|
|
2237
|
-
type: Input,
|
|
2238
|
-
args: [{ transform: booleanAttribute }]
|
|
2239
|
-
}], autocomplete: [{
|
|
2240
|
-
type: Input
|
|
2241
|
-
}], optionGroupChildren: [{
|
|
2242
|
-
type: Input
|
|
2243
|
-
}], optionGroupLabel: [{
|
|
2244
|
-
type: Input
|
|
2245
|
-
}], overlayOptions: [{
|
|
2246
|
-
type: Input
|
|
2247
|
-
}], suggestions: [{
|
|
2248
|
-
type: Input
|
|
2249
|
-
}], optionLabel: [{
|
|
2250
|
-
type: Input
|
|
2251
|
-
}], optionValue: [{
|
|
2252
|
-
type: Input
|
|
2253
|
-
}], id: [{
|
|
2254
|
-
type: Input
|
|
2255
|
-
}], searchMessage: [{
|
|
2256
|
-
type: Input
|
|
2257
|
-
}], emptySelectionMessage: [{
|
|
2258
|
-
type: Input
|
|
2259
|
-
}], selectionMessage: [{
|
|
2260
|
-
type: Input
|
|
2261
|
-
}], autoOptionFocus: [{
|
|
2262
|
-
type: Input,
|
|
2263
|
-
args: [{ transform: booleanAttribute }]
|
|
2264
|
-
}], selectOnFocus: [{
|
|
2265
|
-
type: Input,
|
|
2266
|
-
args: [{ transform: booleanAttribute }]
|
|
2267
|
-
}], searchLocale: [{
|
|
2268
|
-
type: Input,
|
|
2269
|
-
args: [{ transform: booleanAttribute }]
|
|
2270
|
-
}], optionDisabled: [{
|
|
2271
|
-
type: Input
|
|
2272
|
-
}], focusOnHover: [{
|
|
2273
|
-
type: Input,
|
|
2274
|
-
args: [{ transform: booleanAttribute }]
|
|
2275
|
-
}], typeahead: [{
|
|
2276
|
-
type: Input,
|
|
2277
|
-
args: [{ transform: booleanAttribute }]
|
|
2278
|
-
}], addOnBlur: [{
|
|
2279
|
-
type: Input,
|
|
2280
|
-
args: [{ transform: booleanAttribute }]
|
|
2281
|
-
}], separator: [{
|
|
2282
|
-
type: Input
|
|
2283
|
-
}], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onUnselect: [{ type: i0.Output, args: ["onUnselect"] }], onAdd: [{ type: i0.Output, args: ["onAdd"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onDropdownClick: [{ type: i0.Output, args: ["onDropdownClick"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onInputKeydown: [{ type: i0.Output, args: ["onInputKeydown"] }], onKeyUp: [{ type: i0.Output, args: ["onKeyUp"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], inputEL: [{ type: i0.ViewChild, args: ['focusInput', { isSignal: true }] }], multiInputEl: [{ type: i0.ViewChild, args: ['multiIn', { isSignal: true }] }], multiContainerEL: [{ type: i0.ViewChild, args: ['multiContainer', { isSignal: true }] }], dropdownButton: [{ type: i0.ViewChild, args: ['ddBtn', { isSignal: true }] }], itemsViewChild: [{ type: i0.ViewChild, args: ['items', { isSignal: true }] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], overlayViewChild: [{ type: i0.ViewChild, args: ['overlay', { isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selecteditem', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], removeIconTemplate: [{ type: i0.ContentChild, args: ['removeicon', { isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { isSignal: true }] }], dropdownIconTemplate: [{ type: i0.ContentChild, args: ['dropdownicon', { isSignal: true }] }], onHostClick: [{
|
|
2284
|
-
type: HostListener,
|
|
2285
|
-
args: ['click', ['$event']]
|
|
2286
|
-
}], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
2088
|
+
}], ctorParameters: () => [], propDecorators: { minQueryLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minQueryLength", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyleClass", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], virtualScrollOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollOptions", required: false }] }], autoHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHighlight", required: false }] }], forceSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelection", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], dropdownAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownAriaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], unique: [{ type: i0.Input, args: [{ isSignal: true, alias: "unique", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], dropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdown", required: false }] }], showEmptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmptyMessage", required: false }] }], dropdownMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownMode", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], addOnTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnTab", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], searchMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchMessage", required: false }] }], emptySelectionMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptySelectionMessage", required: false }] }], selectionMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMessage", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], searchLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLocale", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], typeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeahead", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnBlur", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onUnselect: [{ type: i0.Output, args: ["onUnselect"] }], onAdd: [{ type: i0.Output, args: ["onAdd"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onDropdownClick: [{ type: i0.Output, args: ["onDropdownClick"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onInputKeydown: [{ type: i0.Output, args: ["onInputKeydown"] }], onKeyUp: [{ type: i0.Output, args: ["onKeyUp"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], inputEL: [{ type: i0.ViewChild, args: ['focusInput', { isSignal: true }] }], multiInputEl: [{ type: i0.ViewChild, args: ['multiIn', { isSignal: true }] }], multiContainerEL: [{ type: i0.ViewChild, args: ['multiContainer', { isSignal: true }] }], dropdownButton: [{ type: i0.ViewChild, args: ['ddBtn', { isSignal: true }] }], itemsViewChild: [{ type: i0.ViewChild, args: ['items', { isSignal: true }] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], overlayViewChild: [{ type: i0.ViewChild, args: ['overlay', { isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selecteditem', { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { isSignal: true }] }], removeIconTemplate: [{ type: i0.ContentChild, args: ['removeicon', { isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { isSignal: true }] }], dropdownIconTemplate: [{ type: i0.ContentChild, args: ['dropdownicon', { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
2287
2089
|
class AutoCompleteModule {
|
|
2288
2090
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2289
2091
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: AutoCompleteModule, imports: [AutoComplete, SharedModule], exports: [AutoComplete, SharedModule] });
|