primevue 3.45.0 → 3.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/api.cjs.js +6 -6
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +6 -6
- package/api/api.esm.min.js +1 -1
- package/api/api.js +6 -6
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +6 -1
- package/autocomplete/AutoComplete.vue +24 -15
- package/autocomplete/BaseAutoComplete.vue +6 -2
- package/autocomplete/autocomplete.cjs.js +30 -19
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +30 -19
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +30 -19
- package/autocomplete/autocomplete.min.js +1 -1
- package/basecomponent/basecomponent.cjs.js +1 -3
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +1 -3
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +1 -3
- package/basecomponent/basecomponent.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.cjs.js +1 -3
- package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.esm.js +1 -3
- package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.js +1 -3
- package/basecomponent/style/basecomponentstyle.min.js +1 -1
- package/basedirective/basedirective.cjs.js +11 -2
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +11 -2
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +11 -2
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +6 -1
- package/baseicon/baseicon.cjs.js +5 -0
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +6 -1
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +5 -0
- package/baseicon/baseicon.min.js +1 -1
- package/calendar/BaseCalendar.vue +1 -1
- package/calendar/Calendar.d.ts +53 -2
- package/calendar/Calendar.vue +12 -0
- package/calendar/calendar.cjs.js +13 -1
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +13 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +13 -1
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +4 -0
- package/card/Card.vue +7 -5
- package/card/card.cjs.js +6 -3
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +6 -3
- package/card/card.esm.min.js +1 -1
- package/card/card.js +6 -3
- package/card/card.min.js +1 -1
- package/card/style/cardstyle.cjs.js +1 -0
- package/card/style/cardstyle.cjs.min.js +1 -1
- package/card/style/cardstyle.esm.js +1 -0
- package/card/style/cardstyle.esm.min.js +1 -1
- package/card/style/cardstyle.js +1 -0
- package/card/style/cardstyle.min.js +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +6 -2
- package/cascadeselect/CascadeSelect.d.ts +47 -1
- package/cascadeselect/CascadeSelect.vue +56 -35
- package/cascadeselect/CascadeSelectSub.vue +26 -6
- package/cascadeselect/cascadeselect.cjs.js +118 -58
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +118 -58
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +118 -58
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/BaseCheckbox.vue +0 -4
- package/checkbox/Checkbox.d.ts +17 -34
- package/checkbox/Checkbox.vue +24 -35
- package/checkbox/checkbox.cjs.js +21 -49
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +21 -49
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +21 -49
- package/checkbox/checkbox.min.js +1 -1
- package/checkbox/style/checkboxstyle.cjs.js +5 -11
- package/checkbox/style/checkboxstyle.cjs.min.js +1 -1
- package/checkbox/style/checkboxstyle.esm.js +5 -11
- package/checkbox/style/checkboxstyle.esm.min.js +1 -1
- package/checkbox/style/checkboxstyle.js +5 -11
- package/checkbox/style/checkboxstyle.min.js +1 -1
- package/chips/Chips.vue +2 -1
- package/chips/chips.cjs.js +2 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +2 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +2 -1
- package/chips/chips.min.js +1 -1
- package/colorpicker/BaseColorPicker.vue +1 -1
- package/colorpicker/ColorPicker.d.ts +1 -1
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +1 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +15 -44
- package/confirmdialog/ConfirmDialog.vue +1 -1
- package/confirmdialog/confirmdialog.cjs.js +1 -1
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +1 -1
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +1 -1
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmdialog/style/confirmdialogstyle.cjs.js +3 -6
- package/confirmdialog/style/confirmdialogstyle.cjs.min.js +1 -1
- package/confirmdialog/style/confirmdialogstyle.esm.js +3 -6
- package/confirmdialog/style/confirmdialogstyle.esm.min.js +1 -1
- package/confirmdialog/style/confirmdialogstyle.js +3 -6
- package/confirmdialog/style/confirmdialogstyle.min.js +1 -1
- package/confirmpopup/ConfirmPopup.vue +2 -2
- package/confirmpopup/confirmpopup.cjs.js +2 -2
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +2 -2
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +2 -2
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.cjs.js +5 -8
- package/confirmpopup/style/confirmpopupstyle.cjs.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.esm.js +5 -8
- package/confirmpopup/style/confirmpopupstyle.esm.min.js +1 -1
- package/confirmpopup/style/confirmpopupstyle.js +5 -8
- package/confirmpopup/style/confirmpopupstyle.min.js +1 -1
- package/contextmenu/BaseContextMenu.vue +1 -1
- package/contextmenu/ContextMenu.vue +8 -8
- package/contextmenu/ContextMenuSub.vue +6 -1
- package/contextmenu/contextmenu.cjs.js +18 -11
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +18 -11
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +18 -11
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +973 -679
- package/core/core.min.js +70 -62
- package/datatable/BaseDataTable.vue +4 -0
- package/datatable/BodyCell.vue +11 -1
- package/datatable/BodyRow.vue +16 -9
- package/datatable/ColumnFilter.vue +5 -2
- package/datatable/DataTable.d.ts +5 -0
- package/datatable/DataTable.vue +2 -2
- package/datatable/HeaderCell.vue +2 -0
- package/datatable/HeaderCheckbox.vue +14 -42
- package/datatable/RowCheckbox.vue +10 -52
- package/datatable/RowRadioButton.vue +11 -32
- package/datatable/TableHeader.vue +3 -1
- package/datatable/datatable.cjs.js +120 -199
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +119 -200
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +120 -201
- package/datatable/datatable.min.js +1 -1
- package/datatable/style/datatablestyle.cjs.js +24 -73
- package/datatable/style/datatablestyle.cjs.min.js +1 -1
- package/datatable/style/datatablestyle.esm.js +24 -73
- package/datatable/style/datatablestyle.esm.min.js +1 -1
- package/datatable/style/datatablestyle.js +24 -73
- package/datatable/style/datatablestyle.min.js +1 -1
- package/dialog/BaseDialog.vue +1 -1
- package/dialog/dialog.cjs.js +1 -1
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +1 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +1 -1
- package/dialog/dialog.min.js +1 -1
- package/dialog/style/dialogstyle.cjs.js +1 -1
- package/dialog/style/dialogstyle.cjs.min.js +1 -1
- package/dialog/style/dialogstyle.esm.js +1 -1
- package/dialog/style/dialogstyle.esm.min.js +1 -1
- package/dialog/style/dialogstyle.js +1 -1
- package/dialog/style/dialogstyle.min.js +1 -1
- package/dropdown/BaseDropdown.vue +18 -2
- package/dropdown/Dropdown.d.ts +37 -1
- package/dropdown/Dropdown.vue +68 -40
- package/dropdown/dropdown.cjs.js +96 -46
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +94 -46
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +96 -48
- package/dropdown/dropdown.min.js +1 -1
- package/dropdown/style/dropdownstyle.cjs.js +7 -2
- package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
- package/dropdown/style/dropdownstyle.esm.js +7 -2
- package/dropdown/style/dropdownstyle.esm.min.js +1 -1
- package/dropdown/style/dropdownstyle.js +7 -2
- package/dropdown/style/dropdownstyle.min.js +1 -1
- package/focustrap/focustrap.cjs.js +15 -2
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +15 -2
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +15 -2
- package/focustrap/focustrap.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +4 -10
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +4 -10
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +6 -11
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowdown/index.vue +2 -8
- package/icons/arrowup/index.cjs.js +4 -10
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +4 -10
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +6 -11
- package/icons/arrowup/index.min.js +1 -1
- package/icons/arrowup/index.vue +2 -8
- package/icons/ban/index.cjs.js +4 -10
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +4 -10
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +6 -11
- package/icons/ban/index.min.js +1 -1
- package/icons/ban/index.vue +2 -8
- package/icons/blank/index.cjs.js +34 -0
- package/icons/blank/index.cjs.min.js +1 -0
- package/icons/blank/index.d.ts +12 -0
- package/icons/blank/index.esm.js +28 -0
- package/icons/blank/index.esm.min.js +1 -0
- package/icons/blank/index.js +36 -0
- package/icons/blank/index.min.js +1 -0
- package/icons/blank/index.vue +13 -0
- package/icons/blank/package.json +9 -0
- package/icons/exclamationtriangle/index.cjs.js +4 -10
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +4 -10
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +6 -11
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/exclamationtriangle/index.vue +2 -8
- package/icons/eyeslash/index.cjs.js +4 -10
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +4 -10
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +6 -11
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/eyeslash/index.vue +2 -8
- package/icons/filter/index.cjs.js +4 -10
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +4 -10
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +6 -11
- package/icons/filter/index.min.js +1 -1
- package/icons/filter/index.vue +2 -8
- package/icons/filterslash/index.cjs.js +4 -10
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +4 -10
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +6 -11
- package/icons/filterslash/index.min.js +1 -1
- package/icons/filterslash/index.vue +2 -8
- package/icons/infocircle/index.cjs.js +4 -10
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +4 -10
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +6 -11
- package/icons/infocircle/index.min.js +1 -1
- package/icons/infocircle/index.vue +2 -8
- package/icons/pencil/index.cjs.js +4 -10
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +4 -10
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +6 -11
- package/icons/pencil/index.min.js +1 -1
- package/icons/pencil/index.vue +2 -8
- package/icons/plus/index.cjs.js +4 -10
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +4 -10
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +6 -11
- package/icons/plus/index.min.js +1 -1
- package/icons/plus/index.vue +2 -8
- package/icons/refresh/index.cjs.js +4 -10
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +4 -10
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +6 -11
- package/icons/refresh/index.min.js +1 -1
- package/icons/refresh/index.vue +2 -8
- package/icons/search/index.cjs.js +4 -10
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +4 -10
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +6 -11
- package/icons/search/index.min.js +1 -1
- package/icons/search/index.vue +2 -8
- package/icons/searchminus/index.cjs.js +4 -10
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +4 -10
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +6 -11
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchminus/index.vue +2 -8
- package/icons/searchplus/index.cjs.js +4 -10
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +4 -10
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +6 -11
- package/icons/searchplus/index.min.js +1 -1
- package/icons/searchplus/index.vue +2 -8
- package/icons/sortalt/index.cjs.js +4 -10
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +4 -10
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +6 -11
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortalt/index.vue +2 -8
- package/icons/sortamountdown/index.cjs.js +4 -10
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +4 -10
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +6 -11
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountdown/index.vue +2 -8
- package/icons/sortamountupalt/index.cjs.js +4 -10
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +4 -10
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +6 -11
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/sortamountupalt/index.vue +2 -8
- package/icons/spinner/index.cjs.js +4 -10
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +4 -10
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +6 -11
- package/icons/spinner/index.min.js +1 -1
- package/icons/spinner/index.vue +2 -8
- package/icons/star/index.cjs.js +4 -10
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +4 -10
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +6 -11
- package/icons/star/index.min.js +1 -1
- package/icons/star/index.vue +2 -8
- package/icons/starfill/index.cjs.js +4 -10
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +4 -10
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +6 -11
- package/icons/starfill/index.min.js +1 -1
- package/icons/starfill/index.vue +2 -8
- package/icons/thlarge/index.cjs.js +4 -10
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +4 -10
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +6 -11
- package/icons/thlarge/index.min.js +1 -1
- package/icons/thlarge/index.vue +2 -8
- package/icons/timescircle/index.cjs.js +4 -10
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +4 -10
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +6 -11
- package/icons/timescircle/index.min.js +1 -1
- package/icons/timescircle/index.vue +2 -8
- package/icons/trash/index.cjs.js +4 -10
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +4 -10
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +6 -11
- package/icons/trash/index.min.js +1 -1
- package/icons/trash/index.vue +2 -8
- package/icons/undo/index.cjs.js +4 -10
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +4 -10
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +6 -11
- package/icons/undo/index.min.js +1 -1
- package/icons/undo/index.vue +2 -8
- package/icons/upload/index.cjs.js +4 -10
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +4 -10
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +6 -11
- package/icons/upload/index.min.js +1 -1
- package/icons/upload/index.vue +2 -8
- package/icons/windowmaximize/index.cjs.js +4 -10
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +4 -10
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +6 -11
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowmaximize/index.vue +2 -8
- package/icons/windowminimize/index.cjs.js +4 -10
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +4 -10
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +6 -11
- package/icons/windowminimize/index.min.js +1 -1
- package/icons/windowminimize/index.vue +2 -8
- package/inputnumber/InputNumber.vue +22 -9
- package/inputnumber/inputnumber.cjs.js +17 -6
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +18 -7
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +17 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/BaseInputSwitch.vue +8 -4
- package/inputswitch/InputSwitch.d.ts +41 -20
- package/inputswitch/InputSwitch.vue +31 -33
- package/inputswitch/inputswitch.cjs.js +38 -42
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +38 -42
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +38 -42
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.cjs.js +4 -4
- package/inputswitch/style/inputswitchstyle.cjs.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.esm.js +4 -4
- package/inputswitch/style/inputswitchstyle.esm.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.js +4 -4
- package/inputswitch/style/inputswitchstyle.min.js +1 -1
- package/listbox/BaseListbox.vue +4 -0
- package/listbox/Listbox.d.ts +6 -1
- package/listbox/Listbox.vue +47 -26
- package/listbox/listbox.cjs.js +88 -50
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +88 -50
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +88 -50
- package/listbox/listbox.min.js +1 -1
- package/listbox/style/listboxstyle.cjs.js +2 -3
- package/listbox/style/listboxstyle.cjs.min.js +1 -1
- package/listbox/style/listboxstyle.esm.js +2 -3
- package/listbox/style/listboxstyle.esm.min.js +1 -1
- package/listbox/style/listboxstyle.js +2 -3
- package/listbox/style/listboxstyle.min.js +1 -1
- package/megamenu/MegaMenu.vue +1 -1
- package/megamenu/megamenu.cjs.js +2 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +2 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +2 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menu/BaseMenu.vue +1 -1
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +3 -2
- package/menubar/MenubarSub.vue +5 -1
- package/menubar/menubar.cjs.js +12 -5
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +12 -5
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +12 -5
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +4 -0
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/metergroup/BaseMeterGroup.vue +41 -0
- package/metergroup/MeterGroup.d.ts +302 -0
- package/metergroup/MeterGroup.vue +73 -0
- package/metergroup/MeterGroupLabel.vue +36 -0
- package/metergroup/metergroup.cjs.js +218 -0
- package/metergroup/metergroup.cjs.min.js +1 -0
- package/metergroup/metergroup.esm.js +211 -0
- package/metergroup/metergroup.esm.min.js +1 -0
- package/metergroup/metergroup.js +218 -0
- package/metergroup/metergroup.min.js +1 -0
- package/metergroup/package.json +9 -0
- package/metergroup/style/MeterGroupStyle.d.ts +3 -0
- package/metergroup/style/metergroupstyle.cjs.js +40 -0
- package/metergroup/style/metergroupstyle.cjs.min.js +1 -0
- package/metergroup/style/metergroupstyle.esm.js +34 -0
- package/metergroup/style/metergroupstyle.esm.min.js +1 -0
- package/metergroup/style/metergroupstyle.js +43 -0
- package/metergroup/style/metergroupstyle.min.js +1 -0
- package/metergroup/style/package.json +6 -0
- package/multiselect/BaseMultiSelect.vue +10 -2
- package/multiselect/MultiSelect.d.ts +13 -19
- package/multiselect/MultiSelect.vue +108 -76
- package/multiselect/multiselect.cjs.js +174 -134
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +174 -135
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +175 -136
- package/multiselect/multiselect.min.js +1 -1
- package/multiselect/style/multiselectstyle.cjs.js +7 -30
- package/multiselect/style/multiselectstyle.cjs.min.js +1 -1
- package/multiselect/style/multiselectstyle.esm.js +7 -30
- package/multiselect/style/multiselectstyle.esm.min.js +1 -1
- package/multiselect/style/multiselectstyle.js +7 -30
- package/multiselect/style/multiselectstyle.min.js +1 -1
- package/orderlist/BaseOrderList.vue +8 -0
- package/orderlist/OrderList.d.ts +10 -0
- package/orderlist/OrderList.vue +72 -52
- package/orderlist/orderlist.cjs.js +79 -56
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +79 -56
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +79 -56
- package/orderlist/orderlist.min.js +1 -1
- package/orderlist/style/orderliststyle.cjs.js +1 -1
- package/orderlist/style/orderliststyle.cjs.min.js +1 -1
- package/orderlist/style/orderliststyle.esm.js +1 -1
- package/orderlist/style/orderliststyle.esm.min.js +1 -1
- package/orderlist/style/orderliststyle.js +1 -1
- package/orderlist/style/orderliststyle.min.js +1 -1
- package/overlaypanel/BaseOverlayPanel.vue +1 -1
- package/overlaypanel/OverlayPanel.d.ts +4 -0
- package/overlaypanel/OverlayPanel.vue +1 -1
- package/overlaypanel/overlaypanel.cjs.js +2 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +2 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +2 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/panelmenu/PanelMenuList.vue +1 -1
- package/panelmenu/panelmenu.cjs.js +2 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +2 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +2 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/BasePassword.vue +1 -1
- package/password/password.cjs.js +1 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -1
- package/password/password.min.js +1 -1
- package/picklist/BasePickList.vue +8 -0
- package/picklist/PickList.d.ts +10 -0
- package/picklist/PickList.vue +72 -37
- package/picklist/picklist.cjs.js +81 -46
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +81 -46
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +81 -46
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.vue +1 -1
- package/portal/portal.cjs.js +1 -1
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +1 -1
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +1 -1
- package/portal/portal.min.js +1 -1
- package/progressbar/ProgressBar.vue +1 -1
- package/progressbar/progressbar.cjs.js +3 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +3 -1
- package/progressbar/progressbar.min.js +1 -1
- package/radiobutton/BaseRadioButton.vue +9 -4
- package/radiobutton/RadioButton.d.ts +48 -22
- package/radiobutton/RadioButton.vue +36 -23
- package/radiobutton/radiobutton.cjs.js +42 -50
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +42 -50
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +42 -50
- package/radiobutton/radiobutton.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.cjs.js +5 -11
- package/radiobutton/style/radiobuttonstyle.cjs.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.esm.js +5 -11
- package/radiobutton/style/radiobuttonstyle.esm.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.js +5 -11
- package/radiobutton/style/radiobuttonstyle.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +432 -351
- package/resources/themes/arya-green/theme.css +432 -351
- package/resources/themes/arya-orange/theme.css +432 -351
- package/resources/themes/arya-purple/theme.css +432 -351
- package/resources/themes/aura-dark-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-amber/theme.css +7012 -0
- package/resources/themes/aura-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-blue/theme.css +7012 -0
- package/resources/themes/aura-dark-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-cyan/theme.css +7012 -0
- package/resources/themes/aura-dark-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-green/theme.css +7012 -0
- package/resources/themes/aura-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-indigo/theme.css +7012 -0
- package/resources/themes/aura-dark-lime/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-lime/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-lime/theme.css +7012 -0
- package/resources/themes/aura-dark-noir/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-noir/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-noir/theme.css +7012 -0
- package/resources/themes/aura-dark-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-pink/theme.css +7012 -0
- package/resources/themes/aura-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-purple/theme.css +7012 -0
- package/resources/themes/aura-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-teal/theme.css +7012 -0
- package/resources/themes/aura-light-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-amber/theme.css +7014 -0
- package/resources/themes/aura-light-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-blue/theme.css +7014 -0
- package/resources/themes/aura-light-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-cyan/theme.css +7014 -0
- package/resources/themes/aura-light-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-green/theme.css +7014 -0
- package/resources/themes/aura-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-indigo/theme.css +7014 -0
- package/resources/themes/aura-light-lime/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-lime/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-lime/theme.css +7014 -0
- package/resources/themes/aura-light-noir/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-noir/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-noir/theme.css +7022 -0
- package/resources/themes/aura-light-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-pink/theme.css +7014 -0
- package/resources/themes/aura-light-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-purple/theme.css +7014 -0
- package/resources/themes/aura-light-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-teal/theme.css +7014 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +533 -403
- package/resources/themes/bootstrap4-dark-purple/theme.css +533 -403
- package/resources/themes/bootstrap4-light-blue/theme.css +533 -403
- package/resources/themes/bootstrap4-light-purple/theme.css +533 -403
- package/resources/themes/fluent-light/theme.css +431 -350
- package/resources/themes/lara-dark-amber/theme.css +534 -404
- package/resources/themes/lara-dark-blue/theme.css +534 -404
- package/resources/themes/lara-dark-cyan/theme.css +534 -404
- package/resources/themes/lara-dark-green/theme.css +534 -404
- package/resources/themes/lara-dark-indigo/theme.css +534 -404
- package/resources/themes/lara-dark-pink/theme.css +534 -404
- package/resources/themes/lara-dark-purple/theme.css +534 -404
- package/resources/themes/lara-dark-teal/theme.css +534 -404
- package/resources/themes/lara-light-amber/theme.css +535 -405
- package/resources/themes/lara-light-blue/theme.css +535 -405
- package/resources/themes/lara-light-cyan/theme.css +535 -405
- package/resources/themes/lara-light-green/theme.css +535 -405
- package/resources/themes/lara-light-indigo/theme.css +535 -405
- package/resources/themes/lara-light-pink/theme.css +535 -405
- package/resources/themes/lara-light-purple/theme.css +535 -405
- package/resources/themes/lara-light-teal/theme.css +535 -405
- package/resources/themes/luna-amber/theme.css +432 -351
- package/resources/themes/luna-blue/theme.css +432 -351
- package/resources/themes/luna-green/theme.css +432 -351
- package/resources/themes/luna-pink/theme.css +432 -351
- package/resources/themes/md-dark-deeppurple/theme.css +696 -431
- package/resources/themes/md-dark-indigo/theme.css +696 -431
- package/resources/themes/md-light-deeppurple/theme.css +700 -435
- package/resources/themes/md-light-indigo/theme.css +700 -435
- package/resources/themes/mdc-dark-deeppurple/theme.css +696 -431
- package/resources/themes/mdc-dark-indigo/theme.css +696 -431
- package/resources/themes/mdc-light-deeppurple/theme.css +700 -435
- package/resources/themes/mdc-light-indigo/theme.css +700 -435
- package/resources/themes/mira/theme.css +486 -405
- package/resources/themes/nano/theme.css +432 -351
- package/resources/themes/nova/theme.css +432 -351
- package/resources/themes/nova-accent/theme.css +432 -351
- package/resources/themes/nova-alt/theme.css +432 -351
- package/resources/themes/nova-vue/theme.css +432 -351
- package/resources/themes/rhea/theme.css +432 -351
- package/resources/themes/saga-blue/theme.css +432 -351
- package/resources/themes/saga-green/theme.css +432 -351
- package/resources/themes/saga-orange/theme.css +432 -351
- package/resources/themes/saga-purple/theme.css +432 -351
- package/resources/themes/soho-dark/theme.css +534 -404
- package/resources/themes/soho-light/theme.css +534 -404
- package/resources/themes/tailwind-light/theme.css +432 -351
- package/resources/themes/vela-blue/theme.css +432 -351
- package/resources/themes/vela-green/theme.css +432 -351
- package/resources/themes/vela-orange/theme.css +432 -351
- package/resources/themes/vela-purple/theme.css +432 -351
- package/resources/themes/viva-dark/theme.css +535 -405
- package/resources/themes/viva-light/theme.css +535 -405
- package/sidebar/Sidebar.vue +16 -1
- package/sidebar/sidebar.cjs.js +17 -5
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +17 -5
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +17 -5
- package/sidebar/sidebar.min.js +1 -1
- package/slider/Slider.vue +0 -1
- package/slider/slider.cjs.js +0 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +0 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +0 -1
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.vue +2 -2
- package/speeddial/speeddial.cjs.js +2 -2
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -2
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -2
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/BaseSplitButton.vue +1 -1
- package/splitbutton/splitbutton.cjs.js +1 -1
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +1 -1
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +1 -1
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.cjs.js +8 -5
- package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.esm.js +8 -5
- package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.js +8 -5
- package/splitbutton/style/splitbuttonstyle.min.js +1 -1
- package/steps/Steps.vue +2 -1
- package/steps/steps.cjs.js +3 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +3 -2
- package/steps/steps.min.js +1 -1
- package/tabview/TabView.vue +2 -3
- package/tabview/tabview.cjs.js +3 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +3 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +3 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.vue +1 -1
- package/tag/tag.cjs.js +4 -2
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +4 -2
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +4 -2
- package/tag/tag.min.js +1 -1
- package/textarea/Textarea.d.ts +2 -2
- package/tieredmenu/BaseTieredMenu.vue +1 -1
- package/tieredmenu/TieredMenu.d.ts +4 -0
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/TieredMenuSub.vue +5 -1
- package/tieredmenu/tieredmenu.cjs.js +12 -5
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +12 -5
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +12 -5
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/togglebutton/BaseToggleButton.vue +4 -4
- package/togglebutton/ToggleButton.d.ts +17 -24
- package/togglebutton/ToggleButton.vue +41 -67
- package/togglebutton/style/togglebuttonstyle.cjs.js +15 -8
- package/togglebutton/style/togglebuttonstyle.cjs.min.js +1 -1
- package/togglebutton/style/togglebuttonstyle.esm.js +15 -8
- package/togglebutton/style/togglebuttonstyle.esm.min.js +1 -1
- package/togglebutton/style/togglebuttonstyle.js +15 -8
- package/togglebutton/style/togglebuttonstyle.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +45 -80
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +46 -81
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +46 -82
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/style/tooltipstyle.cjs.js +1 -1
- package/tooltip/style/tooltipstyle.cjs.min.js +1 -1
- package/tooltip/style/tooltipstyle.esm.js +1 -1
- package/tooltip/style/tooltipstyle.esm.min.js +1 -1
- package/tooltip/style/tooltipstyle.js +1 -1
- package/tooltip/style/tooltipstyle.min.js +1 -1
- package/tree/BaseTree.vue +4 -0
- package/tree/Tree.d.ts +6 -9
- package/tree/Tree.vue +1 -1
- package/tree/TreeNode.vue +14 -11
- package/tree/style/treestyle.cjs.js +3 -6
- package/tree/style/treestyle.cjs.min.js +1 -1
- package/tree/style/treestyle.esm.js +3 -6
- package/tree/style/treestyle.esm.min.js +1 -1
- package/tree/style/treestyle.js +3 -6
- package/tree/style/treestyle.min.js +1 -1
- package/tree/tree.cjs.js +34 -21
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +34 -22
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +35 -23
- package/tree/tree.min.js +1 -1
- package/treeselect/BaseTreeSelect.vue +1 -1
- package/treeselect/TreeSelect.vue +0 -4
- package/treeselect/treeselect.cjs.js +1 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +1 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +1 -5
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +26 -24
- package/treetable/TreeTable.vue +3 -1
- package/treetable/TreeTableRow.vue +2 -0
- package/treetable/style/treetablestyle.cjs.js +4 -13
- package/treetable/style/treetablestyle.cjs.min.js +1 -1
- package/treetable/style/treetablestyle.esm.js +4 -13
- package/treetable/style/treetablestyle.esm.min.js +1 -1
- package/treetable/style/treetablestyle.js +4 -13
- package/treetable/style/treetablestyle.min.js +1 -1
- package/treetable/treetable.cjs.js +39 -44
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +39 -45
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +40 -46
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/BaseTriStateCheckbox.vue +17 -9
- package/tristatecheckbox/TriStateCheckbox.d.ts +34 -23
- package/tristatecheckbox/TriStateCheckbox.vue +49 -61
- package/tristatecheckbox/style/tristatecheckboxstyle.cjs.js +7 -13
- package/tristatecheckbox/style/tristatecheckboxstyle.cjs.min.js +1 -1
- package/tristatecheckbox/style/tristatecheckboxstyle.esm.js +7 -13
- package/tristatecheckbox/style/tristatecheckboxstyle.esm.min.js +1 -1
- package/tristatecheckbox/style/tristatecheckboxstyle.js +7 -13
- package/tristatecheckbox/style/tristatecheckboxstyle.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +69 -87
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +70 -88
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +69 -87
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +14 -6
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +14 -6
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +14 -6
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +24 -0
- package/vetur-tags.json +6 -0
- package/virtualscroller/BaseVirtualScroller.vue +1 -1
- package/virtualscroller/VirtualScroller.vue +58 -50
- package/virtualscroller/virtualscroller.cjs.js +90 -77
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +90 -77
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +90 -77
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +71 -6
|
@@ -52,7 +52,7 @@ var script$2 = {
|
|
|
52
52
|
"default": null
|
|
53
53
|
},
|
|
54
54
|
appendTo: {
|
|
55
|
-
type: String,
|
|
55
|
+
type: [String, Object],
|
|
56
56
|
"default": 'body'
|
|
57
57
|
},
|
|
58
58
|
loading: {
|
|
@@ -73,12 +73,16 @@ var script$2 = {
|
|
|
73
73
|
},
|
|
74
74
|
autoOptionFocus: {
|
|
75
75
|
type: Boolean,
|
|
76
|
-
"default":
|
|
76
|
+
"default": false
|
|
77
77
|
},
|
|
78
78
|
selectOnFocus: {
|
|
79
79
|
type: Boolean,
|
|
80
80
|
"default": false
|
|
81
81
|
},
|
|
82
|
+
focusOnHover: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
"default": true
|
|
85
|
+
},
|
|
82
86
|
searchLocale: {
|
|
83
87
|
type: String,
|
|
84
88
|
"default": undefined
|
|
@@ -128,7 +132,7 @@ var script$1 = {
|
|
|
128
132
|
name: 'CascadeSelectSub',
|
|
129
133
|
hostName: 'CascadeSelect',
|
|
130
134
|
"extends": BaseComponent,
|
|
131
|
-
emits: ['option-change'],
|
|
135
|
+
emits: ['option-change', 'option-focus-change'],
|
|
132
136
|
container: null,
|
|
133
137
|
props: {
|
|
134
138
|
selectId: String,
|
|
@@ -175,6 +179,19 @@ var script$1 = {
|
|
|
175
179
|
getOptionValue: function getOptionValue(processedOption) {
|
|
176
180
|
return this.optionValue ? ObjectUtils.resolveFieldData(processedOption.option, this.optionValue) : processedOption.option;
|
|
177
181
|
},
|
|
182
|
+
getPTOptions: function getPTOptions(processedOption, index, key) {
|
|
183
|
+
return this.ptm(key, {
|
|
184
|
+
context: {
|
|
185
|
+
item: processedOption,
|
|
186
|
+
index: index,
|
|
187
|
+
level: this.level,
|
|
188
|
+
itemGroup: this.isOptionGroup(processedOption),
|
|
189
|
+
active: this.isOptionActive(processedOption),
|
|
190
|
+
focused: this.isOptionFocused(processedOption),
|
|
191
|
+
disabled: this.isOptionDisabled(processedOption)
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
},
|
|
178
195
|
isOptionDisabled: function isOptionDisabled(processedOption) {
|
|
179
196
|
return this.optionDisabled ? ObjectUtils.resolveFieldData(processedOption.option, this.optionDisabled) : false;
|
|
180
197
|
},
|
|
@@ -208,9 +225,18 @@ var script$1 = {
|
|
|
208
225
|
isFocus: true
|
|
209
226
|
});
|
|
210
227
|
},
|
|
228
|
+
onOptionMouseMove: function onOptionMouseMove(event, processedOption) {
|
|
229
|
+
this.$emit('option-focus-change', {
|
|
230
|
+
originalEvent: event,
|
|
231
|
+
processedOption: processedOption
|
|
232
|
+
});
|
|
233
|
+
},
|
|
211
234
|
onOptionChange: function onOptionChange(event) {
|
|
212
235
|
this.$emit('option-change', event);
|
|
213
236
|
},
|
|
237
|
+
onOptionFocusChange: function onOptionFocusChange(event) {
|
|
238
|
+
this.$emit('option-focus-change', event);
|
|
239
|
+
},
|
|
214
240
|
containerRef: function containerRef(el) {
|
|
215
241
|
this.container = el;
|
|
216
242
|
}
|
|
@@ -224,7 +250,7 @@ var script$1 = {
|
|
|
224
250
|
};
|
|
225
251
|
|
|
226
252
|
var _hoisted_1$1 = ["id", "aria-label", "aria-selected", "aria-expanded", "aria-level", "aria-setsize", "aria-posinset", "data-p-item-group", "data-p-highlight", "data-p-focus", "data-p-disabled"];
|
|
227
|
-
var _hoisted_2 = ["onClick"];
|
|
253
|
+
var _hoisted_2 = ["onClick", "onMousemove"];
|
|
228
254
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
229
255
|
var _component_AngleRightIcon = resolveComponent("AngleRightIcon");
|
|
230
256
|
var _component_CascadeSelectSub = resolveComponent("CascadeSelectSub", true);
|
|
@@ -246,7 +272,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
246
272
|
"aria-level": $props.level + 1,
|
|
247
273
|
"aria-setsize": $props.options.length,
|
|
248
274
|
"aria-posinset": index + 1
|
|
249
|
-
},
|
|
275
|
+
}, $options.getPTOptions(processedOption, index, 'item'), {
|
|
250
276
|
"data-p-item-group": $options.isOptionGroup(processedOption),
|
|
251
277
|
"data-p-highlight": $options.isOptionActive(processedOption),
|
|
252
278
|
"data-p-focus": $options.isOptionFocused(processedOption),
|
|
@@ -255,14 +281,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
255
281
|
"class": _ctx.cx('content'),
|
|
256
282
|
onClick: function onClick($event) {
|
|
257
283
|
return $options.onOptionClick($event, processedOption);
|
|
284
|
+
},
|
|
285
|
+
onMousemove: function onMousemove($event) {
|
|
286
|
+
return $options.onOptionMouseMove($event, processedOption);
|
|
258
287
|
}
|
|
259
|
-
},
|
|
288
|
+
}, $options.getPTOptions(processedOption, index, 'content')), [$props.templates['option'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates['option']), {
|
|
260
289
|
key: 0,
|
|
261
290
|
option: processedOption.option
|
|
262
291
|
}, null, 8, ["option"])) : (openBlock(), createElementBlock("span", mergeProps({
|
|
263
292
|
key: 1,
|
|
264
293
|
"class": _ctx.cx('text')
|
|
265
|
-
},
|
|
294
|
+
}, $options.getPTOptions(processedOption, index, 'text')), toDisplayString($options.getOptionLabelToRender(processedOption)), 17)), $options.isOptionGroup(processedOption) ? (openBlock(), createElementBlock(Fragment, {
|
|
266
295
|
key: 2
|
|
267
296
|
}, [$props.templates['optiongroupicon'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates['optiongroupicon']), {
|
|
268
297
|
key: 0,
|
|
@@ -271,11 +300,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
271
300
|
key: 1,
|
|
272
301
|
"class": [_ctx.cx('groupIcon'), $props.optionGroupIcon],
|
|
273
302
|
"aria-hidden": "true"
|
|
274
|
-
},
|
|
303
|
+
}, $options.getPTOptions(processedOption, index, 'groupIcon')), null, 16)) : (openBlock(), createBlock(_component_AngleRightIcon, mergeProps({
|
|
275
304
|
key: 2,
|
|
276
305
|
"class": _ctx.cx('groupIcon'),
|
|
277
306
|
"aria-hidden": "true"
|
|
278
|
-
},
|
|
307
|
+
}, $options.getPTOptions(processedOption, index, 'groupIcon')), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_2)), [[_directive_ripple]]), $options.isOptionGroup(processedOption) && $options.isOptionActive(processedOption) ? (openBlock(), createBlock(_component_CascadeSelectSub, {
|
|
279
308
|
key: 0,
|
|
280
309
|
role: "group",
|
|
281
310
|
"class": normalizeClass(_ctx.cx('sublist')),
|
|
@@ -292,10 +321,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
292
321
|
optionGroupLabel: $props.optionGroupLabel,
|
|
293
322
|
optionGroupChildren: $props.optionGroupChildren,
|
|
294
323
|
onOptionChange: $options.onOptionChange,
|
|
324
|
+
onOptionFocusChange: $options.onOptionFocusChange,
|
|
295
325
|
pt: _ctx.pt,
|
|
296
326
|
unstyled: _ctx.unstyled,
|
|
297
327
|
isParentMount: $data.mounted
|
|
298
|
-
}, null, 8, ["class", "selectId", "focusedOptionId", "options", "activeOptionPath", "level", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "pt", "unstyled", "isParentMount"])) : createCommentVNode("", true)], 16, _hoisted_1$1);
|
|
328
|
+
}, null, 8, ["class", "selectId", "focusedOptionId", "options", "activeOptionPath", "level", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "onOptionFocusChange", "pt", "unstyled", "isParentMount"])) : createCommentVNode("", true)], 16, _hoisted_1$1);
|
|
299
329
|
}), 128))], 16);
|
|
300
330
|
}
|
|
301
331
|
|
|
@@ -311,10 +341,10 @@ var script = {
|
|
|
311
341
|
overlay: null,
|
|
312
342
|
searchTimeout: null,
|
|
313
343
|
searchValue: null,
|
|
314
|
-
focusOnHover: false,
|
|
315
344
|
data: function data() {
|
|
316
345
|
return {
|
|
317
346
|
id: this.$attrs.id,
|
|
347
|
+
clicked: false,
|
|
318
348
|
focused: false,
|
|
319
349
|
focusedOptionInfo: {
|
|
320
350
|
index: -1,
|
|
@@ -369,12 +399,13 @@ var script = {
|
|
|
369
399
|
isOptionGroup: function isOptionGroup(option, level) {
|
|
370
400
|
return Object.prototype.hasOwnProperty.call(option, this.optionGroupChildren[level]);
|
|
371
401
|
},
|
|
372
|
-
getProccessedOptionLabel: function getProccessedOptionLabel(
|
|
402
|
+
getProccessedOptionLabel: function getProccessedOptionLabel() {
|
|
403
|
+
var processedOption = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
373
404
|
var grouped = this.isProccessedOptionGroup(processedOption);
|
|
374
405
|
return grouped ? this.getOptionGroupLabel(processedOption.option, processedOption.level) : this.getOptionLabel(processedOption.option);
|
|
375
406
|
},
|
|
376
407
|
isProccessedOptionGroup: function isProccessedOptionGroup(processedOption) {
|
|
377
|
-
return ObjectUtils.isNotEmpty(processedOption.children);
|
|
408
|
+
return ObjectUtils.isNotEmpty(processedOption === null || processedOption === void 0 ? void 0 : processedOption.children);
|
|
378
409
|
},
|
|
379
410
|
show: function show(isFocus) {
|
|
380
411
|
this.$emit('before-show');
|
|
@@ -383,13 +414,13 @@ var script = {
|
|
|
383
414
|
if (this.hasSelectedOption && ObjectUtils.isNotEmpty(this.activeOptionPath)) {
|
|
384
415
|
var processedOption = this.activeOptionPath[this.activeOptionPath.length - 1];
|
|
385
416
|
this.focusedOptionInfo = {
|
|
386
|
-
index:
|
|
417
|
+
index: processedOption.index,
|
|
387
418
|
level: processedOption.level,
|
|
388
419
|
parentKey: processedOption.parentKey
|
|
389
420
|
};
|
|
390
421
|
} else {
|
|
391
422
|
this.focusedOptionInfo = {
|
|
392
|
-
index: this.autoOptionFocus ? this.findFirstFocusedOptionIndex() :
|
|
423
|
+
index: this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex(),
|
|
393
424
|
level: 0,
|
|
394
425
|
parentKey: ''
|
|
395
426
|
};
|
|
@@ -401,6 +432,7 @@ var script = {
|
|
|
401
432
|
var _hide = function _hide() {
|
|
402
433
|
_this.$emit('before-hide');
|
|
403
434
|
_this.overlayVisible = false;
|
|
435
|
+
_this.clicked = false;
|
|
404
436
|
_this.activeOptionPath = [];
|
|
405
437
|
_this.focusedOptionInfo = {
|
|
406
438
|
index: -1,
|
|
@@ -483,6 +515,7 @@ var script = {
|
|
|
483
515
|
}
|
|
484
516
|
break;
|
|
485
517
|
}
|
|
518
|
+
this.clicked = false;
|
|
486
519
|
},
|
|
487
520
|
onOptionChange: function onOptionChange(event) {
|
|
488
521
|
var originalEvent = event.originalEvent,
|
|
@@ -508,9 +541,24 @@ var script = {
|
|
|
508
541
|
grouped ? this.onOptionGroupSelect(originalEvent, processedOption) : this.onOptionSelect(originalEvent, processedOption, isHide);
|
|
509
542
|
isFocus && DomHandler.focus(this.$refs.focusInput);
|
|
510
543
|
},
|
|
544
|
+
onOptionFocusChange: function onOptionFocusChange(event) {
|
|
545
|
+
if (this.focusOnHover) {
|
|
546
|
+
var originalEvent = event.originalEvent,
|
|
547
|
+
processedOption = event.processedOption;
|
|
548
|
+
var index = processedOption.index,
|
|
549
|
+
level = processedOption.level,
|
|
550
|
+
parentKey = processedOption.parentKey;
|
|
551
|
+
this.focusedOptionInfo = {
|
|
552
|
+
index: index,
|
|
553
|
+
level: level,
|
|
554
|
+
parentKey: parentKey
|
|
555
|
+
};
|
|
556
|
+
this.changeFocusedOptionIndex(originalEvent, index);
|
|
557
|
+
}
|
|
558
|
+
},
|
|
511
559
|
onOptionSelect: function onOptionSelect(event, processedOption) {
|
|
512
560
|
var isHide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
513
|
-
var value = this.getOptionValue(processedOption.option);
|
|
561
|
+
var value = this.getOptionValue(processedOption === null || processedOption === void 0 ? void 0 : processedOption.option);
|
|
514
562
|
this.activeOptionPath.forEach(function (p) {
|
|
515
563
|
return p.selected = true;
|
|
516
564
|
});
|
|
@@ -532,6 +580,7 @@ var script = {
|
|
|
532
580
|
this.overlayVisible ? this.hide() : this.show();
|
|
533
581
|
DomHandler.focus(this.$refs.focusInput);
|
|
534
582
|
}
|
|
583
|
+
this.clicked = true;
|
|
535
584
|
this.$emit('click', event);
|
|
536
585
|
},
|
|
537
586
|
onOverlayClick: function onOverlayClick(event) {
|
|
@@ -548,9 +597,12 @@ var script = {
|
|
|
548
597
|
}
|
|
549
598
|
},
|
|
550
599
|
onArrowDownKey: function onArrowDownKey(event) {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
600
|
+
if (!this.overlayVisible) {
|
|
601
|
+
this.show();
|
|
602
|
+
} else {
|
|
603
|
+
var optionIndex = this.focusedOptionInfo.index !== -1 ? this.findNextOptionIndex(this.focusedOptionInfo.index) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex();
|
|
604
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
605
|
+
}
|
|
554
606
|
event.preventDefault();
|
|
555
607
|
},
|
|
556
608
|
onArrowUpKey: function onArrowUpKey(event) {
|
|
@@ -566,7 +618,7 @@ var script = {
|
|
|
566
618
|
this.overlayVisible && this.hide();
|
|
567
619
|
event.preventDefault();
|
|
568
620
|
} else {
|
|
569
|
-
var optionIndex = this.focusedOptionInfo.index !== -1 ? this.findPrevOptionIndex(this.focusedOptionInfo.index) : this.findLastFocusedOptionIndex();
|
|
621
|
+
var optionIndex = this.focusedOptionInfo.index !== -1 ? this.findPrevOptionIndex(this.focusedOptionInfo.index) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();
|
|
570
622
|
this.changeFocusedOptionIndex(event, optionIndex);
|
|
571
623
|
!this.overlayVisible && this.show();
|
|
572
624
|
event.preventDefault();
|
|
@@ -577,10 +629,10 @@ var script = {
|
|
|
577
629
|
if (this.overlayVisible) {
|
|
578
630
|
var processedOption = this.visibleOptions[this.focusedOptionInfo.index];
|
|
579
631
|
var parentOption = this.activeOptionPath.find(function (p) {
|
|
580
|
-
return p.key === processedOption.parentKey;
|
|
632
|
+
return p.key === (processedOption === null || processedOption === void 0 ? void 0 : processedOption.parentKey);
|
|
581
633
|
});
|
|
582
634
|
var matched = this.focusedOptionInfo.parentKey === '' || parentOption && parentOption.key === this.focusedOptionInfo.parentKey;
|
|
583
|
-
var root = ObjectUtils.isEmpty(processedOption.parent);
|
|
635
|
+
var root = ObjectUtils.isEmpty(processedOption === null || processedOption === void 0 ? void 0 : processedOption.parent);
|
|
584
636
|
if (matched) {
|
|
585
637
|
this.activeOptionPath = this.activeOptionPath.filter(function (p) {
|
|
586
638
|
return p.parentKey !== _this2.focusedOptionInfo.parentKey;
|
|
@@ -603,12 +655,12 @@ var script = {
|
|
|
603
655
|
var grouped = this.isProccessedOptionGroup(processedOption);
|
|
604
656
|
if (grouped) {
|
|
605
657
|
var matched = this.activeOptionPath.some(function (p) {
|
|
606
|
-
return processedOption.key === p.key;
|
|
658
|
+
return (processedOption === null || processedOption === void 0 ? void 0 : processedOption.key) === p.key;
|
|
607
659
|
});
|
|
608
660
|
if (matched) {
|
|
609
661
|
this.focusedOptionInfo = {
|
|
610
662
|
index: -1,
|
|
611
|
-
parentKey: processedOption.key
|
|
663
|
+
parentKey: processedOption === null || processedOption === void 0 ? void 0 : processedOption.key
|
|
612
664
|
};
|
|
613
665
|
this.searchValue = '';
|
|
614
666
|
this.onArrowDownKey(event);
|
|
@@ -634,6 +686,7 @@ var script = {
|
|
|
634
686
|
},
|
|
635
687
|
onEnterKey: function onEnterKey(event) {
|
|
636
688
|
if (!this.overlayVisible) {
|
|
689
|
+
this.focusedOptionInfo.index !== -1; // reset
|
|
637
690
|
this.onArrowDownKey(event);
|
|
638
691
|
} else {
|
|
639
692
|
if (this.focusedOptionInfo.index !== -1) {
|
|
@@ -752,7 +805,8 @@ var script = {
|
|
|
752
805
|
}
|
|
753
806
|
},
|
|
754
807
|
isOptionMatched: function isOptionMatched(processedOption) {
|
|
755
|
-
|
|
808
|
+
var _this$getProccessedOp;
|
|
809
|
+
return this.isValidOption(processedOption) && ((_this$getProccessedOp = this.getProccessedOptionLabel(processedOption)) === null || _this$getProccessedOp === void 0 ? void 0 : _this$getProccessedOp.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale)));
|
|
756
810
|
},
|
|
757
811
|
isValidOption: function isValidOption(processedOption) {
|
|
758
812
|
return ObjectUtils.isNotEmpty(processedOption) && !this.isOptionDisabled(processedOption.option);
|
|
@@ -827,26 +881,28 @@ var script = {
|
|
|
827
881
|
this.searchValue = (this.searchValue || '') + _char;
|
|
828
882
|
var optionIndex = -1;
|
|
829
883
|
var matched = false;
|
|
830
|
-
if (this.
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
optionIndex
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
884
|
+
if (ObjectUtils.isNotEmpty(this.searchValue)) {
|
|
885
|
+
if (this.focusedOptionInfo.index !== -1) {
|
|
886
|
+
optionIndex = this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex(function (processedOption) {
|
|
887
|
+
return _this11.isOptionMatched(processedOption);
|
|
888
|
+
});
|
|
889
|
+
optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionInfo.index).findIndex(function (processedOption) {
|
|
890
|
+
return _this11.isOptionMatched(processedOption);
|
|
891
|
+
}) : optionIndex + this.focusedOptionInfo.index;
|
|
892
|
+
} else {
|
|
893
|
+
optionIndex = this.visibleOptions.findIndex(function (processedOption) {
|
|
894
|
+
return _this11.isOptionMatched(processedOption);
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
if (optionIndex !== -1) {
|
|
898
|
+
matched = true;
|
|
899
|
+
}
|
|
900
|
+
if (optionIndex === -1 && this.focusedOptionInfo.index === -1) {
|
|
901
|
+
optionIndex = this.findFirstFocusedOptionIndex();
|
|
902
|
+
}
|
|
903
|
+
if (optionIndex !== -1) {
|
|
904
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
905
|
+
}
|
|
850
906
|
}
|
|
851
907
|
if (this.searchTimeout) {
|
|
852
908
|
clearTimeout(this.searchTimeout);
|
|
@@ -871,15 +927,18 @@ var script = {
|
|
|
871
927
|
}
|
|
872
928
|
},
|
|
873
929
|
scrollInView: function scrollInView() {
|
|
930
|
+
var _this12 = this;
|
|
874
931
|
var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
element
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
932
|
+
this.$nextTick(function () {
|
|
933
|
+
var id = index !== -1 ? "".concat(_this12.id, "_").concat(index) : _this12.focusedOptionId;
|
|
934
|
+
var element = DomHandler.findSingle(_this12.list, "li[id=\"".concat(id, "\"]"));
|
|
935
|
+
if (element) {
|
|
936
|
+
element.scrollIntoView && element.scrollIntoView({
|
|
937
|
+
block: 'nearest',
|
|
938
|
+
inline: 'start'
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
});
|
|
883
942
|
},
|
|
884
943
|
autoUpdateModel: function autoUpdateModel() {
|
|
885
944
|
if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) {
|
|
@@ -903,7 +962,7 @@ var script = {
|
|
|
903
962
|
});
|
|
904
963
|
},
|
|
905
964
|
createProcessedOptions: function createProcessedOptions(options) {
|
|
906
|
-
var
|
|
965
|
+
var _this13 = this;
|
|
907
966
|
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
908
967
|
var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
909
968
|
var parentKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
@@ -918,7 +977,7 @@ var script = {
|
|
|
918
977
|
parent: parent,
|
|
919
978
|
parentKey: parentKey
|
|
920
979
|
};
|
|
921
|
-
newOption['children'] =
|
|
980
|
+
newOption['children'] = _this13.createProcessedOptions(_this13.getOptionGroupChildren(option, level), level + 1, newOption, key);
|
|
922
981
|
processedOptions.push(newOption);
|
|
923
982
|
});
|
|
924
983
|
return processedOptions;
|
|
@@ -944,9 +1003,9 @@ var script = {
|
|
|
944
1003
|
return this.createProcessedOptions(this.options || []);
|
|
945
1004
|
},
|
|
946
1005
|
visibleOptions: function visibleOptions() {
|
|
947
|
-
var
|
|
1006
|
+
var _this14 = this;
|
|
948
1007
|
var processedOption = this.activeOptionPath.find(function (p) {
|
|
949
|
-
return p.key ===
|
|
1008
|
+
return p.key === _this14.focusedOptionInfo.parentKey;
|
|
950
1009
|
});
|
|
951
1010
|
return processedOption ? processedOption.children : this.processedOptions;
|
|
952
1011
|
},
|
|
@@ -1119,9 +1178,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1119
1178
|
optionGroupLabel: _ctx.optionGroupLabel,
|
|
1120
1179
|
optionGroupChildren: _ctx.optionGroupChildren,
|
|
1121
1180
|
onOptionChange: $options.onOptionChange,
|
|
1181
|
+
onOptionFocusChange: $options.onOptionFocusChange,
|
|
1122
1182
|
pt: _ctx.pt,
|
|
1123
1183
|
unstyled: _ctx.unstyled
|
|
1124
|
-
}, null, 8, ["id", "selectId", "focusedOptionId", "options", "activeOptionPath", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "pt", "unstyled"])], 16), createElementVNode("span", mergeProps({
|
|
1184
|
+
}, null, 8, ["id", "selectId", "focusedOptionId", "options", "activeOptionPath", "templates", "optionLabel", "optionValue", "optionDisabled", "optionGroupIcon", "optionGroupLabel", "optionGroupChildren", "onOptionChange", "onOptionFocusChange", "pt", "unstyled"])], 16), createElementVNode("span", mergeProps({
|
|
1125
1185
|
role: "status",
|
|
1126
1186
|
"aria-live": "polite",
|
|
1127
1187
|
"class": "p-hidden-accessible"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/icons/angleright";import t from"primevue/icons/chevrondown";import i from"primevue/icons/spinner";import n from"primevue/overlayeventbus";import o from"primevue/portal";import{DomHandler as s,ObjectUtils as r,UniqueComponentId as a,ZIndexUtils as l,ConnectedOverlayScrollHandler as p}from"primevue/utils";import c from"primevue/basecomponent";import u from"primevue/cascadeselect/style";import d from"primevue/ripple";import{resolveComponent as h,resolveDirective as f,openBlock as O,createElementBlock as v,mergeProps as y,Fragment as b,renderList as g,withDirectives as m,createBlock as I,resolveDynamicComponent as x,toDisplayString as L,createCommentVNode as S,normalizeClass as w,createElementVNode as C,renderSlot as P,createTextVNode as V,createVNode as k,withCtx as K,Transition as G}from"vue";var D={name:"BaseCascadeSelect",extends:c,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,placeholder:String,disabled:Boolean,dataKey:null,inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},optionGroupIcon:{type:String,default:void 0},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u,provide:function(){return{$parentInstance:this}}},E={name:"CascadeSelectSub",hostName:"CascadeSelect",extends:c,emits:["option-change"],container:null,props:{selectId:String,focusedOptionId:String,options:Array,optionLabel:String,optionValue:String,optionDisabled:null,optionGroupIcon:String,optionGroupLabel:String,optionGroupChildren:{type:[String,Array],default:null},activeOptionPath:Array,level:Number,templates:null,isParentMount:Boolean},data:function(){return{mounted:!1}},watch:{isParentMount:{handler:function(e){e&&s.nestedPosition(this.container,this.level)}}},mounted:function(){(this.isParentMount||0===this.level)&&s.nestedPosition(this.container,this.level),this.mounted=!0},methods:{getOptionId:function(e){return"".concat(this.selectId,"_").concat(e.key)},getOptionLabel:function(e){return this.optionLabel?r.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue:function(e){return this.optionValue?r.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled:function(e){return!!this.optionDisabled&&r.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?r.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:function(e){return e.children},isOptionGroup:function(e){return r.isNotEmpty(e.children)},isOptionSelected:function(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},isOptionFocused:function(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender:function(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick:function(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange:function(e){this.$emit("option-change",e)},containerRef:function(e){this.container=e}},directives:{ripple:d},components:{AngleRightIcon:e}},F=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset","data-p-item-group","data-p-highlight","data-p-focus","data-p-disabled"],M=["onClick"];E.render=function(e,t,i,n,o,s){var r=h("AngleRightIcon"),a=h("CascadeSelectSub",!0),l=f("ripple");return O(),v("ul",y({ref:s.containerRef,class:e.cx("list")},e.ptm(0===i.level?"list":"sublist")),[(O(!0),v(b,null,g(i.options,(function(t,n){return O(),v("li",y({key:s.getOptionLabelToRender(t),id:s.getOptionId(t),class:e.cx("item",{processedOption:t}),role:"treeitem","aria-label":s.getOptionLabelToRender(t),"aria-selected":s.isOptionGroup(t)?void 0:s.isOptionSelected(t),"aria-expanded":s.isOptionGroup(t)?s.isOptionActive(t):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":n+1},e.ptm("item"),{"data-p-item-group":s.isOptionGroup(t),"data-p-highlight":s.isOptionActive(t),"data-p-focus":s.isOptionFocused(t),"data-p-disabled":s.isOptionDisabled(t)}),[m((O(),v("div",y({class:e.cx("content"),onClick:function(e){return s.onOptionClick(e,t)}},e.ptm("content")),[i.templates.option?(O(),I(x(i.templates.option),{key:0,option:t.option},null,8,["option"])):(O(),v("span",y({key:1,class:e.cx("text")},e.ptm("text")),L(s.getOptionLabelToRender(t)),17)),s.isOptionGroup(t)?(O(),v(b,{key:2},[i.templates.optiongroupicon?(O(),I(x(i.templates.optiongroupicon),{key:0,"aria-hidden":"true"})):i.optionGroupIcon?(O(),v("span",y({key:1,class:[e.cx("groupIcon"),i.optionGroupIcon],"aria-hidden":"true"},e.ptm("groupIcon")),null,16)):(O(),I(r,y({key:2,class:e.cx("groupIcon"),"aria-hidden":"true"},e.ptm("groupIcon")),null,16,["class"]))],64)):S("",!0)],16,M)),[[l]]),s.isOptionGroup(t)&&s.isOptionActive(t)?(O(),I(a,{key:0,role:"group",class:w(e.cx("sublist")),selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:s.getOptionGroupChildren(t),activeOptionPath:i.activeOptionPath,level:i.level+1,templates:i.templates,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:s.onOptionChange,pt:e.pt,unstyled:e.unstyled,isParentMount:o.mounted},null,8,["class","selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","pt","unstyled","isParentMount"])):S("",!0)],16,F)})),128))],16)};var A={name:"CascadeSelect",extends:D,emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data:function(){return{id:this.$attrs.id,focused:!1,focusedOptionInfo:{index:-1,level:0,parentKey:""},activeOptionPath:[],overlayVisible:!1,dirty:!1}},watch:{"$attrs.id":function(e){this.id=e||a()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||a(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel:function(e){return this.optionLabel?r.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?r.resolveFieldData(e,this.optionValue):e},isOptionDisabled:function(e){return!!this.optionDisabled&&r.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?r.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren:function(e,t){return r.isString(this.optionGroupChildren)?r.resolveFieldData(e,this.optionGroupChildren):r.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup:function(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel:function(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:function(e){return r.isNotEmpty(e.children)},show:function(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&r.isNotEmpty(this.activeOptionPath)){var t=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?t.index:-1,level:t.level,parentKey:t.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&s.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.overlayVisible=!1,t.activeOptionPath=[],t.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&s.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||this.loading)e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&r.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}}},onOptionChange:function(e){var t=e.originalEvent,i=e.processedOption,n=e.isFocus,o=e.isHide;if(!r.isEmpty(i)){var a=i.index,l=i.level,p=i.parentKey,c=r.isNotEmpty(i.children),u=this.activeOptionPath.filter((function(e){return e.parentKey!==p}));u.push(i),this.focusedOptionInfo={index:a,level:l,parentKey:p},this.activeOptionPath=u,c?this.onOptionGroupSelect(t,i):this.onOptionSelect(t,i,o),n&&s.focus(this.$refs.focusInput)}},onOptionSelect:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.getOptionValue(t.option);this.activeOptionPath.forEach((function(e){return e.selected=!0})),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect:function(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick:function(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),s.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick:function(e){n.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{var i=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){var t=this;if(this.overlayVisible){var i=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((function(e){return e.key===i.parentKey})),o=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,s=r.isEmpty(i.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((function(e){return e.parentKey!==t.focusedOptionInfo.parentKey}))),s||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey:function(e){if(this.overlayVisible){var t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t))this.activeOptionPath.some((function(e){return t.key===e.key}))?(this.focusedOptionInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)):this.onOptionChange({originalEvent:e,processedOption:t});e.preventDefault()}},onHomeKey:function(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey:function(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey:function(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index],i=this.isProccessedOptionGroup(t);this.onOptionChange({originalEvent:e,processedOption:t}),!i&&this.hide()}}else this.onArrowDownKey(e);e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter:function(e){l.set("overlay",e,this.$primevue.config.zIndex.overlay),s.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave:function(e){l.clear(e)},alignOverlay:function(){"self"===this.appendTo?s.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=s.getOuterWidth(this.$el)+"px",s.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&!e.$el.contains(t.target)&&!e.overlay.contains(t.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new p(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!s.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched:function(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption:function(e){return r.isNotEmpty(e)&&!this.isOptionDisabled(e.option)},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return r.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?r.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)}))},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(t=t||0===i&&this.processedOptions))return null;if(r.isEmpty(e))return[];for(var n=0;n<t.length;n++){var o=t[n];if(r.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];var s=this.findOptionPathByValue(e,o.children,i+1);if(s)return s.unshift(o),s}},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,o=!1;return-1!==(n=-1!==this.focusedOptionInfo.index?-1===(n=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionInfo.index:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&(o=!0),-1===n&&-1===this.focusedOptionInfo.index&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),o},changeFocusedOptionIndex:function(e,t){this.focusedOptionInfo.index!==t&&(this.focusedOptionInfo.index=t,this.scrollInView(),this.selectOnFocus&&this.onOptionChange({originalEvent:e,processedOption:this.visibleOptions[t],isHide:!1}))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=s.findSingle(this.list,'li[id="'.concat(t,'"]'));i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionInfo.index=this.findFirstFocusedOptionIndex(),this.onOptionChange({processedOption:this.visibleOptions[this.focusedOptionInfo.index],isHide:!1}),!this.overlayVisible&&(this.focusedOptionInfo={index:-1,level:0,parentKey:""}))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=[];return e&&e.forEach((function(e,r){var a=(""!==o?o+"_":"")+r,l={option:e,index:r,level:i,key:a,parent:n,parentKey:o};l.children=t.createProcessedOptions(t.getOptionGroupChildren(e,i),i+1,l,a),s.push(l)})),s},overlayRef:function(e){this.overlay=e}},computed:{hasSelectedOption:function(){return r.isNotEmpty(this.modelValue)},label:function(){var e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){var t=this.findOptionPathByValue(this.modelValue),i=r.isNotEmpty(t)?t[t.length-1]:null;return i?this.getOptionLabel(i.option):e}return e},processedOptions:function(){return this.createProcessedOptions(this.options||[])},visibleOptions:function(){var e=this,t=this.activeOptionPath.find((function(t){return t.key===e.focusedOptionInfo.parentKey}));return t?t.children:this.processedOptions},equalityKey:function(){return this.optionValue?null:this.dataKey},searchResultMessageText:function(){return r.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionInfo.index?"".concat(this.id).concat(r.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:"","_").concat(this.focusedOptionInfo.index):null}},components:{CascadeSelectSub:E,Portal:o,ChevronDownIcon:t,SpinnerIcon:i,AngleRightIcon:e}};function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function $(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function R(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach((function(t){j(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function j(e,t,i){var n;return(t="symbol"==T(n=z(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function z(e,t){if("object"!=T(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var B=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"];A.render=function(e,t,i,n,o,s){var r=h("SpinnerIcon"),a=h("CascadeSelectSub"),l=h("Portal");return O(),v("div",y({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[5]||(t[5]=function(e){return s.onContainerClick(e)})},e.ptm("root"),{"data-pc-name":"cascadeselect"}),[C("div",y({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[C("input",y({ref:"focusInput",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,readonly:"",disabled:e.disabled,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_tree","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)})},R(R({},e.inputProps),e.ptm("input"))),null,16,B)],16),C("span",y({class:e.cx("label")},e.ptm("label")),[P(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[V(L(s.label),1)]}))],16),C("div",y({class:e.cx("dropdownButton"),role:"button",tabindex:"-1","aria-hidden":"true"},e.ptm("dropdownButton")),[e.loading?P(e.$slots,"loadingicon",{key:0,class:w(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(O(),v("span",y({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(O(),I(r,y({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):P(e.$slots,"dropdownicon",{key:1,class:w(e.cx("dropdownIcon"))},(function(){return[(O(),I(x(e.dropdownIcon?"span":"ChevronDownIcon"),y({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),C("span",y({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),L(s.searchResultMessageText),17),k(l,{appendTo:e.appendTo},{default:K((function(){return[k(G,y({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:K((function(){return[o.overlayVisible?(O(),v("div",y({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[3]||(t[3]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},R(R({},e.panelProps),e.ptm("panel"))),[C("div",y({class:e.cx("wrapper")},e.ptm("wrapper")),[k(a,{id:o.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:o.id,focusedOptionId:o.focused?s.focusedOptionId:void 0,options:s.processedOptions,activeOptionPath:o.activeOptionPath,level:0,templates:e.$slots,optionLabel:e.optionLabel,optionValue:e.optionValue,optionDisabled:e.optionDisabled,optionGroupIcon:e.optionGroupIcon,optionGroupLabel:e.optionGroupLabel,optionGroupChildren:e.optionGroupChildren,onOptionChange:s.onOptionChange,pt:e.pt,unstyled:e.unstyled},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","pt","unstyled"])],16),C("span",y({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),L(s.selectedMessageText),17)],16)):S("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])],16)};export{A as default};
|
|
1
|
+
import e from"primevue/icons/angleright";import t from"primevue/icons/chevrondown";import i from"primevue/icons/spinner";import n from"primevue/overlayeventbus";import o from"primevue/portal";import{DomHandler as s,ObjectUtils as r,UniqueComponentId as a,ZIndexUtils as l,ConnectedOverlayScrollHandler as p}from"primevue/utils";import c from"primevue/basecomponent";import u from"primevue/cascadeselect/style";import d from"primevue/ripple";import{resolveComponent as h,resolveDirective as f,openBlock as O,createElementBlock as v,mergeProps as y,Fragment as b,renderList as g,withDirectives as m,createBlock as I,resolveDynamicComponent as x,toDisplayString as L,createCommentVNode as S,normalizeClass as w,createElementVNode as C,renderSlot as P,createTextVNode as k,createVNode as V,withCtx as K,Transition as G}from"vue";var D={name:"BaseCascadeSelect",extends:c,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,placeholder:String,disabled:Boolean,dataKey:null,inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},appendTo:{type:[String,Object],default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},optionGroupIcon:{type:String,default:void 0},autoOptionFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u,provide:function(){return{$parentInstance:this}}},F={name:"CascadeSelectSub",hostName:"CascadeSelect",extends:c,emits:["option-change","option-focus-change"],container:null,props:{selectId:String,focusedOptionId:String,options:Array,optionLabel:String,optionValue:String,optionDisabled:null,optionGroupIcon:String,optionGroupLabel:String,optionGroupChildren:{type:[String,Array],default:null},activeOptionPath:Array,level:Number,templates:null,isParentMount:Boolean},data:function(){return{mounted:!1}},watch:{isParentMount:{handler:function(e){e&&s.nestedPosition(this.container,this.level)}}},mounted:function(){(this.isParentMount||0===this.level)&&s.nestedPosition(this.container,this.level),this.mounted=!0},methods:{getOptionId:function(e){return"".concat(this.selectId,"_").concat(e.key)},getOptionLabel:function(e){return this.optionLabel?r.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue:function(e){return this.optionValue?r.resolveFieldData(e.option,this.optionValue):e.option},getPTOptions:function(e,t,i){return this.ptm(i,{context:{item:e,index:t,level:this.level,itemGroup:this.isOptionGroup(e),active:this.isOptionActive(e),focused:this.isOptionFocused(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&r.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?r.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:function(e){return e.children},isOptionGroup:function(e){return r.isNotEmpty(e.children)},isOptionSelected:function(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},isOptionFocused:function(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender:function(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick:function(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionMouseMove:function(e,t){this.$emit("option-focus-change",{originalEvent:e,processedOption:t})},onOptionChange:function(e){this.$emit("option-change",e)},onOptionFocusChange:function(e){this.$emit("option-focus-change",e)},containerRef:function(e){this.container=e}},directives:{ripple:d},components:{AngleRightIcon:e}},E=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset","data-p-item-group","data-p-highlight","data-p-focus","data-p-disabled"],M=["onClick","onMousemove"];F.render=function(e,t,i,n,o,s){var r=h("AngleRightIcon"),a=h("CascadeSelectSub",!0),l=f("ripple");return O(),v("ul",y({ref:s.containerRef,class:e.cx("list")},e.ptm(0===i.level?"list":"sublist")),[(O(!0),v(b,null,g(i.options,(function(t,n){return O(),v("li",y({key:s.getOptionLabelToRender(t),id:s.getOptionId(t),class:e.cx("item",{processedOption:t}),role:"treeitem","aria-label":s.getOptionLabelToRender(t),"aria-selected":s.isOptionGroup(t)?void 0:s.isOptionSelected(t),"aria-expanded":s.isOptionGroup(t)?s.isOptionActive(t):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":n+1},s.getPTOptions(t,n,"item"),{"data-p-item-group":s.isOptionGroup(t),"data-p-highlight":s.isOptionActive(t),"data-p-focus":s.isOptionFocused(t),"data-p-disabled":s.isOptionDisabled(t)}),[m((O(),v("div",y({class:e.cx("content"),onClick:function(e){return s.onOptionClick(e,t)},onMousemove:function(e){return s.onOptionMouseMove(e,t)}},s.getPTOptions(t,n,"content")),[i.templates.option?(O(),I(x(i.templates.option),{key:0,option:t.option},null,8,["option"])):(O(),v("span",y({key:1,class:e.cx("text")},s.getPTOptions(t,n,"text")),L(s.getOptionLabelToRender(t)),17)),s.isOptionGroup(t)?(O(),v(b,{key:2},[i.templates.optiongroupicon?(O(),I(x(i.templates.optiongroupicon),{key:0,"aria-hidden":"true"})):i.optionGroupIcon?(O(),v("span",y({key:1,class:[e.cx("groupIcon"),i.optionGroupIcon],"aria-hidden":"true"},s.getPTOptions(t,n,"groupIcon")),null,16)):(O(),I(r,y({key:2,class:e.cx("groupIcon"),"aria-hidden":"true"},s.getPTOptions(t,n,"groupIcon")),null,16,["class"]))],64)):S("",!0)],16,M)),[[l]]),s.isOptionGroup(t)&&s.isOptionActive(t)?(O(),I(a,{key:0,role:"group",class:w(e.cx("sublist")),selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:s.getOptionGroupChildren(t),activeOptionPath:i.activeOptionPath,level:i.level+1,templates:i.templates,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:s.onOptionChange,onOptionFocusChange:s.onOptionFocusChange,pt:e.pt,unstyled:e.unstyled,isParentMount:o.mounted},null,8,["class","selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","onOptionFocusChange","pt","unstyled","isParentMount"])):S("",!0)],16,E)})),128))],16)};var T={name:"CascadeSelect",extends:D,emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionInfo:{index:-1,level:0,parentKey:""},activeOptionPath:[],overlayVisible:!1,dirty:!1}},watch:{"$attrs.id":function(e){this.id=e||a()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||a(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel:function(e){return this.optionLabel?r.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?r.resolveFieldData(e,this.optionValue):e},isOptionDisabled:function(e){return!!this.optionDisabled&&r.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?r.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren:function(e,t){return r.isString(this.optionGroupChildren)?r.resolveFieldData(e,this.optionGroupChildren):r.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup:function(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:function(e){return r.isNotEmpty(null==e?void 0:e.children)},show:function(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&r.isNotEmpty(this.activeOptionPath)){var t=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:t.index,level:t.level,parentKey:t.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.findSelectedOptionIndex(),level:0,parentKey:""};e&&s.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.overlayVisible=!1,t.clicked=!1,t.activeOptionPath=[],t.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&s.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||this.loading)e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&r.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}this.clicked=!1}},onOptionChange:function(e){var t=e.originalEvent,i=e.processedOption,n=e.isFocus,o=e.isHide;if(!r.isEmpty(i)){var a=i.index,l=i.level,p=i.parentKey,c=r.isNotEmpty(i.children),u=this.activeOptionPath.filter((function(e){return e.parentKey!==p}));u.push(i),this.focusedOptionInfo={index:a,level:l,parentKey:p},this.activeOptionPath=u,c?this.onOptionGroupSelect(t,i):this.onOptionSelect(t,i,o),n&&s.focus(this.$refs.focusInput)}},onOptionFocusChange:function(e){if(this.focusOnHover){var t=e.originalEvent,i=e.processedOption,n=i.index;this.focusedOptionInfo={index:n,level:i.level,parentKey:i.parentKey},this.changeFocusedOptionIndex(t,n)}},onOptionSelect:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.getOptionValue(null==t?void 0:t.option);this.activeOptionPath.forEach((function(e){return e.selected=!0})),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect:function(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick:function(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),s.focus(this.$refs.focusInput)),this.clicked=!0,this.$emit("click",e))},onOverlayClick:function(e){n.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t)}else this.show();e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{var i=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){var t=this;if(this.overlayVisible){var i=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((function(e){return e.key===(null==i?void 0:i.parentKey)})),o=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,s=r.isEmpty(null==i?void 0:i.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((function(e){return e.parentKey!==t.focusedOptionInfo.parentKey}))),s||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey:function(e){if(this.overlayVisible){var t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t))this.activeOptionPath.some((function(e){return(null==t?void 0:t.key)===e.key}))?(this.focusedOptionInfo={index:-1,parentKey:null==t?void 0:t.key},this.searchValue="",this.onArrowDownKey(e)):this.onOptionChange({originalEvent:e,processedOption:t});e.preventDefault()}},onHomeKey:function(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey:function(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey:function(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index],i=this.isProccessedOptionGroup(t);this.onOptionChange({originalEvent:e,processedOption:t}),!i&&this.hide()}}else this.onArrowDownKey(e);e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){if(-1!==this.focusedOptionInfo.index){var t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter:function(e){l.set("overlay",e,this.$primevue.config.zIndex.overlay),s.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave:function(e){l.clear(e)},alignOverlay:function(){"self"===this.appendTo?s.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=s.getOuterWidth(this.$el)+"px",s.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&!e.$el.contains(t.target)&&!e.overlay.contains(t.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new p(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!s.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched:function(e){var t;return this.isValidOption(e)&&(null===(t=this.getProccessedOptionLabel(e))||void 0===t?void 0:t.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale)))},isValidOption:function(e){return r.isNotEmpty(e)&&!this.isOptionDisabled(e.option)},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.activeOptionPath.some((function(t){return t.key===e.key}))},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return r.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?r.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)}))},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(t=t||0===i&&this.processedOptions))return null;if(r.isEmpty(e))return[];for(var n=0;n<t.length;n++){var o=t[n];if(r.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];var s=this.findOptionPathByValue(e,o.children,i+1);if(s)return s.unshift(o),s}},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,o=!1;return r.isNotEmpty(this.searchValue)&&(-1!==(n=-1!==this.focusedOptionInfo.index?-1===(n=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionInfo.index:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&(o=!0),-1===n&&-1===this.focusedOptionInfo.index&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),o},changeFocusedOptionIndex:function(e,t){this.focusedOptionInfo.index!==t&&(this.focusedOptionInfo.index=t,this.scrollInView(),this.selectOnFocus&&this.onOptionChange({originalEvent:e,processedOption:this.visibleOptions[t],isHide:!1}))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,n=s.findSingle(e.list,'li[id="'.concat(i,'"]'));n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"})}))},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionInfo.index=this.findFirstFocusedOptionIndex(),this.onOptionChange({processedOption:this.visibleOptions[this.focusedOptionInfo.index],isHide:!1}),!this.overlayVisible&&(this.focusedOptionInfo={index:-1,level:0,parentKey:""}))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=[];return e&&e.forEach((function(e,r){var a=(""!==o?o+"_":"")+r,l={option:e,index:r,level:i,key:a,parent:n,parentKey:o};l.children=t.createProcessedOptions(t.getOptionGroupChildren(e,i),i+1,l,a),s.push(l)})),s},overlayRef:function(e){this.overlay=e}},computed:{hasSelectedOption:function(){return r.isNotEmpty(this.modelValue)},label:function(){var e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){var t=this.findOptionPathByValue(this.modelValue),i=r.isNotEmpty(t)?t[t.length-1]:null;return i?this.getOptionLabel(i.option):e}return e},processedOptions:function(){return this.createProcessedOptions(this.options||[])},visibleOptions:function(){var e=this,t=this.activeOptionPath.find((function(t){return t.key===e.focusedOptionInfo.parentKey}));return t?t.children:this.processedOptions},equalityKey:function(){return this.optionValue?null:this.dataKey},searchResultMessageText:function(){return r.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionInfo.index?"".concat(this.id).concat(r.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:"","_").concat(this.focusedOptionInfo.index):null}},components:{CascadeSelectSub:F,Portal:o,ChevronDownIcon:t,SpinnerIcon:i,AngleRightIcon:e}};function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function $(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function R(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach((function(t){j(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function j(e,t,i){var n;return(t="symbol"==A(n=z(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function z(e,t){if("object"!=A(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var B=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"];T.render=function(e,t,i,n,o,s){var r=h("SpinnerIcon"),a=h("CascadeSelectSub"),l=h("Portal");return O(),v("div",y({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[5]||(t[5]=function(e){return s.onContainerClick(e)})},e.ptm("root"),{"data-pc-name":"cascadeselect"}),[C("div",y({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[C("input",y({ref:"focusInput",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,readonly:"",disabled:e.disabled,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_tree","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)})},R(R({},e.inputProps),e.ptm("input"))),null,16,B)],16),C("span",y({class:e.cx("label")},e.ptm("label")),[P(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[k(L(s.label),1)]}))],16),C("div",y({class:e.cx("dropdownButton"),role:"button",tabindex:"-1","aria-hidden":"true"},e.ptm("dropdownButton")),[e.loading?P(e.$slots,"loadingicon",{key:0,class:w(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(O(),v("span",y({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(O(),I(r,y({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):P(e.$slots,"dropdownicon",{key:1,class:w(e.cx("dropdownIcon"))},(function(){return[(O(),I(x(e.dropdownIcon?"span":"ChevronDownIcon"),y({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),C("span",y({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),L(s.searchResultMessageText),17),V(l,{appendTo:e.appendTo},{default:K((function(){return[V(G,y({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:K((function(){return[o.overlayVisible?(O(),v("div",y({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[3]||(t[3]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},R(R({},e.panelProps),e.ptm("panel"))),[C("div",y({class:e.cx("wrapper")},e.ptm("wrapper")),[V(a,{id:o.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:o.id,focusedOptionId:o.focused?s.focusedOptionId:void 0,options:s.processedOptions,activeOptionPath:o.activeOptionPath,level:0,templates:e.$slots,optionLabel:e.optionLabel,optionValue:e.optionValue,optionDisabled:e.optionDisabled,optionGroupIcon:e.optionGroupIcon,optionGroupLabel:e.optionGroupLabel,optionGroupChildren:e.optionGroupChildren,onOptionChange:s.onOptionChange,onOptionFocusChange:s.onOptionFocusChange,pt:e.pt,unstyled:e.unstyled},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange","onOptionFocusChange","pt","unstyled"])],16),C("span",y({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),L(s.selectedMessageText),17)],16)):S("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])],16)};export{T as default};
|