primeng 17.15.0 → 17.16.0
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/api/megamenuitem.d.ts +4 -0
- package/api/primengconfig.d.ts +1 -1
- package/api/treenode.d.ts +4 -0
- package/autocomplete/autocomplete.d.ts +11 -2
- package/breadcrumb/breadcrumb.interface.d.ts +11 -0
- package/calendar/calendar.d.ts +13 -2
- package/cascadeselect/cascadeselect.d.ts +19 -1
- package/cascadeselect/cascadeselect.interface.d.ts +4 -0
- package/checkbox/checkbox.d.ts +9 -3
- package/chips/chips.d.ts +9 -2
- package/dropdown/dropdown.d.ts +31 -3
- package/esm2022/api/megamenuitem.mjs +1 -1
- package/esm2022/api/primengconfig.mjs +3 -3
- package/esm2022/api/treenode.mjs +1 -1
- package/esm2022/autocomplete/autocomplete.mjs +20 -9
- package/esm2022/breadcrumb/breadcrumb.interface.mjs +1 -1
- package/esm2022/breadcrumb/breadcrumb.mjs +1 -1
- package/esm2022/calendar/calendar.mjs +65 -9
- package/esm2022/cascadeselect/cascadeselect.interface.mjs +1 -1
- package/esm2022/cascadeselect/cascadeselect.mjs +61 -12
- package/esm2022/checkbox/checkbox.mjs +32 -10
- package/esm2022/chips/chips.mjs +20 -10
- package/esm2022/dropdown/dropdown.mjs +105 -26
- package/esm2022/dynamicdialog/dynamicdialog.mjs +3 -3
- package/esm2022/fileupload/fileupload.mjs +123 -105
- package/esm2022/icons/blank/blank.mjs +25 -0
- package/esm2022/icons/blank/primeng-icons-blank.mjs +5 -0
- package/esm2022/icons/blank/public_api.mjs +2 -0
- package/esm2022/inputmask/inputmask.mjs +31 -13
- package/esm2022/inputnumber/inputnumber.mjs +13 -4
- package/esm2022/inputotp/inputotp.mjs +3 -3
- package/esm2022/inputtext/inputtext.mjs +22 -7
- package/esm2022/inputtextarea/inputtextarea.mjs +17 -6
- package/esm2022/megamenu/megamenu.interface.mjs +1 -1
- package/esm2022/megamenu/megamenu.mjs +2 -2
- package/esm2022/menu/menu.mjs +18 -5
- package/esm2022/menubar/menubar.interface.mjs +1 -1
- package/esm2022/menubar/menubar.mjs +3 -3
- package/esm2022/multiselect/multiselect.mjs +83 -30
- package/esm2022/organizationchart/organizationchart.mjs +43 -27
- package/esm2022/paginator/paginator.mjs +3 -3
- package/esm2022/panelmenu/panelmenu.interface.mjs +1 -1
- package/esm2022/panelmenu/panelmenu.mjs +51 -41
- package/esm2022/password/password.mjs +22 -5
- package/esm2022/radiobutton/radiobutton.mjs +32 -10
- package/esm2022/scroller/scroller.mjs +4 -4
- package/esm2022/splitbutton/splitbutton.mjs +13 -13
- package/esm2022/table/table.mjs +3 -3
- package/esm2022/tieredmenu/tieredmenu.mjs +19 -12
- package/esm2022/timeline/timeline.mjs +2 -2
- package/esm2022/tree/tree.mjs +53 -13
- package/esm2022/treeselect/treeselect.mjs +12 -4
- package/esm2022/treetable/treetable.mjs +8 -6
- package/esm2022/tristatecheckbox/tristatecheckbox.mjs +20 -10
- package/fesm2022/primeng-api.mjs +2 -2
- package/fesm2022/primeng-api.mjs.map +1 -1
- package/fesm2022/primeng-autocomplete.mjs +19 -8
- package/fesm2022/primeng-autocomplete.mjs.map +1 -1
- package/fesm2022/primeng-breadcrumb.mjs.map +1 -1
- package/fesm2022/primeng-calendar.mjs +64 -8
- package/fesm2022/primeng-calendar.mjs.map +1 -1
- package/fesm2022/primeng-cascadeselect.mjs +60 -11
- package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
- package/fesm2022/primeng-checkbox.mjs +31 -9
- package/fesm2022/primeng-checkbox.mjs.map +1 -1
- package/fesm2022/primeng-chips.mjs +19 -9
- package/fesm2022/primeng-chips.mjs.map +1 -1
- package/fesm2022/primeng-dropdown.mjs +104 -25
- package/fesm2022/primeng-dropdown.mjs.map +1 -1
- package/fesm2022/primeng-dynamicdialog.mjs +2 -2
- package/fesm2022/primeng-dynamicdialog.mjs.map +1 -1
- package/fesm2022/primeng-fileupload.mjs +122 -104
- package/fesm2022/primeng-fileupload.mjs.map +1 -1
- package/fesm2022/primeng-icons-blank.mjs +32 -0
- package/fesm2022/primeng-icons-blank.mjs.map +1 -0
- package/fesm2022/primeng-inputmask.mjs +30 -12
- package/fesm2022/primeng-inputmask.mjs.map +1 -1
- package/fesm2022/primeng-inputnumber.mjs +12 -3
- package/fesm2022/primeng-inputnumber.mjs.map +1 -1
- package/fesm2022/primeng-inputotp.mjs +2 -2
- package/fesm2022/primeng-inputotp.mjs.map +1 -1
- package/fesm2022/primeng-inputtext.mjs +21 -6
- package/fesm2022/primeng-inputtext.mjs.map +1 -1
- package/fesm2022/primeng-inputtextarea.mjs +16 -5
- package/fesm2022/primeng-inputtextarea.mjs.map +1 -1
- package/fesm2022/primeng-megamenu.mjs +1 -1
- package/fesm2022/primeng-megamenu.mjs.map +1 -1
- package/fesm2022/primeng-menu.mjs +17 -4
- package/fesm2022/primeng-menu.mjs.map +1 -1
- package/fesm2022/primeng-menubar.mjs +2 -2
- package/fesm2022/primeng-menubar.mjs.map +1 -1
- package/fesm2022/primeng-multiselect.mjs +82 -29
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-organizationchart.mjs +42 -26
- package/fesm2022/primeng-organizationchart.mjs.map +1 -1
- package/fesm2022/primeng-paginator.mjs +2 -2
- package/fesm2022/primeng-paginator.mjs.map +1 -1
- package/fesm2022/primeng-panelmenu.mjs +50 -40
- package/fesm2022/primeng-panelmenu.mjs.map +1 -1
- package/fesm2022/primeng-password.mjs +21 -4
- package/fesm2022/primeng-password.mjs.map +1 -1
- package/fesm2022/primeng-radiobutton.mjs +31 -9
- package/fesm2022/primeng-radiobutton.mjs.map +1 -1
- package/fesm2022/primeng-scroller.mjs +3 -3
- package/fesm2022/primeng-scroller.mjs.map +1 -1
- package/fesm2022/primeng-splitbutton.mjs +12 -12
- package/fesm2022/primeng-splitbutton.mjs.map +1 -1
- package/fesm2022/primeng-table.mjs +2 -2
- package/fesm2022/primeng-table.mjs.map +1 -1
- package/fesm2022/primeng-tieredmenu.mjs +18 -11
- package/fesm2022/primeng-tieredmenu.mjs.map +1 -1
- package/fesm2022/primeng-timeline.mjs +2 -2
- package/fesm2022/primeng-timeline.mjs.map +1 -1
- package/fesm2022/primeng-tree.mjs +52 -12
- package/fesm2022/primeng-tree.mjs.map +1 -1
- package/fesm2022/primeng-treeselect.mjs +11 -3
- package/fesm2022/primeng-treeselect.mjs.map +1 -1
- package/fesm2022/primeng-treetable.mjs +7 -5
- package/fesm2022/primeng-treetable.mjs.map +1 -1
- package/fesm2022/primeng-tristatecheckbox.mjs +19 -9
- package/fesm2022/primeng-tristatecheckbox.mjs.map +1 -1
- package/fileupload/fileupload.d.ts +2 -0
- package/icons/blank/blank.d.ts +6 -0
- package/icons/blank/index.d.ts +5 -0
- package/icons/blank/public_api.d.ts +1 -0
- package/inputmask/inputmask.d.ts +13 -3
- package/inputnumber/inputnumber.d.ts +6 -1
- package/inputotp/inputotp.d.ts +1 -1
- package/inputtext/inputtext.d.ts +14 -3
- package/inputtextarea/inputtextarea.d.ts +10 -3
- package/megamenu/megamenu.interface.d.ts +12 -0
- package/menu/menu.d.ts +1 -0
- package/menubar/menubar.interface.d.ts +17 -0
- package/multiselect/multiselect.d.ts +21 -1
- package/organizationchart/organizationchart.d.ts +10 -2
- package/package.json +202 -196
- package/paginator/paginator.d.ts +4 -4
- package/panelmenu/panelmenu.d.ts +1 -0
- package/panelmenu/panelmenu.interface.d.ts +12 -0
- package/password/password.d.ts +12 -2
- package/radiobutton/radiobutton.d.ts +9 -2
- package/resources/components/timeline/timeline.css +2 -0
- package/resources/themes/arya-blue/theme.css +117 -1
- package/resources/themes/arya-green/theme.css +117 -1
- package/resources/themes/arya-orange/theme.css +117 -1
- package/resources/themes/arya-purple/theme.css +117 -1
- package/resources/themes/aura-dark-amber/theme.css +118 -2
- package/resources/themes/aura-dark-blue/theme.css +118 -2
- package/resources/themes/aura-dark-cyan/theme.css +118 -2
- package/resources/themes/aura-dark-green/theme.css +118 -2
- package/resources/themes/aura-dark-indigo/theme.css +118 -2
- package/resources/themes/aura-dark-lime/theme.css +118 -2
- package/resources/themes/aura-dark-noir/theme.css +118 -2
- package/resources/themes/aura-dark-pink/theme.css +118 -2
- package/resources/themes/aura-dark-purple/theme.css +118 -2
- package/resources/themes/aura-dark-teal/theme.css +118 -2
- package/resources/themes/aura-light-amber/theme.css +118 -2
- package/resources/themes/aura-light-blue/theme.css +118 -2
- package/resources/themes/aura-light-cyan/theme.css +118 -2
- package/resources/themes/aura-light-green/theme.css +118 -2
- package/resources/themes/aura-light-indigo/theme.css +118 -2
- package/resources/themes/aura-light-lime/theme.css +118 -2
- package/resources/themes/aura-light-noir/theme.css +118 -2
- package/resources/themes/aura-light-pink/theme.css +118 -2
- package/resources/themes/aura-light-purple/theme.css +118 -2
- package/resources/themes/aura-light-teal/theme.css +118 -2
- package/resources/themes/bootstrap4-dark-blue/theme.css +117 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +117 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +117 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +117 -1
- package/resources/themes/fluent-light/theme.css +117 -1
- package/resources/themes/lara-dark-blue/theme.css +117 -1
- package/resources/themes/lara-dark-indigo/theme.css +117 -1
- package/resources/themes/lara-dark-purple/theme.css +117 -1
- package/resources/themes/lara-dark-teal/theme.css +117 -1
- package/resources/themes/lara-light-blue/theme.css +117 -1
- package/resources/themes/lara-light-indigo/theme.css +117 -1
- package/resources/themes/lara-light-purple/theme.css +117 -1
- package/resources/themes/lara-light-teal/theme.css +117 -1
- package/resources/themes/luna-amber/theme.css +117 -1
- package/resources/themes/luna-blue/theme.css +117 -1
- package/resources/themes/luna-green/theme.css +117 -1
- package/resources/themes/luna-pink/theme.css +117 -1
- package/resources/themes/md-dark-deeppurple/theme.css +131 -4
- package/resources/themes/md-dark-indigo/theme.css +131 -4
- package/resources/themes/md-light-deeppurple/theme.css +131 -4
- package/resources/themes/md-light-indigo/theme.css +131 -4
- package/resources/themes/mdc-dark-deeppurple/theme.css +131 -4
- package/resources/themes/mdc-dark-indigo/theme.css +131 -4
- package/resources/themes/mdc-light-deeppurple/theme.css +131 -4
- package/resources/themes/mdc-light-indigo/theme.css +131 -4
- package/resources/themes/mira/theme.css +117 -1
- package/resources/themes/nano/theme.css +117 -1
- package/resources/themes/nova/theme.css +117 -1
- package/resources/themes/nova-accent/theme.css +117 -1
- package/resources/themes/nova-alt/theme.css +117 -1
- package/resources/themes/rhea/theme.css +117 -1
- package/resources/themes/saga-blue/theme.css +117 -1
- package/resources/themes/saga-green/theme.css +117 -1
- package/resources/themes/saga-orange/theme.css +117 -1
- package/resources/themes/saga-purple/theme.css +117 -1
- package/resources/themes/soho-dark/theme.css +117 -1
- package/resources/themes/soho-light/theme.css +117 -1
- package/resources/themes/tailwind-light/theme.css +117 -1
- package/resources/themes/vela-blue/theme.css +117 -1
- package/resources/themes/vela-green/theme.css +117 -1
- package/resources/themes/vela-orange/theme.css +117 -1
- package/resources/themes/vela-purple/theme.css +117 -1
- package/resources/themes/viva-dark/theme.css +117 -1
- package/resources/themes/viva-light/theme.css +117 -1
- package/tieredmenu/tieredmenu.d.ts +4 -3
- package/tree/tree.d.ts +9 -2
- package/treeselect/treeselect.d.ts +7 -1
- package/treetable/treetable.d.ts +2 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +9 -3
@@ -18,6 +18,8 @@ import * as i5 from 'primeng/tooltip';
|
|
18
18
|
import { TooltipModule } from 'primeng/tooltip';
|
19
19
|
import { ObjectUtils, UniqueComponentId } from 'primeng/utils';
|
20
20
|
import { TimesIcon } from 'primeng/icons/times';
|
21
|
+
import { CheckIcon } from 'primeng/icons/check';
|
22
|
+
import { BlankIcon } from 'primeng/icons/blank';
|
21
23
|
import { ChevronDownIcon } from 'primeng/icons/chevrondown';
|
22
24
|
import { SearchIcon } from 'primeng/icons/search';
|
23
25
|
|
@@ -38,6 +40,7 @@ class DropdownItem {
|
|
38
40
|
ariaPosInset;
|
39
41
|
ariaSetSize;
|
40
42
|
template;
|
43
|
+
checkmark;
|
41
44
|
onClick = new EventEmitter();
|
42
45
|
onMouseEnter = new EventEmitter();
|
43
46
|
ngOnInit() { }
|
@@ -48,7 +51,7 @@ class DropdownItem {
|
|
48
51
|
this.onMouseEnter.emit(event);
|
49
52
|
}
|
50
53
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DropdownItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
51
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.1", type: DropdownItem, selector: "p-dropdownItem", inputs: { id: "id", option: "option", selected: ["selected", "selected", booleanAttribute], focused: ["focused", "focused", booleanAttribute], label: "label", disabled: ["disabled", "disabled", booleanAttribute], visible: ["visible", "visible", booleanAttribute], itemSize: ["itemSize", "itemSize", numberAttribute], ariaPosInset: "ariaPosInset", ariaSetSize: "ariaSetSize", template: "template" }, outputs: { onClick: "onClick", onMouseEnter: "onMouseEnter" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
54
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.1", type: DropdownItem, selector: "p-dropdownItem", inputs: { id: "id", option: "option", selected: ["selected", "selected", booleanAttribute], focused: ["focused", "focused", booleanAttribute], label: "label", disabled: ["disabled", "disabled", booleanAttribute], visible: ["visible", "visible", booleanAttribute], itemSize: ["itemSize", "itemSize", numberAttribute], ariaPosInset: "ariaPosInset", ariaSetSize: "ariaSetSize", template: "template", checkmark: ["checkmark", "checkmark", booleanAttribute] }, outputs: { onClick: "onClick", onMouseEnter: "onMouseEnter" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
52
55
|
<li
|
53
56
|
[id]="id"
|
54
57
|
(click)="onOptionClick($event)"
|
@@ -65,10 +68,14 @@ class DropdownItem {
|
|
65
68
|
[ngStyle]="{ height: itemSize + 'px' }"
|
66
69
|
[ngClass]="{ 'p-dropdown-item': true, 'p-highlight': selected, 'p-disabled': disabled, 'p-focus': focused }"
|
67
70
|
>
|
71
|
+
<ng-container *ngIf="checkmark">
|
72
|
+
<CheckIcon *ngIf="selected" [styleClass]="'p-dropdown-check-icon'" />
|
73
|
+
<BlankIcon *ngIf="!selected" [styleClass]="'p-dropdown-blank-icon'" />
|
74
|
+
</ng-container>
|
68
75
|
<span *ngIf="!template">{{ label ?? 'empty' }}</span>
|
69
76
|
<ng-container *ngTemplateOutlet="template; context: { $implicit: option }"></ng-container>
|
70
77
|
</li>
|
71
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }] });
|
78
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i2.Ripple), selector: "[pRipple]" }, { kind: "component", type: i0.forwardRef(() => BlankIcon), selector: "BlankIcon" }, { kind: "component", type: i0.forwardRef(() => CheckIcon), selector: "CheckIcon" }] });
|
72
79
|
}
|
73
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DropdownItem, decorators: [{
|
74
81
|
type: Component,
|
@@ -91,6 +98,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
91
98
|
[ngStyle]="{ height: itemSize + 'px' }"
|
92
99
|
[ngClass]="{ 'p-dropdown-item': true, 'p-highlight': selected, 'p-disabled': disabled, 'p-focus': focused }"
|
93
100
|
>
|
101
|
+
<ng-container *ngIf="checkmark">
|
102
|
+
<CheckIcon *ngIf="selected" [styleClass]="'p-dropdown-check-icon'" />
|
103
|
+
<BlankIcon *ngIf="!selected" [styleClass]="'p-dropdown-blank-icon'" />
|
104
|
+
</ng-container>
|
94
105
|
<span *ngIf="!template">{{ label ?? 'empty' }}</span>
|
95
106
|
<ng-container *ngTemplateOutlet="template; context: { $implicit: option }"></ng-container>
|
96
107
|
</li>
|
@@ -126,6 +137,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
126
137
|
type: Input
|
127
138
|
}], template: [{
|
128
139
|
type: Input
|
140
|
+
}], checkmark: [{
|
141
|
+
type: Input,
|
142
|
+
args: [{ transform: booleanAttribute }]
|
129
143
|
}], onClick: [{
|
130
144
|
type: Output
|
131
145
|
}], onMouseEnter: [{
|
@@ -217,6 +231,11 @@ class Dropdown {
|
|
217
231
|
get placeholder() {
|
218
232
|
return this._placeholder.asReadonly();
|
219
233
|
}
|
234
|
+
/**
|
235
|
+
* Icon to display in loading state.
|
236
|
+
* @group Props
|
237
|
+
*/
|
238
|
+
loadingIcon;
|
220
239
|
/**
|
221
240
|
* Placeholder text to show when filter input is empty.
|
222
241
|
* @group Props
|
@@ -227,6 +246,11 @@ class Dropdown {
|
|
227
246
|
* @group Props
|
228
247
|
*/
|
229
248
|
filterLocale;
|
249
|
+
/**
|
250
|
+
* Specifies the input variant of the component.
|
251
|
+
* @group Props
|
252
|
+
*/
|
253
|
+
variant = 'outlined';
|
230
254
|
/**
|
231
255
|
* Identifier of the accessible input element.
|
232
256
|
* @group Props
|
@@ -257,11 +281,21 @@ class Dropdown {
|
|
257
281
|
* @group Props
|
258
282
|
*/
|
259
283
|
resetFilterOnHide = false;
|
284
|
+
/**
|
285
|
+
* Whether the selected option will be shown with a check mark.
|
286
|
+
* @group Props
|
287
|
+
*/
|
288
|
+
checkmark = false;
|
260
289
|
/**
|
261
290
|
* Icon class of the dropdown icon.
|
262
291
|
* @group Props
|
263
292
|
*/
|
264
293
|
dropdownIcon;
|
294
|
+
/**
|
295
|
+
* Whether the dropdown is in loading state.
|
296
|
+
* @group Props
|
297
|
+
*/
|
298
|
+
loading = false;
|
265
299
|
/**
|
266
300
|
* Name of the label field of an option.
|
267
301
|
* @group Props
|
@@ -587,6 +621,7 @@ class Dropdown {
|
|
587
621
|
emptyFilterTemplate;
|
588
622
|
emptyTemplate;
|
589
623
|
dropdownIconTemplate;
|
624
|
+
loadingIconTemplate;
|
590
625
|
clearIconTemplate;
|
591
626
|
filterIconTemplate;
|
592
627
|
filterOptions;
|
@@ -634,7 +669,8 @@ class Dropdown {
|
|
634
669
|
'p-dropdown-clearable': this.showClear && !this.disabled,
|
635
670
|
'p-focus': this.focused,
|
636
671
|
'p-inputwrapper-filled': this.modelValue() !== undefined && this.modelValue() !== null && !this.modelValue().length,
|
637
|
-
'p-inputwrapper-focus': this.focused || this.overlayVisible
|
672
|
+
'p-inputwrapper-focus': this.focused || this.overlayVisible,
|
673
|
+
'p-variant-filled': this.variant === 'filled' || this.config.inputStyle() === 'filled'
|
638
674
|
};
|
639
675
|
}
|
640
676
|
get inputClass() {
|
@@ -648,7 +684,7 @@ class Dropdown {
|
|
648
684
|
get panelClass() {
|
649
685
|
return {
|
650
686
|
'p-dropdown-panel p-component': true,
|
651
|
-
'p-input-filled': this.config.inputStyle === 'filled',
|
687
|
+
'p-input-filled': this.config.inputStyle() === 'filled',
|
652
688
|
'p-ripple-disabled': this.config.ripple === false
|
653
689
|
};
|
654
690
|
}
|
@@ -793,6 +829,9 @@ class Dropdown {
|
|
793
829
|
case 'dropdownicon':
|
794
830
|
this.dropdownIconTemplate = item.template;
|
795
831
|
break;
|
832
|
+
case 'loadingicon':
|
833
|
+
this.loadingIconTemplate = item.template;
|
834
|
+
break;
|
796
835
|
case 'clearicon':
|
797
836
|
this.clearIconTemplate = item.template;
|
798
837
|
break;
|
@@ -936,7 +975,7 @@ class Dropdown {
|
|
936
975
|
this.cd.markForCheck();
|
937
976
|
}
|
938
977
|
onContainerClick(event) {
|
939
|
-
if (this.disabled || this.readonly) {
|
978
|
+
if (this.disabled || this.readonly || this.loading) {
|
940
979
|
return;
|
941
980
|
}
|
942
981
|
this.focusInputViewChild?.nativeElement.focus({ preventScroll: true });
|
@@ -1055,7 +1094,7 @@ class Dropdown {
|
|
1055
1094
|
this.preventModelTouched = false;
|
1056
1095
|
}
|
1057
1096
|
onKeyDown(event, search) {
|
1058
|
-
if (this.disabled || this.readonly) {
|
1097
|
+
if (this.disabled || this.readonly || this.loading) {
|
1059
1098
|
return;
|
1060
1099
|
}
|
1061
1100
|
switch (event.code) {
|
@@ -1166,6 +1205,7 @@ class Dropdown {
|
|
1166
1205
|
// this.changeFocusedOptionIndex(event, optionIndex);
|
1167
1206
|
// !this.overlayVisible && this.show();
|
1168
1207
|
event.preventDefault();
|
1208
|
+
event.stopPropagation();
|
1169
1209
|
}
|
1170
1210
|
changeFocusedOptionIndex(event, index) {
|
1171
1211
|
if (this.focusedOptionIndex() !== index) {
|
@@ -1245,14 +1285,14 @@ class Dropdown {
|
|
1245
1285
|
this.onOptionSelect(event, option);
|
1246
1286
|
}
|
1247
1287
|
this.overlayVisible && this.hide();
|
1248
|
-
event.preventDefault();
|
1249
1288
|
}
|
1250
1289
|
else {
|
1251
1290
|
const optionIndex = this.focusedOptionIndex() !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex()) : this.clicked() ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();
|
1252
1291
|
this.changeFocusedOptionIndex(event, optionIndex);
|
1253
1292
|
!this.overlayVisible && this.show();
|
1254
|
-
event.preventDefault();
|
1255
1293
|
}
|
1294
|
+
event.preventDefault();
|
1295
|
+
event.stopPropagation();
|
1256
1296
|
}
|
1257
1297
|
onArrowLeftKey(event, pressedInInputText = false) {
|
1258
1298
|
pressedInInputText && this.focusedOptionIndex.set(-1);
|
@@ -1341,6 +1381,7 @@ class Dropdown {
|
|
1341
1381
|
this.overlayVisible && this.hide(this.filter);
|
1342
1382
|
}
|
1343
1383
|
}
|
1384
|
+
event.stopPropagation();
|
1344
1385
|
}
|
1345
1386
|
onFirstHiddenFocus(event) {
|
1346
1387
|
const focusableEl = event.relatedTarget === this.focusInputViewChild?.nativeElement ? DomHandler.getFirstFocusableElement(this.overlayViewChild.el?.nativeElement, ':not(.p-hidden-focusable)') : this.focusInputViewChild?.nativeElement;
|
@@ -1439,7 +1480,7 @@ class Dropdown {
|
|
1439
1480
|
this.resetFilter();
|
1440
1481
|
}
|
1441
1482
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: Dropdown, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i3.FilterService }, { token: i3.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
1442
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.1", type: Dropdown, selector: "p-dropdown", inputs: { id: "id", scrollHeight: "scrollHeight", filter: ["filter", "filter", booleanAttribute], name: "name", style: "style", panelStyle: "panelStyle", styleClass: "styleClass", panelStyleClass: "panelStyleClass", readonly: ["readonly", "readonly", booleanAttribute], required: ["required", "required", booleanAttribute], editable: ["editable", "editable", booleanAttribute], appendTo: "appendTo", tabindex: ["tabindex", "tabindex", numberAttribute], placeholder: "placeholder", filterPlaceholder: "filterPlaceholder", filterLocale: "filterLocale", inputId: "inputId", dataKey: "dataKey", filterBy: "filterBy", filterFields: "filterFields", autofocus: ["autofocus", "autofocus", booleanAttribute], resetFilterOnHide: ["resetFilterOnHide", "resetFilterOnHide", booleanAttribute], dropdownIcon: "dropdownIcon", optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", optionGroupLabel: "optionGroupLabel", optionGroupChildren: "optionGroupChildren", autoDisplayFirst: ["autoDisplayFirst", "autoDisplayFirst", booleanAttribute], group: ["group", "group", booleanAttribute], showClear: ["showClear", "showClear", booleanAttribute], emptyFilterMessage: "emptyFilterMessage", emptyMessage: "emptyMessage", lazy: ["lazy", "lazy", booleanAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", overlayOptions: "overlayOptions", ariaFilterLabel: "ariaFilterLabel", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", filterMatchMode: "filterMatchMode", maxlength: ["maxlength", "maxlength", numberAttribute], tooltip: "tooltip", tooltipPosition: "tooltipPosition", tooltipPositionStyle: "tooltipPositionStyle", tooltipStyleClass: "tooltipStyleClass", focusOnHover: ["focusOnHover", "focusOnHover", booleanAttribute], selectOnFocus: ["selectOnFocus", "selectOnFocus", booleanAttribute], autoOptionFocus: ["autoOptionFocus", "autoOptionFocus", booleanAttribute], autofocusFilter: ["autofocusFilter", "autofocusFilter", booleanAttribute], disabled: "disabled", itemSize: "itemSize", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", filterValue: "filterValue", options: "options" }, outputs: { onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onClick: "onClick", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { properties: { "class.p-inputwrapper-filled": "filled()", "class.p-inputwrapper-focus": "focused || overlayVisible" }, classAttribute: "p-element p-inputwrapper" }, providers: [DROPDOWN_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true }, { propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "editableInputViewChild", first: true, predicate: ["editableInput"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "firstHiddenFocusableElementOnOverlay", first: true, predicate: ["firstHiddenFocusableEl"], descendants: true }, { propertyName: "lastHiddenFocusableElementOnOverlay", first: true, predicate: ["lastHiddenFocusableEl"], descendants: true }], ngImport: i0, template: `
|
1483
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.1", type: Dropdown, selector: "p-dropdown", inputs: { id: "id", scrollHeight: "scrollHeight", filter: ["filter", "filter", booleanAttribute], name: "name", style: "style", panelStyle: "panelStyle", styleClass: "styleClass", panelStyleClass: "panelStyleClass", readonly: ["readonly", "readonly", booleanAttribute], required: ["required", "required", booleanAttribute], editable: ["editable", "editable", booleanAttribute], appendTo: "appendTo", tabindex: ["tabindex", "tabindex", numberAttribute], placeholder: "placeholder", loadingIcon: "loadingIcon", filterPlaceholder: "filterPlaceholder", filterLocale: "filterLocale", variant: "variant", inputId: "inputId", dataKey: "dataKey", filterBy: "filterBy", filterFields: "filterFields", autofocus: ["autofocus", "autofocus", booleanAttribute], resetFilterOnHide: ["resetFilterOnHide", "resetFilterOnHide", booleanAttribute], checkmark: ["checkmark", "checkmark", booleanAttribute], dropdownIcon: "dropdownIcon", loading: ["loading", "loading", booleanAttribute], optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", optionGroupLabel: "optionGroupLabel", optionGroupChildren: "optionGroupChildren", autoDisplayFirst: ["autoDisplayFirst", "autoDisplayFirst", booleanAttribute], group: ["group", "group", booleanAttribute], showClear: ["showClear", "showClear", booleanAttribute], emptyFilterMessage: "emptyFilterMessage", emptyMessage: "emptyMessage", lazy: ["lazy", "lazy", booleanAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", overlayOptions: "overlayOptions", ariaFilterLabel: "ariaFilterLabel", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", filterMatchMode: "filterMatchMode", maxlength: ["maxlength", "maxlength", numberAttribute], tooltip: "tooltip", tooltipPosition: "tooltipPosition", tooltipPositionStyle: "tooltipPositionStyle", tooltipStyleClass: "tooltipStyleClass", focusOnHover: ["focusOnHover", "focusOnHover", booleanAttribute], selectOnFocus: ["selectOnFocus", "selectOnFocus", booleanAttribute], autoOptionFocus: ["autoOptionFocus", "autoOptionFocus", booleanAttribute], autofocusFilter: ["autofocusFilter", "autofocusFilter", booleanAttribute], disabled: "disabled", itemSize: "itemSize", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", filterValue: "filterValue", options: "options" }, outputs: { onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onClick: "onClick", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { properties: { "class.p-inputwrapper-filled": "filled()", "class.p-inputwrapper-focus": "focused || overlayVisible" }, classAttribute: "p-element p-inputwrapper" }, providers: [DROPDOWN_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true }, { propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "editableInputViewChild", first: true, predicate: ["editableInput"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "firstHiddenFocusableElementOnOverlay", first: true, predicate: ["firstHiddenFocusableEl"], descendants: true }, { propertyName: "lastHiddenFocusableElementOnOverlay", first: true, predicate: ["lastHiddenFocusableEl"], descendants: true }], ngImport: i0, template: `
|
1443
1484
|
<div #container [attr.id]="id" [ngClass]="containerClass" (click)="onContainerClick($event)" [ngStyle]="style" [class]="styleClass">
|
1444
1485
|
<span
|
1445
1486
|
#focusInput
|
@@ -1499,13 +1540,25 @@ class Dropdown {
|
|
1499
1540
|
</ng-container>
|
1500
1541
|
|
1501
1542
|
<div class="p-dropdown-trigger" role="button" aria-label="dropdown trigger" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible ?? false" [attr.data-pc-section]="'trigger'">
|
1502
|
-
<ng-container *ngIf="
|
1503
|
-
<
|
1504
|
-
|
1543
|
+
<ng-container *ngIf="loading; else elseBlock">
|
1544
|
+
<ng-container *ngIf="loadingIconTemplate">
|
1545
|
+
<ng-container *ngTemplateOutlet="loadingIconTemplate"></ng-container>
|
1546
|
+
</ng-container>
|
1547
|
+
<ng-container *ngIf="!loadingIconTemplate">
|
1548
|
+
<span *ngIf="loadingIcon" [ngClass]="'p-dropdown-trigger-icon pi-spin ' + loadingIcon" aria-hidden="true"></span>
|
1549
|
+
<span *ngIf="!loadingIcon" [class]="'p-dropdown-trigger-icon pi pi-spinner pi-spin'" aria-hidden="true"></span>
|
1550
|
+
</ng-container>
|
1505
1551
|
</ng-container>
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1552
|
+
|
1553
|
+
<ng-template #elseBlock>
|
1554
|
+
<ng-container *ngIf="!dropdownIconTemplate">
|
1555
|
+
<span class="p-dropdown-trigger-icon" *ngIf="dropdownIcon" [ngClass]="dropdownIcon"></span>
|
1556
|
+
<ChevronDownIcon *ngIf="!dropdownIcon" [styleClass]="'p-dropdown-trigger-icon'" />
|
1557
|
+
</ng-container>
|
1558
|
+
<span *ngIf="dropdownIconTemplate" class="p-dropdown-trigger-icon">
|
1559
|
+
<ng-template *ngTemplateOutlet="dropdownIconTemplate"></ng-template>
|
1560
|
+
</span>
|
1561
|
+
</ng-template>
|
1509
1562
|
</div>
|
1510
1563
|
|
1511
1564
|
<p-overlay
|
@@ -1547,6 +1600,7 @@ class Dropdown {
|
|
1547
1600
|
autocomplete="off"
|
1548
1601
|
[value]="_filterValue() || ''"
|
1549
1602
|
class="p-dropdown-filter p-inputtext p-component"
|
1603
|
+
[ngClass]="{ 'p-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }"
|
1550
1604
|
[attr.placeholder]="filterPlaceholder"
|
1551
1605
|
[attr.aria-owns]="id + '_list'"
|
1552
1606
|
(input)="onFilterInputChange($event)"
|
@@ -1600,6 +1654,7 @@ class Dropdown {
|
|
1600
1654
|
<p-dropdownItem
|
1601
1655
|
[id]="id + '_' + getOptionIndex(i, scrollerOptions)"
|
1602
1656
|
[option]="option"
|
1657
|
+
[checkmark]="checkmark"
|
1603
1658
|
[selected]="isSelected(option)"
|
1604
1659
|
[label]="getOptionLabel(option)"
|
1605
1660
|
[disabled]="isOptionDisabled(option)"
|
@@ -1641,7 +1696,7 @@ class Dropdown {
|
|
1641
1696
|
</ng-template>
|
1642
1697
|
</p-overlay>
|
1643
1698
|
</div>
|
1644
|
-
`, isInline: true, styles: ["@layer primeng{.p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;opacity:0}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-item-group{cursor:auto}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i0.forwardRef(() => i4.Overlay), selector: "p-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "directive", type: i0.forwardRef(() => i3.PrimeTemplate), selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i5.Tooltip), selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i0.forwardRef(() => i6.Scroller), selector: "p-scroller", inputs: ["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: i0.forwardRef(() => i7.AutoFocus), selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "component", type: i0.forwardRef(() => TimesIcon), selector: "TimesIcon" }, { kind: "component", type: i0.forwardRef(() => ChevronDownIcon), selector: "ChevronDownIcon" }, { kind: "component", type: i0.forwardRef(() => SearchIcon), selector: "SearchIcon" }, { kind: "component", type: i0.forwardRef(() => DropdownItem), selector: "p-dropdownItem", inputs: ["id", "option", "selected", "focused", "label", "disabled", "visible", "itemSize", "ariaPosInset", "ariaSetSize", "template"], outputs: ["onClick", "onMouseEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
1699
|
+
`, isInline: true, styles: ["@layer primeng{.p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;opacity:0}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-item-group{cursor:auto}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i0.forwardRef(() => i4.Overlay), selector: "p-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "directive", type: i0.forwardRef(() => i3.PrimeTemplate), selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i5.Tooltip), selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i0.forwardRef(() => i6.Scroller), selector: "p-scroller", inputs: ["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: i0.forwardRef(() => i7.AutoFocus), selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "component", type: i0.forwardRef(() => TimesIcon), selector: "TimesIcon" }, { kind: "component", type: i0.forwardRef(() => ChevronDownIcon), selector: "ChevronDownIcon" }, { kind: "component", type: i0.forwardRef(() => SearchIcon), selector: "SearchIcon" }, { kind: "component", type: i0.forwardRef(() => DropdownItem), selector: "p-dropdownItem", inputs: ["id", "option", "selected", "focused", "label", "disabled", "visible", "itemSize", "ariaPosInset", "ariaSetSize", "template", "checkmark"], outputs: ["onClick", "onMouseEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
1645
1700
|
}
|
1646
1701
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: Dropdown, decorators: [{
|
1647
1702
|
type: Component,
|
@@ -1705,13 +1760,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
1705
1760
|
</ng-container>
|
1706
1761
|
|
1707
1762
|
<div class="p-dropdown-trigger" role="button" aria-label="dropdown trigger" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible ?? false" [attr.data-pc-section]="'trigger'">
|
1708
|
-
<ng-container *ngIf="
|
1709
|
-
<
|
1710
|
-
|
1763
|
+
<ng-container *ngIf="loading; else elseBlock">
|
1764
|
+
<ng-container *ngIf="loadingIconTemplate">
|
1765
|
+
<ng-container *ngTemplateOutlet="loadingIconTemplate"></ng-container>
|
1766
|
+
</ng-container>
|
1767
|
+
<ng-container *ngIf="!loadingIconTemplate">
|
1768
|
+
<span *ngIf="loadingIcon" [ngClass]="'p-dropdown-trigger-icon pi-spin ' + loadingIcon" aria-hidden="true"></span>
|
1769
|
+
<span *ngIf="!loadingIcon" [class]="'p-dropdown-trigger-icon pi pi-spinner pi-spin'" aria-hidden="true"></span>
|
1770
|
+
</ng-container>
|
1711
1771
|
</ng-container>
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1772
|
+
|
1773
|
+
<ng-template #elseBlock>
|
1774
|
+
<ng-container *ngIf="!dropdownIconTemplate">
|
1775
|
+
<span class="p-dropdown-trigger-icon" *ngIf="dropdownIcon" [ngClass]="dropdownIcon"></span>
|
1776
|
+
<ChevronDownIcon *ngIf="!dropdownIcon" [styleClass]="'p-dropdown-trigger-icon'" />
|
1777
|
+
</ng-container>
|
1778
|
+
<span *ngIf="dropdownIconTemplate" class="p-dropdown-trigger-icon">
|
1779
|
+
<ng-template *ngTemplateOutlet="dropdownIconTemplate"></ng-template>
|
1780
|
+
</span>
|
1781
|
+
</ng-template>
|
1715
1782
|
</div>
|
1716
1783
|
|
1717
1784
|
<p-overlay
|
@@ -1753,6 +1820,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
1753
1820
|
autocomplete="off"
|
1754
1821
|
[value]="_filterValue() || ''"
|
1755
1822
|
class="p-dropdown-filter p-inputtext p-component"
|
1823
|
+
[ngClass]="{ 'p-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }"
|
1756
1824
|
[attr.placeholder]="filterPlaceholder"
|
1757
1825
|
[attr.aria-owns]="id + '_list'"
|
1758
1826
|
(input)="onFilterInputChange($event)"
|
@@ -1806,6 +1874,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
1806
1874
|
<p-dropdownItem
|
1807
1875
|
[id]="id + '_' + getOptionIndex(i, scrollerOptions)"
|
1808
1876
|
[option]="option"
|
1877
|
+
[checkmark]="checkmark"
|
1809
1878
|
[selected]="isSelected(option)"
|
1810
1879
|
[label]="getOptionLabel(option)"
|
1811
1880
|
[disabled]="isOptionDisabled(option)"
|
@@ -1885,10 +1954,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
1885
1954
|
args: [{ transform: numberAttribute }]
|
1886
1955
|
}], placeholder: [{
|
1887
1956
|
type: Input
|
1957
|
+
}], loadingIcon: [{
|
1958
|
+
type: Input
|
1888
1959
|
}], filterPlaceholder: [{
|
1889
1960
|
type: Input
|
1890
1961
|
}], filterLocale: [{
|
1891
1962
|
type: Input
|
1963
|
+
}], variant: [{
|
1964
|
+
type: Input
|
1892
1965
|
}], inputId: [{
|
1893
1966
|
type: Input
|
1894
1967
|
}], dataKey: [{
|
@@ -1903,8 +1976,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
1903
1976
|
}], resetFilterOnHide: [{
|
1904
1977
|
type: Input,
|
1905
1978
|
args: [{ transform: booleanAttribute }]
|
1979
|
+
}], checkmark: [{
|
1980
|
+
type: Input,
|
1981
|
+
args: [{ transform: booleanAttribute }]
|
1906
1982
|
}], dropdownIcon: [{
|
1907
1983
|
type: Input
|
1984
|
+
}], loading: [{
|
1985
|
+
type: Input,
|
1986
|
+
args: [{ transform: booleanAttribute }]
|
1908
1987
|
}], optionLabel: [{
|
1909
1988
|
type: Input
|
1910
1989
|
}], optionValue: [{
|
@@ -2039,13 +2118,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
2039
2118
|
}] } });
|
2040
2119
|
class DropdownModule {
|
2041
2120
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2042
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: DropdownModule, declarations: [Dropdown, DropdownItem], imports: [CommonModule, OverlayModule, SharedModule, TooltipModule, RippleModule, ScrollerModule, AutoFocusModule, TimesIcon, ChevronDownIcon, SearchIcon], exports: [Dropdown, OverlayModule, SharedModule, ScrollerModule] });
|
2043
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DropdownModule, imports: [CommonModule, OverlayModule, SharedModule, TooltipModule, RippleModule, ScrollerModule, AutoFocusModule, TimesIcon, ChevronDownIcon, SearchIcon, OverlayModule, SharedModule, ScrollerModule] });
|
2121
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: DropdownModule, declarations: [Dropdown, DropdownItem], imports: [CommonModule, OverlayModule, SharedModule, TooltipModule, RippleModule, ScrollerModule, AutoFocusModule, TimesIcon, ChevronDownIcon, SearchIcon, BlankIcon, CheckIcon], exports: [Dropdown, OverlayModule, SharedModule, ScrollerModule] });
|
2122
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DropdownModule, imports: [CommonModule, OverlayModule, SharedModule, TooltipModule, RippleModule, ScrollerModule, AutoFocusModule, TimesIcon, ChevronDownIcon, SearchIcon, BlankIcon, CheckIcon, OverlayModule, SharedModule, ScrollerModule] });
|
2044
2123
|
}
|
2045
2124
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: DropdownModule, decorators: [{
|
2046
2125
|
type: NgModule,
|
2047
2126
|
args: [{
|
2048
|
-
imports: [CommonModule, OverlayModule, SharedModule, TooltipModule, RippleModule, ScrollerModule, AutoFocusModule, TimesIcon, ChevronDownIcon, SearchIcon],
|
2127
|
+
imports: [CommonModule, OverlayModule, SharedModule, TooltipModule, RippleModule, ScrollerModule, AutoFocusModule, TimesIcon, ChevronDownIcon, SearchIcon, BlankIcon, CheckIcon],
|
2049
2128
|
exports: [Dropdown, OverlayModule, SharedModule, ScrollerModule],
|
2050
2129
|
declarations: [Dropdown, DropdownItem]
|
2051
2130
|
}]
|