primevue 3.15.0 → 3.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/AutoComplete.d.ts +182 -38
- package/autocomplete/AutoComplete.vue +636 -342
- package/autocomplete/autocomplete.cjs.js +745 -416
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +747 -418
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +745 -416
- package/autocomplete/autocomplete.min.js +1 -1
- package/button/Button.vue +4 -1
- package/button/button.cjs.js +5 -1
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -1
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +51 -12
- package/calendar/Calendar.vue +259 -114
- package/calendar/calendar.cjs.js +414 -220
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +415 -221
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +414 -220
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.vue +25 -0
- package/carousel/carousel.cjs.js +25 -0
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +25 -0
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +25 -0
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +97 -17
- package/cascadeselect/CascadeSelect.vue +560 -135
- package/cascadeselect/CascadeSelectSub.vue +48 -129
- package/cascadeselect/cascadeselect.cjs.js +670 -306
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +672 -308
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +670 -306
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/Checkbox.d.ts +40 -4
- package/checkbox/Checkbox.vue +50 -13
- package/checkbox/checkbox.cjs.js +64 -23
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +65 -24
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +64 -23
- package/checkbox/checkbox.min.js +1 -1
- package/chips/Chips.d.ts +36 -12
- package/chips/Chips.vue +116 -22
- package/chips/chips.cjs.js +149 -37
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +150 -38
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +150 -39
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +3 -6
- package/colorpicker/ColorPicker.vue +1 -5
- package/colorpicker/colorpicker.cjs.js +2 -7
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +2 -7
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +2 -7
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +4 -0
- package/column/Column.vue +4 -0
- package/column/column.cjs.js +4 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +4 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +4 -0
- package/column/column.min.js +1 -1
- package/config/PrimeVue.d.ts +42 -0
- package/config/config.cjs.js +35 -4
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +35 -4
- package/config/config.esm.min.js +1 -1
- package/config/config.js +35 -4
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.vue +4 -1
- package/confirmdialog/confirmdialog.cjs.js +6 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +6 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +6 -2
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/contextmenu/ContextMenuSub.vue +3 -3
- package/contextmenu/contextmenu.cjs.js +14 -8
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +15 -9
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -8
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1128 -772
- package/core/core.min.js +12 -12
- package/datatable/BodyCell.vue +11 -2
- package/datatable/DataTable.vue +23 -2
- package/datatable/datatable.cjs.js +34 -4
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +34 -4
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +34 -4
- package/datatable/datatable.min.js +1 -1
- package/dialog/Dialog.d.ts +5 -1
- package/dropdown/Dropdown.d.ts +92 -38
- package/dropdown/Dropdown.vue +538 -399
- package/dropdown/dropdown.cjs.js +657 -486
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +659 -488
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +657 -486
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +32 -0
- package/editor/Editor.vue +15 -1
- package/editor/editor.cjs.js +15 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +15 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +15 -1
- package/editor/editor.min.js +1 -1
- package/inputmask/InputMask.vue +9 -6
- package/inputmask/inputmask.cjs.js +14 -6
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +15 -7
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +14 -6
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +31 -7
- package/inputnumber/InputNumber.vue +53 -20
- package/inputnumber/inputnumber.cjs.js +75 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +76 -30
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +75 -29
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +24 -8
- package/inputswitch/InputSwitch.vue +27 -12
- package/inputswitch/inputswitch.cjs.js +38 -20
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +39 -21
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +38 -20
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.vue +1 -2
- package/inputtext/inputtext.cjs.js +3 -4
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +4 -5
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +3 -4
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +12 -0
- package/knob/Knob.vue +62 -2
- package/knob/knob.cjs.js +73 -5
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +73 -5
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +73 -5
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +53 -7
- package/listbox/Listbox.vue +500 -135
- package/listbox/listbox.cjs.js +597 -193
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +599 -195
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +597 -193
- package/listbox/listbox.min.js +1 -1
- package/menu/Menu.d.ts +1 -1
- package/menu/Menuitem.vue +2 -2
- package/menu/menu.cjs.js +12 -6
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +13 -7
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +12 -6
- package/menu/menu.min.js +1 -1
- package/menubar/MenubarSub.vue +3 -3
- package/menubar/menubar.cjs.js +14 -8
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -9
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +14 -8
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +111 -51
- package/multiselect/MultiSelect.vue +629 -338
- package/multiselect/multiselect.cjs.js +748 -428
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +750 -430
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +748 -428
- package/multiselect/multiselect.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +1 -1
- package/overlaypanel/OverlayPanel.vue +14 -2
- package/overlaypanel/overlaypanel.cjs.js +14 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +14 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +14 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +2 -2
- package/paginator/Paginator.d.ts +2 -2
- package/password/Password.d.ts +36 -8
- package/password/Password.vue +50 -14
- package/password/password.cjs.js +69 -24
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +71 -26
- package/password/password.esm.min.js +1 -1
- package/password/password.js +69 -24
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +8 -0
- package/picklist/PickList.vue +10 -2
- package/picklist/picklist.cjs.js +68 -50
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +69 -51
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +68 -50
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +1 -1
- package/radiobutton/RadioButton.d.ts +28 -4
- package/radiobutton/RadioButton.vue +36 -11
- package/radiobutton/radiobutton.cjs.js +49 -23
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +50 -24
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +49 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +4 -0
- package/rating/Rating.vue +61 -7
- package/rating/rating.cjs.js +90 -16
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +91 -17
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +90 -16
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +8 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +82 -40
- package/resources/themes/arya-green/theme.css +82 -40
- package/resources/themes/arya-orange/theme.css +82 -40
- package/resources/themes/arya-purple/theme.css +82 -40
- package/resources/themes/bootstrap4-dark-blue/theme.css +82 -40
- package/resources/themes/bootstrap4-dark-purple/theme.css +82 -40
- package/resources/themes/bootstrap4-light-blue/theme.css +82 -40
- package/resources/themes/bootstrap4-light-purple/theme.css +82 -40
- package/resources/themes/fluent-light/theme.css +82 -40
- package/resources/themes/lara-dark-blue/theme.css +82 -40
- package/resources/themes/lara-dark-indigo/theme.css +82 -40
- package/resources/themes/lara-dark-purple/theme.css +82 -40
- package/resources/themes/lara-dark-teal/theme.css +82 -40
- package/resources/themes/lara-light-blue/theme.css +82 -40
- package/resources/themes/lara-light-indigo/theme.css +82 -40
- package/resources/themes/lara-light-purple/theme.css +82 -40
- package/resources/themes/lara-light-teal/theme.css +82 -40
- package/resources/themes/luna-amber/theme.css +82 -40
- package/resources/themes/luna-blue/theme.css +82 -40
- package/resources/themes/luna-green/theme.css +82 -40
- package/resources/themes/luna-pink/theme.css +82 -40
- package/resources/themes/md-dark-deeppurple/theme.css +82 -40
- package/resources/themes/md-dark-indigo/theme.css +82 -40
- package/resources/themes/md-light-deeppurple/theme.css +82 -40
- package/resources/themes/md-light-indigo/theme.css +82 -40
- package/resources/themes/mdc-dark-deeppurple/theme.css +82 -40
- package/resources/themes/mdc-dark-indigo/theme.css +82 -40
- package/resources/themes/mdc-light-deeppurple/theme.css +82 -40
- package/resources/themes/mdc-light-indigo/theme.css +82 -40
- package/resources/themes/nova/theme.css +82 -40
- package/resources/themes/nova-accent/theme.css +82 -40
- package/resources/themes/nova-alt/theme.css +82 -40
- package/resources/themes/nova-vue/theme.css +82 -40
- package/resources/themes/rhea/theme.css +82 -40
- package/resources/themes/saga-blue/theme.css +82 -40
- package/resources/themes/saga-green/theme.css +82 -40
- package/resources/themes/saga-orange/theme.css +82 -40
- package/resources/themes/saga-purple/theme.css +82 -40
- package/resources/themes/tailwind-light/theme.css +82 -40
- package/resources/themes/vela-blue/theme.css +82 -40
- package/resources/themes/vela-green/theme.css +82 -40
- package/resources/themes/vela-orange/theme.css +82 -40
- package/resources/themes/vela-purple/theme.css +82 -40
- package/ripple/ripple.cjs.js +1 -0
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +1 -0
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -0
- package/ripple/ripple.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +89 -12
- package/selectbutton/selectbutton.cjs.js +97 -22
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +99 -24
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +97 -22
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/Slider.d.ts +9 -1
- package/slider/Slider.vue +50 -34
- package/slider/slider.cjs.js +59 -38
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +59 -38
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +59 -38
- package/slider/slider.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +1 -1
- package/splitter/Splitter.vue +30 -1
- package/splitter/splitter.cjs.js +30 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +30 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +30 -1
- package/splitter/splitter.min.js +1 -1
- package/textarea/Textarea.vue +1 -2
- package/textarea/textarea.cjs.js +3 -5
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +4 -6
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +3 -5
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +1 -1
- package/tieredmenu/TieredMenuSub.vue +3 -3
- package/tieredmenu/tieredmenu.cjs.js +14 -8
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +15 -9
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +14 -8
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +10 -1
- package/timeline/Timeline.vue +1 -1
- package/timeline/timeline.cjs.js +5 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +5 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +5 -1
- package/timeline/timeline.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +42 -0
- package/togglebutton/ToggleButton.vue +44 -7
- package/togglebutton/togglebutton.cjs.js +59 -13
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +60 -14
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +59 -13
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.cjs.js +20 -11
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +21 -12
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +20 -11
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.vue +5 -1
- package/tree/TreeNode.vue +20 -19
- package/tree/tree.cjs.js +47 -32
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +47 -32
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +47 -32
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +26 -10
- package/treeselect/TreeSelect.vue +52 -29
- package/treeselect/treeselect.cjs.js +74 -41
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +76 -43
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +74 -41
- package/treeselect/treeselect.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +20 -4
- package/tristatecheckbox/TriStateCheckbox.vue +52 -15
- package/tristatecheckbox/tristatecheckbox.cjs.js +67 -26
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +68 -27
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +67 -26
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/Utils.d.ts +3 -2
- package/utils/utils.cjs.js +239 -173
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +239 -173
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +239 -173
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +612 -136
- package/vetur-tags.json +180 -59
- package/virtualscroller/VirtualScroller.d.ts +10 -0
- package/virtualscroller/VirtualScroller.vue +18 -17
- package/virtualscroller/virtualscroller.cjs.js +22 -20
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +22 -20
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +22 -20
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1745 -338
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ZIndexUtils, ObjectUtils, DomHandler, ConnectedOverlayScrollHandler } from 'primevue/utils';
|
|
1
|
+
import { UniqueComponentId, ZIndexUtils, ObjectUtils, DomHandler, ConnectedOverlayScrollHandler } from 'primevue/utils';
|
|
2
2
|
import OverlayEventBus from 'primevue/overlayeventbus';
|
|
3
3
|
import { FilterService } from 'primevue/api';
|
|
4
4
|
import Ripple from 'primevue/ripple';
|
|
5
5
|
import VirtualScroller from 'primevue/virtualscroller';
|
|
6
6
|
import Portal from 'primevue/portal';
|
|
7
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, createTextVNode, toDisplayString, renderList, createCommentVNode, createVNode, withCtx, Transition, withDirectives,
|
|
7
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createElementVNode, mergeProps, renderSlot, Fragment, createTextVNode, toDisplayString, renderList, createCommentVNode, createVNode, withCtx, Transition, withDirectives, normalizeStyle, createSlots } from 'vue';
|
|
8
8
|
|
|
9
9
|
var script = {
|
|
10
10
|
name: 'MultiSelect',
|
|
11
|
-
emits: ['update:modelValue', 'before-show', 'before-hide', '
|
|
11
|
+
emits: ['update:modelValue', 'change', 'focus', 'blur' , 'before-show', 'before-hide', 'show', 'hide', 'filter', 'selectall-change'],
|
|
12
12
|
props: {
|
|
13
13
|
modelValue: null,
|
|
14
14
|
options: Array,
|
|
@@ -23,8 +23,13 @@ var script = {
|
|
|
23
23
|
},
|
|
24
24
|
placeholder: String,
|
|
25
25
|
disabled: Boolean,
|
|
26
|
-
tabindex: String,
|
|
27
26
|
inputId: String,
|
|
27
|
+
inputProps: null,
|
|
28
|
+
panelStyle: null,
|
|
29
|
+
panelClass: null,
|
|
30
|
+
panelProps: null,
|
|
31
|
+
filterInputProps: null,
|
|
32
|
+
closeButtonProps: null,
|
|
28
33
|
dataKey: null,
|
|
29
34
|
filter: Boolean,
|
|
30
35
|
filterPlaceholder: String,
|
|
@@ -37,24 +42,14 @@ var script = {
|
|
|
37
42
|
type: Array,
|
|
38
43
|
default: null
|
|
39
44
|
},
|
|
40
|
-
ariaLabelledBy: null,
|
|
41
45
|
appendTo: {
|
|
42
46
|
type: String,
|
|
43
47
|
default: 'body'
|
|
44
48
|
},
|
|
45
|
-
emptyFilterMessage: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: null
|
|
48
|
-
},
|
|
49
|
-
emptyMessage: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: null
|
|
52
|
-
},
|
|
53
49
|
display: {
|
|
54
50
|
type: String,
|
|
55
51
|
default: 'comma'
|
|
56
52
|
},
|
|
57
|
-
panelClass: null,
|
|
58
53
|
selectedItemsLabel: {
|
|
59
54
|
type: String,
|
|
60
55
|
default: '{0} items selected'
|
|
@@ -90,21 +85,75 @@ var script = {
|
|
|
90
85
|
virtualScrollerOptions: {
|
|
91
86
|
type: Object,
|
|
92
87
|
default: null
|
|
88
|
+
},
|
|
89
|
+
autoOptionFocus: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: true
|
|
92
|
+
},
|
|
93
|
+
filterMessage: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: null
|
|
96
|
+
},
|
|
97
|
+
selectionMessage: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: null
|
|
100
|
+
},
|
|
101
|
+
emptySelectionMessage: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: null
|
|
104
|
+
},
|
|
105
|
+
emptyFilterMessage: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: null
|
|
108
|
+
},
|
|
109
|
+
emptyMessage: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: null
|
|
112
|
+
},
|
|
113
|
+
tabindex: {
|
|
114
|
+
type: Number,
|
|
115
|
+
default: 0
|
|
116
|
+
},
|
|
117
|
+
'aria-label': {
|
|
118
|
+
type: String,
|
|
119
|
+
default: null
|
|
120
|
+
},
|
|
121
|
+
'aria-labelledby': {
|
|
122
|
+
type: String,
|
|
123
|
+
default: null
|
|
93
124
|
}
|
|
94
125
|
},
|
|
126
|
+
outsideClickListener: null,
|
|
127
|
+
scrollHandler: null,
|
|
128
|
+
resizeListener: null,
|
|
129
|
+
overlay: null,
|
|
130
|
+
list: null,
|
|
131
|
+
virtualScroller: null,
|
|
132
|
+
startRangeIndex: -1,
|
|
133
|
+
searchTimeout: null,
|
|
134
|
+
searchValue: '',
|
|
135
|
+
selectOnFocus: false,
|
|
136
|
+
focusOnHover: false,
|
|
95
137
|
data() {
|
|
96
138
|
return {
|
|
139
|
+
id: UniqueComponentId(),
|
|
97
140
|
focused: false,
|
|
141
|
+
focusedOptionIndex: -1,
|
|
98
142
|
headerCheckboxFocused: false,
|
|
99
143
|
filterValue: null,
|
|
100
144
|
overlayVisible: false
|
|
101
|
-
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
watch: {
|
|
148
|
+
options() {
|
|
149
|
+
this.autoUpdateModel();
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
mounted() {
|
|
153
|
+
this.id = this.$attrs.id || this.id;
|
|
154
|
+
|
|
155
|
+
this.autoUpdateModel();
|
|
102
156
|
},
|
|
103
|
-
outsideClickListener: null,
|
|
104
|
-
resizeListener: null,
|
|
105
|
-
scrollHandler: null,
|
|
106
|
-
overlay: null,
|
|
107
|
-
virtualScroller: null,
|
|
108
157
|
beforeUnmount() {
|
|
109
158
|
this.unbindOutsideClickListener();
|
|
110
159
|
this.unbindResizeListener();
|
|
@@ -132,15 +181,6 @@ var script = {
|
|
|
132
181
|
getOptionRenderKey(option) {
|
|
133
182
|
return this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option);
|
|
134
183
|
},
|
|
135
|
-
getOptionGroupRenderKey(optionGroup) {
|
|
136
|
-
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
|
|
137
|
-
},
|
|
138
|
-
getOptionGroupLabel(optionGroup) {
|
|
139
|
-
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
|
|
140
|
-
},
|
|
141
|
-
getOptionGroupChildren(optionGroup) {
|
|
142
|
-
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren);
|
|
143
|
-
},
|
|
144
184
|
isOptionDisabled(option) {
|
|
145
185
|
if (this.maxSelectionLimitReached && !this.isSelected(option)) {
|
|
146
186
|
return true;
|
|
@@ -148,109 +188,141 @@ var script = {
|
|
|
148
188
|
|
|
149
189
|
return this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
|
|
150
190
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (selectedOptionIndex !== -1) {
|
|
157
|
-
return {group: i, option: selectedOptionIndex};
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
return this.findOptionIndexInList(this.modelValue, this.options);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return -1;
|
|
191
|
+
isOptionGroup(option) {
|
|
192
|
+
return this.optionGroupLabel && option.optionGroup && option.group;
|
|
193
|
+
},
|
|
194
|
+
getOptionGroupLabel(optionGroup) {
|
|
195
|
+
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
|
|
167
196
|
},
|
|
168
|
-
|
|
169
|
-
return
|
|
197
|
+
getOptionGroupChildren(optionGroup) {
|
|
198
|
+
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren);
|
|
170
199
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
let optionValue = this.getOptionValue(option);
|
|
174
|
-
let key = this.equalityKey;
|
|
175
|
-
|
|
176
|
-
return this.modelValue.some(val => ObjectUtils.equals(val, optionValue, key));
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return false;
|
|
200
|
+
getAriaPosInset(index) {
|
|
201
|
+
return (this.optionGroupLabel ? index - this.visibleOptions.slice(0, index).filter(option => this.isOptionGroup(option)).length : index) + 1;
|
|
180
202
|
},
|
|
181
|
-
show() {
|
|
203
|
+
show(isFocus) {
|
|
182
204
|
this.$emit('before-show');
|
|
183
205
|
this.overlayVisible = true;
|
|
206
|
+
this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : (this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1);
|
|
207
|
+
|
|
208
|
+
isFocus && this.$refs.focusInput.focus();
|
|
184
209
|
},
|
|
185
|
-
hide() {
|
|
210
|
+
hide(isFocus) {
|
|
186
211
|
this.$emit('before-hide');
|
|
187
212
|
this.overlayVisible = false;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
213
|
+
this.focusedOptionIndex = -1;
|
|
214
|
+
this.searchValue = '';
|
|
215
|
+
|
|
216
|
+
this.resetFilterOnHide && (this.filterValue = null);
|
|
217
|
+
isFocus && this.$refs.focusInput.focus();
|
|
191
218
|
},
|
|
192
|
-
onFocus() {
|
|
219
|
+
onFocus(event) {
|
|
193
220
|
this.focused = true;
|
|
221
|
+
this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
222
|
+
this.overlayVisible && this.scrollInView(this.focusedOptionIndex);
|
|
223
|
+
this.$emit('focus', event);
|
|
194
224
|
},
|
|
195
|
-
onBlur() {
|
|
225
|
+
onBlur(event) {
|
|
196
226
|
this.focused = false;
|
|
227
|
+
this.focusedOptionIndex = -1;
|
|
228
|
+
this.searchValue = '';
|
|
229
|
+
this.$emit('blur', event);
|
|
197
230
|
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
231
|
+
onKeyDown(event) {
|
|
232
|
+
switch (event.code) {
|
|
233
|
+
case 'ArrowDown':
|
|
234
|
+
this.onArrowDownKey(event);
|
|
235
|
+
break;
|
|
236
|
+
|
|
237
|
+
case 'ArrowUp':
|
|
238
|
+
this.onArrowUpKey(event);
|
|
239
|
+
break;
|
|
240
|
+
|
|
241
|
+
case 'Home':
|
|
242
|
+
this.onHomeKey(event);
|
|
243
|
+
break;
|
|
244
|
+
|
|
245
|
+
case 'End':
|
|
246
|
+
this.onEndKey(event);
|
|
247
|
+
break;
|
|
248
|
+
|
|
249
|
+
case 'PageDown':
|
|
250
|
+
this.onPageDownKey(event);
|
|
251
|
+
break;
|
|
252
|
+
|
|
253
|
+
case 'PageUp':
|
|
254
|
+
this.onPageUpKey(event);
|
|
255
|
+
break;
|
|
256
|
+
|
|
257
|
+
case 'Enter':
|
|
258
|
+
case 'Space':
|
|
259
|
+
this.onEnterKey(event);
|
|
260
|
+
break;
|
|
261
|
+
|
|
262
|
+
case 'Escape':
|
|
263
|
+
this.onEscapeKey(event);
|
|
264
|
+
break;
|
|
265
|
+
|
|
266
|
+
case 'Tab':
|
|
267
|
+
this.onTabKey(event);
|
|
268
|
+
break;
|
|
269
|
+
|
|
270
|
+
case 'ShiftLeft':
|
|
271
|
+
case 'ShiftRight':
|
|
272
|
+
this.onShiftKey(event);
|
|
273
|
+
break;
|
|
274
|
+
|
|
275
|
+
default:
|
|
276
|
+
if (event.code === 'KeyA' && (event.metaKey || event.ctrlKey)) {
|
|
277
|
+
const value = this.visibleOptions.filter(option => this.isValidOption(option)).map(option => this.getOptionValue(option));
|
|
278
|
+
this.updateModel(event, value);
|
|
279
|
+
|
|
280
|
+
event.preventDefault();
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (ObjectUtils.isPrintableCharacter(event.key)) {
|
|
285
|
+
!this.overlayVisible && this.show();
|
|
286
|
+
this.searchOptions(event);
|
|
287
|
+
event.preventDefault();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
203
292
|
},
|
|
204
|
-
|
|
293
|
+
onContainerClick(event) {
|
|
205
294
|
if (this.disabled || this.loading) {
|
|
206
295
|
return;
|
|
207
296
|
}
|
|
208
297
|
|
|
209
|
-
if (
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
298
|
+
if (!this.overlay || !this.overlay.contains(event.target)) {
|
|
299
|
+
this.overlayVisible ? this.hide(true) : this.show(true);
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
onFirstHiddenFocus(event) {
|
|
303
|
+
const relatedTarget = event.relatedTarget;
|
|
215
304
|
|
|
305
|
+
if (relatedTarget === this.$refs.focusInput) {
|
|
306
|
+
const firstFocusableEl = DomHandler.getFirstFocusableElement(this.overlay, ':not(.p-hidden-focusable)');
|
|
307
|
+
firstFocusableEl && firstFocusableEl.focus();
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
216
310
|
this.$refs.focusInput.focus();
|
|
217
311
|
}
|
|
218
312
|
},
|
|
313
|
+
onLastHiddenFocus() {
|
|
314
|
+
this.$refs.firstHiddenFocusableElementOnOverlay.focus();
|
|
315
|
+
},
|
|
219
316
|
onCloseClick() {
|
|
220
|
-
this.hide();
|
|
317
|
+
this.hide(true);
|
|
221
318
|
},
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
this.show();
|
|
228
|
-
}
|
|
229
|
-
break;
|
|
230
|
-
|
|
231
|
-
//space
|
|
232
|
-
case 32:
|
|
233
|
-
if (!this.overlayVisible) {
|
|
234
|
-
this.show();
|
|
235
|
-
event.preventDefault();
|
|
236
|
-
}
|
|
237
|
-
break;
|
|
238
|
-
|
|
239
|
-
//escape
|
|
240
|
-
case 27:
|
|
241
|
-
if (this.overlayVisible) {
|
|
242
|
-
this.hide();
|
|
243
|
-
event.preventDefault();
|
|
244
|
-
}
|
|
245
|
-
break;
|
|
246
|
-
|
|
247
|
-
//tab
|
|
248
|
-
case 9:
|
|
249
|
-
this.hide();
|
|
250
|
-
break;
|
|
251
|
-
}
|
|
319
|
+
onHeaderCheckboxFocus() {
|
|
320
|
+
this.headerCheckboxFocused = true;
|
|
321
|
+
},
|
|
322
|
+
onHeaderCheckboxBlur() {
|
|
323
|
+
this.headerCheckboxFocused = false;
|
|
252
324
|
},
|
|
253
|
-
onOptionSelect(event, option) {
|
|
325
|
+
onOptionSelect(event, option, index = -1, isFocus = false) {
|
|
254
326
|
if (this.disabled || this.isOptionDisabled(option)) {
|
|
255
327
|
return;
|
|
256
328
|
}
|
|
@@ -263,84 +335,235 @@ var script = {
|
|
|
263
335
|
else
|
|
264
336
|
value = [...(this.modelValue || []), this.getOptionValue(option)];
|
|
265
337
|
|
|
266
|
-
this
|
|
267
|
-
this.$
|
|
338
|
+
this.updateModel(event, value);
|
|
339
|
+
isFocus && this.$refs.focusInput.focus();
|
|
340
|
+
index !== -1 && (this.focusedOptionIndex = index);
|
|
268
341
|
},
|
|
269
|
-
|
|
270
|
-
|
|
342
|
+
onOptionMouseMove(event, index) {
|
|
343
|
+
if (this.focusOnHover) {
|
|
344
|
+
this.changeFocusedOptionIndex(event, index);
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
onOptionSelectRange(event, start = -1, end = -1) {
|
|
348
|
+
start === -1 && (start = this.findNearestSelectedOptionIndex(end, true));
|
|
349
|
+
end === -1 && (end = this.findNearestSelectedOptionIndex(start));
|
|
271
350
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
if (nextItem) {
|
|
277
|
-
nextItem.focus();
|
|
278
|
-
}
|
|
351
|
+
if (start !== -1 && end !== -1) {
|
|
352
|
+
const rangeStart = Math.min(start, end);
|
|
353
|
+
const rangeEnd = Math.max(start, end);
|
|
354
|
+
const value = this.visibleOptions.slice(rangeStart, rangeEnd + 1).filter(option => this.isValidOption(option)).map(option => this.getOptionValue(option));
|
|
279
355
|
|
|
280
|
-
|
|
281
|
-
|
|
356
|
+
this.updateModel(event, value);
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
onFilterChange(event) {
|
|
360
|
+
const value = event.target.value;
|
|
282
361
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
if (prevItem) {
|
|
287
|
-
prevItem.focus();
|
|
288
|
-
}
|
|
362
|
+
this.filterValue = value;
|
|
363
|
+
this.focusedOptionIndex = -1;
|
|
364
|
+
this.$emit('filter', { originalEvent: event, value });
|
|
289
365
|
|
|
290
|
-
|
|
291
|
-
|
|
366
|
+
!this.virtualScrollerDisabled && this.virtualScroller.scrollToIndex(0);
|
|
367
|
+
},
|
|
368
|
+
onFilterKeyDown(event) {
|
|
369
|
+
switch (event.code) {
|
|
370
|
+
case 'ArrowDown':
|
|
371
|
+
this.onArrowDownKey(event);
|
|
372
|
+
break;
|
|
292
373
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
374
|
+
case 'ArrowUp':
|
|
375
|
+
this.onArrowUpKey(event, true);
|
|
376
|
+
break;
|
|
377
|
+
|
|
378
|
+
case 'ArrowLeft':
|
|
379
|
+
case 'ArrowRight':
|
|
380
|
+
this.onArrowLeftKey(event, true);
|
|
381
|
+
break;
|
|
382
|
+
|
|
383
|
+
case 'Home':
|
|
384
|
+
this.onHomeKey(event, true);
|
|
385
|
+
break;
|
|
386
|
+
|
|
387
|
+
case 'End':
|
|
388
|
+
this.onEndKey(event, true);
|
|
389
|
+
break;
|
|
390
|
+
|
|
391
|
+
case 'Enter':
|
|
392
|
+
this.onEnterKey(event);
|
|
393
|
+
break;
|
|
394
|
+
|
|
395
|
+
case 'Escape':
|
|
396
|
+
this.onEscapeKey(event);
|
|
397
|
+
break;
|
|
398
|
+
|
|
399
|
+
case 'Tab':
|
|
400
|
+
this.onTabKey(event, true);
|
|
401
|
+
break;
|
|
298
402
|
}
|
|
299
403
|
},
|
|
300
|
-
|
|
301
|
-
|
|
404
|
+
onFilterBlur() {
|
|
405
|
+
this.focusedOptionIndex = -1;
|
|
406
|
+
},
|
|
407
|
+
onFilterUpdated() {
|
|
408
|
+
if (this.overlayVisible) {
|
|
409
|
+
this.alignOverlay();
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
onOverlayClick(event) {
|
|
413
|
+
OverlayEventBus.emit('overlay-click', {
|
|
414
|
+
originalEvent: event,
|
|
415
|
+
target: this.$el
|
|
416
|
+
});
|
|
417
|
+
},
|
|
418
|
+
onOverlayKeyDown(event) {
|
|
419
|
+
switch (event.code) {
|
|
420
|
+
case 'Escape':
|
|
421
|
+
this.onEscapeKey(event);
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
onArrowDownKey(event) {
|
|
426
|
+
const optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.findFirstFocusedOptionIndex();
|
|
302
427
|
|
|
303
|
-
if (
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
428
|
+
if (event.shiftKey) {
|
|
429
|
+
this.onOptionSelectRange(event, this.startRangeIndex, optionIndex);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
433
|
+
|
|
434
|
+
!this.overlayVisible && this.show();
|
|
435
|
+
event.preventDefault();
|
|
307
436
|
},
|
|
308
|
-
|
|
309
|
-
|
|
437
|
+
onArrowUpKey(event, pressedInInputText = false) {
|
|
438
|
+
if (event.altKey && !pressedInInputText) {
|
|
439
|
+
if (this.focusedOptionIndex !== -1) {
|
|
440
|
+
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
|
441
|
+
}
|
|
310
442
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
443
|
+
this.overlayVisible && this.hide();
|
|
444
|
+
event.preventDefault();
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
const optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.findLastFocusedOptionIndex();
|
|
448
|
+
|
|
449
|
+
if (event.shiftKey) {
|
|
450
|
+
this.onOptionSelectRange(event, optionIndex, this.startRangeIndex);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
454
|
+
|
|
455
|
+
!this.overlayVisible && this.show();
|
|
456
|
+
event.preventDefault();
|
|
457
|
+
}
|
|
315
458
|
},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
459
|
+
onArrowLeftKey(event, pressedInInputText = false) {
|
|
460
|
+
pressedInInputText && (this.focusedOptionIndex = -1);
|
|
461
|
+
},
|
|
462
|
+
onHomeKey(event, pressedInInputText = false) {
|
|
463
|
+
if (pressedInInputText) {
|
|
464
|
+
event.currentTarget.setSelectionRange(0, 0);
|
|
465
|
+
this.focusedOptionIndex = -1;
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
let metaKey = event.metaKey || event.ctrlKey;
|
|
469
|
+
let optionIndex = this.findFirstOptionIndex();
|
|
319
470
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
if (selectedIndex !== -1) {
|
|
323
|
-
setTimeout(() => {
|
|
324
|
-
this.virtualScroller && this.virtualScroller.scrollToIndex(selectedIndex);
|
|
325
|
-
}, 0);
|
|
471
|
+
if (event.shiftKey && metaKey) {
|
|
472
|
+
this.onOptionSelectRange(event, optionIndex, this.startRangeIndex);
|
|
326
473
|
}
|
|
474
|
+
|
|
475
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
476
|
+
|
|
477
|
+
!this.overlayVisible && this.show();
|
|
327
478
|
}
|
|
479
|
+
|
|
480
|
+
event.preventDefault();
|
|
481
|
+
},
|
|
482
|
+
onEndKey(event, pressedInInputText = false) {
|
|
483
|
+
if (pressedInInputText) {
|
|
484
|
+
const target = event.currentTarget;
|
|
485
|
+
const len = target.value.length;
|
|
486
|
+
target.setSelectionRange(len, len);
|
|
487
|
+
this.focusedOptionIndex = -1;
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
let metaKey = event.metaKey || event.ctrlKey;
|
|
491
|
+
let optionIndex = this.findLastOptionIndex();
|
|
492
|
+
|
|
493
|
+
if (event.shiftKey && metaKey) {
|
|
494
|
+
this.onOptionSelectRange(event, this.startRangeIndex, optionIndex);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
498
|
+
|
|
499
|
+
!this.overlayVisible && this.show();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
event.preventDefault();
|
|
503
|
+
},
|
|
504
|
+
onPageUpKey(event) {
|
|
505
|
+
this.scrollInView(0);
|
|
506
|
+
event.preventDefault();
|
|
507
|
+
},
|
|
508
|
+
onPageDownKey(event) {
|
|
509
|
+
this.scrollInView(this.visibleOptions.length - 1);
|
|
510
|
+
event.preventDefault();
|
|
511
|
+
},
|
|
512
|
+
onEnterKey(event) {
|
|
513
|
+
if (!this.overlayVisible) {
|
|
514
|
+
this.onArrowDownKey(event);
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
if (this.focusedOptionIndex !== -1) {
|
|
518
|
+
if (event.shiftKey)
|
|
519
|
+
this.onOptionSelectRange(event, this.focusedOptionIndex);
|
|
520
|
+
else
|
|
521
|
+
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
event.preventDefault();
|
|
526
|
+
},
|
|
527
|
+
onEscapeKey(event) {
|
|
528
|
+
this.overlayVisible && this.hide(true);
|
|
529
|
+
event.preventDefault();
|
|
530
|
+
},
|
|
531
|
+
onTabKey(event, pressedInInputText = false) {
|
|
532
|
+
if (!pressedInInputText) {
|
|
533
|
+
if (this.overlayVisible && this.hasFocusableElements()) {
|
|
534
|
+
this.$refs.firstHiddenFocusableElementOnOverlay.focus();
|
|
535
|
+
|
|
536
|
+
event.preventDefault();
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
if (this.focusedOptionIndex !== -1) {
|
|
540
|
+
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
this.overlayVisible && this.hide(this.filter);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
onShiftKey() {
|
|
548
|
+
this.startRangeIndex = this.focusedOptionIndex;
|
|
549
|
+
},
|
|
550
|
+
onOverlayEnter(el) {
|
|
551
|
+
ZIndexUtils.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
552
|
+
this.alignOverlay();
|
|
553
|
+
this.scrollInView();
|
|
328
554
|
},
|
|
329
555
|
onOverlayAfterEnter() {
|
|
330
556
|
this.bindOutsideClickListener();
|
|
331
557
|
this.bindScrollListener();
|
|
332
558
|
this.bindResizeListener();
|
|
333
559
|
|
|
334
|
-
if (this.filter) {
|
|
335
|
-
this.$refs.filterInput.focus();
|
|
336
|
-
}
|
|
337
|
-
|
|
338
560
|
this.$emit('show');
|
|
339
561
|
},
|
|
340
562
|
onOverlayLeave() {
|
|
341
563
|
this.unbindOutsideClickListener();
|
|
342
564
|
this.unbindScrollListener();
|
|
343
565
|
this.unbindResizeListener();
|
|
566
|
+
|
|
344
567
|
this.$emit('hide');
|
|
345
568
|
this.overlay = null;
|
|
346
569
|
},
|
|
@@ -407,34 +630,9 @@ var script = {
|
|
|
407
630
|
isOutsideClicked(event) {
|
|
408
631
|
return !(this.$el.isSameNode(event.target) || this.$el.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
|
|
409
632
|
},
|
|
410
|
-
getLabelByValue(
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
if (this.optionGroupLabel) {
|
|
414
|
-
for (let optionGroup of this.options) {
|
|
415
|
-
option = this.findOptionByValue(val, this.getOptionGroupChildren(optionGroup));
|
|
416
|
-
if (option) {
|
|
417
|
-
break;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
else {
|
|
422
|
-
option = this.findOptionByValue(val, this.options);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
return option ? this.getOptionLabel(option): null;
|
|
427
|
-
},
|
|
428
|
-
findOptionByValue(val, list) {
|
|
429
|
-
for (let option of list) {
|
|
430
|
-
let optionValue = this.getOptionValue(option);
|
|
431
|
-
|
|
432
|
-
if(ObjectUtils.equals(optionValue, val, this.equalityKey)) {
|
|
433
|
-
return option;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
return null;
|
|
633
|
+
getLabelByValue(value) {
|
|
634
|
+
const matchedOption = this.visibleOptions.find(option => !this.isOptionGroup(option) && ObjectUtils.equals(this.getOptionValue(option), value, this.equalityKey));
|
|
635
|
+
return matchedOption ? this.getOptionLabel(matchedOption): null;
|
|
438
636
|
},
|
|
439
637
|
getSelectedItemsLabel() {
|
|
440
638
|
let pattern = /{(.*?)}/;
|
|
@@ -449,85 +647,176 @@ var script = {
|
|
|
449
647
|
this.$emit('selectall-change', {originalEvent: event, checked: !this.allSelected});
|
|
450
648
|
}
|
|
451
649
|
else {
|
|
452
|
-
|
|
650
|
+
const value = this.allSelected ? [] : this.visibleOptions.filter(option => !this.isOptionGroup(option)).map(option => this.getOptionValue(option));
|
|
651
|
+
|
|
652
|
+
this.updateModel(event, value);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
this.headerCheckboxFocused = true;
|
|
656
|
+
},
|
|
657
|
+
removeOption(event, optionValue) {
|
|
658
|
+
let value = this.modelValue.filter(val => !ObjectUtils.equals(val, optionValue, this.equalityKey));
|
|
453
659
|
|
|
454
|
-
|
|
455
|
-
|
|
660
|
+
this.updateModel(event, value);
|
|
661
|
+
},
|
|
662
|
+
clearFilter() {
|
|
663
|
+
this.filterValue = null;
|
|
664
|
+
},
|
|
665
|
+
hasFocusableElements() {
|
|
666
|
+
return DomHandler.getFocusableElements(this.overlay, ':not(.p-hidden-focusable)').length > 0;
|
|
667
|
+
},
|
|
668
|
+
isOptionMatched(option) {
|
|
669
|
+
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
|
|
670
|
+
},
|
|
671
|
+
isValidOption(option) {
|
|
672
|
+
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
|
673
|
+
},
|
|
674
|
+
isValidSelectedOption(option) {
|
|
675
|
+
return this.isValidOption(option) && this.isSelected(option);
|
|
676
|
+
},
|
|
677
|
+
isSelected(option) {
|
|
678
|
+
const optionValue = this.getOptionValue(option);
|
|
679
|
+
return (this.modelValue || []).some(value => ObjectUtils.equals(value, optionValue, this.equalityKey));
|
|
680
|
+
},
|
|
681
|
+
findFirstOptionIndex() {
|
|
682
|
+
return this.visibleOptions.findIndex(option => this.isValidOption(option));
|
|
683
|
+
},
|
|
684
|
+
findLastOptionIndex() {
|
|
685
|
+
return ObjectUtils.findLastIndex(this.visibleOptions, option => this.isValidOption(option));
|
|
686
|
+
},
|
|
687
|
+
findNextOptionIndex(index) {
|
|
688
|
+
const matchedOptionIndex = index < (this.visibleOptions.length - 1) ? this.visibleOptions.slice(index + 1).findIndex(option => this.isValidOption(option)) : -1;
|
|
689
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
690
|
+
},
|
|
691
|
+
findPrevOptionIndex(index) {
|
|
692
|
+
const matchedOptionIndex = index > 0 ? ObjectUtils.findLastIndex(this.visibleOptions.slice(0, index), option => this.isValidOption(option)) : -1;
|
|
693
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
694
|
+
},
|
|
695
|
+
findFirstSelectedOptionIndex() {
|
|
696
|
+
return this.hasSelectedOption ? this.visibleOptions.findIndex(option => this.isValidSelectedOption(option)) : -1;
|
|
697
|
+
},
|
|
698
|
+
findLastSelectedOptionIndex() {
|
|
699
|
+
return this.hasSelectedOption ? ObjectUtils.findLastIndex(this.visibleOptions, option => this.isValidSelectedOption(option)) : -1;
|
|
700
|
+
},
|
|
701
|
+
findNextSelectedOptionIndex(index) {
|
|
702
|
+
const matchedOptionIndex = this.hasSelectedOption && index < (this.visibleOptions.length - 1) ? this.visibleOptions.slice(index + 1).findIndex(option => this.isValidSelectedOption(option)) : -1;
|
|
703
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
|
|
704
|
+
},
|
|
705
|
+
findPrevSelectedOptionIndex(index) {
|
|
706
|
+
const matchedOptionIndex = this.hasSelectedOption && index > 0 ? ObjectUtils.findLastIndex(this.visibleOptions.slice(0, index), option => this.isValidSelectedOption(option)) : -1;
|
|
707
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
|
|
708
|
+
},
|
|
709
|
+
findNearestSelectedOptionIndex(index, firstCheckUp = false) {
|
|
710
|
+
let matchedOptionIndex = -1;
|
|
711
|
+
|
|
712
|
+
if (this.hasSelectedOption) {
|
|
713
|
+
if (firstCheckUp) {
|
|
714
|
+
matchedOptionIndex = this.findPrevSelectedOptionIndex(index);
|
|
715
|
+
matchedOptionIndex = matchedOptionIndex === -1 ? this.findNextSelectedOptionIndex(index) : matchedOptionIndex;
|
|
456
716
|
}
|
|
457
|
-
else
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
this.visibleOptions.forEach(optionGroup => {
|
|
461
|
-
for (let option of this.getOptionGroupChildren(optionGroup)) {
|
|
462
|
-
value.push(this.getOptionValue(option));
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
value = this.visibleOptions.map(option => this.getOptionValue(option));
|
|
468
|
-
}
|
|
717
|
+
else {
|
|
718
|
+
matchedOptionIndex = this.findNextSelectedOptionIndex(index);
|
|
719
|
+
matchedOptionIndex = matchedOptionIndex === -1 ? this.findPrevSelectedOptionIndex(index) : matchedOptionIndex;
|
|
469
720
|
}
|
|
721
|
+
}
|
|
470
722
|
|
|
471
|
-
|
|
472
|
-
|
|
723
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
724
|
+
},
|
|
725
|
+
findFirstFocusedOptionIndex() {
|
|
726
|
+
const selectedIndex = this.findFirstSelectedOptionIndex();
|
|
727
|
+
return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
|
|
728
|
+
},
|
|
729
|
+
findLastFocusedOptionIndex() {
|
|
730
|
+
const selectedIndex = this.findLastSelectedOptionIndex();
|
|
731
|
+
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
732
|
+
},
|
|
733
|
+
searchOptions(event) {
|
|
734
|
+
this.searchValue = (this.searchValue || '') + event.key;
|
|
735
|
+
|
|
736
|
+
let optionIndex = -1;
|
|
737
|
+
if (this.focusedOptionIndex !== -1) {
|
|
738
|
+
optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(option => this.isOptionMatched(option));
|
|
739
|
+
optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(option => this.isOptionMatched(option)) : optionIndex + this.focusedOptionIndex;
|
|
740
|
+
}
|
|
741
|
+
else {
|
|
742
|
+
optionIndex = this.visibleOptions.findIndex(option => this.isOptionMatched(option));
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
if (optionIndex === -1 && this.focusedOptionIndex === -1) {
|
|
746
|
+
const selectedIndex = this.findSelectedOptionIndex();
|
|
747
|
+
optionIndex = selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
if (optionIndex !== -1) {
|
|
751
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
if (this.searchTimeout) {
|
|
755
|
+
clearTimeout(this.searchTimeout);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
this.searchTimeout = setTimeout(() => {
|
|
759
|
+
this.searchValue = '';
|
|
760
|
+
this.searchTimeout = null;
|
|
761
|
+
}, 500);
|
|
762
|
+
},
|
|
763
|
+
changeFocusedOptionIndex(event, index) {
|
|
764
|
+
if (this.focusedOptionIndex !== index) {
|
|
765
|
+
this.focusedOptionIndex = index;
|
|
766
|
+
this.scrollInView();
|
|
473
767
|
}
|
|
474
768
|
},
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
769
|
+
scrollInView(index = -1) {
|
|
770
|
+
const id = index !== -1 ? `${this.id}_${index}` : this.focusedOptionId;
|
|
771
|
+
const element = DomHandler.findSingle(this.list, `li[id="${id}"]`);
|
|
772
|
+
if (element) {
|
|
773
|
+
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
774
|
+
}
|
|
775
|
+
else if (!this.virtualScrollerDisabled) {
|
|
776
|
+
this.virtualScroller && this.virtualScroller.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex);
|
|
479
777
|
}
|
|
480
778
|
},
|
|
481
|
-
|
|
482
|
-
this.
|
|
779
|
+
autoUpdateModel() {
|
|
780
|
+
if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) {
|
|
781
|
+
this.focusedOptionIndex = this.findFirstFocusedOptionIndex();
|
|
782
|
+
const value = this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]);
|
|
783
|
+
this.updateModel(null, [value]);
|
|
784
|
+
}
|
|
483
785
|
},
|
|
484
|
-
|
|
485
|
-
this
|
|
786
|
+
updateModel(event, value) {
|
|
787
|
+
this.$emit('update:modelValue', value);
|
|
788
|
+
this.$emit('change', { originalEvent: event, value });
|
|
486
789
|
},
|
|
487
|
-
|
|
488
|
-
|
|
790
|
+
flatOptions(options) {
|
|
791
|
+
return (options || []).reduce((result, option, index) => {
|
|
792
|
+
result.push({ optionGroup: option, group: true, index });
|
|
489
793
|
|
|
490
|
-
|
|
491
|
-
|
|
794
|
+
const optionGroupChildren = this.getOptionGroupChildren(option);
|
|
795
|
+
optionGroupChildren && optionGroupChildren.forEach(o => result.push(o));
|
|
796
|
+
|
|
797
|
+
return result;
|
|
798
|
+
}, []);
|
|
492
799
|
},
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
originalEvent: event,
|
|
496
|
-
target: this.$el
|
|
497
|
-
});
|
|
800
|
+
overlayRef(el) {
|
|
801
|
+
this.overlay = el;
|
|
498
802
|
},
|
|
499
|
-
|
|
500
|
-
this.
|
|
803
|
+
listRef(el, contentRef) {
|
|
804
|
+
this.list = el;
|
|
805
|
+
contentRef && contentRef(el); // For VirtualScroller
|
|
806
|
+
},
|
|
807
|
+
virtualScrollerRef(el) {
|
|
808
|
+
this.virtualScroller = el;
|
|
501
809
|
}
|
|
502
810
|
},
|
|
503
811
|
computed: {
|
|
504
|
-
visibleOptions() {
|
|
505
|
-
if (this.filterValue) {
|
|
506
|
-
if (this.optionGroupLabel) {
|
|
507
|
-
let filteredGroups = [];
|
|
508
|
-
for (let optgroup of this.options) {
|
|
509
|
-
let filteredSubOptions = FilterService.filter(this.getOptionGroupChildren(optgroup), this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
510
|
-
if (filteredSubOptions && filteredSubOptions.length) {
|
|
511
|
-
filteredGroups.push({...optgroup, ...{items: filteredSubOptions}});
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
return filteredGroups
|
|
515
|
-
}
|
|
516
|
-
else {
|
|
517
|
-
return FilterService.filter(this.options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
else {
|
|
521
|
-
return this.options;
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
812
|
containerClass() {
|
|
525
813
|
return ['p-multiselect p-component p-inputwrapper', {
|
|
526
814
|
'p-multiselect-chip': this.display === 'chip',
|
|
527
815
|
'p-disabled': this.disabled,
|
|
528
816
|
'p-focus': this.focused,
|
|
529
817
|
'p-inputwrapper-filled': this.modelValue && this.modelValue.length,
|
|
530
|
-
'p-inputwrapper-focus': this.focused || this.overlayVisible
|
|
818
|
+
'p-inputwrapper-focus': this.focused || this.overlayVisible,
|
|
819
|
+
'p-overlay-open': this.overlayVisible
|
|
531
820
|
}];
|
|
532
821
|
},
|
|
533
822
|
labelClass() {
|
|
@@ -536,13 +825,27 @@ var script = {
|
|
|
536
825
|
'p-multiselect-label-empty': !this.placeholder && (!this.modelValue || this.modelValue.length === 0)
|
|
537
826
|
}];
|
|
538
827
|
},
|
|
828
|
+
dropdownIconClass() {
|
|
829
|
+
return ['p-multiselect-trigger-icon', this.loading ? this.loadingIcon : 'pi pi-chevron-down'];
|
|
830
|
+
},
|
|
539
831
|
panelStyleClass() {
|
|
540
832
|
return ['p-multiselect-panel p-component', this.panelClass, {
|
|
541
833
|
'p-input-filled': this.$primevue.config.inputStyle === 'filled',
|
|
542
834
|
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
543
835
|
}];
|
|
544
836
|
},
|
|
545
|
-
|
|
837
|
+
headerCheckboxClass() {
|
|
838
|
+
return ['p-checkbox p-component', {
|
|
839
|
+
'p-checkbox-checked': this.allSelected,
|
|
840
|
+
'p-checkbox-focused': this.headerCheckboxFocused
|
|
841
|
+
}];
|
|
842
|
+
},
|
|
843
|
+
visibleOptions() {
|
|
844
|
+
const options = this.optionGroupLabel ? this.flatOptions(this.options) : (this.options || []);
|
|
845
|
+
|
|
846
|
+
return this.filterValue ? FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale) : options;
|
|
847
|
+
},
|
|
848
|
+
label() { // TODO: Refactor
|
|
546
849
|
let label;
|
|
547
850
|
|
|
548
851
|
if (this.modelValue && this.modelValue.length) {
|
|
@@ -551,8 +854,8 @@ var script = {
|
|
|
551
854
|
}
|
|
552
855
|
else {
|
|
553
856
|
label = '';
|
|
554
|
-
for(let i = 0; i < this.modelValue.length; i++) {
|
|
555
|
-
if(i !== 0) {
|
|
857
|
+
for (let i = 0; i < this.modelValue.length; i++) {
|
|
858
|
+
if (i !== 0) {
|
|
556
859
|
label += ', ';
|
|
557
860
|
}
|
|
558
861
|
|
|
@@ -567,48 +870,10 @@ var script = {
|
|
|
567
870
|
return label;
|
|
568
871
|
},
|
|
569
872
|
allSelected() {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
if (this.filterValue && this.filterValue.trim().length > 0) {
|
|
575
|
-
if (this.visibleOptions.length === 0) {
|
|
576
|
-
return false;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
if (this.optionGroupLabel) {
|
|
580
|
-
for (let optionGroup of this.visibleOptions) {
|
|
581
|
-
for (let option of this.getOptionGroupChildren(optionGroup)) {
|
|
582
|
-
if (!this.isSelected(option)) {
|
|
583
|
-
return false;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
else {
|
|
589
|
-
for (let option of this.visibleOptions) {
|
|
590
|
-
if (!this.isSelected(option)) {
|
|
591
|
-
return false;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
return true;
|
|
597
|
-
}
|
|
598
|
-
else {
|
|
599
|
-
if (this.modelValue && this.options) {
|
|
600
|
-
let optionCount = 0;
|
|
601
|
-
if (this.optionGroupLabel)
|
|
602
|
-
this.options.forEach(optionGroup => optionCount += this.getOptionGroupChildren(optionGroup).length);
|
|
603
|
-
else
|
|
604
|
-
optionCount = this.options.length;
|
|
605
|
-
|
|
606
|
-
return optionCount > 0 && optionCount === this.modelValue.length;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
return false;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
873
|
+
return (this.selectAll !== null) ? this.selectAll : (ObjectUtils.isNotEmpty(this.visibleOptions) && this.visibleOptions.every(option => this.isOptionGroup(option) || this.isValidSelectedOption(option)));
|
|
874
|
+
},
|
|
875
|
+
hasSelectedOption() {
|
|
876
|
+
return ObjectUtils.isNotEmpty(this.modelValue);
|
|
612
877
|
},
|
|
613
878
|
equalityKey() {
|
|
614
879
|
return this.optionValue ? null : this.dataKey;
|
|
@@ -616,20 +881,44 @@ var script = {
|
|
|
616
881
|
searchFields() {
|
|
617
882
|
return this.filterFields || [this.optionLabel];
|
|
618
883
|
},
|
|
884
|
+
maxSelectionLimitReached() {
|
|
885
|
+
return this.selectionLimit && (this.modelValue && this.modelValue.length === this.selectionLimit);
|
|
886
|
+
},
|
|
887
|
+
filterResultMessageText() {
|
|
888
|
+
return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText;
|
|
889
|
+
},
|
|
890
|
+
filterMessageText() {
|
|
891
|
+
return this.filterMessage || this.$primevue.config.locale.searchMessage || '';
|
|
892
|
+
},
|
|
619
893
|
emptyFilterMessageText() {
|
|
620
|
-
return this.emptyFilterMessage || this.$primevue.config.locale.emptyFilterMessage;
|
|
894
|
+
return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage || '';
|
|
621
895
|
},
|
|
622
896
|
emptyMessageText() {
|
|
623
|
-
return this.emptyMessage || this.$primevue.config.locale.emptyMessage;
|
|
897
|
+
return this.emptyMessage || this.$primevue.config.locale.emptyMessage || '';
|
|
624
898
|
},
|
|
625
|
-
|
|
626
|
-
return
|
|
899
|
+
selectionMessageText() {
|
|
900
|
+
return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';
|
|
627
901
|
},
|
|
628
|
-
|
|
629
|
-
return this.
|
|
902
|
+
emptySelectionMessageText() {
|
|
903
|
+
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
|
|
630
904
|
},
|
|
631
|
-
|
|
632
|
-
return
|
|
905
|
+
selectedMessageText() {
|
|
906
|
+
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.modelValue.length) : this.emptySelectionMessageText;
|
|
907
|
+
},
|
|
908
|
+
focusedOptionId() {
|
|
909
|
+
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
|
910
|
+
},
|
|
911
|
+
ariaSetSize() {
|
|
912
|
+
return this.visibleOptions.filter(option => !this.isOptionGroup(option)).length;
|
|
913
|
+
},
|
|
914
|
+
toggleAllAriaLabel() {
|
|
915
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria[this.allSelected ? 'selectAll' : 'unselectAll'] : undefined;
|
|
916
|
+
},
|
|
917
|
+
closeAriaLabel() {
|
|
918
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
|
919
|
+
},
|
|
920
|
+
virtualScrollerDisabled() {
|
|
921
|
+
return !this.virtualScrollerOptions;
|
|
633
922
|
}
|
|
634
923
|
},
|
|
635
924
|
directives: {
|
|
@@ -642,7 +931,7 @@ var script = {
|
|
|
642
931
|
};
|
|
643
932
|
|
|
644
933
|
const _hoisted_1 = { class: "p-hidden-accessible" };
|
|
645
|
-
const _hoisted_2 = ["id", "disabled", "tabindex", "aria-
|
|
934
|
+
const _hoisted_2 = ["id", "disabled", "placeholder", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant"];
|
|
646
935
|
const _hoisted_3 = { class: "p-multiselect-label-container" };
|
|
647
936
|
const _hoisted_4 = { class: "p-multiselect-token-label" };
|
|
648
937
|
const _hoisted_5 = ["onClick"];
|
|
@@ -651,31 +940,49 @@ const _hoisted_7 = {
|
|
|
651
940
|
key: 0,
|
|
652
941
|
class: "p-multiselect-header"
|
|
653
942
|
};
|
|
654
|
-
const _hoisted_8 =
|
|
655
|
-
const _hoisted_9 =
|
|
656
|
-
const _hoisted_10 =
|
|
657
|
-
const _hoisted_11 = {
|
|
943
|
+
const _hoisted_8 = { class: "p-hidden-accessible" };
|
|
944
|
+
const _hoisted_9 = ["checked", "aria-label"];
|
|
945
|
+
const _hoisted_10 = {
|
|
658
946
|
key: 1,
|
|
659
947
|
class: "p-multiselect-filter-container"
|
|
660
948
|
};
|
|
661
|
-
const
|
|
662
|
-
const
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
|
|
949
|
+
const _hoisted_11 = ["value", "placeholder", "aria-owns", "aria-activedescendant"];
|
|
950
|
+
const _hoisted_12 = /*#__PURE__*/createElementVNode("span", { class: "p-multiselect-filter-icon pi pi-search" }, null, -1);
|
|
951
|
+
const _hoisted_13 = {
|
|
952
|
+
key: 2,
|
|
953
|
+
role: "status",
|
|
954
|
+
"aria-live": "polite",
|
|
955
|
+
class: "p-hidden-accessible"
|
|
956
|
+
};
|
|
957
|
+
const _hoisted_14 = ["aria-label"];
|
|
958
|
+
const _hoisted_15 = /*#__PURE__*/createElementVNode("span", { class: "p-multiselect-close-icon pi pi-times" }, null, -1);
|
|
959
|
+
const _hoisted_16 = [
|
|
960
|
+
_hoisted_15
|
|
666
961
|
];
|
|
667
|
-
const
|
|
668
|
-
const
|
|
669
|
-
const
|
|
670
|
-
const _hoisted_19 = ["aria-selected", "onClick", "onKeydown", "tabindex", "aria-label"];
|
|
962
|
+
const _hoisted_17 = ["id"];
|
|
963
|
+
const _hoisted_18 = ["id"];
|
|
964
|
+
const _hoisted_19 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove"];
|
|
671
965
|
const _hoisted_20 = { class: "p-checkbox p-component" };
|
|
672
966
|
const _hoisted_21 = {
|
|
673
|
-
key:
|
|
674
|
-
class: "p-multiselect-empty-message"
|
|
967
|
+
key: 0,
|
|
968
|
+
class: "p-multiselect-empty-message",
|
|
969
|
+
role: "option"
|
|
675
970
|
};
|
|
676
971
|
const _hoisted_22 = {
|
|
677
|
-
key:
|
|
678
|
-
class: "p-multiselect-empty-message"
|
|
972
|
+
key: 1,
|
|
973
|
+
class: "p-multiselect-empty-message",
|
|
974
|
+
role: "option"
|
|
975
|
+
};
|
|
976
|
+
const _hoisted_23 = {
|
|
977
|
+
key: 0,
|
|
978
|
+
role: "status",
|
|
979
|
+
"aria-live": "polite",
|
|
980
|
+
class: "p-hidden-accessible"
|
|
981
|
+
};
|
|
982
|
+
const _hoisted_24 = {
|
|
983
|
+
role: "status",
|
|
984
|
+
"aria-live": "polite",
|
|
985
|
+
class: "p-hidden-accessible"
|
|
679
986
|
};
|
|
680
987
|
|
|
681
988
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -686,24 +993,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
686
993
|
return (openBlock(), createElementBlock("div", {
|
|
687
994
|
ref: "container",
|
|
688
995
|
class: normalizeClass($options.containerClass),
|
|
689
|
-
onClick: _cache[
|
|
996
|
+
onClick: _cache[15] || (_cache[15] = (...args) => ($options.onContainerClick && $options.onContainerClick(...args)))
|
|
690
997
|
}, [
|
|
691
998
|
createElementVNode("div", _hoisted_1, [
|
|
692
|
-
createElementVNode("input", {
|
|
999
|
+
createElementVNode("input", mergeProps({
|
|
693
1000
|
ref: "focusInput",
|
|
694
|
-
type: "text",
|
|
695
|
-
role: "listbox",
|
|
696
1001
|
id: $props.inputId,
|
|
1002
|
+
type: "text",
|
|
697
1003
|
readonly: "",
|
|
698
1004
|
disabled: $props.disabled,
|
|
1005
|
+
placeholder: $props.placeholder,
|
|
1006
|
+
tabindex: !$props.disabled ? $props.tabindex : -1,
|
|
1007
|
+
role: "combobox",
|
|
1008
|
+
"aria-label": _ctx.ariaLabel,
|
|
1009
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
1010
|
+
"aria-haspopup": "listbox",
|
|
1011
|
+
"aria-expanded": $data.overlayVisible,
|
|
1012
|
+
"aria-controls": $data.id + '_list',
|
|
1013
|
+
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
699
1014
|
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
700
1015
|
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
701
|
-
onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args)))
|
|
702
|
-
|
|
703
|
-
"aria-haspopup": "true",
|
|
704
|
-
"aria-expanded": $data.overlayVisible,
|
|
705
|
-
"aria-labelledby": $props.ariaLabelledBy
|
|
706
|
-
}, null, 40, _hoisted_2)
|
|
1016
|
+
onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args)))
|
|
1017
|
+
}, $props.inputProps), null, 16, _hoisted_2)
|
|
707
1018
|
]),
|
|
708
1019
|
createElementVNode("div", _hoisted_3, [
|
|
709
1020
|
createElementVNode("div", {
|
|
@@ -731,7 +1042,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
731
1042
|
? (openBlock(), createElementBlock("span", {
|
|
732
1043
|
key: 0,
|
|
733
1044
|
class: "p-multiselect-token-icon pi pi-times-circle",
|
|
734
|
-
onClick: $event => ($options.
|
|
1045
|
+
onClick: $event => ($options.removeOption($event, item))
|
|
735
1046
|
}, null, 8, _hoisted_5))
|
|
736
1047
|
: createCommentVNode("", true)
|
|
737
1048
|
]))
|
|
@@ -749,7 +1060,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
749
1060
|
createElementVNode("div", _hoisted_6, [
|
|
750
1061
|
renderSlot(_ctx.$slots, "indicator", {}, () => [
|
|
751
1062
|
createElementVNode("span", {
|
|
752
|
-
class: normalizeClass($options.dropdownIconClass)
|
|
1063
|
+
class: normalizeClass($options.dropdownIconClass),
|
|
1064
|
+
"aria-hidden": "true"
|
|
753
1065
|
}, null, 2)
|
|
754
1066
|
])
|
|
755
1067
|
]),
|
|
@@ -764,12 +1076,22 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
764
1076
|
}, {
|
|
765
1077
|
default: withCtx(() => [
|
|
766
1078
|
($data.overlayVisible)
|
|
767
|
-
? (openBlock(), createElementBlock("div", {
|
|
1079
|
+
? (openBlock(), createElementBlock("div", mergeProps({
|
|
768
1080
|
key: 0,
|
|
769
1081
|
ref: $options.overlayRef,
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
1082
|
+
style: $props.panelStyle,
|
|
1083
|
+
class: $options.panelStyleClass,
|
|
1084
|
+
onClick: _cache[13] || (_cache[13] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args))),
|
|
1085
|
+
onKeydown: _cache[14] || (_cache[14] = (...args) => ($options.onOverlayKeyDown && $options.onOverlayKeyDown(...args)))
|
|
1086
|
+
}, $props.panelProps), [
|
|
1087
|
+
createElementVNode("span", {
|
|
1088
|
+
ref: "firstHiddenFocusableElementOnOverlay",
|
|
1089
|
+
role: "presentation",
|
|
1090
|
+
"aria-hidden": "true",
|
|
1091
|
+
class: "p-hidden-accessible p-hidden-focusable",
|
|
1092
|
+
tabindex: 0,
|
|
1093
|
+
onFocus: _cache[3] || (_cache[3] = (...args) => ($options.onFirstHiddenFocus && $options.onFirstHiddenFocus(...args)))
|
|
1094
|
+
}, null, 544),
|
|
773
1095
|
renderSlot(_ctx.$slots, "header", {
|
|
774
1096
|
value: $props.modelValue,
|
|
775
1097
|
options: $options.visibleOptions
|
|
@@ -779,51 +1101,57 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
779
1101
|
($props.showToggleAll && $props.selectionLimit == null)
|
|
780
1102
|
? (openBlock(), createElementBlock("div", {
|
|
781
1103
|
key: 0,
|
|
782
|
-
class:
|
|
783
|
-
onClick: _cache[
|
|
784
|
-
role: "checkbox",
|
|
785
|
-
"aria-checked": $options.allSelected
|
|
1104
|
+
class: normalizeClass($options.headerCheckboxClass),
|
|
1105
|
+
onClick: _cache[6] || (_cache[6] = (...args) => ($options.onToggleAll && $options.onToggleAll(...args)))
|
|
786
1106
|
}, [
|
|
787
|
-
createElementVNode("div",
|
|
1107
|
+
createElementVNode("div", _hoisted_8, [
|
|
788
1108
|
createElementVNode("input", {
|
|
789
1109
|
type: "checkbox",
|
|
790
1110
|
readonly: "",
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
1111
|
+
checked: $options.allSelected,
|
|
1112
|
+
"aria-label": $options.toggleAllAriaLabel,
|
|
1113
|
+
onFocus: _cache[4] || (_cache[4] = (...args) => ($options.onHeaderCheckboxFocus && $options.onHeaderCheckboxFocus(...args))),
|
|
1114
|
+
onBlur: _cache[5] || (_cache[5] = (...args) => ($options.onHeaderCheckboxBlur && $options.onHeaderCheckboxBlur(...args)))
|
|
1115
|
+
}, null, 40, _hoisted_9)
|
|
794
1116
|
]),
|
|
795
1117
|
createElementVNode("div", {
|
|
796
|
-
class: normalizeClass(['p-checkbox-box', {'p-highlight': $options.allSelected, 'p-focus': $data.headerCheckboxFocused}])
|
|
797
|
-
role: "checkbox",
|
|
798
|
-
"aria-checked": $options.allSelected
|
|
1118
|
+
class: normalizeClass(['p-checkbox-box', {'p-highlight': $options.allSelected, 'p-focus': $data.headerCheckboxFocused}])
|
|
799
1119
|
}, [
|
|
800
1120
|
createElementVNode("span", {
|
|
801
1121
|
class: normalizeClass(['p-checkbox-icon', {'pi pi-check': $options.allSelected}])
|
|
802
1122
|
}, null, 2)
|
|
803
|
-
],
|
|
804
|
-
],
|
|
1123
|
+
], 2)
|
|
1124
|
+
], 2))
|
|
805
1125
|
: createCommentVNode("", true),
|
|
806
1126
|
($props.filter)
|
|
807
|
-
? (openBlock(), createElementBlock("div",
|
|
808
|
-
|
|
1127
|
+
? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
1128
|
+
createElementVNode("input", mergeProps({
|
|
809
1129
|
type: "text",
|
|
810
1130
|
ref: "filterInput",
|
|
811
|
-
|
|
812
|
-
|
|
1131
|
+
value: $data.filterValue,
|
|
1132
|
+
onVnodeUpdated: _cache[7] || (_cache[7] = (...args) => ($options.onFilterUpdated && $options.onFilterUpdated(...args))),
|
|
813
1133
|
class: "p-multiselect-filter p-inputtext p-component",
|
|
814
1134
|
placeholder: $props.filterPlaceholder,
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
1135
|
+
role: "searchbox",
|
|
1136
|
+
autocomplete: "off",
|
|
1137
|
+
"aria-owns": $data.id + '_list',
|
|
1138
|
+
"aria-activedescendant": $options.focusedOptionId,
|
|
1139
|
+
onKeydown: _cache[8] || (_cache[8] = (...args) => ($options.onFilterKeyDown && $options.onFilterKeyDown(...args))),
|
|
1140
|
+
onBlur: _cache[9] || (_cache[9] = (...args) => ($options.onFilterBlur && $options.onFilterBlur(...args))),
|
|
1141
|
+
onInput: _cache[10] || (_cache[10] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
1142
|
+
}, $props.filterInputProps), null, 16, _hoisted_11),
|
|
1143
|
+
_hoisted_12
|
|
820
1144
|
]))
|
|
821
1145
|
: createCommentVNode("", true),
|
|
822
|
-
|
|
1146
|
+
($props.filter)
|
|
1147
|
+
? (openBlock(), createElementBlock("span", _hoisted_13, toDisplayString($options.filterResultMessageText), 1))
|
|
1148
|
+
: createCommentVNode("", true),
|
|
1149
|
+
withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
823
1150
|
class: "p-multiselect-close p-link",
|
|
824
|
-
|
|
1151
|
+
"aria-label": $options.closeAriaLabel,
|
|
1152
|
+
onClick: _cache[11] || (_cache[11] = (...args) => ($options.onCloseClick && $options.onCloseClick(...args))),
|
|
825
1153
|
type: "button"
|
|
826
|
-
},
|
|
1154
|
+
}, $props.closeButtonProps), _hoisted_16, 16, _hoisted_14)), [
|
|
827
1155
|
[_directive_ripple]
|
|
828
1156
|
])
|
|
829
1157
|
]))
|
|
@@ -835,91 +1163,71 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
835
1163
|
createVNode(_component_VirtualScroller, mergeProps({ ref: $options.virtualScrollerRef }, $props.virtualScrollerOptions, {
|
|
836
1164
|
items: $options.visibleOptions,
|
|
837
1165
|
style: {'height': $props.scrollHeight},
|
|
1166
|
+
tabindex: -1,
|
|
838
1167
|
disabled: $options.virtualScrollerDisabled
|
|
839
1168
|
}), createSlots({
|
|
840
|
-
content: withCtx(({ styleClass, contentRef, items, getItemOptions, contentStyle}) => [
|
|
1169
|
+
content: withCtx(({ styleClass, contentRef, items, getItemOptions, contentStyle, itemSize }) => [
|
|
841
1170
|
createElementVNode("ul", {
|
|
842
|
-
ref: contentRef,
|
|
1171
|
+
ref: (el) => $options.listRef(el, contentRef),
|
|
1172
|
+
id: $data.id + '_list',
|
|
843
1173
|
class: normalizeClass(['p-multiselect-items p-component', styleClass]),
|
|
844
1174
|
style: normalizeStyle(contentStyle),
|
|
845
1175
|
role: "listbox",
|
|
846
1176
|
"aria-multiselectable": "true"
|
|
847
1177
|
}, [
|
|
848
|
-
(
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
createElementVNode("div", _hoisted_17, [
|
|
861
|
-
createElementVNode("div", {
|
|
862
|
-
class: normalizeClass(['p-checkbox-box', {'p-highlight': $options.isSelected(option)}])
|
|
863
|
-
}, [
|
|
864
|
-
createElementVNode("span", {
|
|
865
|
-
class: normalizeClass(['p-checkbox-icon', {'pi pi-check': $options.isSelected(option)}])
|
|
866
|
-
}, null, 2)
|
|
867
|
-
], 2)
|
|
868
|
-
]),
|
|
869
|
-
renderSlot(_ctx.$slots, "option", {
|
|
870
|
-
option: option,
|
|
871
|
-
index: $options.getOptionIndex(i, getItemOptions)
|
|
872
|
-
}, () => [
|
|
873
|
-
createElementVNode("span", null, toDisplayString($options.getOptionLabel(option)), 1)
|
|
874
|
-
])
|
|
875
|
-
], 42, _hoisted_16)), [
|
|
876
|
-
[_directive_ripple]
|
|
877
|
-
])
|
|
878
|
-
}), 128))
|
|
879
|
-
: (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(items, (optionGroup, i) => {
|
|
880
|
-
return (openBlock(), createElementBlock(Fragment, {
|
|
881
|
-
key: $options.getOptionGroupRenderKey(optionGroup)
|
|
882
|
-
}, [
|
|
883
|
-
createElementVNode("li", _hoisted_18, [
|
|
1178
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (option, i) => {
|
|
1179
|
+
return (openBlock(), createElementBlock(Fragment, {
|
|
1180
|
+
key: $options.getOptionRenderKey(option, $options.getOptionIndex(i, getItemOptions))
|
|
1181
|
+
}, [
|
|
1182
|
+
($options.isOptionGroup(option))
|
|
1183
|
+
? (openBlock(), createElementBlock("li", {
|
|
1184
|
+
key: 0,
|
|
1185
|
+
id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),
|
|
1186
|
+
style: normalizeStyle({height: itemSize ? itemSize + 'px' : undefined}),
|
|
1187
|
+
class: "p-multiselect-item-group",
|
|
1188
|
+
role: "option"
|
|
1189
|
+
}, [
|
|
884
1190
|
renderSlot(_ctx.$slots, "optiongroup", {
|
|
885
|
-
option: optionGroup,
|
|
1191
|
+
option: option.optionGroup,
|
|
886
1192
|
index: $options.getOptionIndex(i, getItemOptions)
|
|
887
1193
|
}, () => [
|
|
888
|
-
createTextVNode(toDisplayString($options.getOptionGroupLabel(optionGroup)), 1)
|
|
1194
|
+
createTextVNode(toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 1)
|
|
889
1195
|
])
|
|
890
|
-
])
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
1196
|
+
], 12, _hoisted_18))
|
|
1197
|
+
: withDirectives((openBlock(), createElementBlock("li", {
|
|
1198
|
+
key: 1,
|
|
1199
|
+
id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),
|
|
1200
|
+
style: normalizeStyle({height: itemSize ? itemSize + 'px' : undefined}),
|
|
1201
|
+
class: normalizeClass(['p-multiselect-item', {'p-highlight': $options.isSelected(option), 'p-focus': $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions), 'p-disabled': $options.isOptionDisabled(option)}]),
|
|
1202
|
+
role: "option",
|
|
1203
|
+
"aria-label": $options.getOptionLabel(option),
|
|
1204
|
+
"aria-selected": $options.isSelected(option),
|
|
1205
|
+
"aria-disabled": $options.isOptionDisabled(option),
|
|
1206
|
+
"aria-setsize": $options.ariaSetSize,
|
|
1207
|
+
"aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),
|
|
1208
|
+
onClick: $event => ($options.onOptionSelect($event, option, $options.getOptionIndex(i, getItemOptions), true)),
|
|
1209
|
+
onMousemove: $event => ($options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions)))
|
|
1210
|
+
}, [
|
|
1211
|
+
createElementVNode("div", _hoisted_20, [
|
|
1212
|
+
createElementVNode("div", {
|
|
1213
|
+
class: normalizeClass(['p-checkbox-box', {'p-highlight': $options.isSelected(option)}])
|
|
1214
|
+
}, [
|
|
1215
|
+
createElementVNode("span", {
|
|
1216
|
+
class: normalizeClass(['p-checkbox-icon', {'pi pi-check': $options.isSelected(option)}])
|
|
1217
|
+
}, null, 2)
|
|
1218
|
+
], 2)
|
|
1219
|
+
]),
|
|
1220
|
+
renderSlot(_ctx.$slots, "option", {
|
|
1221
|
+
option: option,
|
|
1222
|
+
index: $options.getOptionIndex(i, getItemOptions)
|
|
1223
|
+
}, () => [
|
|
1224
|
+
createElementVNode("span", null, toDisplayString($options.getOptionLabel(option)), 1)
|
|
919
1225
|
])
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
1226
|
+
], 46, _hoisted_19)), [
|
|
1227
|
+
[_directive_ripple]
|
|
1228
|
+
])
|
|
1229
|
+
], 64))
|
|
1230
|
+
}), 128)),
|
|
923
1231
|
($data.filterValue && (!items || (items && items.length === 0)))
|
|
924
1232
|
? (openBlock(), createElementBlock("li", _hoisted_21, [
|
|
925
1233
|
renderSlot(_ctx.$slots, "emptyfilter", {}, () => [
|
|
@@ -933,7 +1241,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
933
1241
|
])
|
|
934
1242
|
]))
|
|
935
1243
|
: createCommentVNode("", true)
|
|
936
|
-
],
|
|
1244
|
+
], 14, _hoisted_17),
|
|
1245
|
+
((!$props.options || ($props.options && $props.options.length === 0)))
|
|
1246
|
+
? (openBlock(), createElementBlock("span", _hoisted_23, toDisplayString($options.emptyMessageText), 1))
|
|
1247
|
+
: createCommentVNode("", true),
|
|
1248
|
+
createElementVNode("span", _hoisted_24, toDisplayString($options.selectedMessageText), 1)
|
|
937
1249
|
]),
|
|
938
1250
|
_: 2
|
|
939
1251
|
}, [
|
|
@@ -950,8 +1262,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
950
1262
|
renderSlot(_ctx.$slots, "footer", {
|
|
951
1263
|
value: $props.modelValue,
|
|
952
1264
|
options: $options.visibleOptions
|
|
953
|
-
})
|
|
954
|
-
|
|
1265
|
+
}),
|
|
1266
|
+
createElementVNode("span", {
|
|
1267
|
+
ref: "lastHiddenFocusableElementOnOverlay",
|
|
1268
|
+
role: "presentation",
|
|
1269
|
+
"aria-hidden": "true",
|
|
1270
|
+
class: "p-hidden-accessible p-hidden-focusable",
|
|
1271
|
+
tabindex: 0,
|
|
1272
|
+
onFocus: _cache[12] || (_cache[12] = (...args) => ($options.onLastHiddenFocus && $options.onLastHiddenFocus(...args)))
|
|
1273
|
+
}, null, 544)
|
|
1274
|
+
], 16))
|
|
955
1275
|
: createCommentVNode("", true)
|
|
956
1276
|
]),
|
|
957
1277
|
_: 3
|