primevue 3.48.0 → 3.49.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 +2 -1
- package/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +2 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.vue +2 -1
- package/accordiontab/accordiontab.cjs.js +2 -1
- package/accordiontab/accordiontab.cjs.min.js +1 -1
- package/accordiontab/accordiontab.esm.js +2 -1
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +2 -1
- package/accordiontab/accordiontab.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +2 -2
- package/autocomplete/AutoComplete.vue +4 -1
- package/autocomplete/autocomplete.cjs.js +6 -3
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +6 -3
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +6 -3
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.vue +2 -1
- package/avatar/avatar.cjs.js +2 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +37 -5
- package/avatargroup/AvatarGroup.vue +3 -2
- package/avatargroup/avatargroup.cjs.js +3 -2
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -2
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +3 -2
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/Badge.d.ts +2 -2
- package/badge/Badge.vue +3 -2
- package/badge/badge.cjs.js +3 -2
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -2
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +3 -2
- package/badge/badge.min.js +1 -1
- package/basecomponent/BaseComponent.vue +36 -1
- package/basecomponent/basecomponent.cjs.js +58 -1
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +58 -1
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +58 -1
- package/basecomponent/basecomponent.min.js +1 -1
- package/blockui/BlockUI.vue +2 -1
- package/blockui/blockui.cjs.js +2 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +2 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +2 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.vue +4 -3
- package/breadcrumb/breadcrumb.cjs.js +2 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +3 -3
- package/button/Button.vue +5 -2
- package/button/button.cjs.js +5 -3
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -3
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -3
- package/button/button.min.js +1 -1
- package/buttongroup/BaseButtonGroup.vue +15 -0
- package/buttongroup/ButtonGroup.d.ts +113 -0
- package/buttongroup/ButtonGroup.vue +15 -0
- package/buttongroup/buttongroup.cjs.js +38 -0
- package/buttongroup/buttongroup.cjs.min.js +1 -0
- package/buttongroup/buttongroup.esm.js +31 -0
- package/buttongroup/buttongroup.esm.min.js +1 -0
- package/buttongroup/buttongroup.js +38 -0
- package/buttongroup/buttongroup.min.js +1 -0
- package/buttongroup/package.json +9 -0
- package/buttongroup/style/ButtonGroupStyle.d.ts +3 -0
- package/buttongroup/style/buttongroupstyle.cjs.js +17 -0
- package/buttongroup/style/buttongroupstyle.cjs.min.js +1 -0
- package/buttongroup/style/buttongroupstyle.esm.js +11 -0
- package/buttongroup/style/buttongroupstyle.esm.min.js +1 -0
- package/buttongroup/style/buttongroupstyle.js +20 -0
- package/buttongroup/style/buttongroupstyle.min.js +1 -0
- package/buttongroup/style/package.json +6 -0
- package/calendar/Calendar.d.ts +2 -2
- package/calendar/Calendar.vue +9 -3
- package/calendar/calendar.cjs.js +10 -4
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +10 -4
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +10 -4
- package/calendar/calendar.min.js +1 -1
- package/calendar/style/calendarstyle.cjs.js +2 -2
- package/calendar/style/calendarstyle.cjs.min.js +1 -1
- package/calendar/style/calendarstyle.esm.js +2 -2
- package/calendar/style/calendarstyle.esm.min.js +1 -1
- package/calendar/style/calendarstyle.js +2 -2
- package/calendar/style/calendarstyle.min.js +1 -1
- package/card/Card.d.ts +23 -1
- package/card/Card.vue +3 -2
- package/card/card.cjs.js +3 -2
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -2
- package/card/card.esm.min.js +1 -1
- package/card/card.js +3 -2
- package/card/card.min.js +1 -1
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +2 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +2 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +2 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/cascadeselect/CascadeSelect.vue +18 -5
- package/cascadeselect/cascadeselect.cjs.js +32 -12
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +32 -12
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +32 -12
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.vue +2 -1
- package/chart/chart.cjs.js +2 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +2 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +2 -1
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.vue +5 -1
- package/checkbox/checkbox.cjs.js +5 -2
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +5 -2
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +5 -2
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.vue +2 -1
- package/chip/chip.cjs.js +2 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +2 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +2 -1
- package/chip/chip.min.js +1 -1
- package/chips/Chips.vue +3 -1
- package/chips/chips.cjs.js +4 -2
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +4 -2
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +4 -2
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +3 -2
- package/colorpicker/colorpicker.cjs.js +3 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +3 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +3 -2
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.vue +1 -0
- package/column/column.cjs.js +1 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +1 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +1 -0
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.vue +1 -0
- package/columngroup/columngroup.cjs.js +1 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +1 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +1 -0
- package/columngroup/columngroup.min.js +1 -1
- package/config/PrimeVue.d.ts +1 -1
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -7
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -7
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -7
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +2 -2
- package/contextmenu/ContextMenu.vue +7 -1
- package/contextmenu/ContextMenuSub.vue +13 -3
- package/contextmenu/contextmenu.cjs.js +25 -12
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +25 -12
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +25 -12
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +223 -99
- package/core/core.min.js +23 -21
- package/datatable/BaseDataTable.vue +4 -4
- package/datatable/BodyCell.vue +0 -3
- package/datatable/DataTable.d.ts +6 -6
- package/datatable/DataTable.vue +5 -3
- package/datatable/datatable.cjs.js +8 -10
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +8 -10
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +8 -10
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +2 -1
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +2 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +2 -1
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.cjs.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.cjs.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.esm.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.esm.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.min.js +1 -1
- package/deferredcontent/DeferredContent.vue +2 -1
- package/deferredcontent/deferredcontent.cjs.js +2 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +2 -1
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/Dialog.d.ts +2 -2
- package/dialog/Dialog.vue +2 -2
- package/dialog/dialog.cjs.js +2 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -2
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.vue +3 -2
- package/divider/divider.cjs.js +3 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +3 -2
- package/divider/divider.min.js +1 -1
- package/dock/Dock.vue +2 -1
- package/dock/dock.cjs.js +2 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +2 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +2 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +3 -3
- package/dropdown/Dropdown.vue +5 -1
- package/dropdown/dropdown.cjs.js +15 -9
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +15 -9
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +15 -9
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.vue +2 -1
- package/editor/editor.cjs.js +2 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -1
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.vue +2 -1
- package/fieldset/fieldset.cjs.js +2 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +2 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -1
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.vue +8 -5
- package/fileupload/fileupload.cjs.js +9 -8
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +9 -8
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +9 -8
- package/fileupload/fileupload.min.js +1 -1
- package/floatlabel/FloatLabel.d.ts +0 -4
- package/floatlabel/FloatLabel.vue +3 -2
- package/floatlabel/floatlabel.cjs.js +3 -2
- package/floatlabel/floatlabel.cjs.min.js +1 -1
- package/floatlabel/floatlabel.esm.js +3 -2
- package/floatlabel/floatlabel.esm.min.js +1 -1
- package/floatlabel/floatlabel.js +3 -2
- package/floatlabel/floatlabel.min.js +1 -1
- package/galleria/GalleriaContent.vue +1 -1
- package/galleria/GalleriaThumbnails.vue +12 -3
- package/galleria/galleria.cjs.js +5 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +5 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +5 -5
- package/galleria/galleria.min.js +1 -1
- package/iconfield/IconField.vue +4 -3
- package/iconfield/iconfield.cjs.js +3 -2
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +3 -2
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +3 -2
- package/iconfield/iconfield.min.js +1 -1
- package/iconfield/style/iconfieldstyle.cjs.js +3 -3
- package/iconfield/style/iconfieldstyle.cjs.min.js +1 -1
- package/iconfield/style/iconfieldstyle.esm.js +3 -3
- package/iconfield/style/iconfieldstyle.esm.min.js +1 -1
- package/iconfield/style/iconfieldstyle.js +3 -3
- package/iconfield/style/iconfieldstyle.min.js +1 -1
- package/image/Image.vue +1 -1
- package/image/image.cjs.js +1 -1
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +1 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +1 -1
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inlinemessage/InlineMessage.vue +2 -1
- package/inlinemessage/inlinemessage.cjs.js +2 -1
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +2 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +2 -1
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.vue +2 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +2 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputgroup/InputGroup.vue +3 -2
- package/inputgroup/inputgroup.cjs.js +3 -2
- package/inputgroup/inputgroup.cjs.min.js +1 -1
- package/inputgroup/inputgroup.esm.js +3 -2
- package/inputgroup/inputgroup.esm.min.js +1 -1
- package/inputgroup/inputgroup.js +3 -2
- package/inputgroup/inputgroup.min.js +1 -1
- package/inputgroupaddon/InputGroupAddon.vue +3 -2
- package/inputgroupaddon/inputgroupaddon.cjs.js +3 -2
- package/inputgroupaddon/inputgroupaddon.cjs.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.esm.js +3 -2
- package/inputgroupaddon/inputgroupaddon.esm.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.js +3 -2
- package/inputgroupaddon/inputgroupaddon.min.js +1 -1
- package/inputicon/BaseInputIcon.vue +3 -0
- package/inputicon/InputIcon.vue +10 -2
- package/inputicon/inputicon.cjs.js +13 -2
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +14 -3
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +13 -2
- package/inputicon/inputicon.min.js +1 -1
- package/inputicon/style/inputiconstyle.cjs.js +13 -1
- package/inputicon/style/inputiconstyle.cjs.min.js +1 -1
- package/inputicon/style/inputiconstyle.esm.js +9 -1
- package/inputicon/style/inputiconstyle.esm.min.js +1 -1
- package/inputicon/style/inputiconstyle.js +15 -5
- package/inputicon/style/inputiconstyle.min.js +1 -1
- package/inputmask/InputMask.vue +2 -1
- package/inputmask/inputmask.cjs.js +4 -2
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +4 -2
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +4 -2
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.vue +3 -1
- package/inputnumber/inputnumber.cjs.js +4 -2
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +4 -2
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +4 -2
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/BaseInputOtp.vue +53 -0
- package/inputotp/InputOtp.d.ts +275 -0
- package/inputotp/InputOtp.vue +201 -0
- package/inputotp/inputotp.cjs.js +265 -0
- package/inputotp/inputotp.cjs.min.js +1 -0
- package/inputotp/inputotp.esm.js +257 -0
- package/inputotp/inputotp.esm.min.js +1 -0
- package/inputotp/inputotp.js +264 -0
- package/inputotp/inputotp.min.js +1 -0
- package/inputotp/package.json +9 -0
- package/inputotp/style/InputOtpStyle.d.ts +3 -0
- package/inputotp/style/inputotpstyle.cjs.js +18 -0
- package/inputotp/style/inputotpstyle.cjs.min.js +1 -0
- package/inputotp/style/inputotpstyle.esm.js +12 -0
- package/inputotp/style/inputotpstyle.esm.min.js +1 -0
- package/inputotp/style/inputotpstyle.js +21 -0
- package/inputotp/style/inputotpstyle.min.js +1 -0
- package/inputotp/style/package.json +6 -0
- package/inputswitch/InputSwitch.d.ts +0 -16
- package/inputswitch/InputSwitch.vue +5 -1
- package/inputswitch/inputswitch.cjs.js +5 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +5 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +5 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.vue +5 -2
- package/inputtext/inputtext.cjs.js +5 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +5 -2
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +5 -2
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.vue +2 -1
- package/knob/knob.cjs.js +2 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +2 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +2 -1
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +2 -2
- package/listbox/Listbox.vue +2 -3
- package/listbox/listbox.cjs.js +2 -2
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +2 -2
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +2 -2
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.vue +2 -1
- package/megamenu/MegaMenuSub.vue +1 -1
- package/megamenu/megamenu.cjs.js +3 -2
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +3 -2
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +3 -2
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +2 -2
- package/menu/Menu.vue +18 -11
- package/menu/Menuitem.vue +6 -3
- package/menu/menu.cjs.js +23 -18
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +23 -18
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +23 -18
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +19 -6
- package/menubar/MenubarSub.vue +7 -3
- package/menubar/menubar.cjs.js +41 -18
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +41 -18
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +41 -18
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +2 -2
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/metergroup/MeterGroup.vue +3 -2
- package/metergroup/metergroup.cjs.js +5 -3
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +5 -3
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +5 -3
- package/metergroup/metergroup.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +3 -3
- package/multiselect/MultiSelect.vue +4 -1
- package/multiselect/multiselect.cjs.js +15 -10
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +15 -10
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +15 -10
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.vue +2 -1
- 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/OrganizationChart.vue +2 -1
- package/organizationchart/organizationchart.cjs.js +2 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/overlaypanel/OverlayPanel.vue +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -7
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/Paginator.vue +2 -1
- package/paginator/paginator.cjs.js +2 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +2 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -1
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.vue +2 -1
- package/panel/panel.cjs.js +2 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +2 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.vue +2 -1
- package/panelmenu/PanelMenuList.vue +6 -0
- package/panelmenu/PanelMenuSub.vue +7 -3
- package/panelmenu/panelmenu.cjs.js +24 -5
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +24 -5
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +24 -5
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +2 -2
- package/password/Password.vue +10 -4
- package/password/password.cjs.js +9 -4
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +9 -4
- package/password/password.esm.min.js +1 -1
- package/password/password.js +9 -4
- package/password/password.min.js +1 -1
- package/password/style/passwordstyle.cjs.js +4 -3
- package/password/style/passwordstyle.cjs.min.js +1 -1
- package/password/style/passwordstyle.esm.js +4 -3
- package/password/style/passwordstyle.esm.min.js +1 -1
- package/password/style/passwordstyle.js +4 -3
- package/password/style/passwordstyle.min.js +1 -1
- package/picklist/PickList.vue +2 -1
- package/picklist/picklist.cjs.js +2 -1
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +2 -1
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +2 -1
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +2 -2
- package/progressbar/ProgressBar.vue +2 -1
- package/progressbar/progressbar.cjs.js +2 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +2 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +2 -1
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.vue +2 -1
- package/progressspinner/progressspinner.cjs.js +2 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +2 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +2 -1
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/RadioButton.vue +5 -1
- package/radiobutton/radiobutton.cjs.js +5 -2
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +5 -2
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +5 -2
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.vue +2 -1
- package/rating/rating.cjs.js +2 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -1
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +346 -119
- package/resources/themes/arya-green/theme.css +346 -119
- package/resources/themes/arya-orange/theme.css +346 -119
- package/resources/themes/arya-purple/theme.css +346 -119
- package/resources/themes/aura-dark-amber/theme.css +379 -134
- package/resources/themes/aura-dark-blue/theme.css +379 -134
- package/resources/themes/aura-dark-cyan/theme.css +379 -134
- package/resources/themes/aura-dark-green/theme.css +379 -134
- package/resources/themes/aura-dark-indigo/theme.css +379 -134
- package/resources/themes/aura-dark-lime/theme.css +379 -134
- package/resources/themes/aura-dark-noir/theme.css +379 -134
- package/resources/themes/aura-dark-pink/theme.css +379 -134
- package/resources/themes/aura-dark-purple/theme.css +379 -134
- package/resources/themes/aura-dark-teal/theme.css +379 -134
- package/resources/themes/aura-light-amber/theme.css +379 -137
- package/resources/themes/aura-light-blue/theme.css +379 -137
- package/resources/themes/aura-light-cyan/theme.css +379 -137
- package/resources/themes/aura-light-green/theme.css +379 -137
- package/resources/themes/aura-light-indigo/theme.css +379 -137
- package/resources/themes/aura-light-lime/theme.css +379 -137
- package/resources/themes/aura-light-noir/theme.css +379 -137
- package/resources/themes/aura-light-pink/theme.css +379 -137
- package/resources/themes/aura-light-purple/theme.css +379 -137
- package/resources/themes/aura-light-teal/theme.css +379 -137
- package/resources/themes/bootstrap4-dark-blue/theme.css +356 -129
- package/resources/themes/bootstrap4-dark-purple/theme.css +356 -129
- package/resources/themes/bootstrap4-light-blue/theme.css +356 -129
- package/resources/themes/bootstrap4-light-purple/theme.css +356 -129
- package/resources/themes/fluent-light/theme.css +340 -119
- package/resources/themes/lara-dark-amber/theme.css +365 -129
- package/resources/themes/lara-dark-blue/theme.css +365 -129
- package/resources/themes/lara-dark-cyan/theme.css +365 -129
- package/resources/themes/lara-dark-green/theme.css +365 -129
- package/resources/themes/lara-dark-indigo/theme.css +365 -129
- package/resources/themes/lara-dark-pink/theme.css +365 -129
- package/resources/themes/lara-dark-purple/theme.css +365 -129
- package/resources/themes/lara-dark-teal/theme.css +365 -129
- package/resources/themes/lara-light-amber/theme.css +361 -129
- package/resources/themes/lara-light-blue/theme.css +361 -129
- package/resources/themes/lara-light-cyan/theme.css +361 -129
- package/resources/themes/lara-light-green/theme.css +361 -129
- package/resources/themes/lara-light-indigo/theme.css +361 -129
- package/resources/themes/lara-light-pink/theme.css +361 -129
- package/resources/themes/lara-light-purple/theme.css +361 -129
- package/resources/themes/lara-light-teal/theme.css +361 -129
- package/resources/themes/luna-amber/theme.css +346 -119
- package/resources/themes/luna-blue/theme.css +346 -119
- package/resources/themes/luna-green/theme.css +346 -119
- package/resources/themes/luna-pink/theme.css +346 -119
- package/resources/themes/md-dark-deeppurple/theme.css +431 -185
- package/resources/themes/md-dark-indigo/theme.css +431 -185
- package/resources/themes/md-light-deeppurple/theme.css +431 -185
- package/resources/themes/md-light-indigo/theme.css +431 -185
- package/resources/themes/mdc-dark-deeppurple/theme.css +431 -185
- package/resources/themes/mdc-dark-indigo/theme.css +431 -185
- package/resources/themes/mdc-light-deeppurple/theme.css +431 -185
- package/resources/themes/mdc-light-indigo/theme.css +431 -185
- package/resources/themes/mira/theme.css +346 -119
- package/resources/themes/nano/theme.css +346 -119
- package/resources/themes/nova/theme.css +346 -119
- package/resources/themes/nova-accent/theme.css +346 -119
- package/resources/themes/nova-alt/theme.css +346 -119
- package/resources/themes/nova-vue/theme.css +346 -119
- package/resources/themes/rhea/theme.css +346 -119
- package/resources/themes/saga-blue/theme.css +346 -119
- package/resources/themes/saga-green/theme.css +346 -119
- package/resources/themes/saga-orange/theme.css +346 -119
- package/resources/themes/saga-purple/theme.css +346 -119
- package/resources/themes/soho-dark/theme.css +356 -129
- package/resources/themes/soho-light/theme.css +356 -129
- package/resources/themes/tailwind-light/theme.css +346 -119
- package/resources/themes/vela-blue/theme.css +346 -119
- package/resources/themes/vela-green/theme.css +346 -119
- package/resources/themes/vela-orange/theme.css +346 -119
- package/resources/themes/vela-purple/theme.css +346 -119
- package/resources/themes/viva-dark/theme.css +357 -130
- package/resources/themes/viva-light/theme.css +357 -130
- package/scrollpanel/ScrollPanel.vue +2 -1
- package/scrollpanel/scrollpanel.cjs.js +2 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +2 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +2 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.vue +2 -1
- package/scrolltop/scrolltop.cjs.js +2 -1
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +2 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +2 -1
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.vue +44 -17
- package/selectbutton/selectbutton.cjs.js +41 -18
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +41 -18
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +41 -18
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.cjs.js +1 -1
- package/selectbutton/style/selectbuttonstyle.cjs.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.esm.js +1 -1
- package/selectbutton/style/selectbuttonstyle.esm.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.js +1 -1
- package/selectbutton/style/selectbuttonstyle.min.js +1 -1
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +1 -7
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +1 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +1 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.vue +2 -1
- package/skeleton/skeleton.cjs.js +2 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +2 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +2 -1
- package/skeleton/skeleton.min.js +1 -1
- package/slider/Slider.vue +2 -1
- package/slider/slider.cjs.js +2 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +2 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +2 -1
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.vue +2 -1
- package/speeddial/speeddial.cjs.js +2 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +3 -3
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +4 -3
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +4 -3
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +4 -3
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.vue +16 -13
- package/splitter/splitter.cjs.js +17 -14
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +17 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +17 -14
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.vue +10 -2
- package/splitterpanel/splitterpanel.cjs.js +10 -2
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +10 -2
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +10 -2
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/stepper/BaseStepper.vue +4 -0
- package/stepper/Stepper.d.ts +197 -0
- package/stepper/Stepper.vue +162 -129
- package/stepper/StepperContent.vue +47 -0
- package/stepper/StepperHeader.vue +41 -0
- package/stepper/StepperSeparator.vue +23 -0
- package/stepper/package.json +9 -0
- package/stepper/stepper.cjs.js +347 -129
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.esm.js +348 -130
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +347 -129
- package/stepper/stepper.min.js +1 -1
- package/stepper/style/StepperStyle.d.ts +3 -0
- package/stepper/style/package.json +6 -0
- package/stepper/style/stepperstyle.cjs.js +25 -19
- package/stepper/style/stepperstyle.cjs.min.js +1 -1
- package/stepper/style/stepperstyle.esm.js +25 -19
- package/stepper/style/stepperstyle.esm.min.js +1 -1
- package/stepper/style/stepperstyle.js +25 -19
- package/stepper/style/stepperstyle.min.js +1 -1
- package/stepperpanel/BaseStepperPanel.vue +18 -0
- package/stepperpanel/StepperPanel.d.ts +286 -0
- package/stepperpanel/StepperPanel.vue +12 -0
- package/stepperpanel/package.json +9 -0
- package/{step/step.cjs.js → stepperpanel/stepperpanel.cjs.js} +11 -11
- package/stepperpanel/stepperpanel.cjs.min.js +1 -0
- package/{step/step.esm.js → stepperpanel/stepperpanel.esm.js} +10 -10
- package/stepperpanel/stepperpanel.esm.min.js +1 -0
- package/{step/step.js → stepperpanel/stepperpanel.js} +12 -12
- package/stepperpanel/stepperpanel.min.js +1 -0
- package/stepperpanel/style/StepperPanelStyle.d.ts +3 -0
- package/stepperpanel/style/package.json +6 -0
- package/stepperpanel/style/stepperpanelstyle.cjs.js +5 -0
- package/stepperpanel/style/stepperpanelstyle.esm.js +3 -0
- package/stepperpanel/style/stepperpanelstyle.js +10 -0
- package/stepperpanel/style/stepperpanelstyle.min.js +1 -0
- package/steps/Steps.vue +2 -1
- package/steps/steps.cjs.js +2 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +2 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +2 -1
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +2 -2
- package/tabmenu/TabMenu.vue +3 -2
- package/tabmenu/tabmenu.cjs.js +3 -2
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +3 -2
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +3 -2
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +1 -1
- package/tabview/TabView.d.ts +31 -1
- package/tabview/TabView.vue +4 -3
- package/tabview/tabview.cjs.js +4 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +4 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +4 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +2 -2
- package/tag/Tag.vue +3 -2
- package/tag/tag.cjs.js +3 -2
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -2
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +3 -2
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.vue +2 -1
- package/terminal/terminal.cjs.js +2 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +2 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +2 -1
- package/terminal/terminal.min.js +1 -1
- package/textarea/Textarea.vue +2 -1
- package/textarea/textarea.cjs.js +4 -2
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +4 -2
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +4 -2
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +2 -2
- package/tieredmenu/TieredMenu.vue +11 -4
- package/tieredmenu/TieredMenuSub.vue +13 -3
- package/tieredmenu/tieredmenu.cjs.js +31 -22
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +31 -22
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +31 -22
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.vue +2 -1
- package/timeline/timeline.cjs.js +2 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +2 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +2 -1
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.vue +1 -1
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.vue +5 -1
- package/togglebutton/togglebutton.cjs.js +5 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +5 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +5 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.vue +3 -2
- package/toolbar/toolbar.cjs.js +3 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -2
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -2
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +6 -7
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +6 -7
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +6 -7
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +2 -2
- package/tree/Tree.vue +2 -1
- package/tree/tree.cjs.js +2 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +2 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +2 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +2 -2
- package/treeselect/TreeSelect.vue +2 -1
- package/treeselect/treeselect.cjs.js +2 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +2 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +2 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +4 -4
- package/treetable/TreeTable.vue +2 -1
- package/treetable/treetable.cjs.js +2 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +2 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +2 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.vue +5 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +5 -2
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +5 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +5 -2
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +2 -0
- package/vetur-attributes.json +36 -0
- package/vetur-tags.json +14 -0
- package/virtualscroller/VirtualScroller.vue +17 -10
- package/virtualscroller/virtualscroller.cjs.js +23 -16
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +23 -16
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +23 -16
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +119 -1
- package/step/BaseStep.vue +0 -18
- package/step/Step.vue +0 -12
- package/step/step.cjs.min.js +0 -1
- package/step/step.esm.min.js +0 -1
- package/step/step.min.js +0 -1
- package/step/style/stepstyle.cjs.js +0 -5
- package/step/style/stepstyle.esm.js +0 -3
- package/step/style/stepstyle.js +0 -10
- package/step/style/stepstyle.min.js +0 -1
- /package/{step/style/stepstyle.cjs.min.js → stepperpanel/style/stepperpanelstyle.cjs.min.js} +0 -0
- /package/{step/style/stepstyle.esm.min.js → stepperpanel/style/stepperpanelstyle.esm.min.js} +0 -0
package/orderlist/OrderList.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="cx('root')" v-bind="
|
|
2
|
+
<div :class="cx('root')" v-bind="ptmi('root')">
|
|
3
3
|
<div :class="cx('controls')" v-bind="ptm('controls')">
|
|
4
4
|
<slot name="controlsstart"></slot>
|
|
5
5
|
<OLButton type="button" @click="moveUp" :aria-label="moveUpAriaLabel" :disabled="moveDisabled()" v-bind="moveUpButtonProps" :pt="ptm('moveUpButton')" :unstyled="unstyled">
|
|
@@ -90,6 +90,7 @@ import BaseOrderList from './BaseOrderList.vue';
|
|
|
90
90
|
export default {
|
|
91
91
|
name: 'OrderList',
|
|
92
92
|
extends: BaseOrderList,
|
|
93
|
+
inheritAttrs: false,
|
|
93
94
|
emits: ['update:modelValue', 'reorder', 'update:selection', 'selection-change', 'focus', 'blur'],
|
|
94
95
|
itemTouched: false,
|
|
95
96
|
reorderDirection: null,
|
|
@@ -116,6 +116,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
116
116
|
var script = {
|
|
117
117
|
name: 'OrderList',
|
|
118
118
|
"extends": script$1,
|
|
119
|
+
inheritAttrs: false,
|
|
119
120
|
emits: ['update:modelValue', 'reorder', 'update:selection', 'selection-change', 'focus', 'blur'],
|
|
120
121
|
itemTouched: false,
|
|
121
122
|
reorderDirection: null,
|
|
@@ -564,7 +565,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
564
565
|
var _directive_ripple = vue.resolveDirective("ripple");
|
|
565
566
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
566
567
|
"class": _ctx.cx('root')
|
|
567
|
-
}, _ctx.
|
|
568
|
+
}, _ctx.ptmi('root')), [vue.createElementVNode("div", vue.mergeProps({
|
|
568
569
|
"class": _ctx.cx('controls')
|
|
569
570
|
}, _ctx.ptm('controls')), [vue.renderSlot(_ctx.$slots, "controlsstart"), vue.createVNode(_component_OLButton, vue.mergeProps({
|
|
570
571
|
type: "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/button"),t=require("primevue/icons/angledoubledown"),n=require("primevue/icons/angledoubleup"),i=require("primevue/icons/angledown"),o=require("primevue/icons/angleup"),r=require("primevue/ripple"),s=require("primevue/utils"),l=require("primevue/basecomponent"),c=require("primevue/orderlist/style"),d=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),p=a(t),h=a(n),m=a(i),f=a(o),v=a(r);function b(e){return O(e)||I(e)||g(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 g(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var w={name:"OrderList",extends:{name:"BaseOrderList",extends:a(l).default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a(c).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||s.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?s.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,n){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(n)===this.focusedOptionId}})},isSelected:function(e){return-1!=s.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){this.focused=!0,this.findCurrentFocusedIndex(),this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=b(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(t)},onOptionMouseMove:function(e){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex():this.findFirstSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex():this.findLastSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(0,t+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(t,items.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(this.findAllItems().length-1);e.preventDefault()},onEnterKey:function(e){var t=this.findMatchedOptionIndex();this.onItemClick(e,this.modelValue[t],t),e.preventDefault()},onSpaceKey:function(e){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var t=s.ObjectUtils.findIndexInList(this.d_selection[0],b(this.modelValue)),n=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(Math.min(t,n),Math.max(t,n)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e)},findAllItems:function(){return s.DomHandler.find(this.list,'[data-pc-section="item"]')},findFocusedItem:function(){return s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()))},findFirstFocusedOptionIndex:function(){var e=s.DomHandler.findSingle(this.list,'[data-pc-section="item"]');return s.DomHandler.getAttribute(e,"id")},findFirstSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.findSingle(this.list,'[data-p-highlight="true"]');return s.DomHandler.getAttribute(e,"id")}return-1},findLastSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.find(this.list,'[data-p-highlight="true"]');return s.ObjectUtils.findIndexInList(e[e.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.focusedOptionIndex;return b(this.findAllItems()).findIndex((function(t){return t.id===e}))},findNextOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e+1:0},findPrevOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e-1:0},changeFocusedOptionIndex:function(e){var t=this.findAllItems(),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},moveUp:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=s.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,l=this.findAllItems()[n].getAttribute("id");if(this.focusedOptionIndex=l,r){var c=e.metaKey||e.ctrlKey;o&&c?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=c&&this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},updateListScroll:function(){var e=s.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":s.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":s.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",s.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return s.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.d_selection)}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:m.default,AngleDoubleUpIcon:h.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function D(e){return D="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},D(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){var i;return(t="symbol"==D(i=B(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e,t){if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=D(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=["id","onClick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];w.render=function(e,t,n,i,o,r){var s=d.resolveComponent("AngleUpIcon"),l=d.resolveComponent("OLButton"),c=d.resolveComponent("AngleDoubleUpIcon"),a=d.resolveComponent("AngleDownIcon"),u=d.resolveComponent("AngleDoubleDownIcon"),p=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",d.mergeProps({class:e.cx("root")},e.ptm("root")),[d.createElementVNode("div",d.mergeProps({class:e.cx("controls")},e.ptm("controls")),[d.renderSlot(e.$slots,"controlsstart"),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},e.moveUpButtonProps,{pt:e.ptm("moveUpButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"moveupicon",{},(function(){return[d.createVNode(s,d.mergeProps(e.ptm("moveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},e.moveTopButtonProps,{pt:e.ptm("moveTopButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movetopicon",{},(function(){return[d.createVNode(c,d.mergeProps(e.ptm("moveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},e.moveDownButtonProps,{pt:e.ptm("moveDownButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movedownicon",{},(function(){return[d.createVNode(a,d.mergeProps(e.ptm("moveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},e.moveBottomButtonProps,{pt:e.ptm("moveBottomButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movebottomicon",{},(function(){return[d.createVNode(u,d.mergeProps(e.ptm("moveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.renderSlot(e.$slots,"controlsend")],16),d.createElementVNode("div",d.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[d.renderSlot(e.$slots,"header")],16)):d.createCommentVNode("",!0),d.createVNode(d.TransitionGroup,d.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},_(_(_({},e.listProps),e.ptm("list")),e.ptm("transition"))),{default:d.withCtx((function(){return[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(e.modelValue,(function(n,i){return d.withDirectives((d.openBlock(),d.createElementBlock("li",d.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,i)},onMousemove:function(e){return r.onOptionMouseMove(i)},"aria-selected":r.isSelected(n)},r.getPTOptions(n,"item",i),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[d.renderSlot(e.$slots,"item",{item:n,index:i})],16,E)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},module.exports=w;
|
|
1
|
+
"use strict";var e=require("primevue/button"),t=require("primevue/icons/angledoubledown"),n=require("primevue/icons/angledoubleup"),i=require("primevue/icons/angledown"),o=require("primevue/icons/angleup"),r=require("primevue/ripple"),s=require("primevue/utils"),l=require("primevue/basecomponent"),c=require("primevue/orderlist/style"),d=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),p=a(t),h=a(n),m=a(i),f=a(o),v=a(r);function b(e){return O(e)||I(e)||g(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 g(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var w={name:"OrderList",extends:{name:"BaseOrderList",extends:a(l).default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a(c).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||s.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?s.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,n){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(n)===this.focusedOptionId}})},isSelected:function(e){return-1!=s.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){this.focused=!0,this.findCurrentFocusedIndex(),this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=b(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(t)},onOptionMouseMove:function(e){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex():this.findFirstSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex():this.findLastSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(0,t+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(t,items.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(this.findAllItems().length-1);e.preventDefault()},onEnterKey:function(e){var t=this.findMatchedOptionIndex();this.onItemClick(e,this.modelValue[t],t),e.preventDefault()},onSpaceKey:function(e){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var t=s.ObjectUtils.findIndexInList(this.d_selection[0],b(this.modelValue)),n=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(Math.min(t,n),Math.max(t,n)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e)},findAllItems:function(){return s.DomHandler.find(this.list,'[data-pc-section="item"]')},findFocusedItem:function(){return s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()))},findFirstFocusedOptionIndex:function(){var e=s.DomHandler.findSingle(this.list,'[data-pc-section="item"]');return s.DomHandler.getAttribute(e,"id")},findFirstSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.findSingle(this.list,'[data-p-highlight="true"]');return s.DomHandler.getAttribute(e,"id")}return-1},findLastSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.find(this.list,'[data-p-highlight="true"]');return s.ObjectUtils.findIndexInList(e[e.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.focusedOptionIndex;return b(this.findAllItems()).findIndex((function(t){return t.id===e}))},findNextOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e+1:0},findPrevOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e-1:0},changeFocusedOptionIndex:function(e){var t=this.findAllItems(),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},moveUp:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=s.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,l=this.findAllItems()[n].getAttribute("id");if(this.focusedOptionIndex=l,r){var c=e.metaKey||e.ctrlKey;o&&c?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=c&&this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},updateListScroll:function(){var e=s.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":s.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":s.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",s.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return s.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.d_selection)}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:m.default,AngleDoubleUpIcon:h.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function D(e){return D="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},D(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){var i;return(t="symbol"==D(i=B(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e,t){if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=D(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=["id","onClick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];w.render=function(e,t,n,i,o,r){var s=d.resolveComponent("AngleUpIcon"),l=d.resolveComponent("OLButton"),c=d.resolveComponent("AngleDoubleUpIcon"),a=d.resolveComponent("AngleDownIcon"),u=d.resolveComponent("AngleDoubleDownIcon"),p=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",d.mergeProps({class:e.cx("root")},e.ptmi("root")),[d.createElementVNode("div",d.mergeProps({class:e.cx("controls")},e.ptm("controls")),[d.renderSlot(e.$slots,"controlsstart"),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},e.moveUpButtonProps,{pt:e.ptm("moveUpButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"moveupicon",{},(function(){return[d.createVNode(s,d.mergeProps(e.ptm("moveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},e.moveTopButtonProps,{pt:e.ptm("moveTopButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movetopicon",{},(function(){return[d.createVNode(c,d.mergeProps(e.ptm("moveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},e.moveDownButtonProps,{pt:e.ptm("moveDownButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movedownicon",{},(function(){return[d.createVNode(a,d.mergeProps(e.ptm("moveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},e.moveBottomButtonProps,{pt:e.ptm("moveBottomButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movebottomicon",{},(function(){return[d.createVNode(u,d.mergeProps(e.ptm("moveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.renderSlot(e.$slots,"controlsend")],16),d.createElementVNode("div",d.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[d.renderSlot(e.$slots,"header")],16)):d.createCommentVNode("",!0),d.createVNode(d.TransitionGroup,d.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},_(_(_({},e.listProps),e.ptm("list")),e.ptm("transition"))),{default:d.withCtx((function(){return[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(e.modelValue,(function(n,i){return d.withDirectives((d.openBlock(),d.createElementBlock("li",d.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,i)},onMousemove:function(e){return r.onOptionMouseMove(i)},"aria-selected":r.isSelected(n)},r.getPTOptions(n,"item",i),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[d.renderSlot(e.$slots,"item",{item:n,index:i})],16,E)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},module.exports=w;
|
|
@@ -103,6 +103,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
103
103
|
var script = {
|
|
104
104
|
name: 'OrderList',
|
|
105
105
|
"extends": script$1,
|
|
106
|
+
inheritAttrs: false,
|
|
106
107
|
emits: ['update:modelValue', 'reorder', 'update:selection', 'selection-change', 'focus', 'blur'],
|
|
107
108
|
itemTouched: false,
|
|
108
109
|
reorderDirection: null,
|
|
@@ -551,7 +552,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
551
552
|
var _directive_ripple = resolveDirective("ripple");
|
|
552
553
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
553
554
|
"class": _ctx.cx('root')
|
|
554
|
-
}, _ctx.
|
|
555
|
+
}, _ctx.ptmi('root')), [createElementVNode("div", mergeProps({
|
|
555
556
|
"class": _ctx.cx('controls')
|
|
556
557
|
}, _ctx.ptm('controls')), [renderSlot(_ctx.$slots, "controlsstart"), createVNode(_component_OLButton, mergeProps({
|
|
557
558
|
type: "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/button";import t from"primevue/icons/angledoubledown";import i from"primevue/icons/angledoubleup";import n from"primevue/icons/angledown";import o from"primevue/icons/angleup";import r from"primevue/ripple";import{UniqueComponentId as s,ObjectUtils as l,DomHandler as c}from"primevue/utils";import d from"primevue/basecomponent";import a from"primevue/orderlist/style";import{resolveComponent as u,resolveDirective as h,openBlock as p,createElementBlock as f,mergeProps as m,createElementVNode as v,renderSlot as y,createVNode as b,withCtx as g,createCommentVNode as I,TransitionGroup as O,Fragment as x,renderList as w,withDirectives as _}from"vue";function S(e){return B(e)||$(e)||A(e)||D()}function D(){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 A(e,t){if(e){if("string"==typeof e)return E(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?E(e,t):void 0}}function $(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var K={name:"OrderList",extends:{name:"BaseOrderList",extends:d,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||s()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?l.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,i){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(i)===this.focusedOptionId}})},isSelected:function(e){return-1!=l.findIndexInList(e,this.d_selection)},onListFocus:function(e){this.focused=!0,this.findCurrentFocusedIndex(),this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=S(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(t)},onOptionMouseMove:function(e){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex():this.findFirstSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex():this.findLastSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=S(this.modelValue).slice(0,t+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=S(this.modelValue).slice(t,items.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(this.findAllItems().length-1);e.preventDefault()},onEnterKey:function(e){var t=this.findMatchedOptionIndex();this.onItemClick(e,this.modelValue[t],t),e.preventDefault()},onSpaceKey:function(e){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var t=l.findIndexInList(this.d_selection[0],S(this.modelValue)),i=this.findMatchedOptionIndex();this.d_selection=S(this.modelValue).slice(Math.min(t,i),Math.max(t,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e)},findAllItems:function(){return c.find(this.list,'[data-pc-section="item"]')},findFocusedItem:function(){return c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()))},findFirstFocusedOptionIndex:function(){var e=c.findSingle(this.list,'[data-pc-section="item"]');return c.getAttribute(e,"id")},findFirstSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=c.findSingle(this.list,'[data-p-highlight="true"]');return c.getAttribute(e,"id")}return-1},findLastSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=c.find(this.list,'[data-p-highlight="true"]');return l.findIndexInList(e[e.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.focusedOptionIndex;return S(this.findAllItems()).findIndex((function(t){return t.id===e}))},findNextOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e+1:0},findPrevOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e-1:0},changeFocusedOptionIndex:function(e){var t=this.findAllItems(),i=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[i]?t[i].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=c.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},moveUp:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],t);if(0===n)break;var o=t[n-1];t[n-1]=t[n],t[n]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],t);if(0===n)break;var o=t.splice(n,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],t);if(n===t.length-1)break;var o=t[n+1];t[n+1]=t[n],t[n]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],t);if(n===t.length-1)break;var o=t.splice(n,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,i){this.itemTouched=!1;var n=l.findIndexInList(t,this.d_selection),o=-1!=n,r=!this.itemTouched&&this.metaKeySelection,s=this.findAllItems()[i].getAttribute("id");if(this.focusedOptionIndex=s,r){var c=e.metaKey||e.ctrlKey;o&&c?this.d_selection=this.d_selection.filter((function(e,t){return t!==n})):(this.d_selection=c&&this.d_selection?S(this.d_selection):[],l.insertIntoOrderedArray(t,i,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==n})):(this.d_selection=this.d_selection?S(this.d_selection):[],l.insertIntoOrderedArray(t,i,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},updateListScroll:function(){var e=c.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":c.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":c.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",c.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return s()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},hasSelectedOption:function(){return l.isNotEmpty(this.d_selection)}},components:{OLButton:e,AngleUpIcon:o,AngleDownIcon:n,AngleDoubleUpIcon:i,AngleDoubleDownIcon:t},directives:{ripple:r}};function L(e){return L="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},L(e)}function k(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 V(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?k(Object(i),!0).forEach((function(t){P(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function P(e,t,i){var n;return(t="symbol"==L(n=F(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function F(e,t){if("object"!=L(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var T=["id","onClick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];K.render=function(e,t,i,n,o,r){var s=u("AngleUpIcon"),l=u("OLButton"),c=u("AngleDoubleUpIcon"),d=u("AngleDownIcon"),a=u("AngleDoubleDownIcon"),S=h("ripple");return p(),f("div",m({class:e.cx("root")},e.ptm("root")),[v("div",m({class:e.cx("controls")},e.ptm("controls")),[y(e.$slots,"controlsstart"),b(l,m({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},e.moveUpButtonProps,{pt:e.ptm("moveUpButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"moveupicon",{},(function(){return[b(s,m(e.ptm("moveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,m({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},e.moveTopButtonProps,{pt:e.ptm("moveTopButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"movetopicon",{},(function(){return[b(c,m(e.ptm("moveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,m({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},e.moveDownButtonProps,{pt:e.ptm("moveDownButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"movedownicon",{},(function(){return[b(d,m(e.ptm("moveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,m({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},e.moveBottomButtonProps,{pt:e.ptm("moveBottomButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"movebottomicon",{},(function(){return[b(a,m(e.ptm("moveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),y(e.$slots,"controlsend")],16),v("div",m({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(p(),f("div",m({key:0,class:e.cx("header")},e.ptm("header")),[y(e.$slots,"header")],16)):I("",!0),b(O,m({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},V(V(V({},e.listProps),e.ptm("list")),e.ptm("transition"))),{default:g((function(){return[(p(!0),f(x,null,w(e.modelValue,(function(i,n){return _((p(),f("li",m({key:r.getItemKey(i,n),id:o.id+"_"+n,role:"option",class:e.cx("item",{item:i,id:"".concat(o.id,"_").concat(n)}),onClick:function(e){return r.onItemClick(e,i,n)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,n)},onMousemove:function(e){return r.onOptionMouseMove(n)},"aria-selected":r.isSelected(i)},r.getPTOptions(i,"item",n),{"data-p-highlight":r.isSelected(i),"data-p-focused":"".concat(o.id,"_").concat(n)===r.focusedOptionId}),[y(e.$slots,"item",{item:i,index:n})],16,T)),[[S]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)};export{K as default};
|
|
1
|
+
import e from"primevue/button";import t from"primevue/icons/angledoubledown";import i from"primevue/icons/angledoubleup";import n from"primevue/icons/angledown";import o from"primevue/icons/angleup";import r from"primevue/ripple";import{UniqueComponentId as s,ObjectUtils as l,DomHandler as c}from"primevue/utils";import d from"primevue/basecomponent";import a from"primevue/orderlist/style";import{resolveComponent as u,resolveDirective as h,openBlock as p,createElementBlock as f,mergeProps as m,createElementVNode as v,renderSlot as y,createVNode as b,withCtx as g,createCommentVNode as I,TransitionGroup as O,Fragment as x,renderList as w,withDirectives as _}from"vue";function S(e){return B(e)||$(e)||A(e)||D()}function D(){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 A(e,t){if(e){if("string"==typeof e)return E(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?E(e,t):void 0}}function $(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var K={name:"OrderList",extends:{name:"BaseOrderList",extends:d,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||s()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?l.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,i){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(i)===this.focusedOptionId}})},isSelected:function(e){return-1!=l.findIndexInList(e,this.d_selection)},onListFocus:function(e){this.focused=!0,this.findCurrentFocusedIndex(),this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=S(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(t)},onOptionMouseMove:function(e){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex():this.findFirstSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex():this.findLastSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=S(this.modelValue).slice(0,t+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=S(this.modelValue).slice(t,items.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(this.findAllItems().length-1);e.preventDefault()},onEnterKey:function(e){var t=this.findMatchedOptionIndex();this.onItemClick(e,this.modelValue[t],t),e.preventDefault()},onSpaceKey:function(e){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var t=l.findIndexInList(this.d_selection[0],S(this.modelValue)),i=this.findMatchedOptionIndex();this.d_selection=S(this.modelValue).slice(Math.min(t,i),Math.max(t,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e)},findAllItems:function(){return c.find(this.list,'[data-pc-section="item"]')},findFocusedItem:function(){return c.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()))},findFirstFocusedOptionIndex:function(){var e=c.findSingle(this.list,'[data-pc-section="item"]');return c.getAttribute(e,"id")},findFirstSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=c.findSingle(this.list,'[data-p-highlight="true"]');return c.getAttribute(e,"id")}return-1},findLastSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=c.find(this.list,'[data-p-highlight="true"]');return l.findIndexInList(e[e.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.focusedOptionIndex;return S(this.findAllItems()).findIndex((function(t){return t.id===e}))},findNextOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e+1:0},findPrevOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e-1:0},changeFocusedOptionIndex:function(e){var t=this.findAllItems(),i=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[i]?t[i].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=c.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},moveUp:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],t);if(0===n)break;var o=t[n-1];t[n-1]=t[n],t[n]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=0;i<this.d_selection.length;i++){var n=l.findIndexInList(this.d_selection[i],t);if(0===n)break;var o=t.splice(n,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],t);if(n===t.length-1)break;var o=t[n+1];t[n+1]=t[n],t[n]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=S(this.modelValue),i=this.d_selection.length-1;i>=0;i--){var n=l.findIndexInList(this.d_selection[i],t);if(n===t.length-1)break;var o=t.splice(n,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,i){this.itemTouched=!1;var n=l.findIndexInList(t,this.d_selection),o=-1!=n,r=!this.itemTouched&&this.metaKeySelection,s=this.findAllItems()[i].getAttribute("id");if(this.focusedOptionIndex=s,r){var c=e.metaKey||e.ctrlKey;o&&c?this.d_selection=this.d_selection.filter((function(e,t){return t!==n})):(this.d_selection=c&&this.d_selection?S(this.d_selection):[],l.insertIntoOrderedArray(t,i,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==n})):(this.d_selection=this.d_selection?S(this.d_selection):[],l.insertIntoOrderedArray(t,i,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},updateListScroll:function(){var e=c.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":c.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":c.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",c.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return s()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},hasSelectedOption:function(){return l.isNotEmpty(this.d_selection)}},components:{OLButton:e,AngleUpIcon:o,AngleDownIcon:n,AngleDoubleUpIcon:i,AngleDoubleDownIcon:t},directives:{ripple:r}};function L(e){return L="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},L(e)}function k(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 V(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?k(Object(i),!0).forEach((function(t){P(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function P(e,t,i){var n;return(t="symbol"==L(n=F(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function F(e,t){if("object"!=L(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var T=["id","onClick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];K.render=function(e,t,i,n,o,r){var s=u("AngleUpIcon"),l=u("OLButton"),c=u("AngleDoubleUpIcon"),d=u("AngleDownIcon"),a=u("AngleDoubleDownIcon"),S=h("ripple");return p(),f("div",m({class:e.cx("root")},e.ptmi("root")),[v("div",m({class:e.cx("controls")},e.ptm("controls")),[y(e.$slots,"controlsstart"),b(l,m({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},e.moveUpButtonProps,{pt:e.ptm("moveUpButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"moveupicon",{},(function(){return[b(s,m(e.ptm("moveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,m({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},e.moveTopButtonProps,{pt:e.ptm("moveTopButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"movetopicon",{},(function(){return[b(c,m(e.ptm("moveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,m({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},e.moveDownButtonProps,{pt:e.ptm("moveDownButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"movedownicon",{},(function(){return[b(d,m(e.ptm("moveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),b(l,m({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},e.moveBottomButtonProps,{pt:e.ptm("moveBottomButton"),unstyled:e.unstyled}),{icon:g((function(){return[y(e.$slots,"movebottomicon",{},(function(){return[b(a,m(e.ptm("moveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),y(e.$slots,"controlsend")],16),v("div",m({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(p(),f("div",m({key:0,class:e.cx("header")},e.ptm("header")),[y(e.$slots,"header")],16)):I("",!0),b(O,m({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},V(V(V({},e.listProps),e.ptm("list")),e.ptm("transition"))),{default:g((function(){return[(p(!0),f(x,null,w(e.modelValue,(function(i,n){return _((p(),f("li",m({key:r.getItemKey(i,n),id:o.id+"_"+n,role:"option",class:e.cx("item",{item:i,id:"".concat(o.id,"_").concat(n)}),onClick:function(e){return r.onItemClick(e,i,n)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,n)},onMousemove:function(e){return r.onOptionMouseMove(n)},"aria-selected":r.isSelected(i)},r.getPTOptions(i,"item",n),{"data-p-highlight":r.isSelected(i),"data-p-focused":"".concat(o.id,"_").concat(n)===r.focusedOptionId}),[y(e.$slots,"item",{item:i,index:n})],16,T)),[[S]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)};export{K as default};
|
package/orderlist/orderlist.js
CHANGED
|
@@ -107,6 +107,7 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
|
|
|
107
107
|
var script = {
|
|
108
108
|
name: 'OrderList',
|
|
109
109
|
"extends": script$1,
|
|
110
|
+
inheritAttrs: false,
|
|
110
111
|
emits: ['update:modelValue', 'reorder', 'update:selection', 'selection-change', 'focus', 'blur'],
|
|
111
112
|
itemTouched: false,
|
|
112
113
|
reorderDirection: null,
|
|
@@ -555,7 +556,7 @@ this.primevue.orderlist = (function (Button, AngleDoubleDownIcon, AngleDoubleUpI
|
|
|
555
556
|
var _directive_ripple = vue.resolveDirective("ripple");
|
|
556
557
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
557
558
|
"class": _ctx.cx('root')
|
|
558
|
-
}, _ctx.
|
|
559
|
+
}, _ctx.ptmi('root')), [vue.createElementVNode("div", vue.mergeProps({
|
|
559
560
|
"class": _ctx.cx('controls')
|
|
560
561
|
}, _ctx.ptm('controls')), [vue.renderSlot(_ctx.$slots, "controlsstart"), vue.createVNode(_component_OLButton, vue.mergeProps({
|
|
561
562
|
type: "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.orderlist=function(e,t,n,i,o,r,s,l,c,d){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),p=a(t),h=a(n),m=a(i),f=a(o),v=a(r);function b(e){return O(e)||I(e)||g(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 g(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var w={name:"OrderList",extends:{name:"BaseOrderList",extends:a(l).default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a(c).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||s.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?s.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,n){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(n)===this.focusedOptionId}})},isSelected:function(e){return-1!=s.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){this.focused=!0,this.findCurrentFocusedIndex(),this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=b(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(t)},onOptionMouseMove:function(e){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex():this.findFirstSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex():this.findLastSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(0,t+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(t,items.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(this.findAllItems().length-1);e.preventDefault()},onEnterKey:function(e){var t=this.findMatchedOptionIndex();this.onItemClick(e,this.modelValue[t],t),e.preventDefault()},onSpaceKey:function(e){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var t=s.ObjectUtils.findIndexInList(this.d_selection[0],b(this.modelValue)),n=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(Math.min(t,n),Math.max(t,n)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e)},findAllItems:function(){return s.DomHandler.find(this.list,'[data-pc-section="item"]')},findFocusedItem:function(){return s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()))},findFirstFocusedOptionIndex:function(){var e=s.DomHandler.findSingle(this.list,'[data-pc-section="item"]');return s.DomHandler.getAttribute(e,"id")},findFirstSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.findSingle(this.list,'[data-p-highlight="true"]');return s.DomHandler.getAttribute(e,"id")}return-1},findLastSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.find(this.list,'[data-p-highlight="true"]');return s.ObjectUtils.findIndexInList(e[e.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.focusedOptionIndex;return b(this.findAllItems()).findIndex((function(t){return t.id===e}))},findNextOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e+1:0},findPrevOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e-1:0},changeFocusedOptionIndex:function(e){var t=this.findAllItems(),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},moveUp:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=s.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,l=this.findAllItems()[n].getAttribute("id");if(this.focusedOptionIndex=l,r){var c=e.metaKey||e.ctrlKey;o&&c?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=c&&this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},updateListScroll:function(){var e=s.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":s.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":s.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",s.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return s.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.d_selection)}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:m.default,AngleDoubleUpIcon:h.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function D(e){return D="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},D(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){var i;return(t="symbol"==D(i=B(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e,t){if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=D(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=["id","onClick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];return w.render=function(e,t,n,i,o,r){var s=d.resolveComponent("AngleUpIcon"),l=d.resolveComponent("OLButton"),c=d.resolveComponent("AngleDoubleUpIcon"),a=d.resolveComponent("AngleDownIcon"),u=d.resolveComponent("AngleDoubleDownIcon"),p=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",d.mergeProps({class:e.cx("root")},e.ptm("root")),[d.createElementVNode("div",d.mergeProps({class:e.cx("controls")},e.ptm("controls")),[d.renderSlot(e.$slots,"controlsstart"),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},e.moveUpButtonProps,{pt:e.ptm("moveUpButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"moveupicon",{},(function(){return[d.createVNode(s,d.mergeProps(e.ptm("moveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},e.moveTopButtonProps,{pt:e.ptm("moveTopButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movetopicon",{},(function(){return[d.createVNode(c,d.mergeProps(e.ptm("moveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},e.moveDownButtonProps,{pt:e.ptm("moveDownButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movedownicon",{},(function(){return[d.createVNode(a,d.mergeProps(e.ptm("moveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},e.moveBottomButtonProps,{pt:e.ptm("moveBottomButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movebottomicon",{},(function(){return[d.createVNode(u,d.mergeProps(e.ptm("moveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.renderSlot(e.$slots,"controlsend")],16),d.createElementVNode("div",d.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[d.renderSlot(e.$slots,"header")],16)):d.createCommentVNode("",!0),d.createVNode(d.TransitionGroup,d.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},_(_(_({},e.listProps),e.ptm("list")),e.ptm("transition"))),{default:d.withCtx((function(){return[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(e.modelValue,(function(n,i){return d.withDirectives((d.openBlock(),d.createElementBlock("li",d.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,i)},onMousemove:function(e){return r.onOptionMouseMove(i)},"aria-selected":r.isSelected(n)},r.getPTOptions(n,"item",i),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[d.renderSlot(e.$slots,"item",{item:n,index:i})],16,E)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},w}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.orderlist.style,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.orderlist=function(e,t,n,i,o,r,s,l,c,d){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),p=a(t),h=a(n),m=a(i),f=a(o),v=a(r);function b(e){return O(e)||I(e)||g(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 g(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var w={name:"OrderList",extends:{name:"BaseOrderList",extends:a(l).default,props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},tabindex:{type:Number,default:0},listProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a(c).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","reorder","update:selection","selection-change","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,list:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||s.UniqueComponentId()}},beforeUnmount:function(){this.destroyStyle()},updated:function(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted:function(){this.id=this.id||s.UniqueComponentId(),this.responsive&&this.createStyle()},methods:{getItemKey:function(e,t){return this.dataKey?s.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,n){return this.ptm(t,{context:{active:this.isSelected(e),focused:"".concat(this.id,"_").concat(n)===this.focusedOptionId}})},isSelected:function(e){return-1!=s.ObjectUtils.findIndexInList(e,this.d_selection)},onListFocus:function(e){this.focused=!0,this.findCurrentFocusedIndex(),this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"KeyA":e.ctrlKey&&(this.d_selection=b(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(t)},onOptionMouseMove:function(e){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e)},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex():this.findFirstSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex():this.findLastSelectedOptionIndex();this.changeFocusedOptionIndex(t),e.shiftKey&&this.onEnterKey(e),e.preventDefault()},onHomeKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(0,t+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0);e.preventDefault()},onEndKey:function(e){if(e.ctrlKey&&e.shiftKey){var t=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(t,items.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(this.findAllItems().length-1);e.preventDefault()},onEnterKey:function(e){var t=this.findMatchedOptionIndex();this.onItemClick(e,this.modelValue[t],t),e.preventDefault()},onSpaceKey:function(e){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var t=s.ObjectUtils.findIndexInList(this.d_selection[0],b(this.modelValue)),n=this.findMatchedOptionIndex();this.d_selection=b(this.modelValue).slice(Math.min(t,n),Math.max(t,n)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e)},findAllItems:function(){return s.DomHandler.find(this.list,'[data-pc-section="item"]')},findFocusedItem:function(){return s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()))},findFirstFocusedOptionIndex:function(){var e=s.DomHandler.findSingle(this.list,'[data-pc-section="item"]');return s.DomHandler.getAttribute(e,"id")},findFirstSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.findSingle(this.list,'[data-p-highlight="true"]');return s.DomHandler.getAttribute(e,"id")}return-1},findLastSelectedOptionIndex:function(){if(this.hasSelectedOption){var e=s.DomHandler.find(this.list,'[data-p-highlight="true"]');return s.ObjectUtils.findIndexInList(e[e.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.focusedOptionIndex;return b(this.findAllItems()).findIndex((function(t){return t.id===e}))},findNextOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e+1:0},findPrevOptionIndex:function(){var e=this.findMatchedOptionIndex();return e>-1?e-1:0},changeFocusedOptionIndex:function(e){var t=this.findAllItems(),n=e>=t.length?t.length-1:e<0?0:e;this.focusedOptionIndex=t[n]?t[n].getAttribute("id"):-1,this.scrollInView(this.focusedOptionIndex)},scrollInView:function(e){var t=s.DomHandler.findSingle(this.list,'[data-pc-section="item"][id="'.concat(e,'"]'));t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},moveUp:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t[i-1];t[i-1]=t[i],t[i]=o}this.reorderDirection="up",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveTop:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=0;n<this.d_selection.length;n++){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(0===i)break;var o=t.splice(i,1)[0];t.unshift(o)}this.reorderDirection="top",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveDown:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t[i+1];t[i+1]=t[i],t[i]=o}this.reorderDirection="down",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},moveBottom:function(e){if(this.d_selection){for(var t=b(this.modelValue),n=this.d_selection.length-1;n>=0;n--){var i=s.ObjectUtils.findIndexInList(this.d_selection[n],t);if(i===t.length-1)break;var o=t.splice(i,1)[0];t.push(o)}this.reorderDirection="bottom",this.$emit("update:modelValue",t),this.$emit("reorder",{originalEvent:e,value:t,direction:this.reorderDirection})}},onItemClick:function(e,t,n){this.itemTouched=!1;var i=s.ObjectUtils.findIndexInList(t,this.d_selection),o=-1!=i,r=!this.itemTouched&&this.metaKeySelection,l=this.findAllItems()[n].getAttribute("id");if(this.focusedOptionIndex=l,r){var c=e.metaKey||e.ctrlKey;o&&c?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=c&&this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter((function(e,t){return t!==i})):(this.d_selection=this.d_selection?b(this.d_selection):[],s.ObjectUtils.insertIntoOrderedArray(t,n,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd:function(){this.itemTouched=!0},updateListScroll:function(){var e=s.DomHandler.find(this.list,'[data-pc-section="item"][data-p-highlight="true"]');if(e&&e.length)switch(this.reorderDirection){case"up":s.DomHandler.scrollInView(this.list,e[0]);break;case"top":this.list.scrollTop=0;break;case"down":s.DomHandler.scrollInView(this.list,e[e.length-1]);break;case"bottom":this.list.scrollTop=this.list.scrollHeight}},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",s.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-orderlist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[").concat(this.attributeSelector,"] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(){if(!this.d_selection||!this.d_selection.length)return!0},listRef:function(e){this.list=e?e.$el:void 0}},computed:{attributeSelector:function(){return s.UniqueComponentId()},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},hasSelectedOption:function(){return s.ObjectUtils.isNotEmpty(this.d_selection)}},components:{OLButton:u.default,AngleUpIcon:f.default,AngleDownIcon:m.default,AngleDoubleUpIcon:h.default,AngleDoubleDownIcon:p.default},directives:{ripple:v.default}};function D(e){return D="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},D(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){var i;return(t="symbol"==D(i=B(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e,t){if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=D(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=["id","onClick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];return w.render=function(e,t,n,i,o,r){var s=d.resolveComponent("AngleUpIcon"),l=d.resolveComponent("OLButton"),c=d.resolveComponent("AngleDoubleUpIcon"),a=d.resolveComponent("AngleDownIcon"),u=d.resolveComponent("AngleDoubleDownIcon"),p=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",d.mergeProps({class:e.cx("root")},e.ptmi("root")),[d.createElementVNode("div",d.mergeProps({class:e.cx("controls")},e.ptm("controls")),[d.renderSlot(e.$slots,"controlsstart"),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveUp,"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled()},e.moveUpButtonProps,{pt:e.ptm("moveUpButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"moveupicon",{},(function(){return[d.createVNode(s,d.mergeProps(e.ptm("moveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveTop,"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled()},e.moveTopButtonProps,{pt:e.ptm("moveTopButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movetopicon",{},(function(){return[d.createVNode(c,d.mergeProps(e.ptm("moveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveDown,"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled()},e.moveDownButtonProps,{pt:e.ptm("moveDownButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movedownicon",{},(function(){return[d.createVNode(a,d.mergeProps(e.ptm("moveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.createVNode(l,d.mergeProps({type:"button",onClick:r.moveBottom,"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled()},e.moveBottomButtonProps,{pt:e.ptm("moveBottomButton"),unstyled:e.unstyled}),{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"movebottomicon",{},(function(){return[d.createVNode(u,d.mergeProps(e.ptm("moveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["onClick","aria-label","disabled","pt","unstyled"]),d.renderSlot(e.$slots,"controlsend")],16),d.createElementVNode("div",d.mergeProps({class:e.cx("container")},e.ptm("container")),[e.$slots.header?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[d.renderSlot(e.$slots,"header")],16)):d.createCommentVNode("",!0),d.createVNode(d.TransitionGroup,d.mergeProps({ref:r.listRef,id:o.id+"_list",name:"p-orderlist-flip",tag:"ul",class:e.cx("list"),style:e.listStyle,role:"listbox","aria-multiselectable":"true",tabindex:e.tabindex,"aria-activedescendant":o.focused?r.focusedOptionId:void 0,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onFocus:r.onListFocus,onBlur:r.onListBlur,onKeydown:r.onListKeyDown},_(_(_({},e.listProps),e.ptm("list")),e.ptm("transition"))),{default:d.withCtx((function(){return[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(e.modelValue,(function(n,i){return d.withDirectives((d.openBlock(),d.createElementBlock("li",d.mergeProps({key:r.getItemKey(n,i),id:o.id+"_"+i,role:"option",class:e.cx("item",{item:n,id:"".concat(o.id,"_").concat(i)}),onClick:function(e){return r.onItemClick(e,n,i)},onTouchend:t[0]||(t[0]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,i)},onMousemove:function(e){return r.onOptionMouseMove(i)},"aria-selected":r.isSelected(n)},r.getPTOptions(n,"item",i),{"data-p-highlight":r.isSelected(n),"data-p-focused":"".concat(o.id,"_").concat(i)===r.focusedOptionId}),[d.renderSlot(e.$slots,"item",{item:n,index:i})],16,E)),[[p]])})),128))]})),_:3},16,["id","class","style","tabindex","aria-activedescendant","aria-label","aria-labelledby","onFocus","onBlur","onKeydown"])],16)],16)},w}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.orderlist.style,Vue);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="cx('root')" v-bind="
|
|
2
|
+
<div :class="cx('root')" v-bind="ptmi('root')">
|
|
3
3
|
<OrganizationChartNode
|
|
4
4
|
:node="value"
|
|
5
5
|
:templates="$slots"
|
|
@@ -22,6 +22,7 @@ import OrganizationChartNode from './OrganizationChartNode.vue';
|
|
|
22
22
|
export default {
|
|
23
23
|
name: 'OrganizationChart',
|
|
24
24
|
extends: BaseOrganizationChart,
|
|
25
|
+
inheritAttrs: false,
|
|
25
26
|
emits: ['node-unselect', 'node-select', 'update:selectionKeys', 'node-expand', 'node-collapse', 'update:collapsedKeys'],
|
|
26
27
|
data() {
|
|
27
28
|
return {
|
|
@@ -249,6 +249,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
249
249
|
var script = {
|
|
250
250
|
name: 'OrganizationChart',
|
|
251
251
|
"extends": script$2,
|
|
252
|
+
inheritAttrs: false,
|
|
252
253
|
emits: ['node-unselect', 'node-select', 'update:selectionKeys', 'node-expand', 'node-collapse', 'update:collapsedKeys'],
|
|
253
254
|
data: function data() {
|
|
254
255
|
return {
|
|
@@ -300,7 +301,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
300
301
|
var _component_OrganizationChartNode = vue.resolveComponent("OrganizationChartNode");
|
|
301
302
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
302
303
|
"class": _ctx.cx('root')
|
|
303
|
-
}, _ctx.
|
|
304
|
+
}, _ctx.ptmi('root')), [vue.createVNode(_component_OrganizationChartNode, {
|
|
304
305
|
node: _ctx.value,
|
|
305
306
|
templates: _ctx.$slots,
|
|
306
307
|
onNodeToggle: $options.onNodeToggle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/organizationchart/style"),o=require("primevue/icons/chevrondown"),n=require("primevue/icons/chevronup"),l=require("primevue/utils"),s=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),c={name:"BaseOrganizationChart",extends:r.default,props:{value:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null}},style:i(t).default,provide:function(){return{$parentInstance:this}}},d={name:"OrganizationChartNode",hostName:"OrganizationChart",extends:r.default,emits:["node-click","node-toggle"],props:{node:{type:null,default:null},templates:{type:null,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{expanded:this.expanded,selectable:this.selectable,selected:this.selected,toggleable:this.toggleable,active:this.selected}})},getNodeOptions:function(e,t){return this.ptm(t,{context:{lineTop:e}})},onNodeClick:function(e){l.DomHandler.getAttribute(e.target,"nodeToggler")||l.DomHandler.getAttribute(e.target,"nodeTogglerIcon")||this.selectionMode&&this.$emit("node-click",this.node)},onChildNodeClick:function(e){this.$emit("node-click",e)},toggleNode:function(){this.$emit("node-toggle",this.node)},onChildNodeToggle:function(e){this.$emit("node-toggle",e)},onKeydown:function(e){"Enter"!==e.code&&"NumpadEnter"!==e.code&&"Space"!==e.code||(this.toggleNode(),e.preventDefault())}},computed:{leaf:function(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},colspan:function(){return this.node.children&&this.node.children.length?2*this.node.children.length:null},childStyle:function(){return{visibility:!this.leaf&&this.expanded?"inherit":"hidden"}},expanded:function(){return void 0===this.collapsedKeys[this.node.key]},selectable:function(){return this.selectionMode&&!1!==this.node.selectable},selected:function(){return this.selectable&&this.selectionKeys&&!0===this.selectionKeys[this.node.key]},toggleable:function(){return this.collapsible&&!1!==this.node.collapsible&&!this.leaf}},components:{ChevronDownIcon:i(o).default,ChevronUpIcon:i(n).default}},a=["colspan"],p=["colspan"],u=["colspan"];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 g(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?g(Object(o),!0).forEach((function(t){h(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function h(e,t,o){var n;return(t="symbol"==m(n=f(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function f(e,t){if("object"!=m(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}d.render=function(e,t,o,n,l,i){var r=s.resolveComponent("OrganizationChartNode",!0);return s.openBlock(),s.createElementBlock("table",s.mergeProps({class:e.cx("table")},e.ptm("table")),[s.createElementVNode("tbody",s.normalizeProps(s.guardReactiveProps(e.ptm("body"))),[o.node?(s.openBlock(),s.createElementBlock("tr",s.normalizeProps(s.mergeProps({key:0},e.ptm("row"))),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("cell")),[s.createElementVNode("div",s.mergeProps({class:[e.cx("node"),o.node.styleClass],onClick:t[2]||(t[2]=function(){return i.onNodeClick&&i.onNodeClick.apply(i,arguments)})},i.getPTOptions("node")),[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates[o.node.type]||o.templates.default),{node:o.node},null,8,["node"])),i.toggleable?(s.openBlock(),s.createElementBlock("a",s.mergeProps({key:0,tabindex:"0",class:e.cx("nodeToggler"),onClick:t[0]||(t[0]=function(){return i.toggleNode&&i.toggleNode.apply(i,arguments)}),onKeydown:t[1]||(t[1]=function(){return i.onKeydown&&i.onKeydown.apply(i,arguments)})},i.getPTOptions("nodeToggler")),[o.templates.togglericon?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates.togglericon),{key:0,expanded:i.expanded,class:"p-node-toggler-icon"},null,8,["expanded"])):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.expanded?"ChevronDownIcon":"ChevronUpIcon"),s.mergeProps({key:1,class:e.cx("nodeTogglerIcon")},i.getPTOptions("nodeTogglerIcon")),null,16,["class"]))],16)):s.createCommentVNode("",!0)],16)],16,a)],16)):s.createCommentVNode("",!0),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,p)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[o.node.children&&1===o.node.children.length?(s.openBlock(),s.createElementBlock("td",s.mergeProps({key:0,colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,u)):s.createCommentVNode("",!0),o.node.children&&o.node.children.length>1?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(o.node.children,(function(t,n){return s.openBlock(),s.createElementBlock(s.Fragment,{key:t.key},[s.createElementVNode("td",s.mergeProps({class:e.cx("lineLeft",{index:n})},i.getNodeOptions(!(0===n),"lineLeft"))," ",16),s.createElementVNode("td",s.mergeProps({class:e.cx("lineRight",{index:n})},i.getNodeOptions(!(n===o.node.children.length-1),"lineRight"))," ",16)],64)})),128)):s.createCommentVNode("",!0)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("nodes")},e.ptm("nodes")),[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.node.children,(function(t){return s.openBlock(),s.createElementBlock("td",s.mergeProps({key:t.key,colspan:"2"},e.ptm("nodeCell")),[s.createVNode(r,{node:t,templates:o.templates,collapsedKeys:o.collapsedKeys,onNodeToggle:i.onChildNodeToggle,collapsible:o.collapsible,selectionMode:o.selectionMode,selectionKeys:o.selectionKeys,onNodeClick:i.onChildNodeClick,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","collapsedKeys","onNodeToggle","collapsible","selectionMode","selectionKeys","onNodeClick","pt","unstyled"])],16)})),128))],16)],16)],16)};var b={name:"OrganizationChart",extends:c,emits:["node-unselect","node-select","update:selectionKeys","node-expand","node-collapse","update:collapsedKeys"],data:function(){return{d_collapsedKeys:this.collapsedKeys||{}}},watch:{collapsedKeys:function(e){this.d_collapsedKeys=e}},methods:{onNodeClick:function(e){var t=e.key;if(this.selectionMode){var o=this.selectionKeys?y({},this.selectionKeys):{};o[t]?(delete o[t],this.$emit("node-unselect",e)):("single"===this.selectionMode&&(o={}),o[t]=!0,this.$emit("node-select",e)),this.$emit("update:selectionKeys",o)}},onNodeToggle:function(e){var t=e.key;this.d_collapsedKeys[t]?(delete this.d_collapsedKeys[t],this.$emit("node-expand",e)):(this.d_collapsedKeys[t]=!0,this.$emit("node-collapse",e)),this.d_collapsedKeys=y({},this.d_collapsedKeys),this.$emit("update:collapsedKeys",this.d_collapsedKeys)}},components:{OrganizationChartNode:d}};b.render=function(e,t,o,n,l,i){var r=s.resolveComponent("OrganizationChartNode");return s.openBlock(),s.createElementBlock("div",s.mergeProps({class:e.cx("root")},e.
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/organizationchart/style"),o=require("primevue/icons/chevrondown"),n=require("primevue/icons/chevronup"),l=require("primevue/utils"),s=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),c={name:"BaseOrganizationChart",extends:r.default,props:{value:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null}},style:i(t).default,provide:function(){return{$parentInstance:this}}},d={name:"OrganizationChartNode",hostName:"OrganizationChart",extends:r.default,emits:["node-click","node-toggle"],props:{node:{type:null,default:null},templates:{type:null,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{expanded:this.expanded,selectable:this.selectable,selected:this.selected,toggleable:this.toggleable,active:this.selected}})},getNodeOptions:function(e,t){return this.ptm(t,{context:{lineTop:e}})},onNodeClick:function(e){l.DomHandler.getAttribute(e.target,"nodeToggler")||l.DomHandler.getAttribute(e.target,"nodeTogglerIcon")||this.selectionMode&&this.$emit("node-click",this.node)},onChildNodeClick:function(e){this.$emit("node-click",e)},toggleNode:function(){this.$emit("node-toggle",this.node)},onChildNodeToggle:function(e){this.$emit("node-toggle",e)},onKeydown:function(e){"Enter"!==e.code&&"NumpadEnter"!==e.code&&"Space"!==e.code||(this.toggleNode(),e.preventDefault())}},computed:{leaf:function(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},colspan:function(){return this.node.children&&this.node.children.length?2*this.node.children.length:null},childStyle:function(){return{visibility:!this.leaf&&this.expanded?"inherit":"hidden"}},expanded:function(){return void 0===this.collapsedKeys[this.node.key]},selectable:function(){return this.selectionMode&&!1!==this.node.selectable},selected:function(){return this.selectable&&this.selectionKeys&&!0===this.selectionKeys[this.node.key]},toggleable:function(){return this.collapsible&&!1!==this.node.collapsible&&!this.leaf}},components:{ChevronDownIcon:i(o).default,ChevronUpIcon:i(n).default}},a=["colspan"],p=["colspan"],u=["colspan"];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 g(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?g(Object(o),!0).forEach((function(t){h(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function h(e,t,o){var n;return(t="symbol"==m(n=f(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function f(e,t){if("object"!=m(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}d.render=function(e,t,o,n,l,i){var r=s.resolveComponent("OrganizationChartNode",!0);return s.openBlock(),s.createElementBlock("table",s.mergeProps({class:e.cx("table")},e.ptm("table")),[s.createElementVNode("tbody",s.normalizeProps(s.guardReactiveProps(e.ptm("body"))),[o.node?(s.openBlock(),s.createElementBlock("tr",s.normalizeProps(s.mergeProps({key:0},e.ptm("row"))),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("cell")),[s.createElementVNode("div",s.mergeProps({class:[e.cx("node"),o.node.styleClass],onClick:t[2]||(t[2]=function(){return i.onNodeClick&&i.onNodeClick.apply(i,arguments)})},i.getPTOptions("node")),[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates[o.node.type]||o.templates.default),{node:o.node},null,8,["node"])),i.toggleable?(s.openBlock(),s.createElementBlock("a",s.mergeProps({key:0,tabindex:"0",class:e.cx("nodeToggler"),onClick:t[0]||(t[0]=function(){return i.toggleNode&&i.toggleNode.apply(i,arguments)}),onKeydown:t[1]||(t[1]=function(){return i.onKeydown&&i.onKeydown.apply(i,arguments)})},i.getPTOptions("nodeToggler")),[o.templates.togglericon?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates.togglericon),{key:0,expanded:i.expanded,class:"p-node-toggler-icon"},null,8,["expanded"])):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.expanded?"ChevronDownIcon":"ChevronUpIcon"),s.mergeProps({key:1,class:e.cx("nodeTogglerIcon")},i.getPTOptions("nodeTogglerIcon")),null,16,["class"]))],16)):s.createCommentVNode("",!0)],16)],16,a)],16)):s.createCommentVNode("",!0),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,p)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[o.node.children&&1===o.node.children.length?(s.openBlock(),s.createElementBlock("td",s.mergeProps({key:0,colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,u)):s.createCommentVNode("",!0),o.node.children&&o.node.children.length>1?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(o.node.children,(function(t,n){return s.openBlock(),s.createElementBlock(s.Fragment,{key:t.key},[s.createElementVNode("td",s.mergeProps({class:e.cx("lineLeft",{index:n})},i.getNodeOptions(!(0===n),"lineLeft"))," ",16),s.createElementVNode("td",s.mergeProps({class:e.cx("lineRight",{index:n})},i.getNodeOptions(!(n===o.node.children.length-1),"lineRight"))," ",16)],64)})),128)):s.createCommentVNode("",!0)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("nodes")},e.ptm("nodes")),[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.node.children,(function(t){return s.openBlock(),s.createElementBlock("td",s.mergeProps({key:t.key,colspan:"2"},e.ptm("nodeCell")),[s.createVNode(r,{node:t,templates:o.templates,collapsedKeys:o.collapsedKeys,onNodeToggle:i.onChildNodeToggle,collapsible:o.collapsible,selectionMode:o.selectionMode,selectionKeys:o.selectionKeys,onNodeClick:i.onChildNodeClick,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","collapsedKeys","onNodeToggle","collapsible","selectionMode","selectionKeys","onNodeClick","pt","unstyled"])],16)})),128))],16)],16)],16)};var b={name:"OrganizationChart",extends:c,inheritAttrs:!1,emits:["node-unselect","node-select","update:selectionKeys","node-expand","node-collapse","update:collapsedKeys"],data:function(){return{d_collapsedKeys:this.collapsedKeys||{}}},watch:{collapsedKeys:function(e){this.d_collapsedKeys=e}},methods:{onNodeClick:function(e){var t=e.key;if(this.selectionMode){var o=this.selectionKeys?y({},this.selectionKeys):{};o[t]?(delete o[t],this.$emit("node-unselect",e)):("single"===this.selectionMode&&(o={}),o[t]=!0,this.$emit("node-select",e)),this.$emit("update:selectionKeys",o)}},onNodeToggle:function(e){var t=e.key;this.d_collapsedKeys[t]?(delete this.d_collapsedKeys[t],this.$emit("node-expand",e)):(this.d_collapsedKeys[t]=!0,this.$emit("node-collapse",e)),this.d_collapsedKeys=y({},this.d_collapsedKeys),this.$emit("update:collapsedKeys",this.d_collapsedKeys)}},components:{OrganizationChartNode:d}};b.render=function(e,t,o,n,l,i){var r=s.resolveComponent("OrganizationChartNode");return s.openBlock(),s.createElementBlock("div",s.mergeProps({class:e.cx("root")},e.ptmi("root")),[s.createVNode(r,{node:e.value,templates:e.$slots,onNodeToggle:i.onNodeToggle,collapsedKeys:l.d_collapsedKeys,collapsible:e.collapsible,onNodeClick:i.onNodeClick,selectionMode:e.selectionMode,selectionKeys:e.selectionKeys,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","onNodeToggle","collapsedKeys","collapsible","onNodeClick","selectionMode","selectionKeys","pt","unstyled"])],16)},module.exports=b;
|
|
@@ -240,6 +240,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
240
240
|
var script = {
|
|
241
241
|
name: 'OrganizationChart',
|
|
242
242
|
"extends": script$2,
|
|
243
|
+
inheritAttrs: false,
|
|
243
244
|
emits: ['node-unselect', 'node-select', 'update:selectionKeys', 'node-expand', 'node-collapse', 'update:collapsedKeys'],
|
|
244
245
|
data: function data() {
|
|
245
246
|
return {
|
|
@@ -291,7 +292,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
291
292
|
var _component_OrganizationChartNode = resolveComponent("OrganizationChartNode");
|
|
292
293
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
293
294
|
"class": _ctx.cx('root')
|
|
294
|
-
}, _ctx.
|
|
295
|
+
}, _ctx.ptmi('root')), [createVNode(_component_OrganizationChartNode, {
|
|
295
296
|
node: _ctx.value,
|
|
296
297
|
templates: _ctx.$slots,
|
|
297
298
|
onNodeToggle: $options.onNodeToggle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/basecomponent";import t from"primevue/organizationchart/style";import n from"primevue/icons/chevrondown";import o from"primevue/icons/chevronup";import{DomHandler as l}from"primevue/utils";import{resolveComponent as i,openBlock as s,createElementBlock as d,mergeProps as c,createElementVNode as r,normalizeProps as a,guardReactiveProps as p,createBlock as u,resolveDynamicComponent as y,createCommentVNode as h,Fragment as g,renderList as f,createVNode as m}from"vue";var b={name:"BaseOrganizationChart",extends:e,props:{value:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null}},style:t,provide:function(){return{$parentInstance:this}}},v={name:"OrganizationChartNode",hostName:"OrganizationChart",extends:e,emits:["node-click","node-toggle"],props:{node:{type:null,default:null},templates:{type:null,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{expanded:this.expanded,selectable:this.selectable,selected:this.selected,toggleable:this.toggleable,active:this.selected}})},getNodeOptions:function(e,t){return this.ptm(t,{context:{lineTop:e}})},onNodeClick:function(e){l.getAttribute(e.target,"nodeToggler")||l.getAttribute(e.target,"nodeTogglerIcon")||this.selectionMode&&this.$emit("node-click",this.node)},onChildNodeClick:function(e){this.$emit("node-click",e)},toggleNode:function(){this.$emit("node-toggle",this.node)},onChildNodeToggle:function(e){this.$emit("node-toggle",e)},onKeydown:function(e){"Enter"!==e.code&&"NumpadEnter"!==e.code&&"Space"!==e.code||(this.toggleNode(),e.preventDefault())}},computed:{leaf:function(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},colspan:function(){return this.node.children&&this.node.children.length?2*this.node.children.length:null},childStyle:function(){return{visibility:!this.leaf&&this.expanded?"inherit":"hidden"}},expanded:function(){return void 0===this.collapsedKeys[this.node.key]},selectable:function(){return this.selectionMode&&!1!==this.node.selectable},selected:function(){return this.selectable&&this.selectionKeys&&!0===this.selectionKeys[this.node.key]},toggleable:function(){return this.collapsible&&!1!==this.node.collapsible&&!this.leaf}},components:{ChevronDownIcon:n,ChevronUpIcon:o}},K=["colspan"],N=["colspan"],C=["colspan"];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 k(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 x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){var o;return(t="symbol"==O(o=T(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(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)}v.render=function(e,t,n,o,l,b){var v=i("OrganizationChartNode",!0);return s(),d("table",c({class:e.cx("table")},e.ptm("table")),[r("tbody",a(p(e.ptm("body"))),[n.node?(s(),d("tr",a(c({key:0},e.ptm("row"))),[r("td",c({colspan:b.colspan},e.ptm("cell")),[r("div",c({class:[e.cx("node"),n.node.styleClass],onClick:t[2]||(t[2]=function(){return b.onNodeClick&&b.onNodeClick.apply(b,arguments)})},b.getPTOptions("node")),[(s(),u(y(n.templates[n.node.type]||n.templates.default),{node:n.node},null,8,["node"])),b.toggleable?(s(),d("a",c({key:0,tabindex:"0",class:e.cx("nodeToggler"),onClick:t[0]||(t[0]=function(){return b.toggleNode&&b.toggleNode.apply(b,arguments)}),onKeydown:t[1]||(t[1]=function(){return b.onKeydown&&b.onKeydown.apply(b,arguments)})},b.getPTOptions("nodeToggler")),[n.templates.togglericon?(s(),u(y(n.templates.togglericon),{key:0,expanded:b.expanded,class:"p-node-toggler-icon"},null,8,["expanded"])):(s(),u(y(b.expanded?"ChevronDownIcon":"ChevronUpIcon"),c({key:1,class:e.cx("nodeTogglerIcon")},b.getPTOptions("nodeTogglerIcon")),null,16,["class"]))],16)):h("",!0)],16)],16,K)],16)):h("",!0),r("tr",c({style:b.childStyle,class:e.cx("lines")},e.ptm("lines")),[r("td",c({colspan:b.colspan},e.ptm("lineCell")),[r("div",c({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,N)],16),r("tr",c({style:b.childStyle,class:e.cx("lines")},e.ptm("lines")),[n.node.children&&1===n.node.children.length?(s(),d("td",c({key:0,colspan:b.colspan},e.ptm("lineCell")),[r("div",c({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,C)):h("",!0),n.node.children&&n.node.children.length>1?(s(!0),d(g,{key:1},f(n.node.children,(function(t,o){return s(),d(g,{key:t.key},[r("td",c({class:e.cx("lineLeft",{index:o})},b.getNodeOptions(!(0===o),"lineLeft"))," ",16),r("td",c({class:e.cx("lineRight",{index:o})},b.getNodeOptions(!(o===n.node.children.length-1),"lineRight"))," ",16)],64)})),128)):h("",!0)],16),r("tr",c({style:b.childStyle,class:e.cx("nodes")},e.ptm("nodes")),[(s(!0),d(g,null,f(n.node.children,(function(t){return s(),d("td",c({key:t.key,colspan:"2"},e.ptm("nodeCell")),[m(v,{node:t,templates:n.templates,collapsedKeys:n.collapsedKeys,onNodeToggle:b.onChildNodeToggle,collapsible:n.collapsible,selectionMode:n.selectionMode,selectionKeys:n.selectionKeys,onNodeClick:b.onChildNodeClick,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","collapsedKeys","onNodeToggle","collapsible","selectionMode","selectionKeys","onNodeClick","pt","unstyled"])],16)})),128))],16)],16)],16)};var S={name:"OrganizationChart",extends:b,emits:["node-unselect","node-select","update:selectionKeys","node-expand","node-collapse","update:collapsedKeys"],data:function(){return{d_collapsedKeys:this.collapsedKeys||{}}},watch:{collapsedKeys:function(e){this.d_collapsedKeys=e}},methods:{onNodeClick:function(e){var t=e.key;if(this.selectionMode){var n=this.selectionKeys?x({},this.selectionKeys):{};n[t]?(delete n[t],this.$emit("node-unselect",e)):("single"===this.selectionMode&&(n={}),n[t]=!0,this.$emit("node-select",e)),this.$emit("update:selectionKeys",n)}},onNodeToggle:function(e){var t=e.key;this.d_collapsedKeys[t]?(delete this.d_collapsedKeys[t],this.$emit("node-expand",e)):(this.d_collapsedKeys[t]=!0,this.$emit("node-collapse",e)),this.d_collapsedKeys=x({},this.d_collapsedKeys),this.$emit("update:collapsedKeys",this.d_collapsedKeys)}},components:{OrganizationChartNode:v}};S.render=function(e,t,n,o,l,r){var a=i("OrganizationChartNode");return s(),d("div",c({class:e.cx("root")},e.
|
|
1
|
+
import e from"primevue/basecomponent";import t from"primevue/organizationchart/style";import n from"primevue/icons/chevrondown";import o from"primevue/icons/chevronup";import{DomHandler as l}from"primevue/utils";import{resolveComponent as i,openBlock as s,createElementBlock as d,mergeProps as c,createElementVNode as r,normalizeProps as a,guardReactiveProps as p,createBlock as u,resolveDynamicComponent as y,createCommentVNode as h,Fragment as g,renderList as f,createVNode as m}from"vue";var b={name:"BaseOrganizationChart",extends:e,props:{value:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null}},style:t,provide:function(){return{$parentInstance:this}}},v={name:"OrganizationChartNode",hostName:"OrganizationChart",extends:e,emits:["node-click","node-toggle"],props:{node:{type:null,default:null},templates:{type:null,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{expanded:this.expanded,selectable:this.selectable,selected:this.selected,toggleable:this.toggleable,active:this.selected}})},getNodeOptions:function(e,t){return this.ptm(t,{context:{lineTop:e}})},onNodeClick:function(e){l.getAttribute(e.target,"nodeToggler")||l.getAttribute(e.target,"nodeTogglerIcon")||this.selectionMode&&this.$emit("node-click",this.node)},onChildNodeClick:function(e){this.$emit("node-click",e)},toggleNode:function(){this.$emit("node-toggle",this.node)},onChildNodeToggle:function(e){this.$emit("node-toggle",e)},onKeydown:function(e){"Enter"!==e.code&&"NumpadEnter"!==e.code&&"Space"!==e.code||(this.toggleNode(),e.preventDefault())}},computed:{leaf:function(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},colspan:function(){return this.node.children&&this.node.children.length?2*this.node.children.length:null},childStyle:function(){return{visibility:!this.leaf&&this.expanded?"inherit":"hidden"}},expanded:function(){return void 0===this.collapsedKeys[this.node.key]},selectable:function(){return this.selectionMode&&!1!==this.node.selectable},selected:function(){return this.selectable&&this.selectionKeys&&!0===this.selectionKeys[this.node.key]},toggleable:function(){return this.collapsible&&!1!==this.node.collapsible&&!this.leaf}},components:{ChevronDownIcon:n,ChevronUpIcon:o}},K=["colspan"],N=["colspan"],C=["colspan"];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 k(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 x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){var o;return(t="symbol"==O(o=T(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(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)}v.render=function(e,t,n,o,l,b){var v=i("OrganizationChartNode",!0);return s(),d("table",c({class:e.cx("table")},e.ptm("table")),[r("tbody",a(p(e.ptm("body"))),[n.node?(s(),d("tr",a(c({key:0},e.ptm("row"))),[r("td",c({colspan:b.colspan},e.ptm("cell")),[r("div",c({class:[e.cx("node"),n.node.styleClass],onClick:t[2]||(t[2]=function(){return b.onNodeClick&&b.onNodeClick.apply(b,arguments)})},b.getPTOptions("node")),[(s(),u(y(n.templates[n.node.type]||n.templates.default),{node:n.node},null,8,["node"])),b.toggleable?(s(),d("a",c({key:0,tabindex:"0",class:e.cx("nodeToggler"),onClick:t[0]||(t[0]=function(){return b.toggleNode&&b.toggleNode.apply(b,arguments)}),onKeydown:t[1]||(t[1]=function(){return b.onKeydown&&b.onKeydown.apply(b,arguments)})},b.getPTOptions("nodeToggler")),[n.templates.togglericon?(s(),u(y(n.templates.togglericon),{key:0,expanded:b.expanded,class:"p-node-toggler-icon"},null,8,["expanded"])):(s(),u(y(b.expanded?"ChevronDownIcon":"ChevronUpIcon"),c({key:1,class:e.cx("nodeTogglerIcon")},b.getPTOptions("nodeTogglerIcon")),null,16,["class"]))],16)):h("",!0)],16)],16,K)],16)):h("",!0),r("tr",c({style:b.childStyle,class:e.cx("lines")},e.ptm("lines")),[r("td",c({colspan:b.colspan},e.ptm("lineCell")),[r("div",c({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,N)],16),r("tr",c({style:b.childStyle,class:e.cx("lines")},e.ptm("lines")),[n.node.children&&1===n.node.children.length?(s(),d("td",c({key:0,colspan:b.colspan},e.ptm("lineCell")),[r("div",c({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,C)):h("",!0),n.node.children&&n.node.children.length>1?(s(!0),d(g,{key:1},f(n.node.children,(function(t,o){return s(),d(g,{key:t.key},[r("td",c({class:e.cx("lineLeft",{index:o})},b.getNodeOptions(!(0===o),"lineLeft"))," ",16),r("td",c({class:e.cx("lineRight",{index:o})},b.getNodeOptions(!(o===n.node.children.length-1),"lineRight"))," ",16)],64)})),128)):h("",!0)],16),r("tr",c({style:b.childStyle,class:e.cx("nodes")},e.ptm("nodes")),[(s(!0),d(g,null,f(n.node.children,(function(t){return s(),d("td",c({key:t.key,colspan:"2"},e.ptm("nodeCell")),[m(v,{node:t,templates:n.templates,collapsedKeys:n.collapsedKeys,onNodeToggle:b.onChildNodeToggle,collapsible:n.collapsible,selectionMode:n.selectionMode,selectionKeys:n.selectionKeys,onNodeClick:b.onChildNodeClick,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","collapsedKeys","onNodeToggle","collapsible","selectionMode","selectionKeys","onNodeClick","pt","unstyled"])],16)})),128))],16)],16)],16)};var S={name:"OrganizationChart",extends:b,inheritAttrs:!1,emits:["node-unselect","node-select","update:selectionKeys","node-expand","node-collapse","update:collapsedKeys"],data:function(){return{d_collapsedKeys:this.collapsedKeys||{}}},watch:{collapsedKeys:function(e){this.d_collapsedKeys=e}},methods:{onNodeClick:function(e){var t=e.key;if(this.selectionMode){var n=this.selectionKeys?x({},this.selectionKeys):{};n[t]?(delete n[t],this.$emit("node-unselect",e)):("single"===this.selectionMode&&(n={}),n[t]=!0,this.$emit("node-select",e)),this.$emit("update:selectionKeys",n)}},onNodeToggle:function(e){var t=e.key;this.d_collapsedKeys[t]?(delete this.d_collapsedKeys[t],this.$emit("node-expand",e)):(this.d_collapsedKeys[t]=!0,this.$emit("node-collapse",e)),this.d_collapsedKeys=x({},this.d_collapsedKeys),this.$emit("update:collapsedKeys",this.d_collapsedKeys)}},components:{OrganizationChartNode:v}};S.render=function(e,t,n,o,l,r){var a=i("OrganizationChartNode");return s(),d("div",c({class:e.cx("root")},e.ptmi("root")),[m(a,{node:e.value,templates:e.$slots,onNodeToggle:r.onNodeToggle,collapsedKeys:l.d_collapsedKeys,collapsible:e.collapsible,onNodeClick:r.onNodeClick,selectionMode:e.selectionMode,selectionKeys:e.selectionKeys,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","onNodeToggle","collapsedKeys","collapsible","onNodeClick","selectionMode","selectionKeys","pt","unstyled"])],16)};export{S as default};
|
|
@@ -244,6 +244,7 @@ this.primevue.organizationchart = (function (BaseComponent, OrganizationChartSty
|
|
|
244
244
|
var script = {
|
|
245
245
|
name: 'OrganizationChart',
|
|
246
246
|
"extends": script$2,
|
|
247
|
+
inheritAttrs: false,
|
|
247
248
|
emits: ['node-unselect', 'node-select', 'update:selectionKeys', 'node-expand', 'node-collapse', 'update:collapsedKeys'],
|
|
248
249
|
data: function data() {
|
|
249
250
|
return {
|
|
@@ -295,7 +296,7 @@ this.primevue.organizationchart = (function (BaseComponent, OrganizationChartSty
|
|
|
295
296
|
var _component_OrganizationChartNode = vue.resolveComponent("OrganizationChartNode");
|
|
296
297
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
297
298
|
"class": _ctx.cx('root')
|
|
298
|
-
}, _ctx.
|
|
299
|
+
}, _ctx.ptmi('root')), [vue.createVNode(_component_OrganizationChartNode, {
|
|
299
300
|
node: _ctx.value,
|
|
300
301
|
templates: _ctx.$slots,
|
|
301
302
|
onNodeToggle: $options.onNodeToggle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.organizationchart=function(e,t,o,n,l,s){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=i(e),r={name:"BaseOrganizationChart",extends:c.default,props:{value:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null}},style:i(t).default,provide:function(){return{$parentInstance:this}}},d={name:"OrganizationChartNode",hostName:"OrganizationChart",extends:c.default,emits:["node-click","node-toggle"],props:{node:{type:null,default:null},templates:{type:null,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{expanded:this.expanded,selectable:this.selectable,selected:this.selected,toggleable:this.toggleable,active:this.selected}})},getNodeOptions:function(e,t){return this.ptm(t,{context:{lineTop:e}})},onNodeClick:function(e){l.DomHandler.getAttribute(e.target,"nodeToggler")||l.DomHandler.getAttribute(e.target,"nodeTogglerIcon")||this.selectionMode&&this.$emit("node-click",this.node)},onChildNodeClick:function(e){this.$emit("node-click",e)},toggleNode:function(){this.$emit("node-toggle",this.node)},onChildNodeToggle:function(e){this.$emit("node-toggle",e)},onKeydown:function(e){"Enter"!==e.code&&"NumpadEnter"!==e.code&&"Space"!==e.code||(this.toggleNode(),e.preventDefault())}},computed:{leaf:function(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},colspan:function(){return this.node.children&&this.node.children.length?2*this.node.children.length:null},childStyle:function(){return{visibility:!this.leaf&&this.expanded?"inherit":"hidden"}},expanded:function(){return void 0===this.collapsedKeys[this.node.key]},selectable:function(){return this.selectionMode&&!1!==this.node.selectable},selected:function(){return this.selectable&&this.selectionKeys&&!0===this.selectionKeys[this.node.key]},toggleable:function(){return this.collapsible&&!1!==this.node.collapsible&&!this.leaf}},components:{ChevronDownIcon:i(o).default,ChevronUpIcon:i(n).default}},a=["colspan"],p=["colspan"],u=["colspan"];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 g(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?g(Object(o),!0).forEach((function(t){h(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function h(e,t,o){var n;return(t="symbol"==m(n=f(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function f(e,t){if("object"!=m(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}d.render=function(e,t,o,n,l,i){var c=s.resolveComponent("OrganizationChartNode",!0);return s.openBlock(),s.createElementBlock("table",s.mergeProps({class:e.cx("table")},e.ptm("table")),[s.createElementVNode("tbody",s.normalizeProps(s.guardReactiveProps(e.ptm("body"))),[o.node?(s.openBlock(),s.createElementBlock("tr",s.normalizeProps(s.mergeProps({key:0},e.ptm("row"))),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("cell")),[s.createElementVNode("div",s.mergeProps({class:[e.cx("node"),o.node.styleClass],onClick:t[2]||(t[2]=function(){return i.onNodeClick&&i.onNodeClick.apply(i,arguments)})},i.getPTOptions("node")),[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates[o.node.type]||o.templates.default),{node:o.node},null,8,["node"])),i.toggleable?(s.openBlock(),s.createElementBlock("a",s.mergeProps({key:0,tabindex:"0",class:e.cx("nodeToggler"),onClick:t[0]||(t[0]=function(){return i.toggleNode&&i.toggleNode.apply(i,arguments)}),onKeydown:t[1]||(t[1]=function(){return i.onKeydown&&i.onKeydown.apply(i,arguments)})},i.getPTOptions("nodeToggler")),[o.templates.togglericon?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates.togglericon),{key:0,expanded:i.expanded,class:"p-node-toggler-icon"},null,8,["expanded"])):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.expanded?"ChevronDownIcon":"ChevronUpIcon"),s.mergeProps({key:1,class:e.cx("nodeTogglerIcon")},i.getPTOptions("nodeTogglerIcon")),null,16,["class"]))],16)):s.createCommentVNode("",!0)],16)],16,a)],16)):s.createCommentVNode("",!0),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,p)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[o.node.children&&1===o.node.children.length?(s.openBlock(),s.createElementBlock("td",s.mergeProps({key:0,colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,u)):s.createCommentVNode("",!0),o.node.children&&o.node.children.length>1?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(o.node.children,(function(t,n){return s.openBlock(),s.createElementBlock(s.Fragment,{key:t.key},[s.createElementVNode("td",s.mergeProps({class:e.cx("lineLeft",{index:n})},i.getNodeOptions(!(0===n),"lineLeft"))," ",16),s.createElementVNode("td",s.mergeProps({class:e.cx("lineRight",{index:n})},i.getNodeOptions(!(n===o.node.children.length-1),"lineRight"))," ",16)],64)})),128)):s.createCommentVNode("",!0)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("nodes")},e.ptm("nodes")),[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.node.children,(function(t){return s.openBlock(),s.createElementBlock("td",s.mergeProps({key:t.key,colspan:"2"},e.ptm("nodeCell")),[s.createVNode(c,{node:t,templates:o.templates,collapsedKeys:o.collapsedKeys,onNodeToggle:i.onChildNodeToggle,collapsible:o.collapsible,selectionMode:o.selectionMode,selectionKeys:o.selectionKeys,onNodeClick:i.onChildNodeClick,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","collapsedKeys","onNodeToggle","collapsible","selectionMode","selectionKeys","onNodeClick","pt","unstyled"])],16)})),128))],16)],16)],16)};var b={name:"OrganizationChart",extends:r,emits:["node-unselect","node-select","update:selectionKeys","node-expand","node-collapse","update:collapsedKeys"],data:function(){return{d_collapsedKeys:this.collapsedKeys||{}}},watch:{collapsedKeys:function(e){this.d_collapsedKeys=e}},methods:{onNodeClick:function(e){var t=e.key;if(this.selectionMode){var o=this.selectionKeys?y({},this.selectionKeys):{};o[t]?(delete o[t],this.$emit("node-unselect",e)):("single"===this.selectionMode&&(o={}),o[t]=!0,this.$emit("node-select",e)),this.$emit("update:selectionKeys",o)}},onNodeToggle:function(e){var t=e.key;this.d_collapsedKeys[t]?(delete this.d_collapsedKeys[t],this.$emit("node-expand",e)):(this.d_collapsedKeys[t]=!0,this.$emit("node-collapse",e)),this.d_collapsedKeys=y({},this.d_collapsedKeys),this.$emit("update:collapsedKeys",this.d_collapsedKeys)}},components:{OrganizationChartNode:d}};return b.render=function(e,t,o,n,l,i){var c=s.resolveComponent("OrganizationChartNode");return s.openBlock(),s.createElementBlock("div",s.mergeProps({class:e.cx("root")},e.
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.organizationchart=function(e,t,o,n,l,s){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=i(e),r={name:"BaseOrganizationChart",extends:c.default,props:{value:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null}},style:i(t).default,provide:function(){return{$parentInstance:this}}},d={name:"OrganizationChartNode",hostName:"OrganizationChart",extends:c.default,emits:["node-click","node-toggle"],props:{node:{type:null,default:null},templates:{type:null,default:null},collapsible:{type:Boolean,default:!1},collapsedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{expanded:this.expanded,selectable:this.selectable,selected:this.selected,toggleable:this.toggleable,active:this.selected}})},getNodeOptions:function(e,t){return this.ptm(t,{context:{lineTop:e}})},onNodeClick:function(e){l.DomHandler.getAttribute(e.target,"nodeToggler")||l.DomHandler.getAttribute(e.target,"nodeTogglerIcon")||this.selectionMode&&this.$emit("node-click",this.node)},onChildNodeClick:function(e){this.$emit("node-click",e)},toggleNode:function(){this.$emit("node-toggle",this.node)},onChildNodeToggle:function(e){this.$emit("node-toggle",e)},onKeydown:function(e){"Enter"!==e.code&&"NumpadEnter"!==e.code&&"Space"!==e.code||(this.toggleNode(),e.preventDefault())}},computed:{leaf:function(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},colspan:function(){return this.node.children&&this.node.children.length?2*this.node.children.length:null},childStyle:function(){return{visibility:!this.leaf&&this.expanded?"inherit":"hidden"}},expanded:function(){return void 0===this.collapsedKeys[this.node.key]},selectable:function(){return this.selectionMode&&!1!==this.node.selectable},selected:function(){return this.selectable&&this.selectionKeys&&!0===this.selectionKeys[this.node.key]},toggleable:function(){return this.collapsible&&!1!==this.node.collapsible&&!this.leaf}},components:{ChevronDownIcon:i(o).default,ChevronUpIcon:i(n).default}},a=["colspan"],p=["colspan"],u=["colspan"];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 g(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?g(Object(o),!0).forEach((function(t){h(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function h(e,t,o){var n;return(t="symbol"==m(n=f(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function f(e,t){if("object"!=m(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}d.render=function(e,t,o,n,l,i){var c=s.resolveComponent("OrganizationChartNode",!0);return s.openBlock(),s.createElementBlock("table",s.mergeProps({class:e.cx("table")},e.ptm("table")),[s.createElementVNode("tbody",s.normalizeProps(s.guardReactiveProps(e.ptm("body"))),[o.node?(s.openBlock(),s.createElementBlock("tr",s.normalizeProps(s.mergeProps({key:0},e.ptm("row"))),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("cell")),[s.createElementVNode("div",s.mergeProps({class:[e.cx("node"),o.node.styleClass],onClick:t[2]||(t[2]=function(){return i.onNodeClick&&i.onNodeClick.apply(i,arguments)})},i.getPTOptions("node")),[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates[o.node.type]||o.templates.default),{node:o.node},null,8,["node"])),i.toggleable?(s.openBlock(),s.createElementBlock("a",s.mergeProps({key:0,tabindex:"0",class:e.cx("nodeToggler"),onClick:t[0]||(t[0]=function(){return i.toggleNode&&i.toggleNode.apply(i,arguments)}),onKeydown:t[1]||(t[1]=function(){return i.onKeydown&&i.onKeydown.apply(i,arguments)})},i.getPTOptions("nodeToggler")),[o.templates.togglericon?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.templates.togglericon),{key:0,expanded:i.expanded,class:"p-node-toggler-icon"},null,8,["expanded"])):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.expanded?"ChevronDownIcon":"ChevronUpIcon"),s.mergeProps({key:1,class:e.cx("nodeTogglerIcon")},i.getPTOptions("nodeTogglerIcon")),null,16,["class"]))],16)):s.createCommentVNode("",!0)],16)],16,a)],16)):s.createCommentVNode("",!0),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[s.createElementVNode("td",s.mergeProps({colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,p)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("lines")},e.ptm("lines")),[o.node.children&&1===o.node.children.length?(s.openBlock(),s.createElementBlock("td",s.mergeProps({key:0,colspan:i.colspan},e.ptm("lineCell")),[s.createElementVNode("div",s.mergeProps({class:e.cx("lineDown")},e.ptm("lineDown")),null,16)],16,u)):s.createCommentVNode("",!0),o.node.children&&o.node.children.length>1?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(o.node.children,(function(t,n){return s.openBlock(),s.createElementBlock(s.Fragment,{key:t.key},[s.createElementVNode("td",s.mergeProps({class:e.cx("lineLeft",{index:n})},i.getNodeOptions(!(0===n),"lineLeft"))," ",16),s.createElementVNode("td",s.mergeProps({class:e.cx("lineRight",{index:n})},i.getNodeOptions(!(n===o.node.children.length-1),"lineRight"))," ",16)],64)})),128)):s.createCommentVNode("",!0)],16),s.createElementVNode("tr",s.mergeProps({style:i.childStyle,class:e.cx("nodes")},e.ptm("nodes")),[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.node.children,(function(t){return s.openBlock(),s.createElementBlock("td",s.mergeProps({key:t.key,colspan:"2"},e.ptm("nodeCell")),[s.createVNode(c,{node:t,templates:o.templates,collapsedKeys:o.collapsedKeys,onNodeToggle:i.onChildNodeToggle,collapsible:o.collapsible,selectionMode:o.selectionMode,selectionKeys:o.selectionKeys,onNodeClick:i.onChildNodeClick,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","collapsedKeys","onNodeToggle","collapsible","selectionMode","selectionKeys","onNodeClick","pt","unstyled"])],16)})),128))],16)],16)],16)};var b={name:"OrganizationChart",extends:r,inheritAttrs:!1,emits:["node-unselect","node-select","update:selectionKeys","node-expand","node-collapse","update:collapsedKeys"],data:function(){return{d_collapsedKeys:this.collapsedKeys||{}}},watch:{collapsedKeys:function(e){this.d_collapsedKeys=e}},methods:{onNodeClick:function(e){var t=e.key;if(this.selectionMode){var o=this.selectionKeys?y({},this.selectionKeys):{};o[t]?(delete o[t],this.$emit("node-unselect",e)):("single"===this.selectionMode&&(o={}),o[t]=!0,this.$emit("node-select",e)),this.$emit("update:selectionKeys",o)}},onNodeToggle:function(e){var t=e.key;this.d_collapsedKeys[t]?(delete this.d_collapsedKeys[t],this.$emit("node-expand",e)):(this.d_collapsedKeys[t]=!0,this.$emit("node-collapse",e)),this.d_collapsedKeys=y({},this.d_collapsedKeys),this.$emit("update:collapsedKeys",this.d_collapsedKeys)}},components:{OrganizationChartNode:d}};return b.render=function(e,t,o,n,l,i){var c=s.resolveComponent("OrganizationChartNode");return s.openBlock(),s.createElementBlock("div",s.mergeProps({class:e.cx("root")},e.ptmi("root")),[s.createVNode(c,{node:e.value,templates:e.$slots,onNodeToggle:i.onNodeToggle,collapsedKeys:l.d_collapsedKeys,collapsible:e.collapsible,onNodeClick:i.onNodeClick,selectionMode:e.selectionMode,selectionKeys:e.selectionKeys,pt:e.pt,unstyled:e.unstyled},null,8,["node","templates","onNodeToggle","collapsedKeys","collapsible","onNodeClick","selectionMode","selectionKeys","pt","unstyled"])],16)},b}(primevue.basecomponent,primevue.organizationchart.style,primevue.icons.chevrondown,primevue.icons.chevronup,primevue.utils,Vue);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { PassThroughOptions } from '../passthrough';
|
|
13
|
-
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
13
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough, HintedString } from '../ts-helpers';
|
|
14
14
|
|
|
15
15
|
export declare type OverlayPanelPassThroughOptionType = OverlayPanelPassThroughAttributes | ((options: OverlayPanelPassThroughMethodOptions) => OverlayPanelPassThroughAttributes | string) | string | null | undefined;
|
|
16
16
|
|
|
@@ -136,7 +136,7 @@ export interface OverlayPanelProps {
|
|
|
136
136
|
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
|
137
137
|
* @defaultValue body
|
|
138
138
|
*/
|
|
139
|
-
appendTo?: 'body' | 'self' |
|
|
139
|
+
appendTo?: HintedString<'body' | 'self'> | undefined | HTMLElement;
|
|
140
140
|
/**
|
|
141
141
|
* Base zIndex value to use in layering.
|
|
142
142
|
* @defaultValue 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Portal :appendTo="appendTo">
|
|
3
3
|
<transition name="p-overlaypanel" @enter="onEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
|
4
|
-
<div v-if="visible" :ref="containerRef" v-focustrap role="dialog" :aria-modal="visible" @click="onOverlayClick" :class="cx('root')" v-bind="
|
|
4
|
+
<div v-if="visible" :ref="containerRef" v-focustrap role="dialog" :aria-modal="visible" @click="onOverlayClick" :class="cx('root')" v-bind="ptmi('root')">
|
|
5
5
|
<slot v-if="$slots.container" name="container" :onClose="hide" :onKeydown="(event) => onButtonKeydown(event)" :closeCallback="hide" :keydownCallback="(event) => onButtonKeydown(event)"></slot>
|
|
6
6
|
<template v-else>
|
|
7
7
|
<div :class="cx('content')" @click="onContentClick" @mousedown="onContentClick" @keydown="onContentKeydown" v-bind="ptm('content')">
|