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
package/core/core.js
CHANGED
|
@@ -5,19 +5,25 @@ this.primevue.utils = (function (exports) {
|
|
|
5
5
|
var DomHandler = {
|
|
6
6
|
|
|
7
7
|
innerWidth(el) {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
if (el) {
|
|
9
|
+
let width = el.offsetWidth;
|
|
10
|
+
let style = getComputedStyle(el);
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
width += parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
|
|
13
|
+
return width;
|
|
14
|
+
}
|
|
15
|
+
return 0;
|
|
13
16
|
},
|
|
14
17
|
|
|
15
18
|
width(el) {
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
if (el) {
|
|
20
|
+
let width = el.offsetWidth;
|
|
21
|
+
let style = getComputedStyle(el);
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
|
|
24
|
+
return width;
|
|
25
|
+
}
|
|
26
|
+
return 0;
|
|
21
27
|
},
|
|
22
28
|
|
|
23
29
|
getWindowScrollTop() {
|
|
@@ -41,9 +47,7 @@ this.primevue.utils = (function (exports) {
|
|
|
41
47
|
|
|
42
48
|
return width;
|
|
43
49
|
}
|
|
44
|
-
|
|
45
|
-
return 0;
|
|
46
|
-
}
|
|
50
|
+
return 0;
|
|
47
51
|
},
|
|
48
52
|
|
|
49
53
|
getOuterHeight(el, margin) {
|
|
@@ -57,9 +61,7 @@ this.primevue.utils = (function (exports) {
|
|
|
57
61
|
|
|
58
62
|
return height;
|
|
59
63
|
}
|
|
60
|
-
|
|
61
|
-
return 0;
|
|
62
|
-
}
|
|
64
|
+
return 0;
|
|
63
65
|
},
|
|
64
66
|
|
|
65
67
|
getClientHeight(el, margin) {
|
|
@@ -72,9 +74,8 @@ this.primevue.utils = (function (exports) {
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
return height;
|
|
75
|
-
} else {
|
|
76
|
-
return 0;
|
|
77
77
|
}
|
|
78
|
+
return 0;
|
|
78
79
|
},
|
|
79
80
|
|
|
80
81
|
getViewport() {
|
|
@@ -85,56 +86,71 @@ this.primevue.utils = (function (exports) {
|
|
|
85
86
|
w = win.innerWidth || e.clientWidth || g.clientWidth,
|
|
86
87
|
h = win.innerHeight || e.clientHeight || g.clientHeight;
|
|
87
88
|
|
|
88
|
-
return {width: w, height: h};
|
|
89
|
+
return { width: w, height: h };
|
|
89
90
|
},
|
|
90
91
|
|
|
91
92
|
getOffset(el) {
|
|
92
|
-
|
|
93
|
+
if (el) {
|
|
94
|
+
let rect = el.getBoundingClientRect();
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
top: rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),
|
|
98
|
+
left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
93
101
|
|
|
94
102
|
return {
|
|
95
|
-
top:
|
|
96
|
-
left:
|
|
103
|
+
top: 'auto',
|
|
104
|
+
left: 'auto'
|
|
97
105
|
};
|
|
98
106
|
},
|
|
99
107
|
|
|
100
108
|
index(element) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
109
|
+
if (element) {
|
|
110
|
+
let children = element.parentNode.childNodes;
|
|
111
|
+
let num = 0;
|
|
112
|
+
for (let i = 0; i < children.length; i++) {
|
|
113
|
+
if (children[i] === element) return num;
|
|
114
|
+
if (children[i].nodeType === 1) num++;
|
|
115
|
+
}
|
|
106
116
|
}
|
|
107
117
|
return -1;
|
|
108
118
|
},
|
|
109
119
|
|
|
110
120
|
addMultipleClasses(element, className) {
|
|
111
|
-
if (element
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
if (element && className) {
|
|
122
|
+
if (element.classList) {
|
|
123
|
+
let styles = className.split(' ');
|
|
124
|
+
for (let i = 0; i < styles.length; i++) {
|
|
125
|
+
element.classList.add(styles[i]);
|
|
126
|
+
}
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
let styles = className.split(' ');
|
|
131
|
+
for (let i = 0; i < styles.length; i++) {
|
|
132
|
+
element.className += ' ' + styles[i];
|
|
133
|
+
}
|
|
122
134
|
}
|
|
123
135
|
}
|
|
124
136
|
},
|
|
125
137
|
|
|
126
138
|
addClass(element, className) {
|
|
127
|
-
if (element
|
|
128
|
-
element.classList
|
|
129
|
-
|
|
130
|
-
|
|
139
|
+
if (element && className) {
|
|
140
|
+
if (element.classList)
|
|
141
|
+
element.classList.add(className);
|
|
142
|
+
else
|
|
143
|
+
element.className += ' ' + className;
|
|
144
|
+
}
|
|
131
145
|
},
|
|
132
146
|
|
|
133
147
|
removeClass(element, className) {
|
|
134
|
-
if (element
|
|
135
|
-
element.classList
|
|
136
|
-
|
|
137
|
-
|
|
148
|
+
if (element && className) {
|
|
149
|
+
if (element.classList)
|
|
150
|
+
element.classList.remove(className);
|
|
151
|
+
else
|
|
152
|
+
element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
|
|
153
|
+
}
|
|
138
154
|
},
|
|
139
155
|
|
|
140
156
|
hasClass(element, className) {
|
|
@@ -149,99 +165,112 @@ this.primevue.utils = (function (exports) {
|
|
|
149
165
|
},
|
|
150
166
|
|
|
151
167
|
find(element, selector) {
|
|
152
|
-
return element.querySelectorAll(selector);
|
|
168
|
+
return element ? element.querySelectorAll(selector) : [];
|
|
153
169
|
},
|
|
154
170
|
|
|
155
171
|
findSingle(element, selector) {
|
|
156
|
-
|
|
172
|
+
if (element) {
|
|
173
|
+
return element.querySelector(selector);
|
|
174
|
+
}
|
|
175
|
+
return null;
|
|
157
176
|
},
|
|
158
177
|
|
|
159
178
|
getHeight(el) {
|
|
160
|
-
|
|
161
|
-
|
|
179
|
+
if (el) {
|
|
180
|
+
let height = el.offsetHeight;
|
|
181
|
+
let style = getComputedStyle(el);
|
|
162
182
|
|
|
163
|
-
|
|
183
|
+
height -= parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
164
184
|
|
|
165
|
-
|
|
185
|
+
return height;
|
|
186
|
+
}
|
|
187
|
+
return 0;
|
|
166
188
|
},
|
|
167
189
|
|
|
168
190
|
getWidth(el) {
|
|
169
|
-
|
|
170
|
-
|
|
191
|
+
if (el) {
|
|
192
|
+
let width = el.offsetWidth;
|
|
193
|
+
let style = getComputedStyle(el);
|
|
171
194
|
|
|
172
|
-
|
|
195
|
+
width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);
|
|
173
196
|
|
|
174
|
-
|
|
197
|
+
return width;
|
|
198
|
+
}
|
|
199
|
+
return 0;
|
|
175
200
|
},
|
|
176
201
|
|
|
177
202
|
absolutePosition(element, target) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
top
|
|
203
|
+
if (element) {
|
|
204
|
+
let elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);
|
|
205
|
+
let elementOuterHeight = elementDimensions.height;
|
|
206
|
+
let elementOuterWidth = elementDimensions.width;
|
|
207
|
+
let targetOuterHeight = target.offsetHeight;
|
|
208
|
+
let targetOuterWidth = target.offsetWidth;
|
|
209
|
+
let targetOffset = target.getBoundingClientRect();
|
|
210
|
+
let windowScrollTop = this.getWindowScrollTop();
|
|
211
|
+
let windowScrollLeft = this.getWindowScrollLeft();
|
|
212
|
+
let viewport = this.getViewport();
|
|
213
|
+
let top, left;
|
|
214
|
+
|
|
215
|
+
if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {
|
|
216
|
+
top = targetOffset.top + windowScrollTop - elementOuterHeight;
|
|
217
|
+
element.style.transformOrigin = 'bottom';
|
|
218
|
+
|
|
219
|
+
if (top < 0) {
|
|
220
|
+
top = windowScrollTop;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
top = targetOuterHeight + targetOffset.top + windowScrollTop;
|
|
225
|
+
element.style.transformOrigin = 'top';
|
|
195
226
|
}
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
top = targetOuterHeight + targetOffset.top + windowScrollTop;
|
|
199
|
-
element.style.transformOrigin = 'top';
|
|
200
|
-
}
|
|
201
227
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
228
|
+
if (targetOffset.left + elementOuterWidth > viewport.width)
|
|
229
|
+
left = Math.max(0, targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth);
|
|
230
|
+
else
|
|
231
|
+
left = targetOffset.left + windowScrollLeft;
|
|
206
232
|
|
|
207
|
-
|
|
208
|
-
|
|
233
|
+
element.style.top = top + 'px';
|
|
234
|
+
element.style.left = left + 'px';
|
|
235
|
+
}
|
|
209
236
|
},
|
|
210
237
|
|
|
211
238
|
relativePosition(element, target) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
239
|
+
if (element) {
|
|
240
|
+
let elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);
|
|
241
|
+
const targetHeight = target.offsetHeight;
|
|
242
|
+
const targetOffset = target.getBoundingClientRect();
|
|
243
|
+
const viewport = this.getViewport();
|
|
244
|
+
let top, left;
|
|
245
|
+
|
|
246
|
+
if ((targetOffset.top + targetHeight + elementDimensions.height) > viewport.height) {
|
|
247
|
+
top = -1 * (elementDimensions.height);
|
|
248
|
+
element.style.transformOrigin = 'bottom';
|
|
249
|
+
if (targetOffset.top + top < 0) {
|
|
250
|
+
top = -1 * targetOffset.top;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
top = targetHeight;
|
|
255
|
+
element.style.transformOrigin = 'top';
|
|
256
|
+
}
|
|
217
257
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
258
|
+
if (elementDimensions.width > viewport.width) {
|
|
259
|
+
// element wider then viewport and cannot fit on screen (align at left side of viewport)
|
|
260
|
+
left = targetOffset.left * -1;
|
|
261
|
+
}
|
|
262
|
+
else if ((targetOffset.left + elementDimensions.width) > viewport.width) {
|
|
263
|
+
// element wider then viewport but can be fit on screen (align at right side of viewport)
|
|
264
|
+
left = (targetOffset.left + elementDimensions.width - viewport.width) * -1;
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
// element fits on screen (align with target)
|
|
268
|
+
left = 0;
|
|
223
269
|
}
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
top = targetHeight;
|
|
227
|
-
element.style.transformOrigin = 'top';
|
|
228
|
-
}
|
|
229
270
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
left = targetOffset.left * -1;
|
|
271
|
+
element.style.top = top + 'px';
|
|
272
|
+
element.style.left = left + 'px';
|
|
233
273
|
}
|
|
234
|
-
else if ((targetOffset.left + elementDimensions.width) > viewport.width) {
|
|
235
|
-
// element wider then viewport but can be fit on screen (align at right side of viewport)
|
|
236
|
-
left = (targetOffset.left + elementDimensions.width - viewport.width) * -1;
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
// element fits on screen (align with target)
|
|
240
|
-
left = 0;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
element.style.top = top + 'px';
|
|
244
|
-
element.style.left = left + 'px';
|
|
245
274
|
},
|
|
246
275
|
|
|
247
276
|
getParents(element, parents = []) {
|
|
@@ -281,71 +310,84 @@ this.primevue.utils = (function (exports) {
|
|
|
281
310
|
},
|
|
282
311
|
|
|
283
312
|
getHiddenElementOuterHeight(element) {
|
|
284
|
-
element
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
313
|
+
if (element) {
|
|
314
|
+
element.style.visibility = 'hidden';
|
|
315
|
+
element.style.display = 'block';
|
|
316
|
+
let elementHeight = element.offsetHeight;
|
|
317
|
+
element.style.display = 'none';
|
|
318
|
+
element.style.visibility = 'visible';
|
|
289
319
|
|
|
290
|
-
|
|
320
|
+
return elementHeight;
|
|
321
|
+
}
|
|
322
|
+
return 0;
|
|
291
323
|
},
|
|
292
324
|
|
|
293
325
|
getHiddenElementOuterWidth(element) {
|
|
294
|
-
element
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
326
|
+
if (element) {
|
|
327
|
+
element.style.visibility = 'hidden';
|
|
328
|
+
element.style.display = 'block';
|
|
329
|
+
let elementWidth = element.offsetWidth;
|
|
330
|
+
element.style.display = 'none';
|
|
331
|
+
element.style.visibility = 'visible';
|
|
299
332
|
|
|
300
|
-
|
|
333
|
+
return elementWidth;
|
|
334
|
+
}
|
|
335
|
+
return 0;
|
|
301
336
|
},
|
|
302
337
|
|
|
303
338
|
getHiddenElementDimensions(element) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
339
|
+
if (element) {
|
|
340
|
+
let dimensions = {};
|
|
341
|
+
element.style.visibility = 'hidden';
|
|
342
|
+
element.style.display = 'block';
|
|
343
|
+
dimensions.width = element.offsetWidth;
|
|
344
|
+
dimensions.height = element.offsetHeight;
|
|
345
|
+
element.style.display = 'none';
|
|
346
|
+
element.style.visibility = 'visible';
|
|
347
|
+
|
|
348
|
+
return dimensions;
|
|
349
|
+
}
|
|
350
|
+
return 0;
|
|
313
351
|
},
|
|
314
352
|
|
|
315
353
|
fadeIn(element, duration) {
|
|
316
|
-
element
|
|
354
|
+
if (element) {
|
|
355
|
+
element.style.opacity = 0;
|
|
317
356
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
357
|
+
let last = +new Date();
|
|
358
|
+
let opacity = 0;
|
|
359
|
+
let tick = function () {
|
|
360
|
+
opacity = +element.style.opacity + (new Date().getTime() - last) / duration;
|
|
361
|
+
element.style.opacity = opacity;
|
|
362
|
+
last = +new Date();
|
|
324
363
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
364
|
+
if (+opacity < 1) {
|
|
365
|
+
(window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
329
368
|
|
|
330
|
-
|
|
369
|
+
tick();
|
|
370
|
+
}
|
|
331
371
|
},
|
|
332
372
|
|
|
333
373
|
fadeOut(element, ms) {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
374
|
+
if (element) {
|
|
375
|
+
let opacity = 1,
|
|
376
|
+
interval = 50,
|
|
377
|
+
duration = ms,
|
|
378
|
+
gap = interval / duration;
|
|
338
379
|
|
|
339
|
-
|
|
340
|
-
|
|
380
|
+
let fading = setInterval(() => {
|
|
381
|
+
opacity -= gap;
|
|
341
382
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
383
|
+
if (opacity <= 0) {
|
|
384
|
+
opacity = 0;
|
|
385
|
+
clearInterval(fading);
|
|
386
|
+
}
|
|
346
387
|
|
|
347
|
-
|
|
348
|
-
|
|
388
|
+
element.style.opacity = opacity;
|
|
389
|
+
}, interval);
|
|
390
|
+
}
|
|
349
391
|
},
|
|
350
392
|
|
|
351
393
|
getUserAgent() {
|
|
@@ -353,9 +395,9 @@ this.primevue.utils = (function (exports) {
|
|
|
353
395
|
},
|
|
354
396
|
|
|
355
397
|
appendChild(element, target) {
|
|
356
|
-
if(this.isElement(target))
|
|
398
|
+
if (this.isElement(target))
|
|
357
399
|
target.appendChild(element);
|
|
358
|
-
else if(target.el && target.elElement)
|
|
400
|
+
else if (target.el && target.elElement)
|
|
359
401
|
target.elElement.appendChild(element);
|
|
360
402
|
else
|
|
361
403
|
throw new Error('Cannot append ' + target + ' to ' + element);
|
|
@@ -382,14 +424,14 @@ this.primevue.utils = (function (exports) {
|
|
|
382
424
|
},
|
|
383
425
|
|
|
384
426
|
clearSelection() {
|
|
385
|
-
if(window.getSelection) {
|
|
386
|
-
if(window.getSelection().empty) {
|
|
427
|
+
if (window.getSelection) {
|
|
428
|
+
if (window.getSelection().empty) {
|
|
387
429
|
window.getSelection().empty();
|
|
388
|
-
} else if(window.getSelection().removeAllRanges && window.getSelection().rangeCount > 0 && window.getSelection().getRangeAt(0).getClientRects().length > 0) {
|
|
430
|
+
} else if (window.getSelection().removeAllRanges && window.getSelection().rangeCount > 0 && window.getSelection().getRangeAt(0).getClientRects().length > 0) {
|
|
389
431
|
window.getSelection().removeAllRanges();
|
|
390
432
|
}
|
|
391
433
|
}
|
|
392
|
-
else if(document['selection'] && document['selection'].empty) {
|
|
434
|
+
else if (document['selection'] && document['selection'].empty) {
|
|
393
435
|
try {
|
|
394
436
|
document['selection'].empty();
|
|
395
437
|
} catch(error) {
|
|
@@ -399,7 +441,7 @@ this.primevue.utils = (function (exports) {
|
|
|
399
441
|
},
|
|
400
442
|
|
|
401
443
|
calculateScrollbarWidth() {
|
|
402
|
-
if(this.calculatedScrollbarWidth != null)
|
|
444
|
+
if (this.calculatedScrollbarWidth != null)
|
|
403
445
|
return this.calculatedScrollbarWidth;
|
|
404
446
|
|
|
405
447
|
let scrollDiv = document.createElement("div");
|
|
@@ -415,7 +457,7 @@ this.primevue.utils = (function (exports) {
|
|
|
415
457
|
},
|
|
416
458
|
|
|
417
459
|
getBrowser() {
|
|
418
|
-
if(!this.browser) {
|
|
460
|
+
if (!this.browser) {
|
|
419
461
|
let matched = this.resolveUserAgent();
|
|
420
462
|
this.browser = {};
|
|
421
463
|
|
|
@@ -450,7 +492,7 @@ this.primevue.utils = (function (exports) {
|
|
|
450
492
|
},
|
|
451
493
|
|
|
452
494
|
isVisible(element) {
|
|
453
|
-
return element.offsetParent != null;
|
|
495
|
+
return element && element.offsetParent != null;
|
|
454
496
|
},
|
|
455
497
|
|
|
456
498
|
invokeElementMethod(element, methodName, args) {
|
|
@@ -461,13 +503,15 @@ this.primevue.utils = (function (exports) {
|
|
|
461
503
|
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
462
504
|
},
|
|
463
505
|
|
|
464
|
-
getFocusableElements(element) {
|
|
465
|
-
let focusableElements = this.find(element, `button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),
|
|
466
|
-
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),
|
|
467
|
-
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
)
|
|
506
|
+
getFocusableElements(element, selector = '') {
|
|
507
|
+
let focusableElements = this.find(element, `button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
508
|
+
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
509
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
510
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
511
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
512
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
513
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector}`
|
|
514
|
+
);
|
|
471
515
|
|
|
472
516
|
let visibleFocusableElements = [];
|
|
473
517
|
for (let focusableElement of focusableElements) {
|
|
@@ -478,8 +522,8 @@ this.primevue.utils = (function (exports) {
|
|
|
478
522
|
return visibleFocusableElements;
|
|
479
523
|
},
|
|
480
524
|
|
|
481
|
-
getFirstFocusableElement(element) {
|
|
482
|
-
const focusableElements = this.getFocusableElements(element);
|
|
525
|
+
getFirstFocusableElement(element, selector) {
|
|
526
|
+
const focusableElements = this.getFocusableElements(element, selector);
|
|
483
527
|
return focusableElements.length > 0 ? focusableElements[0] : null;
|
|
484
528
|
},
|
|
485
529
|
|
|
@@ -793,8 +837,30 @@ this.primevue.utils = (function (exports) {
|
|
|
793
837
|
|
|
794
838
|
isNotEmpty(value) {
|
|
795
839
|
return !this.isEmpty(value);
|
|
796
|
-
}
|
|
840
|
+
},
|
|
797
841
|
|
|
842
|
+
isPrintableCharacter(char = '') {
|
|
843
|
+
return this.isNotEmpty(char) && char.length === 1 && char.match(/\S| /);
|
|
844
|
+
},
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Firefox-v103 does not currently support the "findLastIndex" method. It is stated that this method will be supported with Firefox-v104.
|
|
848
|
+
* https://caniuse.com/mdn-javascript_builtins_array_findlastindex
|
|
849
|
+
*/
|
|
850
|
+
findLastIndex(arr, callback) {
|
|
851
|
+
let index = -1;
|
|
852
|
+
|
|
853
|
+
if (this.isNotEmpty(arr)) {
|
|
854
|
+
try {
|
|
855
|
+
index = arr.findLastIndex(callback);
|
|
856
|
+
}
|
|
857
|
+
catch {
|
|
858
|
+
index = arr.lastIndexOf([...arr].reverse().find(callback));
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
return index;
|
|
863
|
+
}
|
|
798
864
|
};
|
|
799
865
|
|
|
800
866
|
function handler() {
|
|
@@ -1451,6 +1517,23 @@ this.primevue.config = (function (exports, vue, api) {
|
|
|
1451
1517
|
dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"],
|
|
1452
1518
|
monthNames: ["January","February","March","April","May","June","July","August","September","October","November","December"],
|
|
1453
1519
|
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
1520
|
+
chooseYear: 'Choose Year',
|
|
1521
|
+
chooseMonth: 'Choose Month',
|
|
1522
|
+
chooseDate: 'Choose Date',
|
|
1523
|
+
prevDecade: 'Previous Decade',
|
|
1524
|
+
nextDecade: 'Next Decade',
|
|
1525
|
+
prevYear: 'Previous Year',
|
|
1526
|
+
nextYear: 'Next Year',
|
|
1527
|
+
prevMonth: 'Previous Month',
|
|
1528
|
+
nextMonth: 'Next Month',
|
|
1529
|
+
prevHour: 'Previous Hour',
|
|
1530
|
+
nextHour: 'Next Hour',
|
|
1531
|
+
prevMinute: 'Previous Minute',
|
|
1532
|
+
nextMinute: 'Next Minute',
|
|
1533
|
+
prevSecond: 'Previous Second',
|
|
1534
|
+
nextSecond: 'Next Second',
|
|
1535
|
+
am: 'am',
|
|
1536
|
+
pm: 'pm',
|
|
1454
1537
|
today: 'Today',
|
|
1455
1538
|
weekHeader: 'Wk',
|
|
1456
1539
|
firstDayOfWeek: 0,
|
|
@@ -1459,8 +1542,22 @@ this.primevue.config = (function (exports, vue, api) {
|
|
|
1459
1542
|
medium: 'Medium',
|
|
1460
1543
|
strong: 'Strong',
|
|
1461
1544
|
passwordPrompt: 'Enter a password',
|
|
1462
|
-
emptyFilterMessage: 'No results found',
|
|
1463
|
-
|
|
1545
|
+
emptyFilterMessage: 'No results found', // @deprecated Use 'emptySearchMessage' option instead.
|
|
1546
|
+
searchMessage: '{0} results are available',
|
|
1547
|
+
selectionMessage: '{0} items selected',
|
|
1548
|
+
emptySelectionMessage: 'No selected item',
|
|
1549
|
+
emptySearchMessage: 'No results found',
|
|
1550
|
+
emptyMessage: 'No available options',
|
|
1551
|
+
aria: {
|
|
1552
|
+
trueLabel: 'True',
|
|
1553
|
+
falseLabel: 'False',
|
|
1554
|
+
nullLabel: 'Not Selected',
|
|
1555
|
+
star: '1 star',
|
|
1556
|
+
stars: '{star} stars',
|
|
1557
|
+
selectAll: 'All items selected',
|
|
1558
|
+
unselectAll: 'All items unselected',
|
|
1559
|
+
close: 'Close'
|
|
1560
|
+
}
|
|
1464
1561
|
},
|
|
1465
1562
|
filterMatchModeOptions: {
|
|
1466
1563
|
text: [
|
|
@@ -1500,8 +1597,8 @@ this.primevue.config = (function (exports, vue, api) {
|
|
|
1500
1597
|
const PrimeVue = vue.inject(PrimeVueSymbol);
|
|
1501
1598
|
if (!PrimeVue) {
|
|
1502
1599
|
throw new Error('PrimeVue is not installed!');
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1505
1602
|
return PrimeVue;
|
|
1506
1603
|
}
|
|
1507
1604
|
|
|
@@ -1540,6 +1637,7 @@ this.primevue.ripple = (function (utils) {
|
|
|
1540
1637
|
function create(el) {
|
|
1541
1638
|
let ink = document.createElement('span');
|
|
1542
1639
|
ink.className = 'p-ink';
|
|
1640
|
+
ink.setAttribute("role", "presentation");
|
|
1543
1641
|
el.appendChild(ink);
|
|
1544
1642
|
|
|
1545
1643
|
ink.addEventListener('animationend', onAnimationEnd);
|
|
@@ -1959,12 +2057,16 @@ this.primevue.tooltip = (function (utils) {
|
|
|
1959
2057
|
target.$_ptooltipClass = null;
|
|
1960
2058
|
target.$_ptooltipFitContent = true;
|
|
1961
2059
|
}
|
|
1962
|
-
else {
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
2060
|
+
else if (typeof options.value === 'object' && options.value) {
|
|
2061
|
+
if (options.value.value === undefined || options.value.value === null || options.value.value.trim() === '') return;
|
|
2062
|
+
else {
|
|
2063
|
+
/* eslint-disable */
|
|
2064
|
+
target.$_ptooltipValue = options.value.value;
|
|
2065
|
+
target.$_ptooltipDisabled = !!options.value.disabled === options.value.disabled ? options.value.disabled : false;
|
|
2066
|
+
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : false;
|
|
2067
|
+
target.$_ptooltipClass = options.value.class;
|
|
2068
|
+
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
2069
|
+
}
|
|
1968
2070
|
}
|
|
1969
2071
|
|
|
1970
2072
|
target.$_ptooltipZIndex = options.instance.$primevue && options.instance.$primevue.config && options.instance.$primevue.config.zIndex.tooltip;
|
|
@@ -1993,11 +2095,16 @@ this.primevue.tooltip = (function (utils) {
|
|
|
1993
2095
|
target.$_ptooltipEscape = false;
|
|
1994
2096
|
target.$_ptooltipClass = null;
|
|
1995
2097
|
}
|
|
1996
|
-
else {
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2098
|
+
else if (typeof options.value === 'object' && options.value) {
|
|
2099
|
+
if (options.value.value === undefined || options.value.value === null || options.value.value.trim() === '') return;
|
|
2100
|
+
else {
|
|
2101
|
+
/* eslint-disable */
|
|
2102
|
+
target.$_ptooltipValue = options.value.value;
|
|
2103
|
+
target.$_ptooltipDisabled = !!options.value.disabled === options.value.disabled ? options.value.disabled : false;
|
|
2104
|
+
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : false;
|
|
2105
|
+
target.$_ptooltipClass = options.value.class;
|
|
2106
|
+
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
|
|
2107
|
+
}
|
|
2001
2108
|
}
|
|
2002
2109
|
}
|
|
2003
2110
|
};
|
|
@@ -2069,6 +2176,10 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2069
2176
|
showLoader: {
|
|
2070
2177
|
type: Boolean,
|
|
2071
2178
|
default: false
|
|
2179
|
+
},
|
|
2180
|
+
tabindex: {
|
|
2181
|
+
type: Number,
|
|
2182
|
+
default: 0
|
|
2072
2183
|
}
|
|
2073
2184
|
},
|
|
2074
2185
|
data() {
|
|
@@ -2133,24 +2244,20 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2133
2244
|
const first = this.first;
|
|
2134
2245
|
const { numToleratedItems } = this.calculateNumItems();
|
|
2135
2246
|
const itemSize = this.itemSize;
|
|
2136
|
-
const contentPos = this.getContentPosition();
|
|
2137
2247
|
const calculateFirst = (_index = 0, _numT) => (_index <= _numT ? 0 : _index);
|
|
2138
|
-
const calculateCoord = (_first, _size
|
|
2248
|
+
const calculateCoord = (_first, _size) => (_first * _size);
|
|
2139
2249
|
const scrollTo = (left = 0, top = 0) => this.scrollTo({ left, top, behavior });
|
|
2140
2250
|
|
|
2141
2251
|
if (both) {
|
|
2142
2252
|
const newFirst = { rows: calculateFirst(index[0], numToleratedItems[0]), cols: calculateFirst(index[1], numToleratedItems[1]) };
|
|
2143
2253
|
if (newFirst.rows !== first.rows || newFirst.cols !== first.cols) {
|
|
2144
|
-
scrollTo(calculateCoord(newFirst.cols, itemSize[1]
|
|
2145
|
-
this.first = newFirst;
|
|
2254
|
+
scrollTo(calculateCoord(newFirst.cols, itemSize[1]), calculateCoord(newFirst.rows, itemSize[0]));
|
|
2146
2255
|
}
|
|
2147
2256
|
}
|
|
2148
2257
|
else {
|
|
2149
2258
|
const newFirst = calculateFirst(index, numToleratedItems);
|
|
2150
|
-
|
|
2151
2259
|
if (newFirst !== first) {
|
|
2152
|
-
horizontal ? scrollTo(calculateCoord(newFirst, itemSize
|
|
2153
|
-
this.first = newFirst;
|
|
2260
|
+
horizontal ? scrollTo(calculateCoord(newFirst, itemSize), 0) : scrollTo(0, calculateCoord(newFirst, itemSize));
|
|
2154
2261
|
}
|
|
2155
2262
|
}
|
|
2156
2263
|
},
|
|
@@ -2381,9 +2488,10 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2381
2488
|
const scrollTop = calculateScrollPos(target.scrollTop, contentPos.top);
|
|
2382
2489
|
const scrollLeft = calculateScrollPos(target.scrollLeft, contentPos.left);
|
|
2383
2490
|
|
|
2384
|
-
let newFirst = 0;
|
|
2491
|
+
let newFirst = both ? { rows: 0, cols: 0 } : 0;
|
|
2385
2492
|
let newLast = this.last;
|
|
2386
2493
|
let isRangeChanged = false;
|
|
2494
|
+
let newScrollPos = this.lastScrollPos;
|
|
2387
2495
|
|
|
2388
2496
|
if (both) {
|
|
2389
2497
|
const isScrollDown = this.lastScrollPos.top <= scrollTop;
|
|
@@ -2403,9 +2511,8 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2403
2511
|
cols: calculateLast(currentIndex.cols, newFirst.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], true)
|
|
2404
2512
|
};
|
|
2405
2513
|
|
|
2406
|
-
isRangeChanged = (newFirst.rows !== this.first.rows
|
|
2407
|
-
|
|
2408
|
-
this.lastScrollPos = { top: scrollTop, left: scrollLeft };
|
|
2514
|
+
isRangeChanged = (newFirst.rows !== this.first.rows || newLast.rows !== this.last.rows) || (newFirst.cols !== this.first.cols || newLast.cols !== this.last.cols);
|
|
2515
|
+
newScrollPos = { top: scrollTop, left: scrollLeft };
|
|
2409
2516
|
}
|
|
2410
2517
|
else {
|
|
2411
2518
|
const scrollPos = horizontal ? scrollLeft : scrollTop;
|
|
@@ -2415,19 +2522,19 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2415
2522
|
|
|
2416
2523
|
newFirst = calculateFirst(currentIndex, triggerIndex, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, isScrollDownOrRight);
|
|
2417
2524
|
newLast = calculateLast(currentIndex, newFirst, this.last, this.numItemsInViewport, this.d_numToleratedItems);
|
|
2418
|
-
isRangeChanged = newFirst !== this.first
|
|
2419
|
-
|
|
2420
|
-
this.lastScrollPos = scrollPos;
|
|
2525
|
+
isRangeChanged = newFirst !== this.first || newLast !== this.last;
|
|
2526
|
+
newScrollPos = scrollPos;
|
|
2421
2527
|
}
|
|
2422
2528
|
|
|
2423
2529
|
return {
|
|
2424
2530
|
first: newFirst,
|
|
2425
2531
|
last: newLast,
|
|
2426
|
-
isRangeChanged
|
|
2532
|
+
isRangeChanged,
|
|
2533
|
+
scrollPos: newScrollPos
|
|
2427
2534
|
}
|
|
2428
2535
|
},
|
|
2429
2536
|
onScrollChange(event) {
|
|
2430
|
-
const { first, last, isRangeChanged } = this.onScrollPositionChange(event);
|
|
2537
|
+
const { first, last, isRangeChanged, scrollPos } = this.onScrollPositionChange(event);
|
|
2431
2538
|
|
|
2432
2539
|
if (isRangeChanged) {
|
|
2433
2540
|
const newState = { first, last };
|
|
@@ -2436,6 +2543,7 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2436
2543
|
|
|
2437
2544
|
this.first = first;
|
|
2438
2545
|
this.last = last;
|
|
2546
|
+
this.lastScrollPos = scrollPos;
|
|
2439
2547
|
|
|
2440
2548
|
this.$emit('scroll-index-change', newState);
|
|
2441
2549
|
|
|
@@ -2551,7 +2659,8 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2551
2659
|
}
|
|
2552
2660
|
};
|
|
2553
2661
|
|
|
2554
|
-
const _hoisted_1 =
|
|
2662
|
+
const _hoisted_1 = ["tabindex"];
|
|
2663
|
+
const _hoisted_2 = {
|
|
2555
2664
|
key: 1,
|
|
2556
2665
|
class: "p-virtualscroller-loading-icon pi pi-spinner pi-spin"
|
|
2557
2666
|
};
|
|
@@ -2562,7 +2671,7 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2562
2671
|
key: 0,
|
|
2563
2672
|
ref: $options.elementRef,
|
|
2564
2673
|
class: vue.normalizeClass($options.containerClass),
|
|
2565
|
-
tabindex:
|
|
2674
|
+
tabindex: $props.tabindex,
|
|
2566
2675
|
style: vue.normalizeStyle($props.style),
|
|
2567
2676
|
onScroll: _cache[0] || (_cache[0] = (...args) => ($options.onScroll && $options.onScroll(...args)))
|
|
2568
2677
|
}, [
|
|
@@ -2615,10 +2724,10 @@ this.primevue.virtualscroller = (function (vue) {
|
|
|
2615
2724
|
options: $options.getLoaderOptions(index, $options.isBoth() && { numCols: _ctx.d_numItemsInViewport.cols })
|
|
2616
2725
|
})
|
|
2617
2726
|
}), 128))
|
|
2618
|
-
: (vue.openBlock(), vue.createElementBlock("i",
|
|
2727
|
+
: (vue.openBlock(), vue.createElementBlock("i", _hoisted_2))
|
|
2619
2728
|
], 2))
|
|
2620
2729
|
: vue.createCommentVNode("", true)
|
|
2621
|
-
],
|
|
2730
|
+
], 46, _hoisted_1))
|
|
2622
2731
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
2623
2732
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
2624
2733
|
vue.renderSlot(_ctx.$slots, "content", {
|
|
@@ -2855,6 +2964,9 @@ this.primevue.button = (function (Ripple, vue) {
|
|
|
2855
2964
|
},
|
|
2856
2965
|
disabled() {
|
|
2857
2966
|
return this.$attrs.disabled || this.loading;
|
|
2967
|
+
},
|
|
2968
|
+
defaultAriaLabel() {
|
|
2969
|
+
return (this.label ? this.label + (this.badge ? ' ' + this.badge : '') : this.$attrs['aria-label']);
|
|
2858
2970
|
}
|
|
2859
2971
|
},
|
|
2860
2972
|
directives: {
|
|
@@ -2862,7 +2974,7 @@ this.primevue.button = (function (Ripple, vue) {
|
|
|
2862
2974
|
}
|
|
2863
2975
|
};
|
|
2864
2976
|
|
|
2865
|
-
const _hoisted_1 = ["disabled"];
|
|
2977
|
+
const _hoisted_1 = ["aria-label", "disabled"];
|
|
2866
2978
|
const _hoisted_2 = { class: "p-button-label" };
|
|
2867
2979
|
|
|
2868
2980
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -2871,6 +2983,7 @@ this.primevue.button = (function (Ripple, vue) {
|
|
|
2871
2983
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
2872
2984
|
class: vue.normalizeClass($options.buttonClass),
|
|
2873
2985
|
type: "button",
|
|
2986
|
+
"aria-label": $options.defaultAriaLabel,
|
|
2874
2987
|
disabled: $options.disabled
|
|
2875
2988
|
}, [
|
|
2876
2989
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
@@ -2911,7 +3024,6 @@ this.primevue.inputtext = (function (vue) {
|
|
|
2911
3024
|
|
|
2912
3025
|
var script = {
|
|
2913
3026
|
name: 'InputText',
|
|
2914
|
-
inheritAttrs: false,
|
|
2915
3027
|
emits: ['update:modelValue'],
|
|
2916
3028
|
props: {
|
|
2917
3029
|
modelValue: null
|
|
@@ -2931,11 +3043,11 @@ this.primevue.inputtext = (function (vue) {
|
|
|
2931
3043
|
const _hoisted_1 = ["value"];
|
|
2932
3044
|
|
|
2933
3045
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2934
|
-
return (vue.openBlock(), vue.createElementBlock("input",
|
|
2935
|
-
class: ['p-inputtext p-component', {'p-filled': $options.filled}],
|
|
3046
|
+
return (vue.openBlock(), vue.createElementBlock("input", {
|
|
3047
|
+
class: vue.normalizeClass(['p-inputtext p-component', {'p-filled': $options.filled}]),
|
|
2936
3048
|
value: $props.modelValue,
|
|
2937
3049
|
onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args)))
|
|
2938
|
-
},
|
|
3050
|
+
}, null, 42, _hoisted_1))
|
|
2939
3051
|
}
|
|
2940
3052
|
|
|
2941
3053
|
script.render = render;
|
|
@@ -2955,7 +3067,6 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
2955
3067
|
|
|
2956
3068
|
var script = {
|
|
2957
3069
|
name: 'InputNumber',
|
|
2958
|
-
inheritAttrs: false,
|
|
2959
3070
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
2960
3071
|
props: {
|
|
2961
3072
|
modelValue: {
|
|
@@ -3050,10 +3161,28 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3050
3161
|
type: Boolean,
|
|
3051
3162
|
default: false
|
|
3052
3163
|
},
|
|
3053
|
-
|
|
3054
|
-
|
|
3164
|
+
disabled: {
|
|
3165
|
+
type: Boolean,
|
|
3166
|
+
default: false
|
|
3167
|
+
},
|
|
3168
|
+
placeholder: {
|
|
3169
|
+
type: String,
|
|
3170
|
+
default: null
|
|
3171
|
+
},
|
|
3172
|
+
inputId: null,
|
|
3173
|
+
inputClass: null,
|
|
3055
3174
|
inputStyle: null,
|
|
3056
|
-
|
|
3175
|
+
inputProps: null,
|
|
3176
|
+
incrementButtonProps: null,
|
|
3177
|
+
decrementButtonProps: null,
|
|
3178
|
+
'aria-labelledby': {
|
|
3179
|
+
type: String,
|
|
3180
|
+
default: null
|
|
3181
|
+
},
|
|
3182
|
+
'aria-label': {
|
|
3183
|
+
type: String,
|
|
3184
|
+
default: null
|
|
3185
|
+
}
|
|
3057
3186
|
},
|
|
3058
3187
|
numberFormat: null,
|
|
3059
3188
|
_numeral: null,
|
|
@@ -3265,24 +3394,24 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3265
3394
|
}
|
|
3266
3395
|
},
|
|
3267
3396
|
onUpButtonMouseDown(event) {
|
|
3268
|
-
if (!this
|
|
3397
|
+
if (!this.disabled) {
|
|
3269
3398
|
this.$refs.input.$el.focus();
|
|
3270
3399
|
this.repeat(event, null, 1);
|
|
3271
3400
|
event.preventDefault();
|
|
3272
3401
|
}
|
|
3273
3402
|
},
|
|
3274
3403
|
onUpButtonMouseUp() {
|
|
3275
|
-
if (!this
|
|
3404
|
+
if (!this.disabled) {
|
|
3276
3405
|
this.clearTimer();
|
|
3277
3406
|
}
|
|
3278
3407
|
},
|
|
3279
3408
|
onUpButtonMouseLeave() {
|
|
3280
|
-
if (!this
|
|
3409
|
+
if (!this.disabled) {
|
|
3281
3410
|
this.clearTimer();
|
|
3282
3411
|
}
|
|
3283
3412
|
},
|
|
3284
3413
|
onUpButtonKeyUp() {
|
|
3285
|
-
if (!this
|
|
3414
|
+
if (!this.disabled) {
|
|
3286
3415
|
this.clearTimer();
|
|
3287
3416
|
}
|
|
3288
3417
|
},
|
|
@@ -3292,24 +3421,24 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3292
3421
|
}
|
|
3293
3422
|
},
|
|
3294
3423
|
onDownButtonMouseDown(event) {
|
|
3295
|
-
if (!this
|
|
3424
|
+
if (!this.disabled) {
|
|
3296
3425
|
this.$refs.input.$el.focus();
|
|
3297
3426
|
this.repeat(event, null, -1);
|
|
3298
3427
|
event.preventDefault();
|
|
3299
3428
|
}
|
|
3300
3429
|
},
|
|
3301
3430
|
onDownButtonMouseUp() {
|
|
3302
|
-
if (!this
|
|
3431
|
+
if (!this.disabled) {
|
|
3303
3432
|
this.clearTimer();
|
|
3304
3433
|
}
|
|
3305
3434
|
},
|
|
3306
3435
|
onDownButtonMouseLeave() {
|
|
3307
|
-
if (!this
|
|
3436
|
+
if (!this.disabled) {
|
|
3308
3437
|
this.clearTimer();
|
|
3309
3438
|
}
|
|
3310
3439
|
},
|
|
3311
3440
|
onDownButtonKeyUp() {
|
|
3312
|
-
if (!this
|
|
3441
|
+
if (!this.disabled) {
|
|
3313
3442
|
this.clearTimer();
|
|
3314
3443
|
}
|
|
3315
3444
|
},
|
|
@@ -3473,6 +3602,22 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3473
3602
|
this.updateValue(event, newValueStr, null, 'delete-range');
|
|
3474
3603
|
}
|
|
3475
3604
|
break;
|
|
3605
|
+
|
|
3606
|
+
//home
|
|
3607
|
+
case 36:
|
|
3608
|
+
if (this.min) {
|
|
3609
|
+
this.updateModel(event, this.min);
|
|
3610
|
+
event.preventDefault();
|
|
3611
|
+
}
|
|
3612
|
+
break;
|
|
3613
|
+
|
|
3614
|
+
//end
|
|
3615
|
+
case 35:
|
|
3616
|
+
if (this.max) {
|
|
3617
|
+
this.updateModel(event, this.max);
|
|
3618
|
+
event.preventDefault();
|
|
3619
|
+
}
|
|
3620
|
+
break;
|
|
3476
3621
|
}
|
|
3477
3622
|
},
|
|
3478
3623
|
onInputKeyPress(event) {
|
|
@@ -3882,7 +4027,7 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3882
4027
|
},
|
|
3883
4028
|
computed: {
|
|
3884
4029
|
containerClass() {
|
|
3885
|
-
return ['p-inputnumber p-component p-inputwrapper',
|
|
4030
|
+
return ['p-inputnumber p-component p-inputwrapper', {
|
|
3886
4031
|
'p-inputwrapper-filled': this.filled,
|
|
3887
4032
|
'p-inputwrapper-focus': this.focused,
|
|
3888
4033
|
'p-inputnumber-buttons-stacked': this.showButtons && this.buttonLayout === 'stacked',
|
|
@@ -3946,18 +4091,23 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3946
4091
|
const _component_INButton = vue.resolveComponent("INButton");
|
|
3947
4092
|
|
|
3948
4093
|
return (vue.openBlock(), vue.createElementBlock("span", {
|
|
3949
|
-
class: vue.normalizeClass($options.containerClass)
|
|
3950
|
-
style: vue.normalizeStyle($props.style)
|
|
4094
|
+
class: vue.normalizeClass($options.containerClass)
|
|
3951
4095
|
}, [
|
|
3952
4096
|
vue.createVNode(_component_INInputText, vue.mergeProps({
|
|
3953
4097
|
ref: "input",
|
|
3954
|
-
class: [
|
|
4098
|
+
class: ["p-inputnumber-input", $props.inputClass],
|
|
4099
|
+
role: "spinbutton",
|
|
4100
|
+
id: $props.inputId,
|
|
3955
4101
|
style: $props.inputStyle,
|
|
3956
|
-
value: $options.formattedValue
|
|
3957
|
-
|
|
3958
|
-
"aria-valumin": $props.min,
|
|
4102
|
+
value: $options.formattedValue,
|
|
4103
|
+
"aria-valuemin": $props.min,
|
|
3959
4104
|
"aria-valuemax": $props.max,
|
|
4105
|
+
"aria-valuenow": $props.modelValue,
|
|
4106
|
+
disabled: $props.disabled,
|
|
3960
4107
|
readonly: $props.readonly,
|
|
4108
|
+
placeholder: $props.placeholder,
|
|
4109
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
4110
|
+
"aria-label": _ctx.ariaLabel,
|
|
3961
4111
|
onInput: $options.onUserInput,
|
|
3962
4112
|
onKeydown: $options.onInputKeyDown,
|
|
3963
4113
|
onKeypress: $options.onInputKeyPress,
|
|
@@ -3965,21 +4115,25 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3965
4115
|
onClick: $options.onInputClick,
|
|
3966
4116
|
onFocus: $options.onInputFocus,
|
|
3967
4117
|
onBlur: $options.onInputBlur
|
|
3968
|
-
}), null, 16, ["class", "style", "value", "aria-
|
|
4118
|
+
}, $props.inputProps), null, 16, ["id", "class", "style", "value", "aria-valuemin", "aria-valuemax", "aria-valuenow", "disabled", "readonly", "placeholder", "aria-labelledby", "aria-label", "onInput", "onKeydown", "onKeypress", "onPaste", "onClick", "onFocus", "onBlur"]),
|
|
3969
4119
|
($props.showButtons && $props.buttonLayout === 'stacked')
|
|
3970
4120
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
|
|
3971
4121
|
vue.createVNode(_component_INButton, vue.mergeProps({
|
|
3972
4122
|
class: $options.upButtonClass,
|
|
3973
4123
|
icon: $props.incrementButtonIcon
|
|
3974
4124
|
}, vue.toHandlers($options.upButtonListeners), {
|
|
3975
|
-
disabled:
|
|
3976
|
-
|
|
4125
|
+
disabled: $props.disabled,
|
|
4126
|
+
tabindex: -1,
|
|
4127
|
+
"aria-hidden": "true"
|
|
4128
|
+
}, $props.incrementButtonProps), null, 16, ["class", "icon", "disabled"]),
|
|
3977
4129
|
vue.createVNode(_component_INButton, vue.mergeProps({
|
|
3978
4130
|
class: $options.downButtonClass,
|
|
3979
4131
|
icon: $props.decrementButtonIcon
|
|
3980
4132
|
}, vue.toHandlers($options.downButtonListeners), {
|
|
3981
|
-
disabled:
|
|
3982
|
-
|
|
4133
|
+
disabled: $props.disabled,
|
|
4134
|
+
tabindex: -1,
|
|
4135
|
+
"aria-hidden": "true"
|
|
4136
|
+
}, $props.decrementButtonProps), null, 16, ["class", "icon", "disabled"])
|
|
3983
4137
|
]))
|
|
3984
4138
|
: vue.createCommentVNode("", true),
|
|
3985
4139
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
@@ -3988,8 +4142,10 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3988
4142
|
class: $options.upButtonClass,
|
|
3989
4143
|
icon: $props.incrementButtonIcon
|
|
3990
4144
|
}, vue.toHandlers($options.upButtonListeners), {
|
|
3991
|
-
disabled:
|
|
3992
|
-
|
|
4145
|
+
disabled: $props.disabled,
|
|
4146
|
+
tabindex: -1,
|
|
4147
|
+
"aria-hidden": "true"
|
|
4148
|
+
}, $props.incrementButtonProps), null, 16, ["class", "icon", "disabled"]))
|
|
3993
4149
|
: vue.createCommentVNode("", true),
|
|
3994
4150
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
3995
4151
|
? (vue.openBlock(), vue.createBlock(_component_INButton, vue.mergeProps({
|
|
@@ -3997,10 +4153,12 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
3997
4153
|
class: $options.downButtonClass,
|
|
3998
4154
|
icon: $props.decrementButtonIcon
|
|
3999
4155
|
}, vue.toHandlers($options.downButtonListeners), {
|
|
4000
|
-
disabled:
|
|
4001
|
-
|
|
4156
|
+
disabled: $props.disabled,
|
|
4157
|
+
tabindex: -1,
|
|
4158
|
+
"aria-hidden": "true"
|
|
4159
|
+
}, $props.decrementButtonProps), null, 16, ["class", "icon", "disabled"]))
|
|
4002
4160
|
: vue.createCommentVNode("", true)
|
|
4003
|
-
],
|
|
4161
|
+
], 2))
|
|
4004
4162
|
}
|
|
4005
4163
|
|
|
4006
4164
|
function styleInject(css, ref) {
|
|
@@ -4327,7 +4485,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4327
4485
|
|
|
4328
4486
|
var script = {
|
|
4329
4487
|
name: 'Dropdown',
|
|
4330
|
-
emits: ['update:modelValue', '
|
|
4488
|
+
emits: ['update:modelValue', 'change', 'focus', 'blur', 'before-show', 'before-hide', 'show', 'hide', 'filter'],
|
|
4331
4489
|
props: {
|
|
4332
4490
|
modelValue: null,
|
|
4333
4491
|
options: Array,
|
|
@@ -4357,12 +4515,46 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4357
4515
|
dataKey: null,
|
|
4358
4516
|
showClear: Boolean,
|
|
4359
4517
|
inputId: String,
|
|
4360
|
-
|
|
4361
|
-
|
|
4518
|
+
inputStyle: null,
|
|
4519
|
+
inputClass: null,
|
|
4520
|
+
inputProps: null,
|
|
4521
|
+
panelStyle: null,
|
|
4522
|
+
panelClass: null,
|
|
4523
|
+
panelProps: null,
|
|
4524
|
+
filterInputProps: null,
|
|
4525
|
+
clearIconProps: null,
|
|
4362
4526
|
appendTo: {
|
|
4363
4527
|
type: String,
|
|
4364
4528
|
default: 'body'
|
|
4365
4529
|
},
|
|
4530
|
+
loading: {
|
|
4531
|
+
type: Boolean,
|
|
4532
|
+
default: false
|
|
4533
|
+
},
|
|
4534
|
+
loadingIcon: {
|
|
4535
|
+
type: String,
|
|
4536
|
+
default: 'pi pi-spinner pi-spin'
|
|
4537
|
+
},
|
|
4538
|
+
virtualScrollerOptions: {
|
|
4539
|
+
type: Object,
|
|
4540
|
+
default: null
|
|
4541
|
+
},
|
|
4542
|
+
autoOptionFocus: {
|
|
4543
|
+
type: Boolean,
|
|
4544
|
+
default: true
|
|
4545
|
+
},
|
|
4546
|
+
filterMessage: {
|
|
4547
|
+
type: String,
|
|
4548
|
+
default: null
|
|
4549
|
+
},
|
|
4550
|
+
selectionMessage: {
|
|
4551
|
+
type: String,
|
|
4552
|
+
default: null
|
|
4553
|
+
},
|
|
4554
|
+
emptySelectionMessage: {
|
|
4555
|
+
type: String,
|
|
4556
|
+
default: null
|
|
4557
|
+
},
|
|
4366
4558
|
emptyFilterMessage: {
|
|
4367
4559
|
type: String,
|
|
4368
4560
|
default: null
|
|
@@ -4371,46 +4563,55 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4371
4563
|
type: String,
|
|
4372
4564
|
default: null
|
|
4373
4565
|
},
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
default: false
|
|
4566
|
+
tabindex: {
|
|
4567
|
+
type: Number,
|
|
4568
|
+
default: 0
|
|
4378
4569
|
},
|
|
4379
|
-
|
|
4570
|
+
'aria-label': {
|
|
4380
4571
|
type: String,
|
|
4381
|
-
default:
|
|
4572
|
+
default: null
|
|
4382
4573
|
},
|
|
4383
|
-
|
|
4384
|
-
type:
|
|
4574
|
+
'aria-labelledby': {
|
|
4575
|
+
type: String,
|
|
4385
4576
|
default: null
|
|
4386
4577
|
}
|
|
4387
4578
|
},
|
|
4579
|
+
outsideClickListener: null,
|
|
4580
|
+
scrollHandler: null,
|
|
4581
|
+
resizeListener: null,
|
|
4582
|
+
overlay: null,
|
|
4583
|
+
list: null,
|
|
4584
|
+
virtualScroller: null,
|
|
4585
|
+
searchTimeout: null,
|
|
4586
|
+
searchValue: null,
|
|
4587
|
+
isModelValueChanged: false,
|
|
4588
|
+
selectOnFocus: false,
|
|
4589
|
+
focusOnHover: false,
|
|
4388
4590
|
data() {
|
|
4389
4591
|
return {
|
|
4592
|
+
id: utils.UniqueComponentId(),
|
|
4390
4593
|
focused: false,
|
|
4594
|
+
focusedOptionIndex: -1,
|
|
4391
4595
|
filterValue: null,
|
|
4392
4596
|
overlayVisible: false
|
|
4393
|
-
}
|
|
4597
|
+
}
|
|
4394
4598
|
},
|
|
4395
4599
|
watch: {
|
|
4396
4600
|
modelValue() {
|
|
4397
4601
|
this.isModelValueChanged = true;
|
|
4602
|
+
},
|
|
4603
|
+
options() {
|
|
4604
|
+
this.autoUpdateModel();
|
|
4398
4605
|
}
|
|
4399
4606
|
},
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
previousSearchChar: null,
|
|
4406
|
-
searchValue: null,
|
|
4407
|
-
overlay: null,
|
|
4408
|
-
itemsWrapper: null,
|
|
4409
|
-
virtualScroller: null,
|
|
4410
|
-
isModelValueChanged: false,
|
|
4607
|
+
mounted() {
|
|
4608
|
+
this.id = this.$attrs.id || this.id;
|
|
4609
|
+
|
|
4610
|
+
this.autoUpdateModel();
|
|
4611
|
+
},
|
|
4411
4612
|
updated() {
|
|
4412
4613
|
if (this.overlayVisible && this.isModelValueChanged) {
|
|
4413
|
-
this.
|
|
4614
|
+
this.scrollInView(this.findSelectedOptionIndex());
|
|
4414
4615
|
}
|
|
4415
4616
|
|
|
4416
4617
|
this.isModelValueChanged = false;
|
|
@@ -4424,8 +4625,6 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4424
4625
|
this.scrollHandler = null;
|
|
4425
4626
|
}
|
|
4426
4627
|
|
|
4427
|
-
this.itemsWrapper = null;
|
|
4428
|
-
|
|
4429
4628
|
if (this.overlay) {
|
|
4430
4629
|
utils.ZIndexUtils.clear(this.overlay);
|
|
4431
4630
|
this.overlay = null;
|
|
@@ -4442,13 +4641,13 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4442
4641
|
return this.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.optionValue) : option;
|
|
4443
4642
|
},
|
|
4444
4643
|
getOptionRenderKey(option, index) {
|
|
4445
|
-
return this.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option) + '_' + index
|
|
4644
|
+
return (this.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index;
|
|
4446
4645
|
},
|
|
4447
4646
|
isOptionDisabled(option) {
|
|
4448
4647
|
return this.optionDisabled ? utils.ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
|
|
4449
4648
|
},
|
|
4450
|
-
|
|
4451
|
-
return
|
|
4649
|
+
isOptionGroup(option) {
|
|
4650
|
+
return this.optionGroupLabel && option.optionGroup && option.group;
|
|
4452
4651
|
},
|
|
4453
4652
|
getOptionGroupLabel(optionGroup) {
|
|
4454
4653
|
return utils.ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel);
|
|
@@ -4456,254 +4655,333 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4456
4655
|
getOptionGroupChildren(optionGroup) {
|
|
4457
4656
|
return utils.ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren);
|
|
4458
4657
|
},
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
return index !== -1 ? (this.optionGroupLabel ? this.getOptionGroupChildren(this.visibleOptions[index.group])[index.option]: this.visibleOptions[index]) : null;
|
|
4462
|
-
},
|
|
4463
|
-
getSelectedOptionIndex() {
|
|
4464
|
-
if (this.modelValue != null && this.visibleOptions) {
|
|
4465
|
-
if (this.optionGroupLabel) {
|
|
4466
|
-
for (let i = 0; i < this.visibleOptions.length; i++) {
|
|
4467
|
-
let selectedOptionIndex = this.findOptionIndexInList(this.modelValue, this.getOptionGroupChildren(this.visibleOptions[i]));
|
|
4468
|
-
if (selectedOptionIndex !== -1) {
|
|
4469
|
-
return {group: i, option: selectedOptionIndex};
|
|
4470
|
-
}
|
|
4471
|
-
}
|
|
4472
|
-
}
|
|
4473
|
-
else {
|
|
4474
|
-
return this.findOptionIndexInList(this.modelValue, this.visibleOptions);
|
|
4475
|
-
}
|
|
4476
|
-
}
|
|
4477
|
-
|
|
4478
|
-
return -1;
|
|
4479
|
-
},
|
|
4480
|
-
findOptionIndexInList(value, list) {
|
|
4481
|
-
for (let i = 0; i < list.length; i++) {
|
|
4482
|
-
if ((utils.ObjectUtils.equals(value, this.getOptionValue(list[i]), this.equalityKey))) {
|
|
4483
|
-
return i;
|
|
4484
|
-
}
|
|
4485
|
-
}
|
|
4486
|
-
|
|
4487
|
-
return -1;
|
|
4488
|
-
},
|
|
4489
|
-
isSelected(option) {
|
|
4490
|
-
return utils.ObjectUtils.equals(this.modelValue, this.getOptionValue(option), this.equalityKey);
|
|
4658
|
+
getAriaPosInset(index) {
|
|
4659
|
+
return (this.optionGroupLabel ? index - this.visibleOptions.slice(0, index).filter(option => this.isOptionGroup(option)).length : index) + 1;
|
|
4491
4660
|
},
|
|
4492
4661
|
show(isFocus) {
|
|
4493
4662
|
this.$emit('before-show');
|
|
4494
4663
|
this.overlayVisible = true;
|
|
4664
|
+
this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : (this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1);
|
|
4495
4665
|
|
|
4496
4666
|
isFocus && this.$refs.focusInput.focus();
|
|
4497
4667
|
},
|
|
4498
|
-
hide() {
|
|
4499
|
-
|
|
4500
|
-
|
|
4668
|
+
hide(isFocus) {
|
|
4669
|
+
const _hide = () => {
|
|
4670
|
+
this.$emit('before-hide');
|
|
4671
|
+
this.overlayVisible = false;
|
|
4672
|
+
this.focusedOptionIndex = -1;
|
|
4673
|
+
this.searchValue = '';
|
|
4674
|
+
|
|
4675
|
+
isFocus && this.$refs.focusInput.focus();
|
|
4676
|
+
};
|
|
4677
|
+
|
|
4678
|
+
setTimeout(() => { _hide(); }, 0); // For ScreenReaders
|
|
4501
4679
|
},
|
|
4502
4680
|
onFocus(event) {
|
|
4503
4681
|
this.focused = true;
|
|
4682
|
+
this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
4683
|
+
this.overlayVisible && this.scrollInView(this.focusedOptionIndex);
|
|
4504
4684
|
this.$emit('focus', event);
|
|
4505
4685
|
},
|
|
4506
4686
|
onBlur(event) {
|
|
4507
4687
|
this.focused = false;
|
|
4688
|
+
this.focusedOptionIndex = -1;
|
|
4689
|
+
this.searchValue = '';
|
|
4508
4690
|
this.$emit('blur', event);
|
|
4509
4691
|
},
|
|
4510
4692
|
onKeyDown(event) {
|
|
4511
|
-
switch(event.
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
break;
|
|
4693
|
+
switch (event.code) {
|
|
4694
|
+
case 'ArrowDown':
|
|
4695
|
+
this.onArrowDownKey(event);
|
|
4696
|
+
break;
|
|
4516
4697
|
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
break;
|
|
4698
|
+
case 'ArrowUp':
|
|
4699
|
+
this.onArrowUpKey(event, this.editable);
|
|
4700
|
+
break;
|
|
4521
4701
|
|
|
4522
|
-
|
|
4523
|
-
case
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
event.preventDefault();
|
|
4527
|
-
}
|
|
4528
|
-
break;
|
|
4702
|
+
case 'ArrowLeft':
|
|
4703
|
+
case 'ArrowRight':
|
|
4704
|
+
this.onArrowLeftKey(event, this.editable);
|
|
4705
|
+
break;
|
|
4529
4706
|
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
if (this.overlayVisible) {
|
|
4534
|
-
this.hide();
|
|
4535
|
-
event.preventDefault();
|
|
4536
|
-
}
|
|
4537
|
-
break;
|
|
4707
|
+
case 'Home':
|
|
4708
|
+
this.onHomeKey(event, this.editable);
|
|
4709
|
+
break;
|
|
4538
4710
|
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4711
|
+
case 'End':
|
|
4712
|
+
this.onEndKey(event, this.editable);
|
|
4713
|
+
break;
|
|
4714
|
+
|
|
4715
|
+
case 'PageDown':
|
|
4716
|
+
this.onPageDownKey(event);
|
|
4717
|
+
break;
|
|
4718
|
+
|
|
4719
|
+
case 'PageUp':
|
|
4720
|
+
this.onPageUpKey(event);
|
|
4721
|
+
break;
|
|
4722
|
+
|
|
4723
|
+
case 'Space':
|
|
4724
|
+
this.onSpaceKey(event, this.editable);
|
|
4725
|
+
break;
|
|
4726
|
+
|
|
4727
|
+
case 'Enter':
|
|
4728
|
+
this.onEnterKey(event);
|
|
4729
|
+
break;
|
|
4730
|
+
|
|
4731
|
+
case 'Escape':
|
|
4732
|
+
this.onEscapeKey(event);
|
|
4733
|
+
break;
|
|
4734
|
+
|
|
4735
|
+
case 'Tab':
|
|
4736
|
+
this.onTabKey(event);
|
|
4737
|
+
break;
|
|
4738
|
+
|
|
4739
|
+
case 'Backspace':
|
|
4740
|
+
this.onBackspaceKey(event, this.editable);
|
|
4741
|
+
break;
|
|
4742
|
+
|
|
4743
|
+
case 'ShiftLeft':
|
|
4744
|
+
case 'ShiftRight':
|
|
4745
|
+
//NOOP
|
|
4746
|
+
break;
|
|
4543
4747
|
|
|
4544
4748
|
default:
|
|
4545
|
-
|
|
4546
|
-
|
|
4749
|
+
if (utils.ObjectUtils.isPrintableCharacter(event.key)) {
|
|
4750
|
+
!this.overlayVisible && this.show();
|
|
4751
|
+
!this.editable && this.searchOptions(event, event.key);
|
|
4752
|
+
}
|
|
4753
|
+
|
|
4754
|
+
break;
|
|
4755
|
+
}
|
|
4756
|
+
},
|
|
4757
|
+
onEditableInput(event) {
|
|
4758
|
+
const value = event.target.value;
|
|
4759
|
+
|
|
4760
|
+
this.searchValue = '';
|
|
4761
|
+
const matched = this.searchOptions(event, value);
|
|
4762
|
+
!matched && (this.focusedOptionIndex = -1);
|
|
4763
|
+
|
|
4764
|
+
this.$emit('update:modelValue', value);
|
|
4765
|
+
},
|
|
4766
|
+
onContainerClick(event) {
|
|
4767
|
+
if (this.disabled || this.loading) {
|
|
4768
|
+
return;
|
|
4769
|
+
}
|
|
4770
|
+
|
|
4771
|
+
if (utils.DomHandler.hasClass(event.target, 'p-dropdown-clear-icon') || event.target.tagName === 'INPUT') {
|
|
4772
|
+
return;
|
|
4773
|
+
}
|
|
4774
|
+
else if (!this.overlay || !this.overlay.contains(event.target)) {
|
|
4775
|
+
this.overlayVisible ? this.hide(true) : this.show(true);
|
|
4547
4776
|
}
|
|
4548
4777
|
},
|
|
4778
|
+
onClearClick(event) {
|
|
4779
|
+
this.updateModel(event, null);
|
|
4780
|
+
},
|
|
4781
|
+
onFirstHiddenFocus(event) {
|
|
4782
|
+
const relatedTarget = event.relatedTarget;
|
|
4783
|
+
|
|
4784
|
+
if (relatedTarget === this.$refs.focusInput) {
|
|
4785
|
+
const firstFocusableEl = utils.DomHandler.getFirstFocusableElement(this.overlay, ':not(.p-hidden-focusable)');
|
|
4786
|
+
firstFocusableEl && firstFocusableEl.focus();
|
|
4787
|
+
}
|
|
4788
|
+
else {
|
|
4789
|
+
this.$refs.focusInput.focus();
|
|
4790
|
+
}
|
|
4791
|
+
},
|
|
4792
|
+
onLastHiddenFocus() {
|
|
4793
|
+
this.$refs.firstHiddenFocusableElementOnOverlay.focus();
|
|
4794
|
+
},
|
|
4795
|
+
onOptionSelect(event, option) {
|
|
4796
|
+
const value = this.getOptionValue(option);
|
|
4797
|
+
|
|
4798
|
+
this.updateModel(event, value);
|
|
4799
|
+
this.hide(true);
|
|
4800
|
+
},
|
|
4801
|
+
onOptionMouseMove(event, index) {
|
|
4802
|
+
if (this.focusOnHover) {
|
|
4803
|
+
this.changeFocusedOptionIndex(event, index);
|
|
4804
|
+
}
|
|
4805
|
+
},
|
|
4806
|
+
onFilterChange(event) {
|
|
4807
|
+
const value = event.target.value;
|
|
4808
|
+
|
|
4809
|
+
this.filterValue = value;
|
|
4810
|
+
this.focusedOptionIndex = -1;
|
|
4811
|
+
this.$emit('filter', { originalEvent: event, value });
|
|
4812
|
+
|
|
4813
|
+
!this.virtualScrollerDisabled && this.virtualScroller.scrollToIndex(0);
|
|
4814
|
+
},
|
|
4549
4815
|
onFilterKeyDown(event) {
|
|
4550
|
-
switch (event.
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
this.onDownKey(event);
|
|
4816
|
+
switch (event.code) {
|
|
4817
|
+
case 'ArrowDown':
|
|
4818
|
+
this.onArrowDownKey(event);
|
|
4554
4819
|
break;
|
|
4555
4820
|
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
this.onUpKey(event);
|
|
4821
|
+
case 'ArrowUp':
|
|
4822
|
+
this.onArrowUpKey(event, true);
|
|
4559
4823
|
break;
|
|
4560
4824
|
|
|
4561
|
-
|
|
4562
|
-
case
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4825
|
+
case 'ArrowLeft':
|
|
4826
|
+
case 'ArrowRight':
|
|
4827
|
+
this.onArrowLeftKey(event, true);
|
|
4828
|
+
break;
|
|
4829
|
+
|
|
4830
|
+
case 'Home':
|
|
4831
|
+
this.onHomeKey(event, true);
|
|
4832
|
+
break;
|
|
4833
|
+
|
|
4834
|
+
case 'End':
|
|
4835
|
+
this.onEndKey(event, true);
|
|
4836
|
+
break;
|
|
4837
|
+
|
|
4838
|
+
case 'Enter':
|
|
4839
|
+
this.onEnterKey(event);
|
|
4840
|
+
break;
|
|
4841
|
+
|
|
4842
|
+
case 'Escape':
|
|
4843
|
+
this.onEscapeKey(event);
|
|
4844
|
+
break;
|
|
4845
|
+
|
|
4846
|
+
case 'Tab':
|
|
4847
|
+
this.onTabKey(event, true);
|
|
4848
|
+
break;
|
|
4567
4849
|
}
|
|
4568
4850
|
},
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
let nextOption = this.visibleOptions && this.visibleOptions.length > 0 ? this.findNextOption(this.getSelectedOptionIndex()) : null;
|
|
4576
|
-
if (nextOption) {
|
|
4577
|
-
this.updateModel(event, this.getOptionValue(nextOption));
|
|
4578
|
-
}
|
|
4579
|
-
}
|
|
4851
|
+
onFilterBlur() {
|
|
4852
|
+
this.focusedOptionIndex = -1;
|
|
4853
|
+
},
|
|
4854
|
+
onFilterUpdated() {
|
|
4855
|
+
if (this.overlayVisible) {
|
|
4856
|
+
this.alignOverlay();
|
|
4580
4857
|
}
|
|
4581
|
-
|
|
4582
|
-
event.preventDefault();
|
|
4583
4858
|
},
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4859
|
+
onOverlayClick(event) {
|
|
4860
|
+
OverlayEventBus__default["default"].emit('overlay-click', {
|
|
4861
|
+
originalEvent: event,
|
|
4862
|
+
target: this.$el
|
|
4863
|
+
});
|
|
4864
|
+
},
|
|
4865
|
+
onOverlayKeyDown(event) {
|
|
4866
|
+
switch (event.code) {
|
|
4867
|
+
case 'Escape':
|
|
4868
|
+
this.onEscapeKey(event);
|
|
4869
|
+
break;
|
|
4590
4870
|
}
|
|
4871
|
+
},
|
|
4872
|
+
onArrowDownKey(event) {
|
|
4873
|
+
const optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.findFirstFocusedOptionIndex();
|
|
4874
|
+
|
|
4875
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
4591
4876
|
|
|
4877
|
+
!this.overlayVisible && this.show();
|
|
4592
4878
|
event.preventDefault();
|
|
4593
4879
|
},
|
|
4594
|
-
|
|
4595
|
-
if (
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4880
|
+
onArrowUpKey(event, pressedInInputText = false) {
|
|
4881
|
+
if (event.altKey && !pressedInInputText) {
|
|
4882
|
+
if (this.focusedOptionIndex !== -1) {
|
|
4883
|
+
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
|
4884
|
+
}
|
|
4599
4885
|
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
else if ((groupIndex + 1) !== this.visibleOptions.length)
|
|
4603
|
-
return this.findNextOption({group: (groupIndex + 1), option: -1});
|
|
4604
|
-
else
|
|
4605
|
-
return null;
|
|
4886
|
+
this.overlayVisible && this.hide();
|
|
4887
|
+
event.preventDefault();
|
|
4606
4888
|
}
|
|
4607
4889
|
else {
|
|
4608
|
-
|
|
4890
|
+
const optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.findLastFocusedOptionIndex();
|
|
4891
|
+
|
|
4892
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
4893
|
+
|
|
4894
|
+
!this.overlayVisible && this.show();
|
|
4895
|
+
event.preventDefault();
|
|
4609
4896
|
}
|
|
4610
4897
|
},
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
if (i === list.length) {
|
|
4614
|
-
return null;
|
|
4615
|
-
}
|
|
4616
|
-
|
|
4617
|
-
let option = list[i];
|
|
4618
|
-
if (this.isOptionDisabled(option))
|
|
4619
|
-
return this.findNextOptionInList(i);
|
|
4620
|
-
else
|
|
4621
|
-
return option;
|
|
4898
|
+
onArrowLeftKey(event, pressedInInputText = false) {
|
|
4899
|
+
pressedInInputText && (this.focusedOptionIndex = -1);
|
|
4622
4900
|
},
|
|
4623
|
-
|
|
4624
|
-
if (
|
|
4625
|
-
|
|
4901
|
+
onHomeKey(event, pressedInInputText = false) {
|
|
4902
|
+
if (pressedInInputText) {
|
|
4903
|
+
event.currentTarget.setSelectionRange(0, 0);
|
|
4904
|
+
this.focusedOptionIndex = -1;
|
|
4626
4905
|
}
|
|
4906
|
+
else {
|
|
4907
|
+
this.changeFocusedOptionIndex(event, this.findFirstOptionIndex());
|
|
4627
4908
|
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
let optionIndex = index.option;
|
|
4631
|
-
let option = this.findPrevOptionInList(this.getOptionGroupChildren(this.visibleOptions[groupIndex]), optionIndex);
|
|
4909
|
+
!this.overlayVisible && this.show();
|
|
4910
|
+
}
|
|
4632
4911
|
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4912
|
+
event.preventDefault();
|
|
4913
|
+
},
|
|
4914
|
+
onEndKey(event, pressedInInputText = false) {
|
|
4915
|
+
if (pressedInInputText) {
|
|
4916
|
+
const target = event.currentTarget;
|
|
4917
|
+
const len = target.value.length;
|
|
4918
|
+
target.setSelectionRange(len, len);
|
|
4919
|
+
this.focusedOptionIndex = -1;
|
|
4639
4920
|
}
|
|
4640
4921
|
else {
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
findPrevOptionInList(list, index) {
|
|
4645
|
-
let i = index - 1;
|
|
4646
|
-
if (i < 0) {
|
|
4647
|
-
return null;
|
|
4922
|
+
this.changeFocusedOptionIndex(event, this.findLastOptionIndex());
|
|
4923
|
+
|
|
4924
|
+
!this.overlayVisible && this.show();
|
|
4648
4925
|
}
|
|
4649
4926
|
|
|
4650
|
-
|
|
4651
|
-
if (this.isOptionDisabled(option))
|
|
4652
|
-
return this.findPrevOption(i);
|
|
4653
|
-
else
|
|
4654
|
-
return option;
|
|
4927
|
+
event.preventDefault();
|
|
4655
4928
|
},
|
|
4656
|
-
|
|
4657
|
-
this.
|
|
4929
|
+
onPageUpKey(event) {
|
|
4930
|
+
this.scrollInView(0);
|
|
4931
|
+
event.preventDefault();
|
|
4658
4932
|
},
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4933
|
+
onPageDownKey(event) {
|
|
4934
|
+
this.scrollInView(this.visibleOptions.length - 1);
|
|
4935
|
+
event.preventDefault();
|
|
4936
|
+
},
|
|
4937
|
+
onEnterKey(event) {
|
|
4938
|
+
if (!this.overlayVisible) {
|
|
4939
|
+
this.onArrowDownKey(event);
|
|
4662
4940
|
}
|
|
4941
|
+
else {
|
|
4942
|
+
if (this.focusedOptionIndex !== -1) {
|
|
4943
|
+
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
|
4944
|
+
}
|
|
4663
4945
|
|
|
4664
|
-
|
|
4665
|
-
return;
|
|
4946
|
+
this.hide();
|
|
4666
4947
|
}
|
|
4667
|
-
else if (!this.overlay || !this.overlay.contains(event.target)) {
|
|
4668
|
-
if (this.overlayVisible)
|
|
4669
|
-
this.hide();
|
|
4670
|
-
else
|
|
4671
|
-
this.show();
|
|
4672
4948
|
|
|
4673
|
-
|
|
4674
|
-
}
|
|
4949
|
+
event.preventDefault();
|
|
4675
4950
|
},
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4951
|
+
onSpaceKey(event, pressedInInputText = false) {
|
|
4952
|
+
!pressedInInputText && this.onEnterKey(event);
|
|
4953
|
+
},
|
|
4954
|
+
onEscapeKey(event) {
|
|
4955
|
+
this.overlayVisible && this.hide(true);
|
|
4956
|
+
event.preventDefault();
|
|
4957
|
+
},
|
|
4958
|
+
onTabKey(event, pressedInInputText = false) {
|
|
4959
|
+
if (!pressedInInputText) {
|
|
4960
|
+
if (this.overlayVisible && this.hasFocusableElements()) {
|
|
4961
|
+
this.$refs.firstHiddenFocusableElementOnOverlay.focus();
|
|
4680
4962
|
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4963
|
+
event.preventDefault();
|
|
4964
|
+
}
|
|
4965
|
+
else {
|
|
4966
|
+
if (this.focusedOptionIndex !== -1) {
|
|
4967
|
+
this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);
|
|
4968
|
+
}
|
|
4969
|
+
|
|
4970
|
+
this.overlayVisible && this.hide(this.filter);
|
|
4971
|
+
}
|
|
4972
|
+
}
|
|
4684
4973
|
},
|
|
4685
|
-
|
|
4686
|
-
|
|
4974
|
+
onBackspaceKey(event, pressedInInputText = false) {
|
|
4975
|
+
if (pressedInInputText) {
|
|
4976
|
+
!this.overlayVisible && this.show();
|
|
4977
|
+
}
|
|
4687
4978
|
},
|
|
4688
4979
|
onOverlayEnter(el) {
|
|
4689
4980
|
utils.ZIndexUtils.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
4690
4981
|
this.alignOverlay();
|
|
4691
|
-
this.
|
|
4692
|
-
|
|
4693
|
-
if (!this.virtualScrollerDisabled) {
|
|
4694
|
-
const selectedIndex = this.getSelectedOptionIndex();
|
|
4695
|
-
if (selectedIndex !== -1) {
|
|
4696
|
-
setTimeout(() => {
|
|
4697
|
-
this.virtualScroller && this.virtualScroller.scrollToIndex(selectedIndex);
|
|
4698
|
-
}, 0);
|
|
4699
|
-
}
|
|
4700
|
-
}
|
|
4982
|
+
this.scrollInView();
|
|
4701
4983
|
},
|
|
4702
4984
|
onOverlayAfterEnter() {
|
|
4703
|
-
if (this.filter) {
|
|
4704
|
-
this.$refs.filterInput.focus();
|
|
4705
|
-
}
|
|
4706
|
-
|
|
4707
4985
|
this.bindOutsideClickListener();
|
|
4708
4986
|
this.bindScrollListener();
|
|
4709
4987
|
this.bindResizeListener();
|
|
@@ -4714,8 +4992,8 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4714
4992
|
this.unbindOutsideClickListener();
|
|
4715
4993
|
this.unbindScrollListener();
|
|
4716
4994
|
this.unbindResizeListener();
|
|
4995
|
+
|
|
4717
4996
|
this.$emit('hide');
|
|
4718
|
-
this.itemsWrapper = null;
|
|
4719
4997
|
this.overlay = null;
|
|
4720
4998
|
},
|
|
4721
4999
|
onOverlayAfterLeave(el) {
|
|
@@ -4730,10 +5008,6 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4730
5008
|
utils.DomHandler.absolutePosition(this.overlay, this.$el);
|
|
4731
5009
|
}
|
|
4732
5010
|
},
|
|
4733
|
-
updateModel(event, value) {
|
|
4734
|
-
this.$emit('update:modelValue', value);
|
|
4735
|
-
this.$emit('change', {originalEvent: event, value: value});
|
|
4736
|
-
},
|
|
4737
5011
|
bindOutsideClickListener() {
|
|
4738
5012
|
if (!this.outsideClickListener) {
|
|
4739
5013
|
this.outsideClickListener = (event) => {
|
|
@@ -4782,162 +5056,153 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4782
5056
|
this.resizeListener = null;
|
|
4783
5057
|
}
|
|
4784
5058
|
},
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
5059
|
+
hasFocusableElements() {
|
|
5060
|
+
return utils.DomHandler.getFocusableElements(this.overlay, ':not(.p-hidden-focusable)').length > 0;
|
|
5061
|
+
},
|
|
5062
|
+
isOptionMatched(option) {
|
|
5063
|
+
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
|
|
5064
|
+
},
|
|
5065
|
+
isValidOption(option) {
|
|
5066
|
+
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
|
5067
|
+
},
|
|
5068
|
+
isValidSelectedOption(option) {
|
|
5069
|
+
return this.isValidOption(option) && this.isSelected(option);
|
|
5070
|
+
},
|
|
5071
|
+
isSelected(option) {
|
|
5072
|
+
return utils.ObjectUtils.equals(this.modelValue, this.getOptionValue(option), this.equalityKey);
|
|
5073
|
+
},
|
|
5074
|
+
findFirstOptionIndex() {
|
|
5075
|
+
return this.visibleOptions.findIndex(option => this.isValidOption(option));
|
|
5076
|
+
},
|
|
5077
|
+
findLastOptionIndex() {
|
|
5078
|
+
return utils.ObjectUtils.findLastIndex(this.visibleOptions, option => this.isValidOption(option));
|
|
5079
|
+
},
|
|
5080
|
+
findNextOptionIndex(index) {
|
|
5081
|
+
const matchedOptionIndex = index < (this.visibleOptions.length - 1) ? this.visibleOptions.slice(index + 1).findIndex(option => this.isValidOption(option)) : -1;
|
|
5082
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
5083
|
+
},
|
|
5084
|
+
findPrevOptionIndex(index) {
|
|
5085
|
+
const matchedOptionIndex = index > 0 ? utils.ObjectUtils.findLastIndex(this.visibleOptions.slice(0, index), option => this.isValidOption(option)) : -1;
|
|
5086
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
5087
|
+
},
|
|
5088
|
+
findSelectedOptionIndex() {
|
|
5089
|
+
return this.hasSelectedOption ? this.visibleOptions.findIndex(option => this.isValidSelectedOption(option)) : -1;
|
|
5090
|
+
},
|
|
5091
|
+
findFirstFocusedOptionIndex() {
|
|
5092
|
+
const selectedIndex = this.findSelectedOptionIndex();
|
|
5093
|
+
return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
|
|
5094
|
+
},
|
|
5095
|
+
findLastFocusedOptionIndex() {
|
|
5096
|
+
const selectedIndex = this.findSelectedOptionIndex();
|
|
5097
|
+
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
5098
|
+
},
|
|
5099
|
+
searchOptions(event, char) {
|
|
5100
|
+
this.searchValue = (this.searchValue || '') + char;
|
|
5101
|
+
|
|
5102
|
+
let optionIndex = -1;
|
|
5103
|
+
let matched = false;
|
|
5104
|
+
|
|
5105
|
+
if (this.focusedOptionIndex !== -1) {
|
|
5106
|
+
optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(option => this.isOptionMatched(option));
|
|
5107
|
+
optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(option => this.isOptionMatched(option)) : optionIndex + this.focusedOptionIndex;
|
|
5108
|
+
}
|
|
5109
|
+
else {
|
|
5110
|
+
optionIndex = this.visibleOptions.findIndex(option => this.isOptionMatched(option));
|
|
4788
5111
|
}
|
|
4789
5112
|
|
|
4790
|
-
if (
|
|
4791
|
-
|
|
5113
|
+
if (optionIndex !== -1) {
|
|
5114
|
+
matched = true;
|
|
4792
5115
|
}
|
|
4793
5116
|
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
5117
|
+
if (optionIndex === -1 && this.focusedOptionIndex === -1) {
|
|
5118
|
+
optionIndex = this.findFirstFocusedOptionIndex();
|
|
5119
|
+
}
|
|
4797
5120
|
|
|
4798
|
-
if (
|
|
4799
|
-
this.
|
|
4800
|
-
|
|
4801
|
-
this.searchValue = this.searchValue ? this.searchValue + char : char;
|
|
5121
|
+
if (optionIndex !== -1) {
|
|
5122
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
5123
|
+
}
|
|
4802
5124
|
|
|
4803
|
-
if (this.
|
|
4804
|
-
|
|
4805
|
-
let newOption = this.optionGroupLabel ? this.searchOptionInGroup(searchIndex) : this.searchOption(++searchIndex);
|
|
4806
|
-
if (newOption) {
|
|
4807
|
-
this.updateModel(event, this.getOptionValue(newOption));
|
|
4808
|
-
}
|
|
5125
|
+
if (this.searchTimeout) {
|
|
5126
|
+
clearTimeout(this.searchTimeout);
|
|
4809
5127
|
}
|
|
4810
5128
|
|
|
4811
5129
|
this.searchTimeout = setTimeout(() => {
|
|
4812
|
-
this.searchValue =
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
searchOption(index) {
|
|
4816
|
-
let option;
|
|
5130
|
+
this.searchValue = '';
|
|
5131
|
+
this.searchTimeout = null;
|
|
5132
|
+
}, 500);
|
|
4817
5133
|
|
|
4818
|
-
|
|
4819
|
-
|
|
5134
|
+
return matched;
|
|
5135
|
+
},
|
|
5136
|
+
changeFocusedOptionIndex(event, index) {
|
|
5137
|
+
if (this.focusedOptionIndex !== index) {
|
|
5138
|
+
this.focusedOptionIndex = index;
|
|
5139
|
+
this.scrollInView();
|
|
4820
5140
|
|
|
4821
|
-
if (
|
|
4822
|
-
|
|
5141
|
+
if (this.selectOnFocus) {
|
|
5142
|
+
this.updateModel(event, this.getOptionValue(this.visibleOptions[index]));
|
|
4823
5143
|
}
|
|
4824
5144
|
}
|
|
4825
|
-
|
|
4826
|
-
return option;
|
|
4827
5145
|
},
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
}
|
|
5146
|
+
scrollInView(index = -1) {
|
|
5147
|
+
const id = index !== -1 ? `${this.id}_${index}` : this.focusedOptionId;
|
|
5148
|
+
const element = utils.DomHandler.findSingle(this.list, `li[id="${id}"]`);
|
|
5149
|
+
if (element) {
|
|
5150
|
+
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' });
|
|
4834
5151
|
}
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
let searchIndex = index === -1 ? {group: 0, option: -1} : index;
|
|
4840
|
-
|
|
4841
|
-
for (let i = searchIndex.group; i < this.visibleOptions.length; i++) {
|
|
4842
|
-
let groupOptions = this.getOptionGroupChildren(this.visibleOptions[i]);
|
|
4843
|
-
for (let j = (searchIndex.group === i ? searchIndex.option + 1 : 0); j < groupOptions.length; j++) {
|
|
4844
|
-
if (this.matchesSearchValue(groupOptions[j])) {
|
|
4845
|
-
return groupOptions[j];
|
|
4846
|
-
}
|
|
4847
|
-
}
|
|
4848
|
-
}
|
|
4849
|
-
|
|
4850
|
-
for (let i = 0; i <= searchIndex.group; i++) {
|
|
4851
|
-
let groupOptions = this.getOptionGroupChildren(this.visibleOptions[i]);
|
|
4852
|
-
for (let j = 0; j < (searchIndex.group === i ? searchIndex.option: groupOptions.length); j++) {
|
|
4853
|
-
if (this.matchesSearchValue(groupOptions[j])) {
|
|
4854
|
-
return groupOptions[j];
|
|
4855
|
-
}
|
|
4856
|
-
}
|
|
5152
|
+
else if (!this.virtualScrollerDisabled) {
|
|
5153
|
+
setTimeout(() => {
|
|
5154
|
+
this.virtualScroller && this.virtualScroller.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex);
|
|
5155
|
+
}, 0);
|
|
4857
5156
|
}
|
|
4858
|
-
|
|
4859
|
-
return null;
|
|
4860
5157
|
},
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
5158
|
+
autoUpdateModel() {
|
|
5159
|
+
if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) {
|
|
5160
|
+
this.focusedOptionIndex = this.findFirstFocusedOptionIndex();
|
|
5161
|
+
const value = this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]);
|
|
5162
|
+
this.updateModel(null, value);
|
|
5163
|
+
}
|
|
4864
5164
|
},
|
|
4865
|
-
|
|
4866
|
-
this
|
|
4867
|
-
this.$emit('
|
|
5165
|
+
updateModel(event, value) {
|
|
5166
|
+
this.$emit('update:modelValue', value);
|
|
5167
|
+
this.$emit('change', { originalEvent: event, value });
|
|
4868
5168
|
},
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
5169
|
+
flatOptions(options) {
|
|
5170
|
+
return (options || []).reduce((result, option, index) => {
|
|
5171
|
+
result.push({ optionGroup: option, group: true, index });
|
|
5172
|
+
|
|
5173
|
+
const optionGroupChildren = this.getOptionGroupChildren(option);
|
|
5174
|
+
optionGroupChildren && optionGroupChildren.forEach(o => result.push(o));
|
|
5175
|
+
|
|
5176
|
+
return result;
|
|
5177
|
+
}, []);
|
|
4873
5178
|
},
|
|
4874
5179
|
overlayRef(el) {
|
|
4875
5180
|
this.overlay = el;
|
|
4876
5181
|
},
|
|
4877
|
-
|
|
4878
|
-
this.
|
|
5182
|
+
listRef(el, contentRef) {
|
|
5183
|
+
this.list = el;
|
|
5184
|
+
contentRef && contentRef(el); // For VirtualScroller
|
|
4879
5185
|
},
|
|
4880
5186
|
virtualScrollerRef(el) {
|
|
4881
5187
|
this.virtualScroller = el;
|
|
4882
|
-
},
|
|
4883
|
-
scrollValueInView() {
|
|
4884
|
-
if (this.overlay) {
|
|
4885
|
-
let selectedItem = utils.DomHandler.findSingle(this.overlay, 'li.p-highlight');
|
|
4886
|
-
if (selectedItem) {
|
|
4887
|
-
selectedItem.scrollIntoView({ block: 'nearest', inline: 'start' });
|
|
4888
|
-
}
|
|
4889
|
-
}
|
|
4890
|
-
},
|
|
4891
|
-
onOverlayClick(event) {
|
|
4892
|
-
OverlayEventBus__default["default"].emit('overlay-click', {
|
|
4893
|
-
originalEvent: event,
|
|
4894
|
-
target: this.$el
|
|
4895
|
-
});
|
|
4896
5188
|
}
|
|
4897
5189
|
},
|
|
4898
5190
|
computed: {
|
|
4899
|
-
visibleOptions() {
|
|
4900
|
-
if (this.filterValue) {
|
|
4901
|
-
if (this.optionGroupLabel) {
|
|
4902
|
-
let filteredGroups = [];
|
|
4903
|
-
for (let optgroup of this.options) {
|
|
4904
|
-
let filteredSubOptions = api.FilterService.filter(this.getOptionGroupChildren(optgroup), this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
4905
|
-
if (filteredSubOptions && filteredSubOptions.length) {
|
|
4906
|
-
let filteredGroup = {...optgroup};
|
|
4907
|
-
filteredGroup[this.optionGroupChildren] = filteredSubOptions;
|
|
4908
|
-
filteredGroups.push(filteredGroup);
|
|
4909
|
-
}
|
|
4910
|
-
}
|
|
4911
|
-
return filteredGroups
|
|
4912
|
-
}
|
|
4913
|
-
else {
|
|
4914
|
-
return api.FilterService.filter(this.options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
4915
|
-
}
|
|
4916
|
-
}
|
|
4917
|
-
else {
|
|
4918
|
-
return this.options;
|
|
4919
|
-
}
|
|
4920
|
-
},
|
|
4921
5191
|
containerClass() {
|
|
4922
|
-
return [
|
|
4923
|
-
'p-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
}
|
|
4931
|
-
];
|
|
5192
|
+
return ['p-dropdown p-component p-inputwrapper', {
|
|
5193
|
+
'p-disabled': this.disabled,
|
|
5194
|
+
'p-dropdown-clearable': this.showClear && !this.disabled,
|
|
5195
|
+
'p-focus': this.focused,
|
|
5196
|
+
'p-inputwrapper-filled': this.modelValue,
|
|
5197
|
+
'p-inputwrapper-focus': this.focused || this.overlayVisible,
|
|
5198
|
+
'p-overlay-open': this.overlayVisible
|
|
5199
|
+
}];
|
|
4932
5200
|
},
|
|
4933
|
-
|
|
4934
|
-
return [
|
|
4935
|
-
'p-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
'p-dropdown-label-empty': !this.$slots['value'] && (this.label === 'p-emptylabel' || this.label.length === 0)
|
|
4939
|
-
}
|
|
4940
|
-
];
|
|
5201
|
+
inputStyleClass() {
|
|
5202
|
+
return ['p-dropdown-label p-inputtext', this.inputClass, {
|
|
5203
|
+
'p-placeholder': !this.editable && this.label === this.placeholder,
|
|
5204
|
+
'p-dropdown-label-empty': !this.editable && !this.$slots['value'] && (this.label === 'p-emptylabel' || this.label.length === 0)
|
|
5205
|
+
}];
|
|
4941
5206
|
},
|
|
4942
5207
|
panelStyleClass() {
|
|
4943
5208
|
return ['p-dropdown-panel p-component', this.panelClass, {
|
|
@@ -4945,19 +5210,24 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4945
5210
|
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
4946
5211
|
}];
|
|
4947
5212
|
},
|
|
5213
|
+
dropdownIconClass() {
|
|
5214
|
+
return ['p-dropdown-trigger-icon', (this.loading ? this.loadingIcon : 'pi pi-chevron-down')];
|
|
5215
|
+
},
|
|
5216
|
+
visibleOptions() {
|
|
5217
|
+
const options = this.optionGroupLabel ? this.flatOptions(this.options) : (this.options || []);
|
|
5218
|
+
|
|
5219
|
+
return this.filterValue ? api.FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale) : options;
|
|
5220
|
+
},
|
|
5221
|
+
hasSelectedOption() {
|
|
5222
|
+
return utils.ObjectUtils.isNotEmpty(this.modelValue);
|
|
5223
|
+
},
|
|
4948
5224
|
label() {
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
return this.getOptionLabel(selectedOption);
|
|
4952
|
-
else
|
|
4953
|
-
return this.placeholder||'p-emptylabel';
|
|
5225
|
+
const selectedOptionIndex = this.findSelectedOptionIndex();
|
|
5226
|
+
return selectedOptionIndex !== -1 ? this.getOptionLabel(this.visibleOptions[selectedOptionIndex]) : (this.placeholder || 'p-emptylabel');
|
|
4954
5227
|
},
|
|
4955
5228
|
editableInputValue() {
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
return this.getOptionLabel(selectedOption);
|
|
4959
|
-
else
|
|
4960
|
-
return this.modelValue;
|
|
5229
|
+
const selectedOptionIndex = this.findSelectedOptionIndex();
|
|
5230
|
+
return selectedOptionIndex !== -1 ? this.getOptionLabel(this.visibleOptions[selectedOptionIndex]) : (this.modelValue || '');
|
|
4961
5231
|
},
|
|
4962
5232
|
equalityKey() {
|
|
4963
5233
|
return this.optionValue ? null : this.dataKey;
|
|
@@ -4965,17 +5235,35 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4965
5235
|
searchFields() {
|
|
4966
5236
|
return this.filterFields || [this.optionLabel];
|
|
4967
5237
|
},
|
|
5238
|
+
filterResultMessageText() {
|
|
5239
|
+
return utils.ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText;
|
|
5240
|
+
},
|
|
5241
|
+
filterMessageText() {
|
|
5242
|
+
return this.filterMessage || this.$primevue.config.locale.searchMessage || '';
|
|
5243
|
+
},
|
|
4968
5244
|
emptyFilterMessageText() {
|
|
4969
|
-
return this.emptyFilterMessage || this.$primevue.config.locale.emptyFilterMessage;
|
|
5245
|
+
return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage || '';
|
|
4970
5246
|
},
|
|
4971
5247
|
emptyMessageText() {
|
|
4972
|
-
return this.emptyMessage || this.$primevue.config.locale.emptyMessage;
|
|
5248
|
+
return this.emptyMessage || this.$primevue.config.locale.emptyMessage || '';
|
|
5249
|
+
},
|
|
5250
|
+
selectionMessageText() {
|
|
5251
|
+
return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';
|
|
5252
|
+
},
|
|
5253
|
+
emptySelectionMessageText() {
|
|
5254
|
+
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
|
|
5255
|
+
},
|
|
5256
|
+
selectedMessageText() {
|
|
5257
|
+
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
|
5258
|
+
},
|
|
5259
|
+
focusedOptionId() {
|
|
5260
|
+
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
|
5261
|
+
},
|
|
5262
|
+
ariaSetSize() {
|
|
5263
|
+
return this.visibleOptions.filter(option => !this.isOptionGroup(option)).length;
|
|
4973
5264
|
},
|
|
4974
5265
|
virtualScrollerDisabled() {
|
|
4975
5266
|
return !this.virtualScrollerOptions;
|
|
4976
|
-
},
|
|
4977
|
-
dropdownIconClass() {
|
|
4978
|
-
return ['p-dropdown-trigger-icon', this.loading ? this.loadingIcon : 'pi pi-chevron-down'];
|
|
4979
5267
|
}
|
|
4980
5268
|
},
|
|
4981
5269
|
directives: {
|
|
@@ -4987,27 +5275,45 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
4987
5275
|
}
|
|
4988
5276
|
};
|
|
4989
5277
|
|
|
4990
|
-
const _hoisted_1 =
|
|
4991
|
-
const _hoisted_2 = ["id", "
|
|
4992
|
-
const _hoisted_3 = ["
|
|
4993
|
-
const _hoisted_4 =
|
|
5278
|
+
const _hoisted_1 = ["id"];
|
|
5279
|
+
const _hoisted_2 = ["id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant"];
|
|
5280
|
+
const _hoisted_3 = ["id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-disabled"];
|
|
5281
|
+
const _hoisted_4 = { class: "p-dropdown-trigger" };
|
|
4994
5282
|
const _hoisted_5 = {
|
|
4995
5283
|
key: 0,
|
|
4996
5284
|
class: "p-dropdown-header"
|
|
4997
5285
|
};
|
|
4998
5286
|
const _hoisted_6 = { class: "p-dropdown-filter-container" };
|
|
4999
|
-
const _hoisted_7 = ["value", "placeholder"];
|
|
5287
|
+
const _hoisted_7 = ["value", "placeholder", "aria-owns", "aria-activedescendant"];
|
|
5000
5288
|
const _hoisted_8 = /*#__PURE__*/vue.createElementVNode("span", { class: "p-dropdown-filter-icon pi pi-search" }, null, -1);
|
|
5001
|
-
const _hoisted_9 =
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
key: 2,
|
|
5006
|
-
class: "p-dropdown-empty-message"
|
|
5289
|
+
const _hoisted_9 = {
|
|
5290
|
+
role: "status",
|
|
5291
|
+
"aria-live": "polite",
|
|
5292
|
+
class: "p-hidden-accessible"
|
|
5007
5293
|
};
|
|
5294
|
+
const _hoisted_10 = ["id"];
|
|
5295
|
+
const _hoisted_11 = ["id"];
|
|
5296
|
+
const _hoisted_12 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove"];
|
|
5008
5297
|
const _hoisted_13 = {
|
|
5009
|
-
key:
|
|
5010
|
-
class: "p-dropdown-empty-message"
|
|
5298
|
+
key: 0,
|
|
5299
|
+
class: "p-dropdown-empty-message",
|
|
5300
|
+
role: "option"
|
|
5301
|
+
};
|
|
5302
|
+
const _hoisted_14 = {
|
|
5303
|
+
key: 1,
|
|
5304
|
+
class: "p-dropdown-empty-message",
|
|
5305
|
+
role: "option"
|
|
5306
|
+
};
|
|
5307
|
+
const _hoisted_15 = {
|
|
5308
|
+
key: 0,
|
|
5309
|
+
role: "status",
|
|
5310
|
+
"aria-live": "polite",
|
|
5311
|
+
class: "p-hidden-accessible"
|
|
5312
|
+
};
|
|
5313
|
+
const _hoisted_16 = {
|
|
5314
|
+
role: "status",
|
|
5315
|
+
"aria-live": "polite",
|
|
5316
|
+
class: "p-hidden-accessible"
|
|
5011
5317
|
};
|
|
5012
5318
|
|
|
5013
5319
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -5017,72 +5323,76 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5017
5323
|
|
|
5018
5324
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
5019
5325
|
ref: "container",
|
|
5326
|
+
id: $data.id,
|
|
5020
5327
|
class: vue.normalizeClass($options.containerClass),
|
|
5021
|
-
onClick: _cache[
|
|
5328
|
+
onClick: _cache[16] || (_cache[16] = (...args) => ($options.onContainerClick && $options.onContainerClick(...args)))
|
|
5022
5329
|
}, [
|
|
5023
|
-
vue.createElementVNode("div", _hoisted_1, [
|
|
5024
|
-
vue.createElementVNode("input", {
|
|
5025
|
-
ref: "focusInput",
|
|
5026
|
-
type: "text",
|
|
5027
|
-
id: $props.inputId,
|
|
5028
|
-
readonly: "",
|
|
5029
|
-
disabled: $props.disabled,
|
|
5030
|
-
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
5031
|
-
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
5032
|
-
onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
|
|
5033
|
-
tabindex: $props.tabindex,
|
|
5034
|
-
"aria-haspopup": "true",
|
|
5035
|
-
"aria-expanded": $data.overlayVisible,
|
|
5036
|
-
"aria-labelledby": $props.ariaLabelledBy
|
|
5037
|
-
}, null, 40, _hoisted_2)
|
|
5038
|
-
]),
|
|
5039
5330
|
($props.editable)
|
|
5040
|
-
? (vue.openBlock(), vue.createElementBlock("input", {
|
|
5331
|
+
? (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
5041
5332
|
key: 0,
|
|
5333
|
+
ref: "focusInput",
|
|
5334
|
+
id: $props.inputId,
|
|
5042
5335
|
type: "text",
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
onFocus: _cache[3] || (_cache[3] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
5046
|
-
onBlur: _cache[4] || (_cache[4] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
5047
|
-
placeholder: $props.placeholder,
|
|
5336
|
+
style: $props.inputStyle,
|
|
5337
|
+
class: $options.inputStyleClass,
|
|
5048
5338
|
value: $options.editableInputValue,
|
|
5049
|
-
|
|
5339
|
+
placeholder: $props.placeholder,
|
|
5340
|
+
tabindex: !$props.disabled ? $props.tabindex : -1,
|
|
5341
|
+
disabled: $props.disabled,
|
|
5342
|
+
autocomplete: "off",
|
|
5343
|
+
role: "combobox",
|
|
5344
|
+
"aria-label": _ctx.ariaLabel,
|
|
5345
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
5050
5346
|
"aria-haspopup": "listbox",
|
|
5051
|
-
"aria-expanded": $data.overlayVisible
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5347
|
+
"aria-expanded": $data.overlayVisible,
|
|
5348
|
+
"aria-controls": $data.id + '_list',
|
|
5349
|
+
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
5350
|
+
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
5351
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
5352
|
+
onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
|
|
5353
|
+
onInput: _cache[3] || (_cache[3] = (...args) => ($options.onEditableInput && $options.onEditableInput(...args)))
|
|
5354
|
+
}, $props.inputProps), null, 16, _hoisted_2))
|
|
5355
|
+
: (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
5056
5356
|
key: 1,
|
|
5057
|
-
|
|
5058
|
-
|
|
5357
|
+
ref: "focusInput",
|
|
5358
|
+
id: $props.inputId,
|
|
5359
|
+
style: $props.inputStyle,
|
|
5360
|
+
class: $options.inputStyleClass,
|
|
5361
|
+
tabindex: !$props.disabled ? $props.tabindex : -1,
|
|
5362
|
+
role: "combobox",
|
|
5363
|
+
"aria-label": _ctx.ariaLabel || ($options.label === 'p-emptylabel' ? undefined : $options.label),
|
|
5364
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
5365
|
+
"aria-haspopup": "listbox",
|
|
5366
|
+
"aria-expanded": $data.overlayVisible,
|
|
5367
|
+
"aria-controls": $data.id + '_list',
|
|
5368
|
+
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
5369
|
+
"aria-disabled": $props.disabled,
|
|
5370
|
+
onFocus: _cache[4] || (_cache[4] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
5371
|
+
onBlur: _cache[5] || (_cache[5] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
5372
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args)))
|
|
5373
|
+
}, $props.inputProps), [
|
|
5059
5374
|
vue.renderSlot(_ctx.$slots, "value", {
|
|
5060
5375
|
value: $props.modelValue,
|
|
5061
5376
|
placeholder: $props.placeholder
|
|
5062
5377
|
}, () => [
|
|
5063
|
-
vue.createTextVNode(vue.toDisplayString($options.label||'empty'), 1)
|
|
5378
|
+
vue.createTextVNode(vue.toDisplayString($options.label === 'p-emptylabel' ? ' ' : $options.label || 'empty'), 1)
|
|
5064
5379
|
])
|
|
5065
|
-
],
|
|
5066
|
-
: vue.createCommentVNode("", true),
|
|
5380
|
+
], 16, _hoisted_3)),
|
|
5067
5381
|
($props.showClear && $props.modelValue != null)
|
|
5068
|
-
? (vue.openBlock(), vue.createElementBlock("i", {
|
|
5382
|
+
? (vue.openBlock(), vue.createElementBlock("i", vue.mergeProps({
|
|
5069
5383
|
key: 2,
|
|
5070
5384
|
class: "p-dropdown-clear-icon pi pi-times",
|
|
5071
|
-
onClick: _cache[
|
|
5072
|
-
}))
|
|
5385
|
+
onClick: _cache[7] || (_cache[7] = (...args) => ($options.onClearClick && $options.onClearClick(...args)))
|
|
5386
|
+
}, $props.clearIconProps), null, 16))
|
|
5073
5387
|
: vue.createCommentVNode("", true),
|
|
5074
|
-
vue.createElementVNode("div",
|
|
5075
|
-
class: "p-dropdown-trigger",
|
|
5076
|
-
role: "button",
|
|
5077
|
-
"aria-haspopup": "listbox",
|
|
5078
|
-
"aria-expanded": $data.overlayVisible
|
|
5079
|
-
}, [
|
|
5388
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
5080
5389
|
vue.renderSlot(_ctx.$slots, "indicator", {}, () => [
|
|
5081
5390
|
vue.createElementVNode("span", {
|
|
5082
|
-
class: vue.normalizeClass($options.dropdownIconClass)
|
|
5391
|
+
class: vue.normalizeClass($options.dropdownIconClass),
|
|
5392
|
+
"aria-hidden": "true"
|
|
5083
5393
|
}, null, 2)
|
|
5084
5394
|
])
|
|
5085
|
-
]
|
|
5395
|
+
]),
|
|
5086
5396
|
vue.createVNode(_component_Portal, { appendTo: $props.appendTo }, {
|
|
5087
5397
|
default: vue.withCtx(() => [
|
|
5088
5398
|
vue.createVNode(vue.Transition, {
|
|
@@ -5094,12 +5404,22 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5094
5404
|
}, {
|
|
5095
5405
|
default: vue.withCtx(() => [
|
|
5096
5406
|
($data.overlayVisible)
|
|
5097
|
-
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
5407
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
5098
5408
|
key: 0,
|
|
5099
5409
|
ref: $options.overlayRef,
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5410
|
+
style: $props.panelStyle,
|
|
5411
|
+
class: $options.panelStyleClass,
|
|
5412
|
+
onClick: _cache[14] || (_cache[14] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args))),
|
|
5413
|
+
onKeydown: _cache[15] || (_cache[15] = (...args) => ($options.onOverlayKeyDown && $options.onOverlayKeyDown(...args)))
|
|
5414
|
+
}, $props.panelProps), [
|
|
5415
|
+
vue.createElementVNode("span", {
|
|
5416
|
+
ref: "firstHiddenFocusableElementOnOverlay",
|
|
5417
|
+
role: "presentation",
|
|
5418
|
+
"aria-hidden": "true",
|
|
5419
|
+
class: "p-hidden-accessible p-hidden-focusable",
|
|
5420
|
+
tabindex: 0,
|
|
5421
|
+
onFocus: _cache[8] || (_cache[8] = (...args) => ($options.onFirstHiddenFocus && $options.onFirstHiddenFocus(...args)))
|
|
5422
|
+
}, null, 544),
|
|
5103
5423
|
vue.renderSlot(_ctx.$slots, "header", {
|
|
5104
5424
|
value: $props.modelValue,
|
|
5105
5425
|
options: $options.visibleOptions
|
|
@@ -5107,105 +5427,106 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5107
5427
|
($props.filter)
|
|
5108
5428
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
5109
5429
|
vue.createElementVNode("div", _hoisted_6, [
|
|
5110
|
-
vue.createElementVNode("input", {
|
|
5430
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
5111
5431
|
type: "text",
|
|
5112
5432
|
ref: "filterInput",
|
|
5113
5433
|
value: $data.filterValue,
|
|
5114
|
-
onVnodeUpdated: _cache[
|
|
5115
|
-
autoComplete: "off",
|
|
5434
|
+
onVnodeUpdated: _cache[9] || (_cache[9] = (...args) => ($options.onFilterUpdated && $options.onFilterUpdated(...args))),
|
|
5116
5435
|
class: "p-dropdown-filter p-inputtext p-component",
|
|
5117
5436
|
placeholder: $props.filterPlaceholder,
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5437
|
+
role: "searchbox",
|
|
5438
|
+
autocomplete: "off",
|
|
5439
|
+
"aria-owns": $data.id + '_list',
|
|
5440
|
+
"aria-activedescendant": $options.focusedOptionId,
|
|
5441
|
+
onKeydown: _cache[10] || (_cache[10] = (...args) => ($options.onFilterKeyDown && $options.onFilterKeyDown(...args))),
|
|
5442
|
+
onBlur: _cache[11] || (_cache[11] = (...args) => ($options.onFilterBlur && $options.onFilterBlur(...args))),
|
|
5443
|
+
onInput: _cache[12] || (_cache[12] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
5444
|
+
}, $props.filterInputProps), null, 16, _hoisted_7),
|
|
5121
5445
|
_hoisted_8
|
|
5122
|
-
])
|
|
5446
|
+
]),
|
|
5447
|
+
vue.createElementVNode("span", _hoisted_9, vue.toDisplayString($options.filterResultMessageText), 1)
|
|
5123
5448
|
]))
|
|
5124
5449
|
: vue.createCommentVNode("", true),
|
|
5125
5450
|
vue.createElementVNode("div", {
|
|
5126
|
-
ref: $options.itemsWrapperRef,
|
|
5127
5451
|
class: "p-dropdown-items-wrapper",
|
|
5128
5452
|
style: vue.normalizeStyle({'max-height': $options.virtualScrollerDisabled ? $props.scrollHeight : ''})
|
|
5129
5453
|
}, [
|
|
5130
5454
|
vue.createVNode(_component_VirtualScroller, vue.mergeProps({ ref: $options.virtualScrollerRef }, $props.virtualScrollerOptions, {
|
|
5131
5455
|
items: $options.visibleOptions,
|
|
5132
5456
|
style: {'height': $props.scrollHeight},
|
|
5457
|
+
tabindex: -1,
|
|
5133
5458
|
disabled: $options.virtualScrollerDisabled
|
|
5134
5459
|
}), vue.createSlots({
|
|
5135
|
-
content: vue.withCtx(({ styleClass, contentRef, items, getItemOptions, contentStyle }) => [
|
|
5460
|
+
content: vue.withCtx(({ styleClass, contentRef, items, getItemOptions, contentStyle, itemSize }) => [
|
|
5136
5461
|
vue.createElementVNode("ul", {
|
|
5137
|
-
ref: contentRef,
|
|
5462
|
+
ref: (el) => $options.listRef(el, contentRef),
|
|
5463
|
+
id: $data.id + '_list',
|
|
5138
5464
|
class: vue.normalizeClass(['p-dropdown-items', styleClass]),
|
|
5139
5465
|
style: vue.normalizeStyle(contentStyle),
|
|
5140
5466
|
role: "listbox"
|
|
5141
5467
|
}, [
|
|
5142
|
-
(
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
index: $options.getOptionIndex(i, getItemOptions)
|
|
5155
|
-
}, () => [
|
|
5156
|
-
vue.createTextVNode(vue.toDisplayString($options.getOptionLabel(option)), 1)
|
|
5157
|
-
])
|
|
5158
|
-
], 10, _hoisted_9)), [
|
|
5159
|
-
[_directive_ripple]
|
|
5160
|
-
])
|
|
5161
|
-
}), 128))
|
|
5162
|
-
: (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(items, (optionGroup, i) => {
|
|
5163
|
-
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
5164
|
-
key: $options.getOptionGroupRenderKey(optionGroup)
|
|
5165
|
-
}, [
|
|
5166
|
-
vue.createElementVNode("li", _hoisted_10, [
|
|
5468
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items, (option, i) => {
|
|
5469
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
5470
|
+
key: $options.getOptionRenderKey(option, $options.getOptionIndex(i, getItemOptions))
|
|
5471
|
+
}, [
|
|
5472
|
+
($options.isOptionGroup(option))
|
|
5473
|
+
? (vue.openBlock(), vue.createElementBlock("li", {
|
|
5474
|
+
key: 0,
|
|
5475
|
+
id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),
|
|
5476
|
+
style: vue.normalizeStyle({height: itemSize ? itemSize + 'px' : undefined}),
|
|
5477
|
+
class: "p-dropdown-item-group",
|
|
5478
|
+
role: "option"
|
|
5479
|
+
}, [
|
|
5167
5480
|
vue.renderSlot(_ctx.$slots, "optiongroup", {
|
|
5168
|
-
option: optionGroup,
|
|
5481
|
+
option: option.optionGroup,
|
|
5169
5482
|
index: $options.getOptionIndex(i, getItemOptions)
|
|
5170
5483
|
}, () => [
|
|
5171
|
-
vue.createTextVNode(vue.toDisplayString($options.getOptionGroupLabel(optionGroup)), 1)
|
|
5484
|
+
vue.createTextVNode(vue.toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 1)
|
|
5172
5485
|
])
|
|
5173
|
-
])
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5486
|
+
], 12, _hoisted_11))
|
|
5487
|
+
: vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
|
|
5488
|
+
key: 1,
|
|
5489
|
+
id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),
|
|
5490
|
+
style: vue.normalizeStyle({height: itemSize ? itemSize + 'px' : undefined}),
|
|
5491
|
+
class: vue.normalizeClass(['p-dropdown-item', {'p-highlight': $options.isSelected(option), 'p-focus': $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions), 'p-disabled': $options.isOptionDisabled(option)}]),
|
|
5492
|
+
role: "option",
|
|
5493
|
+
"aria-label": $options.getOptionLabel(option),
|
|
5494
|
+
"aria-selected": $options.isSelected(option),
|
|
5495
|
+
"aria-disabled": $options.isOptionDisabled(option),
|
|
5496
|
+
"aria-setsize": $options.ariaSetSize,
|
|
5497
|
+
"aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),
|
|
5498
|
+
onClick: $event => ($options.onOptionSelect($event, option)),
|
|
5499
|
+
onMousemove: $event => ($options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions)))
|
|
5500
|
+
}, [
|
|
5501
|
+
vue.renderSlot(_ctx.$slots, "option", {
|
|
5502
|
+
option: option,
|
|
5503
|
+
index: $options.getOptionIndex(i, getItemOptions)
|
|
5504
|
+
}, () => [
|
|
5505
|
+
vue.createTextVNode(vue.toDisplayString($options.getOptionLabel(option)), 1)
|
|
5191
5506
|
])
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5507
|
+
], 46, _hoisted_12)), [
|
|
5508
|
+
[_directive_ripple]
|
|
5509
|
+
])
|
|
5510
|
+
], 64))
|
|
5511
|
+
}), 128)),
|
|
5195
5512
|
($data.filterValue && (!items || (items && items.length === 0)))
|
|
5196
|
-
? (vue.openBlock(), vue.createElementBlock("li",
|
|
5513
|
+
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_13, [
|
|
5197
5514
|
vue.renderSlot(_ctx.$slots, "emptyfilter", {}, () => [
|
|
5198
5515
|
vue.createTextVNode(vue.toDisplayString($options.emptyFilterMessageText), 1)
|
|
5199
5516
|
])
|
|
5200
5517
|
]))
|
|
5201
5518
|
: ((!$props.options || ($props.options && $props.options.length === 0)))
|
|
5202
|
-
? (vue.openBlock(), vue.createElementBlock("li",
|
|
5519
|
+
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_14, [
|
|
5203
5520
|
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
5204
5521
|
vue.createTextVNode(vue.toDisplayString($options.emptyMessageText), 1)
|
|
5205
5522
|
])
|
|
5206
5523
|
]))
|
|
5207
5524
|
: vue.createCommentVNode("", true)
|
|
5208
|
-
],
|
|
5525
|
+
], 14, _hoisted_10),
|
|
5526
|
+
((!$props.options || ($props.options && $props.options.length === 0)))
|
|
5527
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_15, vue.toDisplayString($options.emptyMessageText), 1))
|
|
5528
|
+
: vue.createCommentVNode("", true),
|
|
5529
|
+
vue.createElementVNode("span", _hoisted_16, vue.toDisplayString($options.selectedMessageText), 1)
|
|
5209
5530
|
]),
|
|
5210
5531
|
_: 2
|
|
5211
5532
|
}, [
|
|
@@ -5222,8 +5543,16 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5222
5543
|
vue.renderSlot(_ctx.$slots, "footer", {
|
|
5223
5544
|
value: $props.modelValue,
|
|
5224
5545
|
options: $options.visibleOptions
|
|
5225
|
-
})
|
|
5226
|
-
|
|
5546
|
+
}),
|
|
5547
|
+
vue.createElementVNode("span", {
|
|
5548
|
+
ref: "lastHiddenFocusableElementOnOverlay",
|
|
5549
|
+
role: "presentation",
|
|
5550
|
+
"aria-hidden": "true",
|
|
5551
|
+
class: "p-hidden-accessible p-hidden-focusable",
|
|
5552
|
+
tabindex: 0,
|
|
5553
|
+
onFocus: _cache[13] || (_cache[13] = (...args) => ($options.onLastHiddenFocus && $options.onLastHiddenFocus(...args)))
|
|
5554
|
+
}, null, 544)
|
|
5555
|
+
], 16))
|
|
5227
5556
|
: vue.createCommentVNode("", true)
|
|
5228
5557
|
]),
|
|
5229
5558
|
_: 3
|
|
@@ -5231,7 +5560,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5231
5560
|
]),
|
|
5232
5561
|
_: 3
|
|
5233
5562
|
}, 8, ["appendTo"])
|
|
5234
|
-
],
|
|
5563
|
+
], 10, _hoisted_1))
|
|
5235
5564
|
}
|
|
5236
5565
|
|
|
5237
5566
|
function styleInject(css, ref) {
|
|
@@ -5261,7 +5590,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
5261
5590
|
}
|
|
5262
5591
|
}
|
|
5263
5592
|
|
|
5264
|
-
var css_248z = "\n.p-dropdown {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-dropdown-trigger {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-dropdown-label-empty {\n overflow: hidden;\n
|
|
5593
|
+
var css_248z = "\n.p-dropdown {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-dropdown-trigger {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-dropdown-label-empty {\n overflow: hidden;\n opacity: 0;\n}\ninput.p-dropdown-label {\n cursor: default;\n}\n.p-dropdown .p-dropdown-panel {\n min-width: 100%;\n}\n.p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-dropdown-items-wrapper {\n overflow: auto;\n}\n.p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-dropdown-item-group {\n cursor: auto;\n}\n.p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-dropdown-filter {\n width: 100%;\n}\n.p-dropdown-filter-container {\n position: relative;\n}\n.p-dropdown-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-fluid .p-dropdown {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n}\n";
|
|
5265
5594
|
styleInject(css_248z);
|
|
5266
5595
|
|
|
5267
5596
|
script.render = render;
|
|
@@ -6533,6 +6862,14 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6533
6862
|
templates: {
|
|
6534
6863
|
type: null,
|
|
6535
6864
|
default: null
|
|
6865
|
+
},
|
|
6866
|
+
level: {
|
|
6867
|
+
type: Number,
|
|
6868
|
+
default: null
|
|
6869
|
+
},
|
|
6870
|
+
index: {
|
|
6871
|
+
type: Number,
|
|
6872
|
+
default: null
|
|
6536
6873
|
}
|
|
6537
6874
|
},
|
|
6538
6875
|
nodeTouched: false,
|
|
@@ -6573,9 +6910,8 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6573
6910
|
onKeyDown(event) {
|
|
6574
6911
|
const nodeElement = event.target.parentElement;
|
|
6575
6912
|
|
|
6576
|
-
switch (event.
|
|
6577
|
-
|
|
6578
|
-
case 40:
|
|
6913
|
+
switch (event.code) {
|
|
6914
|
+
case 'ArrowDown':
|
|
6579
6915
|
var listElement = nodeElement.children[1];
|
|
6580
6916
|
if (listElement) {
|
|
6581
6917
|
this.focusNode(listElement.children[0]);
|
|
@@ -6592,12 +6928,9 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6592
6928
|
}
|
|
6593
6929
|
}
|
|
6594
6930
|
}
|
|
6595
|
-
|
|
6596
|
-
event.preventDefault();
|
|
6597
6931
|
break;
|
|
6598
6932
|
|
|
6599
|
-
|
|
6600
|
-
case 38:
|
|
6933
|
+
case 'ArrowUp':
|
|
6601
6934
|
if (nodeElement.previousElementSibling) {
|
|
6602
6935
|
this.focusNode(this.findLastVisibleDescendant(nodeElement.previousElementSibling));
|
|
6603
6936
|
}
|
|
@@ -6607,24 +6940,20 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6607
6940
|
this.focusNode(parentNodeElement);
|
|
6608
6941
|
}
|
|
6609
6942
|
}
|
|
6610
|
-
|
|
6611
|
-
event.preventDefault();
|
|
6612
6943
|
break;
|
|
6613
6944
|
|
|
6614
|
-
|
|
6615
|
-
case
|
|
6616
|
-
case 39:
|
|
6945
|
+
case 'ArrowRight':
|
|
6946
|
+
case 'ArrowLeft':
|
|
6617
6947
|
this.$emit('node-toggle', this.node);
|
|
6618
|
-
|
|
6619
|
-
event.preventDefault();
|
|
6620
6948
|
break;
|
|
6621
6949
|
|
|
6622
|
-
|
|
6623
|
-
case
|
|
6950
|
+
case 'Enter':
|
|
6951
|
+
case 'Space':
|
|
6624
6952
|
this.onClick(event);
|
|
6625
|
-
event.preventDefault();
|
|
6626
6953
|
break;
|
|
6627
6954
|
}
|
|
6955
|
+
|
|
6956
|
+
event.preventDefault();
|
|
6628
6957
|
},
|
|
6629
6958
|
toggleCheckbox() {
|
|
6630
6959
|
let _selectionKeys = this.selectionKeys ? {...this.selectionKeys} : {};
|
|
@@ -6773,14 +7102,15 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6773
7102
|
}
|
|
6774
7103
|
};
|
|
6775
7104
|
|
|
6776
|
-
const _hoisted_1$1 = ["aria-expanded"];
|
|
6777
|
-
const _hoisted_2$1 =
|
|
7105
|
+
const _hoisted_1$1 = ["aria-label", "aria-selected", "aria-expanded", "aria-setsize", "aria-posinset", "aria-level"];
|
|
7106
|
+
const _hoisted_2$1 = ["aria-expanded"];
|
|
7107
|
+
const _hoisted_3$1 = {
|
|
6778
7108
|
key: 0,
|
|
6779
7109
|
class: "p-checkbox p-component"
|
|
6780
7110
|
};
|
|
6781
|
-
const
|
|
6782
|
-
const
|
|
6783
|
-
const
|
|
7111
|
+
const _hoisted_4$1 = ["aria-checked"];
|
|
7112
|
+
const _hoisted_5$1 = { class: "p-treenode-label" };
|
|
7113
|
+
const _hoisted_6 = {
|
|
6784
7114
|
key: 0,
|
|
6785
7115
|
class: "p-treenode-children",
|
|
6786
7116
|
role: "group"
|
|
@@ -6791,7 +7121,14 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6791
7121
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
6792
7122
|
|
|
6793
7123
|
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
6794
|
-
class: vue.normalizeClass($options.containerClass)
|
|
7124
|
+
class: vue.normalizeClass($options.containerClass),
|
|
7125
|
+
role: "treeitem",
|
|
7126
|
+
"aria-label": $options.label($props.node),
|
|
7127
|
+
"aria-selected": $options.selected,
|
|
7128
|
+
"aria-expanded": $options.expanded,
|
|
7129
|
+
"aria-setsize": $props.node.children ? $props.node.children.length : 0,
|
|
7130
|
+
"aria-posinset": $props.index + 1,
|
|
7131
|
+
"aria-level": $props.level
|
|
6795
7132
|
}, [
|
|
6796
7133
|
vue.createElementVNode("div", {
|
|
6797
7134
|
class: vue.normalizeClass($options.contentClass),
|
|
@@ -6816,7 +7153,7 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6816
7153
|
[_directive_ripple]
|
|
6817
7154
|
]),
|
|
6818
7155
|
($options.checkboxMode)
|
|
6819
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
7156
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
|
|
6820
7157
|
vue.createElementVNode("div", {
|
|
6821
7158
|
class: vue.normalizeClass($options.checkboxClass),
|
|
6822
7159
|
role: "checkbox",
|
|
@@ -6825,13 +7162,13 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6825
7162
|
vue.createElementVNode("span", {
|
|
6826
7163
|
class: vue.normalizeClass($options.checkboxIcon)
|
|
6827
7164
|
}, null, 2)
|
|
6828
|
-
], 10,
|
|
7165
|
+
], 10, _hoisted_4$1)
|
|
6829
7166
|
]))
|
|
6830
7167
|
: vue.createCommentVNode("", true),
|
|
6831
7168
|
vue.createElementVNode("span", {
|
|
6832
7169
|
class: vue.normalizeClass($options.icon)
|
|
6833
7170
|
}, null, 2),
|
|
6834
|
-
vue.createElementVNode("span",
|
|
7171
|
+
vue.createElementVNode("span", _hoisted_5$1, [
|
|
6835
7172
|
($props.templates[$props.node.type]||$props.templates['default'])
|
|
6836
7173
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates[$props.node.type]||$props.templates['default']), {
|
|
6837
7174
|
key: 0,
|
|
@@ -6841,25 +7178,26 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6841
7178
|
vue.createTextVNode(vue.toDisplayString($options.label($props.node)), 1)
|
|
6842
7179
|
], 64))
|
|
6843
7180
|
])
|
|
6844
|
-
], 46,
|
|
7181
|
+
], 46, _hoisted_2$1),
|
|
6845
7182
|
($options.hasChildren && $options.expanded)
|
|
6846
|
-
? (vue.openBlock(), vue.createElementBlock("ul",
|
|
7183
|
+
? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6, [
|
|
6847
7184
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.node.children, (childNode) => {
|
|
6848
7185
|
return (vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
6849
7186
|
key: childNode.key,
|
|
6850
7187
|
node: childNode,
|
|
6851
7188
|
templates: $props.templates,
|
|
7189
|
+
level: $props.level + 1,
|
|
6852
7190
|
expandedKeys: $props.expandedKeys,
|
|
6853
7191
|
onNodeToggle: $options.onChildNodeToggle,
|
|
6854
7192
|
onNodeClick: $options.onChildNodeClick,
|
|
6855
7193
|
selectionMode: $props.selectionMode,
|
|
6856
7194
|
selectionKeys: $props.selectionKeys,
|
|
6857
7195
|
onCheckboxChange: $options.propagateUp
|
|
6858
|
-
}, null, 8, ["node", "templates", "expandedKeys", "onNodeToggle", "onNodeClick", "selectionMode", "selectionKeys", "onCheckboxChange"]))
|
|
7196
|
+
}, null, 8, ["node", "templates", "level", "expandedKeys", "onNodeToggle", "onNodeClick", "selectionMode", "selectionKeys", "onCheckboxChange"]))
|
|
6859
7197
|
}), 128))
|
|
6860
7198
|
]))
|
|
6861
7199
|
: vue.createCommentVNode("", true)
|
|
6862
|
-
],
|
|
7200
|
+
], 10, _hoisted_1$1))
|
|
6863
7201
|
}
|
|
6864
7202
|
|
|
6865
7203
|
script$1.render = render$1;
|
|
@@ -6919,6 +7257,10 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
6919
7257
|
scrollHeight: {
|
|
6920
7258
|
type: String,
|
|
6921
7259
|
default: null
|
|
7260
|
+
},
|
|
7261
|
+
level: {
|
|
7262
|
+
type: Number,
|
|
7263
|
+
default: 0
|
|
6922
7264
|
}
|
|
6923
7265
|
},
|
|
6924
7266
|
data() {
|
|
@@ -7174,18 +7516,20 @@ this.primevue.tree = (function (utils, Ripple, vue) {
|
|
|
7174
7516
|
style: vue.normalizeStyle({maxHeight: $props.scrollHeight})
|
|
7175
7517
|
}, [
|
|
7176
7518
|
vue.createElementVNode("ul", _hoisted_5, [
|
|
7177
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.valueToRender, (node) => {
|
|
7519
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.valueToRender, (node, index) => {
|
|
7178
7520
|
return (vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
7179
7521
|
key: node.key,
|
|
7180
7522
|
node: node,
|
|
7181
7523
|
templates: _ctx.$slots,
|
|
7524
|
+
level: $props.level + 1,
|
|
7525
|
+
index: index,
|
|
7182
7526
|
expandedKeys: $data.d_expandedKeys,
|
|
7183
7527
|
onNodeToggle: $options.onNodeToggle,
|
|
7184
7528
|
onNodeClick: $options.onNodeClick,
|
|
7185
7529
|
selectionMode: $props.selectionMode,
|
|
7186
7530
|
selectionKeys: $props.selectionKeys,
|
|
7187
7531
|
onCheckboxChange: $options.onCheckboxChange
|
|
7188
|
-
}, null, 8, ["node", "templates", "expandedKeys", "onNodeToggle", "onNodeClick", "selectionMode", "selectionKeys", "onCheckboxChange"]))
|
|
7532
|
+
}, null, 8, ["node", "templates", "level", "index", "expandedKeys", "onNodeToggle", "onNodeClick", "selectionMode", "selectionKeys", "onCheckboxChange"]))
|
|
7189
7533
|
}), 128))
|
|
7190
7534
|
])
|
|
7191
7535
|
], 4)
|
|
@@ -7313,9 +7657,12 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7313
7657
|
class: vue.normalizeClass($options.linkClass($props.item, {isActive, isExactActive})),
|
|
7314
7658
|
role: "menuitem"
|
|
7315
7659
|
}, [
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7660
|
+
($props.item.icon)
|
|
7661
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
7662
|
+
key: 0,
|
|
7663
|
+
class: vue.normalizeClass(['p-menuitem-icon', $props.item.icon])
|
|
7664
|
+
}, null, 2))
|
|
7665
|
+
: vue.createCommentVNode("", true),
|
|
7319
7666
|
vue.createElementVNode("span", _hoisted_2$1, vue.toDisplayString($options.label()), 1)
|
|
7320
7667
|
], 10, _hoisted_1$1)), [
|
|
7321
7668
|
[_directive_ripple]
|
|
@@ -7332,9 +7679,12 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue, Portal) {
|
|
|
7332
7679
|
role: "menuitem",
|
|
7333
7680
|
tabindex: $options.disabled($props.item) ? null : '0'
|
|
7334
7681
|
}, [
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7682
|
+
($props.item.icon)
|
|
7683
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
7684
|
+
key: 0,
|
|
7685
|
+
class: vue.normalizeClass(['p-menuitem-icon', $props.item.icon])
|
|
7686
|
+
}, null, 2))
|
|
7687
|
+
: vue.createCommentVNode("", true),
|
|
7338
7688
|
vue.createElementVNode("span", _hoisted_4, vue.toDisplayString($options.label()), 1)
|
|
7339
7689
|
], 10, _hoisted_3)), [
|
|
7340
7690
|
[_directive_ripple]
|
|
@@ -7774,7 +8124,7 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
7774
8124
|
if (this.activeItem && item === this.activeItem)
|
|
7775
8125
|
this.activeItem = null;
|
|
7776
8126
|
else
|
|
7777
|
-
|
|
8127
|
+
this.activeItem = item;
|
|
7778
8128
|
}
|
|
7779
8129
|
|
|
7780
8130
|
if (!item.items) {
|
|
@@ -7913,7 +8263,7 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
7913
8263
|
const _hoisted_4 = ["href", "target", "aria-haspopup", "aria-expanded", "onClick", "onKeydown", "tabindex"];
|
|
7914
8264
|
const _hoisted_5 = { class: "p-menuitem-text" };
|
|
7915
8265
|
const _hoisted_6 = {
|
|
7916
|
-
key:
|
|
8266
|
+
key: 1,
|
|
7917
8267
|
class: "p-submenu-icon pi pi-angle-right"
|
|
7918
8268
|
};
|
|
7919
8269
|
|
|
@@ -7956,9 +8306,12 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
7956
8306
|
onKeydown: $event => ($options.onItemKeyDown($event, item)),
|
|
7957
8307
|
role: "menuitem"
|
|
7958
8308
|
}, [
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
8309
|
+
(item.icon)
|
|
8310
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
8311
|
+
key: 0,
|
|
8312
|
+
class: vue.normalizeClass(['p-menuitem-icon', item.icon])
|
|
8313
|
+
}, null, 2))
|
|
8314
|
+
: vue.createCommentVNode("", true),
|
|
7962
8315
|
vue.createElementVNode("span", _hoisted_3, vue.toDisplayString($options.label(item)), 1)
|
|
7963
8316
|
], 42, _hoisted_2)), [
|
|
7964
8317
|
[_directive_ripple]
|
|
@@ -7978,9 +8331,12 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Portal, Ripple, vu
|
|
|
7978
8331
|
role: "menuitem",
|
|
7979
8332
|
tabindex: $options.disabled(item) ? null : '0'
|
|
7980
8333
|
}, [
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
8334
|
+
(item.icon)
|
|
8335
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
8336
|
+
key: 0,
|
|
8337
|
+
class: vue.normalizeClass(['p-menuitem-icon', item.icon])
|
|
8338
|
+
}, null, 2))
|
|
8339
|
+
: vue.createCommentVNode("", true),
|
|
7984
8340
|
vue.createElementVNode("span", _hoisted_5, vue.toDisplayString($options.label(item)), 1),
|
|
7985
8341
|
(item.items)
|
|
7986
8342
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6))
|