primevue 3.16.2 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/accordion/Accordion.d.ts +23 -5
- package/accordion/Accordion.vue +194 -77
- package/accordion/accordion.cjs.js +202 -96
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +200 -98
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +203 -98
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +33 -5
- package/accordiontab/AccordionTab.vue +8 -1
- package/accordiontab/accordiontab.cjs.js +7 -0
- package/accordiontab/accordiontab.cjs.min.js +1 -1
- package/accordiontab/accordiontab.esm.js +7 -0
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +7 -0
- package/accordiontab/accordiontab.min.js +1 -1
- package/api/Api.d.ts +1 -1
- package/api/api.cjs.js +299 -313
- package/api/api.esm.js +299 -313
- package/api/api.js +299 -313
- package/autocomplete/AutoComplete.d.ts +22 -17
- package/autocomplete/AutoComplete.vue +239 -126
- package/autocomplete/autocomplete.cjs.js +145 -108
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +146 -109
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +145 -108
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +4 -4
- package/avatar/Avatar.vue +15 -11
- package/avatar/avatar.cjs.js +11 -7
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +11 -7
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +11 -7
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +6 -9
- package/avatargroup/AvatarGroup.vue +1 -1
- package/badge/Badge.d.ts +4 -5
- package/badge/Badge.vue +16 -13
- package/badge/badge.cjs.js +14 -11
- package/badge/badge.esm.js +14 -11
- package/badge/badge.js +14 -11
- package/badgedirective/badgedirective.cjs.js +8 -10
- package/badgedirective/badgedirective.esm.js +8 -10
- package/badgedirective/badgedirective.js +8 -10
- package/blockui/BlockUI.d.ts +6 -6
- package/blockui/BlockUI.vue +13 -15
- package/blockui/blockui.cjs.js +11 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +11 -13
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +11 -13
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +5 -6
- package/breadcrumb/Breadcrumb.vue +2 -2
- package/breadcrumb/BreadcrumbItem.vue +18 -15
- package/breadcrumb/breadcrumb.cjs.js +15 -12
- package/breadcrumb/breadcrumb.esm.js +15 -12
- package/breadcrumb/breadcrumb.js +15 -12
- package/button/Button.d.ts +10 -7
- package/button/Button.vue +22 -14
- package/button/button.cjs.js +19 -11
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +19 -11
- package/button/button.esm.min.js +1 -1
- package/button/button.js +19 -11
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +14 -14
- package/calendar/Calendar.vue +793 -583
- package/calendar/calendar.cjs.js +581 -526
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +581 -526
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +581 -526
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +5 -7
- package/card/Card.vue +5 -5
- package/carousel/Carousel.d.ts +29 -19
- package/carousel/Carousel.vue +537 -528
- package/carousel/carousel.cjs.js +496 -493
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +496 -493
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +645 -642
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +19 -14
- package/cascadeselect/CascadeSelect.vue +186 -100
- package/cascadeselect/CascadeSelectSub.vue +44 -14
- package/cascadeselect/cascadeselect.cjs.js +156 -95
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +157 -96
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +156 -95
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +6 -7
- package/chart/Chart.vue +12 -12
- package/chart/chart.cjs.js +11 -11
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +11 -11
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +11 -11
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.d.ts +12 -12
- package/checkbox/Checkbox.vue +48 -20
- package/checkbox/checkbox.cjs.js +28 -17
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +28 -17
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +28 -17
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.d.ts +5 -5
- package/chip/Chip.vue +13 -11
- package/chip/chip.cjs.js +7 -4
- package/chip/chip.esm.js +7 -4
- package/chip/chip.js +7 -4
- package/chips/Chips.d.ts +9 -9
- package/chips/Chips.vue +89 -33
- package/chips/chips.cjs.js +48 -26
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +48 -26
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +48 -26
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +11 -12
- package/colorpicker/ColorPicker.vue +146 -110
- package/colorpicker/colorpicker.cjs.js +113 -74
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +113 -74
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +113 -74
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +5 -6
- package/column/Column.vue +1 -1
- package/columngroup/ColumnGroup.d.ts +5 -7
- package/columngroup/ColumnGroup.vue +1 -1
- package/config/PrimeVue.d.ts +4 -2
- package/config/config.cjs.js +14 -29
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +14 -29
- package/config/config.esm.min.js +1 -1
- package/config/config.js +14 -29
- package/config/config.min.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +4 -0
- package/confirmationservice/confirmationservice.cjs.js +1 -0
- package/confirmationservice/confirmationservice.esm.js +1 -0
- package/confirmationservice/confirmationservice.js +1 -0
- package/confirmdialog/ConfirmDialog.d.ts +11 -5
- package/confirmdialog/ConfirmDialog.vue +25 -15
- package/confirmdialog/confirmdialog.cjs.js +34 -16
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +34 -16
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -17
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +5 -8
- package/confirmpopup/ConfirmPopup.vue +44 -32
- package/confirmpopup/confirmpopup.cjs.js +24 -14
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +24 -14
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +24 -14
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +4 -5
- package/contextmenu/ContextMenu.vue +23 -19
- package/contextmenu/ContextMenuSub.vue +54 -42
- package/contextmenu/contextmenu.cjs.js +52 -44
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +52 -44
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +52 -44
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1918 -1744
- package/core/core.min.js +14 -14
- package/datatable/BodyCell.vue +93 -75
- package/datatable/ColumnFilter.vue +137 -86
- package/datatable/DataTable.d.ts +24 -24
- package/datatable/DataTable.vue +470 -296
- package/datatable/FooterCell.vue +20 -13
- package/datatable/HeaderCell.vue +108 -51
- package/datatable/HeaderCheckbox.vue +12 -5
- package/datatable/RowCheckbox.vue +14 -6
- package/datatable/RowRadioButton.vue +4 -4
- package/datatable/TableBody.vue +135 -83
- package/datatable/TableFooter.vue +17 -20
- package/datatable/TableHeader.vue +132 -52
- package/datatable/TableLoadingBody.vue +3 -3
- package/datatable/datatable.cjs.js +696 -559
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +696 -559
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +696 -559
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +8 -8
- package/dataview/DataView.vue +80 -66
- package/dataview/dataview.cjs.js +31 -35
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +31 -35
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +31 -35
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +5 -6
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +28 -34
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -25
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -25
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +46 -52
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/deferredcontent/DeferredContent.d.ts +6 -7
- package/deferredcontent/DeferredContent.vue +6 -9
- package/deferredcontent/deferredcontent.cjs.js +5 -8
- package/deferredcontent/deferredcontent.esm.js +5 -8
- package/deferredcontent/deferredcontent.js +5 -8
- package/dialog/Dialog.d.ts +10 -10
- package/dialog/Dialog.vue +64 -60
- package/dialog/dialog.cjs.js +50 -46
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +50 -46
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +50 -46
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +4 -5
- package/divider/Divider.vue +15 -12
- package/divider/divider.cjs.js +17 -12
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +17 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +17 -12
- package/divider/divider.min.js +1 -1
- package/dock/Dock.d.ts +5 -6
- package/dock/Dock.vue +3 -3
- package/dock/DockSub.vue +46 -25
- package/dock/dock.cjs.js +30 -23
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +30 -23
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +30 -23
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +31 -17
- package/dropdown/Dropdown.vue +255 -125
- package/dropdown/dropdown.cjs.js +177 -109
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +178 -110
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +177 -109
- package/dropdown/dropdown.min.js +1 -1
- package/dynamicdialog/DynamicDialog.d.ts +4 -4
- package/dynamicdialog/DynamicDialog.vue +10 -10
- package/dynamicdialog/dynamicdialog.cjs.js +11 -9
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +11 -9
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +11 -9
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/editor/Editor.d.ts +20 -4
- package/editor/Editor.vue +506 -466
- package/editor/editor.cjs.js +99 -45
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +82 -42
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +83 -47
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +9 -5
- package/fieldset/Fieldset.vue +28 -20
- package/fieldset/fieldset.cjs.js +31 -19
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +32 -20
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +31 -19
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +11 -11
- package/fileupload/FileUpload.vue +75 -69
- package/fileupload/fileupload.cjs.js +56 -50
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +56 -50
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +56 -50
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/FullCalendar.d.ts +5 -7
- package/fullcalendar/FullCalendar.vue +6 -6
- package/fullcalendar/fullcalendar.cjs.js +3 -2
- package/fullcalendar/fullcalendar.esm.js +3 -2
- package/fullcalendar/fullcalendar.js +3 -2
- package/galleria/Galleria.d.ts +4 -4
- package/galleria/Galleria.vue +39 -34
- package/galleria/GalleriaContent.vue +58 -31
- package/galleria/GalleriaItem.vue +44 -36
- package/galleria/GalleriaItemSlot.vue +2 -1
- package/galleria/GalleriaThumbnails.vue +107 -91
- package/galleria/galleria.cjs.js +180 -152
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +180 -152
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +180 -152
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +4 -5
- package/image/Image.vue +19 -15
- package/image/image.cjs.js +11 -7
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +11 -7
- package/image/image.esm.min.js +1 -1
- package/image/image.js +11 -7
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +4 -5
- package/inlinemessage/InlineMessage.vue +12 -9
- package/inlinemessage/inlinemessage.cjs.js +11 -8
- package/inlinemessage/inlinemessage.esm.js +11 -8
- package/inlinemessage/inlinemessage.js +11 -8
- package/inplace/Inplace.d.ts +6 -6
- package/inplace/Inplace.vue +11 -11
- package/inplace/inplace.cjs.js +9 -9
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +9 -9
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +9 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/InputMask.d.ts +11 -12
- package/inputmask/InputMask.vue +119 -92
- package/inputmask/inputmask.cjs.js +116 -89
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +116 -89
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +116 -89
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +17 -17
- package/inputnumber/InputNumber.vue +237 -177
- package/inputnumber/inputnumber.cjs.js +208 -171
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +208 -171
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +208 -171
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +10 -10
- package/inputswitch/InputSwitch.vue +39 -11
- package/inputswitch/inputswitch.cjs.js +23 -9
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +23 -9
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +23 -9
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +5 -6
- package/inputtext/InputText.vue +3 -3
- package/inputtext/inputtext.cjs.js +2 -2
- package/inputtext/inputtext.esm.js +2 -2
- package/inputtext/inputtext.js +2 -2
- package/knob/Knob.d.ts +10 -11
- package/knob/Knob.vue +47 -29
- package/knob/knob.cjs.js +27 -25
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +27 -25
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +27 -25
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +17 -13
- package/listbox/Listbox.vue +144 -97
- package/listbox/listbox.cjs.js +96 -86
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +97 -87
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +96 -86
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +5 -6
- package/megamenu/MegaMenu.vue +108 -94
- package/megamenu/megamenu.cjs.js +77 -72
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +77 -72
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +77 -72
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +5 -8
- package/menu/Menu.vue +29 -23
- package/menu/Menuitem.vue +21 -18
- package/menu/menu.cjs.js +38 -29
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +38 -29
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +38 -29
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +5 -6
- package/menubar/Menubar.vue +14 -15
- package/menubar/MenubarSub.vue +79 -62
- package/menubar/menubar.cjs.js +56 -58
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +56 -58
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +56 -58
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +2 -2
- package/message/Message.d.ts +5 -5
- package/message/Message.vue +19 -14
- package/message/message.cjs.js +15 -10
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +15 -10
- package/message/message.esm.min.js +1 -1
- package/message/message.js +15 -10
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +21 -16
- package/multiselect/MultiSelect.vue +240 -150
- package/multiselect/multiselect.cjs.js +184 -133
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +185 -134
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +184 -133
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +5 -5
- package/orderlist/OrderList.vue +65 -60
- package/orderlist/orderlist.cjs.js +51 -53
- package/orderlist/orderlist.esm.js +51 -53
- package/orderlist/orderlist.js +51 -53
- package/organizationchart/OrganizationChart.d.ts +4 -4
- package/organizationchart/OrganizationChart.vue +13 -17
- package/organizationchart/OrganizationChartNode.vue +20 -12
- package/organizationchart/organizationchart.cjs.js +14 -16
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +14 -16
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +14 -16
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +5 -5
- package/overlaypanel/OverlayPanel.vue +60 -50
- package/overlaypanel/overlaypanel.cjs.js +40 -32
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +40 -32
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +40 -32
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/CurrentPageReport.vue +47 -47
- package/paginator/FirstPageLink.vue +11 -8
- package/paginator/JumpToPageDropdown.vue +7 -6
- package/paginator/JumpToPageInput.vue +3 -3
- package/paginator/LastPageLink.vue +11 -8
- package/paginator/NextPageLink.vue +11 -8
- package/paginator/PageLinks.vue +3 -4
- package/paginator/Paginator.d.ts +5 -5
- package/paginator/Paginator.vue +39 -39
- package/paginator/PrevPageLink.vue +11 -8
- package/paginator/RowsPerPageDropdown.vue +7 -6
- package/paginator/paginator.cjs.js +110 -91
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +110 -91
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +633 -614
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +9 -5
- package/panel/Panel.vue +29 -11
- package/panel/panel.cjs.js +24 -14
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +24 -14
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +24 -14
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +5 -5
- package/panelmenu/PanelMenu.vue +46 -38
- package/panelmenu/PanelMenuSub.vue +40 -29
- package/panelmenu/panelmenu.cjs.js +56 -52
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +56 -52
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +56 -52
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +12 -7
- package/password/Password.vue +156 -79
- package/password/password.cjs.js +135 -74
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +135 -74
- package/password/password.esm.min.js +1 -1
- package/password/password.js +135 -74
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +9 -9
- package/picklist/PickList.vue +99 -78
- package/picklist/picklist.cjs.js +71 -66
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +71 -66
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +71 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +3 -3
- package/portal/Portal.vue +2 -2
- package/portal/portal.cjs.js +1 -1
- package/portal/portal.esm.js +1 -1
- package/portal/portal.js +1 -1
- package/progressbar/ProgressBar.d.ts +4 -5
- package/progressbar/ProgressBar.vue +63 -51
- package/progressbar/progressbar.cjs.js +2 -2
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +2 -2
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +2 -2
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +5 -7
- package/progressspinner/ProgressSpinner.vue +1 -1
- package/radiobutton/RadioButton.d.ts +9 -9
- package/radiobutton/RadioButton.vue +41 -13
- package/radiobutton/radiobutton.cjs.js +24 -10
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +24 -10
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +24 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +54 -5
- package/rating/Rating.vue +88 -62
- package/rating/rating.cjs.js +105 -84
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +106 -85
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +106 -86
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +23 -12
- package/resources/themes/arya-green/theme.css +23 -12
- package/resources/themes/arya-orange/theme.css +23 -12
- package/resources/themes/arya-purple/theme.css +23 -12
- package/resources/themes/bootstrap4-dark-blue/theme.css +24 -13
- package/resources/themes/bootstrap4-dark-purple/theme.css +24 -13
- package/resources/themes/bootstrap4-light-blue/theme.css +24 -13
- package/resources/themes/bootstrap4-light-purple/theme.css +24 -13
- package/resources/themes/fluent-light/theme.css +23 -12
- package/resources/themes/lara-dark-blue/theme.css +23 -12
- package/resources/themes/lara-dark-indigo/theme.css +23 -12
- package/resources/themes/lara-dark-purple/theme.css +23 -12
- package/resources/themes/lara-dark-teal/theme.css +23 -12
- package/resources/themes/lara-light-blue/theme.css +23 -12
- package/resources/themes/lara-light-indigo/theme.css +23 -12
- package/resources/themes/lara-light-purple/theme.css +23 -12
- package/resources/themes/lara-light-teal/theme.css +23 -12
- package/resources/themes/luna-amber/theme.css +24 -13
- package/resources/themes/luna-blue/theme.css +24 -13
- package/resources/themes/luna-green/theme.css +24 -13
- package/resources/themes/luna-pink/theme.css +24 -13
- package/resources/themes/md-dark-deeppurple/theme.css +46 -20
- package/resources/themes/md-dark-indigo/theme.css +46 -20
- package/resources/themes/md-light-deeppurple/theme.css +46 -20
- package/resources/themes/md-light-indigo/theme.css +46 -20
- package/resources/themes/mdc-dark-deeppurple/theme.css +46 -20
- package/resources/themes/mdc-dark-indigo/theme.css +46 -20
- package/resources/themes/mdc-light-deeppurple/theme.css +46 -20
- package/resources/themes/mdc-light-indigo/theme.css +46 -20
- package/resources/themes/nova/theme.css +24 -13
- package/resources/themes/nova-accent/theme.css +23 -12
- package/resources/themes/nova-alt/theme.css +24 -13
- package/resources/themes/nova-vue/theme.css +24 -13
- package/resources/themes/rhea/theme.css +23 -12
- package/resources/themes/saga-blue/theme.css +23 -12
- package/resources/themes/saga-green/theme.css +23 -12
- package/resources/themes/saga-orange/theme.css +23 -12
- package/resources/themes/saga-purple/theme.css +23 -12
- package/resources/themes/tailwind-light/theme.css +23 -12
- package/resources/themes/vela-blue/theme.css +23 -12
- package/resources/themes/vela-green/theme.css +23 -12
- package/resources/themes/vela-orange/theme.css +23 -12
- package/resources/themes/vela-purple/theme.css +23 -12
- package/ripple/ripple.cjs.js +7 -1
- package/ripple/ripple.esm.js +7 -1
- package/ripple/ripple.js +7 -1
- package/row/Row.d.ts +6 -9
- package/row/Row.vue +1 -1
- package/scrollpanel/ScrollPanel.d.ts +9 -5
- package/scrollpanel/ScrollPanel.vue +194 -56
- package/scrollpanel/scrollpanel.cjs.js +180 -56
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +181 -57
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +180 -56
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.d.ts +5 -7
- package/scrolltop/ScrollTop.vue +18 -23
- package/scrolltop/scrolltop.cjs.js +14 -19
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +14 -19
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +14 -19
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +11 -11
- package/selectbutton/SelectButton.vue +50 -32
- package/selectbutton/selectbutton.cjs.js +30 -25
- package/selectbutton/selectbutton.esm.js +30 -25
- package/selectbutton/selectbutton.js +30 -25
- package/sidebar/Sidebar.d.ts +6 -6
- package/sidebar/Sidebar.vue +24 -14
- package/sidebar/sidebar.cjs.js +20 -10
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +20 -10
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +20 -10
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +5 -7
- package/skeleton/Skeleton.vue +12 -11
- package/skeleton/skeleton.cjs.js +10 -9
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +10 -9
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +10 -9
- package/skeleton/skeleton.min.js +1 -1
- package/slider/Slider.d.ts +7 -8
- package/slider/Slider.vue +162 -141
- package/slider/slider.cjs.js +100 -127
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +100 -127
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +100 -127
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +8 -8
- package/speeddial/SpeedDial.vue +54 -39
- package/speeddial/speeddial.cjs.js +44 -36
- package/speeddial/speeddial.esm.js +44 -36
- package/speeddial/speeddial.js +44 -36
- package/splitbutton/SplitButton.d.ts +6 -6
- package/splitbutton/SplitButton.vue +9 -11
- package/splitbutton/splitbutton.cjs.js +7 -7
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -7
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -7
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +10 -5
- package/splitter/Splitter.vue +158 -53
- package/splitter/splitter.cjs.js +156 -52
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +157 -53
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +156 -52
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +4 -5
- package/splitterpanel/SplitterPanel.vue +3 -3
- package/splitterpanel/splitterpanel.cjs.js +2 -2
- package/splitterpanel/splitterpanel.esm.js +2 -2
- package/splitterpanel/splitterpanel.js +2 -2
- package/steps/Steps.d.ts +4 -5
- package/steps/Steps.vue +31 -23
- package/steps/steps.cjs.js +24 -16
- package/steps/steps.esm.js +24 -16
- package/steps/steps.js +24 -16
- package/styleclass/styleclass.cjs.js +19 -21
- package/styleclass/styleclass.esm.js +19 -21
- package/styleclass/styleclass.js +19 -21
- package/tabmenu/TabMenu.d.ts +4 -4
- package/tabmenu/TabMenu.vue +45 -34
- package/tabmenu/tabmenu.cjs.js +36 -25
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +36 -25
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +36 -25
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +33 -6
- package/tabpanel/TabPanel.vue +8 -1
- package/tabpanel/tabpanel.cjs.js +7 -0
- package/tabpanel/tabpanel.cjs.min.js +1 -1
- package/tabpanel/tabpanel.esm.js +7 -0
- package/tabpanel/tabpanel.esm.min.js +1 -1
- package/tabpanel/tabpanel.js +7 -0
- package/tabpanel/tabpanel.min.js +1 -1
- package/tabview/TabView.d.ts +22 -6
- package/tabview/TabView.vue +280 -96
- package/tabview/tabview.cjs.js +294 -131
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +296 -133
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +294 -131
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +4 -5
- package/tag/Tag.vue +13 -10
- package/tag/tag.cjs.js +10 -7
- package/tag/tag.esm.js +10 -7
- package/tag/tag.js +10 -7
- package/terminal/Terminal.d.ts +5 -7
- package/terminal/Terminal.vue +10 -10
- package/terminal/terminal.cjs.js +3 -3
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -3
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +3 -3
- package/terminal/terminal.min.js +1 -1
- package/textarea/Textarea.d.ts +5 -6
- package/textarea/Textarea.vue +7 -7
- package/textarea/textarea.cjs.js +6 -6
- package/textarea/textarea.esm.js +6 -6
- package/textarea/textarea.js +6 -6
- package/tieredmenu/TieredMenu.d.ts +4 -5
- package/tieredmenu/TieredMenu.vue +23 -15
- package/tieredmenu/TieredMenuSub.vue +62 -51
- package/tieredmenu/tieredmenu.cjs.js +60 -50
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +60 -50
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +60 -50
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +4 -5
- package/timeline/Timeline.vue +6 -10
- package/timeline/timeline.cjs.js +3 -7
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -7
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +3 -7
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +10 -13
- package/toast/Toast.vue +36 -29
- package/toast/ToastMessage.vue +25 -18
- package/toast/toast.cjs.js +37 -23
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +37 -23
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +37 -23
- package/toast/toast.min.js +1 -1
- package/toastservice/toastservice.cjs.js +1 -0
- package/toastservice/toastservice.esm.js +1 -0
- package/toastservice/toastservice.js +1 -0
- package/togglebutton/ToggleButton.d.ts +10 -10
- package/togglebutton/ToggleButton.vue +42 -18
- package/togglebutton/togglebutton.cjs.js +25 -13
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +25 -13
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +25 -13
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +8 -5
- package/toolbar/Toolbar.vue +9 -3
- package/toolbar/toolbar.cjs.js +14 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +14 -7
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +14 -7
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +36 -24
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +37 -25
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +36 -24
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +7 -7
- package/tree/Tree.vue +66 -56
- package/tree/TreeNode.vue +70 -66
- package/tree/tree.cjs.js +99 -102
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +99 -102
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +99 -102
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +9 -9
- package/treeselect/TreeSelect.vue +130 -72
- package/treeselect/treeselect.cjs.js +89 -59
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +89 -59
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +89 -59
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +29 -19
- package/treetable/FooterCell.vue +19 -11
- package/treetable/HeaderCell.vue +44 -36
- package/treetable/TreeTable.d.ts +8 -8
- package/treetable/TreeTable.vue +229 -178
- package/treetable/TreeTableRow.vue +74 -58
- package/treetable/treetable.cjs.js +287 -253
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +287 -253
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +287 -253
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +9 -9
- package/tristatecheckbox/TriStateCheckbox.vue +39 -18
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -15
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +24 -15
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -15
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +16 -10
- package/useconfirm/UseConfirm.d.ts +1 -1
- package/useconfirm/useconfirm.cjs.js +2 -1
- package/useconfirm/useconfirm.esm.js +2 -1
- package/useconfirm/useconfirm.js +2 -1
- package/usedialog/UseDialog.d.ts +1 -1
- package/usedialog/usedialog.cjs.js +2 -1
- package/usedialog/usedialog.esm.js +2 -1
- package/usedialog/usedialog.js +2 -1
- package/usetoast/usetoast.cjs.js +2 -1
- package/usetoast/usetoast.esm.js +2 -1
- package/usetoast/usetoast.js +2 -1
- package/utils/Utils.d.ts +7 -5
- package/utils/utils.cjs.js +183 -156
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +183 -156
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +183 -156
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +160 -0
- package/vetur-tags.json +58 -8
- package/virtualscroller/VirtualScroller.d.ts +9 -9
- package/virtualscroller/VirtualScroller.vue +108 -96
- package/virtualscroller/virtualscroller.cjs.js +87 -89
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +87 -89
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +87 -89
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +488 -2
package/treetable/TreeTable.vue
CHANGED
|
@@ -1,45 +1,75 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="containerClass" data-scrollselectors=".p-treetable-scrollable-body">
|
|
3
|
-
<div class="p-treetable-loading"
|
|
3
|
+
<div v-if="loading" class="p-treetable-loading">
|
|
4
4
|
<div class="p-treetable-loading-overlay p-component-overlay">
|
|
5
5
|
<i :class="loadingIconClass"></i>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
|
-
<div
|
|
8
|
+
<div v-if="$slots.header" class="p-treetable-header">
|
|
9
9
|
<slot name="header"></slot>
|
|
10
10
|
</div>
|
|
11
|
-
<TTPaginator
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
<TTPaginator
|
|
12
|
+
v-if="paginatorTop"
|
|
13
|
+
:rows="d_rows"
|
|
14
|
+
:first="d_first"
|
|
15
|
+
:totalRecords="totalRecordsLength"
|
|
16
|
+
:pageLinkSize="pageLinkSize"
|
|
17
|
+
:template="paginatorTemplate"
|
|
18
|
+
:rowsPerPageOptions="rowsPerPageOptions"
|
|
19
|
+
:currentPageReportTemplate="currentPageReportTemplate"
|
|
20
|
+
class="p-paginator-top"
|
|
21
|
+
@page="onPage($event)"
|
|
22
|
+
:alwaysShow="alwaysShowPaginator"
|
|
23
|
+
>
|
|
24
|
+
<template v-if="$slots.paginatorstart" #start>
|
|
14
25
|
<slot name="paginatorstart"></slot>
|
|
15
26
|
</template>
|
|
16
|
-
<template
|
|
27
|
+
<template v-if="$slots.paginatorend" #end>
|
|
17
28
|
<slot name="paginatorend"></slot>
|
|
18
29
|
</template>
|
|
19
30
|
</TTPaginator>
|
|
20
|
-
<div class="p-treetable-wrapper" :style="{maxHeight: scrollHeight}">
|
|
31
|
+
<div class="p-treetable-wrapper" :style="{ maxHeight: scrollHeight }">
|
|
21
32
|
<table ref="table">
|
|
22
33
|
<thead class="p-treetable-thead">
|
|
23
34
|
<tr>
|
|
24
|
-
<template v-for="(col,i) of columns" :key="columnProp(col, 'columnKey')||columnProp(col, 'field')||i">
|
|
25
|
-
<TTHeaderCell
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
|
36
|
+
<TTHeaderCell
|
|
37
|
+
v-if="!columnProp(col, 'hidden')"
|
|
38
|
+
:column="col"
|
|
39
|
+
:resizableColumns="resizableColumns"
|
|
40
|
+
:sortField="d_sortField"
|
|
41
|
+
:sortOrder="d_sortOrder"
|
|
42
|
+
:multiSortMeta="d_multiSortMeta"
|
|
43
|
+
:sortMode="sortMode"
|
|
44
|
+
@column-click="onColumnHeaderClick"
|
|
45
|
+
@column-resizestart="onColumnResizeStart"
|
|
46
|
+
></TTHeaderCell>
|
|
28
47
|
</template>
|
|
29
48
|
</tr>
|
|
30
49
|
<tr v-if="hasColumnFilter()">
|
|
31
|
-
<template v-for="(col,i) of columns" :key="columnProp(col, 'columnKey')||columnProp(col, 'field')||i">
|
|
32
|
-
<th v-if="!columnProp(col, 'hidden')" :class="getFilterColumnHeaderClass(col)" :style="[columnProp(col, 'style'),columnProp(col, 'filterHeaderStyle')]">
|
|
33
|
-
<component
|
|
50
|
+
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
|
51
|
+
<th v-if="!columnProp(col, 'hidden')" :class="getFilterColumnHeaderClass(col)" :style="[columnProp(col, 'style'), columnProp(col, 'filterHeaderStyle')]">
|
|
52
|
+
<component v-if="col.children && col.children.filter" :is="col.children.filter" :column="col" />
|
|
34
53
|
</th>
|
|
35
54
|
</template>
|
|
36
55
|
</tr>
|
|
37
56
|
</thead>
|
|
38
57
|
<tbody class="p-treetable-tbody">
|
|
39
58
|
<template v-if="!empty">
|
|
40
|
-
<TTRow
|
|
41
|
-
|
|
42
|
-
|
|
59
|
+
<TTRow
|
|
60
|
+
v-for="node of dataToRender"
|
|
61
|
+
:key="node.key"
|
|
62
|
+
:columns="columns"
|
|
63
|
+
:node="node"
|
|
64
|
+
:level="0"
|
|
65
|
+
:expandedKeys="d_expandedKeys"
|
|
66
|
+
@node-toggle="onNodeToggle"
|
|
67
|
+
:indentation="indentation"
|
|
68
|
+
:selectionMode="selectionMode"
|
|
69
|
+
:selectionKeys="selectionKeys"
|
|
70
|
+
@node-click="onNodeClick"
|
|
71
|
+
@checkbox-change="onCheckboxChange"
|
|
72
|
+
></TTRow>
|
|
43
73
|
</template>
|
|
44
74
|
<tr v-else class="p-treetable-emptymessage">
|
|
45
75
|
<td :colspan="columns.length">
|
|
@@ -47,25 +77,36 @@
|
|
|
47
77
|
</td>
|
|
48
78
|
</tr>
|
|
49
79
|
</tbody>
|
|
50
|
-
<tfoot class="p-treetable-tfoot"
|
|
80
|
+
<tfoot v-if="hasFooter" class="p-treetable-tfoot">
|
|
51
81
|
<tr>
|
|
52
|
-
<template v-for="(col,i) of columns" :key="columnProp(col, 'columnKey')||columnProp(col, 'field')||i">
|
|
82
|
+
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
|
53
83
|
<TTFooterCell v-if="!columnProp(col, 'hidden')" :column="col"></TTFooterCell>
|
|
54
84
|
</template>
|
|
55
85
|
</tr>
|
|
56
86
|
</tfoot>
|
|
57
87
|
</table>
|
|
58
88
|
</div>
|
|
59
|
-
<TTPaginator
|
|
60
|
-
|
|
61
|
-
|
|
89
|
+
<TTPaginator
|
|
90
|
+
v-if="paginatorBottom"
|
|
91
|
+
:rows="d_rows"
|
|
92
|
+
:first="d_first"
|
|
93
|
+
:totalRecords="totalRecordsLength"
|
|
94
|
+
:pageLinkSize="pageLinkSize"
|
|
95
|
+
:template="paginatorTemplate"
|
|
96
|
+
:rowsPerPageOptions="rowsPerPageOptions"
|
|
97
|
+
:currentPageReportTemplate="currentPageReportTemplate"
|
|
98
|
+
class="p-paginator-bottom"
|
|
99
|
+
@page="onPage($event)"
|
|
100
|
+
:alwaysShow="alwaysShowPaginator"
|
|
101
|
+
>
|
|
102
|
+
<template v-if="$slots.paginatorstart" #start>
|
|
62
103
|
<slot name="paginatorstart"></slot>
|
|
63
104
|
</template>
|
|
64
|
-
<template
|
|
105
|
+
<template v-if="$slots.paginatorend" #end>
|
|
65
106
|
<slot name="paginatorend"></slot>
|
|
66
107
|
</template>
|
|
67
108
|
</TTPaginator>
|
|
68
|
-
<div
|
|
109
|
+
<div v-if="$slots.footer" class="p-treetable-footer">
|
|
69
110
|
<slot name="footer"></slot>
|
|
70
111
|
</div>
|
|
71
112
|
<div ref="resizeHelper" class="p-column-resizer-helper p-highlight" style="display: none"></div>
|
|
@@ -73,8 +114,8 @@
|
|
|
73
114
|
</template>
|
|
74
115
|
|
|
75
116
|
<script>
|
|
76
|
-
import {ObjectUtils,DomHandler} from 'primevue/utils';
|
|
77
|
-
import {FilterService} from 'primevue/api';
|
|
117
|
+
import { ObjectUtils, DomHandler } from 'primevue/utils';
|
|
118
|
+
import { FilterService } from 'primevue/api';
|
|
78
119
|
import TreeTableRow from './TreeTableRow.vue';
|
|
79
120
|
import HeaderCell from './HeaderCell.vue';
|
|
80
121
|
import FooterCell from './FooterCell.vue';
|
|
@@ -82,8 +123,23 @@ import Paginator from 'primevue/paginator';
|
|
|
82
123
|
|
|
83
124
|
export default {
|
|
84
125
|
name: 'TreeTable',
|
|
85
|
-
emits: [
|
|
86
|
-
'
|
|
126
|
+
emits: [
|
|
127
|
+
'node-expand',
|
|
128
|
+
'node-collapse',
|
|
129
|
+
'update:expandedKeys',
|
|
130
|
+
'update:selectionKeys',
|
|
131
|
+
'node-select',
|
|
132
|
+
'node-unselect',
|
|
133
|
+
'update:first',
|
|
134
|
+
'update:rows',
|
|
135
|
+
'page',
|
|
136
|
+
'update:sortField',
|
|
137
|
+
'update:sortOrder',
|
|
138
|
+
'update:multiSortMeta',
|
|
139
|
+
'sort',
|
|
140
|
+
'filter',
|
|
141
|
+
'column-resize-end'
|
|
142
|
+
],
|
|
87
143
|
props: {
|
|
88
144
|
value: {
|
|
89
145
|
type: null,
|
|
@@ -223,7 +279,7 @@ export default {
|
|
|
223
279
|
},
|
|
224
280
|
scrollDirection: {
|
|
225
281
|
type: String,
|
|
226
|
-
default:
|
|
282
|
+
default: 'vertical'
|
|
227
283
|
},
|
|
228
284
|
scrollHeight: {
|
|
229
285
|
type: String,
|
|
@@ -245,8 +301,8 @@ export default {
|
|
|
245
301
|
d_rows: this.rows,
|
|
246
302
|
d_sortField: this.sortField,
|
|
247
303
|
d_sortOrder: this.sortOrder,
|
|
248
|
-
d_multiSortMeta: this.multiSortMeta ? [...this.multiSortMeta] : []
|
|
249
|
-
}
|
|
304
|
+
d_multiSortMeta: this.multiSortMeta ? [...this.multiSortMeta] : []
|
|
305
|
+
};
|
|
250
306
|
},
|
|
251
307
|
watch: {
|
|
252
308
|
expandedKeys(newValue) {
|
|
@@ -288,13 +344,12 @@ export default {
|
|
|
288
344
|
if (this.d_expandedKeys[key]) {
|
|
289
345
|
delete this.d_expandedKeys[key];
|
|
290
346
|
this.$emit('node-collapse', node);
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
347
|
+
} else {
|
|
293
348
|
this.d_expandedKeys[key] = true;
|
|
294
349
|
this.$emit('node-expand', node);
|
|
295
350
|
}
|
|
296
351
|
|
|
297
|
-
this.d_expandedKeys = {...this.d_expandedKeys};
|
|
352
|
+
this.d_expandedKeys = { ...this.d_expandedKeys };
|
|
298
353
|
this.$emit('update:expandedKeys', this.d_expandedKeys);
|
|
299
354
|
},
|
|
300
355
|
onNodeClick(event) {
|
|
@@ -308,27 +363,24 @@ export default {
|
|
|
308
363
|
handleSelectionWithMetaKey(event) {
|
|
309
364
|
const originalEvent = event.originalEvent;
|
|
310
365
|
const node = event.node;
|
|
311
|
-
const metaKey =
|
|
366
|
+
const metaKey = originalEvent.metaKey || originalEvent.ctrlKey;
|
|
312
367
|
const selected = this.isNodeSelected(node);
|
|
313
368
|
let _selectionKeys;
|
|
314
369
|
|
|
315
370
|
if (selected && metaKey) {
|
|
316
371
|
if (this.isSingleSelectionMode()) {
|
|
317
372
|
_selectionKeys = {};
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
_selectionKeys = {...this.selectionKeys};
|
|
373
|
+
} else {
|
|
374
|
+
_selectionKeys = { ...this.selectionKeys };
|
|
321
375
|
delete _selectionKeys[node.key];
|
|
322
376
|
}
|
|
323
377
|
|
|
324
378
|
this.$emit('node-unselect', node);
|
|
325
|
-
}
|
|
326
|
-
else {
|
|
379
|
+
} else {
|
|
327
380
|
if (this.isSingleSelectionMode()) {
|
|
328
381
|
_selectionKeys = {};
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
_selectionKeys = !metaKey ? {} : (this.selectionKeys ? {...this.selectionKeys} : {});
|
|
382
|
+
} else if (this.isMultipleSelectionMode()) {
|
|
383
|
+
_selectionKeys = !metaKey ? {} : this.selectionKeys ? { ...this.selectionKeys } : {};
|
|
332
384
|
}
|
|
333
385
|
|
|
334
386
|
_selectionKeys[node.key] = true;
|
|
@@ -346,22 +398,19 @@ export default {
|
|
|
346
398
|
if (selected) {
|
|
347
399
|
_selectionKeys = {};
|
|
348
400
|
this.$emit('node-unselect', node);
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
401
|
+
} else {
|
|
351
402
|
_selectionKeys = {};
|
|
352
403
|
_selectionKeys[node.key] = true;
|
|
353
404
|
this.$emit('node-select', node);
|
|
354
405
|
}
|
|
355
|
-
}
|
|
356
|
-
else {
|
|
406
|
+
} else {
|
|
357
407
|
if (selected) {
|
|
358
|
-
_selectionKeys = {...this.selectionKeys};
|
|
408
|
+
_selectionKeys = { ...this.selectionKeys };
|
|
359
409
|
delete _selectionKeys[node.key];
|
|
360
410
|
|
|
361
411
|
this.$emit('node-unselect', node);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
_selectionKeys = this.selectionKeys ? {...this.selectionKeys} : {};
|
|
412
|
+
} else {
|
|
413
|
+
_selectionKeys = this.selectionKeys ? { ...this.selectionKeys } : {};
|
|
365
414
|
_selectionKeys[node.key] = true;
|
|
366
415
|
|
|
367
416
|
this.$emit('node-select', node);
|
|
@@ -373,10 +422,8 @@ export default {
|
|
|
373
422
|
onCheckboxChange(event) {
|
|
374
423
|
this.$emit('update:selectionKeys', event.selectionKeys);
|
|
375
424
|
|
|
376
|
-
if (event.check)
|
|
377
|
-
|
|
378
|
-
else
|
|
379
|
-
this.$emit('node-unselect', event.node);
|
|
425
|
+
if (event.check) this.$emit('node-select', event.node);
|
|
426
|
+
else this.$emit('node-unselect', event.node);
|
|
380
427
|
},
|
|
381
428
|
isSingleSelectionMode() {
|
|
382
429
|
return this.selectionMode === 'single';
|
|
@@ -389,6 +436,7 @@ export default {
|
|
|
389
436
|
this.d_rows = event.rows;
|
|
390
437
|
|
|
391
438
|
let pageEvent = this.createLazyLoadEvent(event);
|
|
439
|
+
|
|
392
440
|
pageEvent.pageCount = event.pageCount;
|
|
393
441
|
pageEvent.page = event.page;
|
|
394
442
|
|
|
@@ -401,9 +449,13 @@ export default {
|
|
|
401
449
|
this.$emit('update:first', this.d_first);
|
|
402
450
|
},
|
|
403
451
|
getFilterColumnHeaderClass(column) {
|
|
404
|
-
return [
|
|
405
|
-
'p-
|
|
406
|
-
|
|
452
|
+
return [
|
|
453
|
+
'p-filter-column',
|
|
454
|
+
this.columnProp(column, 'filterHeaderClass'),
|
|
455
|
+
{
|
|
456
|
+
'p-frozen-column': this.columnProp(column, 'frozen')
|
|
457
|
+
}
|
|
458
|
+
];
|
|
407
459
|
},
|
|
408
460
|
onColumnHeaderClick(e) {
|
|
409
461
|
let event = e.originalEvent;
|
|
@@ -413,21 +465,23 @@ export default {
|
|
|
413
465
|
const targetNode = event.target;
|
|
414
466
|
const columnField = this.columnProp(column, 'sortField') || this.columnProp(column, 'field');
|
|
415
467
|
|
|
416
|
-
if (
|
|
417
|
-
|
|
468
|
+
if (
|
|
469
|
+
DomHandler.hasClass(targetNode, 'p-sortable-column') ||
|
|
470
|
+
DomHandler.hasClass(targetNode, 'p-column-title') ||
|
|
471
|
+
DomHandler.hasClass(targetNode, 'p-sortable-column-icon') ||
|
|
472
|
+
DomHandler.hasClass(targetNode.parentElement, 'p-sortable-column-icon')
|
|
473
|
+
) {
|
|
418
474
|
DomHandler.clearSelection();
|
|
419
475
|
|
|
420
476
|
if (this.sortMode === 'single') {
|
|
421
477
|
if (this.d_sortField === columnField) {
|
|
422
|
-
if (this.removableSort &&
|
|
478
|
+
if (this.removableSort && this.d_sortOrder * -1 === this.defaultSortOrder) {
|
|
423
479
|
this.d_sortOrder = null;
|
|
424
480
|
this.d_sortField = null;
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
481
|
+
} else {
|
|
427
482
|
this.d_sortOrder = this.d_sortOrder * -1;
|
|
428
483
|
}
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
484
|
+
} else {
|
|
431
485
|
this.d_sortOrder = this.defaultSortOrder;
|
|
432
486
|
this.d_sortField = columnField;
|
|
433
487
|
}
|
|
@@ -435,11 +489,11 @@ export default {
|
|
|
435
489
|
this.$emit('update:sortField', this.d_sortField);
|
|
436
490
|
this.$emit('update:sortOrder', this.d_sortOrder);
|
|
437
491
|
this.resetPage();
|
|
438
|
-
}
|
|
439
|
-
else if (this.sortMode === 'multiple') {
|
|
492
|
+
} else if (this.sortMode === 'multiple') {
|
|
440
493
|
let metaKey = event.metaKey || event.ctrlKey;
|
|
494
|
+
|
|
441
495
|
if (!metaKey) {
|
|
442
|
-
this.d_multiSortMeta =
|
|
496
|
+
this.d_multiSortMeta = this.d_multiSortMeta.filter((meta) => meta.field === columnField);
|
|
443
497
|
}
|
|
444
498
|
|
|
445
499
|
this.addMultiSortField(columnField);
|
|
@@ -451,16 +505,13 @@ export default {
|
|
|
451
505
|
}
|
|
452
506
|
},
|
|
453
507
|
addMultiSortField(field) {
|
|
454
|
-
let index =
|
|
508
|
+
let index = this.d_multiSortMeta.findIndex((meta) => meta.field === field);
|
|
455
509
|
|
|
456
510
|
if (index >= 0) {
|
|
457
|
-
if (this.removableSort &&
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
else {
|
|
463
|
-
this.d_multiSortMeta.push({field: field, order: this.defaultSortOrder});
|
|
511
|
+
if (this.removableSort && this.d_multiSortMeta[index].order * -1 === this.defaultSortOrder) this.d_multiSortMeta.splice(index, 1);
|
|
512
|
+
else this.d_multiSortMeta[index] = { field: field, order: this.d_multiSortMeta[index].order * -1 };
|
|
513
|
+
} else {
|
|
514
|
+
this.d_multiSortMeta.push({ field: field, order: this.defaultSortOrder });
|
|
464
515
|
}
|
|
465
516
|
|
|
466
517
|
this.d_multiSortMeta = [...this.d_multiSortMeta];
|
|
@@ -476,18 +527,13 @@ export default {
|
|
|
476
527
|
const value2 = ObjectUtils.resolveFieldData(node2.data, this.d_sortField);
|
|
477
528
|
let result = null;
|
|
478
529
|
|
|
479
|
-
if (value1 == null && value2 != null)
|
|
480
|
-
|
|
481
|
-
else if (value1
|
|
482
|
-
|
|
483
|
-
else
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
result = value1.localeCompare(value2, undefined, { numeric: true });
|
|
487
|
-
else
|
|
488
|
-
result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;
|
|
489
|
-
|
|
490
|
-
return (this.d_sortOrder * result);
|
|
530
|
+
if (value1 == null && value2 != null) result = -1;
|
|
531
|
+
else if (value1 != null && value2 == null) result = 1;
|
|
532
|
+
else if (value1 == null && value2 == null) result = 0;
|
|
533
|
+
else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, { numeric: true });
|
|
534
|
+
else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
535
|
+
|
|
536
|
+
return this.d_sortOrder * result;
|
|
491
537
|
});
|
|
492
538
|
|
|
493
539
|
return _nodes;
|
|
@@ -497,6 +543,7 @@ export default {
|
|
|
497
543
|
},
|
|
498
544
|
sortNodesMultiple(nodes) {
|
|
499
545
|
let _nodes = [...nodes];
|
|
546
|
+
|
|
500
547
|
_nodes.sort((node1, node2) => {
|
|
501
548
|
return this.multisortField(node1, node2, 0);
|
|
502
549
|
});
|
|
@@ -508,32 +555,26 @@ export default {
|
|
|
508
555
|
const value2 = ObjectUtils.resolveFieldData(node2.data, this.d_multiSortMeta[index].field);
|
|
509
556
|
let result = null;
|
|
510
557
|
|
|
511
|
-
if (value1 == null && value2 != null)
|
|
512
|
-
|
|
513
|
-
else if (value1
|
|
514
|
-
result = 1;
|
|
515
|
-
else if (value1 == null && value2 == null)
|
|
516
|
-
result = 0;
|
|
558
|
+
if (value1 == null && value2 != null) result = -1;
|
|
559
|
+
else if (value1 != null && value2 == null) result = 1;
|
|
560
|
+
else if (value1 == null && value2 == null) result = 0;
|
|
517
561
|
else {
|
|
518
|
-
if (value1 === value2)
|
|
519
|
-
return
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
return (this.d_multiSortMeta[index].order * value1.localeCompare(value2, undefined, { numeric: true }));
|
|
524
|
-
else
|
|
525
|
-
result = (value1 < value2) ? -1 : 1;
|
|
562
|
+
if (value1 === value2) {
|
|
563
|
+
return this.d_multiSortMeta.length - 1 > index ? this.multisortField(node1, node2, index + 1) : 0;
|
|
564
|
+
} else {
|
|
565
|
+
if ((typeof value1 === 'string' || value1 instanceof String) && (typeof value2 === 'string' || value2 instanceof String)) return this.d_multiSortMeta[index].order * value1.localeCompare(value2, undefined, { numeric: true });
|
|
566
|
+
else result = value1 < value2 ? -1 : 1;
|
|
526
567
|
}
|
|
527
568
|
}
|
|
528
569
|
|
|
529
|
-
return
|
|
570
|
+
return this.d_multiSortMeta[index].order * result;
|
|
530
571
|
},
|
|
531
572
|
filter(value) {
|
|
532
573
|
let filteredNodes = [];
|
|
533
574
|
const strict = this.filterMode === 'strict';
|
|
534
575
|
|
|
535
576
|
for (let node of value) {
|
|
536
|
-
let copyNode = {...node};
|
|
577
|
+
let copyNode = { ...node };
|
|
537
578
|
let localMatch = true;
|
|
538
579
|
let globalMatch = false;
|
|
539
580
|
|
|
@@ -546,11 +587,13 @@ export default {
|
|
|
546
587
|
let filterMatchMode = this.columnProp(col, 'filterMatchMode') || 'startsWith';
|
|
547
588
|
let filterValue = this.filters[this.columnProp(col, 'field')];
|
|
548
589
|
let filterConstraint = FilterService.filters[filterMatchMode];
|
|
549
|
-
let paramsWithoutNode = {filterField, filterValue, filterConstraint, strict};
|
|
590
|
+
let paramsWithoutNode = { filterField, filterValue, filterConstraint, strict };
|
|
550
591
|
|
|
551
|
-
if (
|
|
552
|
-
(
|
|
553
|
-
|
|
592
|
+
if (
|
|
593
|
+
(strict && !(this.findFilteredNodes(copyNode, paramsWithoutNode) || this.isFilterMatched(copyNode, paramsWithoutNode))) ||
|
|
594
|
+
(!strict && !(this.isFilterMatched(copyNode, paramsWithoutNode) || this.findFilteredNodes(copyNode, paramsWithoutNode)))
|
|
595
|
+
) {
|
|
596
|
+
localMatch = false;
|
|
554
597
|
}
|
|
555
598
|
|
|
556
599
|
if (!localMatch) {
|
|
@@ -560,20 +603,23 @@ export default {
|
|
|
560
603
|
|
|
561
604
|
//global
|
|
562
605
|
if (this.hasGlobalFilter() && !globalMatch) {
|
|
563
|
-
let copyNodeForGlobal = {...copyNode};
|
|
606
|
+
let copyNodeForGlobal = { ...copyNode };
|
|
564
607
|
let filterValue = this.filters['global'];
|
|
565
608
|
let filterConstraint = FilterService.filters['contains'];
|
|
566
|
-
let globalFilterParamsWithoutNode = {filterField, filterValue, filterConstraint, strict};
|
|
567
|
-
|
|
568
|
-
if (
|
|
569
|
-
(
|
|
570
|
-
|
|
571
|
-
|
|
609
|
+
let globalFilterParamsWithoutNode = { filterField, filterValue, filterConstraint, strict };
|
|
610
|
+
|
|
611
|
+
if (
|
|
612
|
+
(strict && (this.findFilteredNodes(copyNodeForGlobal, globalFilterParamsWithoutNode) || this.isFilterMatched(copyNodeForGlobal, globalFilterParamsWithoutNode))) ||
|
|
613
|
+
(!strict && (this.isFilterMatched(copyNodeForGlobal, globalFilterParamsWithoutNode) || this.findFilteredNodes(copyNodeForGlobal, globalFilterParamsWithoutNode)))
|
|
614
|
+
) {
|
|
615
|
+
globalMatch = true;
|
|
616
|
+
copyNode = copyNodeForGlobal;
|
|
572
617
|
}
|
|
573
618
|
}
|
|
574
619
|
}
|
|
575
620
|
|
|
576
621
|
let matches = localMatch;
|
|
622
|
+
|
|
577
623
|
if (this.hasGlobalFilter()) {
|
|
578
624
|
matches = localMatch && globalMatch;
|
|
579
625
|
}
|
|
@@ -584,6 +630,7 @@ export default {
|
|
|
584
630
|
}
|
|
585
631
|
|
|
586
632
|
let filterEvent = this.createLazyLoadEvent(event);
|
|
633
|
+
|
|
587
634
|
filterEvent.filteredValue = filteredNodes;
|
|
588
635
|
this.$emit('filter', filterEvent);
|
|
589
636
|
|
|
@@ -592,11 +639,15 @@ export default {
|
|
|
592
639
|
findFilteredNodes(node, paramsWithoutNode) {
|
|
593
640
|
if (node) {
|
|
594
641
|
let matched = false;
|
|
642
|
+
|
|
595
643
|
if (node.children) {
|
|
596
644
|
let childNodes = [...node.children];
|
|
645
|
+
|
|
597
646
|
node.children = [];
|
|
647
|
+
|
|
598
648
|
for (let childNode of childNodes) {
|
|
599
|
-
let copyChildNode = {...childNode};
|
|
649
|
+
let copyChildNode = { ...childNode };
|
|
650
|
+
|
|
600
651
|
if (this.isFilterMatched(copyChildNode, paramsWithoutNode)) {
|
|
601
652
|
matched = true;
|
|
602
653
|
node.children.push(copyChildNode);
|
|
@@ -609,30 +660,32 @@ export default {
|
|
|
609
660
|
}
|
|
610
661
|
}
|
|
611
662
|
},
|
|
612
|
-
isFilterMatched(node, {filterField, filterValue, filterConstraint, strict}) {
|
|
663
|
+
isFilterMatched(node, { filterField, filterValue, filterConstraint, strict }) {
|
|
613
664
|
let matched = false;
|
|
614
665
|
let dataFieldValue = ObjectUtils.resolveFieldData(node.data, filterField);
|
|
666
|
+
|
|
615
667
|
if (filterConstraint(dataFieldValue, filterValue, this.filterLocale)) {
|
|
616
668
|
matched = true;
|
|
617
669
|
}
|
|
618
670
|
|
|
619
671
|
if (!matched || (strict && !this.isNodeLeaf(node))) {
|
|
620
|
-
matched = this.findFilteredNodes(node, {filterField, filterValue, filterConstraint, strict}) || matched;
|
|
672
|
+
matched = this.findFilteredNodes(node, { filterField, filterValue, filterConstraint, strict }) || matched;
|
|
621
673
|
}
|
|
622
674
|
|
|
623
675
|
return matched;
|
|
624
676
|
},
|
|
625
677
|
isNodeSelected(node) {
|
|
626
|
-
return
|
|
678
|
+
return this.selectionMode && this.selectionKeys ? this.selectionKeys[node.key] === true : false;
|
|
627
679
|
},
|
|
628
680
|
isNodeLeaf(node) {
|
|
629
681
|
return node.leaf === false ? false : !(node.children && node.children.length);
|
|
630
682
|
},
|
|
631
683
|
createLazyLoadEvent(event) {
|
|
632
684
|
let filterMatchModes;
|
|
685
|
+
|
|
633
686
|
if (this.hasFilters()) {
|
|
634
687
|
filterMatchModes = {};
|
|
635
|
-
this.columns.forEach(col => {
|
|
688
|
+
this.columns.forEach((col) => {
|
|
636
689
|
if (this.columnProp(col, 'field')) {
|
|
637
690
|
filterMatchModes[col.props.field] = this.columnProp(col, 'filterMatchMode');
|
|
638
691
|
}
|
|
@@ -652,26 +705,28 @@ export default {
|
|
|
652
705
|
},
|
|
653
706
|
onColumnResizeStart(event) {
|
|
654
707
|
let containerLeft = DomHandler.getOffset(this.$el).left;
|
|
708
|
+
|
|
655
709
|
this.resizeColumnElement = event.target.parentElement;
|
|
656
710
|
this.columnResizing = true;
|
|
657
|
-
this.lastResizeHelperX =
|
|
711
|
+
this.lastResizeHelperX = event.pageX - containerLeft + this.$el.scrollLeft;
|
|
658
712
|
|
|
659
713
|
this.bindColumnResizeEvents();
|
|
660
714
|
},
|
|
661
715
|
onColumnResize(event) {
|
|
662
716
|
let containerLeft = DomHandler.getOffset(this.$el).left;
|
|
717
|
+
|
|
663
718
|
DomHandler.addClass(this.$el, 'p-unselectable-text');
|
|
664
719
|
this.$refs.resizeHelper.style.height = this.$el.offsetHeight + 'px';
|
|
665
720
|
this.$refs.resizeHelper.style.top = 0 + 'px';
|
|
666
|
-
this.$refs.resizeHelper.style.left =
|
|
721
|
+
this.$refs.resizeHelper.style.left = event.pageX - containerLeft + this.$el.scrollLeft + 'px';
|
|
667
722
|
|
|
668
723
|
this.$refs.resizeHelper.style.display = 'block';
|
|
669
724
|
},
|
|
670
725
|
onColumnResizeEnd() {
|
|
671
|
-
|
|
726
|
+
let delta = this.$refs.resizeHelper.offsetLeft - this.lastResizeHelperX;
|
|
672
727
|
let columnWidth = this.resizeColumnElement.offsetWidth;
|
|
673
728
|
let newColumnWidth = columnWidth + delta;
|
|
674
|
-
let minWidth = this.resizeColumnElement.style.minWidth||15;
|
|
729
|
+
let minWidth = this.resizeColumnElement.style.minWidth || 15;
|
|
675
730
|
|
|
676
731
|
if (columnWidth + delta > parseInt(minWidth, 10)) {
|
|
677
732
|
if (this.columnResizeMode === 'fit') {
|
|
@@ -681,22 +736,19 @@ export default {
|
|
|
681
736
|
if (newColumnWidth > 15 && nextColumnWidth > 15) {
|
|
682
737
|
if (!this.scrollable) {
|
|
683
738
|
this.resizeColumnElement.style.width = newColumnWidth + 'px';
|
|
684
|
-
|
|
739
|
+
|
|
740
|
+
if (nextColumn) {
|
|
685
741
|
nextColumn.style.width = nextColumnWidth + 'px';
|
|
686
742
|
}
|
|
687
|
-
}
|
|
688
|
-
else {
|
|
743
|
+
} else {
|
|
689
744
|
this.resizeTableCells(newColumnWidth, nextColumnWidth);
|
|
690
745
|
}
|
|
691
746
|
}
|
|
692
|
-
}
|
|
693
|
-
else if (this.columnResizeMode === 'expand') {
|
|
747
|
+
} else if (this.columnResizeMode === 'expand') {
|
|
694
748
|
this.$refs.table.style.width = this.$refs.table.offsetWidth + delta + 'px';
|
|
695
749
|
|
|
696
|
-
if (!this.scrollable)
|
|
697
|
-
|
|
698
|
-
else
|
|
699
|
-
this.resizeTableCells(newColumnWidth);
|
|
750
|
+
if (!this.scrollable) this.resizeColumnElement.style.width = newColumnWidth + 'px';
|
|
751
|
+
else this.resizeTableCells(newColumnWidth);
|
|
700
752
|
}
|
|
701
753
|
|
|
702
754
|
this.$emit('column-resize-end', {
|
|
@@ -714,13 +766,16 @@ export default {
|
|
|
714
766
|
resizeTableCells(newColumnWidth, nextColumnWidth) {
|
|
715
767
|
let colIndex = DomHandler.index(this.resizeColumnElement);
|
|
716
768
|
let children = this.$refs.table.children;
|
|
769
|
+
|
|
717
770
|
for (let child of children) {
|
|
718
771
|
for (let row of child.children) {
|
|
719
772
|
let resizeCell = row.children[colIndex];
|
|
773
|
+
|
|
720
774
|
resizeCell.style.flex = '0 0 ' + newColumnWidth + 'px';
|
|
721
775
|
|
|
722
776
|
if (this.columnResizeMode === 'fit') {
|
|
723
777
|
let nextCell = resizeCell.nextElementSibling;
|
|
778
|
+
|
|
724
779
|
if (nextCell) {
|
|
725
780
|
nextCell.style.flex = '0 0 ' + nextColumnWidth + 'px';
|
|
726
781
|
}
|
|
@@ -731,7 +786,7 @@ export default {
|
|
|
731
786
|
bindColumnResizeEvents() {
|
|
732
787
|
if (!this.documentColumnResizeListener) {
|
|
733
788
|
this.documentColumnResizeListener = document.addEventListener('mousemove', () => {
|
|
734
|
-
if(this.columnResizing) {
|
|
789
|
+
if (this.columnResizing) {
|
|
735
790
|
this.onColumnResize(event);
|
|
736
791
|
}
|
|
737
792
|
});
|
|
@@ -739,13 +794,12 @@ export default {
|
|
|
739
794
|
|
|
740
795
|
if (!this.documentColumnResizeEndListener) {
|
|
741
796
|
this.documentColumnResizeEndListener = document.addEventListener('mouseup', () => {
|
|
742
|
-
if(this.columnResizing) {
|
|
797
|
+
if (this.columnResizing) {
|
|
743
798
|
this.columnResizing = false;
|
|
744
799
|
this.onColumnResizeEnd();
|
|
745
800
|
}
|
|
746
801
|
});
|
|
747
802
|
}
|
|
748
|
-
|
|
749
803
|
},
|
|
750
804
|
unbindColumnResizeEvents() {
|
|
751
805
|
if (this.documentColumnResizeListener) {
|
|
@@ -755,7 +809,7 @@ export default {
|
|
|
755
809
|
|
|
756
810
|
if (this.documentColumnResizeEndListener) {
|
|
757
811
|
document.removeEventListener('document', this.documentColumnResizeEndListener);
|
|
758
|
-
|
|
812
|
+
this.documentColumnResizeEndListener = null;
|
|
759
813
|
}
|
|
760
814
|
},
|
|
761
815
|
onColumnKeyDown(event, col) {
|
|
@@ -786,29 +840,30 @@ export default {
|
|
|
786
840
|
},
|
|
787
841
|
computed: {
|
|
788
842
|
containerClass() {
|
|
789
|
-
return [
|
|
790
|
-
'p-treetable-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
843
|
+
return [
|
|
844
|
+
'p-treetable p-component',
|
|
845
|
+
{
|
|
846
|
+
'p-treetable-hoverable-rows': this.rowHover || this.rowSelectionMode,
|
|
847
|
+
'p-treetable-auto-layout': this.autoLayout,
|
|
848
|
+
'p-treetable-resizable': this.resizableColumns,
|
|
849
|
+
'p-treetable-resizable-fit': this.resizableColumns && this.columnResizeMode === 'fit',
|
|
850
|
+
'p-treetable-gridlines': this.showGridlines,
|
|
851
|
+
'p-treetable-scrollable': this.scrollable,
|
|
852
|
+
'p-treetable-scrollable-vertical': this.scrollable && this.scrollDirection === 'vertical',
|
|
853
|
+
'p-treetable-scrollable-horizontal': this.scrollable && this.scrollDirection === 'horizontal',
|
|
854
|
+
'p-treetable-scrollable-both': this.scrollable && this.scrollDirection === 'both',
|
|
855
|
+
'p-treetable-flex-scrollable': this.scrollable && this.scrollHeight === 'flex',
|
|
856
|
+
'p-treetable-responsive-scroll': this.responsiveLayout === 'scroll'
|
|
857
|
+
}
|
|
858
|
+
];
|
|
802
859
|
},
|
|
803
860
|
columns() {
|
|
804
861
|
let cols = [];
|
|
805
862
|
let children = this.$slots.default();
|
|
806
863
|
|
|
807
|
-
children.forEach(child => {
|
|
808
|
-
if (child.children && child.children instanceof Array)
|
|
809
|
-
|
|
810
|
-
else if (child.type.name === 'Column')
|
|
811
|
-
cols.push(child);
|
|
864
|
+
children.forEach((child) => {
|
|
865
|
+
if (child.children && child.children instanceof Array) cols = [...cols, ...child.children];
|
|
866
|
+
else if (child.type.name === 'Column') cols.push(child);
|
|
812
867
|
});
|
|
813
868
|
|
|
814
869
|
return cols;
|
|
@@ -816,16 +871,13 @@ export default {
|
|
|
816
871
|
processedData() {
|
|
817
872
|
if (this.lazy) {
|
|
818
873
|
return this.value;
|
|
819
|
-
}
|
|
820
|
-
else {
|
|
874
|
+
} else {
|
|
821
875
|
if (this.value && this.value.length) {
|
|
822
876
|
let data = this.value;
|
|
823
877
|
|
|
824
878
|
if (this.sorted) {
|
|
825
|
-
if(this.sortMode === 'single')
|
|
826
|
-
|
|
827
|
-
else if(this.sortMode === 'multiple')
|
|
828
|
-
data = this.sortMultiple(data);
|
|
879
|
+
if (this.sortMode === 'single') data = this.sortSingle(data);
|
|
880
|
+
else if (this.sortMode === 'multiple') data = this.sortMultiple(data);
|
|
829
881
|
}
|
|
830
882
|
|
|
831
883
|
if (this.hasFilters()) {
|
|
@@ -833,8 +885,7 @@ export default {
|
|
|
833
885
|
}
|
|
834
886
|
|
|
835
887
|
return data;
|
|
836
|
-
}
|
|
837
|
-
else {
|
|
888
|
+
} else {
|
|
838
889
|
return null;
|
|
839
890
|
}
|
|
840
891
|
}
|
|
@@ -844,15 +895,16 @@ export default {
|
|
|
844
895
|
|
|
845
896
|
if (this.paginator) {
|
|
846
897
|
const first = this.lazy ? 0 : this.d_first;
|
|
898
|
+
|
|
847
899
|
return data.slice(first, first + this.d_rows);
|
|
848
|
-
}
|
|
849
|
-
else {
|
|
900
|
+
} else {
|
|
850
901
|
return data;
|
|
851
902
|
}
|
|
852
903
|
},
|
|
853
904
|
empty() {
|
|
854
905
|
const data = this.processedData;
|
|
855
|
-
|
|
906
|
+
|
|
907
|
+
return !data || data.length === 0;
|
|
856
908
|
},
|
|
857
909
|
sorted() {
|
|
858
910
|
return this.d_sortField || (this.d_multiSortMeta && this.d_multiSortMeta.length > 0);
|
|
@@ -861,7 +913,7 @@ export default {
|
|
|
861
913
|
let hasFooter = false;
|
|
862
914
|
|
|
863
915
|
for (let col of this.columns) {
|
|
864
|
-
if (this.columnProp(col, 'footer')|| (col.children && col.children.footer)) {
|
|
916
|
+
if (this.columnProp(col, 'footer') || (col.children && col.children.footer)) {
|
|
865
917
|
hasFooter = true;
|
|
866
918
|
break;
|
|
867
919
|
}
|
|
@@ -887,9 +939,9 @@ export default {
|
|
|
887
939
|
totalRecordsLength() {
|
|
888
940
|
if (this.lazy) {
|
|
889
941
|
return this.totalRecords;
|
|
890
|
-
}
|
|
891
|
-
else {
|
|
942
|
+
} else {
|
|
892
943
|
const data = this.processedData;
|
|
944
|
+
|
|
893
945
|
return data ? data.length : 0;
|
|
894
946
|
}
|
|
895
947
|
},
|
|
@@ -898,12 +950,12 @@ export default {
|
|
|
898
950
|
}
|
|
899
951
|
},
|
|
900
952
|
components: {
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
953
|
+
TTRow: TreeTableRow,
|
|
954
|
+
TTPaginator: Paginator,
|
|
955
|
+
TTHeaderCell: HeaderCell,
|
|
956
|
+
TTFooterCell: FooterCell
|
|
905
957
|
}
|
|
906
|
-
}
|
|
958
|
+
};
|
|
907
959
|
</script>
|
|
908
960
|
|
|
909
961
|
<style>
|
|
@@ -980,10 +1032,10 @@ export default {
|
|
|
980
1032
|
top: 0;
|
|
981
1033
|
right: 0;
|
|
982
1034
|
margin: 0;
|
|
983
|
-
width: .5rem;
|
|
1035
|
+
width: 0.5rem;
|
|
984
1036
|
height: 100%;
|
|
985
1037
|
padding: 0px;
|
|
986
|
-
cursor:col-resize;
|
|
1038
|
+
cursor: col-resize;
|
|
987
1039
|
border: 1px solid transparent;
|
|
988
1040
|
}
|
|
989
1041
|
|
|
@@ -1058,8 +1110,7 @@ export default {
|
|
|
1058
1110
|
.p-treetable-scrollable-both .p-treetable-thead > tr > th,
|
|
1059
1111
|
.p-treetable-scrollable-both .p-treetable-tbody > tr > td,
|
|
1060
1112
|
.p-treetable-scrollable-both .p-treetable-tfoot > tr > td,
|
|
1061
|
-
.p-treetable-scrollable-horizontal .p-treetable-thead > tr > th
|
|
1062
|
-
.p-treetable-scrollable-horizontal .p-treetable-tbody > tr > td,
|
|
1113
|
+
.p-treetable-scrollable-horizontal .p-treetable-thead > tr > th .p-treetable-scrollable-horizontal .p-treetable-tbody > tr > td,
|
|
1063
1114
|
.p-treetable-scrollable-horizontal .p-treetable-tfoot > tr > td {
|
|
1064
1115
|
flex: 0 0 auto;
|
|
1065
1116
|
}
|