primevue 3.44.0 → 3.46.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/accordion/Accordion.vue +1 -0
- package/accordion/accordion.cjs.js +1 -0
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -0
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -0
- package/accordion/accordion.min.js +1 -1
- package/autocomplete/BaseAutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +1 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +1 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +1 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/basecomponent/BaseComponent.vue +1 -1
- package/basecomponent/basecomponent.cjs.js +2 -2
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +2 -2
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +2 -2
- package/basecomponent/basecomponent.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.cjs.js +1 -1
- package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.esm.js +1 -1
- package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.js +1 -1
- package/basecomponent/style/basecomponentstyle.min.js +1 -1
- package/baseicon/BaseIcon.vue +8 -14
- package/baseicon/baseicon.cjs.js +10 -15
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +10 -15
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +10 -15
- package/baseicon/baseicon.min.js +1 -1
- package/calendar/BaseCalendar.vue +1 -1
- package/calendar/Calendar.vue +5 -2
- package/calendar/calendar.cjs.js +6 -3
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +6 -3
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +6 -3
- 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 +1 -1
- package/cascadeselect/CascadeSelect.d.ts +41 -0
- package/cascadeselect/CascadeSelect.vue +1 -0
- package/cascadeselect/CascadeSelectSub.vue +18 -5
- package/cascadeselect/cascadeselect.cjs.js +20 -6
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +20 -6
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +20 -6
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.cjs.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.cjs.min.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.esm.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.esm.min.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.js +1 -1
- package/cascadeselect/style/cascadeselectstyle.min.js +1 -1
- package/chips/Chips.vue +1 -0
- package/chips/chips.cjs.js +1 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -0
- 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 +4 -0
- package/column/Column.vue +7 -0
- package/column/column.cjs.js +9 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +9 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +9 -0
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.vue +7 -0
- package/columngroup/columngroup.cjs.js +9 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +9 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +9 -0
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +1 -1
- 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 +3 -3
- package/confirmpopup/confirmpopup.cjs.js +3 -3
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +3 -3
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +3 -3
- 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 +1 -0
- package/contextmenu/ContextMenuSub.vue +6 -1
- package/contextmenu/contextmenu.cjs.js +12 -5
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +12 -5
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +12 -5
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +357 -209
- package/core/core.min.js +53 -53
- package/datatable/BaseDataTable.vue +2 -2
- package/datatable/BodyRow.vue +582 -0
- package/datatable/ColumnFilter.vue +1 -0
- package/datatable/DataTable.d.ts +1 -1
- package/datatable/DataTable.vue +111 -132
- package/datatable/HeaderCell.vue +10 -7
- package/datatable/TableBody.vue +74 -414
- package/datatable/TableFooter.vue +19 -26
- package/datatable/TableHeader.vue +19 -26
- package/datatable/datatable.cjs.js +895 -634
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +896 -635
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +895 -634
- package/datatable/datatable.min.js +1 -1
- package/datatable/style/datatablestyle.cjs.js +5 -4
- package/datatable/style/datatablestyle.cjs.min.js +1 -1
- package/datatable/style/datatablestyle.esm.js +5 -4
- package/datatable/style/datatablestyle.esm.min.js +1 -1
- package/datatable/style/datatablestyle.js +5 -4
- 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/dock/DockSub.vue +1 -0
- package/dock/dock.cjs.js +1 -0
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +1 -0
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +1 -0
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +1 -1
- package/dropdown/Dropdown.vue +26 -0
- package/dropdown/dropdown.cjs.js +50 -26
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +50 -26
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +50 -26
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/Fieldset.vue +1 -1
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +1 -1
- package/fieldset/fieldset.min.js +1 -1
- package/galleria/GalleriaItem.vue +1 -0
- package/galleria/GalleriaThumbnails.vue +1 -1
- package/galleria/galleria.cjs.js +2 -1
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +2 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +2 -1
- package/galleria/galleria.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +2 -2
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +2 -2
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +2 -2
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowdown/index.vue +1 -1
- package/icons/arrowup/index.cjs.js +2 -2
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +2 -2
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +2 -2
- package/icons/arrowup/index.min.js +1 -1
- package/icons/arrowup/index.vue +1 -1
- package/icons/ban/index.cjs.js +2 -2
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +2 -2
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +2 -2
- package/icons/ban/index.min.js +1 -1
- package/icons/ban/index.vue +1 -1
- package/icons/exclamationtriangle/index.cjs.js +2 -2
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +2 -2
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +2 -2
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/exclamationtriangle/index.vue +1 -1
- package/icons/eyeslash/index.cjs.js +2 -2
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +2 -2
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +2 -2
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/eyeslash/index.vue +1 -1
- package/icons/filter/index.cjs.js +2 -2
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +2 -2
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +2 -2
- package/icons/filter/index.min.js +1 -1
- package/icons/filter/index.vue +1 -1
- package/icons/filterslash/index.cjs.js +2 -2
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +2 -2
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +2 -2
- package/icons/filterslash/index.min.js +1 -1
- package/icons/filterslash/index.vue +1 -1
- package/icons/infocircle/index.cjs.js +2 -2
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +2 -2
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +2 -2
- package/icons/infocircle/index.min.js +1 -1
- package/icons/infocircle/index.vue +1 -1
- package/icons/pencil/index.cjs.js +2 -2
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +2 -2
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +2 -2
- package/icons/pencil/index.min.js +1 -1
- package/icons/pencil/index.vue +1 -1
- package/icons/plus/index.cjs.js +2 -2
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +2 -2
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +2 -2
- package/icons/plus/index.min.js +1 -1
- package/icons/plus/index.vue +1 -1
- package/icons/refresh/index.cjs.js +2 -2
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +2 -2
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +2 -2
- package/icons/refresh/index.min.js +1 -1
- package/icons/refresh/index.vue +1 -1
- package/icons/search/index.cjs.js +2 -2
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +2 -2
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +2 -2
- package/icons/search/index.min.js +1 -1
- package/icons/search/index.vue +1 -1
- package/icons/searchminus/index.cjs.js +2 -2
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +2 -2
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +2 -2
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchminus/index.vue +1 -1
- package/icons/searchplus/index.cjs.js +2 -2
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +2 -2
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +2 -2
- package/icons/searchplus/index.min.js +1 -1
- package/icons/searchplus/index.vue +1 -1
- package/icons/sortalt/index.cjs.js +2 -2
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +2 -2
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +2 -2
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortalt/index.vue +1 -1
- package/icons/sortamountdown/index.cjs.js +12 -9
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +13 -10
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +12 -9
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountdown/index.vue +2 -22
- package/icons/sortamountupalt/index.cjs.js +12 -9
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +13 -10
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +12 -9
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/sortamountupalt/index.vue +2 -22
- package/icons/spinner/index.cjs.js +2 -2
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +2 -2
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +2 -2
- package/icons/spinner/index.min.js +1 -1
- package/icons/spinner/index.vue +1 -1
- package/icons/star/index.cjs.js +2 -2
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +2 -2
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +2 -2
- package/icons/star/index.min.js +1 -1
- package/icons/star/index.vue +1 -1
- package/icons/starfill/index.cjs.js +2 -2
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +2 -2
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +2 -2
- package/icons/starfill/index.min.js +1 -1
- package/icons/starfill/index.vue +1 -1
- package/icons/thlarge/index.cjs.js +2 -2
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +2 -2
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +2 -2
- package/icons/thlarge/index.min.js +1 -1
- package/icons/thlarge/index.vue +1 -1
- package/icons/timescircle/index.cjs.js +2 -2
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +2 -2
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +2 -2
- package/icons/timescircle/index.min.js +1 -1
- package/icons/timescircle/index.vue +1 -1
- package/icons/trash/index.cjs.js +2 -2
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +2 -2
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +2 -2
- package/icons/trash/index.min.js +1 -1
- package/icons/trash/index.vue +1 -1
- package/icons/undo/index.cjs.js +2 -2
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +2 -2
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +2 -2
- package/icons/undo/index.min.js +1 -1
- package/icons/undo/index.vue +1 -1
- package/icons/upload/index.cjs.js +2 -2
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +2 -2
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +2 -2
- package/icons/upload/index.min.js +1 -1
- package/icons/upload/index.vue +1 -1
- package/icons/windowmaximize/index.cjs.js +2 -2
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +2 -2
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +2 -2
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowmaximize/index.vue +1 -1
- package/icons/windowminimize/index.cjs.js +2 -2
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +2 -2
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +2 -2
- package/icons/windowminimize/index.min.js +1 -1
- package/icons/windowminimize/index.vue +1 -1
- package/image/Image.vue +2 -6
- package/image/image.cjs.js +2 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +2 -5
- package/image/image.esm.min.js +1 -1
- package/image/image.js +2 -5
- package/image/image.min.js +1 -1
- package/image/style/imagestyle.cjs.js +1 -1
- package/image/style/imagestyle.cjs.min.js +1 -1
- package/image/style/imagestyle.esm.js +1 -1
- package/image/style/imagestyle.esm.min.js +1 -1
- package/image/style/imagestyle.js +1 -1
- package/image/style/imagestyle.min.js +1 -1
- package/inputnumber/BaseInputNumber.vue +7 -0
- package/inputnumber/InputNumber.d.ts +7 -0
- package/inputnumber/InputNumber.vue +8 -3
- package/inputnumber/inputnumber.cjs.js +16 -3
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +16 -3
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +16 -3
- package/inputnumber/inputnumber.min.js +1 -1
- package/knob/Knob.vue +1 -1
- package/knob/knob.cjs.js +1 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +1 -1
- package/knob/knob.min.js +1 -1
- package/listbox/BaseListbox.vue +1 -1
- package/listbox/Listbox.d.ts +1 -1
- package/listbox/Listbox.vue +2 -0
- package/listbox/listbox.cjs.js +3 -1
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +3 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +3 -1
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.vue +2 -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.vue +1 -0
- package/menu/menu.cjs.js +2 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +2 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +2 -1
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +4 -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/menuitem/MenuItem.d.ts +0 -6
- package/message/style/messagestyle.cjs.js +1 -1
- package/message/style/messagestyle.cjs.min.js +1 -1
- package/message/style/messagestyle.esm.js +1 -1
- package/message/style/messagestyle.esm.min.js +1 -1
- package/message/style/messagestyle.js +1 -1
- package/message/style/messagestyle.min.js +1 -1
- package/multiselect/BaseMultiSelect.vue +1 -1
- package/multiselect/MultiSelect.vue +2 -0
- package/multiselect/multiselect.cjs.js +3 -1
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +3 -1
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +3 -1
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/BaseOrderList.vue +1 -1
- package/orderlist/OrderList.d.ts +1 -1
- package/orderlist/OrderList.vue +1 -0
- package/orderlist/orderlist.cjs.js +2 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +2 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +2 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChartNode.vue +1 -1
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/BaseOverlayPanel.vue +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -1
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/Paginator.vue +4 -4
- package/paginator/paginator.cjs.js +2 -2
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +2 -2
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -2
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +1 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +1 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +1 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.vue +1 -0
- package/panelmenu/PanelMenuList.vue +1 -0
- package/panelmenu/panelmenu.cjs.js +2 -0
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +2 -0
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +2 -0
- 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 +1 -1
- package/picklist/PickList.d.ts +1 -1
- package/picklist/PickList.vue +2 -1
- package/picklist/picklist.cjs.js +3 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +3 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +3 -2
- package/picklist/picklist.min.js +1 -1
- package/picklist/style/pickliststyle.cjs.js +1 -1
- package/picklist/style/pickliststyle.cjs.min.js +1 -1
- package/picklist/style/pickliststyle.esm.js +1 -1
- package/picklist/style/pickliststyle.esm.min.js +1 -1
- package/picklist/style/pickliststyle.js +1 -1
- package/picklist/style/pickliststyle.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/resources/themes/arya-blue/theme.css +4 -4
- package/resources/themes/arya-green/theme.css +4 -4
- package/resources/themes/arya-orange/theme.css +4 -4
- package/resources/themes/arya-purple/theme.css +4 -4
- package/resources/themes/bootstrap4-dark-blue/theme.css +4 -4
- package/resources/themes/bootstrap4-dark-purple/theme.css +4 -4
- package/resources/themes/bootstrap4-light-blue/theme.css +4 -4
- package/resources/themes/bootstrap4-light-purple/theme.css +4 -4
- package/resources/themes/fluent-light/theme.css +4 -4
- package/resources/themes/lara-dark-amber/theme.css +4 -4
- package/resources/themes/lara-dark-blue/theme.css +4 -4
- package/resources/themes/lara-dark-cyan/theme.css +4 -4
- package/resources/themes/lara-dark-green/theme.css +4 -4
- package/resources/themes/lara-dark-indigo/theme.css +4 -4
- package/resources/themes/lara-dark-pink/theme.css +4 -4
- package/resources/themes/lara-dark-purple/theme.css +4 -4
- package/resources/themes/lara-dark-teal/theme.css +4 -4
- package/resources/themes/lara-light-amber/theme.css +4 -4
- package/resources/themes/lara-light-blue/theme.css +4 -4
- package/resources/themes/lara-light-cyan/theme.css +4 -4
- package/resources/themes/lara-light-green/theme.css +4 -4
- package/resources/themes/lara-light-indigo/theme.css +4 -4
- package/resources/themes/lara-light-pink/theme.css +4 -4
- package/resources/themes/lara-light-purple/theme.css +4 -4
- package/resources/themes/lara-light-teal/theme.css +44 -44
- package/resources/themes/luna-amber/theme.css +4 -4
- package/resources/themes/luna-blue/theme.css +4 -4
- package/resources/themes/luna-green/theme.css +4 -4
- package/resources/themes/luna-pink/theme.css +4 -4
- package/resources/themes/md-dark-deeppurple/theme.css +4 -4
- package/resources/themes/md-dark-indigo/theme.css +4 -4
- package/resources/themes/md-light-deeppurple/theme.css +4 -4
- package/resources/themes/md-light-indigo/theme.css +4 -4
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-dark-indigo/theme.css +4 -4
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-light-indigo/theme.css +4 -4
- package/resources/themes/mira/theme.css +4 -4
- package/resources/themes/nano/theme.css +4 -4
- package/resources/themes/nova/theme.css +4 -4
- package/resources/themes/nova-accent/theme.css +4 -4
- package/resources/themes/nova-alt/theme.css +4 -4
- package/resources/themes/nova-vue/theme.css +4 -4
- package/resources/themes/rhea/theme.css +4 -4
- package/resources/themes/saga-blue/theme.css +4 -4
- package/resources/themes/saga-green/theme.css +4 -4
- package/resources/themes/saga-orange/theme.css +4 -4
- package/resources/themes/saga-purple/theme.css +4 -4
- package/resources/themes/soho-dark/theme.css +4 -4
- package/resources/themes/soho-light/theme.css +4 -4
- package/resources/themes/tailwind-light/theme.css +4 -4
- package/resources/themes/vela-blue/theme.css +4 -4
- package/resources/themes/vela-green/theme.css +4 -4
- package/resources/themes/vela-orange/theme.css +4 -4
- package/resources/themes/vela-purple/theme.css +4 -4
- package/resources/themes/viva-dark/theme.css +4 -4
- package/resources/themes/viva-light/theme.css +4 -4
- package/ripple/style/ripplestyle.cjs.js +1 -1
- package/ripple/style/ripplestyle.cjs.min.js +1 -1
- package/ripple/style/ripplestyle.esm.js +1 -1
- package/ripple/style/ripplestyle.esm.min.js +1 -1
- package/ripple/style/ripplestyle.js +1 -1
- package/ripple/style/ripplestyle.min.js +1 -1
- package/row/Row.vue +7 -0
- package/row/row.cjs.js +9 -0
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +9 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +9 -0
- package/row/row.min.js +1 -1
- 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 +26 -19
- package/slider/slider.cjs.js +19 -11
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +19 -11
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +19 -11
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.vue +1 -0
- package/speeddial/speeddial.cjs.js +1 -0
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -0
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -0
- 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/steps/Steps.vue +3 -1
- package/steps/steps.cjs.js +4 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +4 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +4 -2
- package/steps/steps.min.js +1 -1
- package/tabmenu/TabMenu.vue +1 -0
- package/tabmenu/tabmenu.cjs.js +1 -0
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -0
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +1 -0
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/TabView.vue +1 -0
- package/tabview/tabview.cjs.js +1 -0
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +1 -0
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +1 -0
- package/tabview/tabview.min.js +1 -1
- package/terminal/Terminal.vue +1 -1
- package/terminal/terminal.cjs.js +1 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/BaseTieredMenu.vue +1 -1
- package/tieredmenu/TieredMenu.d.ts +4 -0
- package/tieredmenu/TieredMenu.vue +1 -0
- package/tieredmenu/TieredMenuSub.vue +5 -1
- package/tieredmenu/tieredmenu.cjs.js +11 -4
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +11 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +11 -4
- package/tieredmenu/tieredmenu.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 +1 -1
- package/tree/Tree.d.ts +1 -1
- package/tree/Tree.vue +1 -1
- package/tree/TreeNode.vue +1 -0
- package/tree/tree.cjs.js +3 -2
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +3 -2
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +3 -2
- package/tree/tree.min.js +1 -1
- package/treeselect/BaseTreeSelect.vue +2 -2
- package/treeselect/TreeSelect.d.ts +1 -1
- package/treeselect/TreeSelect.vue +1 -4
- package/treeselect/treeselect.cjs.js +3 -6
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +3 -6
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +3 -6
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BaseTreeTable.vue +5 -1
- package/treetable/HeaderCell.vue +1 -1
- package/treetable/TreeTable.d.ts +6 -1
- package/treetable/TreeTable.vue +32 -24
- package/treetable/TreeTableRow.vue +32 -20
- package/treetable/style/treetablestyle.cjs.js +1 -1
- package/treetable/style/treetablestyle.cjs.min.js +1 -1
- package/treetable/style/treetablestyle.esm.js +1 -1
- package/treetable/style/treetablestyle.esm.min.js +1 -1
- package/treetable/style/treetablestyle.js +1 -1
- package/treetable/style/treetablestyle.min.js +1 -1
- package/treetable/treetable.cjs.js +70 -43
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +71 -44
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +70 -43
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.vue +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +1 -1
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/Utils.d.ts +9 -0
- package/utils/utils.cjs.js +142 -41
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +142 -42
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +142 -41
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +4 -0
- package/vetur-tags.json +1 -0
- package/virtualscroller/VirtualScroller.vue +19 -15
- package/virtualscroller/style/virtualscrollerstyle.cjs.js +1 -1
- package/virtualscroller/style/virtualscrollerstyle.cjs.min.js +1 -1
- package/virtualscroller/style/virtualscrollerstyle.esm.js +1 -1
- package/virtualscroller/style/virtualscrollerstyle.esm.min.js +1 -1
- package/virtualscroller/style/virtualscrollerstyle.js +1 -1
- package/virtualscroller/style/virtualscrollerstyle.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +19 -15
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +19 -15
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +19 -15
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +11 -1
|
@@ -56,7 +56,7 @@ this.primevue.cascadeselect = (function (AngleRightIcon, ChevronDownIcon, Spinne
|
|
|
56
56
|
"default": null
|
|
57
57
|
},
|
|
58
58
|
appendTo: {
|
|
59
|
-
type: String,
|
|
59
|
+
type: [String, Object],
|
|
60
60
|
"default": 'body'
|
|
61
61
|
},
|
|
62
62
|
loading: {
|
|
@@ -179,6 +179,19 @@ this.primevue.cascadeselect = (function (AngleRightIcon, ChevronDownIcon, Spinne
|
|
|
179
179
|
getOptionValue: function getOptionValue(processedOption) {
|
|
180
180
|
return this.optionValue ? utils.ObjectUtils.resolveFieldData(processedOption.option, this.optionValue) : processedOption.option;
|
|
181
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
|
+
},
|
|
182
195
|
isOptionDisabled: function isOptionDisabled(processedOption) {
|
|
183
196
|
return this.optionDisabled ? utils.ObjectUtils.resolveFieldData(processedOption.option, this.optionDisabled) : false;
|
|
184
197
|
},
|
|
@@ -250,7 +263,7 @@ this.primevue.cascadeselect = (function (AngleRightIcon, ChevronDownIcon, Spinne
|
|
|
250
263
|
"aria-level": $props.level + 1,
|
|
251
264
|
"aria-setsize": $props.options.length,
|
|
252
265
|
"aria-posinset": index + 1
|
|
253
|
-
},
|
|
266
|
+
}, $options.getPTOptions(processedOption, index, 'item'), {
|
|
254
267
|
"data-p-item-group": $options.isOptionGroup(processedOption),
|
|
255
268
|
"data-p-highlight": $options.isOptionActive(processedOption),
|
|
256
269
|
"data-p-focus": $options.isOptionFocused(processedOption),
|
|
@@ -260,13 +273,13 @@ this.primevue.cascadeselect = (function (AngleRightIcon, ChevronDownIcon, Spinne
|
|
|
260
273
|
onClick: function onClick($event) {
|
|
261
274
|
return $options.onOptionClick($event, processedOption);
|
|
262
275
|
}
|
|
263
|
-
},
|
|
276
|
+
}, $options.getPTOptions(processedOption, index, 'content')), [$props.templates['option'] ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['option']), {
|
|
264
277
|
key: 0,
|
|
265
278
|
option: processedOption.option
|
|
266
279
|
}, null, 8, ["option"])) : (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
267
280
|
key: 1,
|
|
268
281
|
"class": _ctx.cx('text')
|
|
269
|
-
},
|
|
282
|
+
}, $options.getPTOptions(processedOption, index, 'text')), vue.toDisplayString($options.getOptionLabelToRender(processedOption)), 17)), $options.isOptionGroup(processedOption) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
270
283
|
key: 2
|
|
271
284
|
}, [$props.templates['optiongroupicon'] ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['optiongroupicon']), {
|
|
272
285
|
key: 0,
|
|
@@ -275,11 +288,11 @@ this.primevue.cascadeselect = (function (AngleRightIcon, ChevronDownIcon, Spinne
|
|
|
275
288
|
key: 1,
|
|
276
289
|
"class": [_ctx.cx('groupIcon'), $props.optionGroupIcon],
|
|
277
290
|
"aria-hidden": "true"
|
|
278
|
-
},
|
|
291
|
+
}, $options.getPTOptions(processedOption, index, 'groupIcon')), null, 16)) : (vue.openBlock(), vue.createBlock(_component_AngleRightIcon, vue.mergeProps({
|
|
279
292
|
key: 2,
|
|
280
293
|
"class": _ctx.cx('groupIcon'),
|
|
281
294
|
"aria-hidden": "true"
|
|
282
|
-
},
|
|
295
|
+
}, $options.getPTOptions(processedOption, index, 'groupIcon')), null, 16, ["class"]))], 64)) : vue.createCommentVNode("", true)], 16, _hoisted_2)), [[_directive_ripple]]), $options.isOptionGroup(processedOption) && $options.isOptionActive(processedOption) ? (vue.openBlock(), vue.createBlock(_component_CascadeSelectSub, {
|
|
283
296
|
key: 0,
|
|
284
297
|
role: "group",
|
|
285
298
|
"class": vue.normalizeClass(_ctx.cx('sublist')),
|
|
@@ -464,6 +477,7 @@ this.primevue.cascadeselect = (function (AngleRightIcon, ChevronDownIcon, Spinne
|
|
|
464
477
|
this.onSpaceKey(event);
|
|
465
478
|
break;
|
|
466
479
|
case 'Enter':
|
|
480
|
+
case 'NumpadEnter':
|
|
467
481
|
this.onEnterKey(event);
|
|
468
482
|
break;
|
|
469
483
|
case 'Escape':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.cascadeselect=function(e,t,i,n,o,s,r,l,a,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=p(e),d=p(t),h=p(i),f=p(n),O=p(o),v=p(r),y={name:"BaseCascadeSelect",extends:v.default,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:p(l).default,provide:function(){return{$parentInstance:this}}},b={name:"CascadeSelectSub",hostName:"CascadeSelect",extends:v.default,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.DomHandler.nestedPosition(this.container,this.level)}}},mounted:function(){(this.isParentMount||0===this.level)&&s.DomHandler.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?s.ObjectUtils.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled:function(e){return!!this.optionDisabled&&s.ObjectUtils.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:function(e){return e.children},isOptionGroup:function(e){return s.ObjectUtils.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:p(a).default},components:{AngleRightIcon:u.default}},m=["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"],g=["onClick"];b.render=function(e,t,i,n,o,s){var r=c.resolveComponent("AngleRightIcon"),l=c.resolveComponent("CascadeSelectSub",!0),a=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("ul",c.mergeProps({ref:s.containerRef,class:e.cx("list")},e.ptm(0===i.level?"list":"sublist")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.options,(function(t,n){return c.openBlock(),c.createElementBlock("li",c.mergeProps({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)}),[c.withDirectives((c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("content"),onClick:function(e){return s.onOptionClick(e,t)}},e.ptm("content")),[i.templates.option?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.option),{key:0,option:t.option},null,8,["option"])):(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:e.cx("text")},e.ptm("text")),c.toDisplayString(s.getOptionLabelToRender(t)),17)),s.isOptionGroup(t)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[i.templates.optiongroupicon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.optiongroupicon),{key:0,"aria-hidden":"true"})):i.optionGroupIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:[e.cx("groupIcon"),i.optionGroupIcon],"aria-hidden":"true"},e.ptm("groupIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:2,class:e.cx("groupIcon"),"aria-hidden":"true"},e.ptm("groupIcon")),null,16,["class"]))],64)):c.createCommentVNode("",!0)],16,g)),[[a]]),s.isOptionGroup(t)&&s.isOptionActive(t)?(c.openBlock(),c.createBlock(l,{key:0,role:"group",class:c.normalizeClass(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"])):c.createCommentVNode("",!0)],16,m)})),128))],16)};var I={name:"CascadeSelect",extends:y,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||s.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel:function(e){return this.optionLabel?s.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.resolveFieldData(e,this.optionValue):e},isOptionDisabled:function(e){return!!this.optionDisabled&&s.ObjectUtils.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren:function(e,t){return s.ObjectUtils.isString(this.optionGroupChildren)?s.ObjectUtils.resolveFieldData(e,this.optionGroupChildren):s.ObjectUtils.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 s.ObjectUtils.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&&s.ObjectUtils.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.DomHandler.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.DomHandler.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":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&&s.ObjectUtils.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(!s.ObjectUtils.isEmpty(i)){var r=i.index,l=i.level,a=i.parentKey,c=s.ObjectUtils.isNotEmpty(i.children),p=this.activeOptionPath.filter((function(e){return e.parentKey!==a}));p.push(i),this.focusedOptionInfo={index:r,level:l,parentKey:a},this.activeOptionPath=p,c?this.onOptionGroupSelect(t,i):this.onOptionSelect(t,i,o),n&&s.DomHandler.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.DomHandler.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick:function(e){f.default.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,r=s.ObjectUtils.isEmpty(i.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((function(e){return e.parentKey!==t.focusedOptionInfo.parentKey}))),r||(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){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),s.DomHandler.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){s.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$el)+"px",s.DomHandler.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 s.ConnectedOverlayScrollHandler(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.DomHandler.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 s.ObjectUtils.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 s.ObjectUtils.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?s.ObjectUtils.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(s.ObjectUtils.isEmpty(e))return[];for(var n=0;n<t.length;n++){var o=t[n];if(s.ObjectUtils.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];var r=this.findOptionPathByValue(e,o.children,i+1);if(r)return r.unshift(o),r}},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.DomHandler.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 l=(""!==o?o+"_":"")+r,a={option:e,index:r,level:i,key:l,parent:n,parentKey:o};a.children=t.createProcessedOptions(t.getOptionGroupChildren(e,i),i+1,a,l),s.push(a)})),s},overlayRef:function(e){this.overlay=e}},computed:{hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.modelValue)},label:function(){var e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){var t=this.findOptionPathByValue(this.modelValue),i=s.ObjectUtils.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 s.ObjectUtils.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(s.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:"","_").concat(this.focusedOptionInfo.index):null}},components:{CascadeSelectSub:b,Portal:O.default,ChevronDownIcon:d.default,SpinnerIcon:h.default,AngleRightIcon:u.default}};function x(e){return x="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},x(e)}function L(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 S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){k(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function k(e,t,i){var n;return(t="symbol"==x(n=C(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function C(e,t){if("object"!=x(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"];return I.render=function(e,t,i,n,o,s){var r=c.resolveComponent("SpinnerIcon"),l=c.resolveComponent("CascadeSelectSub"),a=c.resolveComponent("Portal");return c.openBlock(),c.createElementBlock("div",c.mergeProps({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.createElementVNode("div",c.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[c.createElementVNode("input",c.mergeProps({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)})},S(S({},e.inputProps),e.ptm("input"))),null,16,P)],16),c.createElementVNode("span",c.mergeProps({class:e.cx("label")},e.ptm("label")),[c.renderSlot(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[c.createTextVNode(c.toDisplayString(s.label),1)]}))],16),c.createElementVNode("div",c.mergeProps({class:e.cx("dropdownButton"),role:"button",tabindex:"-1","aria-hidden":"true"},e.ptm("dropdownButton")),[e.loading?c.renderSlot(e.$slots,"loadingicon",{key:0,class:c.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):c.renderSlot(e.$slots,"dropdownicon",{key:1,class:c.normalizeClass(e.cx("dropdownIcon"))},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),c.mergeProps({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),c.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.searchResultMessageText),17),c.createVNode(a,{appendTo:e.appendTo},{default:c.withCtx((function(){return[c.createVNode(c.Transition,c.mergeProps({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:c.withCtx((function(){return[o.overlayVisible?(c.openBlock(),c.createElementBlock("div",c.mergeProps({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)})},S(S({},e.panelProps),e.ptm("panel"))),[c.createElementVNode("div",c.mergeProps({class:e.cx("wrapper")},e.ptm("wrapper")),[c.createVNode(l,{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.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.selectedMessageText),17)],16)):c.createCommentVNode("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])],16)},I}(primevue.icons.angleright,primevue.icons.chevrondown,primevue.icons.spinner,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.cascadeselect.style,primevue.ripple,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.cascadeselect=function(e,t,i,n,o,s,r,l,a,c){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=p(e),d=p(t),h=p(i),f=p(n),O=p(o),v=p(r),y={name:"BaseCascadeSelect",extends:v.default,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:!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:p(l).default,provide:function(){return{$parentInstance:this}}},b={name:"CascadeSelectSub",hostName:"CascadeSelect",extends:v.default,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.DomHandler.nestedPosition(this.container,this.level)}}},mounted:function(){(this.isParentMount||0===this.level)&&s.DomHandler.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?s.ObjectUtils.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.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&&s.ObjectUtils.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:function(e){return e.children},isOptionGroup:function(e){return s.ObjectUtils.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:p(a).default},components:{AngleRightIcon:u.default}},m=["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"],g=["onClick"];b.render=function(e,t,i,n,o,s){var r=c.resolveComponent("AngleRightIcon"),l=c.resolveComponent("CascadeSelectSub",!0),a=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("ul",c.mergeProps({ref:s.containerRef,class:e.cx("list")},e.ptm(0===i.level?"list":"sublist")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.options,(function(t,n){return c.openBlock(),c.createElementBlock("li",c.mergeProps({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)}),[c.withDirectives((c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("content"),onClick:function(e){return s.onOptionClick(e,t)}},s.getPTOptions(t,n,"content")),[i.templates.option?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.option),{key:0,option:t.option},null,8,["option"])):(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:e.cx("text")},s.getPTOptions(t,n,"text")),c.toDisplayString(s.getOptionLabelToRender(t)),17)),s.isOptionGroup(t)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[i.templates.optiongroupicon?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.templates.optiongroupicon),{key:0,"aria-hidden":"true"})):i.optionGroupIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:1,class:[e.cx("groupIcon"),i.optionGroupIcon],"aria-hidden":"true"},s.getPTOptions(t,n,"groupIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:2,class:e.cx("groupIcon"),"aria-hidden":"true"},s.getPTOptions(t,n,"groupIcon")),null,16,["class"]))],64)):c.createCommentVNode("",!0)],16,g)),[[a]]),s.isOptionGroup(t)&&s.isOptionActive(t)?(c.openBlock(),c.createBlock(l,{key:0,role:"group",class:c.normalizeClass(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"])):c.createCommentVNode("",!0)],16,m)})),128))],16)};var I={name:"CascadeSelect",extends:y,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||s.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(s.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel:function(e){return this.optionLabel?s.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?s.ObjectUtils.resolveFieldData(e,this.optionValue):e},isOptionDisabled:function(e){return!!this.optionDisabled&&s.ObjectUtils.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel:function(e){return this.optionGroupLabel?s.ObjectUtils.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren:function(e,t){return s.ObjectUtils.isString(this.optionGroupChildren)?s.ObjectUtils.resolveFieldData(e,this.optionGroupChildren):s.ObjectUtils.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 s.ObjectUtils.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&&s.ObjectUtils.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.DomHandler.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.DomHandler.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&&s.ObjectUtils.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(!s.ObjectUtils.isEmpty(i)){var r=i.index,l=i.level,a=i.parentKey,c=s.ObjectUtils.isNotEmpty(i.children),p=this.activeOptionPath.filter((function(e){return e.parentKey!==a}));p.push(i),this.focusedOptionInfo={index:r,level:l,parentKey:a},this.activeOptionPath=p,c?this.onOptionGroupSelect(t,i):this.onOptionSelect(t,i,o),n&&s.DomHandler.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.DomHandler.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick:function(e){f.default.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,r=s.ObjectUtils.isEmpty(i.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((function(e){return e.parentKey!==t.focusedOptionInfo.parentKey}))),r||(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){s.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),s.DomHandler.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){s.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?s.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=s.DomHandler.getOuterWidth(this.$el)+"px",s.DomHandler.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 s.ConnectedOverlayScrollHandler(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.DomHandler.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 s.ObjectUtils.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 s.ObjectUtils.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?s.ObjectUtils.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(s.ObjectUtils.isEmpty(e))return[];for(var n=0;n<t.length;n++){var o=t[n];if(s.ObjectUtils.equals(e,this.getOptionValue(o.option),this.equalityKey))return[o];var r=this.findOptionPathByValue(e,o.children,i+1);if(r)return r.unshift(o),r}},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.DomHandler.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 l=(""!==o?o+"_":"")+r,a={option:e,index:r,level:i,key:l,parent:n,parentKey:o};a.children=t.createProcessedOptions(t.getOptionGroupChildren(e,i),i+1,a,l),s.push(a)})),s},overlayRef:function(e){this.overlay=e}},computed:{hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.modelValue)},label:function(){var e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){var t=this.findOptionPathByValue(this.modelValue),i=s.ObjectUtils.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 s.ObjectUtils.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(s.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:"","_").concat(this.focusedOptionInfo.index):null}},components:{CascadeSelectSub:b,Portal:O.default,ChevronDownIcon:d.default,SpinnerIcon:h.default,AngleRightIcon:u.default}};function x(e){return x="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},x(e)}function L(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 S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){k(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function k(e,t,i){var n;return(t="symbol"==x(n=P(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function P(e,t){if("object"!=x(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var C=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"];return I.render=function(e,t,i,n,o,s){var r=c.resolveComponent("SpinnerIcon"),l=c.resolveComponent("CascadeSelectSub"),a=c.resolveComponent("Portal");return c.openBlock(),c.createElementBlock("div",c.mergeProps({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.createElementVNode("div",c.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[c.createElementVNode("input",c.mergeProps({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)})},S(S({},e.inputProps),e.ptm("input"))),null,16,C)],16),c.createElementVNode("span",c.mergeProps({class:e.cx("label")},e.ptm("label")),[c.renderSlot(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[c.createTextVNode(c.toDisplayString(s.label),1)]}))],16),c.createElementVNode("div",c.mergeProps({class:e.cx("dropdownButton"),role:"button",tabindex:"-1","aria-hidden":"true"},e.ptm("dropdownButton")),[e.loading?c.renderSlot(e.$slots,"loadingicon",{key:0,class:c.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(c.openBlock(),c.createElementBlock("span",c.mergeProps({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(c.openBlock(),c.createBlock(r,c.mergeProps({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):c.renderSlot(e.$slots,"dropdownicon",{key:1,class:c.normalizeClass(e.cx("dropdownIcon"))},(function(){return[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),c.mergeProps({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),c.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.searchResultMessageText),17),c.createVNode(a,{appendTo:e.appendTo},{default:c.withCtx((function(){return[c.createVNode(c.Transition,c.mergeProps({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:c.withCtx((function(){return[o.overlayVisible?(c.openBlock(),c.createElementBlock("div",c.mergeProps({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)})},S(S({},e.panelProps),e.ptm("panel"))),[c.createElementVNode("div",c.mergeProps({class:e.cx("wrapper")},e.ptm("wrapper")),[c.createVNode(l,{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.createElementVNode("span",c.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),c.toDisplayString(s.selectedMessageText),17)],16)):c.createCommentVNode("",!0)]})),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:1},8,["appendTo"])],16)},I}(primevue.icons.angleright,primevue.icons.chevrondown,primevue.icons.spinner,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.cascadeselect.style,primevue.ripple,Vue);
|
|
@@ -6,7 +6,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
6
6
|
|
|
7
7
|
var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);
|
|
8
8
|
|
|
9
|
-
var css = "\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible
|
|
9
|
+
var css = "\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible;\n }\n\n .p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n }\n\n .p-cascadeselect-enter-from,\n .p-cascadeselect-leave-active {\n opacity: 0;\n }\n\n .p-cascadeselect-enter-active {\n transition: opacity 150ms;\n }\n}\n";
|
|
10
10
|
var inlineStyles = {
|
|
11
11
|
root: function root(_ref) {
|
|
12
12
|
var props = _ref.props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=e(require("primevue/base/style")).default.extend({name:"cascadeselect",css:"\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=e(require("primevue/base/style")).default.extend({name:"cascadeselect",css:"\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible;\n }\n\n .p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n }\n\n .p-cascadeselect-enter-from,\n .p-cascadeselect-leave-active {\n opacity: 0;\n }\n\n .p-cascadeselect-enter-active {\n transition: opacity 150ms;\n }\n}\n",classes:{root:function(e){var n=e.instance,t=e.props;return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue,"p-inputwrapper-focus":n.focused||n.overlayVisible,"p-overlay-open":n.overlayVisible}]},label:function(e){var n=e.instance;return["p-cascadeselect-label p-inputtext",{"p-placeholder":n.label===e.props.placeholder,"p-cascadeselect-label-empty":!n.$slots.value&&("p-emptylabel"===n.label||0===n.label.length)}]},dropdownButton:"p-cascadeselect-trigger",loadingIcon:"p-cascadeselect-trigger-icon",dropdownIcon:"p-cascadeselect-trigger-icon",panel:function(e){var n=e.instance;return["p-cascadeselect-panel p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple}]},wrapper:"p-cascadeselect-items-wrapper",list:"p-cascadeselect-panel p-cascadeselect-items",item:function(e){var n=e.instance,t=e.processedOption;return["p-cascadeselect-item",{"p-cascadeselect-item-group":n.isOptionGroup(t),"p-cascadeselect-item-active p-highlight":n.isOptionActive(t),"p-focus":n.isOptionFocused(t),"p-disabled":n.isOptionDisabled(t)}]},content:"p-cascadeselect-item-content",text:"p-cascadeselect-item-text",groupIcon:"p-cascadeselect-group-icon",sublist:"p-cascadeselect-sublist"},inlineStyles:{root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}}});module.exports=n;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BaseStyle from 'primevue/base/style';
|
|
2
2
|
|
|
3
|
-
var css = "\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible
|
|
3
|
+
var css = "\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible;\n }\n\n .p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n }\n\n .p-cascadeselect-enter-from,\n .p-cascadeselect-leave-active {\n opacity: 0;\n }\n\n .p-cascadeselect-enter-active {\n transition: opacity 150ms;\n }\n}\n";
|
|
4
4
|
var inlineStyles = {
|
|
5
5
|
root: function root(_ref) {
|
|
6
6
|
var props = _ref.props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/base/style";var n=e.extend({name:"cascadeselect",css:"\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible
|
|
1
|
+
import e from"primevue/base/style";var n=e.extend({name:"cascadeselect",css:"\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible;\n }\n\n .p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n }\n\n .p-cascadeselect-enter-from,\n .p-cascadeselect-leave-active {\n opacity: 0;\n }\n\n .p-cascadeselect-enter-active {\n transition: opacity 150ms;\n }\n}\n",classes:{root:function(e){var n=e.instance,c=e.props;return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":c.disabled,"p-focus":n.focused,"p-inputwrapper-filled":c.modelValue,"p-inputwrapper-focus":n.focused||n.overlayVisible,"p-overlay-open":n.overlayVisible}]},label:function(e){var n=e.instance;return["p-cascadeselect-label p-inputtext",{"p-placeholder":n.label===e.props.placeholder,"p-cascadeselect-label-empty":!n.$slots.value&&("p-emptylabel"===n.label||0===n.label.length)}]},dropdownButton:"p-cascadeselect-trigger",loadingIcon:"p-cascadeselect-trigger-icon",dropdownIcon:"p-cascadeselect-trigger-icon",panel:function(e){var n=e.instance;return["p-cascadeselect-panel p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple}]},wrapper:"p-cascadeselect-items-wrapper",list:"p-cascadeselect-panel p-cascadeselect-items",item:function(e){var n=e.instance,c=e.processedOption;return["p-cascadeselect-item",{"p-cascadeselect-item-group":n.isOptionGroup(c),"p-cascadeselect-item-active p-highlight":n.isOptionActive(c),"p-focus":n.isOptionFocused(c),"p-disabled":n.isOptionDisabled(c)}]},content:"p-cascadeselect-item-content",text:"p-cascadeselect-item-text",groupIcon:"p-cascadeselect-group-icon",sublist:"p-cascadeselect-sublist"},inlineStyles:{root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}}});export{n as default};
|
|
@@ -7,7 +7,7 @@ this.primevue.cascadeselect.style = (function (BaseStyle) {
|
|
|
7
7
|
|
|
8
8
|
var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);
|
|
9
9
|
|
|
10
|
-
var css = "\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible
|
|
10
|
+
var css = "\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible;\n }\n\n .p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n }\n\n .p-cascadeselect-enter-from,\n .p-cascadeselect-leave-active {\n opacity: 0;\n }\n\n .p-cascadeselect-enter-active {\n transition: opacity 150ms;\n }\n}\n";
|
|
11
11
|
var inlineStyles = {
|
|
12
12
|
root: function root(_ref) {
|
|
13
13
|
var props = _ref.props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.cascadeselect=this.primevue.cascadeselect||{},this.primevue.cascadeselect.style=function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}return n(primevue.base.style).default.extend({name:"cascadeselect",css:"\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.cascadeselect=this.primevue.cascadeselect||{},this.primevue.cascadeselect.style=function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}return n(primevue.base.style).default.extend({name:"cascadeselect",css:"\n@layer primevue {\n .p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n }\n\n .p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n .p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n\n .p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n\n .p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n }\n\n .p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n }\n\n .p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-cascadeselect-group-icon {\n margin-left: auto;\n }\n\n .p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n }\n\n .p-fluid .p-cascadeselect {\n display: flex;\n }\n\n .p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n }\n\n .p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n }\n\n .p-cascadeselect-item-active {\n overflow: visible;\n }\n\n .p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n }\n\n .p-cascadeselect-enter-from,\n .p-cascadeselect-leave-active {\n opacity: 0;\n }\n\n .p-cascadeselect-enter-active {\n transition: opacity 150ms;\n }\n}\n",classes:{root:function(e){var n=e.instance,t=e.props;return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue,"p-inputwrapper-focus":n.focused||n.overlayVisible,"p-overlay-open":n.overlayVisible}]},label:function(e){var n=e.instance;return["p-cascadeselect-label p-inputtext",{"p-placeholder":n.label===e.props.placeholder,"p-cascadeselect-label-empty":!n.$slots.value&&("p-emptylabel"===n.label||0===n.label.length)}]},dropdownButton:"p-cascadeselect-trigger",loadingIcon:"p-cascadeselect-trigger-icon",dropdownIcon:"p-cascadeselect-trigger-icon",panel:function(e){var n=e.instance;return["p-cascadeselect-panel p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple}]},wrapper:"p-cascadeselect-items-wrapper",list:"p-cascadeselect-panel p-cascadeselect-items",item:function(e){var n=e.instance,t=e.processedOption;return["p-cascadeselect-item",{"p-cascadeselect-item-group":n.isOptionGroup(t),"p-cascadeselect-item-active p-highlight":n.isOptionActive(t),"p-focus":n.isOptionFocused(t),"p-disabled":n.isOptionDisabled(t)}]},content:"p-cascadeselect-item-content",text:"p-cascadeselect-item-text",groupIcon:"p-cascadeselect-group-icon",sublist:"p-cascadeselect-sublist"},inlineStyles:{root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}}})}();
|
package/chips/Chips.vue
CHANGED
package/chips/chips.cjs.js
CHANGED
package/chips/chips.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/icons/timescircle"),t=require("primevue/utils"),n=require("primevue/basecomponent"),o=require("primevue/chips/style"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function l(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(l(o),l(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?l(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=l(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:a.default}};function m(e){return m="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},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){var o;return(t="symbol"==m(o=v(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["aria-labelledby","aria-label","aria-activedescendant"],I=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],x=["id","disabled","placeholder"];f.render=function(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?a.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return a.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return a.onContainerFocus&&a.onContainerFocus.apply(a,arguments)}),onBlur:t[7]||(t[7]=function(){return a.onContainerBlur&&a.onContainerBlur.apply(a,arguments)}),onKeydown:t[8]||(t[8]=function(){return a.onContainerKeyDown&&a.onContainerKeyDown.apply(a,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return a.removeItem(e,n)},removeCallback:function(e){return a.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return a.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,I)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||a.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return a.onBlur(e)}),onInput:t[2]||(t[2]=function(){return a.onInput&&a.onInput.apply(a,arguments)}),onKeydown:t[3]||(t[3]=function(e){return a.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return a.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,x)],16)],16,g)],16)},module.exports=f;
|
|
1
|
+
"use strict";var e=require("primevue/icons/timescircle"),t=require("primevue/utils"),n=require("primevue/basecomponent"),o=require("primevue/chips/style"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function l(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":case"NumpadEnter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(l(o),l(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?l(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=l(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:a.default}};function m(e){return m="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},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){var o;return(t="symbol"==m(o=v(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["aria-labelledby","aria-label","aria-activedescendant"],I=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],x=["id","disabled","placeholder"];f.render=function(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?a.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return a.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return a.onContainerFocus&&a.onContainerFocus.apply(a,arguments)}),onBlur:t[7]||(t[7]=function(){return a.onContainerBlur&&a.onContainerBlur.apply(a,arguments)}),onKeydown:t[8]||(t[8]=function(){return a.onContainerKeyDown&&a.onContainerKeyDown.apply(a,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return a.removeItem(e,n)},removeCallback:function(e){return a.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return a.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,I)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||a.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return a.onBlur(e)}),onInput:t[2]||(t[2]=function(){return a.onInput&&a.onInput.apply(a,arguments)}),onKeydown:t[3]||(t[3]=function(e){return a.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return a.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,x)],16)],16,g)],16)},module.exports=f;
|
package/chips/chips.esm.js
CHANGED
package/chips/chips.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/icons/timescircle";import{UniqueComponentId as t}from"primevue/utils";import n from"primevue/basecomponent";import o from"primevue/chips/style";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as d,toDisplayString as p,createBlock as f,resolveDynamicComponent as m}from"vue";function h(e){return I(e)||v(e)||b(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e){if(Array.isArray(e))return g(e)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var x={name:"Chips",extends:{name:"BaseChips",extends:n,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:o,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],i=n.split(this.separator);i=i.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(h(o),h(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?h(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=h(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function O(e){return O="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},O(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){var o;return(t="symbol"==O(o=S(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=O(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var C=["aria-labelledby","aria-label","aria-activedescendant"],j=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],B=["id","disabled","placeholder"];x.render=function(e,t,n,o,h,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":h.focused?y.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return y.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:t[7]||(t[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:t[8]||(t[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(t,n){return i(),r("li",a({key:"".concat(n,"_").concat(t),id:h.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":h.focusedIndex===n}),[c(e.$slots,"chip",{class:d(e.cx("label")),value:t},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),p(t),17)]})),c(e.$slots,"removetokenicon",{class:d(e.cx("removeTokenIcon")),index:n,onClick:function(e){return y.removeItem(e,n)},removeCallback:function(e){return y.removeItem(e,n)}},(function(){return[(i(),f(m(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,j)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return y.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return y.onBlur(e)}),onInput:t[2]||(t[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:t[3]||(t[3]=function(e){return y.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return y.onPaste(e)})},k(k({},e.inputProps),e.ptm("input"))),null,16,B)],16)],16,C)],16)};export{x as default};
|
|
1
|
+
import e from"primevue/icons/timescircle";import{UniqueComponentId as t}from"primevue/utils";import n from"primevue/basecomponent";import o from"primevue/chips/style";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as d,toDisplayString as p,createBlock as f,resolveDynamicComponent as m}from"vue";function h(e){return I(e)||v(e)||b(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e){if(Array.isArray(e))return g(e)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var x={name:"Chips",extends:{name:"BaseChips",extends:n,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:o,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":case"NumpadEnter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],i=n.split(this.separator);i=i.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(h(o),h(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?h(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=h(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function O(e){return O="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},O(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){var o;return(t="symbol"==O(o=S(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=O(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var C=["aria-labelledby","aria-label","aria-activedescendant"],j=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],B=["id","disabled","placeholder"];x.render=function(e,t,n,o,h,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":h.focused?y.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return y.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:t[7]||(t[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:t[8]||(t[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(t,n){return i(),r("li",a({key:"".concat(n,"_").concat(t),id:h.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":h.focusedIndex===n}),[c(e.$slots,"chip",{class:d(e.cx("label")),value:t},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),p(t),17)]})),c(e.$slots,"removetokenicon",{class:d(e.cx("removeTokenIcon")),index:n,onClick:function(e){return y.removeItem(e,n)},removeCallback:function(e){return y.removeItem(e,n)}},(function(){return[(i(),f(m(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,j)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return y.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return y.onBlur(e)}),onInput:t[2]||(t[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:t[3]||(t[3]=function(e){return y.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return y.onPaste(e)})},k(k({},e.inputProps),e.ptm("input"))),null,16,B)],16)],16,C)],16)};export{x as default};
|
package/chips/chips.js
CHANGED
|
@@ -127,6 +127,7 @@ this.primevue.chips = (function (TimesCircleIcon, utils, BaseComponent, ChipsSty
|
|
|
127
127
|
}
|
|
128
128
|
break;
|
|
129
129
|
case 'Enter':
|
|
130
|
+
case 'NumpadEnter':
|
|
130
131
|
if (inputValue && inputValue.trim().length && !this.maxedOut) {
|
|
131
132
|
this.addItem(event, inputValue, true);
|
|
132
133
|
}
|
package/chips/chips.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.chips=function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function l(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(l(o),l(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?l(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=l(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:a.default}};function m(e){return m="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},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){var o;return(t="symbol"==m(o=v(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["aria-labelledby","aria-label","aria-activedescendant"],I=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],x=["id","disabled","placeholder"];return f.render=function(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?a.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return a.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return a.onContainerFocus&&a.onContainerFocus.apply(a,arguments)}),onBlur:t[7]||(t[7]=function(){return a.onContainerBlur&&a.onContainerBlur.apply(a,arguments)}),onKeydown:t[8]||(t[8]=function(){return a.onContainerKeyDown&&a.onContainerKeyDown.apply(a,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return a.removeItem(e,n)},removeCallback:function(e){return a.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return a.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,I)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||a.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return a.onBlur(e)}),onInput:t[2]||(t[2]=function(){return a.onInput&&a.onInput.apply(a,arguments)}),onKeydown:t[3]||(t[3]=function(e){return a.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return a.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,x)],16)],16,g)],16)},f}(primevue.icons.timescircle,primevue.utils,primevue.basecomponent,primevue.chips.style,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.chips=function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function l(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":case"NumpadEnter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var o=this.modelValue||[],r=n.split(this.separator);r=r.filter((function(e){return t.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(l(o),l(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?l(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=l(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:a.default}};function m(e){return m="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},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){var o;return(t="symbol"==m(o=v(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["aria-labelledby","aria-label","aria-activedescendant"],I=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],x=["id","disabled","placeholder"];return f.render=function(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?a.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return a.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return a.onContainerFocus&&a.onContainerFocus.apply(a,arguments)}),onBlur:t[7]||(t[7]=function(){return a.onContainerBlur&&a.onContainerBlur.apply(a,arguments)}),onKeydown:t[8]||(t[8]=function(){return a.onContainerKeyDown&&a.onContainerKeyDown.apply(a,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return a.removeItem(e,n)},removeCallback:function(e){return a.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return a.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,I)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||a.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return a.onBlur(e)}),onInput:t[2]||(t[2]=function(){return a.onInput&&a.onInput.apply(a,arguments)}),onKeydown:t[3]||(t[3]=function(e){return a.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return a.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,x)],16)],16,g)],16)},f}(primevue.icons.timescircle,primevue.utils,primevue.basecomponent,primevue.chips.style,Vue);
|
|
@@ -211,7 +211,7 @@ export interface ColorPickerEmits {
|
|
|
211
211
|
*/
|
|
212
212
|
'update:modelValue'(value: any): void;
|
|
213
213
|
/**
|
|
214
|
-
* Callback to invoke when a
|
|
214
|
+
* Callback to invoke when a color is selected.
|
|
215
215
|
* @param {ColorPickerChangeEvent} event - Custom add event.
|
|
216
216
|
*/
|
|
217
217
|
change(event: ColorPickerChangeEvent): void;
|