primevue 4.2.5 → 4.3.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/LICENSE.md +1 -1
- package/accordion/Accordion.vue +0 -8
- package/accordion/index.mjs +1 -9
- package/accordion/index.mjs.map +1 -1
- package/accordion/style/index.mjs +2 -5
- package/accordion/style/index.mjs.map +1 -1
- package/accordioncontent/index.mjs +1 -1
- package/accordionheader/AccordionHeader.vue +2 -2
- package/accordionheader/index.mjs +4 -4
- package/accordionheader/index.mjs.map +1 -1
- package/accordionpanel/index.mjs +1 -1
- package/animateonscroll/index.d.ts +1 -1
- package/animateonscroll/index.mjs +4 -4
- package/animateonscroll/index.mjs.map +1 -1
- package/animateonscroll/style/index.d.ts +1 -1
- package/autocomplete/AutoComplete.vue +90 -23
- package/autocomplete/index.d.ts +19 -2
- package/autocomplete/index.mjs +127 -55
- package/autocomplete/index.mjs.map +1 -1
- package/autocomplete/style/index.mjs +15 -19
- package/autocomplete/style/index.mjs.map +1 -1
- package/avatar/index.mjs +1 -1
- package/avatar/style/index.mjs +4 -7
- package/avatar/style/index.mjs.map +1 -1
- package/avatargroup/index.mjs +1 -1
- package/badge/index.mjs +1 -1
- package/badge/style/index.mjs +6 -9
- package/badge/style/index.mjs.map +1 -1
- package/badgedirective/index.mjs +6 -6
- package/badgedirective/index.mjs.map +1 -1
- package/blockui/BlockUI.vue +2 -1
- package/blockui/index.mjs +3 -2
- package/blockui/index.mjs.map +1 -1
- package/blockui/style/index.mjs +2 -5
- package/blockui/style/index.mjs.map +1 -1
- package/breadcrumb/index.mjs +1 -1
- package/breadcrumb/style/index.mjs +4 -7
- package/breadcrumb/style/index.mjs.map +1 -1
- package/button/Button.vue +1 -1
- package/button/index.d.ts +11 -1
- package/button/index.mjs +5 -4
- package/button/index.mjs.map +1 -1
- package/button/style/index.mjs +9 -12
- package/button/style/index.mjs.map +1 -1
- package/buttongroup/index.mjs +1 -1
- package/buttongroup/style/index.mjs +2 -5
- package/buttongroup/style/index.mjs.map +1 -1
- package/card/index.mjs +1 -1
- package/card/style/index.mjs +2 -5
- package/card/style/index.mjs.map +1 -1
- package/carousel/index.mjs +2 -2
- package/carousel/index.mjs.map +1 -1
- package/carousel/style/index.mjs +19 -22
- package/carousel/style/index.mjs.map +1 -1
- package/cascadeselect/CascadeSelect.vue +16 -17
- package/cascadeselect/CascadeSelectSub.vue +1 -1
- package/cascadeselect/index.d.ts +2 -2
- package/cascadeselect/index.mjs +26 -28
- package/cascadeselect/index.mjs.map +1 -1
- package/cascadeselect/style/index.mjs +17 -19
- package/cascadeselect/style/index.mjs.map +1 -1
- package/chart/index.mjs +4 -4
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.mjs +2 -2
- package/checkbox/index.mjs.map +1 -1
- package/checkbox/style/index.mjs +5 -8
- package/checkbox/style/index.mjs.map +1 -1
- package/checkboxgroup/index.mjs +1 -1
- package/checkboxgroup/style/index.mjs +2 -5
- package/checkboxgroup/style/index.mjs.map +1 -1
- package/chip/index.mjs +1 -1
- package/chip/style/index.mjs +2 -5
- package/chip/style/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +2 -2
- package/colorpicker/index.mjs +7 -7
- package/colorpicker/index.mjs.map +1 -1
- package/colorpicker/style/index.mjs +7 -10
- package/colorpicker/style/index.mjs.map +1 -1
- package/column/BaseColumn.vue +1 -1
- package/column/index.d.ts +2 -2
- package/column/index.mjs +1 -1
- package/column/index.mjs.map +1 -1
- package/columngroup/index.mjs.map +1 -1
- package/confirmdialog/index.d.ts +4 -0
- package/confirmdialog/index.mjs +1 -1
- package/confirmdialog/index.mjs.map +1 -1
- package/confirmdialog/style/index.mjs +2 -5
- package/confirmdialog/style/index.mjs.map +1 -1
- package/confirmpopup/ConfirmPopup.vue +2 -2
- package/confirmpopup/index.mjs +4 -4
- package/confirmpopup/index.mjs.map +1 -1
- package/confirmpopup/style/index.mjs +2 -5
- package/confirmpopup/style/index.mjs.map +1 -1
- package/contextmenu/ContextMenu.vue +6 -12
- package/contextmenu/index.mjs +9 -15
- package/contextmenu/index.mjs.map +1 -1
- package/contextmenu/style/index.mjs +7 -10
- package/contextmenu/style/index.mjs.map +1 -1
- package/datatable/BodyCell.vue +24 -14
- package/datatable/BodyRow.vue +0 -1
- package/datatable/ColumnFilter.vue +10 -16
- package/datatable/DataTable.vue +6 -6
- package/datatable/FilterHeaderCell.vue +189 -0
- package/datatable/FooterCell.vue +2 -2
- package/datatable/HeaderCell.vue +4 -4
- package/datatable/TableBody.vue +3 -10
- package/datatable/TableHeader.vue +23 -50
- package/datatable/index.d.ts +89 -39
- package/datatable/index.mjs +444 -234
- package/datatable/index.mjs.map +1 -1
- package/datatable/style/index.mjs +32 -36
- package/datatable/style/index.mjs.map +1 -1
- package/dataview/index.mjs +2 -2
- package/dataview/index.mjs.map +1 -1
- package/dataview/style/index.mjs +6 -9
- package/dataview/style/index.mjs.map +1 -1
- package/datepicker/BaseDatePicker.vue +0 -4
- package/datepicker/DatePicker.vue +46 -20
- package/datepicker/index.d.ts +2 -6
- package/datepicker/index.mjs +78 -52
- package/datepicker/index.mjs.map +1 -1
- package/datepicker/style/index.mjs +26 -28
- package/datepicker/style/index.mjs.map +1 -1
- package/deferredcontent/index.mjs +1 -1
- package/dialog/Dialog.vue +3 -11
- package/dialog/index.d.ts +1 -1
- package/dialog/index.mjs +7 -14
- package/dialog/index.mjs.map +1 -1
- package/dialog/style/index.mjs +10 -14
- package/dialog/style/index.mjs.map +1 -1
- package/divider/index.mjs +1 -1
- package/divider/style/index.mjs +6 -10
- package/divider/style/index.mjs.map +1 -1
- package/dock/DockSub.vue +5 -13
- package/dock/index.mjs +6 -14
- package/dock/index.mjs.map +1 -1
- package/dock/style/index.mjs +9 -12
- package/dock/style/index.mjs.map +1 -1
- package/drawer/Drawer.vue +7 -4
- package/drawer/index.d.ts +4 -0
- package/drawer/index.mjs +7 -5
- package/drawer/index.mjs.map +1 -1
- package/drawer/style/index.mjs +10 -13
- package/drawer/style/index.mjs.map +1 -1
- package/dynamicdialog/DynamicDialog.vue +5 -5
- package/dynamicdialog/index.mjs +8 -6
- package/dynamicdialog/index.mjs.map +1 -1
- package/editor/Editor.vue +9 -11
- package/editor/index.d.ts +0 -15
- package/editor/index.mjs +16 -16
- package/editor/index.mjs.map +1 -1
- package/editor/style/index.mjs +4 -7
- package/editor/style/index.mjs.map +1 -1
- package/fieldset/Fieldset.vue +4 -12
- package/fieldset/index.mjs +9 -17
- package/fieldset/index.mjs.map +1 -1
- package/fieldset/style/index.mjs +4 -7
- package/fieldset/style/index.mjs.map +1 -1
- package/fileupload/FileUpload.vue +9 -7
- package/fileupload/index.d.ts +3 -3
- package/fileupload/index.mjs +12 -10
- package/fileupload/index.mjs.map +1 -1
- package/fileupload/style/index.mjs +4 -7
- package/fileupload/style/index.mjs.map +1 -1
- package/floatlabel/index.mjs +1 -1
- package/floatlabel/style/index.mjs +4 -8
- package/floatlabel/style/index.mjs.map +1 -1
- package/fluid/index.mjs +1 -1
- package/focustrap/index.mjs +4 -4
- package/focustrap/index.mjs.map +1 -1
- package/galleria/Galleria.vue +2 -1
- package/galleria/GalleriaContent.vue +3 -11
- package/galleria/GalleriaThumbnails.vue +15 -8
- package/galleria/index.mjs +28 -30
- package/galleria/index.mjs.map +1 -1
- package/galleria/style/index.mjs +23 -26
- package/galleria/style/index.mjs.map +1 -1
- package/iconfield/index.mjs +1 -1
- package/iconfield/style/index.mjs +2 -5
- package/iconfield/style/index.mjs.map +1 -1
- package/iftalabel/index.mjs +1 -1
- package/iftalabel/style/index.mjs +2 -5
- package/iftalabel/style/index.mjs.map +1 -1
- package/image/Image.vue +2 -1
- package/image/index.d.ts +4 -0
- package/image/index.mjs +6 -5
- package/image/index.mjs.map +1 -1
- package/image/style/index.mjs +8 -11
- package/image/style/index.mjs.map +1 -1
- package/imagecompare/index.mjs +1 -1
- package/imagecompare/style/index.mjs +2 -5
- package/imagecompare/style/index.mjs.map +1 -1
- package/index.d.ts +3 -0
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/inlinemessage/index.mjs +1 -1
- package/inlinemessage/style/index.mjs +7 -10
- package/inlinemessage/style/index.mjs.map +1 -1
- package/inplace/index.mjs +4 -4
- package/inplace/style/index.mjs +4 -7
- package/inplace/style/index.mjs.map +1 -1
- package/inputchips/InputChips.vue +2 -10
- package/inputchips/index.mjs +6 -14
- package/inputchips/index.mjs.map +1 -1
- package/inputchips/style/index.mjs +11 -14
- package/inputchips/style/index.mjs.map +1 -1
- package/inputgroup/index.mjs +1 -1
- package/inputgroup/style/index.mjs +2 -5
- package/inputgroup/style/index.mjs.map +1 -1
- package/inputgroupaddon/index.mjs +1 -1
- package/inputicon/index.mjs +1 -1
- package/inputmask/InputMask.vue +26 -17
- package/inputmask/index.d.ts +2 -2
- package/inputmask/index.mjs +28 -17
- package/inputmask/index.mjs.map +1 -1
- package/inputnumber/InputNumber.vue +17 -6
- package/inputnumber/index.d.ts +4 -4
- package/inputnumber/index.mjs +20 -12
- package/inputnumber/index.mjs.map +1 -1
- package/inputnumber/style/index.mjs +12 -14
- package/inputnumber/style/index.mjs.map +1 -1
- package/inputotp/index.d.ts +23 -8
- package/inputotp/index.mjs +1 -1
- package/inputotp/style/index.mjs +2 -5
- package/inputotp/style/index.mjs.map +1 -1
- package/inputtext/InputText.vue +1 -1
- package/inputtext/index.d.ts +1 -1
- package/inputtext/index.mjs +3 -2
- package/inputtext/index.mjs.map +1 -1
- package/inputtext/style/index.mjs +5 -8
- package/inputtext/style/index.mjs.map +1 -1
- package/keyfilter/index.mjs +8 -9
- package/keyfilter/index.mjs.map +1 -1
- package/knob/index.mjs +3 -3
- package/knob/index.mjs.map +1 -1
- package/knob/style/index.mjs +5 -8
- package/knob/style/index.mjs.map +1 -1
- package/listbox/Listbox.vue +7 -13
- package/listbox/index.mjs +10 -16
- package/listbox/index.mjs.map +1 -1
- package/listbox/style/index.mjs +11 -14
- package/listbox/style/index.mjs.map +1 -1
- package/megamenu/MegaMenu.vue +9 -15
- package/megamenu/index.mjs +12 -18
- package/megamenu/index.mjs.map +1 -1
- package/megamenu/style/index.mjs +15 -18
- package/megamenu/style/index.mjs.map +1 -1
- package/menu/Menu.vue +9 -17
- package/menu/index.d.ts +10 -0
- package/menu/index.mjs +10 -17
- package/menu/index.mjs.map +1 -1
- package/menu/style/index.mjs +6 -9
- package/menu/style/index.mjs.map +1 -1
- package/menubar/Menubar.vue +10 -16
- package/menubar/index.mjs +14 -20
- package/menubar/index.mjs.map +1 -1
- package/menubar/style/index.mjs +10 -13
- package/menubar/style/index.mjs.map +1 -1
- package/message/index.mjs +4 -4
- package/message/style/index.mjs +4 -7
- package/message/style/index.mjs.map +1 -1
- package/metergroup/index.mjs +1 -1
- package/metergroup/style/index.mjs +6 -9
- package/metergroup/style/index.mjs.map +1 -1
- package/multiselect/MultiSelect.vue +23 -18
- package/multiselect/index.d.ts +12 -6
- package/multiselect/index.mjs +32 -28
- package/multiselect/index.mjs.map +1 -1
- package/multiselect/style/index.mjs +17 -20
- package/multiselect/style/index.mjs.map +1 -1
- package/orderlist/OrderList.vue +1 -10
- package/orderlist/index.mjs +7 -15
- package/orderlist/index.mjs.map +1 -1
- package/orderlist/style/index.mjs +2 -5
- package/orderlist/style/index.mjs.map +1 -1
- package/organizationchart/index.mjs +4 -4
- package/organizationchart/style/index.mjs +9 -12
- package/organizationchart/style/index.mjs.map +1 -1
- package/overlaybadge/index.mjs +1 -1
- package/overlaybadge/style/index.mjs +2 -5
- package/overlaybadge/style/index.mjs.map +1 -1
- package/package.json +6 -5
- package/paginator/index.mjs +2 -2
- package/paginator/index.mjs.map +1 -1
- package/paginator/style/index.mjs +18 -21
- package/paginator/style/index.mjs.map +1 -1
- package/panel/Panel.vue +5 -13
- package/panel/index.mjs +7 -15
- package/panel/index.mjs.map +1 -1
- package/panel/style/index.mjs +4 -7
- package/panel/style/index.mjs.map +1 -1
- package/panelmenu/PanelMenu.vue +2 -12
- package/panelmenu/index.mjs +8 -18
- package/panelmenu/index.mjs.map +1 -1
- package/panelmenu/style/index.mjs +8 -11
- package/panelmenu/style/index.mjs.map +1 -1
- package/passthrough/index.mjs +3 -3
- package/password/Password.vue +3 -10
- package/password/index.d.ts +2 -2
- package/password/index.mjs +9 -16
- package/password/index.mjs.map +1 -1
- package/password/style/index.mjs +8 -11
- package/password/style/index.mjs.map +1 -1
- package/picklist/PickList.vue +2 -9
- package/picklist/index.mjs +8 -14
- package/picklist/index.mjs.map +1 -1
- package/picklist/style/index.mjs +2 -5
- package/picklist/style/index.mjs.map +1 -1
- package/popover/Popover.vue +2 -2
- package/popover/index.mjs +4 -4
- package/popover/index.mjs.map +1 -1
- package/popover/style/index.mjs +2 -5
- package/popover/style/index.mjs.map +1 -1
- package/portal/index.mjs +1 -1
- package/progressbar/index.mjs +1 -1
- package/progressbar/style/index.mjs +4 -7
- package/progressbar/style/index.mjs.map +1 -1
- package/progressspinner/index.mjs +1 -1
- package/progressspinner/style/index.mjs +2 -5
- package/progressspinner/style/index.mjs.map +1 -1
- package/radiobutton/index.d.ts +2 -2
- package/radiobutton/index.mjs +1 -1
- package/radiobutton/index.mjs.map +1 -1
- package/radiobutton/style/index.mjs +5 -8
- package/radiobutton/style/index.mjs.map +1 -1
- package/radiobuttongroup/index.mjs +1 -1
- package/radiobuttongroup/style/index.mjs +2 -5
- package/radiobuttongroup/style/index.mjs.map +1 -1
- package/rating/Rating.vue +6 -11
- package/rating/index.mjs +7 -12
- package/rating/index.mjs.map +1 -1
- package/rating/style/index.mjs +11 -14
- package/rating/style/index.mjs.map +1 -1
- package/ripple/index.mjs +16 -13
- package/ripple/index.mjs.map +1 -1
- package/ripple/style/index.mjs +2 -5
- package/ripple/style/index.mjs.map +1 -1
- package/row/index.mjs.map +1 -1
- package/scrollpanel/ScrollPanel.vue +1 -10
- package/scrollpanel/index.mjs +3 -11
- package/scrollpanel/index.mjs.map +1 -1
- package/scrollpanel/style/index.mjs +2 -5
- package/scrollpanel/style/index.mjs.map +1 -1
- package/scrolltop/index.mjs +1 -1
- package/scrolltop/style/index.mjs +4 -7
- package/scrolltop/style/index.mjs.map +1 -1
- package/select/Select.vue +55 -26
- package/select/index.d.ts +9 -5
- package/select/index.mjs +89 -63
- package/select/index.mjs.map +1 -1
- package/select/style/index.mjs +15 -18
- package/select/style/index.mjs.map +1 -1
- package/selectbutton/index.mjs +3 -3
- package/selectbutton/style/index.mjs +4 -7
- package/selectbutton/style/index.mjs.map +1 -1
- package/skeleton/index.mjs +1 -1
- package/skeleton/style/index.mjs +4 -7
- package/skeleton/style/index.mjs.map +1 -1
- package/slider/Slider.vue +1 -1
- package/slider/index.mjs +3 -3
- package/slider/index.mjs.map +1 -1
- package/slider/style/index.mjs +5 -8
- package/slider/style/index.mjs.map +1 -1
- package/speeddial/SpeedDial.vue +8 -15
- package/speeddial/index.d.ts +1 -1
- package/speeddial/index.mjs +13 -19
- package/speeddial/index.mjs.map +1 -1
- package/speeddial/style/index.mjs +15 -18
- package/speeddial/style/index.mjs.map +1 -1
- package/splitbutton/SplitButton.vue +2 -11
- package/splitbutton/index.d.ts +2 -2
- package/splitbutton/index.mjs +3 -11
- package/splitbutton/index.mjs.map +1 -1
- package/splitbutton/style/index.mjs +5 -8
- package/splitbutton/style/index.mjs.map +1 -1
- package/splitter/Splitter.vue +31 -14
- package/splitter/index.d.ts +1 -1
- package/splitter/index.mjs +28 -14
- package/splitter/index.mjs.map +1 -1
- package/splitter/style/index.mjs +6 -9
- package/splitter/style/index.mjs.map +1 -1
- package/splitterpanel/index.mjs +1 -1
- package/step/index.mjs +1 -1
- package/step/index.mjs.map +1 -1
- package/stepitem/index.mjs +1 -1
- package/stepitem/index.mjs.map +1 -1
- package/steplist/index.mjs +1 -1
- package/steppanel/index.mjs +1 -1
- package/steppanel/index.mjs.map +1 -1
- package/steppanels/index.mjs +1 -1
- package/stepper/Stepper.vue +0 -8
- package/stepper/index.mjs +1 -9
- package/stepper/index.mjs.map +1 -1
- package/stepper/style/index.mjs +4 -7
- package/stepper/style/index.mjs.map +1 -1
- package/steps/index.mjs +2 -2
- package/steps/style/index.mjs +8 -11
- package/steps/style/index.mjs.map +1 -1
- package/styleclass/index.mjs +1 -1
- package/tab/Tab.vue +3 -3
- package/tab/index.mjs +4 -4
- package/tab/index.mjs.map +1 -1
- package/tablist/TabList.vue +2 -2
- package/tablist/index.mjs +4 -4
- package/tablist/index.mjs.map +1 -1
- package/tabmenu/index.mjs +2 -2
- package/tabmenu/index.mjs.map +1 -1
- package/tabmenu/style/index.mjs +6 -9
- package/tabmenu/style/index.mjs.map +1 -1
- package/tabpanel/index.mjs +1 -1
- package/tabpanel/index.mjs.map +1 -1
- package/tabpanels/index.mjs +1 -1
- package/tabs/Tabs.vue +0 -8
- package/tabs/index.mjs +1 -9
- package/tabs/index.mjs.map +1 -1
- package/tabs/style/index.mjs +4 -7
- package/tabs/style/index.mjs.map +1 -1
- package/tabview/TabView.vue +3 -9
- package/tabview/index.mjs +7 -13
- package/tabview/index.mjs.map +1 -1
- package/tabview/style/index.mjs +11 -14
- package/tabview/style/index.mjs.map +1 -1
- package/tag/index.mjs +1 -1
- package/tag/style/index.mjs +4 -7
- package/tag/style/index.mjs.map +1 -1
- package/terminal/index.mjs +1 -1
- package/terminal/style/index.mjs +2 -5
- package/terminal/style/index.mjs.map +1 -1
- package/textarea/Textarea.vue +5 -2
- package/textarea/index.d.ts +4 -4
- package/textarea/index.mjs +7 -3
- package/textarea/index.mjs.map +1 -1
- package/textarea/style/index.mjs +5 -8
- package/textarea/style/index.mjs.map +1 -1
- package/tieredmenu/TieredMenu.vue +8 -13
- package/tieredmenu/index.mjs +11 -16
- package/tieredmenu/index.mjs.map +1 -1
- package/tieredmenu/style/index.mjs +11 -14
- package/tieredmenu/style/index.mjs.map +1 -1
- package/timeline/index.d.ts +4 -0
- package/timeline/index.mjs +1 -1
- package/timeline/style/index.mjs +4 -7
- package/timeline/style/index.mjs.map +1 -1
- package/toast/BaseToast.vue +12 -0
- package/toast/ToastMessage.vue +38 -4
- package/toast/index.d.ts +12 -0
- package/toast/index.mjs +79 -15
- package/toast/index.mjs.map +1 -1
- package/toast/style/index.mjs +12 -15
- package/toast/style/index.mjs.map +1 -1
- package/togglebutton/ToggleButton.vue +1 -0
- package/togglebutton/index.mjs +3 -2
- package/togglebutton/index.mjs.map +1 -1
- package/togglebutton/style/index.mjs +5 -8
- package/togglebutton/style/index.mjs.map +1 -1
- package/toggleswitch/index.mjs +1 -1
- package/toggleswitch/index.mjs.map +1 -1
- package/toggleswitch/style/index.mjs +5 -8
- package/toggleswitch/style/index.mjs.map +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar/style/index.mjs +2 -5
- package/toolbar/style/index.mjs.map +1 -1
- package/tooltip/index.mjs +62 -14
- package/tooltip/index.mjs.map +1 -1
- package/tooltip/style/index.mjs +2 -5
- package/tooltip/style/index.mjs.map +1 -1
- package/tree/Tree.vue +2 -2
- package/tree/index.mjs +16 -16
- package/tree/index.mjs.map +1 -1
- package/tree/style/index.mjs +8 -11
- package/tree/style/index.mjs.map +1 -1
- package/treeselect/TreeSelect.vue +21 -26
- package/treeselect/index.d.ts +2 -2
- package/treeselect/index.mjs +56 -72
- package/treeselect/index.mjs.map +1 -1
- package/treeselect/style/index.mjs +10 -13
- package/treeselect/style/index.mjs.map +1 -1
- package/treetable/BodyCell.vue +8 -5
- package/treetable/FooterCell.vue +2 -2
- package/treetable/HeaderCell.vue +4 -4
- package/treetable/index.d.ts +29 -0
- package/treetable/index.mjs +42 -35
- package/treetable/index.mjs.map +1 -1
- package/treetable/style/index.mjs +22 -25
- package/treetable/style/index.mjs.map +1 -1
- package/umd/primevue.min.js +1 -1
- package/utils/index.d.ts +9 -0
- package/utils/index.mjs +16 -0
- package/utils/index.mjs.map +1 -0
- package/utils/package.json +5 -0
- package/virtualscroller/VirtualScroller.vue +16 -10
- package/virtualscroller/index.mjs +21 -15
- package/virtualscroller/index.mjs.map +1 -1
- package/virtualscroller/style/index.mjs +2 -5
- package/virtualscroller/style/index.mjs.map +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/speeddial/style/SpeedDialStyle.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/speeddial/style/SpeedDialStyle.js"],"sourcesContent":["import { style } from '@primeuix/styles/speeddial';\nimport BaseStyle from '@primevue/core/base/style';\n\n/* Direction */\nconst inlineStyles = {\n root: ({ props }) => ({\n alignItems: (props.direction === 'up' || props.direction === 'down') && 'center',\n justifyContent: (props.direction === 'left' || props.direction === 'right') && 'center',\n flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null\n }),\n list: ({ props }) => ({\n flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null\n })\n};\n\nconst classes = {\n root: ({ instance, props }) => [\n `p-speeddial p-component p-speeddial-${props.type}`,\n {\n [`p-speeddial-direction-${props.direction}`]: props.type !== 'circle',\n 'p-speeddial-open': instance.d_visible,\n 'p-disabled': props.disabled\n }\n ],\n pcButton: ({ props }) => [\n 'p-speeddial-button',\n {\n 'p-speeddial-rotate': props.rotateAnimation && !props.hideIcon\n }\n ],\n list: 'p-speeddial-list',\n item: 'p-speeddial-item',\n action: 'p-speeddial-action',\n actionIcon: 'p-speeddial-action-icon',\n mask: ({ instance }) => [\n 'p-speeddial-mask',\n {\n 'p-speeddial-mask-visible': instance.d_visible\n }\n ]\n};\n\nexport default BaseStyle.extend({\n name: 'speeddial',\n style,\n classes,\n inlineStyles\n});\n"],"names":["inlineStyles","root","_ref","props","alignItems","direction","justifyContent","flexDirection","list","_ref2","classes","_ref3","instance","concat","type","_defineProperty","d_visible","disabled","pcButton","_ref5","rotateAnimation","hideIcon","item","action","actionIcon","mask","_ref6","BaseStyle","extend","name","style"],"mappings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'"
|
|
37
37
|
@click="onDropdownButtonClick"
|
|
38
38
|
@keydown="onDropdownKeydown"
|
|
39
39
|
:severity="severity"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</slot>
|
|
52
52
|
</template>
|
|
53
53
|
</PVSButton>
|
|
54
|
-
<PVSMenu ref="menu" :id="id + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" :unstyled="unstyled" :pt="ptm('pcMenu')">
|
|
54
|
+
<PVSMenu ref="menu" :id="$id + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" :unstyled="unstyled" :pt="ptm('pcMenu')">
|
|
55
55
|
<template v-if="$slots.menuitemicon" #itemicon="slotProps">
|
|
56
56
|
<slot name="menuitemicon" :item="slotProps.item" :class="slotProps.class" />
|
|
57
57
|
</template>
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
|
|
65
65
|
<script>
|
|
66
66
|
import { isEmpty } from '@primeuix/utils/object';
|
|
67
|
-
import { UniqueComponentId } from '@primevue/core/utils';
|
|
68
67
|
import ChevronDownIcon from '@primevue/icons/chevrondown';
|
|
69
68
|
import Button from 'primevue/button';
|
|
70
69
|
import TieredMenu from 'primevue/tieredmenu';
|
|
@@ -80,18 +79,10 @@ export default {
|
|
|
80
79
|
},
|
|
81
80
|
data() {
|
|
82
81
|
return {
|
|
83
|
-
id: this.$attrs.id,
|
|
84
82
|
isExpanded: false
|
|
85
83
|
};
|
|
86
84
|
},
|
|
87
|
-
watch: {
|
|
88
|
-
'$attrs.id': function (newValue) {
|
|
89
|
-
this.id = newValue || UniqueComponentId();
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
85
|
mounted() {
|
|
93
|
-
this.id = this.id || UniqueComponentId();
|
|
94
|
-
|
|
95
86
|
this.$watch('$refs.menu.visible', (newValue) => {
|
|
96
87
|
this.isExpanded = newValue;
|
|
97
88
|
});
|
package/splitbutton/index.d.ts
CHANGED
|
@@ -104,10 +104,10 @@ export interface SplitButtonPassThroughAttributes {
|
|
|
104
104
|
*/
|
|
105
105
|
export interface SplitButtonState {
|
|
106
106
|
/**
|
|
107
|
-
* Current
|
|
107
|
+
* Current expanded state as a boolean.
|
|
108
108
|
* @defaultValue false
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
isExpanded: boolean;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/**
|
package/splitbutton/index.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { isEmpty } from '@primeuix/utils/object';
|
|
2
|
-
import { UniqueComponentId } from '@primevue/core/utils';
|
|
3
2
|
import ChevronDownIcon from '@primevue/icons/chevrondown';
|
|
4
3
|
import Button from 'primevue/button';
|
|
5
4
|
import TieredMenu from 'primevue/tieredmenu';
|
|
6
5
|
import BaseComponent from '@primevue/core/basecomponent';
|
|
7
6
|
import SplitButtonStyle from 'primevue/splitbutton/style';
|
|
8
|
-
import { resolveComponent,
|
|
7
|
+
import { resolveComponent, createElementBlock, openBlock, mergeProps, createVNode, createSlots, withCtx, renderSlot, normalizeClass, createElementVNode, createBlock, resolveDynamicComponent } from 'vue';
|
|
9
8
|
|
|
10
9
|
var script$1 = {
|
|
11
10
|
name: 'BaseSplitButton',
|
|
@@ -117,18 +116,11 @@ var script = {
|
|
|
117
116
|
},
|
|
118
117
|
data: function data() {
|
|
119
118
|
return {
|
|
120
|
-
id: this.$attrs.id,
|
|
121
119
|
isExpanded: false
|
|
122
120
|
};
|
|
123
121
|
},
|
|
124
|
-
watch: {
|
|
125
|
-
'$attrs.id': function $attrsId(newValue) {
|
|
126
|
-
this.id = newValue || UniqueComponentId();
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
122
|
mounted: function mounted() {
|
|
130
123
|
var _this = this;
|
|
131
|
-
this.id = this.id || UniqueComponentId();
|
|
132
124
|
this.$watch('$refs.menu.visible', function (newValue) {
|
|
133
125
|
_this.isExpanded = newValue;
|
|
134
126
|
});
|
|
@@ -223,7 +215,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
223
215
|
disabled: _ctx.disabled,
|
|
224
216
|
"aria-haspopup": "true",
|
|
225
217
|
"aria-expanded": $data.isExpanded,
|
|
226
|
-
"aria-controls":
|
|
218
|
+
"aria-controls": _ctx.$id + '_overlay',
|
|
227
219
|
onClick: $options.onDropdownButtonClick,
|
|
228
220
|
onKeydown: $options.onDropdownKeydown,
|
|
229
221
|
severity: _ctx.severity,
|
|
@@ -248,7 +240,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
248
240
|
_: 3
|
|
249
241
|
}, 16, ["class", "disabled", "aria-expanded", "aria-controls", "onClick", "onKeydown", "severity", "text", "outlined", "size", "unstyled", "pt"]), createVNode(_component_PVSMenu, {
|
|
250
242
|
ref: "menu",
|
|
251
|
-
id:
|
|
243
|
+
id: _ctx.$id + '_overlay',
|
|
252
244
|
model: _ctx.model,
|
|
253
245
|
popup: true,
|
|
254
246
|
autoZIndex: _ctx.autoZIndex,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/splitbutton/BaseSplitButton.vue","../../src/splitbutton/SplitButton.vue","../../src/splitbutton/SplitButton.vue?vue&type=template&id=27a31422&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitButtonStyle from 'primevue/splitbutton/style';\n\nexport default {\n name: 'BaseSplitButton',\n extends: BaseComponent,\n props: {\n label: {\n type: String,\n default: null\n },\n icon: {\n type: String,\n default: null\n },\n model: {\n type: Array,\n default: null\n },\n autoZIndex: {\n type: Boolean,\n default: true\n },\n baseZIndex: {\n type: Number,\n default: 0\n },\n appendTo: {\n type: [String, Object],\n default: 'body'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n fluid: {\n type: Boolean,\n default: null\n },\n class: {\n type: null,\n default: null\n },\n style: {\n type: null,\n default: null\n },\n buttonProps: {\n type: null,\n default: null\n },\n menuButtonProps: {\n type: null,\n default: null\n },\n menuButtonIcon: {\n type: String,\n default: undefined\n },\n dropdownIcon: {\n type: String,\n default: undefined\n },\n severity: {\n type: String,\n default: null\n },\n raised: {\n type: Boolean,\n default: false\n },\n rounded: {\n type: Boolean,\n default: false\n },\n text: {\n type: Boolean,\n default: false\n },\n outlined: {\n type: Boolean,\n default: false\n },\n size: {\n type: String,\n default: null\n },\n plain: {\n type: Boolean,\n default: false\n }\n },\n style: SplitButtonStyle,\n provide() {\n return {\n $pcSplitButton: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"containerClass\" :style=\"style\" v-bind=\"ptmi('root')\" :data-p-severity=\"severity\">\n <PVSButton\n type=\"button\"\n :class=\"cx('pcButton')\"\n :label=\"label\"\n :disabled=\"disabled\"\n :severity=\"severity\"\n :text=\"text\"\n :icon=\"icon\"\n :outlined=\"outlined\"\n :size=\"size\"\n :fluid=\"fluid\"\n :aria-label=\"label\"\n @click=\"onDefaultButtonClick\"\n v-bind=\"buttonProps\"\n :pt=\"ptm('pcButton')\"\n :unstyled=\"unstyled\"\n >\n <template v-if=\"$slots.icon\" #icon=\"slotProps\">\n <slot name=\"icon\" :class=\"slotProps.class\">\n <span :class=\"[icon, slotProps.class]\" v-bind=\"ptm('pcButton')['icon']\" data-pc-section=\"buttonicon\" />\n </slot>\n </template>\n <template #default>\n <slot></slot>\n </template>\n </PVSButton>\n <PVSButton\n ref=\"button\"\n type=\"button\"\n :class=\"cx('pcDropdown')\"\n :disabled=\"disabled\"\n aria-haspopup=\"true\"\n :aria-expanded=\"isExpanded\"\n :aria-controls=\"id + '_overlay'\"\n @click=\"onDropdownButtonClick\"\n @keydown=\"onDropdownKeydown\"\n :severity=\"severity\"\n :text=\"text\"\n :outlined=\"outlined\"\n :size=\"size\"\n :unstyled=\"unstyled\"\n v-bind=\"menuButtonProps\"\n :pt=\"ptm('pcDropdown')\"\n >\n <template #icon=\"slotProps\">\n <!--TODO: menubuttonicon and menuButtonIcon deprecated since v4.0-->\n <slot :name=\"$slots.dropdownicon ? 'dropdownicon' : 'menubuttonicon'\" :class=\"slotProps.class\">\n <component :is=\"menuButtonIcon || dropdownIcon ? 'span' : 'ChevronDownIcon'\" :class=\"[dropdownIcon || menuButtonIcon, slotProps.class]\" v-bind=\"ptm('pcDropdown')['icon']\" data-pc-section=\"menubuttonicon\" />\n </slot>\n </template>\n </PVSButton>\n <PVSMenu ref=\"menu\" :id=\"id + '_overlay'\" :model=\"model\" :popup=\"true\" :autoZIndex=\"autoZIndex\" :baseZIndex=\"baseZIndex\" :appendTo=\"appendTo\" :unstyled=\"unstyled\" :pt=\"ptm('pcMenu')\">\n <template v-if=\"$slots.menuitemicon\" #itemicon=\"slotProps\">\n <slot name=\"menuitemicon\" :item=\"slotProps.item\" :class=\"slotProps.class\" />\n </template>\n <template v-if=\"$slots.item\" #item=\"slotProps\">\n <slot name=\"item\" :item=\"slotProps.item\" :hasSubmenu=\"slotProps.hasSubmenu\" :label=\"slotProps.label\" :props=\"slotProps.props\"></slot>\n </template>\n </PVSMenu>\n </div>\n</template>\n\n<script>\nimport { isEmpty } from '@primeuix/utils/object';\nimport { UniqueComponentId } from '@primevue/core/utils';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport Button from 'primevue/button';\nimport TieredMenu from 'primevue/tieredmenu';\nimport BaseSplitButton from './BaseSplitButton.vue';\n\nexport default {\n name: 'SplitButton',\n extends: BaseSplitButton,\n inheritAttrs: false,\n emits: ['click'],\n inject: {\n $pcFluid: { default: null }\n },\n data() {\n return {\n id: this.$attrs.id,\n isExpanded: false\n };\n },\n watch: {\n '$attrs.id': function (newValue) {\n this.id = newValue || UniqueComponentId();\n }\n },\n mounted() {\n this.id = this.id || UniqueComponentId();\n\n this.$watch('$refs.menu.visible', (newValue) => {\n this.isExpanded = newValue;\n });\n },\n methods: {\n onDropdownButtonClick(event) {\n if (event) {\n event.preventDefault();\n }\n\n this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });\n this.isExpanded = this.$refs.menu.visible;\n },\n onDropdownKeydown(event) {\n if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {\n this.onDropdownButtonClick();\n event.preventDefault();\n }\n },\n onDefaultButtonClick(event) {\n if (this.isExpanded) {\n this.$refs.menu.hide(event);\n }\n\n this.$emit('click', event);\n }\n },\n computed: {\n containerClass() {\n return [this.cx('root'), this.class];\n },\n hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n PVSButton: Button,\n PVSMenu: TieredMenu,\n ChevronDownIcon: ChevronDownIcon\n }\n};\n</script>\n","<template>\n <div :class=\"containerClass\" :style=\"style\" v-bind=\"ptmi('root')\" :data-p-severity=\"severity\">\n <PVSButton\n type=\"button\"\n :class=\"cx('pcButton')\"\n :label=\"label\"\n :disabled=\"disabled\"\n :severity=\"severity\"\n :text=\"text\"\n :icon=\"icon\"\n :outlined=\"outlined\"\n :size=\"size\"\n :fluid=\"fluid\"\n :aria-label=\"label\"\n @click=\"onDefaultButtonClick\"\n v-bind=\"buttonProps\"\n :pt=\"ptm('pcButton')\"\n :unstyled=\"unstyled\"\n >\n <template v-if=\"$slots.icon\" #icon=\"slotProps\">\n <slot name=\"icon\" :class=\"slotProps.class\">\n <span :class=\"[icon, slotProps.class]\" v-bind=\"ptm('pcButton')['icon']\" data-pc-section=\"buttonicon\" />\n </slot>\n </template>\n <template #default>\n <slot></slot>\n </template>\n </PVSButton>\n <PVSButton\n ref=\"button\"\n type=\"button\"\n :class=\"cx('pcDropdown')\"\n :disabled=\"disabled\"\n aria-haspopup=\"true\"\n :aria-expanded=\"isExpanded\"\n :aria-controls=\"id + '_overlay'\"\n @click=\"onDropdownButtonClick\"\n @keydown=\"onDropdownKeydown\"\n :severity=\"severity\"\n :text=\"text\"\n :outlined=\"outlined\"\n :size=\"size\"\n :unstyled=\"unstyled\"\n v-bind=\"menuButtonProps\"\n :pt=\"ptm('pcDropdown')\"\n >\n <template #icon=\"slotProps\">\n <!--TODO: menubuttonicon and menuButtonIcon deprecated since v4.0-->\n <slot :name=\"$slots.dropdownicon ? 'dropdownicon' : 'menubuttonicon'\" :class=\"slotProps.class\">\n <component :is=\"menuButtonIcon || dropdownIcon ? 'span' : 'ChevronDownIcon'\" :class=\"[dropdownIcon || menuButtonIcon, slotProps.class]\" v-bind=\"ptm('pcDropdown')['icon']\" data-pc-section=\"menubuttonicon\" />\n </slot>\n </template>\n </PVSButton>\n <PVSMenu ref=\"menu\" :id=\"id + '_overlay'\" :model=\"model\" :popup=\"true\" :autoZIndex=\"autoZIndex\" :baseZIndex=\"baseZIndex\" :appendTo=\"appendTo\" :unstyled=\"unstyled\" :pt=\"ptm('pcMenu')\">\n <template v-if=\"$slots.menuitemicon\" #itemicon=\"slotProps\">\n <slot name=\"menuitemicon\" :item=\"slotProps.item\" :class=\"slotProps.class\" />\n </template>\n <template v-if=\"$slots.item\" #item=\"slotProps\">\n <slot name=\"item\" :item=\"slotProps.item\" :hasSubmenu=\"slotProps.hasSubmenu\" :label=\"slotProps.label\" :props=\"slotProps.props\"></slot>\n </template>\n </PVSMenu>\n </div>\n</template>\n\n<script>\nimport { isEmpty } from '@primeuix/utils/object';\nimport { UniqueComponentId } from '@primevue/core/utils';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport Button from 'primevue/button';\nimport TieredMenu from 'primevue/tieredmenu';\nimport BaseSplitButton from './BaseSplitButton.vue';\n\nexport default {\n name: 'SplitButton',\n extends: BaseSplitButton,\n inheritAttrs: false,\n emits: ['click'],\n inject: {\n $pcFluid: { default: null }\n },\n data() {\n return {\n id: this.$attrs.id,\n isExpanded: false\n };\n },\n watch: {\n '$attrs.id': function (newValue) {\n this.id = newValue || UniqueComponentId();\n }\n },\n mounted() {\n this.id = this.id || UniqueComponentId();\n\n this.$watch('$refs.menu.visible', (newValue) => {\n this.isExpanded = newValue;\n });\n },\n methods: {\n onDropdownButtonClick(event) {\n if (event) {\n event.preventDefault();\n }\n\n this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });\n this.isExpanded = this.$refs.menu.visible;\n },\n onDropdownKeydown(event) {\n if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {\n this.onDropdownButtonClick();\n event.preventDefault();\n }\n },\n onDefaultButtonClick(event) {\n if (this.isExpanded) {\n this.$refs.menu.hide(event);\n }\n\n this.$emit('click', event);\n }\n },\n computed: {\n containerClass() {\n return [this.cx('root'), this.class];\n },\n hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n PVSButton: Button,\n PVSMenu: TieredMenu,\n ChevronDownIcon: ChevronDownIcon\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","label","type","String","icon","model","Array","autoZIndex","Boolean","baseZIndex","Number","appendTo","Object","disabled","fluid","style","buttonProps","menuButtonProps","menuButtonIcon","undefined","dropdownIcon","severity","raised","rounded","text","outlined","size","plain","SplitButtonStyle","provide","$pcSplitButton","$parentInstance","BaseSplitButton","inheritAttrs","emits","inject","$pcFluid","data","id","$attrs","isExpanded","watch","$attrsId","newValue","UniqueComponentId","mounted","_this","$watch","methods","onDropdownButtonClick","event","preventDefault","$refs","menu","toggle","currentTarget","$el","relatedTarget","button","visible","onDropdownKeydown","code","onDefaultButtonClick","hide","$emit","computed","containerClass","cx","hasFluid","isEmpty","components","PVSButton","Button","PVSMenu","TieredMenu","ChevronDownIcon","_openBlock","_createElementBlock","_mergeProps","$options","_ctx","ptmi","_createVNode","_component_PVSButton","onClick","pt","ptm","unstyled","_renderSlot","$slots","fn","_withCtx","slotProps","_normalizeClass","_createElementVNode","ref","$data","onKeydown","dropdownicon","_createBlock","_resolveDynamicComponent","_component_PVSMenu","popup","menuitemicon","item","hasSubmenu"],"mappings":";;;;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,iBAAiB;AACvB,EAAA,SAAA,EAASC,aAAa;AACtBC,E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E,IAAQ,CAAArE,QAAA;IAAG4E,QAAQ,EAAEP,IAAQ,CAAAO,QAAA;AAAGF,IAAAA,EAAE,EAAEL,IAAG,CAAAM,GAAA,CAAA,QAAA;;;MACvJN,IAAA,CAAAS,MAAM,CAACc,YAAY;UAAG,UAAQ;AAC1Cb,IAAAA,EAAA,EAAAC,OAAA,CAAA,UAD4CC,SAAS,EAAA;MAAA,OAAA,CACrDJ,UAA2E,CAAAR,IAAA,CAAAS,MAAA,EAAA,cAAA,EAAA;QAAhDe,IAAI,EAAEZ,SAAS,CAACY,IAAI;QAAG,OAAKX,EAAAA,cAAA,CAAED,SAAS,CAAM,OAAA,CAAA;;;;iBAE5DZ,IAAA,CAAAS,MAAM,CAACe,IAAI;UAAG,MAAI;AAC9Bd,IAAAA,EAAA,EAAAC,OAAA,CAAA,UADgCC,SAAS,EAAA;MAAA,OAAA,CACzCJ,UAAoI,CAAAR,IAAA,CAAAS,MAAA,EAAA,MAAA,EAAA;QAAjHe,IAAI,EAAEZ,SAAS,CAACY,IAAI;QAAGC,UAAU,EAAEb,SAAS,CAACa,UAAU;QAAGxG,KAAK,EAAE2F,SAAS,CAAC3F,KAAK;QAAGD,KAAK,EAAE4F,SAAS,CAAC5F;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/splitbutton/BaseSplitButton.vue","../../src/splitbutton/SplitButton.vue","../../src/splitbutton/SplitButton.vue?vue&type=template&id=44d68912&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitButtonStyle from 'primevue/splitbutton/style';\n\nexport default {\n name: 'BaseSplitButton',\n extends: BaseComponent,\n props: {\n label: {\n type: String,\n default: null\n },\n icon: {\n type: String,\n default: null\n },\n model: {\n type: Array,\n default: null\n },\n autoZIndex: {\n type: Boolean,\n default: true\n },\n baseZIndex: {\n type: Number,\n default: 0\n },\n appendTo: {\n type: [String, Object],\n default: 'body'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n fluid: {\n type: Boolean,\n default: null\n },\n class: {\n type: null,\n default: null\n },\n style: {\n type: null,\n default: null\n },\n buttonProps: {\n type: null,\n default: null\n },\n menuButtonProps: {\n type: null,\n default: null\n },\n menuButtonIcon: {\n type: String,\n default: undefined\n },\n dropdownIcon: {\n type: String,\n default: undefined\n },\n severity: {\n type: String,\n default: null\n },\n raised: {\n type: Boolean,\n default: false\n },\n rounded: {\n type: Boolean,\n default: false\n },\n text: {\n type: Boolean,\n default: false\n },\n outlined: {\n type: Boolean,\n default: false\n },\n size: {\n type: String,\n default: null\n },\n plain: {\n type: Boolean,\n default: false\n }\n },\n style: SplitButtonStyle,\n provide() {\n return {\n $pcSplitButton: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"containerClass\" :style=\"style\" v-bind=\"ptmi('root')\" :data-p-severity=\"severity\">\n <PVSButton\n type=\"button\"\n :class=\"cx('pcButton')\"\n :label=\"label\"\n :disabled=\"disabled\"\n :severity=\"severity\"\n :text=\"text\"\n :icon=\"icon\"\n :outlined=\"outlined\"\n :size=\"size\"\n :fluid=\"fluid\"\n :aria-label=\"label\"\n @click=\"onDefaultButtonClick\"\n v-bind=\"buttonProps\"\n :pt=\"ptm('pcButton')\"\n :unstyled=\"unstyled\"\n >\n <template v-if=\"$slots.icon\" #icon=\"slotProps\">\n <slot name=\"icon\" :class=\"slotProps.class\">\n <span :class=\"[icon, slotProps.class]\" v-bind=\"ptm('pcButton')['icon']\" data-pc-section=\"buttonicon\" />\n </slot>\n </template>\n <template #default>\n <slot></slot>\n </template>\n </PVSButton>\n <PVSButton\n ref=\"button\"\n type=\"button\"\n :class=\"cx('pcDropdown')\"\n :disabled=\"disabled\"\n aria-haspopup=\"true\"\n :aria-expanded=\"isExpanded\"\n :aria-controls=\"$id + '_overlay'\"\n @click=\"onDropdownButtonClick\"\n @keydown=\"onDropdownKeydown\"\n :severity=\"severity\"\n :text=\"text\"\n :outlined=\"outlined\"\n :size=\"size\"\n :unstyled=\"unstyled\"\n v-bind=\"menuButtonProps\"\n :pt=\"ptm('pcDropdown')\"\n >\n <template #icon=\"slotProps\">\n <!--TODO: menubuttonicon and menuButtonIcon deprecated since v4.0-->\n <slot :name=\"$slots.dropdownicon ? 'dropdownicon' : 'menubuttonicon'\" :class=\"slotProps.class\">\n <component :is=\"menuButtonIcon || dropdownIcon ? 'span' : 'ChevronDownIcon'\" :class=\"[dropdownIcon || menuButtonIcon, slotProps.class]\" v-bind=\"ptm('pcDropdown')['icon']\" data-pc-section=\"menubuttonicon\" />\n </slot>\n </template>\n </PVSButton>\n <PVSMenu ref=\"menu\" :id=\"$id + '_overlay'\" :model=\"model\" :popup=\"true\" :autoZIndex=\"autoZIndex\" :baseZIndex=\"baseZIndex\" :appendTo=\"appendTo\" :unstyled=\"unstyled\" :pt=\"ptm('pcMenu')\">\n <template v-if=\"$slots.menuitemicon\" #itemicon=\"slotProps\">\n <slot name=\"menuitemicon\" :item=\"slotProps.item\" :class=\"slotProps.class\" />\n </template>\n <template v-if=\"$slots.item\" #item=\"slotProps\">\n <slot name=\"item\" :item=\"slotProps.item\" :hasSubmenu=\"slotProps.hasSubmenu\" :label=\"slotProps.label\" :props=\"slotProps.props\"></slot>\n </template>\n </PVSMenu>\n </div>\n</template>\n\n<script>\nimport { isEmpty } from '@primeuix/utils/object';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport Button from 'primevue/button';\nimport TieredMenu from 'primevue/tieredmenu';\nimport BaseSplitButton from './BaseSplitButton.vue';\n\nexport default {\n name: 'SplitButton',\n extends: BaseSplitButton,\n inheritAttrs: false,\n emits: ['click'],\n inject: {\n $pcFluid: { default: null }\n },\n data() {\n return {\n isExpanded: false\n };\n },\n mounted() {\n this.$watch('$refs.menu.visible', (newValue) => {\n this.isExpanded = newValue;\n });\n },\n methods: {\n onDropdownButtonClick(event) {\n if (event) {\n event.preventDefault();\n }\n\n this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });\n this.isExpanded = this.$refs.menu.visible;\n },\n onDropdownKeydown(event) {\n if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {\n this.onDropdownButtonClick();\n event.preventDefault();\n }\n },\n onDefaultButtonClick(event) {\n if (this.isExpanded) {\n this.$refs.menu.hide(event);\n }\n\n this.$emit('click', event);\n }\n },\n computed: {\n containerClass() {\n return [this.cx('root'), this.class];\n },\n hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n PVSButton: Button,\n PVSMenu: TieredMenu,\n ChevronDownIcon: ChevronDownIcon\n }\n};\n</script>\n","<template>\n <div :class=\"containerClass\" :style=\"style\" v-bind=\"ptmi('root')\" :data-p-severity=\"severity\">\n <PVSButton\n type=\"button\"\n :class=\"cx('pcButton')\"\n :label=\"label\"\n :disabled=\"disabled\"\n :severity=\"severity\"\n :text=\"text\"\n :icon=\"icon\"\n :outlined=\"outlined\"\n :size=\"size\"\n :fluid=\"fluid\"\n :aria-label=\"label\"\n @click=\"onDefaultButtonClick\"\n v-bind=\"buttonProps\"\n :pt=\"ptm('pcButton')\"\n :unstyled=\"unstyled\"\n >\n <template v-if=\"$slots.icon\" #icon=\"slotProps\">\n <slot name=\"icon\" :class=\"slotProps.class\">\n <span :class=\"[icon, slotProps.class]\" v-bind=\"ptm('pcButton')['icon']\" data-pc-section=\"buttonicon\" />\n </slot>\n </template>\n <template #default>\n <slot></slot>\n </template>\n </PVSButton>\n <PVSButton\n ref=\"button\"\n type=\"button\"\n :class=\"cx('pcDropdown')\"\n :disabled=\"disabled\"\n aria-haspopup=\"true\"\n :aria-expanded=\"isExpanded\"\n :aria-controls=\"$id + '_overlay'\"\n @click=\"onDropdownButtonClick\"\n @keydown=\"onDropdownKeydown\"\n :severity=\"severity\"\n :text=\"text\"\n :outlined=\"outlined\"\n :size=\"size\"\n :unstyled=\"unstyled\"\n v-bind=\"menuButtonProps\"\n :pt=\"ptm('pcDropdown')\"\n >\n <template #icon=\"slotProps\">\n <!--TODO: menubuttonicon and menuButtonIcon deprecated since v4.0-->\n <slot :name=\"$slots.dropdownicon ? 'dropdownicon' : 'menubuttonicon'\" :class=\"slotProps.class\">\n <component :is=\"menuButtonIcon || dropdownIcon ? 'span' : 'ChevronDownIcon'\" :class=\"[dropdownIcon || menuButtonIcon, slotProps.class]\" v-bind=\"ptm('pcDropdown')['icon']\" data-pc-section=\"menubuttonicon\" />\n </slot>\n </template>\n </PVSButton>\n <PVSMenu ref=\"menu\" :id=\"$id + '_overlay'\" :model=\"model\" :popup=\"true\" :autoZIndex=\"autoZIndex\" :baseZIndex=\"baseZIndex\" :appendTo=\"appendTo\" :unstyled=\"unstyled\" :pt=\"ptm('pcMenu')\">\n <template v-if=\"$slots.menuitemicon\" #itemicon=\"slotProps\">\n <slot name=\"menuitemicon\" :item=\"slotProps.item\" :class=\"slotProps.class\" />\n </template>\n <template v-if=\"$slots.item\" #item=\"slotProps\">\n <slot name=\"item\" :item=\"slotProps.item\" :hasSubmenu=\"slotProps.hasSubmenu\" :label=\"slotProps.label\" :props=\"slotProps.props\"></slot>\n </template>\n </PVSMenu>\n </div>\n</template>\n\n<script>\nimport { isEmpty } from '@primeuix/utils/object';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport Button from 'primevue/button';\nimport TieredMenu from 'primevue/tieredmenu';\nimport BaseSplitButton from './BaseSplitButton.vue';\n\nexport default {\n name: 'SplitButton',\n extends: BaseSplitButton,\n inheritAttrs: false,\n emits: ['click'],\n inject: {\n $pcFluid: { default: null }\n },\n data() {\n return {\n isExpanded: false\n };\n },\n mounted() {\n this.$watch('$refs.menu.visible', (newValue) => {\n this.isExpanded = newValue;\n });\n },\n methods: {\n onDropdownButtonClick(event) {\n if (event) {\n event.preventDefault();\n }\n\n this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });\n this.isExpanded = this.$refs.menu.visible;\n },\n onDropdownKeydown(event) {\n if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {\n this.onDropdownButtonClick();\n event.preventDefault();\n }\n },\n onDefaultButtonClick(event) {\n if (this.isExpanded) {\n this.$refs.menu.hide(event);\n }\n\n this.$emit('click', event);\n }\n },\n computed: {\n containerClass() {\n return [this.cx('root'), this.class];\n },\n hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n PVSButton: Button,\n PVSMenu: TieredMenu,\n ChevronDownIcon: ChevronDownIcon\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","label","type","String","icon","model","Array","autoZIndex","Boolean","baseZIndex","Number","appendTo","Object","disabled","fluid","style","buttonProps","menuButtonProps","menuButtonIcon","undefined","dropdownIcon","severity","raised","rounded","text","outlined","size","plain","SplitButtonStyle","provide","$pcSplitButton","$parentInstance","BaseSplitButton","inheritAttrs","emits","inject","$pcFluid","data","isExpanded","mounted","_this","$watch","newValue","methods","onDropdownButtonClick","event","preventDefault","$refs","menu","toggle","currentTarget","$el","relatedTarget","button","visible","onDropdownKeydown","code","onDefaultButtonClick","hide","$emit","computed","containerClass","cx","hasFluid","isEmpty","components","PVSButton","Button","PVSMenu","TieredMenu","ChevronDownIcon","_openBlock","_createElementBlock","_mergeProps","$options","_ctx","ptmi","_createVNode","_component_PVSButton","onClick","pt","ptm","unstyled","_renderSlot","$slots","fn","_withCtx","slotProps","_normalizeClass","_createElementVNode","ref","$data","$id","onKeydown","dropdownicon","_createBlock","_resolveDynamicComponent","_component_PVSMenu","id","popup","menuitemicon","item","hasSubmenu"],"mappings":";;;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,iBAAiB;AACvB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE;AACHC,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,IAAI,EAAE;AACFF,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDE,IAAAA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,UADgCC,SAAS,EAAA;MAAA,OAAA,CACzCJ,UAAoI,CAAAR,IAAA,CAAAS,MAAA,EAAA,MAAA,EAAA;QAAjHiB,IAAI,EAAEd,SAAS,CAACc,IAAI;QAAGC,UAAU,EAAEf,SAAS,CAACe,UAAU;QAAGrG,KAAK,EAAEsF,SAAS,CAACtF,KAAK;QAAGD,KAAK,EAAEuF,SAAS,CAACvF;;;;;;;;;;;"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import { style } from '@primeuix/styles/splitbutton';
|
|
1
2
|
import BaseStyle from '@primevue/core/base/style';
|
|
2
3
|
|
|
3
|
-
var theme = function theme(_ref) {
|
|
4
|
-
var dt = _ref.dt;
|
|
5
|
-
return "\n.p-splitbutton {\n display: inline-flex;\n position: relative;\n border-radius: ".concat(dt('splitbutton.border.radius'), ";\n}\n\n.p-splitbutton-button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n border-inline-end: 0 none;\n}\n\n.p-splitbutton-button:focus-visible,\n.p-splitbutton-dropdown:focus-visible {\n z-index: 1;\n}\n\n.p-splitbutton-button:not(:disabled):hover,\n.p-splitbutton-button:not(:disabled):active {\n border-inline-end: 0 none;\n}\n\n.p-splitbutton-dropdown {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.p-splitbutton .p-menu {\n min-width: 100%;\n}\n\n.p-splitbutton-fluid {\n display: flex;\n}\n\n.p-splitbutton-rounded .p-splitbutton-dropdown {\n border-start-end-radius: ").concat(dt('splitbutton.rounded.border.radius'), ";\n border-end-end-radius: ").concat(dt('splitbutton.rounded.border.radius'), ";\n}\n\n.p-splitbutton-rounded .p-splitbutton-button {\n border-start-start-radius: ").concat(dt('splitbutton.rounded.border.radius'), ";\n border-end-start-radius: ").concat(dt('splitbutton.rounded.border.radius'), ";\n}\n\n.p-splitbutton-raised {\n box-shadow: ").concat(dt('splitbutton.raised.shadow'), ";\n}\n");
|
|
6
|
-
};
|
|
7
4
|
var classes = {
|
|
8
|
-
root: function root(
|
|
9
|
-
var instance =
|
|
10
|
-
props =
|
|
5
|
+
root: function root(_ref) {
|
|
6
|
+
var instance = _ref.instance,
|
|
7
|
+
props = _ref.props;
|
|
11
8
|
return ['p-splitbutton p-component', {
|
|
12
9
|
'p-splitbutton-raised': props.raised,
|
|
13
10
|
'p-splitbutton-rounded': props.rounded,
|
|
@@ -19,7 +16,7 @@ var classes = {
|
|
|
19
16
|
};
|
|
20
17
|
var SplitButtonStyle = BaseStyle.extend({
|
|
21
18
|
name: 'splitbutton',
|
|
22
|
-
|
|
19
|
+
style: style,
|
|
23
20
|
classes: classes
|
|
24
21
|
});
|
|
25
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/splitbutton/style/SplitButtonStyle.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/splitbutton/style/SplitButtonStyle.js"],"sourcesContent":["import { style } from '@primeuix/styles/splitbutton';\nimport BaseStyle from '@primevue/core/base/style';\n\nconst classes = {\n root: ({ instance, props }) => [\n 'p-splitbutton p-component',\n {\n 'p-splitbutton-raised': props.raised,\n 'p-splitbutton-rounded': props.rounded,\n 'p-splitbutton-fluid': instance.hasFluid\n }\n ],\n pcButton: 'p-splitbutton-button',\n pcDropdown: 'p-splitbutton-dropdown'\n};\n\nexport default BaseStyle.extend({\n name: 'splitbutton',\n style,\n classes\n});\n"],"names":["classes","root","_ref","instance","props","raised","rounded","hasFluid","pcButton","pcDropdown","BaseStyle","extend","name","style"],"mappings":";;;AAGA,IAAMA,OAAO,GAAG;AACZC,EAAAA,IAAI,EAAE,SAANA,IAAIA,CAAAC,IAAA,EAAA;AAAA,IAAA,IAAKC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;MAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAA,OAAO,CAC3B,2BAA2B,EAC3B;MACI,sBAAsB,EAAEA,KAAK,CAACC,MAAM;MACpC,uBAAuB,EAAED,KAAK,CAACE,OAAO;MACtC,qBAAqB,EAAEH,QAAQ,CAACI;AACpC,KAAC,CACJ;AAAA,GAAA;AACDC,EAAAA,QAAQ,EAAE,sBAAsB;AAChCC,EAAAA,UAAU,EAAE;AAChB,CAAC;AAED,uBAAeC,SAAS,CAACC,MAAM,CAAC;AAC5BC,EAAAA,IAAI,EAAE,aAAa;AACnBC,EAAAA,KAAK,EAALA,KAAK;AACLb,EAAAA,OAAO,EAAPA;AACJ,CAAC,CAAC;;;;"}
|
package/splitter/Splitter.vue
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
25
|
import { getHeight, getOuterHeight, getOuterWidth, getWidth, isRTL } from '@primeuix/utils/dom';
|
|
26
|
-
import { isArray } from '@primeuix/utils/object';
|
|
26
|
+
import { isArray, isNotEmpty } from '@primeuix/utils/object';
|
|
27
27
|
import { getVNodeProp } from '@primevue/core/utils';
|
|
28
28
|
import BaseSplitter from './BaseSplitter.vue';
|
|
29
29
|
|
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
let _panelSizes = [];
|
|
77
77
|
|
|
78
78
|
this.panels.map((panel, i) => {
|
|
79
|
-
let panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;
|
|
79
|
+
let panelInitialSize = panel.props && isNotEmpty(panel.props.size) ? panel.props.size : null;
|
|
80
80
|
let panelSize = panelInitialSize || 100 / this.panels.length;
|
|
81
81
|
|
|
82
82
|
_panelSizes[i] = panelSize;
|
|
@@ -139,14 +139,17 @@ export default {
|
|
|
139
139
|
newNextPanelSize = this.nextPanelSize - newPos;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;
|
|
146
|
-
this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;
|
|
147
|
-
this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);
|
|
142
|
+
if (!this.validateResize(newPrevPanelSize, newNextPanelSize)) {
|
|
143
|
+
newPrevPanelSize = Math.min(Math.max(this.prevPanelMinSize, newPrevPanelSize), 100 - this.nextPanelMinSize);
|
|
144
|
+
newNextPanelSize = Math.min(Math.max(this.nextPanelMinSize, newNextPanelSize), 100 - this.prevPanelMinSize);
|
|
148
145
|
}
|
|
149
146
|
|
|
147
|
+
this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';
|
|
148
|
+
this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';
|
|
149
|
+
this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;
|
|
150
|
+
this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;
|
|
151
|
+
this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);
|
|
152
|
+
|
|
150
153
|
this.$emit('resize', { originalEvent: event, sizes: this.panelSizes });
|
|
151
154
|
},
|
|
152
155
|
onResizeEnd(event) {
|
|
@@ -275,15 +278,11 @@ export default {
|
|
|
275
278
|
if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;
|
|
276
279
|
if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;
|
|
277
280
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {
|
|
281
|
+
if (this.prevPanelMinSize > newPrevPanelSize) {
|
|
281
282
|
return false;
|
|
282
283
|
}
|
|
283
284
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {
|
|
285
|
+
if (this.nextPanelMinSize > newNextPanelSize) {
|
|
287
286
|
return false;
|
|
288
287
|
}
|
|
289
288
|
|
|
@@ -394,6 +393,24 @@ export default {
|
|
|
394
393
|
nested: this.$parentInstance?.nestedState
|
|
395
394
|
}
|
|
396
395
|
};
|
|
396
|
+
},
|
|
397
|
+
prevPanelMinSize() {
|
|
398
|
+
const prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');
|
|
399
|
+
|
|
400
|
+
if (this.panels[this.prevPanelIndex].props && prevPanelMinSize) {
|
|
401
|
+
return prevPanelMinSize;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
return 0;
|
|
405
|
+
},
|
|
406
|
+
nextPanelMinSize() {
|
|
407
|
+
const nextPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');
|
|
408
|
+
|
|
409
|
+
if (this.panels[this.prevPanelIndex + 1].props && nextPanelMinSize) {
|
|
410
|
+
return nextPanelMinSize;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
return 0;
|
|
397
414
|
}
|
|
398
415
|
}
|
|
399
416
|
};
|
package/splitter/index.d.ts
CHANGED
|
@@ -249,7 +249,7 @@ declare const Splitter: DefineComponent<SplitterProps, SplitterSlots, SplitterEm
|
|
|
249
249
|
|
|
250
250
|
declare module 'vue' {
|
|
251
251
|
export interface GlobalComponents {
|
|
252
|
-
Splitter: DefineComponent<SplitterProps, SplitterSlots, SplitterEmits>;
|
|
252
|
+
Splitter: DefineComponent<SplitterProps, SplitterSlots, SplitterEmits, SplitterMethods>;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
|
package/splitter/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getWidth, getHeight, getOuterWidth, getOuterHeight
|
|
2
|
-
import { isArray } from '@primeuix/utils/object';
|
|
1
|
+
import { isRTL, getWidth, getHeight, getOuterWidth, getOuterHeight } from '@primeuix/utils/dom';
|
|
2
|
+
import { isArray, isNotEmpty } from '@primeuix/utils/object';
|
|
3
3
|
import { getVNodeProp } from '@primevue/core/utils';
|
|
4
4
|
import BaseComponent from '@primevue/core/basecomponent';
|
|
5
5
|
import SplitterStyle from 'primevue/splitter/style';
|
|
6
|
-
import {
|
|
6
|
+
import { createElementBlock, openBlock, mergeProps, Fragment, renderList, createBlock, createCommentVNode, resolveDynamicComponent, createElementVNode } from 'vue';
|
|
7
7
|
|
|
8
8
|
var script$1 = {
|
|
9
9
|
name: 'BaseSplitter',
|
|
@@ -94,7 +94,7 @@ var script = {
|
|
|
94
94
|
});
|
|
95
95
|
var _panelSizes = [];
|
|
96
96
|
this.panels.map(function (panel, i) {
|
|
97
|
-
var panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;
|
|
97
|
+
var panelInitialSize = panel.props && isNotEmpty(panel.props.size) ? panel.props.size : null;
|
|
98
98
|
var panelSize = panelInitialSize || 100 / _this.panels.length;
|
|
99
99
|
_panelSizes[i] = panelSize;
|
|
100
100
|
children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (_this.panels.length - 1) * _this.gutterSize + 'px)';
|
|
@@ -151,13 +151,15 @@ var script = {
|
|
|
151
151
|
newPrevPanelSize = this.prevPanelSize + newPos;
|
|
152
152
|
newNextPanelSize = this.nextPanelSize - newPos;
|
|
153
153
|
}
|
|
154
|
-
if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;
|
|
158
|
-
this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;
|
|
159
|
-
this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);
|
|
154
|
+
if (!this.validateResize(newPrevPanelSize, newNextPanelSize)) {
|
|
155
|
+
newPrevPanelSize = Math.min(Math.max(this.prevPanelMinSize, newPrevPanelSize), 100 - this.nextPanelMinSize);
|
|
156
|
+
newNextPanelSize = Math.min(Math.max(this.nextPanelMinSize, newNextPanelSize), 100 - this.prevPanelMinSize);
|
|
160
157
|
}
|
|
158
|
+
this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';
|
|
159
|
+
this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';
|
|
160
|
+
this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;
|
|
161
|
+
this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;
|
|
162
|
+
this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);
|
|
161
163
|
this.$emit('resize', {
|
|
162
164
|
originalEvent: event,
|
|
163
165
|
sizes: this.panelSizes
|
|
@@ -288,12 +290,10 @@ var script = {
|
|
|
288
290
|
validateResize: function validateResize(newPrevPanelSize, newNextPanelSize) {
|
|
289
291
|
if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;
|
|
290
292
|
if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;
|
|
291
|
-
|
|
292
|
-
if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {
|
|
293
|
+
if (this.prevPanelMinSize > newPrevPanelSize) {
|
|
293
294
|
return false;
|
|
294
295
|
}
|
|
295
|
-
|
|
296
|
-
if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {
|
|
296
|
+
if (this.nextPanelMinSize > newNextPanelSize) {
|
|
297
297
|
return false;
|
|
298
298
|
}
|
|
299
299
|
return true;
|
|
@@ -401,6 +401,20 @@ var script = {
|
|
|
401
401
|
nested: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.nestedState
|
|
402
402
|
}
|
|
403
403
|
};
|
|
404
|
+
},
|
|
405
|
+
prevPanelMinSize: function prevPanelMinSize() {
|
|
406
|
+
var prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');
|
|
407
|
+
if (this.panels[this.prevPanelIndex].props && prevPanelMinSize) {
|
|
408
|
+
return prevPanelMinSize;
|
|
409
|
+
}
|
|
410
|
+
return 0;
|
|
411
|
+
},
|
|
412
|
+
nextPanelMinSize: function nextPanelMinSize() {
|
|
413
|
+
var nextPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');
|
|
414
|
+
if (this.panels[this.prevPanelIndex + 1].props && nextPanelMinSize) {
|
|
415
|
+
return nextPanelMinSize;
|
|
416
|
+
}
|
|
417
|
+
return 0;
|
|
404
418
|
}
|
|
405
419
|
}
|
|
406
420
|
};
|