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/datatable/datatable.js
CHANGED
|
@@ -47,13 +47,13 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
47
47
|
|
|
48
48
|
function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
49
49
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
50
|
-
class: vue.normalizeClass(['p-checkbox p-component', {'p-checkbox-focused': $data.focused, 'p-disabled': _ctx.$attrs.disabled}]),
|
|
50
|
+
class: vue.normalizeClass(['p-checkbox p-component', { 'p-checkbox-focused': $data.focused, 'p-disabled': _ctx.$attrs.disabled }]),
|
|
51
51
|
onClick: _cache[2] || (_cache[2] = (...args) => ($options.onClick && $options.onClick(...args))),
|
|
52
52
|
onKeydown: _cache[3] || (_cache[3] = vue.withKeys(vue.withModifiers((...args) => ($options.onClick && $options.onClick(...args)), ["prevent"]), ["space"]))
|
|
53
53
|
}, [
|
|
54
54
|
vue.createElementVNode("div", {
|
|
55
55
|
ref: "box",
|
|
56
|
-
class: vue.normalizeClass(['p-checkbox-box p-component', {'p-highlight': $props.checked, 'p-disabled': _ctx.$attrs.disabled, 'p-focus': $data.focused}]),
|
|
56
|
+
class: vue.normalizeClass(['p-checkbox-box p-component', { 'p-highlight': $props.checked, 'p-disabled': _ctx.$attrs.disabled, 'p-focus': $data.focused }]),
|
|
57
57
|
role: "checkbox",
|
|
58
58
|
"aria-checked": $props.checked,
|
|
59
59
|
tabindex: _ctx.$attrs.disabled ? null : '0',
|
|
@@ -61,7 +61,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
61
61
|
onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event)))
|
|
62
62
|
}, [
|
|
63
63
|
vue.createElementVNode("span", {
|
|
64
|
-
class: vue.normalizeClass(['p-checkbox-icon', {'pi pi-check': $props.checked}])
|
|
64
|
+
class: vue.normalizeClass(['p-checkbox-icon', { 'pi pi-check': $props.checked }])
|
|
65
65
|
}, null, 2)
|
|
66
66
|
], 42, _hoisted_1$a)
|
|
67
67
|
], 34))
|
|
@@ -71,7 +71,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
71
71
|
|
|
72
72
|
var script$9 = {
|
|
73
73
|
name: 'ColumnFilter',
|
|
74
|
-
emits: ['filter-change','filter-apply','operator-change','matchmode-change','constraint-add','constraint-remove','filter-clear','apply-click'],
|
|
74
|
+
emits: ['filter-change', 'filter-apply', 'operator-change', 'matchmode-change', 'constraint-add', 'constraint-remove', 'filter-clear', 'apply-click'],
|
|
75
75
|
props: {
|
|
76
76
|
field: {
|
|
77
77
|
type: String,
|
|
@@ -148,7 +148,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
148
148
|
overlayVisible: false,
|
|
149
149
|
defaultMatchMode: null,
|
|
150
150
|
defaultOperator: null
|
|
151
|
-
}
|
|
151
|
+
};
|
|
152
152
|
},
|
|
153
153
|
overlay: null,
|
|
154
154
|
selfClick: false,
|
|
@@ -167,24 +167,24 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
167
167
|
mounted() {
|
|
168
168
|
if (this.filters && this.filters[this.field]) {
|
|
169
169
|
let fieldFilters = this.filters[this.field];
|
|
170
|
+
|
|
170
171
|
if (fieldFilters.operator) {
|
|
171
172
|
this.defaultMatchMode = fieldFilters.constraints[0].matchMode;
|
|
172
173
|
this.defaultOperator = fieldFilters.operator;
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
174
|
+
} else {
|
|
175
175
|
this.defaultMatchMode = this.filters[this.field].matchMode;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
methods: {
|
|
180
180
|
clearFilter() {
|
|
181
|
-
let _filters = {...this.filters};
|
|
181
|
+
let _filters = { ...this.filters };
|
|
182
|
+
|
|
182
183
|
if (_filters[this.field].operator) {
|
|
183
184
|
_filters[this.field].constraints.splice(1);
|
|
184
185
|
_filters[this.field].operator = this.defaultOperator;
|
|
185
|
-
_filters[this.field].constraints[0] = {value: null, matchMode: this.defaultMatchMode};
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
186
|
+
_filters[this.field].constraints[0] = { value: null, matchMode: this.defaultMatchMode };
|
|
187
|
+
} else {
|
|
188
188
|
_filters[this.field].value = null;
|
|
189
189
|
_filters[this.field].matchMode = this.defaultMatchMode;
|
|
190
190
|
}
|
|
@@ -195,18 +195,17 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
195
195
|
this.hide();
|
|
196
196
|
},
|
|
197
197
|
applyFilter() {
|
|
198
|
-
this.$emit('apply-click', {field: this.field, constraints: this.filters[this.field]});
|
|
198
|
+
this.$emit('apply-click', { field: this.field, constraints: this.filters[this.field] });
|
|
199
199
|
this.$emit('filter-apply');
|
|
200
200
|
this.hide();
|
|
201
201
|
},
|
|
202
202
|
hasFilter() {
|
|
203
203
|
if (this.filtersStore) {
|
|
204
204
|
let fieldFilter = this.filtersStore[this.field];
|
|
205
|
+
|
|
205
206
|
if (fieldFilter) {
|
|
206
|
-
if (fieldFilter.operator)
|
|
207
|
-
|
|
208
|
-
else
|
|
209
|
-
return !this.isFilterBlank(fieldFilter.value);
|
|
207
|
+
if (fieldFilter.operator) return !this.isFilterBlank(fieldFilter.constraints[0].value);
|
|
208
|
+
else return !this.isFilterBlank(fieldFilter.value);
|
|
210
209
|
}
|
|
211
210
|
}
|
|
212
211
|
|
|
@@ -217,48 +216,51 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
217
216
|
},
|
|
218
217
|
isFilterBlank(filter) {
|
|
219
218
|
if (filter !== null && filter !== undefined) {
|
|
220
|
-
if ((typeof filter === 'string' && filter.trim().length == 0) || (filter instanceof Array && filter.length == 0))
|
|
221
|
-
|
|
222
|
-
else
|
|
223
|
-
return false;
|
|
219
|
+
if ((typeof filter === 'string' && filter.trim().length == 0) || (filter instanceof Array && filter.length == 0)) return true;
|
|
220
|
+
else return false;
|
|
224
221
|
}
|
|
222
|
+
|
|
225
223
|
return true;
|
|
226
224
|
},
|
|
227
225
|
toggleMenu() {
|
|
228
226
|
this.overlayVisible = !this.overlayVisible;
|
|
229
227
|
},
|
|
230
228
|
onToggleButtonKeyDown(event) {
|
|
231
|
-
switch(event.key) {
|
|
229
|
+
switch (event.key) {
|
|
232
230
|
case 'Escape':
|
|
233
231
|
case 'Tab':
|
|
234
232
|
this.overlayVisible = false;
|
|
235
|
-
|
|
233
|
+
break;
|
|
236
234
|
|
|
237
235
|
case 'ArrowDown':
|
|
238
236
|
if (this.overlayVisible) {
|
|
239
237
|
let focusable = utils.DomHandler.getFocusableElements(this.overlay);
|
|
238
|
+
|
|
240
239
|
if (focusable) {
|
|
241
240
|
focusable[0].focus();
|
|
242
241
|
}
|
|
242
|
+
|
|
243
243
|
event.preventDefault();
|
|
244
|
-
}
|
|
245
|
-
else if (event.altKey) {
|
|
244
|
+
} else if (event.altKey) {
|
|
246
245
|
this.overlayVisible = true;
|
|
247
246
|
event.preventDefault();
|
|
248
247
|
}
|
|
249
|
-
|
|
248
|
+
|
|
249
|
+
break;
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
onEscape() {
|
|
253
253
|
this.overlayVisible = false;
|
|
254
|
+
|
|
254
255
|
if (this.$refs.icon) {
|
|
255
256
|
this.$refs.icon.focus();
|
|
256
257
|
}
|
|
257
258
|
},
|
|
258
259
|
onRowMatchModeChange(matchMode) {
|
|
259
|
-
let _filters = {...this.filters};
|
|
260
|
+
let _filters = { ...this.filters };
|
|
261
|
+
|
|
260
262
|
_filters[this.field].matchMode = matchMode;
|
|
261
|
-
this.$emit('matchmode-change', {field: this.field, matchMode: matchMode});
|
|
263
|
+
this.$emit('matchmode-change', { field: this.field, matchMode: matchMode });
|
|
262
264
|
this.$emit('filter-change', _filters);
|
|
263
265
|
this.$emit('filter-apply');
|
|
264
266
|
this.hide();
|
|
@@ -266,9 +268,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
266
268
|
onRowMatchModeKeyDown(event) {
|
|
267
269
|
let item = event.target;
|
|
268
270
|
|
|
269
|
-
switch(event.key) {
|
|
271
|
+
switch (event.key) {
|
|
270
272
|
case 'ArrowDown':
|
|
271
273
|
var nextItem = this.findNextItem(item);
|
|
274
|
+
|
|
272
275
|
if (nextItem) {
|
|
273
276
|
item.removeAttribute('tabindex');
|
|
274
277
|
nextItem.tabIndex = '0';
|
|
@@ -276,10 +279,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
276
279
|
}
|
|
277
280
|
|
|
278
281
|
event.preventDefault();
|
|
279
|
-
|
|
282
|
+
break;
|
|
280
283
|
|
|
281
284
|
case 'ArrowUp':
|
|
282
285
|
var prevItem = this.findPrevItem(item);
|
|
286
|
+
|
|
283
287
|
if (prevItem) {
|
|
284
288
|
item.removeAttribute('tabindex');
|
|
285
289
|
prevItem.tabIndex = '0';
|
|
@@ -287,36 +291,40 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
287
291
|
}
|
|
288
292
|
|
|
289
293
|
event.preventDefault();
|
|
290
|
-
|
|
294
|
+
break;
|
|
291
295
|
}
|
|
292
296
|
},
|
|
293
297
|
isRowMatchModeSelected(matchMode) {
|
|
294
|
-
return
|
|
298
|
+
return this.filters[this.field].matchMode === matchMode;
|
|
295
299
|
},
|
|
296
300
|
onOperatorChange(value) {
|
|
297
|
-
let _filters = {...this.filters};
|
|
301
|
+
let _filters = { ...this.filters };
|
|
302
|
+
|
|
298
303
|
_filters[this.field].operator = value;
|
|
299
304
|
this.$emit('filter-change', _filters);
|
|
300
305
|
|
|
301
|
-
this.$emit('operator-change', {field: this.field, operator: value});
|
|
306
|
+
this.$emit('operator-change', { field: this.field, operator: value });
|
|
307
|
+
|
|
302
308
|
if (!this.showApplyButton) {
|
|
303
309
|
this.$emit('filter-apply');
|
|
304
310
|
}
|
|
305
311
|
},
|
|
306
312
|
onMenuMatchModeChange(value, index) {
|
|
307
|
-
let _filters = {...this.filters};
|
|
313
|
+
let _filters = { ...this.filters };
|
|
314
|
+
|
|
308
315
|
_filters[this.field].constraints[index].matchMode = value;
|
|
309
|
-
this.$emit('matchmode-change', {field: this.field, matchMode: value, index: index});
|
|
316
|
+
this.$emit('matchmode-change', { field: this.field, matchMode: value, index: index });
|
|
310
317
|
|
|
311
318
|
if (!this.showApplyButton) {
|
|
312
319
|
this.$emit('filter-apply');
|
|
313
320
|
}
|
|
314
321
|
},
|
|
315
322
|
addConstraint() {
|
|
316
|
-
let _filters = {...this.filters};
|
|
317
|
-
let newConstraint = {value: null, matchMode: this.defaultMatchMode};
|
|
323
|
+
let _filters = { ...this.filters };
|
|
324
|
+
let newConstraint = { value: null, matchMode: this.defaultMatchMode };
|
|
325
|
+
|
|
318
326
|
_filters[this.field].constraints.push(newConstraint);
|
|
319
|
-
this.$emit('constraint-add', {field: this.field, constraing: newConstraint});
|
|
327
|
+
this.$emit('constraint-add', { field: this.field, constraing: newConstraint });
|
|
320
328
|
this.$emit('filter-change', _filters);
|
|
321
329
|
|
|
322
330
|
if (!this.showApplyButton) {
|
|
@@ -324,9 +332,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
324
332
|
}
|
|
325
333
|
},
|
|
326
334
|
removeConstraint(index) {
|
|
327
|
-
let _filters = {...this.filters};
|
|
335
|
+
let _filters = { ...this.filters };
|
|
328
336
|
let removedConstraint = _filters[this.field].constraints.splice(index, 1);
|
|
329
|
-
|
|
337
|
+
|
|
338
|
+
this.$emit('constraint-remove', { field: this.field, constraing: removedConstraint });
|
|
330
339
|
this.$emit('filter-change', _filters);
|
|
331
340
|
|
|
332
341
|
if (!this.showApplyButton) {
|
|
@@ -339,18 +348,14 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
339
348
|
findNextItem(item) {
|
|
340
349
|
let nextItem = item.nextElementSibling;
|
|
341
350
|
|
|
342
|
-
if (nextItem)
|
|
343
|
-
|
|
344
|
-
else
|
|
345
|
-
return item.parentElement.firstElementChild;
|
|
351
|
+
if (nextItem) return utils.DomHandler.hasClass(nextItem, 'p-column-filter-separator') ? this.findNextItem(nextItem) : nextItem;
|
|
352
|
+
else return item.parentElement.firstElementChild;
|
|
346
353
|
},
|
|
347
354
|
findPrevItem(item) {
|
|
348
355
|
let prevItem = item.previousElementSibling;
|
|
349
356
|
|
|
350
|
-
if (prevItem)
|
|
351
|
-
|
|
352
|
-
else
|
|
353
|
-
return item.parentElement.lastElementChild;
|
|
357
|
+
if (prevItem) utils.DomHandler.hasClass(prevItem, 'p-column-filter-separator') ? this.findPrevItem(prevItem) : prevItem;
|
|
358
|
+
else return item.parentElement.lastElementChild;
|
|
354
359
|
},
|
|
355
360
|
hide() {
|
|
356
361
|
this.overlayVisible = false;
|
|
@@ -370,6 +375,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
370
375
|
if (this.filterMenuStyle) {
|
|
371
376
|
utils.DomHandler.applyStyle(this.overlay, this.filterMenuStyle);
|
|
372
377
|
}
|
|
378
|
+
|
|
373
379
|
utils.ZIndexUtils.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
374
380
|
utils.DomHandler.absolutePosition(this.overlay, this.$refs.icon);
|
|
375
381
|
this.bindOutsideClickListener();
|
|
@@ -381,6 +387,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
381
387
|
this.selfClick = true;
|
|
382
388
|
}
|
|
383
389
|
};
|
|
390
|
+
|
|
384
391
|
OverlayEventBus__default["default"].on('overlay-click', this.overlayEventListener);
|
|
385
392
|
},
|
|
386
393
|
onOverlayLeave() {
|
|
@@ -412,8 +419,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
412
419
|
if (this.overlayVisible && !this.selfClick && this.isOutsideClicked(event.target)) {
|
|
413
420
|
this.overlayVisible = false;
|
|
414
421
|
}
|
|
422
|
+
|
|
415
423
|
this.selfClick = false;
|
|
416
424
|
};
|
|
425
|
+
|
|
417
426
|
document.addEventListener('click', this.outsideClickListener);
|
|
418
427
|
}
|
|
419
428
|
},
|
|
@@ -447,6 +456,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
447
456
|
this.hide();
|
|
448
457
|
}
|
|
449
458
|
};
|
|
459
|
+
|
|
450
460
|
window.addEventListener('resize', this.resizeListener);
|
|
451
461
|
}
|
|
452
462
|
},
|
|
@@ -459,35 +469,43 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
459
469
|
},
|
|
460
470
|
computed: {
|
|
461
471
|
containerClass() {
|
|
462
|
-
return [
|
|
463
|
-
'p-column-filter-
|
|
464
|
-
|
|
465
|
-
|
|
472
|
+
return [
|
|
473
|
+
'p-column-filter p-fluid',
|
|
474
|
+
{
|
|
475
|
+
'p-column-filter-row': this.display === 'row',
|
|
476
|
+
'p-column-filter-menu': this.display === 'menu'
|
|
477
|
+
}
|
|
478
|
+
];
|
|
466
479
|
},
|
|
467
480
|
overlayClass() {
|
|
468
|
-
return [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
481
|
+
return [
|
|
482
|
+
this.filterMenuClass,
|
|
483
|
+
{
|
|
484
|
+
'p-column-filter-overlay p-component p-fluid': true,
|
|
485
|
+
'p-column-filter-overlay-menu': this.display === 'menu',
|
|
486
|
+
'p-input-filled': this.$primevue.config.inputStyle === 'filled',
|
|
487
|
+
'p-ripple-disabled': this.$primevue.config.ripple === false
|
|
488
|
+
}
|
|
489
|
+
];
|
|
474
490
|
},
|
|
475
491
|
showMenuButton() {
|
|
476
|
-
return this.showMenu && (this.display === 'row' ? this.type !== 'boolean': true);
|
|
492
|
+
return this.showMenu && (this.display === 'row' ? this.type !== 'boolean' : true);
|
|
477
493
|
},
|
|
478
494
|
matchModes() {
|
|
479
|
-
return
|
|
480
|
-
this
|
|
481
|
-
|
|
482
|
-
|
|
495
|
+
return (
|
|
496
|
+
this.matchModeOptions ||
|
|
497
|
+
this.$primevue.config.filterMatchModeOptions[this.type].map((key) => {
|
|
498
|
+
return { label: this.$primevue.config.locale[key], value: key };
|
|
499
|
+
})
|
|
500
|
+
);
|
|
483
501
|
},
|
|
484
502
|
isShowMatchModes() {
|
|
485
503
|
return this.type !== 'boolean' && this.showMatchModes && this.matchModes;
|
|
486
504
|
},
|
|
487
505
|
operatorOptions() {
|
|
488
506
|
return [
|
|
489
|
-
{label: this.$primevue.config.locale.matchAll, value: api.FilterOperator.AND},
|
|
490
|
-
{label: this.$primevue.config.locale.matchAny, value: api.FilterOperator.OR}
|
|
507
|
+
{ label: this.$primevue.config.locale.matchAll, value: api.FilterOperator.AND },
|
|
508
|
+
{ label: this.$primevue.config.locale.matchAny, value: api.FilterOperator.OR }
|
|
491
509
|
];
|
|
492
510
|
},
|
|
493
511
|
noFilterLabel() {
|
|
@@ -512,7 +530,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
512
530
|
return this.$primevue.config.locale.addRule;
|
|
513
531
|
},
|
|
514
532
|
isShowAddConstraint() {
|
|
515
|
-
return this.showAddButton && this.filters[this.field].operator &&
|
|
533
|
+
return this.showAddButton && this.filters[this.field].operator && this.fieldConstraints && this.fieldConstraints.length < this.maxConstraints;
|
|
516
534
|
},
|
|
517
535
|
clearButtonLabel() {
|
|
518
536
|
return this.$primevue.config.locale.clear;
|
|
@@ -522,9 +540,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
522
540
|
}
|
|
523
541
|
},
|
|
524
542
|
components: {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
543
|
+
CFDropdown: Dropdown__default["default"],
|
|
544
|
+
CFButton: Button__default["default"],
|
|
545
|
+
Portal: Portal__default["default"]
|
|
528
546
|
}
|
|
529
547
|
};
|
|
530
548
|
|
|
@@ -580,7 +598,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
580
598
|
key: 1,
|
|
581
599
|
ref: "icon",
|
|
582
600
|
type: "button",
|
|
583
|
-
class: vue.normalizeClass(["p-column-filter-menu-button p-link", {'p-column-filter-menu-button-open': $data.overlayVisible, 'p-column-filter-menu-button-active': $options.hasFilter()}]),
|
|
601
|
+
class: vue.normalizeClass(["p-column-filter-menu-button p-link", { 'p-column-filter-menu-button-open': $data.overlayVisible, 'p-column-filter-menu-button-active': $options.hasFilter() }]),
|
|
584
602
|
"aria-haspopup": "true",
|
|
585
603
|
"aria-expanded": $data.overlayVisible,
|
|
586
604
|
onClick: _cache[0] || (_cache[0] = $event => ($options.toggleMenu())),
|
|
@@ -590,7 +608,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
590
608
|
($props.showClearButton && $props.display === 'row')
|
|
591
609
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
592
610
|
key: 2,
|
|
593
|
-
class: vue.normalizeClass([{'p-hidden-space': !$options.hasRowFilter()}, "p-column-filter-clear-button p-link"]),
|
|
611
|
+
class: vue.normalizeClass([{ 'p-hidden-space': !$options.hasRowFilter() }, "p-column-filter-clear-button p-link"]),
|
|
594
612
|
type: "button",
|
|
595
613
|
onClick: _cache[2] || (_cache[2] = $event => ($options.clearFilter()))
|
|
596
614
|
}, _hoisted_6$3, 2))
|
|
@@ -622,8 +640,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
622
640
|
? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_7$1, [
|
|
623
641
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.matchModes, (matchMode, i) => {
|
|
624
642
|
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
625
|
-
class: vue.normalizeClass(["p-column-filter-row-item", {'p-highlight': $options.isRowMatchModeSelected(matchMode.value)}]),
|
|
626
643
|
key: matchMode.label,
|
|
644
|
+
class: vue.normalizeClass(["p-column-filter-row-item", { 'p-highlight': $options.isRowMatchModeSelected(matchMode.value) }]),
|
|
627
645
|
onClick: $event => ($options.onRowMatchModeChange(matchMode.value)),
|
|
628
646
|
onKeydown: [
|
|
629
647
|
_cache[3] || (_cache[3] = $event => ($options.onRowMatchModeKeyDown($event))),
|
|
@@ -761,9 +779,24 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
761
779
|
|
|
762
780
|
var script$8 = {
|
|
763
781
|
name: 'HeaderCell',
|
|
764
|
-
emits: [
|
|
765
|
-
|
|
766
|
-
|
|
782
|
+
emits: [
|
|
783
|
+
'column-click',
|
|
784
|
+
'column-mousedown',
|
|
785
|
+
'column-dragstart',
|
|
786
|
+
'column-dragover',
|
|
787
|
+
'column-dragleave',
|
|
788
|
+
'column-drop',
|
|
789
|
+
'column-resizestart',
|
|
790
|
+
'checkbox-change',
|
|
791
|
+
'filter-change',
|
|
792
|
+
'filter-apply',
|
|
793
|
+
'operator-change',
|
|
794
|
+
'matchmode-change',
|
|
795
|
+
'constraint-add',
|
|
796
|
+
'constraint-remove',
|
|
797
|
+
'filter-clear',
|
|
798
|
+
'apply-click'
|
|
799
|
+
],
|
|
767
800
|
props: {
|
|
768
801
|
column: {
|
|
769
802
|
type: Object,
|
|
@@ -774,7 +807,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
774
807
|
default: false
|
|
775
808
|
},
|
|
776
809
|
groupRowsBy: {
|
|
777
|
-
type: [Array,String],
|
|
810
|
+
type: [Array, String],
|
|
778
811
|
default: null
|
|
779
812
|
},
|
|
780
813
|
sortMode: {
|
|
@@ -829,7 +862,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
829
862
|
data() {
|
|
830
863
|
return {
|
|
831
864
|
styleObject: {}
|
|
832
|
-
}
|
|
865
|
+
};
|
|
833
866
|
},
|
|
834
867
|
mounted() {
|
|
835
868
|
if (this.columnProp('frozen')) {
|
|
@@ -846,15 +879,15 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
846
879
|
return utils.ObjectUtils.getVNodeProp(this.column, prop);
|
|
847
880
|
},
|
|
848
881
|
onClick(event) {
|
|
849
|
-
this.$emit('column-click', {originalEvent: event, column: this.column});
|
|
882
|
+
this.$emit('column-click', { originalEvent: event, column: this.column });
|
|
850
883
|
},
|
|
851
884
|
onKeyDown(event) {
|
|
852
885
|
if (event.which === 13 && event.currentTarget.nodeName === 'TH' && utils.DomHandler.hasClass(event.currentTarget, 'p-sortable-column')) {
|
|
853
|
-
this.$emit('column-click', {originalEvent: event, column: this.column});
|
|
886
|
+
this.$emit('column-click', { originalEvent: event, column: this.column });
|
|
854
887
|
}
|
|
855
888
|
},
|
|
856
889
|
onMouseDown(event) {
|
|
857
|
-
this.$emit('column-mousedown', {originalEvent: event, column: this.column});
|
|
890
|
+
this.$emit('column-mousedown', { originalEvent: event, column: this.column });
|
|
858
891
|
},
|
|
859
892
|
onDragStart(event) {
|
|
860
893
|
this.$emit('column-dragstart', event);
|
|
@@ -872,42 +905,48 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
872
905
|
this.$emit('column-resizestart', event);
|
|
873
906
|
},
|
|
874
907
|
getMultiSortMetaIndex() {
|
|
875
|
-
return this.multiSortMeta.findIndex(meta =>
|
|
908
|
+
return this.multiSortMeta.findIndex((meta) => meta.field === this.columnProp('field') || meta.field === this.columnProp('sortField'));
|
|
876
909
|
},
|
|
877
910
|
getBadgeValue() {
|
|
878
911
|
let index = this.getMultiSortMetaIndex();
|
|
879
912
|
|
|
880
|
-
return
|
|
913
|
+
return this.groupRowsBy && this.groupRowsBy === this.groupRowSortField && index > -1 ? index : index + 1;
|
|
881
914
|
},
|
|
882
915
|
isMultiSorted() {
|
|
883
|
-
return this.sortMode === 'multiple' && this.columnProp('sortable') && this.getMultiSortMetaIndex() > -1
|
|
916
|
+
return this.sortMode === 'multiple' && this.columnProp('sortable') && this.getMultiSortMetaIndex() > -1;
|
|
884
917
|
},
|
|
885
918
|
isColumnSorted() {
|
|
886
|
-
return this.sortMode === 'single' ?
|
|
919
|
+
return this.sortMode === 'single' ? this.sortField && (this.sortField === this.columnProp('field') || this.sortField === this.columnProp('sortField')) : this.isMultiSorted();
|
|
887
920
|
},
|
|
888
921
|
updateStickyPosition() {
|
|
889
922
|
if (this.columnProp('frozen')) {
|
|
890
923
|
let align = this.columnProp('alignFrozen');
|
|
924
|
+
|
|
891
925
|
if (align === 'right') {
|
|
892
926
|
let right = 0;
|
|
893
927
|
let next = this.$el.nextElementSibling;
|
|
928
|
+
|
|
894
929
|
if (next) {
|
|
895
930
|
right = utils.DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
|
896
931
|
}
|
|
932
|
+
|
|
897
933
|
this.styleObject.right = right + 'px';
|
|
898
|
-
}
|
|
899
|
-
else {
|
|
934
|
+
} else {
|
|
900
935
|
let left = 0;
|
|
901
936
|
let prev = this.$el.previousElementSibling;
|
|
937
|
+
|
|
902
938
|
if (prev) {
|
|
903
939
|
left = utils.DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
904
940
|
}
|
|
941
|
+
|
|
905
942
|
this.styleObject.left = left + 'px';
|
|
906
943
|
}
|
|
907
944
|
|
|
908
945
|
let filterRow = this.$el.parentElement.nextElementSibling;
|
|
946
|
+
|
|
909
947
|
if (filterRow) {
|
|
910
948
|
let index = utils.DomHandler.index(this.$el);
|
|
949
|
+
|
|
911
950
|
filterRow.children[index].style.left = this.styleObject.left;
|
|
912
951
|
filterRow.children[index].style.right = this.styleObject.right;
|
|
913
952
|
}
|
|
@@ -919,20 +958,24 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
919
958
|
},
|
|
920
959
|
computed: {
|
|
921
960
|
containerClass() {
|
|
922
|
-
return [
|
|
961
|
+
return [
|
|
962
|
+
this.filterColumn ? this.columnProp('filterHeaderClass') : this.columnProp('headerClass'),
|
|
963
|
+
this.columnProp('class'),
|
|
964
|
+
{
|
|
923
965
|
'p-sortable-column': this.columnProp('sortable'),
|
|
924
966
|
'p-resizable-column': this.resizableColumns,
|
|
925
967
|
'p-highlight': this.isColumnSorted(),
|
|
926
968
|
'p-filter-column': this.filterColumn,
|
|
927
969
|
'p-frozen-column': this.columnProp('frozen'),
|
|
928
970
|
'p-reorderable-column': this.reorderableColumns
|
|
929
|
-
|
|
971
|
+
}
|
|
972
|
+
];
|
|
930
973
|
},
|
|
931
974
|
containerStyle() {
|
|
932
|
-
let headerStyle = this.filterColumn ? this.columnProp('filterHeaderStyle'): this.columnProp('headerStyle');
|
|
975
|
+
let headerStyle = this.filterColumn ? this.columnProp('filterHeaderStyle') : this.columnProp('headerStyle');
|
|
933
976
|
let columnStyle = this.columnProp('style');
|
|
934
977
|
|
|
935
|
-
return this.columnProp('frozen') ? [columnStyle, headerStyle, this.styleObject]: [columnStyle, headerStyle];
|
|
978
|
+
return this.columnProp('frozen') ? [columnStyle, headerStyle, this.styleObject] : [columnStyle, headerStyle];
|
|
936
979
|
},
|
|
937
980
|
sortableColumnIcon() {
|
|
938
981
|
let sorted = false;
|
|
@@ -940,10 +983,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
940
983
|
|
|
941
984
|
if (this.sortMode === 'single') {
|
|
942
985
|
sorted = this.sortField && (this.sortField === this.columnProp('field') || this.sortField === this.columnProp('sortField'));
|
|
943
|
-
sortOrder = sorted ? this.sortOrder: 0;
|
|
944
|
-
}
|
|
945
|
-
else if (this.sortMode === 'multiple') {
|
|
986
|
+
sortOrder = sorted ? this.sortOrder : 0;
|
|
987
|
+
} else if (this.sortMode === 'multiple') {
|
|
946
988
|
let metaIndex = this.getMultiSortMetaIndex();
|
|
989
|
+
|
|
947
990
|
if (metaIndex > -1) {
|
|
948
991
|
sorted = true;
|
|
949
992
|
sortOrder = this.multiSortMeta[metaIndex].order;
|
|
@@ -951,7 +994,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
951
994
|
}
|
|
952
995
|
|
|
953
996
|
return [
|
|
954
|
-
'p-sortable-column-icon pi pi-fw',
|
|
997
|
+
'p-sortable-column-icon pi pi-fw',
|
|
998
|
+
{
|
|
955
999
|
'pi-sort-alt': !sorted,
|
|
956
1000
|
'pi-sort-amount-up-alt': sorted && sortOrder > 0,
|
|
957
1001
|
'pi-sort-amount-down': sorted && sortOrder < 0
|
|
@@ -961,21 +1005,18 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
961
1005
|
ariaSort() {
|
|
962
1006
|
if (this.columnProp('sortable')) {
|
|
963
1007
|
const sortIcon = this.sortableColumnIcon;
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
else if (sortIcon[1]['pi-sort-amount-up-alt'])
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
return 'none';
|
|
970
|
-
}
|
|
971
|
-
else {
|
|
1008
|
+
|
|
1009
|
+
if (sortIcon[1]['pi-sort-amount-down']) return 'descending';
|
|
1010
|
+
else if (sortIcon[1]['pi-sort-amount-up-alt']) return 'ascending';
|
|
1011
|
+
else return 'none';
|
|
1012
|
+
} else {
|
|
972
1013
|
return null;
|
|
973
1014
|
}
|
|
974
1015
|
}
|
|
975
1016
|
},
|
|
976
1017
|
components: {
|
|
977
|
-
|
|
978
|
-
|
|
1018
|
+
DTHeaderCheckbox: script$a,
|
|
1019
|
+
DTColumnFilter: script$9
|
|
979
1020
|
}
|
|
980
1021
|
};
|
|
981
1022
|
|
|
@@ -1036,7 +1077,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1036
1077
|
($options.isMultiSorted())
|
|
1037
1078
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$3, vue.toDisplayString($options.getBadgeValue()), 1))
|
|
1038
1079
|
: vue.createCommentVNode("", true),
|
|
1039
|
-
($options.columnProp('selectionMode') ==='multiple' && $props.filterDisplay !== 'row')
|
|
1080
|
+
($options.columnProp('selectionMode') === 'multiple' && $props.filterDisplay !== 'row')
|
|
1040
1081
|
? (vue.openBlock(), vue.createBlock(_component_DTHeaderCheckbox, {
|
|
1041
1082
|
key: 4,
|
|
1042
1083
|
checked: $props.allRowsSelected,
|
|
@@ -1047,7 +1088,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1047
1088
|
($props.filterDisplay === 'menu' && $props.column.children && $props.column.children.filter)
|
|
1048
1089
|
? (vue.openBlock(), vue.createBlock(_component_DTColumnFilter, {
|
|
1049
1090
|
key: 5,
|
|
1050
|
-
field: $options.columnProp('filterField')
|
|
1091
|
+
field: $options.columnProp('filterField') || $options.columnProp('field'),
|
|
1051
1092
|
type: $options.columnProp('dataType'),
|
|
1052
1093
|
display: "menu",
|
|
1053
1094
|
showMenu: $options.columnProp('showFilterMenu'),
|
|
@@ -1069,11 +1110,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1069
1110
|
showAddButton: $options.columnProp('showAddButton'),
|
|
1070
1111
|
matchModeOptions: $options.columnProp('filterMatchModeOptions'),
|
|
1071
1112
|
maxConstraints: $options.columnProp('maxConstraints'),
|
|
1072
|
-
onOperatorChange: _cache[3] || (_cache[3] = $event => (_ctx.$emit('operator-change'
|
|
1113
|
+
onOperatorChange: _cache[3] || (_cache[3] = $event => (_ctx.$emit('operator-change', $event))),
|
|
1073
1114
|
onMatchmodeChange: _cache[4] || (_cache[4] = $event => (_ctx.$emit('matchmode-change', $event))),
|
|
1074
1115
|
onConstraintAdd: _cache[5] || (_cache[5] = $event => (_ctx.$emit('constraint-add', $event))),
|
|
1075
1116
|
onConstraintRemove: _cache[6] || (_cache[6] = $event => (_ctx.$emit('constraint-remove', $event))),
|
|
1076
|
-
onApplyClick: _cache[7] || (_cache[7] = $event => (_ctx.$emit('apply-click'
|
|
1117
|
+
onApplyClick: _cache[7] || (_cache[7] = $event => (_ctx.$emit('apply-click', $event)))
|
|
1077
1118
|
}, null, 8, ["field", "type", "showMenu", "filterElement", "filterHeaderTemplate", "filterFooterTemplate", "filterClearTemplate", "filterApplyTemplate", "filters", "filtersStore", "filterMenuStyle", "filterMenuClass", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "matchModeOptions", "maxConstraints"]))
|
|
1078
1119
|
: vue.createCommentVNode("", true)
|
|
1079
1120
|
])
|
|
@@ -1084,11 +1125,26 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1084
1125
|
|
|
1085
1126
|
var script$7 = {
|
|
1086
1127
|
name: 'TableHeader',
|
|
1087
|
-
emits: [
|
|
1088
|
-
|
|
1089
|
-
|
|
1128
|
+
emits: [
|
|
1129
|
+
'column-click',
|
|
1130
|
+
'column-mousedown',
|
|
1131
|
+
'column-dragstart',
|
|
1132
|
+
'column-dragover',
|
|
1133
|
+
'column-dragleave',
|
|
1134
|
+
'column-drop',
|
|
1135
|
+
'column-resizestart',
|
|
1136
|
+
'checkbox-change',
|
|
1137
|
+
'filter-change',
|
|
1138
|
+
'filter-apply',
|
|
1139
|
+
'operator-change',
|
|
1140
|
+
'matchmode-change',
|
|
1141
|
+
'constraint-add',
|
|
1142
|
+
'constraint-remove',
|
|
1143
|
+
'filter-clear',
|
|
1144
|
+
'apply-click'
|
|
1145
|
+
],
|
|
1090
1146
|
props: {
|
|
1091
|
-
|
|
1147
|
+
columnGroup: {
|
|
1092
1148
|
type: null,
|
|
1093
1149
|
default: null
|
|
1094
1150
|
},
|
|
@@ -1101,7 +1157,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1101
1157
|
default: null
|
|
1102
1158
|
},
|
|
1103
1159
|
groupRowsBy: {
|
|
1104
|
-
type: [Array,String],
|
|
1160
|
+
type: [Array, String],
|
|
1105
1161
|
default: null
|
|
1106
1162
|
},
|
|
1107
1163
|
resizableColumns: {
|
|
@@ -1158,9 +1214,14 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1158
1214
|
return utils.ObjectUtils.getVNodeProp(col, prop);
|
|
1159
1215
|
},
|
|
1160
1216
|
getFilterColumnHeaderClass(column) {
|
|
1161
|
-
return [
|
|
1162
|
-
'p-
|
|
1163
|
-
|
|
1217
|
+
return [
|
|
1218
|
+
'p-filter-column',
|
|
1219
|
+
this.columnProp(column, 'filterHeaderClass'),
|
|
1220
|
+
this.columnProp(column, 'class'),
|
|
1221
|
+
{
|
|
1222
|
+
'p-frozen-column': this.columnProp(column, 'frozen')
|
|
1223
|
+
}
|
|
1224
|
+
];
|
|
1164
1225
|
},
|
|
1165
1226
|
getFilterColumnHeaderStyle(column) {
|
|
1166
1227
|
return [this.columnProp(column, 'filterHeaderStyle'), this.columnProp(column, 'style')];
|
|
@@ -1169,12 +1230,12 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1169
1230
|
let rows = [];
|
|
1170
1231
|
|
|
1171
1232
|
let columnGroup = this.columnGroup;
|
|
1233
|
+
|
|
1172
1234
|
if (columnGroup.children && columnGroup.children.default) {
|
|
1173
1235
|
for (let child of columnGroup.children.default()) {
|
|
1174
1236
|
if (child.type.name === 'Row') {
|
|
1175
1237
|
rows.push(child);
|
|
1176
|
-
}
|
|
1177
|
-
else if (child.children && child.children instanceof Array) {
|
|
1238
|
+
} else if (child.children && child.children instanceof Array) {
|
|
1178
1239
|
rows = child.children;
|
|
1179
1240
|
}
|
|
1180
1241
|
}
|
|
@@ -1182,15 +1243,13 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1182
1243
|
return rows;
|
|
1183
1244
|
}
|
|
1184
1245
|
},
|
|
1185
|
-
getHeaderColumns(row){
|
|
1246
|
+
getHeaderColumns(row) {
|
|
1186
1247
|
let cols = [];
|
|
1187
1248
|
|
|
1188
1249
|
if (row.children && row.children.default) {
|
|
1189
|
-
row.children.default().forEach(child => {
|
|
1190
|
-
if (child.children && child.children instanceof Array)
|
|
1191
|
-
|
|
1192
|
-
else if (child.type.name === 'Column')
|
|
1193
|
-
cols.push(child);
|
|
1250
|
+
row.children.default().forEach((child) => {
|
|
1251
|
+
if (child.children && child.children instanceof Array) cols = [...cols, ...child.children];
|
|
1252
|
+
else if (child.type.name === 'Column') cols.push(child);
|
|
1194
1253
|
});
|
|
1195
1254
|
|
|
1196
1255
|
return cols;
|
|
@@ -1198,9 +1257,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1198
1257
|
}
|
|
1199
1258
|
},
|
|
1200
1259
|
components: {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1260
|
+
DTHeaderCell: script$8,
|
|
1261
|
+
DTHeaderCheckbox: script$a,
|
|
1262
|
+
DTColumnFilter: script$9
|
|
1204
1263
|
}
|
|
1205
1264
|
};
|
|
1206
1265
|
|
|
@@ -1225,9 +1284,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1225
1284
|
vue.createElementVNode("tr", _hoisted_2$5, [
|
|
1226
1285
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.columns, (col, i) => {
|
|
1227
1286
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1228
|
-
key: $options.columnProp(col, 'columnKey')
|
|
1287
|
+
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i
|
|
1229
1288
|
}, [
|
|
1230
|
-
(!$options.columnProp(col, 'hidden') && ($props.rowGroupMode !== 'subheader' ||
|
|
1289
|
+
(!$options.columnProp(col, 'hidden') && ($props.rowGroupMode !== 'subheader' || $props.groupRowsBy !== $options.columnProp(col, 'field')))
|
|
1231
1290
|
? (vue.openBlock(), vue.createBlock(_component_DTHeaderCell, {
|
|
1232
1291
|
key: 0,
|
|
1233
1292
|
column: col,
|
|
@@ -1254,11 +1313,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1254
1313
|
filtersStore: $props.filtersStore,
|
|
1255
1314
|
onFilterChange: _cache[8] || (_cache[8] = $event => (_ctx.$emit('filter-change', $event))),
|
|
1256
1315
|
onFilterApply: _cache[9] || (_cache[9] = $event => (_ctx.$emit('filter-apply'))),
|
|
1257
|
-
onOperatorChange: _cache[10] || (_cache[10] = $event => (_ctx.$emit('operator-change'
|
|
1316
|
+
onOperatorChange: _cache[10] || (_cache[10] = $event => (_ctx.$emit('operator-change', $event))),
|
|
1258
1317
|
onMatchmodeChange: _cache[11] || (_cache[11] = $event => (_ctx.$emit('matchmode-change', $event))),
|
|
1259
1318
|
onConstraintAdd: _cache[12] || (_cache[12] = $event => (_ctx.$emit('constraint-add', $event))),
|
|
1260
1319
|
onConstraintRemove: _cache[13] || (_cache[13] = $event => (_ctx.$emit('constraint-remove', $event))),
|
|
1261
|
-
onApplyClick: _cache[14] || (_cache[14] = $event => (_ctx.$emit('apply-click'
|
|
1320
|
+
onApplyClick: _cache[14] || (_cache[14] = $event => (_ctx.$emit('apply-click', $event)))
|
|
1262
1321
|
}, null, 8, ["column", "groupRowsBy", "groupRowSortField", "reorderableColumns", "resizableColumns", "sortMode", "sortField", "sortOrder", "multiSortMeta", "allRowsSelected", "empty", "filters", "filterDisplay", "filtersStore"]))
|
|
1263
1322
|
: vue.createCommentVNode("", true)
|
|
1264
1323
|
], 64))
|
|
@@ -1268,15 +1327,15 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1268
1327
|
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_3$4, [
|
|
1269
1328
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.columns, (col, i) => {
|
|
1270
1329
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1271
|
-
key: $options.columnProp(col, 'columnKey')
|
|
1330
|
+
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i
|
|
1272
1331
|
}, [
|
|
1273
|
-
(!$options.columnProp(col, 'hidden') && ($props.rowGroupMode !== 'subheader' ||
|
|
1332
|
+
(!$options.columnProp(col, 'hidden') && ($props.rowGroupMode !== 'subheader' || $props.groupRowsBy !== $options.columnProp(col, 'field')))
|
|
1274
1333
|
? (vue.openBlock(), vue.createElementBlock("th", {
|
|
1275
1334
|
key: 0,
|
|
1276
1335
|
style: vue.normalizeStyle($options.getFilterColumnHeaderStyle(col)),
|
|
1277
1336
|
class: vue.normalizeClass($options.getFilterColumnHeaderClass(col))
|
|
1278
1337
|
}, [
|
|
1279
|
-
($options.columnProp(col, 'selectionMode') ==='multiple')
|
|
1338
|
+
($options.columnProp(col, 'selectionMode') === 'multiple')
|
|
1280
1339
|
? (vue.openBlock(), vue.createBlock(_component_DTHeaderCheckbox, {
|
|
1281
1340
|
key: 0,
|
|
1282
1341
|
checked: $props.allRowsSelected,
|
|
@@ -1287,10 +1346,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1287
1346
|
(col.children && col.children.filter)
|
|
1288
1347
|
? (vue.openBlock(), vue.createBlock(_component_DTColumnFilter, {
|
|
1289
1348
|
key: 1,
|
|
1290
|
-
field: $options.columnProp(col,'filterField')
|
|
1291
|
-
type: $options.columnProp(col,'dataType'),
|
|
1349
|
+
field: $options.columnProp(col, 'filterField') || $options.columnProp(col, 'field'),
|
|
1350
|
+
type: $options.columnProp(col, 'dataType'),
|
|
1292
1351
|
display: "row",
|
|
1293
|
-
showMenu: $options.columnProp(col,'showFilterMenu'),
|
|
1352
|
+
showMenu: $options.columnProp(col, 'showFilterMenu'),
|
|
1294
1353
|
filterElement: col.children && col.children.filter,
|
|
1295
1354
|
filterHeaderTemplate: col.children && col.children.filterheader,
|
|
1296
1355
|
filterFooterTemplate: col.children && col.children.filterfooter,
|
|
@@ -1300,20 +1359,20 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1300
1359
|
filtersStore: $props.filtersStore,
|
|
1301
1360
|
onFilterChange: _cache[16] || (_cache[16] = $event => (_ctx.$emit('filter-change', $event))),
|
|
1302
1361
|
onFilterApply: _cache[17] || (_cache[17] = $event => (_ctx.$emit('filter-apply'))),
|
|
1303
|
-
filterMenuStyle: $options.columnProp(col,'filterMenuStyle'),
|
|
1304
|
-
filterMenuClass: $options.columnProp(col,'filterMenuClass'),
|
|
1305
|
-
showOperator: $options.columnProp(col,'showFilterOperator'),
|
|
1306
|
-
showClearButton: $options.columnProp(col,'showClearButton'),
|
|
1307
|
-
showApplyButton: $options.columnProp(col,'showApplyButton'),
|
|
1308
|
-
showMatchModes: $options.columnProp(col,'showFilterMatchModes'),
|
|
1309
|
-
showAddButton: $options.columnProp(col,'showAddButton'),
|
|
1310
|
-
matchModeOptions: $options.columnProp(col,'filterMatchModeOptions'),
|
|
1311
|
-
maxConstraints: $options.columnProp(col,'maxConstraints'),
|
|
1312
|
-
onOperatorChange: _cache[18] || (_cache[18] = $event => (_ctx.$emit('operator-change'
|
|
1362
|
+
filterMenuStyle: $options.columnProp(col, 'filterMenuStyle'),
|
|
1363
|
+
filterMenuClass: $options.columnProp(col, 'filterMenuClass'),
|
|
1364
|
+
showOperator: $options.columnProp(col, 'showFilterOperator'),
|
|
1365
|
+
showClearButton: $options.columnProp(col, 'showClearButton'),
|
|
1366
|
+
showApplyButton: $options.columnProp(col, 'showApplyButton'),
|
|
1367
|
+
showMatchModes: $options.columnProp(col, 'showFilterMatchModes'),
|
|
1368
|
+
showAddButton: $options.columnProp(col, 'showAddButton'),
|
|
1369
|
+
matchModeOptions: $options.columnProp(col, 'filterMatchModeOptions'),
|
|
1370
|
+
maxConstraints: $options.columnProp(col, 'maxConstraints'),
|
|
1371
|
+
onOperatorChange: _cache[18] || (_cache[18] = $event => (_ctx.$emit('operator-change', $event))),
|
|
1313
1372
|
onMatchmodeChange: _cache[19] || (_cache[19] = $event => (_ctx.$emit('matchmode-change', $event))),
|
|
1314
1373
|
onConstraintAdd: _cache[20] || (_cache[20] = $event => (_ctx.$emit('constraint-add', $event))),
|
|
1315
1374
|
onConstraintRemove: _cache[21] || (_cache[21] = $event => (_ctx.$emit('constraint-remove', $event))),
|
|
1316
|
-
onApplyClick: _cache[22] || (_cache[22] = $event => (_ctx.$emit('apply-click'
|
|
1375
|
+
onApplyClick: _cache[22] || (_cache[22] = $event => (_ctx.$emit('apply-click', $event)))
|
|
1317
1376
|
}, null, 8, ["field", "type", "showMenu", "filterElement", "filterHeaderTemplate", "filterFooterTemplate", "filterClearTemplate", "filterApplyTemplate", "filters", "filtersStore", "filterMenuStyle", "filterMenuClass", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "matchModeOptions", "maxConstraints"]))
|
|
1318
1377
|
: vue.createCommentVNode("", true)
|
|
1319
1378
|
], 6))
|
|
@@ -1330,9 +1389,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1330
1389
|
}, [
|
|
1331
1390
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.getHeaderColumns(row), (col, j) => {
|
|
1332
1391
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1333
|
-
key: $options.columnProp(col, 'columnKey')
|
|
1392
|
+
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || j
|
|
1334
1393
|
}, [
|
|
1335
|
-
(!$options.columnProp(col, 'hidden') && ($props.rowGroupMode !== 'subheader' ||
|
|
1394
|
+
(!$options.columnProp(col, 'hidden') && ($props.rowGroupMode !== 'subheader' || $props.groupRowsBy !== $options.columnProp(col, 'field')) && typeof col.children !== 'string')
|
|
1336
1395
|
? (vue.openBlock(), vue.createBlock(_component_DTHeaderCell, {
|
|
1337
1396
|
key: 0,
|
|
1338
1397
|
column: col,
|
|
@@ -1352,11 +1411,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1352
1411
|
filtersStore: $props.filtersStore,
|
|
1353
1412
|
onFilterChange: _cache[26] || (_cache[26] = $event => (_ctx.$emit('filter-change', $event))),
|
|
1354
1413
|
onFilterApply: _cache[27] || (_cache[27] = $event => (_ctx.$emit('filter-apply'))),
|
|
1355
|
-
onOperatorChange: _cache[28] || (_cache[28] = $event => (_ctx.$emit('operator-change'
|
|
1414
|
+
onOperatorChange: _cache[28] || (_cache[28] = $event => (_ctx.$emit('operator-change', $event))),
|
|
1356
1415
|
onMatchmodeChange: _cache[29] || (_cache[29] = $event => (_ctx.$emit('matchmode-change', $event))),
|
|
1357
1416
|
onConstraintAdd: _cache[30] || (_cache[30] = $event => (_ctx.$emit('constraint-add', $event))),
|
|
1358
1417
|
onConstraintRemove: _cache[31] || (_cache[31] = $event => (_ctx.$emit('constraint-remove', $event))),
|
|
1359
|
-
onApplyClick: _cache[32] || (_cache[32] = $event => (_ctx.$emit('apply-click'
|
|
1418
|
+
onApplyClick: _cache[32] || (_cache[32] = $event => (_ctx.$emit('apply-click', $event)))
|
|
1360
1419
|
}, null, 8, ["column", "groupRowsBy", "groupRowSortField", "sortMode", "sortField", "sortOrder", "multiSortMeta", "allRowsSelected", "empty", "filters", "filterDisplay", "filtersStore"]))
|
|
1361
1420
|
: vue.createCommentVNode("", true)
|
|
1362
1421
|
], 64))
|
|
@@ -1373,7 +1432,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1373
1432
|
inheritAttrs: false,
|
|
1374
1433
|
emits: ['change'],
|
|
1375
1434
|
props: {
|
|
1376
|
-
|
|
1435
|
+
value: null,
|
|
1377
1436
|
checked: null
|
|
1378
1437
|
},
|
|
1379
1438
|
data() {
|
|
@@ -1409,7 +1468,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1409
1468
|
|
|
1410
1469
|
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1411
1470
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
1412
|
-
class: vue.normalizeClass(['p-radiobutton p-component', {'p-radiobutton-focused': $data.focused}]),
|
|
1471
|
+
class: vue.normalizeClass(['p-radiobutton p-component', { 'p-radiobutton-focused': $data.focused }]),
|
|
1413
1472
|
onClick: _cache[0] || (_cache[0] = (...args) => ($options.onClick && $options.onClick(...args))),
|
|
1414
1473
|
tabindex: "0",
|
|
1415
1474
|
onFocus: _cache[1] || (_cache[1] = $event => ($options.onFocus($event))),
|
|
@@ -1418,7 +1477,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1418
1477
|
}, [
|
|
1419
1478
|
vue.createElementVNode("div", {
|
|
1420
1479
|
ref: "box",
|
|
1421
|
-
class: vue.normalizeClass(['p-radiobutton-box p-component', {'p-highlight': $props.checked, 'p-disabled': _ctx.$attrs.disabled, 'p-focus': $data.focused}]),
|
|
1480
|
+
class: vue.normalizeClass(['p-radiobutton-box p-component', { 'p-highlight': $props.checked, 'p-disabled': _ctx.$attrs.disabled, 'p-focus': $data.focused }]),
|
|
1422
1481
|
role: "radio",
|
|
1423
1482
|
"aria-checked": $props.checked
|
|
1424
1483
|
}, _hoisted_3$3, 10, _hoisted_1$6)
|
|
@@ -1432,7 +1491,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1432
1491
|
inheritAttrs: false,
|
|
1433
1492
|
emits: ['change'],
|
|
1434
1493
|
props: {
|
|
1435
|
-
|
|
1494
|
+
value: null,
|
|
1436
1495
|
checked: null
|
|
1437
1496
|
},
|
|
1438
1497
|
data() {
|
|
@@ -1463,12 +1522,12 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1463
1522
|
|
|
1464
1523
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1465
1524
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
1466
|
-
class: vue.normalizeClass(['p-checkbox p-component', {'p-checkbox-focused': $data.focused}]),
|
|
1525
|
+
class: vue.normalizeClass(['p-checkbox p-component', { 'p-checkbox-focused': $data.focused }]),
|
|
1467
1526
|
onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => ($options.onClick && $options.onClick(...args)), ["stop","prevent"]))
|
|
1468
1527
|
}, [
|
|
1469
1528
|
vue.createElementVNode("div", {
|
|
1470
1529
|
ref: "box",
|
|
1471
|
-
class: vue.normalizeClass(['p-checkbox-box p-component', {'p-highlight': $props.checked, 'p-disabled': _ctx.$attrs.disabled, 'p-focus': $data.focused}]),
|
|
1530
|
+
class: vue.normalizeClass(['p-checkbox-box p-component', { 'p-highlight': $props.checked, 'p-disabled': _ctx.$attrs.disabled, 'p-focus': $data.focused }]),
|
|
1472
1531
|
role: "checkbox",
|
|
1473
1532
|
"aria-checked": $props.checked,
|
|
1474
1533
|
tabindex: _ctx.$attrs.disabled ? null : '0',
|
|
@@ -1477,7 +1536,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1477
1536
|
onBlur: _cache[2] || (_cache[2] = $event => ($options.onBlur($event)))
|
|
1478
1537
|
}, [
|
|
1479
1538
|
vue.createElementVNode("span", {
|
|
1480
|
-
class: vue.normalizeClass(['p-checkbox-icon', {'pi pi-check': $props.checked}])
|
|
1539
|
+
class: vue.normalizeClass(['p-checkbox-icon', { 'pi pi-check': $props.checked }])
|
|
1481
1540
|
}, null, 2)
|
|
1482
1541
|
], 42, _hoisted_1$5)
|
|
1483
1542
|
], 2))
|
|
@@ -1487,8 +1546,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1487
1546
|
|
|
1488
1547
|
var script$4 = {
|
|
1489
1548
|
name: 'BodyCell',
|
|
1490
|
-
emits: ['cell-edit-init', 'cell-edit-complete', 'cell-edit-cancel', 'row-edit-init', 'row-edit-save', 'row-edit-cancel',
|
|
1491
|
-
'row-toggle', 'radio-change', 'checkbox-change', 'editing-meta-change'],
|
|
1549
|
+
emits: ['cell-edit-init', 'cell-edit-complete', 'cell-edit-cancel', 'row-edit-init', 'row-edit-save', 'row-edit-cancel', 'row-toggle', 'radio-change', 'checkbox-change', 'editing-meta-change'],
|
|
1492
1550
|
props: {
|
|
1493
1551
|
rowData: {
|
|
1494
1552
|
type: Object,
|
|
@@ -1546,14 +1604,14 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1546
1604
|
return {
|
|
1547
1605
|
d_editing: this.editing,
|
|
1548
1606
|
styleObject: {}
|
|
1549
|
-
}
|
|
1607
|
+
};
|
|
1550
1608
|
},
|
|
1551
1609
|
watch: {
|
|
1552
1610
|
editing(newValue) {
|
|
1553
1611
|
this.d_editing = newValue;
|
|
1554
1612
|
},
|
|
1555
|
-
'$data.d_editing': function(newValue) {
|
|
1556
|
-
this.$emit('editing-meta-change', {data: this.rowData, field:
|
|
1613
|
+
'$data.d_editing': function (newValue) {
|
|
1614
|
+
this.$emit('editing-meta-change', { data: this.rowData, field: this.field || `field_${this.index}`, index: this.rowIndex, editing: newValue });
|
|
1557
1615
|
}
|
|
1558
1616
|
},
|
|
1559
1617
|
mounted() {
|
|
@@ -1568,6 +1626,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1568
1626
|
|
|
1569
1627
|
if (this.d_editing && (this.editMode === 'cell' || (this.editMode === 'row' && this.columnProp('rowEditor')))) {
|
|
1570
1628
|
const focusableEl = utils.DomHandler.getFirstFocusableElement(this.$el);
|
|
1629
|
+
|
|
1571
1630
|
focusableEl && focusableEl.focus();
|
|
1572
1631
|
}
|
|
1573
1632
|
},
|
|
@@ -1591,7 +1650,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1591
1650
|
});
|
|
1592
1651
|
},
|
|
1593
1652
|
toggleRowWithRadio(event, index) {
|
|
1594
|
-
this.$emit('radio-change', { originalEvent: event.originalEvent, index: index, data: event.data});
|
|
1653
|
+
this.$emit('radio-change', { originalEvent: event.originalEvent, index: index, data: event.data });
|
|
1595
1654
|
},
|
|
1596
1655
|
toggleRowWithCheckbox(event, index) {
|
|
1597
1656
|
this.$emit('checkbox-change', { originalEvent: event.originalEvent, index: index, data: event.data });
|
|
@@ -1605,6 +1664,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1605
1664
|
if (!this.selfClick) {
|
|
1606
1665
|
this.completeEdit(event, 'outside');
|
|
1607
1666
|
}
|
|
1667
|
+
|
|
1608
1668
|
this.selfClick = false;
|
|
1609
1669
|
};
|
|
1610
1670
|
|
|
@@ -1631,13 +1691,14 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1631
1691
|
if (!this.d_editing) {
|
|
1632
1692
|
this.d_editing = true;
|
|
1633
1693
|
this.bindDocumentEditListener();
|
|
1634
|
-
this.$emit('cell-edit-init', {originalEvent: event, data: this.rowData, field: this.field, index: this.rowIndex});
|
|
1694
|
+
this.$emit('cell-edit-init', { originalEvent: event, data: this.rowData, field: this.field, index: this.rowIndex });
|
|
1635
1695
|
|
|
1636
1696
|
this.overlayEventListener = (e) => {
|
|
1637
1697
|
if (this.$el && this.$el.contains(e.target)) {
|
|
1638
1698
|
this.selfClick = true;
|
|
1639
1699
|
}
|
|
1640
1700
|
};
|
|
1701
|
+
|
|
1641
1702
|
OverlayEventBus__default["default"].on('overlay-click', this.overlayEventListener);
|
|
1642
1703
|
}
|
|
1643
1704
|
}
|
|
@@ -1653,7 +1714,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1653
1714
|
index: this.rowIndex,
|
|
1654
1715
|
type: type,
|
|
1655
1716
|
defaultPrevented: false,
|
|
1656
|
-
preventDefault: function() {
|
|
1717
|
+
preventDefault: function () {
|
|
1657
1718
|
this.defaultPrevented = true;
|
|
1658
1719
|
}
|
|
1659
1720
|
};
|
|
@@ -1669,21 +1730,19 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1669
1730
|
switch (event.which) {
|
|
1670
1731
|
case 13:
|
|
1671
1732
|
this.completeEdit(event, 'enter');
|
|
1672
|
-
|
|
1733
|
+
break;
|
|
1673
1734
|
|
|
1674
1735
|
case 27:
|
|
1675
1736
|
this.switchCellToViewMode();
|
|
1676
|
-
this.$emit('cell-edit-cancel', {originalEvent: event, data: this.rowData, field: this.field, index: this.rowIndex});
|
|
1677
|
-
|
|
1737
|
+
this.$emit('cell-edit-cancel', { originalEvent: event, data: this.rowData, field: this.field, index: this.rowIndex });
|
|
1738
|
+
break;
|
|
1678
1739
|
|
|
1679
1740
|
case 9:
|
|
1680
1741
|
this.completeEdit(event, 'tab');
|
|
1681
1742
|
|
|
1682
|
-
if (event.shiftKey)
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
this.moveToNextCell(event);
|
|
1686
|
-
break;
|
|
1743
|
+
if (event.shiftKey) this.moveToPreviousCell(event);
|
|
1744
|
+
else this.moveToNextCell(event);
|
|
1745
|
+
break;
|
|
1687
1746
|
}
|
|
1688
1747
|
}
|
|
1689
1748
|
},
|
|
@@ -1708,13 +1767,13 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1708
1767
|
findCell(element) {
|
|
1709
1768
|
if (element) {
|
|
1710
1769
|
let cell = element;
|
|
1770
|
+
|
|
1711
1771
|
while (cell && !utils.DomHandler.hasClass(cell, 'p-cell-editing')) {
|
|
1712
1772
|
cell = cell.parentElement;
|
|
1713
1773
|
}
|
|
1714
1774
|
|
|
1715
1775
|
return cell;
|
|
1716
|
-
}
|
|
1717
|
-
else {
|
|
1776
|
+
} else {
|
|
1718
1777
|
return null;
|
|
1719
1778
|
}
|
|
1720
1779
|
},
|
|
@@ -1723,18 +1782,16 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1723
1782
|
|
|
1724
1783
|
if (!prevCell) {
|
|
1725
1784
|
let previousRow = cell.parentElement.previousElementSibling;
|
|
1785
|
+
|
|
1726
1786
|
if (previousRow) {
|
|
1727
1787
|
prevCell = previousRow.lastElementChild;
|
|
1728
1788
|
}
|
|
1729
1789
|
}
|
|
1730
1790
|
|
|
1731
1791
|
if (prevCell) {
|
|
1732
|
-
if (utils.DomHandler.hasClass(prevCell, 'p-editable-column'))
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
return this.findPreviousEditableColumn(prevCell);
|
|
1736
|
-
}
|
|
1737
|
-
else {
|
|
1792
|
+
if (utils.DomHandler.hasClass(prevCell, 'p-editable-column')) return prevCell;
|
|
1793
|
+
else return this.findPreviousEditableColumn(prevCell);
|
|
1794
|
+
} else {
|
|
1738
1795
|
return null;
|
|
1739
1796
|
}
|
|
1740
1797
|
},
|
|
@@ -1743,68 +1800,70 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1743
1800
|
|
|
1744
1801
|
if (!nextCell) {
|
|
1745
1802
|
let nextRow = cell.parentElement.nextElementSibling;
|
|
1803
|
+
|
|
1746
1804
|
if (nextRow) {
|
|
1747
1805
|
nextCell = nextRow.firstElementChild;
|
|
1748
1806
|
}
|
|
1749
1807
|
}
|
|
1750
1808
|
|
|
1751
1809
|
if (nextCell) {
|
|
1752
|
-
if (utils.DomHandler.hasClass(nextCell, 'p-editable-column'))
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
return this.findNextEditableColumn(nextCell);
|
|
1756
|
-
}
|
|
1757
|
-
else {
|
|
1810
|
+
if (utils.DomHandler.hasClass(nextCell, 'p-editable-column')) return nextCell;
|
|
1811
|
+
else return this.findNextEditableColumn(nextCell);
|
|
1812
|
+
} else {
|
|
1758
1813
|
return null;
|
|
1759
1814
|
}
|
|
1760
1815
|
},
|
|
1761
1816
|
isEditingCellValid() {
|
|
1762
|
-
return
|
|
1817
|
+
return utils.DomHandler.find(this.$el, '.p-invalid').length === 0;
|
|
1763
1818
|
},
|
|
1764
1819
|
onRowEditInit(event) {
|
|
1765
|
-
this.$emit('row-edit-init', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
1820
|
+
this.$emit('row-edit-init', { originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex });
|
|
1766
1821
|
},
|
|
1767
1822
|
onRowEditSave(event) {
|
|
1768
|
-
this.$emit('row-edit-save', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
1823
|
+
this.$emit('row-edit-save', { originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex });
|
|
1769
1824
|
},
|
|
1770
1825
|
onRowEditCancel(event) {
|
|
1771
|
-
this.$emit('row-edit-cancel', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
1826
|
+
this.$emit('row-edit-cancel', { originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex });
|
|
1772
1827
|
},
|
|
1773
1828
|
editorInitCallback(event) {
|
|
1774
|
-
this.$emit('row-edit-init', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
1829
|
+
this.$emit('row-edit-init', { originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex });
|
|
1775
1830
|
},
|
|
1776
1831
|
editorSaveCallback(event) {
|
|
1777
1832
|
if (this.editMode === 'row') {
|
|
1778
|
-
this.$emit('row-edit-save', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
1833
|
+
this.$emit('row-edit-save', { originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex });
|
|
1779
1834
|
} else {
|
|
1780
1835
|
this.completeEdit(event, 'enter');
|
|
1781
1836
|
}
|
|
1782
1837
|
},
|
|
1783
1838
|
editorCancelCallback(event) {
|
|
1784
1839
|
if (this.editMode === 'row') {
|
|
1785
|
-
this.$emit('row-edit-cancel', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
1840
|
+
this.$emit('row-edit-cancel', { originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex });
|
|
1786
1841
|
} else {
|
|
1787
1842
|
this.switchCellToViewMode();
|
|
1788
|
-
this.$emit('cell-edit-cancel', {originalEvent: event, data: this.rowData, field: this.field, index: this.rowIndex});
|
|
1843
|
+
this.$emit('cell-edit-cancel', { originalEvent: event, data: this.rowData, field: this.field, index: this.rowIndex });
|
|
1789
1844
|
}
|
|
1790
1845
|
},
|
|
1791
1846
|
updateStickyPosition() {
|
|
1792
1847
|
if (this.columnProp('frozen')) {
|
|
1793
1848
|
let align = this.columnProp('alignFrozen');
|
|
1849
|
+
|
|
1794
1850
|
if (align === 'right') {
|
|
1795
1851
|
let right = 0;
|
|
1796
1852
|
let next = this.$el.nextElementSibling;
|
|
1853
|
+
|
|
1797
1854
|
if (next) {
|
|
1798
1855
|
right = utils.DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
|
1799
1856
|
}
|
|
1857
|
+
|
|
1800
1858
|
this.styleObject.right = right + 'px';
|
|
1801
|
-
}
|
|
1802
|
-
else {
|
|
1859
|
+
} else {
|
|
1803
1860
|
let left = 0;
|
|
1804
1861
|
let prev = this.$el.previousElementSibling;
|
|
1862
|
+
|
|
1805
1863
|
if (prev) {
|
|
1806
1864
|
left = utils.DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
|
1807
1865
|
}
|
|
1866
|
+
|
|
1808
1867
|
this.styleObject.left = left + 'px';
|
|
1809
1868
|
}
|
|
1810
1869
|
}
|
|
@@ -1821,41 +1880,49 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1821
1880
|
return this.columnProp('field');
|
|
1822
1881
|
},
|
|
1823
1882
|
containerClass() {
|
|
1824
|
-
return [
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1883
|
+
return [
|
|
1884
|
+
this.columnProp('bodyClass'),
|
|
1885
|
+
this.columnProp('class'),
|
|
1886
|
+
{
|
|
1887
|
+
'p-selection-column': this.columnProp('selectionMode') != null,
|
|
1888
|
+
'p-editable-column': this.isEditable(),
|
|
1889
|
+
'p-cell-editing': this.d_editing,
|
|
1890
|
+
'p-frozen-column': this.columnProp('frozen')
|
|
1891
|
+
}
|
|
1892
|
+
];
|
|
1830
1893
|
},
|
|
1831
1894
|
containerStyle() {
|
|
1832
1895
|
let bodyStyle = this.columnProp('bodyStyle');
|
|
1833
1896
|
let columnStyle = this.columnProp('style');
|
|
1834
1897
|
|
|
1835
|
-
return this.columnProp('frozen') ? [columnStyle, bodyStyle, this.styleObject]: [columnStyle, bodyStyle];
|
|
1898
|
+
return this.columnProp('frozen') ? [columnStyle, bodyStyle, this.styleObject] : [columnStyle, bodyStyle];
|
|
1836
1899
|
},
|
|
1837
1900
|
loading() {
|
|
1838
1901
|
return this.getVirtualScrollerProp('loading');
|
|
1839
1902
|
},
|
|
1840
1903
|
loadingOptions() {
|
|
1841
1904
|
const getLoaderOptions = this.getVirtualScrollerProp('getLoaderOptions');
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1905
|
+
|
|
1906
|
+
return (
|
|
1907
|
+
getLoaderOptions &&
|
|
1908
|
+
getLoaderOptions(this.rowIndex, {
|
|
1909
|
+
cellIndex: this.index,
|
|
1910
|
+
cellFirst: this.index === 0,
|
|
1911
|
+
cellLast: this.index === this.getVirtualScrollerProp('columns').length - 1,
|
|
1912
|
+
cellEven: this.index % 2 === 0,
|
|
1913
|
+
cellOdd: this.index % 2 !== 0,
|
|
1914
|
+
column: this.column,
|
|
1915
|
+
field: this.field
|
|
1916
|
+
})
|
|
1917
|
+
);
|
|
1851
1918
|
}
|
|
1852
1919
|
},
|
|
1853
1920
|
components: {
|
|
1854
|
-
|
|
1855
|
-
|
|
1921
|
+
DTRadioButton: script$6,
|
|
1922
|
+
DTCheckbox: script$5
|
|
1856
1923
|
},
|
|
1857
1924
|
directives: {
|
|
1858
|
-
|
|
1925
|
+
ripple: Ripple__default["default"]
|
|
1859
1926
|
}
|
|
1860
1927
|
};
|
|
1861
1928
|
|
|
@@ -1946,7 +2013,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1946
2013
|
checked: $props.selected,
|
|
1947
2014
|
onChange: _cache[0] || (_cache[0] = $event => ($options.toggleRowWithRadio($event, $props.rowIndex)))
|
|
1948
2015
|
}, null, 8, ["value", "checked"]))
|
|
1949
|
-
: ($options.columnProp('selectionMode') ==='multiple')
|
|
2016
|
+
: ($options.columnProp('selectionMode') === 'multiple')
|
|
1950
2017
|
? (vue.openBlock(), vue.createBlock(_component_DTCheckbox, {
|
|
1951
2018
|
key: 1,
|
|
1952
2019
|
value: $props.rowData,
|
|
@@ -1958,7 +2025,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
1958
2025
|
: ($options.columnProp('rowReorder'))
|
|
1959
2026
|
? (vue.openBlock(), vue.createElementBlock("i", {
|
|
1960
2027
|
key: 5,
|
|
1961
|
-
class: vue.normalizeClass(['p-datatable-reorderablerow-handle',
|
|
2028
|
+
class: vue.normalizeClass(['p-datatable-reorderablerow-handle', $options.columnProp('rowReorderIcon') || 'pi pi-bars'])
|
|
1962
2029
|
}, null, 2))
|
|
1963
2030
|
: ($options.columnProp('expander'))
|
|
1964
2031
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -2016,10 +2083,30 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2016
2083
|
|
|
2017
2084
|
var script$3 = {
|
|
2018
2085
|
name: 'TableBody',
|
|
2019
|
-
emits: [
|
|
2020
|
-
'
|
|
2021
|
-
'
|
|
2022
|
-
'row-
|
|
2086
|
+
emits: [
|
|
2087
|
+
'rowgroup-toggle',
|
|
2088
|
+
'row-click',
|
|
2089
|
+
'row-dblclick',
|
|
2090
|
+
'row-rightclick',
|
|
2091
|
+
'row-touchend',
|
|
2092
|
+
'row-keydown',
|
|
2093
|
+
'row-mousedown',
|
|
2094
|
+
'row-dragstart',
|
|
2095
|
+
'row-dragover',
|
|
2096
|
+
'row-dragleave',
|
|
2097
|
+
'row-dragend',
|
|
2098
|
+
'row-drop',
|
|
2099
|
+
'row-toggle',
|
|
2100
|
+
'radio-change',
|
|
2101
|
+
'checkbox-change',
|
|
2102
|
+
'cell-edit-init',
|
|
2103
|
+
'cell-edit-complete',
|
|
2104
|
+
'cell-edit-cancel',
|
|
2105
|
+
'row-edit-init',
|
|
2106
|
+
'row-edit-save',
|
|
2107
|
+
'row-edit-cancel',
|
|
2108
|
+
'editing-meta-change'
|
|
2109
|
+
],
|
|
2023
2110
|
props: {
|
|
2024
2111
|
value: {
|
|
2025
2112
|
type: Array,
|
|
@@ -2042,7 +2129,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2042
2129
|
default: null
|
|
2043
2130
|
},
|
|
2044
2131
|
groupRowsBy: {
|
|
2045
|
-
type: [Array,String],
|
|
2132
|
+
type: [Array, String],
|
|
2046
2133
|
default: null
|
|
2047
2134
|
},
|
|
2048
2135
|
expandableRowGroups: {
|
|
@@ -2074,7 +2161,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2074
2161
|
default: null
|
|
2075
2162
|
},
|
|
2076
2163
|
selection: {
|
|
2077
|
-
type: [Array,Object],
|
|
2164
|
+
type: [Array, Object],
|
|
2078
2165
|
default: null
|
|
2079
2166
|
},
|
|
2080
2167
|
selectionKeys: {
|
|
@@ -2142,6 +2229,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2142
2229
|
default: false
|
|
2143
2230
|
}
|
|
2144
2231
|
},
|
|
2232
|
+
data() {
|
|
2233
|
+
return {
|
|
2234
|
+
rowGroupHeaderStyleObject: {}
|
|
2235
|
+
};
|
|
2236
|
+
},
|
|
2145
2237
|
watch: {
|
|
2146
2238
|
virtualScrollerContentProps(newValue, oldValue) {
|
|
2147
2239
|
if (!this.isVirtualScrollerDisabled && this.getVirtualScrollerProp('vertical') && this.getVirtualScrollerProp('itemSize', oldValue) !== this.getVirtualScrollerProp('itemSize', newValue)) {
|
|
@@ -2171,11 +2263,6 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2171
2263
|
this.updateFrozenRowGroupHeaderStickyPosition();
|
|
2172
2264
|
}
|
|
2173
2265
|
},
|
|
2174
|
-
data() {
|
|
2175
|
-
return {
|
|
2176
|
-
rowGroupHeaderStyleObject: {}
|
|
2177
|
-
}
|
|
2178
|
-
},
|
|
2179
2266
|
methods: {
|
|
2180
2267
|
columnProp(col, prop) {
|
|
2181
2268
|
return utils.ObjectUtils.getVNodeProp(col, prop);
|
|
@@ -2183,25 +2270,28 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2183
2270
|
shouldRenderRowGroupHeader(value, rowData, i) {
|
|
2184
2271
|
let currentRowFieldData = utils.ObjectUtils.resolveFieldData(rowData, this.groupRowsBy);
|
|
2185
2272
|
let prevRowData = value[i - 1];
|
|
2273
|
+
|
|
2186
2274
|
if (prevRowData) {
|
|
2187
2275
|
let previousRowFieldData = utils.ObjectUtils.resolveFieldData(prevRowData, this.groupRowsBy);
|
|
2276
|
+
|
|
2188
2277
|
return currentRowFieldData !== previousRowFieldData;
|
|
2189
|
-
}
|
|
2190
|
-
else {
|
|
2278
|
+
} else {
|
|
2191
2279
|
return true;
|
|
2192
2280
|
}
|
|
2193
2281
|
},
|
|
2194
2282
|
getRowKey(rowData, index) {
|
|
2195
|
-
return this.dataKey ? utils.ObjectUtils.resolveFieldData(rowData, this.dataKey): index;
|
|
2283
|
+
return this.dataKey ? utils.ObjectUtils.resolveFieldData(rowData, this.dataKey) : index;
|
|
2196
2284
|
},
|
|
2197
2285
|
getRowIndex(index) {
|
|
2198
2286
|
const getItemOptions = this.getVirtualScrollerProp('getItemOptions');
|
|
2287
|
+
|
|
2199
2288
|
return getItemOptions ? getItemOptions(index).index : index;
|
|
2200
2289
|
},
|
|
2201
2290
|
getRowClass(rowData) {
|
|
2202
2291
|
let rowStyleClass = [];
|
|
2292
|
+
|
|
2203
2293
|
if (this.selectionMode) {
|
|
2204
|
-
|
|
2294
|
+
rowStyleClass.push('p-selectable-row');
|
|
2205
2295
|
}
|
|
2206
2296
|
|
|
2207
2297
|
if (this.selection) {
|
|
@@ -2229,15 +2319,15 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2229
2319
|
shouldRenderRowGroupFooter(value, rowData, i) {
|
|
2230
2320
|
if (this.expandableRowGroups && !this.isRowGroupExpanded(rowData)) {
|
|
2231
2321
|
return false;
|
|
2232
|
-
}
|
|
2233
|
-
else {
|
|
2322
|
+
} else {
|
|
2234
2323
|
let currentRowFieldData = utils.ObjectUtils.resolveFieldData(rowData, this.groupRowsBy);
|
|
2235
2324
|
let nextRowData = value[i + 1];
|
|
2325
|
+
|
|
2236
2326
|
if (nextRowData) {
|
|
2237
2327
|
let nextRowFieldData = utils.ObjectUtils.resolveFieldData(nextRowData, this.groupRowsBy);
|
|
2328
|
+
|
|
2238
2329
|
return currentRowFieldData !== nextRowFieldData;
|
|
2239
|
-
}
|
|
2240
|
-
else {
|
|
2330
|
+
} else {
|
|
2241
2331
|
return true;
|
|
2242
2332
|
}
|
|
2243
2333
|
}
|
|
@@ -2246,25 +2336,23 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2246
2336
|
if (this.rowGroupMode) {
|
|
2247
2337
|
if (this.rowGroupMode === 'subheader') {
|
|
2248
2338
|
return this.groupRowsBy !== this.columnProp(column, 'field');
|
|
2249
|
-
}
|
|
2250
|
-
else if (this.rowGroupMode === 'rowspan') {
|
|
2339
|
+
} else if (this.rowGroupMode === 'rowspan') {
|
|
2251
2340
|
if (this.isGrouped(column)) {
|
|
2252
2341
|
let prevRowData = value[i - 1];
|
|
2342
|
+
|
|
2253
2343
|
if (prevRowData) {
|
|
2254
2344
|
let currentRowFieldData = utils.ObjectUtils.resolveFieldData(value[i], this.columnProp(column, 'field'));
|
|
2255
2345
|
let previousRowFieldData = utils.ObjectUtils.resolveFieldData(prevRowData, this.columnProp(column, 'field'));
|
|
2346
|
+
|
|
2256
2347
|
return currentRowFieldData !== previousRowFieldData;
|
|
2257
|
-
}
|
|
2258
|
-
else {
|
|
2348
|
+
} else {
|
|
2259
2349
|
return true;
|
|
2260
2350
|
}
|
|
2261
|
-
}
|
|
2262
|
-
else {
|
|
2351
|
+
} else {
|
|
2263
2352
|
return true;
|
|
2264
2353
|
}
|
|
2265
2354
|
}
|
|
2266
|
-
}
|
|
2267
|
-
else {
|
|
2355
|
+
} else {
|
|
2268
2356
|
return !this.columnProp(column, 'hidden');
|
|
2269
2357
|
}
|
|
2270
2358
|
},
|
|
@@ -2277,55 +2365,49 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2277
2365
|
while (currentRowFieldData === nextRowFieldData) {
|
|
2278
2366
|
groupRowSpan++;
|
|
2279
2367
|
let nextRowData = value[++index];
|
|
2368
|
+
|
|
2280
2369
|
if (nextRowData) {
|
|
2281
2370
|
nextRowFieldData = utils.ObjectUtils.resolveFieldData(nextRowData, this.columnProp(column, 'field'));
|
|
2282
|
-
}
|
|
2283
|
-
else {
|
|
2371
|
+
} else {
|
|
2284
2372
|
break;
|
|
2285
2373
|
}
|
|
2286
2374
|
}
|
|
2287
2375
|
|
|
2288
2376
|
return groupRowSpan === 1 ? null : groupRowSpan;
|
|
2289
|
-
}
|
|
2290
|
-
else {
|
|
2377
|
+
} else {
|
|
2291
2378
|
return null;
|
|
2292
2379
|
}
|
|
2293
2380
|
},
|
|
2294
2381
|
rowTogglerIcon(rowData) {
|
|
2295
2382
|
const icon = this.isRowExpanded(rowData) ? this.expandedRowIcon : this.collapsedRowIcon;
|
|
2383
|
+
|
|
2296
2384
|
return ['p-row-toggler-icon pi', icon];
|
|
2297
2385
|
},
|
|
2298
2386
|
rowGroupTogglerIcon(rowData) {
|
|
2299
2387
|
const icon = this.isRowGroupExpanded(rowData) ? this.expandedRowIcon : this.collapsedRowIcon;
|
|
2388
|
+
|
|
2300
2389
|
return ['p-row-toggler-icon pi', icon];
|
|
2301
2390
|
},
|
|
2302
2391
|
isGrouped(column) {
|
|
2303
2392
|
if (this.groupRowsBy && this.columnProp(column, 'field')) {
|
|
2304
|
-
if (Array.isArray(this.groupRowsBy))
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
return this.groupRowsBy === column.props.field;
|
|
2308
|
-
}
|
|
2309
|
-
else {
|
|
2393
|
+
if (Array.isArray(this.groupRowsBy)) return this.groupRowsBy.indexOf(column.props.field) > -1;
|
|
2394
|
+
else return this.groupRowsBy === column.props.field;
|
|
2395
|
+
} else {
|
|
2310
2396
|
return false;
|
|
2311
2397
|
}
|
|
2312
2398
|
},
|
|
2313
2399
|
isRowEditing(rowData) {
|
|
2314
2400
|
if (rowData && this.editingRows) {
|
|
2315
|
-
if (this.dataKey)
|
|
2316
|
-
|
|
2317
|
-
else
|
|
2318
|
-
return this.findIndex(rowData, this.editingRows) > -1;
|
|
2401
|
+
if (this.dataKey) return this.editingRowKeys ? this.editingRowKeys[utils.ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false;
|
|
2402
|
+
else return this.findIndex(rowData, this.editingRows) > -1;
|
|
2319
2403
|
}
|
|
2320
2404
|
|
|
2321
2405
|
return false;
|
|
2322
2406
|
},
|
|
2323
2407
|
isRowExpanded(rowData) {
|
|
2324
2408
|
if (rowData && this.expandedRows) {
|
|
2325
|
-
if (this.dataKey)
|
|
2326
|
-
|
|
2327
|
-
else
|
|
2328
|
-
return this.findIndex(rowData, this.expandedRows) > -1;
|
|
2409
|
+
if (this.dataKey) return this.expandedRowKeys ? this.expandedRowKeys[utils.ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false;
|
|
2410
|
+
else return this.findIndex(rowData, this.expandedRows) > -1;
|
|
2329
2411
|
}
|
|
2330
2412
|
|
|
2331
2413
|
return false;
|
|
@@ -2333,20 +2415,19 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2333
2415
|
isRowGroupExpanded(rowData) {
|
|
2334
2416
|
if (this.expandableRowGroups && this.expandedRowGroups) {
|
|
2335
2417
|
let groupFieldValue = utils.ObjectUtils.resolveFieldData(rowData, this.groupRowsBy);
|
|
2418
|
+
|
|
2336
2419
|
return this.expandedRowGroups.indexOf(groupFieldValue) > -1;
|
|
2337
2420
|
}
|
|
2421
|
+
|
|
2338
2422
|
return false;
|
|
2339
2423
|
},
|
|
2340
2424
|
isSelected(rowData) {
|
|
2341
2425
|
if (rowData && this.selection) {
|
|
2342
2426
|
if (this.dataKey) {
|
|
2343
2427
|
return this.selectionKeys ? this.selectionKeys[utils.ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false;
|
|
2344
|
-
}
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
return this.findIndexInSelection(rowData) > -1;
|
|
2348
|
-
else
|
|
2349
|
-
return this.equals(rowData, this.selection);
|
|
2428
|
+
} else {
|
|
2429
|
+
if (this.selection instanceof Array) return this.findIndexInSelection(rowData) > -1;
|
|
2430
|
+
else return this.equals(rowData, this.selection);
|
|
2350
2431
|
}
|
|
2351
2432
|
}
|
|
2352
2433
|
|
|
@@ -2364,6 +2445,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2364
2445
|
},
|
|
2365
2446
|
findIndex(rowData, collection) {
|
|
2366
2447
|
let index = -1;
|
|
2448
|
+
|
|
2367
2449
|
if (collection && collection.length) {
|
|
2368
2450
|
for (let i = 0; i < collection.length; i++) {
|
|
2369
2451
|
if (this.equals(rowData, collection[i])) {
|
|
@@ -2376,34 +2458,34 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2376
2458
|
return index;
|
|
2377
2459
|
},
|
|
2378
2460
|
equals(data1, data2) {
|
|
2379
|
-
return this.compareSelectionBy === 'equals' ?
|
|
2461
|
+
return this.compareSelectionBy === 'equals' ? data1 === data2 : utils.ObjectUtils.equals(data1, data2, this.dataKey);
|
|
2380
2462
|
},
|
|
2381
2463
|
onRowGroupToggle(event, data) {
|
|
2382
|
-
this.$emit('rowgroup-toggle', {originalEvent: event, data: data});
|
|
2464
|
+
this.$emit('rowgroup-toggle', { originalEvent: event, data: data });
|
|
2383
2465
|
},
|
|
2384
2466
|
onRowClick(event, rowData, rowIndex) {
|
|
2385
|
-
this.$emit('row-click', {originalEvent: event, data: rowData, index: rowIndex});
|
|
2467
|
+
this.$emit('row-click', { originalEvent: event, data: rowData, index: rowIndex });
|
|
2386
2468
|
},
|
|
2387
2469
|
onRowDblClick(event, rowData, rowIndex) {
|
|
2388
|
-
this.$emit('row-dblclick', {originalEvent: event, data: rowData, index: rowIndex});
|
|
2470
|
+
this.$emit('row-dblclick', { originalEvent: event, data: rowData, index: rowIndex });
|
|
2389
2471
|
},
|
|
2390
2472
|
onRowRightClick(event, rowData, rowIndex) {
|
|
2391
|
-
this.$emit('row-rightclick', {originalEvent: event, data: rowData, index: rowIndex});
|
|
2473
|
+
this.$emit('row-rightclick', { originalEvent: event, data: rowData, index: rowIndex });
|
|
2392
2474
|
},
|
|
2393
2475
|
onRowTouchEnd(event) {
|
|
2394
2476
|
this.$emit('row-touchend', event);
|
|
2395
2477
|
},
|
|
2396
2478
|
onRowKeyDown(event, rowData, rowIndex) {
|
|
2397
|
-
this.$emit('row-keydown', {originalEvent: event, data: rowData, index: rowIndex});
|
|
2479
|
+
this.$emit('row-keydown', { originalEvent: event, data: rowData, index: rowIndex });
|
|
2398
2480
|
},
|
|
2399
2481
|
onRowMouseDown(event) {
|
|
2400
2482
|
this.$emit('row-mousedown', event);
|
|
2401
2483
|
},
|
|
2402
2484
|
onRowDragStart(event, rowIndex) {
|
|
2403
|
-
this.$emit('row-dragstart', {originalEvent: event, index: rowIndex});
|
|
2485
|
+
this.$emit('row-dragstart', { originalEvent: event, index: rowIndex });
|
|
2404
2486
|
},
|
|
2405
2487
|
onRowDragOver(event, rowIndex) {
|
|
2406
|
-
this.$emit('row-dragover', {originalEvent: event, index: rowIndex});
|
|
2488
|
+
this.$emit('row-dragover', { originalEvent: event, index: rowIndex });
|
|
2407
2489
|
},
|
|
2408
2490
|
onRowDragLeave(event) {
|
|
2409
2491
|
this.$emit('row-dragleave', event);
|
|
@@ -2449,19 +2531,23 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2449
2531
|
},
|
|
2450
2532
|
updateFrozenRowGroupHeaderStickyPosition() {
|
|
2451
2533
|
let tableHeaderHeight = utils.DomHandler.getOuterHeight(this.$el.previousElementSibling);
|
|
2534
|
+
|
|
2452
2535
|
this.rowGroupHeaderStyleObject.top = tableHeaderHeight + 'px';
|
|
2453
2536
|
},
|
|
2454
2537
|
updateVirtualScrollerPosition() {
|
|
2455
2538
|
const tableHeaderHeight = utils.DomHandler.getOuterHeight(this.$el.previousElementSibling);
|
|
2539
|
+
|
|
2456
2540
|
this.$el.style.top = (this.$el.style.top || 0) + tableHeaderHeight + 'px';
|
|
2457
2541
|
},
|
|
2458
2542
|
getVirtualScrollerProp(option, options) {
|
|
2459
2543
|
options = options || this.virtualScrollerContentProps;
|
|
2544
|
+
|
|
2460
2545
|
return options ? options[option] : null;
|
|
2461
2546
|
},
|
|
2462
2547
|
bodyRef(el) {
|
|
2463
2548
|
// For VirtualScroller
|
|
2464
2549
|
const contentRef = this.getVirtualScrollerProp('contentRef');
|
|
2550
|
+
|
|
2465
2551
|
contentRef && contentRef(el);
|
|
2466
2552
|
}
|
|
2467
2553
|
},
|
|
@@ -2469,15 +2555,15 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2469
2555
|
columnsLength() {
|
|
2470
2556
|
let hiddenColLength = 0;
|
|
2471
2557
|
|
|
2472
|
-
this.columns.forEach(column => {
|
|
2473
|
-
if(this.columnProp(column, 'hidden')) hiddenColLength++;
|
|
2558
|
+
this.columns.forEach((column) => {
|
|
2559
|
+
if (this.columnProp(column, 'hidden')) hiddenColLength++;
|
|
2474
2560
|
});
|
|
2475
2561
|
|
|
2476
2562
|
return this.columns ? this.columns.length - hiddenColLength : 0;
|
|
2477
2563
|
},
|
|
2478
2564
|
rowGroupHeaderStyle() {
|
|
2479
2565
|
if (this.scrollable) {
|
|
2480
|
-
return {top: this.rowGroupHeaderStyleObject.top};
|
|
2566
|
+
return { top: this.rowGroupHeaderStyleObject.top };
|
|
2481
2567
|
}
|
|
2482
2568
|
|
|
2483
2569
|
return null;
|
|
@@ -2487,7 +2573,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2487
2573
|
}
|
|
2488
2574
|
},
|
|
2489
2575
|
components: {
|
|
2490
|
-
|
|
2576
|
+
DTBodyCell: script$4
|
|
2491
2577
|
}
|
|
2492
2578
|
};
|
|
2493
2579
|
|
|
@@ -2545,11 +2631,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2545
2631
|
], 8, _hoisted_1$3)
|
|
2546
2632
|
], 4))
|
|
2547
2633
|
: vue.createCommentVNode("", true),
|
|
2548
|
-
($props.expandableRowGroups ? $options.isRowGroupExpanded(rowData): true)
|
|
2634
|
+
($props.expandableRowGroups ? $options.isRowGroupExpanded(rowData) : true)
|
|
2549
2635
|
? (vue.openBlock(), vue.createElementBlock("tr", {
|
|
2636
|
+
key: $options.getRowKey(rowData, $options.getRowIndex(index)),
|
|
2550
2637
|
class: vue.normalizeClass($options.getRowClass(rowData)),
|
|
2551
2638
|
style: vue.normalizeStyle($props.rowStyle),
|
|
2552
|
-
key: $options.getRowKey(rowData, $options.getRowIndex(index)),
|
|
2553
2639
|
onClick: $event => ($options.onRowClick($event, rowData, $options.getRowIndex(index))),
|
|
2554
2640
|
onDblclick: $event => ($options.onRowDblClick($event, rowData, $options.getRowIndex(index))),
|
|
2555
2641
|
onContextmenu: $event => ($options.onRowRightClick($event, rowData, $options.getRowIndex(index))),
|
|
@@ -2566,7 +2652,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2566
2652
|
}, [
|
|
2567
2653
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.columns, (col, i) => {
|
|
2568
2654
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2569
|
-
key: $options.columnProp(col,'columnKey')
|
|
2655
|
+
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i
|
|
2570
2656
|
}, [
|
|
2571
2657
|
($options.shouldRenderBodyCell($props.value, col, $options.getRowIndex(index)))
|
|
2572
2658
|
? (vue.openBlock(), vue.createBlock(_component_DTBodyCell, {
|
|
@@ -2576,7 +2662,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2576
2662
|
rowIndex: $options.getRowIndex(index),
|
|
2577
2663
|
index: i,
|
|
2578
2664
|
selected: $options.isSelected(rowData),
|
|
2579
|
-
rowTogglerIcon: $options.columnProp(col,'expander') ? $options.rowTogglerIcon(rowData): null,
|
|
2665
|
+
rowTogglerIcon: $options.columnProp(col, 'expander') ? $options.rowTogglerIcon(rowData) : null,
|
|
2580
2666
|
frozenRow: $props.frozenRow,
|
|
2581
2667
|
rowspan: $props.rowGroupMode === 'rowspan' ? $options.calculateRowGroupSize($props.value, col, $options.getRowIndex(index)) : null,
|
|
2582
2668
|
editMode: $props.editMode,
|
|
@@ -2602,8 +2688,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2602
2688
|
: vue.createCommentVNode("", true),
|
|
2603
2689
|
($props.templates['expansion'] && $props.expandedRows && $options.isRowExpanded(rowData))
|
|
2604
2690
|
? (vue.openBlock(), vue.createElementBlock("tr", {
|
|
2605
|
-
class: "p-datatable-row-expansion",
|
|
2606
2691
|
key: $options.getRowKey(rowData, $options.getRowIndex(index)) + '_expansion',
|
|
2692
|
+
class: "p-datatable-row-expansion",
|
|
2607
2693
|
role: "row"
|
|
2608
2694
|
}, [
|
|
2609
2695
|
vue.createElementVNode("td", { colspan: $options.columnsLength }, [
|
|
@@ -2616,8 +2702,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2616
2702
|
: vue.createCommentVNode("", true),
|
|
2617
2703
|
($props.templates['groupfooter'] && $props.rowGroupMode === 'subheader' && $options.shouldRenderRowGroupFooter($props.value, rowData, $options.getRowIndex(index)))
|
|
2618
2704
|
? (vue.openBlock(), vue.createElementBlock("tr", {
|
|
2619
|
-
class: "p-rowgroup-footer",
|
|
2620
2705
|
key: $options.getRowKey(rowData, $options.getRowIndex(index)) + '_subfooter',
|
|
2706
|
+
class: "p-rowgroup-footer",
|
|
2621
2707
|
role: "row"
|
|
2622
2708
|
}, [
|
|
2623
2709
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.templates['groupfooter']), {
|
|
@@ -2651,7 +2737,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2651
2737
|
data() {
|
|
2652
2738
|
return {
|
|
2653
2739
|
styleObject: {}
|
|
2654
|
-
}
|
|
2740
|
+
};
|
|
2655
2741
|
},
|
|
2656
2742
|
mounted() {
|
|
2657
2743
|
if (this.columnProp('frozen')) {
|
|
@@ -2670,20 +2756,24 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2670
2756
|
updateStickyPosition() {
|
|
2671
2757
|
if (this.columnProp('frozen')) {
|
|
2672
2758
|
let align = this.columnProp('alignFrozen');
|
|
2759
|
+
|
|
2673
2760
|
if (align === 'right') {
|
|
2674
2761
|
let right = 0;
|
|
2675
2762
|
let next = this.$el.nextElementSibling;
|
|
2763
|
+
|
|
2676
2764
|
if (next) {
|
|
2677
2765
|
right = utils.DomHandler.getOuterWidth(next) + parseFloat(next.style.left);
|
|
2678
2766
|
}
|
|
2767
|
+
|
|
2679
2768
|
this.styleObject.right = right + 'px';
|
|
2680
|
-
}
|
|
2681
|
-
else {
|
|
2769
|
+
} else {
|
|
2682
2770
|
let left = 0;
|
|
2683
2771
|
let prev = this.$el.previousElementSibling;
|
|
2772
|
+
|
|
2684
2773
|
if (prev) {
|
|
2685
2774
|
left = utils.DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left);
|
|
2686
2775
|
}
|
|
2776
|
+
|
|
2687
2777
|
this.styleObject.left = left + 'px';
|
|
2688
2778
|
}
|
|
2689
2779
|
}
|
|
@@ -2691,15 +2781,19 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2691
2781
|
},
|
|
2692
2782
|
computed: {
|
|
2693
2783
|
containerClass() {
|
|
2694
|
-
return [
|
|
2695
|
-
|
|
2696
|
-
|
|
2784
|
+
return [
|
|
2785
|
+
this.columnProp('footerClass'),
|
|
2786
|
+
this.columnProp('class'),
|
|
2787
|
+
{
|
|
2788
|
+
'p-frozen-column': this.columnProp('frozen')
|
|
2789
|
+
}
|
|
2790
|
+
];
|
|
2697
2791
|
},
|
|
2698
2792
|
containerStyle() {
|
|
2699
2793
|
let bodyStyle = this.columnProp('footerStyle');
|
|
2700
2794
|
let columnStyle = this.columnProp('style');
|
|
2701
2795
|
|
|
2702
|
-
return this.columnProp('frozen') ? [columnStyle, bodyStyle, this.styleObject]: [columnStyle, bodyStyle];
|
|
2796
|
+
return this.columnProp('frozen') ? [columnStyle, bodyStyle, this.styleObject] : [columnStyle, bodyStyle];
|
|
2703
2797
|
}
|
|
2704
2798
|
}
|
|
2705
2799
|
};
|
|
@@ -2736,7 +2830,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2736
2830
|
columns: {
|
|
2737
2831
|
type: null,
|
|
2738
2832
|
default: null
|
|
2739
|
-
}
|
|
2833
|
+
}
|
|
2740
2834
|
},
|
|
2741
2835
|
methods: {
|
|
2742
2836
|
columnProp(col, prop) {
|
|
@@ -2746,12 +2840,12 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2746
2840
|
let rows = [];
|
|
2747
2841
|
|
|
2748
2842
|
let columnGroup = this.columnGroup;
|
|
2843
|
+
|
|
2749
2844
|
if (columnGroup.children && columnGroup.children.default) {
|
|
2750
2845
|
for (let child of columnGroup.children.default()) {
|
|
2751
2846
|
if (child.type.name === 'Row') {
|
|
2752
2847
|
rows.push(child);
|
|
2753
|
-
}
|
|
2754
|
-
else if (child.children && child.children instanceof Array) {
|
|
2848
|
+
} else if (child.children && child.children instanceof Array) {
|
|
2755
2849
|
rows = child.children;
|
|
2756
2850
|
}
|
|
2757
2851
|
}
|
|
@@ -2759,15 +2853,13 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2759
2853
|
return rows;
|
|
2760
2854
|
}
|
|
2761
2855
|
},
|
|
2762
|
-
getFooterColumns(row){
|
|
2856
|
+
getFooterColumns(row) {
|
|
2763
2857
|
let cols = [];
|
|
2764
2858
|
|
|
2765
2859
|
if (row.children && row.children.default) {
|
|
2766
|
-
row.children.default().forEach(child => {
|
|
2767
|
-
if (child.children && child.children instanceof Array)
|
|
2768
|
-
|
|
2769
|
-
else if (child.type.name === 'Column')
|
|
2770
|
-
cols.push(child);
|
|
2860
|
+
row.children.default().forEach((child) => {
|
|
2861
|
+
if (child.children && child.children instanceof Array) cols = [...cols, ...child.children];
|
|
2862
|
+
else if (child.type.name === 'Column') cols.push(child);
|
|
2771
2863
|
});
|
|
2772
2864
|
|
|
2773
2865
|
return cols;
|
|
@@ -2780,8 +2872,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2780
2872
|
|
|
2781
2873
|
if (this.columnGroup) {
|
|
2782
2874
|
hasFooter = true;
|
|
2783
|
-
}
|
|
2784
|
-
else if (this.columns) {
|
|
2875
|
+
} else if (this.columns) {
|
|
2785
2876
|
for (let col of this.columns) {
|
|
2786
2877
|
if (this.columnProp(col, 'footer') || (col.children && col.children.footer)) {
|
|
2787
2878
|
hasFooter = true;
|
|
@@ -2794,7 +2885,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2794
2885
|
}
|
|
2795
2886
|
},
|
|
2796
2887
|
components: {
|
|
2797
|
-
|
|
2888
|
+
DTFooterCell: script$2
|
|
2798
2889
|
}
|
|
2799
2890
|
};
|
|
2800
2891
|
|
|
@@ -2817,9 +2908,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2817
2908
|
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_2$1, [
|
|
2818
2909
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.columns, (col, i) => {
|
|
2819
2910
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2820
|
-
key: $options.columnProp(col,'columnKey')
|
|
2911
|
+
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i
|
|
2821
2912
|
}, [
|
|
2822
|
-
(!$options.columnProp(col,'hidden'))
|
|
2913
|
+
(!$options.columnProp(col, 'hidden'))
|
|
2823
2914
|
? (vue.openBlock(), vue.createBlock(_component_DTFooterCell, {
|
|
2824
2915
|
key: 0,
|
|
2825
2916
|
column: col
|
|
@@ -2835,9 +2926,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2835
2926
|
}, [
|
|
2836
2927
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.getFooterColumns(row), (col, j) => {
|
|
2837
2928
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2838
|
-
key: $options.columnProp(col,'columnKey')
|
|
2929
|
+
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || j
|
|
2839
2930
|
}, [
|
|
2840
|
-
(!$options.columnProp(col,'hidden'))
|
|
2931
|
+
(!$options.columnProp(col, 'hidden'))
|
|
2841
2932
|
? (vue.openBlock(), vue.createBlock(_component_DTFooterCell, {
|
|
2842
2933
|
key: 0,
|
|
2843
2934
|
column: col
|
|
@@ -2855,11 +2946,46 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2855
2946
|
|
|
2856
2947
|
var script = {
|
|
2857
2948
|
name: 'DataTable',
|
|
2858
|
-
emits: [
|
|
2859
|
-
'
|
|
2860
|
-
'
|
|
2861
|
-
'update:
|
|
2862
|
-
'
|
|
2949
|
+
emits: [
|
|
2950
|
+
'value-change',
|
|
2951
|
+
'update:first',
|
|
2952
|
+
'update:rows',
|
|
2953
|
+
'page',
|
|
2954
|
+
'update:sortField',
|
|
2955
|
+
'update:sortOrder',
|
|
2956
|
+
'update:multiSortMeta',
|
|
2957
|
+
'sort',
|
|
2958
|
+
'filter',
|
|
2959
|
+
'row-click',
|
|
2960
|
+
'row-dblclick',
|
|
2961
|
+
'update:selection',
|
|
2962
|
+
'row-select',
|
|
2963
|
+
'row-unselect',
|
|
2964
|
+
'update:contextMenuSelection',
|
|
2965
|
+
'row-contextmenu',
|
|
2966
|
+
'row-unselect-all',
|
|
2967
|
+
'row-select-all',
|
|
2968
|
+
'select-all-change',
|
|
2969
|
+
'column-resize-end',
|
|
2970
|
+
'column-reorder',
|
|
2971
|
+
'row-reorder',
|
|
2972
|
+
'update:expandedRows',
|
|
2973
|
+
'row-collapse',
|
|
2974
|
+
'row-expand',
|
|
2975
|
+
'update:expandedRowGroups',
|
|
2976
|
+
'rowgroup-collapse',
|
|
2977
|
+
'rowgroup-expand',
|
|
2978
|
+
'update:filters',
|
|
2979
|
+
'state-restore',
|
|
2980
|
+
'state-save',
|
|
2981
|
+
'cell-edit-init',
|
|
2982
|
+
'cell-edit-complete',
|
|
2983
|
+
'cell-edit-cancel',
|
|
2984
|
+
'update:editingRows',
|
|
2985
|
+
'row-edit-init',
|
|
2986
|
+
'row-edit-save',
|
|
2987
|
+
'row-edit-cancel'
|
|
2988
|
+
],
|
|
2863
2989
|
props: {
|
|
2864
2990
|
value: {
|
|
2865
2991
|
type: Array,
|
|
@@ -2962,7 +3088,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
2962
3088
|
default: undefined
|
|
2963
3089
|
},
|
|
2964
3090
|
selection: {
|
|
2965
|
-
type: [Array,Object],
|
|
3091
|
+
type: [Array, Object],
|
|
2966
3092
|
default: null
|
|
2967
3093
|
},
|
|
2968
3094
|
selectionMode: {
|
|
@@ -3038,7 +3164,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3038
3164
|
default: null
|
|
3039
3165
|
},
|
|
3040
3166
|
groupRowsBy: {
|
|
3041
|
-
type: [Array,String],
|
|
3167
|
+
type: [Array, String],
|
|
3042
3168
|
default: null
|
|
3043
3169
|
},
|
|
3044
3170
|
expandableRowGroups: {
|
|
@@ -3079,7 +3205,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3079
3205
|
},
|
|
3080
3206
|
scrollDirection: {
|
|
3081
3207
|
type: String,
|
|
3082
|
-
default:
|
|
3208
|
+
default: 'vertical'
|
|
3083
3209
|
},
|
|
3084
3210
|
virtualScrollerOptions: {
|
|
3085
3211
|
type: Object,
|
|
@@ -3187,7 +3313,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3187
3313
|
},
|
|
3188
3314
|
filters: {
|
|
3189
3315
|
deep: true,
|
|
3190
|
-
handler: function(newValue) {
|
|
3316
|
+
handler: function (newValue) {
|
|
3191
3317
|
this.d_filters = this.cloneFilters(newValue);
|
|
3192
3318
|
}
|
|
3193
3319
|
}
|
|
@@ -3237,6 +3363,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3237
3363
|
this.d_rows = event.rows;
|
|
3238
3364
|
|
|
3239
3365
|
let pageEvent = this.createLazyLoadEvent(event);
|
|
3366
|
+
|
|
3240
3367
|
pageEvent.pageCount = event.pageCount;
|
|
3241
3368
|
pageEvent.page = event.page;
|
|
3242
3369
|
|
|
@@ -3253,21 +3380,24 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3253
3380
|
const targetNode = event.target;
|
|
3254
3381
|
const columnField = this.columnProp(column, 'sortField') || this.columnProp(column, 'field');
|
|
3255
3382
|
|
|
3256
|
-
if (
|
|
3257
|
-
|
|
3383
|
+
if (
|
|
3384
|
+
utils.DomHandler.hasClass(targetNode, 'p-sortable-column') ||
|
|
3385
|
+
utils.DomHandler.hasClass(targetNode, 'p-column-title') ||
|
|
3386
|
+
utils.DomHandler.hasClass(targetNode, 'p-column-header-content') ||
|
|
3387
|
+
utils.DomHandler.hasClass(targetNode, 'p-sortable-column-icon') ||
|
|
3388
|
+
utils.DomHandler.hasClass(targetNode.parentElement, 'p-sortable-column-icon')
|
|
3389
|
+
) {
|
|
3258
3390
|
utils.DomHandler.clearSelection();
|
|
3259
3391
|
|
|
3260
3392
|
if (this.sortMode === 'single') {
|
|
3261
3393
|
if (this.d_sortField === columnField) {
|
|
3262
|
-
if (this.removableSort &&
|
|
3394
|
+
if (this.removableSort && this.d_sortOrder * -1 === this.defaultSortOrder) {
|
|
3263
3395
|
this.d_sortOrder = null;
|
|
3264
3396
|
this.d_sortField = null;
|
|
3265
|
-
}
|
|
3266
|
-
else {
|
|
3397
|
+
} else {
|
|
3267
3398
|
this.d_sortOrder = this.d_sortOrder * -1;
|
|
3268
3399
|
}
|
|
3269
|
-
}
|
|
3270
|
-
else {
|
|
3400
|
+
} else {
|
|
3271
3401
|
this.d_sortOrder = this.defaultSortOrder;
|
|
3272
3402
|
this.d_sortField = columnField;
|
|
3273
3403
|
}
|
|
@@ -3275,11 +3405,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3275
3405
|
this.$emit('update:sortField', this.d_sortField);
|
|
3276
3406
|
this.$emit('update:sortOrder', this.d_sortOrder);
|
|
3277
3407
|
this.resetPage();
|
|
3278
|
-
}
|
|
3279
|
-
else if (this.sortMode === 'multiple') {
|
|
3408
|
+
} else if (this.sortMode === 'multiple') {
|
|
3280
3409
|
let metaKey = event.metaKey || event.ctrlKey;
|
|
3410
|
+
|
|
3281
3411
|
if (!metaKey) {
|
|
3282
|
-
this.d_multiSortMeta =
|
|
3412
|
+
this.d_multiSortMeta = this.d_multiSortMeta.filter((meta) => meta.field === columnField);
|
|
3283
3413
|
}
|
|
3284
3414
|
|
|
3285
3415
|
this.addMultiSortField(columnField);
|
|
@@ -3296,8 +3426,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3296
3426
|
|
|
3297
3427
|
if (this.groupRowsBy && this.groupRowsBy === this.sortField) {
|
|
3298
3428
|
this.d_multiSortMeta = [
|
|
3299
|
-
{field: this.sortField, order: this.sortOrder || this.defaultSortOrder},
|
|
3300
|
-
{field: this.d_sortField, order: this.d_sortOrder}
|
|
3429
|
+
{ field: this.sortField, order: this.sortOrder || this.defaultSortOrder },
|
|
3430
|
+
{ field: this.d_sortField, order: this.d_sortOrder }
|
|
3301
3431
|
];
|
|
3302
3432
|
|
|
3303
3433
|
return this.sortMultiple(value);
|
|
@@ -3311,18 +3441,13 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3311
3441
|
|
|
3312
3442
|
let result = null;
|
|
3313
3443
|
|
|
3314
|
-
if (value1 == null && value2 != null)
|
|
3315
|
-
|
|
3316
|
-
else if (value1
|
|
3317
|
-
|
|
3318
|
-
else
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
result = value1.localeCompare(value2, undefined, { numeric: true });
|
|
3322
|
-
else
|
|
3323
|
-
result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;
|
|
3324
|
-
|
|
3325
|
-
return (this.d_sortOrder * result);
|
|
3444
|
+
if (value1 == null && value2 != null) result = -1;
|
|
3445
|
+
else if (value1 != null && value2 == null) result = 1;
|
|
3446
|
+
else if (value1 == null && value2 == null) result = 0;
|
|
3447
|
+
else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2, undefined, { numeric: true });
|
|
3448
|
+
else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
3449
|
+
|
|
3450
|
+
return this.d_sortOrder * result;
|
|
3326
3451
|
});
|
|
3327
3452
|
|
|
3328
3453
|
return data;
|
|
@@ -3332,6 +3457,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3332
3457
|
|
|
3333
3458
|
if (this.groupRowsBy && (this.d_groupRowsSortMeta || (this.d_multiSortMeta.length && this.groupRowsBy === this.d_multiSortMeta[0].field))) {
|
|
3334
3459
|
const firstSortMeta = this.d_multiSortMeta[0];
|
|
3460
|
+
|
|
3335
3461
|
!this.d_groupRowsSortMeta && (this.d_groupRowsSortMeta = firstSortMeta);
|
|
3336
3462
|
|
|
3337
3463
|
if (firstSortMeta.field !== this.d_groupRowsSortMeta.field) {
|
|
@@ -3353,31 +3479,27 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3353
3479
|
let result = null;
|
|
3354
3480
|
|
|
3355
3481
|
if (typeof value1 === 'string' || value1 instanceof String) {
|
|
3356
|
-
if (value1.localeCompare &&
|
|
3357
|
-
return
|
|
3482
|
+
if (value1.localeCompare && value1 !== value2) {
|
|
3483
|
+
return this.d_multiSortMeta[index].order * value1.localeCompare(value2, undefined, { numeric: true });
|
|
3358
3484
|
}
|
|
3359
|
-
}
|
|
3360
|
-
|
|
3361
|
-
result = (value1 < value2) ? -1 : 1;
|
|
3485
|
+
} else {
|
|
3486
|
+
result = value1 < value2 ? -1 : 1;
|
|
3362
3487
|
}
|
|
3363
3488
|
|
|
3364
|
-
if (value1 === value2)
|
|
3365
|
-
return
|
|
3489
|
+
if (value1 === value2) {
|
|
3490
|
+
return this.d_multiSortMeta.length - 1 > index ? this.multisortField(data1, data2, index + 1) : 0;
|
|
3366
3491
|
}
|
|
3367
3492
|
|
|
3368
|
-
return
|
|
3493
|
+
return this.d_multiSortMeta[index].order * result;
|
|
3369
3494
|
},
|
|
3370
3495
|
addMultiSortField(field) {
|
|
3371
|
-
let index =
|
|
3496
|
+
let index = this.d_multiSortMeta.findIndex((meta) => meta.field === field);
|
|
3372
3497
|
|
|
3373
3498
|
if (index >= 0) {
|
|
3374
|
-
if (this.removableSort &&
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
}
|
|
3379
|
-
else {
|
|
3380
|
-
this.d_multiSortMeta.push({field: field, order: this.defaultSortOrder});
|
|
3499
|
+
if (this.removableSort && this.d_multiSortMeta[index].order * -1 === this.defaultSortOrder) this.d_multiSortMeta.splice(index, 1);
|
|
3500
|
+
else this.d_multiSortMeta[index] = { field: field, order: this.d_multiSortMeta[index].order * -1 };
|
|
3501
|
+
} else {
|
|
3502
|
+
this.d_multiSortMeta.push({ field: field, order: this.defaultSortOrder });
|
|
3381
3503
|
}
|
|
3382
3504
|
|
|
3383
3505
|
this.d_multiSortMeta = [...this.d_multiSortMeta];
|
|
@@ -3390,8 +3512,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3390
3512
|
this.clearEditingMetaData();
|
|
3391
3513
|
|
|
3392
3514
|
let globalFilterFieldsArray;
|
|
3515
|
+
|
|
3393
3516
|
if (this.filters['global']) {
|
|
3394
|
-
globalFilterFieldsArray = this.globalFilterFields|| this.columns.map(col => this.columnProp(col, 'filterField') || this.columnProp(col, 'field'));
|
|
3517
|
+
globalFilterFieldsArray = this.globalFilterFields || this.columns.map((col) => this.columnProp(col, 'filterField') || this.columnProp(col, 'field'));
|
|
3395
3518
|
}
|
|
3396
3519
|
|
|
3397
3520
|
let filteredValue = [];
|
|
@@ -3415,8 +3538,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3415
3538
|
break;
|
|
3416
3539
|
}
|
|
3417
3540
|
}
|
|
3418
|
-
}
|
|
3419
|
-
else {
|
|
3541
|
+
} else {
|
|
3420
3542
|
localMatch = this.executeLocalFilter(filterField, data[i], filterMeta);
|
|
3421
3543
|
}
|
|
3422
3544
|
|
|
@@ -3427,8 +3549,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3427
3549
|
}
|
|
3428
3550
|
|
|
3429
3551
|
if (this.filters['global'] && !globalMatch && globalFilterFieldsArray) {
|
|
3430
|
-
for(let j = 0; j < globalFilterFieldsArray.length; j++) {
|
|
3552
|
+
for (let j = 0; j < globalFilterFieldsArray.length; j++) {
|
|
3431
3553
|
let globalFilterField = globalFilterFieldsArray[j];
|
|
3554
|
+
|
|
3432
3555
|
globalMatch = api.FilterService.filters[this.filters['global'].matchMode || api.FilterMatchMode.CONTAINS](utils.ObjectUtils.resolveFieldData(data[i], globalFilterField), this.filters['global'].value, this.filterLocale);
|
|
3433
3556
|
|
|
3434
3557
|
if (globalMatch) {
|
|
@@ -3438,10 +3561,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3438
3561
|
}
|
|
3439
3562
|
|
|
3440
3563
|
let matches;
|
|
3564
|
+
|
|
3441
3565
|
if (this.filters['global']) {
|
|
3442
|
-
matches = localFiltered ?
|
|
3443
|
-
}
|
|
3444
|
-
else {
|
|
3566
|
+
matches = localFiltered ? localFiltered && localMatch && globalMatch : globalMatch;
|
|
3567
|
+
} else {
|
|
3445
3568
|
matches = localFiltered && localMatch;
|
|
3446
3569
|
}
|
|
3447
3570
|
|
|
@@ -3455,6 +3578,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3455
3578
|
}
|
|
3456
3579
|
|
|
3457
3580
|
let filterEvent = this.createLazyLoadEvent();
|
|
3581
|
+
|
|
3458
3582
|
filterEvent.filteredValue = filteredValue;
|
|
3459
3583
|
this.$emit('filter', filterEvent);
|
|
3460
3584
|
this.$emit('value-change', filteredValue);
|
|
@@ -3471,6 +3595,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3471
3595
|
},
|
|
3472
3596
|
onRowClick(e) {
|
|
3473
3597
|
const event = e.originalEvent;
|
|
3598
|
+
|
|
3474
3599
|
if (utils.DomHandler.isClickable(event.target)) {
|
|
3475
3600
|
return;
|
|
3476
3601
|
}
|
|
@@ -3485,10 +3610,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3485
3610
|
utils.DomHandler.clearSelection();
|
|
3486
3611
|
this.rangeRowIndex = rowIndex;
|
|
3487
3612
|
this.selectRange(event);
|
|
3488
|
-
}
|
|
3489
|
-
else {
|
|
3613
|
+
} else {
|
|
3490
3614
|
const selected = this.isSelected(rowData);
|
|
3491
3615
|
const metaSelection = this.rowTouched ? false : this.metaKeySelection;
|
|
3616
|
+
|
|
3492
3617
|
this.anchorRowIndex = rowIndex;
|
|
3493
3618
|
this.rangeRowIndex = rowIndex;
|
|
3494
3619
|
|
|
@@ -3496,52 +3621,49 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3496
3621
|
let metaKey = event.metaKey || event.ctrlKey;
|
|
3497
3622
|
|
|
3498
3623
|
if (selected && metaKey) {
|
|
3499
|
-
if(this.isSingleSelectionMode()) {
|
|
3624
|
+
if (this.isSingleSelectionMode()) {
|
|
3500
3625
|
this.$emit('update:selection', null);
|
|
3501
|
-
}
|
|
3502
|
-
else {
|
|
3626
|
+
} else {
|
|
3503
3627
|
const selectionIndex = this.findIndexInSelection(rowData);
|
|
3504
|
-
const _selection = this.selection.filter((val,i) => i != selectionIndex);
|
|
3628
|
+
const _selection = this.selection.filter((val, i) => i != selectionIndex);
|
|
3629
|
+
|
|
3505
3630
|
this.$emit('update:selection', _selection);
|
|
3506
3631
|
}
|
|
3507
3632
|
|
|
3508
|
-
this.$emit('row-unselect', {originalEvent: event, data: rowData, index: rowIndex, type: 'row'});
|
|
3509
|
-
}
|
|
3510
|
-
|
|
3511
|
-
if(this.isSingleSelectionMode()) {
|
|
3633
|
+
this.$emit('row-unselect', { originalEvent: event, data: rowData, index: rowIndex, type: 'row' });
|
|
3634
|
+
} else {
|
|
3635
|
+
if (this.isSingleSelectionMode()) {
|
|
3512
3636
|
this.$emit('update:selection', rowData);
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
|
|
3637
|
+
} else if (this.isMultipleSelectionMode()) {
|
|
3638
|
+
let _selection = metaKey ? this.selection || [] : [];
|
|
3639
|
+
|
|
3516
3640
|
_selection = [..._selection, rowData];
|
|
3517
3641
|
this.$emit('update:selection', _selection);
|
|
3518
3642
|
}
|
|
3519
3643
|
|
|
3520
|
-
this.$emit('row-select', {originalEvent: event, data: rowData, index: rowIndex, type: 'row'});
|
|
3644
|
+
this.$emit('row-select', { originalEvent: event, data: rowData, index: rowIndex, type: 'row' });
|
|
3521
3645
|
}
|
|
3522
|
-
}
|
|
3523
|
-
else {
|
|
3646
|
+
} else {
|
|
3524
3647
|
if (this.selectionMode === 'single') {
|
|
3525
3648
|
if (selected) {
|
|
3526
3649
|
this.$emit('update:selection', null);
|
|
3527
|
-
this.$emit('row-unselect', {originalEvent: event, data: rowData, index: rowIndex, type: 'row'});
|
|
3528
|
-
}
|
|
3529
|
-
else {
|
|
3650
|
+
this.$emit('row-unselect', { originalEvent: event, data: rowData, index: rowIndex, type: 'row' });
|
|
3651
|
+
} else {
|
|
3530
3652
|
this.$emit('update:selection', rowData);
|
|
3531
|
-
this.$emit('row-select', {originalEvent: event, data: rowData, index: rowIndex, type: 'row'});
|
|
3653
|
+
this.$emit('row-select', { originalEvent: event, data: rowData, index: rowIndex, type: 'row' });
|
|
3532
3654
|
}
|
|
3533
|
-
}
|
|
3534
|
-
else if (this.selectionMode === 'multiple') {
|
|
3655
|
+
} else if (this.selectionMode === 'multiple') {
|
|
3535
3656
|
if (selected) {
|
|
3536
3657
|
const selectionIndex = this.findIndexInSelection(rowData);
|
|
3537
3658
|
const _selection = this.selection.filter((val, i) => i != selectionIndex);
|
|
3659
|
+
|
|
3538
3660
|
this.$emit('update:selection', _selection);
|
|
3539
|
-
this.$emit('row-unselect', {originalEvent: event, data: rowData, index: rowIndex, type: 'row'});
|
|
3540
|
-
}
|
|
3541
|
-
else {
|
|
3661
|
+
this.$emit('row-unselect', { originalEvent: event, data: rowData, index: rowIndex, type: 'row' });
|
|
3662
|
+
} else {
|
|
3542
3663
|
const _selection = this.selection ? [...this.selection, rowData] : [rowData];
|
|
3664
|
+
|
|
3543
3665
|
this.$emit('update:selection', _selection);
|
|
3544
|
-
this.$emit('row-select', {originalEvent: event, data: rowData, index: rowIndex, type: 'row'});
|
|
3666
|
+
this.$emit('row-select', { originalEvent: event, data: rowData, index: rowIndex, type: 'row' });
|
|
3545
3667
|
}
|
|
3546
3668
|
}
|
|
3547
3669
|
}
|
|
@@ -3552,6 +3674,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3552
3674
|
},
|
|
3553
3675
|
onRowDblClick(e) {
|
|
3554
3676
|
const event = e.originalEvent;
|
|
3677
|
+
|
|
3555
3678
|
if (utils.DomHandler.isClickable(event.target)) {
|
|
3556
3679
|
return;
|
|
3557
3680
|
}
|
|
@@ -3580,51 +3703,49 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3580
3703
|
//down arrow
|
|
3581
3704
|
case 40:
|
|
3582
3705
|
var nextRow = this.findNextSelectableRow(row);
|
|
3706
|
+
|
|
3583
3707
|
if (nextRow) {
|
|
3584
3708
|
nextRow.focus();
|
|
3585
3709
|
}
|
|
3586
3710
|
|
|
3587
3711
|
event.preventDefault();
|
|
3588
|
-
|
|
3712
|
+
break;
|
|
3589
3713
|
|
|
3590
3714
|
//up arrow
|
|
3591
3715
|
case 38:
|
|
3592
3716
|
var prevRow = this.findPrevSelectableRow(row);
|
|
3717
|
+
|
|
3593
3718
|
if (prevRow) {
|
|
3594
3719
|
prevRow.focus();
|
|
3595
3720
|
}
|
|
3596
3721
|
|
|
3597
3722
|
event.preventDefault();
|
|
3598
|
-
|
|
3723
|
+
break;
|
|
3599
3724
|
|
|
3600
3725
|
//enter
|
|
3601
3726
|
case 13:
|
|
3602
|
-
this.onRowClick({originalEvent: event, data: rowData, index: rowIndex});
|
|
3603
|
-
|
|
3727
|
+
this.onRowClick({ originalEvent: event, data: rowData, index: rowIndex });
|
|
3728
|
+
break;
|
|
3604
3729
|
}
|
|
3605
3730
|
}
|
|
3606
3731
|
},
|
|
3607
3732
|
findNextSelectableRow(row) {
|
|
3608
3733
|
let nextRow = row.nextElementSibling;
|
|
3734
|
+
|
|
3609
3735
|
if (nextRow) {
|
|
3610
|
-
if (utils.DomHandler.hasClass(nextRow, 'p-selectable-row'))
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
return this.findNextSelectableRow(nextRow);
|
|
3614
|
-
}
|
|
3615
|
-
else {
|
|
3736
|
+
if (utils.DomHandler.hasClass(nextRow, 'p-selectable-row')) return nextRow;
|
|
3737
|
+
else return this.findNextSelectableRow(nextRow);
|
|
3738
|
+
} else {
|
|
3616
3739
|
return null;
|
|
3617
3740
|
}
|
|
3618
3741
|
},
|
|
3619
3742
|
findPrevSelectableRow(row) {
|
|
3620
3743
|
let prevRow = row.previousElementSibling;
|
|
3744
|
+
|
|
3621
3745
|
if (prevRow) {
|
|
3622
|
-
if (utils.DomHandler.hasClass(prevRow, 'p-selectable-row'))
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
return this.findPrevSelectableRow(prevRow);
|
|
3626
|
-
}
|
|
3627
|
-
else {
|
|
3746
|
+
if (utils.DomHandler.hasClass(prevRow, 'p-selectable-row')) return prevRow;
|
|
3747
|
+
else return this.findPrevSelectableRow(prevRow);
|
|
3748
|
+
} else {
|
|
3628
3749
|
return null;
|
|
3629
3750
|
}
|
|
3630
3751
|
},
|
|
@@ -3634,8 +3755,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3634
3755
|
if (this.isSelected(rowData)) {
|
|
3635
3756
|
this.$emit('update:selection', null);
|
|
3636
3757
|
this.$emit('row-unselect', { originalEvent: event.originalEvent, data: rowData, index: event.index, type: 'radiobutton' });
|
|
3637
|
-
}
|
|
3638
|
-
else {
|
|
3758
|
+
} else {
|
|
3639
3759
|
this.$emit('update:selection', rowData);
|
|
3640
3760
|
this.$emit('row-select', { originalEvent: event.originalEvent, data: rowData, index: event.index, type: 'radiobutton' });
|
|
3641
3761
|
}
|
|
@@ -3646,11 +3766,12 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3646
3766
|
if (this.isSelected(rowData)) {
|
|
3647
3767
|
const selectionIndex = this.findIndexInSelection(rowData);
|
|
3648
3768
|
const _selection = this.selection.filter((val, i) => i != selectionIndex);
|
|
3769
|
+
|
|
3649
3770
|
this.$emit('update:selection', _selection);
|
|
3650
3771
|
this.$emit('row-unselect', { originalEvent: event.originalEvent, data: rowData, index: event.index, type: 'checkbox' });
|
|
3651
|
-
}
|
|
3652
|
-
else {
|
|
3772
|
+
} else {
|
|
3653
3773
|
let _selection = this.selection ? [...this.selection] : [];
|
|
3774
|
+
|
|
3654
3775
|
_selection = [..._selection, rowData];
|
|
3655
3776
|
this.$emit('update:selection', _selection);
|
|
3656
3777
|
this.$emit('row-select', { originalEvent: event.originalEvent, data: rowData, index: event.index, type: 'checkbox' });
|
|
@@ -3659,21 +3780,18 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3659
3780
|
toggleRowsWithCheckbox(event) {
|
|
3660
3781
|
if (this.selectAll !== null) {
|
|
3661
3782
|
this.$emit('select-all-change', event);
|
|
3662
|
-
}
|
|
3663
|
-
else {
|
|
3783
|
+
} else {
|
|
3664
3784
|
const { originalEvent, checked } = event;
|
|
3665
3785
|
let _selection = [];
|
|
3666
3786
|
|
|
3667
3787
|
if (checked) {
|
|
3668
3788
|
_selection = this.frozenValue ? [...this.frozenValue, ...this.processedData] : this.processedData;
|
|
3669
|
-
this.$emit('row-select-all', {originalEvent, data: _selection});
|
|
3670
|
-
}
|
|
3671
|
-
|
|
3672
|
-
this.$emit('row-unselect-all', {originalEvent});
|
|
3789
|
+
this.$emit('row-select-all', { originalEvent, data: _selection });
|
|
3790
|
+
} else {
|
|
3791
|
+
this.$emit('row-unselect-all', { originalEvent });
|
|
3673
3792
|
}
|
|
3674
3793
|
|
|
3675
3794
|
this.$emit('update:selection', _selection);
|
|
3676
|
-
|
|
3677
3795
|
}
|
|
3678
3796
|
},
|
|
3679
3797
|
isSingleSelectionMode() {
|
|
@@ -3686,12 +3804,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3686
3804
|
if (rowData && this.selection) {
|
|
3687
3805
|
if (this.dataKey) {
|
|
3688
3806
|
return this.d_selectionKeys ? this.d_selectionKeys[utils.ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false;
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
return this.findIndexInSelection(rowData) > -1;
|
|
3693
|
-
else
|
|
3694
|
-
return this.equals(rowData, this.selection);
|
|
3807
|
+
} else {
|
|
3808
|
+
if (this.selection instanceof Array) return this.findIndexInSelection(rowData) > -1;
|
|
3809
|
+
else return this.equals(rowData, this.selection);
|
|
3695
3810
|
}
|
|
3696
3811
|
}
|
|
3697
3812
|
|
|
@@ -3702,6 +3817,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3702
3817
|
},
|
|
3703
3818
|
findIndex(rowData, collection) {
|
|
3704
3819
|
let index = -1;
|
|
3820
|
+
|
|
3705
3821
|
if (collection && collection.length) {
|
|
3706
3822
|
for (let i = 0; i < collection.length; i++) {
|
|
3707
3823
|
if (this.equals(rowData, collection[i])) {
|
|
@@ -3715,39 +3831,39 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3715
3831
|
},
|
|
3716
3832
|
updateSelectionKeys(selection) {
|
|
3717
3833
|
this.d_selectionKeys = {};
|
|
3834
|
+
|
|
3718
3835
|
if (Array.isArray(selection)) {
|
|
3719
3836
|
for (let data of selection) {
|
|
3720
3837
|
this.d_selectionKeys[String(utils.ObjectUtils.resolveFieldData(data, this.dataKey))] = 1;
|
|
3721
3838
|
}
|
|
3722
|
-
}
|
|
3723
|
-
else {
|
|
3839
|
+
} else {
|
|
3724
3840
|
this.d_selectionKeys[String(utils.ObjectUtils.resolveFieldData(selection, this.dataKey))] = 1;
|
|
3725
3841
|
}
|
|
3726
3842
|
},
|
|
3727
3843
|
updateExpandedRowKeys(expandedRows) {
|
|
3728
3844
|
if (expandedRows && expandedRows.length) {
|
|
3729
3845
|
this.d_expandedRowKeys = {};
|
|
3846
|
+
|
|
3730
3847
|
for (let data of expandedRows) {
|
|
3731
3848
|
this.d_expandedRowKeys[String(utils.ObjectUtils.resolveFieldData(data, this.dataKey))] = 1;
|
|
3732
3849
|
}
|
|
3733
|
-
}
|
|
3734
|
-
else {
|
|
3850
|
+
} else {
|
|
3735
3851
|
this.d_expandedRowKeys = null;
|
|
3736
3852
|
}
|
|
3737
3853
|
},
|
|
3738
3854
|
updateEditingRowKeys(editingRows) {
|
|
3739
3855
|
if (editingRows && editingRows.length) {
|
|
3740
3856
|
this.d_editingRowKeys = {};
|
|
3857
|
+
|
|
3741
3858
|
for (let data of editingRows) {
|
|
3742
3859
|
this.d_editingRowKeys[String(utils.ObjectUtils.resolveFieldData(data, this.dataKey))] = 1;
|
|
3743
3860
|
}
|
|
3744
|
-
}
|
|
3745
|
-
else {
|
|
3861
|
+
} else {
|
|
3746
3862
|
this.d_editingRowKeys = null;
|
|
3747
3863
|
}
|
|
3748
3864
|
},
|
|
3749
3865
|
equals(data1, data2) {
|
|
3750
|
-
return this.compareSelectionBy === 'equals' ?
|
|
3866
|
+
return this.compareSelectionBy === 'equals' ? data1 === data2 : utils.ObjectUtils.equals(data1, data2, this.dataKey);
|
|
3751
3867
|
},
|
|
3752
3868
|
selectRange(event) {
|
|
3753
3869
|
let rangeStart, rangeEnd;
|
|
@@ -3755,12 +3871,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3755
3871
|
if (this.rangeRowIndex > this.anchorRowIndex) {
|
|
3756
3872
|
rangeStart = this.anchorRowIndex;
|
|
3757
3873
|
rangeEnd = this.rangeRowIndex;
|
|
3758
|
-
}
|
|
3759
|
-
else if(this.rangeRowIndex < this.anchorRowIndex) {
|
|
3874
|
+
} else if (this.rangeRowIndex < this.anchorRowIndex) {
|
|
3760
3875
|
rangeStart = this.rangeRowIndex;
|
|
3761
3876
|
rangeEnd = this.anchorRowIndex;
|
|
3762
|
-
}
|
|
3763
|
-
else {
|
|
3877
|
+
} else {
|
|
3764
3878
|
rangeStart = this.rangeRowIndex;
|
|
3765
3879
|
rangeEnd = this.rangeRowIndex;
|
|
3766
3880
|
}
|
|
@@ -3772,10 +3886,12 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3772
3886
|
|
|
3773
3887
|
const value = this.processedData;
|
|
3774
3888
|
let _selection = [];
|
|
3775
|
-
|
|
3889
|
+
|
|
3890
|
+
for (let i = rangeStart; i <= rangeEnd; i++) {
|
|
3776
3891
|
let rangeRowData = value[i];
|
|
3892
|
+
|
|
3777
3893
|
_selection.push(rangeRowData);
|
|
3778
|
-
this.$emit('row-select', {originalEvent: event, data: rangeRowData, type: 'row'});
|
|
3894
|
+
this.$emit('row-select', { originalEvent: event, data: rangeRowData, type: 'row' });
|
|
3779
3895
|
}
|
|
3780
3896
|
|
|
3781
3897
|
this.$emit('update:selection', _selection);
|
|
@@ -3786,22 +3902,19 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3786
3902
|
if (!data) {
|
|
3787
3903
|
data = this.processedData;
|
|
3788
3904
|
|
|
3789
|
-
if (options && options.selectionOnly)
|
|
3790
|
-
|
|
3791
|
-
else if (this.frozenValue)
|
|
3792
|
-
data = data ? [...this.frozenValue, ...data] : this.frozenValue;
|
|
3905
|
+
if (options && options.selectionOnly) data = this.selection || [];
|
|
3906
|
+
else if (this.frozenValue) data = data ? [...this.frozenValue, ...data] : this.frozenValue;
|
|
3793
3907
|
}
|
|
3794
3908
|
|
|
3795
3909
|
//headers
|
|
3796
3910
|
let headerInitiated = false;
|
|
3911
|
+
|
|
3797
3912
|
for (let i = 0; i < this.columns.length; i++) {
|
|
3798
3913
|
let column = this.columns[i];
|
|
3799
3914
|
|
|
3800
3915
|
if (this.columnProp(column, 'exportable') !== false && this.columnProp(column, 'field')) {
|
|
3801
|
-
if (headerInitiated)
|
|
3802
|
-
|
|
3803
|
-
else
|
|
3804
|
-
headerInitiated = true;
|
|
3916
|
+
if (headerInitiated) csv += this.csvSeparator;
|
|
3917
|
+
else headerInitiated = true;
|
|
3805
3918
|
|
|
3806
3919
|
csv += '"' + (this.columnProp(column, 'exportHeader') || this.columnProp(column, 'header') || this.columnProp(column, 'field')) + '"';
|
|
3807
3920
|
}
|
|
@@ -3809,16 +3922,16 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3809
3922
|
|
|
3810
3923
|
//body
|
|
3811
3924
|
if (data) {
|
|
3812
|
-
data.forEach(record => {
|
|
3925
|
+
data.forEach((record) => {
|
|
3813
3926
|
csv += '\n';
|
|
3814
3927
|
let rowInitiated = false;
|
|
3928
|
+
|
|
3815
3929
|
for (let i = 0; i < this.columns.length; i++) {
|
|
3816
3930
|
let column = this.columns[i];
|
|
3931
|
+
|
|
3817
3932
|
if (this.columnProp(column, 'exportable') !== false && this.columnProp(column, 'field')) {
|
|
3818
|
-
if (rowInitiated)
|
|
3819
|
-
|
|
3820
|
-
else
|
|
3821
|
-
rowInitiated = true;
|
|
3933
|
+
if (rowInitiated) csv += this.csvSeparator;
|
|
3934
|
+
else rowInitiated = true;
|
|
3822
3935
|
|
|
3823
3936
|
let cellData = utils.ObjectUtils.resolveFieldData(record, this.columnProp(column, 'field'));
|
|
3824
3937
|
|
|
@@ -3828,12 +3941,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3828
3941
|
data: cellData,
|
|
3829
3942
|
field: this.columnProp(column, 'field')
|
|
3830
3943
|
});
|
|
3831
|
-
}
|
|
3832
|
-
|
|
3833
|
-
cellData = String(cellData).replace(/"/g, '""');
|
|
3834
|
-
}
|
|
3835
|
-
else
|
|
3836
|
-
cellData = '';
|
|
3944
|
+
} else cellData = String(cellData).replace(/"/g, '""');
|
|
3945
|
+
} else cellData = '';
|
|
3837
3946
|
|
|
3838
3947
|
csv += '"' + cellData + '"';
|
|
3839
3948
|
}
|
|
@@ -3841,19 +3950,17 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3841
3950
|
});
|
|
3842
3951
|
}
|
|
3843
3952
|
|
|
3844
|
-
|
|
3845
3953
|
//footers
|
|
3846
3954
|
let footerInitiated = false;
|
|
3955
|
+
|
|
3847
3956
|
for (let i = 0; i < this.columns.length; i++) {
|
|
3848
3957
|
let column = this.columns[i];
|
|
3849
3958
|
|
|
3850
3959
|
if (i === 0) csv += '\n';
|
|
3851
3960
|
|
|
3852
3961
|
if (this.columnProp(column, 'exportable') !== false && this.columnProp(column, 'field')) {
|
|
3853
|
-
if (footerInitiated)
|
|
3854
|
-
|
|
3855
|
-
else
|
|
3856
|
-
footerInitiated = true;
|
|
3962
|
+
if (footerInitiated) csv += this.csvSeparator;
|
|
3963
|
+
else footerInitiated = true;
|
|
3857
3964
|
|
|
3858
3965
|
csv += '"' + (this.columnProp(column, 'exportFooter') || this.columnProp(column, 'footer') || this.columnProp(column, 'field')) + '"';
|
|
3859
3966
|
}
|
|
@@ -3867,18 +3974,20 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3867
3974
|
},
|
|
3868
3975
|
onColumnResizeStart(event) {
|
|
3869
3976
|
let containerLeft = utils.DomHandler.getOffset(this.$el).left;
|
|
3977
|
+
|
|
3870
3978
|
this.resizeColumnElement = event.target.parentElement;
|
|
3871
3979
|
this.columnResizing = true;
|
|
3872
|
-
this.lastResizeHelperX =
|
|
3980
|
+
this.lastResizeHelperX = event.pageX - containerLeft + this.$el.scrollLeft;
|
|
3873
3981
|
|
|
3874
3982
|
this.bindColumnResizeEvents();
|
|
3875
3983
|
},
|
|
3876
3984
|
onColumnResize(event) {
|
|
3877
3985
|
let containerLeft = utils.DomHandler.getOffset(this.$el).left;
|
|
3986
|
+
|
|
3878
3987
|
utils.DomHandler.addClass(this.$el, 'p-unselectable-text');
|
|
3879
3988
|
this.$refs.resizeHelper.style.height = this.$el.offsetHeight + 'px';
|
|
3880
3989
|
this.$refs.resizeHelper.style.top = 0 + 'px';
|
|
3881
|
-
this.$refs.resizeHelper.style.left =
|
|
3990
|
+
this.$refs.resizeHelper.style.left = event.pageX - containerLeft + this.$el.scrollLeft + 'px';
|
|
3882
3991
|
|
|
3883
3992
|
this.$refs.resizeHelper.style.display = 'block';
|
|
3884
3993
|
},
|
|
@@ -3886,7 +3995,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3886
3995
|
let delta = this.$refs.resizeHelper.offsetLeft - this.lastResizeHelperX;
|
|
3887
3996
|
let columnWidth = this.resizeColumnElement.offsetWidth;
|
|
3888
3997
|
let newColumnWidth = columnWidth + delta;
|
|
3889
|
-
let minWidth = this.resizeColumnElement.style.minWidth||15;
|
|
3998
|
+
let minWidth = this.resizeColumnElement.style.minWidth || 15;
|
|
3890
3999
|
|
|
3891
4000
|
if (columnWidth + delta > parseInt(minWidth, 10)) {
|
|
3892
4001
|
if (this.columnResizeMode === 'fit') {
|
|
@@ -3896,9 +4005,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3896
4005
|
if (newColumnWidth > 15 && nextColumnWidth > 15) {
|
|
3897
4006
|
this.resizeTableCells(newColumnWidth, nextColumnWidth);
|
|
3898
4007
|
}
|
|
3899
|
-
}
|
|
3900
|
-
else if (this.columnResizeMode === 'expand') {
|
|
4008
|
+
} else if (this.columnResizeMode === 'expand') {
|
|
3901
4009
|
const tableWidth = this.$refs.table.offsetWidth + delta + 'px';
|
|
4010
|
+
|
|
3902
4011
|
const updateTableWidth = (el) => {
|
|
3903
4012
|
!!el && (el.style.width = el.style.minWidth = tableWidth);
|
|
3904
4013
|
};
|
|
@@ -3936,15 +4045,18 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3936
4045
|
let colIndex = utils.DomHandler.index(this.resizeColumnElement);
|
|
3937
4046
|
let widths = [];
|
|
3938
4047
|
let headers = utils.DomHandler.find(this.$refs.table, '.p-datatable-thead > tr > th');
|
|
3939
|
-
|
|
4048
|
+
|
|
4049
|
+
headers.forEach((header) => widths.push(utils.DomHandler.getOuterWidth(header)));
|
|
3940
4050
|
|
|
3941
4051
|
this.destroyStyleElement();
|
|
3942
4052
|
this.createStyleElement();
|
|
3943
4053
|
|
|
3944
4054
|
let innerHTML = '';
|
|
4055
|
+
|
|
3945
4056
|
widths.forEach((width, index) => {
|
|
3946
|
-
let colWidth = index === colIndex ? newColumnWidth :
|
|
4057
|
+
let colWidth = index === colIndex ? newColumnWidth : nextColumnWidth && index === colIndex + 1 ? nextColumnWidth : width;
|
|
3947
4058
|
let style = this.scrollable ? `flex: 1 1 ${colWidth}px !important` : `width: ${colWidth}px !important`;
|
|
4059
|
+
|
|
3948
4060
|
innerHTML += `
|
|
3949
4061
|
.p-datatable[${this.attributeSelector}] .p-datatable-thead > tr > th:nth-child(${index + 1}),
|
|
3950
4062
|
.p-datatable[${this.attributeSelector}] .p-datatable-tbody > tr > td:nth-child(${index + 1}),
|
|
@@ -3959,7 +4071,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3959
4071
|
bindColumnResizeEvents() {
|
|
3960
4072
|
if (!this.documentColumnResizeListener) {
|
|
3961
4073
|
this.documentColumnResizeListener = document.addEventListener('mousemove', () => {
|
|
3962
|
-
if(this.columnResizing) {
|
|
4074
|
+
if (this.columnResizing) {
|
|
3963
4075
|
this.onColumnResize(event);
|
|
3964
4076
|
}
|
|
3965
4077
|
});
|
|
@@ -3967,13 +4079,12 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3967
4079
|
|
|
3968
4080
|
if (!this.documentColumnResizeEndListener) {
|
|
3969
4081
|
this.documentColumnResizeEndListener = document.addEventListener('mouseup', () => {
|
|
3970
|
-
if(this.columnResizing) {
|
|
4082
|
+
if (this.columnResizing) {
|
|
3971
4083
|
this.columnResizing = false;
|
|
3972
4084
|
this.onColumnResizeEnd();
|
|
3973
4085
|
}
|
|
3974
4086
|
});
|
|
3975
4087
|
}
|
|
3976
|
-
|
|
3977
4088
|
},
|
|
3978
4089
|
unbindColumnResizeEvents() {
|
|
3979
4090
|
if (this.documentColumnResizeListener) {
|
|
@@ -3991,15 +4102,14 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
3991
4102
|
const column = e.column;
|
|
3992
4103
|
|
|
3993
4104
|
if (this.reorderableColumns && this.columnProp(column, 'reorderableColumn') !== false) {
|
|
3994
|
-
if (event.target.nodeName === 'INPUT' || event.target.nodeName === 'TEXTAREA' || utils.DomHandler.hasClass(event.target, 'p-column-resizer'))
|
|
3995
|
-
|
|
3996
|
-
else
|
|
3997
|
-
event.currentTarget.draggable = true;
|
|
4105
|
+
if (event.target.nodeName === 'INPUT' || event.target.nodeName === 'TEXTAREA' || utils.DomHandler.hasClass(event.target, 'p-column-resizer')) event.currentTarget.draggable = false;
|
|
4106
|
+
else event.currentTarget.draggable = true;
|
|
3998
4107
|
}
|
|
3999
4108
|
},
|
|
4000
4109
|
onColumnHeaderDragStart(event) {
|
|
4001
4110
|
if (this.columnResizing) {
|
|
4002
4111
|
event.preventDefault();
|
|
4112
|
+
|
|
4003
4113
|
return;
|
|
4004
4114
|
}
|
|
4005
4115
|
|
|
@@ -4011,26 +4121,26 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4011
4121
|
},
|
|
4012
4122
|
onColumnHeaderDragOver(event) {
|
|
4013
4123
|
let dropHeader = this.findParentHeader(event.target);
|
|
4014
|
-
|
|
4124
|
+
|
|
4125
|
+
if (this.reorderableColumns && this.draggedColumn && dropHeader) {
|
|
4015
4126
|
event.preventDefault();
|
|
4016
4127
|
let containerOffset = utils.DomHandler.getOffset(this.$el);
|
|
4017
4128
|
let dropHeaderOffset = utils.DomHandler.getOffset(dropHeader);
|
|
4018
4129
|
|
|
4019
4130
|
if (this.draggedColumn !== dropHeader) {
|
|
4020
|
-
let targetLeft =
|
|
4131
|
+
let targetLeft = dropHeaderOffset.left - containerOffset.left;
|
|
4021
4132
|
let columnCenter = dropHeaderOffset.left + dropHeader.offsetWidth / 2;
|
|
4022
4133
|
|
|
4023
4134
|
this.$refs.reorderIndicatorUp.style.top = dropHeaderOffset.top - containerOffset.top - (this.colReorderIconHeight - 1) + 'px';
|
|
4024
4135
|
this.$refs.reorderIndicatorDown.style.top = dropHeaderOffset.top - containerOffset.top + dropHeader.offsetHeight + 'px';
|
|
4025
4136
|
|
|
4026
|
-
if(event.pageX > columnCenter) {
|
|
4027
|
-
this.$refs.reorderIndicatorUp.style.left =
|
|
4028
|
-
this.$refs.reorderIndicatorDown.style.left =
|
|
4137
|
+
if (event.pageX > columnCenter) {
|
|
4138
|
+
this.$refs.reorderIndicatorUp.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(this.colReorderIconWidth / 2) + 'px';
|
|
4139
|
+
this.$refs.reorderIndicatorDown.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(this.colReorderIconWidth / 2) + 'px';
|
|
4029
4140
|
this.dropPosition = 1;
|
|
4030
|
-
}
|
|
4031
|
-
|
|
4032
|
-
this.$refs.
|
|
4033
|
-
this.$refs.reorderIndicatorDown.style.left = (targetLeft - Math.ceil(this.colReorderIconWidth / 2))+ 'px';
|
|
4141
|
+
} else {
|
|
4142
|
+
this.$refs.reorderIndicatorUp.style.left = targetLeft - Math.ceil(this.colReorderIconWidth / 2) + 'px';
|
|
4143
|
+
this.$refs.reorderIndicatorDown.style.left = targetLeft - Math.ceil(this.colReorderIconWidth / 2) + 'px';
|
|
4034
4144
|
this.dropPosition = -1;
|
|
4035
4145
|
}
|
|
4036
4146
|
|
|
@@ -4040,7 +4150,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4040
4150
|
}
|
|
4041
4151
|
},
|
|
4042
4152
|
onColumnHeaderDragLeave(event) {
|
|
4043
|
-
if(this.reorderableColumns && this.draggedColumn) {
|
|
4153
|
+
if (this.reorderableColumns && this.draggedColumn) {
|
|
4044
4154
|
event.preventDefault();
|
|
4045
4155
|
this.$refs.reorderIndicatorUp.style.display = 'none';
|
|
4046
4156
|
this.$refs.reorderIndicatorDown.style.display = 'none';
|
|
@@ -4048,10 +4158,12 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4048
4158
|
},
|
|
4049
4159
|
onColumnHeaderDrop(event) {
|
|
4050
4160
|
event.preventDefault();
|
|
4161
|
+
|
|
4051
4162
|
if (this.draggedColumn) {
|
|
4052
4163
|
let dragIndex = utils.DomHandler.index(this.draggedColumn);
|
|
4053
4164
|
let dropIndex = utils.DomHandler.index(this.findParentHeader(event.target));
|
|
4054
|
-
let allowDrop =
|
|
4165
|
+
let allowDrop = dragIndex !== dropIndex;
|
|
4166
|
+
|
|
4055
4167
|
if (allowDrop && ((dropIndex - dragIndex === 1 && this.dropPosition === -1) || (dropIndex - dragIndex === -1 && this.dropPosition === 1))) {
|
|
4056
4168
|
allowDrop = false;
|
|
4057
4169
|
}
|
|
@@ -4075,15 +4187,16 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4075
4187
|
}
|
|
4076
4188
|
},
|
|
4077
4189
|
findParentHeader(element) {
|
|
4078
|
-
if(element.nodeName === 'TH') {
|
|
4190
|
+
if (element.nodeName === 'TH') {
|
|
4079
4191
|
return element;
|
|
4080
|
-
}
|
|
4081
|
-
else {
|
|
4192
|
+
} else {
|
|
4082
4193
|
let parent = element.parentElement;
|
|
4083
|
-
|
|
4194
|
+
|
|
4195
|
+
while (parent.nodeName !== 'TH') {
|
|
4084
4196
|
parent = parent.parentElement;
|
|
4085
4197
|
if (!parent) break;
|
|
4086
4198
|
}
|
|
4199
|
+
|
|
4087
4200
|
return parent;
|
|
4088
4201
|
}
|
|
4089
4202
|
},
|
|
@@ -4091,6 +4204,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4091
4204
|
if (columns && columns.length) {
|
|
4092
4205
|
for (let i = 0; i < columns.length; i++) {
|
|
4093
4206
|
let column = columns[i];
|
|
4207
|
+
|
|
4094
4208
|
if (this.columnProp(column, 'columnKey') === key || this.columnProp(column, 'field') === key) {
|
|
4095
4209
|
return column;
|
|
4096
4210
|
}
|
|
@@ -4100,17 +4214,16 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4100
4214
|
return null;
|
|
4101
4215
|
},
|
|
4102
4216
|
onRowMouseDown(event) {
|
|
4103
|
-
if (utils.DomHandler.hasClass(event.target, 'p-datatable-reorderablerow-handle'))
|
|
4104
|
-
|
|
4105
|
-
else
|
|
4106
|
-
event.currentTarget.draggable = false;
|
|
4217
|
+
if (utils.DomHandler.hasClass(event.target, 'p-datatable-reorderablerow-handle')) event.currentTarget.draggable = true;
|
|
4218
|
+
else event.currentTarget.draggable = false;
|
|
4107
4219
|
},
|
|
4108
4220
|
onRowDragStart(e) {
|
|
4109
4221
|
const event = e.originalEvent;
|
|
4110
4222
|
const index = e.index;
|
|
4223
|
+
|
|
4111
4224
|
this.rowDragging = true;
|
|
4112
4225
|
this.draggedRowIndex = index;
|
|
4113
|
-
event.dataTransfer.setData('text', 'b');
|
|
4226
|
+
event.dataTransfer.setData('text', 'b'); // For firefox
|
|
4114
4227
|
},
|
|
4115
4228
|
onRowDragOver(e) {
|
|
4116
4229
|
const event = e.originalEvent;
|
|
@@ -4127,16 +4240,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4127
4240
|
utils.DomHandler.removeClass(rowElement, 'p-datatable-dragpoint-bottom');
|
|
4128
4241
|
|
|
4129
4242
|
this.droppedRowIndex = index;
|
|
4130
|
-
if (prevRowElement)
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
else {
|
|
4136
|
-
if (prevRowElement)
|
|
4137
|
-
utils.DomHandler.removeClass(prevRowElement, 'p-datatable-dragpoint-bottom');
|
|
4138
|
-
else
|
|
4139
|
-
utils.DomHandler.addClass(rowElement, 'p-datatable-dragpoint-top');
|
|
4243
|
+
if (prevRowElement) utils.DomHandler.addClass(prevRowElement, 'p-datatable-dragpoint-bottom');
|
|
4244
|
+
else utils.DomHandler.addClass(rowElement, 'p-datatable-dragpoint-top');
|
|
4245
|
+
} else {
|
|
4246
|
+
if (prevRowElement) utils.DomHandler.removeClass(prevRowElement, 'p-datatable-dragpoint-bottom');
|
|
4247
|
+
else utils.DomHandler.addClass(rowElement, 'p-datatable-dragpoint-top');
|
|
4140
4248
|
|
|
4141
4249
|
this.droppedRowIndex = index + 1;
|
|
4142
4250
|
utils.DomHandler.addClass(rowElement, 'p-datatable-dragpoint-bottom');
|
|
@@ -4148,6 +4256,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4148
4256
|
onRowDragLeave(event) {
|
|
4149
4257
|
let rowElement = event.currentTarget;
|
|
4150
4258
|
let prevRowElement = rowElement.previousElementSibling;
|
|
4259
|
+
|
|
4151
4260
|
if (prevRowElement) {
|
|
4152
4261
|
utils.DomHandler.removeClass(prevRowElement, 'p-datatable-dragpoint-bottom');
|
|
4153
4262
|
}
|
|
@@ -4163,8 +4272,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4163
4272
|
},
|
|
4164
4273
|
onRowDrop(event) {
|
|
4165
4274
|
if (this.droppedRowIndex != null) {
|
|
4166
|
-
let dropIndex =
|
|
4275
|
+
let dropIndex = this.draggedRowIndex > this.droppedRowIndex ? this.droppedRowIndex : this.droppedRowIndex === 0 ? 0 : this.droppedRowIndex - 1;
|
|
4167
4276
|
let processedData = [...this.processedData];
|
|
4277
|
+
|
|
4168
4278
|
utils.ObjectUtils.reorderArray(processedData, this.draggedRowIndex, dropIndex);
|
|
4169
4279
|
|
|
4170
4280
|
this.$emit('row-reorder', {
|
|
@@ -4188,8 +4298,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4188
4298
|
|
|
4189
4299
|
if (this.dataKey) {
|
|
4190
4300
|
expanded = this.d_expandedRowKeys ? this.d_expandedRowKeys[utils.ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined : false;
|
|
4191
|
-
}
|
|
4192
|
-
else {
|
|
4301
|
+
} else {
|
|
4193
4302
|
expandedRowIndex = this.findIndex(rowData, this.expandedRows);
|
|
4194
4303
|
expanded = expandedRowIndex > -1;
|
|
4195
4304
|
}
|
|
@@ -4198,11 +4307,11 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4198
4307
|
if (expandedRowIndex == null) {
|
|
4199
4308
|
expandedRowIndex = this.findIndex(rowData, this.expandedRows);
|
|
4200
4309
|
}
|
|
4310
|
+
|
|
4201
4311
|
_expandedRows.splice(expandedRowIndex, 1);
|
|
4202
4312
|
this.$emit('update:expandedRows', _expandedRows);
|
|
4203
4313
|
this.$emit('row-collapse', event);
|
|
4204
|
-
}
|
|
4205
|
-
else {
|
|
4314
|
+
} else {
|
|
4206
4315
|
_expandedRows.push(rowData);
|
|
4207
4316
|
this.$emit('update:expandedRows', _expandedRows);
|
|
4208
4317
|
this.$emit('row-expand', event);
|
|
@@ -4215,28 +4324,29 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4215
4324
|
let _expandedRowGroups = this.expandedRowGroups ? [...this.expandedRowGroups] : [];
|
|
4216
4325
|
|
|
4217
4326
|
if (this.isRowGroupExpanded(data)) {
|
|
4218
|
-
_expandedRowGroups = _expandedRowGroups.filter(group => group !== groupFieldValue);
|
|
4327
|
+
_expandedRowGroups = _expandedRowGroups.filter((group) => group !== groupFieldValue);
|
|
4219
4328
|
this.$emit('update:expandedRowGroups', _expandedRowGroups);
|
|
4220
|
-
this.$emit('rowgroup-collapse', {originalEvent: event, data: groupFieldValue});
|
|
4221
|
-
}
|
|
4222
|
-
else {
|
|
4329
|
+
this.$emit('rowgroup-collapse', { originalEvent: event, data: groupFieldValue });
|
|
4330
|
+
} else {
|
|
4223
4331
|
_expandedRowGroups.push(groupFieldValue);
|
|
4224
4332
|
this.$emit('update:expandedRowGroups', _expandedRowGroups);
|
|
4225
|
-
this.$emit('rowgroup-expand', {originalEvent: event, data: groupFieldValue});
|
|
4333
|
+
this.$emit('rowgroup-expand', { originalEvent: event, data: groupFieldValue });
|
|
4226
4334
|
}
|
|
4227
4335
|
},
|
|
4228
4336
|
isRowGroupExpanded(rowData) {
|
|
4229
4337
|
if (this.expandableRowGroups && this.expandedRowGroups) {
|
|
4230
4338
|
let groupFieldValue = utils.ObjectUtils.resolveFieldData(rowData, this.groupRowsBy);
|
|
4339
|
+
|
|
4231
4340
|
return this.expandedRowGroups.indexOf(groupFieldValue) > -1;
|
|
4232
4341
|
}
|
|
4342
|
+
|
|
4233
4343
|
return false;
|
|
4234
4344
|
},
|
|
4235
4345
|
isStateful() {
|
|
4236
4346
|
return this.stateKey != null;
|
|
4237
4347
|
},
|
|
4238
4348
|
getStorage() {
|
|
4239
|
-
switch(this.stateStorage) {
|
|
4349
|
+
switch (this.stateStorage) {
|
|
4240
4350
|
case 'local':
|
|
4241
4351
|
return window.localStorage;
|
|
4242
4352
|
|
|
@@ -4301,8 +4411,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4301
4411
|
const storage = this.getStorage();
|
|
4302
4412
|
const stateString = storage.getItem(this.stateKey);
|
|
4303
4413
|
const dateFormat = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/;
|
|
4304
|
-
|
|
4305
|
-
|
|
4414
|
+
|
|
4415
|
+
const reviver = function (key, value) {
|
|
4416
|
+
if (typeof value === 'string' && dateFormat.test(value)) {
|
|
4306
4417
|
return new Date(value);
|
|
4307
4418
|
}
|
|
4308
4419
|
|
|
@@ -4359,7 +4470,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4359
4470
|
saveColumnWidths(state) {
|
|
4360
4471
|
let widths = [];
|
|
4361
4472
|
let headers = utils.DomHandler.find(this.$el, '.p-datatable-thead > tr > th');
|
|
4362
|
-
|
|
4473
|
+
|
|
4474
|
+
headers.forEach((header) => widths.push(utils.DomHandler.getOuterWidth(header)));
|
|
4363
4475
|
state.columnWidths = widths.join(',');
|
|
4364
4476
|
|
|
4365
4477
|
if (this.columnResizeMode === 'expand') {
|
|
@@ -4380,8 +4492,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4380
4492
|
this.createStyleElement();
|
|
4381
4493
|
|
|
4382
4494
|
let innerHTML = '';
|
|
4495
|
+
|
|
4383
4496
|
widths.forEach((width, index) => {
|
|
4384
4497
|
let style = this.scrollable ? `flex: 1 1 ${width}px !important` : `width: ${width}px !important`;
|
|
4498
|
+
|
|
4385
4499
|
innerHTML += `
|
|
4386
4500
|
.p-datatable[${this.attributeSelector}] .p-datatable-thead > tr > th:nth-child(${index + 1}),
|
|
4387
4501
|
.p-datatable[${this.attributeSelector}] .p-datatable-tbody > tr > td:nth-child(${index + 1}),
|
|
@@ -4406,18 +4520,21 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4406
4520
|
},
|
|
4407
4521
|
onRowEditInit(event) {
|
|
4408
4522
|
let _editingRows = this.editingRows ? [...this.editingRows] : [];
|
|
4523
|
+
|
|
4409
4524
|
_editingRows.push(event.data);
|
|
4410
4525
|
this.$emit('update:editingRows', _editingRows);
|
|
4411
4526
|
this.$emit('row-edit-init', event);
|
|
4412
4527
|
},
|
|
4413
4528
|
onRowEditSave(event) {
|
|
4414
4529
|
let _editingRows = [...this.editingRows];
|
|
4530
|
+
|
|
4415
4531
|
_editingRows.splice(this.findIndex(event.data, _editingRows), 1);
|
|
4416
4532
|
this.$emit('update:editingRows', _editingRows);
|
|
4417
4533
|
this.$emit('row-edit-save', event);
|
|
4418
4534
|
},
|
|
4419
4535
|
onRowEditCancel(event) {
|
|
4420
4536
|
let _editingRows = [...this.editingRows];
|
|
4537
|
+
|
|
4421
4538
|
_editingRows.splice(this.findIndex(event.data, _editingRows), 1);
|
|
4422
4539
|
this.$emit('update:editingRows', _editingRows);
|
|
4423
4540
|
this.$emit('row-edit-cancel', event);
|
|
@@ -4430,10 +4547,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4430
4547
|
if (editing) {
|
|
4431
4548
|
!meta && (meta = editingMeta[index] = { data: { ...data }, fields: [] });
|
|
4432
4549
|
meta['fields'].push(field);
|
|
4433
|
-
}
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
!fields.length ?
|
|
4550
|
+
} else if (meta) {
|
|
4551
|
+
const fields = meta['fields'].filter((f) => f !== field);
|
|
4552
|
+
|
|
4553
|
+
!fields.length ? delete editingMeta[index] : (meta['fields'] = fields);
|
|
4437
4554
|
}
|
|
4438
4555
|
|
|
4439
4556
|
this.d_editingMeta = editingMeta;
|
|
@@ -4474,9 +4591,17 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4474
4591
|
},
|
|
4475
4592
|
cloneFilters() {
|
|
4476
4593
|
let cloned = {};
|
|
4594
|
+
|
|
4477
4595
|
if (this.filters) {
|
|
4478
|
-
Object.entries(this.filters).forEach(([prop,value]) => {
|
|
4479
|
-
cloned[prop] = value.operator
|
|
4596
|
+
Object.entries(this.filters).forEach(([prop, value]) => {
|
|
4597
|
+
cloned[prop] = value.operator
|
|
4598
|
+
? {
|
|
4599
|
+
operator: value.operator,
|
|
4600
|
+
constraints: value.constraints.map((constraint) => {
|
|
4601
|
+
return { ...constraint };
|
|
4602
|
+
})
|
|
4603
|
+
}
|
|
4604
|
+
: { ...value };
|
|
4480
4605
|
});
|
|
4481
4606
|
}
|
|
4482
4607
|
|
|
@@ -4484,7 +4609,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4484
4609
|
},
|
|
4485
4610
|
updateReorderableColumns() {
|
|
4486
4611
|
let columnOrder = [];
|
|
4487
|
-
|
|
4612
|
+
|
|
4613
|
+
this.columns.forEach((col) => columnOrder.push(this.columnProp(col, 'columnKey') || this.columnProp(col, 'field')));
|
|
4488
4614
|
this.d_columnOrder = columnOrder;
|
|
4489
4615
|
},
|
|
4490
4616
|
createStyleElement() {
|
|
@@ -4493,10 +4619,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4493
4619
|
document.head.appendChild(this.styleElement);
|
|
4494
4620
|
},
|
|
4495
4621
|
createResponsiveStyle() {
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4622
|
+
if (!this.responsiveStyleElement) {
|
|
4623
|
+
this.responsiveStyleElement = document.createElement('style');
|
|
4624
|
+
this.responsiveStyleElement.type = 'text/css';
|
|
4625
|
+
document.head.appendChild(this.responsiveStyleElement);
|
|
4500
4626
|
|
|
4501
4627
|
let innerHTML = `
|
|
4502
4628
|
@media screen and (max-width: ${this.breakpoint}) {
|
|
@@ -4529,8 +4655,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4529
4655
|
`;
|
|
4530
4656
|
|
|
4531
4657
|
this.responsiveStyleElement.innerHTML = innerHTML;
|
|
4532
|
-
|
|
4533
|
-
|
|
4658
|
+
}
|
|
4659
|
+
},
|
|
4534
4660
|
destroyResponsiveStyle() {
|
|
4535
4661
|
if (this.responsiveStyleElement) {
|
|
4536
4662
|
document.head.removeChild(this.responsiveStyleElement);
|
|
@@ -4547,6 +4673,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4547
4673
|
if (!results) {
|
|
4548
4674
|
results = [];
|
|
4549
4675
|
}
|
|
4676
|
+
|
|
4550
4677
|
if (children && children.length) {
|
|
4551
4678
|
children.forEach((child) => {
|
|
4552
4679
|
if (child.children instanceof Array) {
|
|
@@ -4556,6 +4683,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4556
4683
|
}
|
|
4557
4684
|
});
|
|
4558
4685
|
}
|
|
4686
|
+
|
|
4559
4687
|
return results;
|
|
4560
4688
|
},
|
|
4561
4689
|
dataToRender(data) {
|
|
@@ -4563,6 +4691,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4563
4691
|
|
|
4564
4692
|
if (_data && this.paginator) {
|
|
4565
4693
|
const first = this.lazy ? 0 : this.d_first;
|
|
4694
|
+
|
|
4566
4695
|
return _data.slice(first, first + this.d_rows);
|
|
4567
4696
|
}
|
|
4568
4697
|
|
|
@@ -4575,8 +4704,9 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4575
4704
|
computed: {
|
|
4576
4705
|
containerClass() {
|
|
4577
4706
|
return [
|
|
4578
|
-
'p-datatable p-component',
|
|
4579
|
-
|
|
4707
|
+
'p-datatable p-component',
|
|
4708
|
+
{
|
|
4709
|
+
'p-datatable-hoverable-rows': this.rowHover || this.selectionMode,
|
|
4580
4710
|
'p-datatable-auto-layout': this.autoLayout,
|
|
4581
4711
|
'p-datatable-resizable': this.resizableColumns,
|
|
4582
4712
|
'p-datatable-resizable-fit': this.resizableColumns && this.columnResizeMode === 'fit',
|
|
@@ -4584,7 +4714,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4584
4714
|
'p-datatable-scrollable-vertical': this.scrollable && this.scrollDirection === 'vertical',
|
|
4585
4715
|
'p-datatable-scrollable-horizontal': this.scrollable && this.scrollDirection === 'horizontal',
|
|
4586
4716
|
'p-datatable-scrollable-both': this.scrollable && this.scrollDirection === 'both',
|
|
4587
|
-
'p-datatable-flex-scrollable':
|
|
4717
|
+
'p-datatable-flex-scrollable': this.scrollable && this.scrollHeight === 'flex',
|
|
4588
4718
|
'p-datatable-responsive-stack': this.responsiveLayout === 'stack',
|
|
4589
4719
|
'p-datatable-responsive-scroll': this.responsiveLayout === 'scroll',
|
|
4590
4720
|
'p-datatable-striped': this.stripedRows,
|
|
@@ -4605,8 +4735,10 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4605
4735
|
|
|
4606
4736
|
if (this.reorderableColumns && this.d_columnOrder) {
|
|
4607
4737
|
let orderedColumns = [];
|
|
4738
|
+
|
|
4608
4739
|
for (let columnKey of this.d_columnOrder) {
|
|
4609
4740
|
let column = this.findColumnByKey(cols, columnKey);
|
|
4741
|
+
|
|
4610
4742
|
if (column && !this.columnProp(column, 'hidden')) {
|
|
4611
4743
|
orderedColumns.push(column);
|
|
4612
4744
|
}
|
|
@@ -4619,6 +4751,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4619
4751
|
},
|
|
4620
4752
|
headerColumnGroup() {
|
|
4621
4753
|
const children = this.getChildren();
|
|
4754
|
+
|
|
4622
4755
|
if (children) {
|
|
4623
4756
|
for (let child of children) {
|
|
4624
4757
|
if (child.type.name === 'ColumnGroup' && this.columnProp(child, 'type') === 'header') {
|
|
@@ -4631,6 +4764,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4631
4764
|
},
|
|
4632
4765
|
footerColumnGroup() {
|
|
4633
4766
|
const children = this.getChildren();
|
|
4767
|
+
|
|
4634
4768
|
if (children) {
|
|
4635
4769
|
for (let child of children) {
|
|
4636
4770
|
if (child.type.name === 'ColumnGroup' && this.columnProp(child, 'type') === 'footer') {
|
|
@@ -4654,10 +4788,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4654
4788
|
}
|
|
4655
4789
|
|
|
4656
4790
|
if (this.sorted) {
|
|
4657
|
-
if(this.sortMode === 'single')
|
|
4658
|
-
|
|
4659
|
-
else if(this.sortMode === 'multiple')
|
|
4660
|
-
data = this.sortMultiple(data);
|
|
4791
|
+
if (this.sortMode === 'single') data = this.sortSingle(data);
|
|
4792
|
+
else if (this.sortMode === 'multiple') data = this.sortMultiple(data);
|
|
4661
4793
|
}
|
|
4662
4794
|
}
|
|
4663
4795
|
}
|
|
@@ -4667,15 +4799,16 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4667
4799
|
totalRecordsLength() {
|
|
4668
4800
|
if (this.lazy) {
|
|
4669
4801
|
return this.totalRecords;
|
|
4670
|
-
}
|
|
4671
|
-
else {
|
|
4802
|
+
} else {
|
|
4672
4803
|
const data = this.processedData;
|
|
4804
|
+
|
|
4673
4805
|
return data ? data.length : 0;
|
|
4674
4806
|
}
|
|
4675
4807
|
},
|
|
4676
4808
|
empty() {
|
|
4677
4809
|
const data = this.processedData;
|
|
4678
|
-
|
|
4810
|
+
|
|
4811
|
+
return !data || data.length === 0;
|
|
4679
4812
|
},
|
|
4680
4813
|
paginatorTop() {
|
|
4681
4814
|
return this.paginator && (this.paginatorPosition !== 'bottom' || this.paginatorPosition === 'both');
|
|
@@ -4692,28 +4825,28 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4692
4825
|
allRowsSelected() {
|
|
4693
4826
|
if (this.selectAll !== null) {
|
|
4694
4827
|
return this.selectAll;
|
|
4695
|
-
}
|
|
4696
|
-
else {
|
|
4828
|
+
} else {
|
|
4697
4829
|
const val = this.frozenValue ? [...this.frozenValue, ...this.processedData] : this.processedData;
|
|
4698
|
-
|
|
4830
|
+
|
|
4831
|
+
return utils.ObjectUtils.isNotEmpty(val) && this.selection && Array.isArray(this.selection) && val.every((v) => this.selection.some((s) => this.equals(s, v)));
|
|
4699
4832
|
}
|
|
4700
4833
|
},
|
|
4701
4834
|
attributeSelector() {
|
|
4702
4835
|
return utils.UniqueComponentId();
|
|
4703
4836
|
},
|
|
4704
4837
|
groupRowSortField() {
|
|
4705
|
-
return this.sortMode === 'single' ? this.sortField :
|
|
4838
|
+
return this.sortMode === 'single' ? this.sortField : this.d_groupRowsSortMeta ? this.d_groupRowsSortMeta.field : null;
|
|
4706
4839
|
},
|
|
4707
4840
|
virtualScrollerDisabled() {
|
|
4708
4841
|
return utils.ObjectUtils.isEmpty(this.virtualScrollerOptions) || !this.scrollable;
|
|
4709
4842
|
}
|
|
4710
4843
|
},
|
|
4711
4844
|
components: {
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4845
|
+
DTPaginator: Paginator__default["default"],
|
|
4846
|
+
DTTableHeader: script$7,
|
|
4847
|
+
DTTableBody: script$3,
|
|
4848
|
+
DTTableFooter: script$1,
|
|
4849
|
+
DTVirtualScroller: VirtualScroller__default["default"]
|
|
4717
4850
|
}
|
|
4718
4851
|
};
|
|
4719
4852
|
|
|
@@ -4793,7 +4926,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4793
4926
|
name: "start",
|
|
4794
4927
|
fn: vue.withCtx(() => [
|
|
4795
4928
|
vue.renderSlot(_ctx.$slots, "paginatorstart")
|
|
4796
|
-
])
|
|
4929
|
+
]),
|
|
4930
|
+
key: "0"
|
|
4797
4931
|
}
|
|
4798
4932
|
: undefined,
|
|
4799
4933
|
(_ctx.$slots.paginatorend)
|
|
@@ -4801,7 +4935,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4801
4935
|
name: "end",
|
|
4802
4936
|
fn: vue.withCtx(() => [
|
|
4803
4937
|
vue.renderSlot(_ctx.$slots, "paginatorend")
|
|
4804
|
-
])
|
|
4938
|
+
]),
|
|
4939
|
+
key: "1"
|
|
4805
4940
|
}
|
|
4806
4941
|
: undefined
|
|
4807
4942
|
]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "alwaysShow"]))
|
|
@@ -4993,7 +5128,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
4993
5128
|
name: "start",
|
|
4994
5129
|
fn: vue.withCtx(() => [
|
|
4995
5130
|
vue.renderSlot(_ctx.$slots, "paginatorstart")
|
|
4996
|
-
])
|
|
5131
|
+
]),
|
|
5132
|
+
key: "0"
|
|
4997
5133
|
}
|
|
4998
5134
|
: undefined,
|
|
4999
5135
|
(_ctx.$slots.paginatorend)
|
|
@@ -5001,7 +5137,8 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
5001
5137
|
name: "end",
|
|
5002
5138
|
fn: vue.withCtx(() => [
|
|
5003
5139
|
vue.renderSlot(_ctx.$slots, "paginatorend")
|
|
5004
|
-
])
|
|
5140
|
+
]),
|
|
5141
|
+
key: "1"
|
|
5005
5142
|
}
|
|
5006
5143
|
: undefined
|
|
5007
5144
|
]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "alwaysShow"]))
|
|
@@ -5048,7 +5185,7 @@ this.primevue.datatable = (function (utils, api, Paginator, VirtualScroller, vue
|
|
|
5048
5185
|
}
|
|
5049
5186
|
}
|
|
5050
5187
|
|
|
5051
|
-
var css_248z = "\n.p-datatable {\n position: relative;\n}\n.p-datatable table {\n border-collapse: collapse;\n min-width: 100%;\n table-layout: fixed;\n}\n.p-datatable .p-sortable-column {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-datatable .p-sortable-column .p-column-title,\n.p-datatable .p-sortable-column .p-sortable-column-icon,\n.p-datatable .p-sortable-column .p-sortable-column-badge {\n vertical-align: middle;\n}\n.p-datatable .p-sortable-column .p-sortable-column-badge {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-datatable-responsive-scroll > .p-datatable-wrapper {\n overflow-x: auto;\n}\n.p-datatable-responsive-scroll > .p-datatable-wrapper > table,\n.p-datatable-auto-layout > .p-datatable-wrapper > table {\n table-layout: auto;\n}\n.p-datatable-hoverable-rows .p-selectable-row {\n cursor: pointer;\n}\n\n/* Scrollable */\n.p-datatable-scrollable .p-datatable-wrapper {\n position: relative;\n overflow: auto;\n}\n.p-datatable-scrollable .p-datatable-thead,\n.p-datatable-scrollable .p-datatable-tbody,\n.p-datatable-scrollable .p-datatable-tfoot {\n display: block;\n}\n.p-datatable-scrollable .p-datatable-thead > tr,\n.p-datatable-scrollable .p-datatable-tbody > tr,\n.p-datatable-scrollable .p-datatable-tfoot > tr {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n width: 100%;\n}\n.p-datatable-scrollable .p-datatable-thead > tr > th,\n.p-datatable-scrollable .p-datatable-tbody > tr > td,\n.p-datatable-scrollable .p-datatable-tfoot > tr > td {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-datatable-scrollable .p-datatable-thead {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n.p-datatable-scrollable .p-datatable-frozen-tbody {\n position: sticky;\n z-index: 1;\n}\n.p-datatable-scrollable .p-datatable-tfoot {\n position: sticky;\n bottom: 0;\n z-index: 1;\n}\n.p-datatable-scrollable .p-frozen-column {\n position: sticky;\n background: inherit;\n}\n.p-datatable-scrollable th.p-frozen-column {\n z-index: 1;\n}\n.p-datatable-scrollable-both .p-datatable-thead > tr > th,\n.p-datatable-scrollable-both .p-datatable-tbody > tr > td,\n.p-datatable-scrollable-both .p-datatable-tfoot > tr > td,\n.p-datatable-scrollable-horizontal .p-datatable-thead > tr > th
|
|
5188
|
+
var css_248z = "\n.p-datatable {\n position: relative;\n}\n.p-datatable table {\n border-collapse: collapse;\n min-width: 100%;\n table-layout: fixed;\n}\n.p-datatable .p-sortable-column {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-datatable .p-sortable-column .p-column-title,\n.p-datatable .p-sortable-column .p-sortable-column-icon,\n.p-datatable .p-sortable-column .p-sortable-column-badge {\n vertical-align: middle;\n}\n.p-datatable .p-sortable-column .p-sortable-column-badge {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-datatable-responsive-scroll > .p-datatable-wrapper {\n overflow-x: auto;\n}\n.p-datatable-responsive-scroll > .p-datatable-wrapper > table,\n.p-datatable-auto-layout > .p-datatable-wrapper > table {\n table-layout: auto;\n}\n.p-datatable-hoverable-rows .p-selectable-row {\n cursor: pointer;\n}\n\n/* Scrollable */\n.p-datatable-scrollable .p-datatable-wrapper {\n position: relative;\n overflow: auto;\n}\n.p-datatable-scrollable .p-datatable-thead,\n.p-datatable-scrollable .p-datatable-tbody,\n.p-datatable-scrollable .p-datatable-tfoot {\n display: block;\n}\n.p-datatable-scrollable .p-datatable-thead > tr,\n.p-datatable-scrollable .p-datatable-tbody > tr,\n.p-datatable-scrollable .p-datatable-tfoot > tr {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n width: 100%;\n}\n.p-datatable-scrollable .p-datatable-thead > tr > th,\n.p-datatable-scrollable .p-datatable-tbody > tr > td,\n.p-datatable-scrollable .p-datatable-tfoot > tr > td {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-datatable-scrollable .p-datatable-thead {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n.p-datatable-scrollable .p-datatable-frozen-tbody {\n position: sticky;\n z-index: 1;\n}\n.p-datatable-scrollable .p-datatable-tfoot {\n position: sticky;\n bottom: 0;\n z-index: 1;\n}\n.p-datatable-scrollable .p-frozen-column {\n position: sticky;\n background: inherit;\n}\n.p-datatable-scrollable th.p-frozen-column {\n z-index: 1;\n}\n.p-datatable-scrollable-both .p-datatable-thead > tr > th,\n.p-datatable-scrollable-both .p-datatable-tbody > tr > td,\n.p-datatable-scrollable-both .p-datatable-tfoot > tr > td,\n.p-datatable-scrollable-horizontal .p-datatable-thead > tr > th .p-datatable-scrollable-horizontal .p-datatable-tbody > tr > td,\n.p-datatable-scrollable-horizontal .p-datatable-tfoot > tr > td {\n -webkit-box-flex: 1;\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n}\n.p-datatable-flex-scrollable {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 100%;\n}\n.p-datatable-flex-scrollable .p-datatable-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 100%;\n}\n.p-datatable-scrollable .p-rowgroup-header {\n position: sticky;\n z-index: 1;\n}\n.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead,\n.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot {\n display: table;\n border-collapse: collapse;\n width: 100%;\n table-layout: fixed;\n}\n.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead > tr,\n.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot > tr {\n display: table-row;\n}\n.p-datatable-scrollable.p-datatable-grouped-header .p-datatable-thead > tr > th,\n.p-datatable-scrollable.p-datatable-grouped-footer .p-datatable-tfoot > tr > td {\n display: table-cell;\n}\n.p-datatable-scrollable .p-virtualscroller > .p-datatable-table {\n display: inline-block; /* For Safari */\n}\n\n/* Resizable */\n.p-datatable-resizable > .p-datatable-wrapper {\n overflow-x: auto;\n}\n.p-datatable-resizable .p-datatable-thead > tr > th,\n.p-datatable-resizable .p-datatable-tfoot > tr > td,\n.p-datatable-resizable .p-datatable-tbody > tr > td {\n overflow: hidden;\n white-space: nowrap;\n}\n.p-datatable-resizable .p-resizable-column:not(.p-frozen-column) {\n background-clip: padding-box;\n position: relative;\n}\n.p-datatable-resizable-fit .p-resizable-column:last-child .p-column-resizer {\n display: none;\n}\n.p-datatable .p-column-resizer {\n display: block;\n position: absolute !important;\n top: 0;\n right: 0;\n margin: 0;\n width: 0.5rem;\n height: 100%;\n padding: 0px;\n cursor: col-resize;\n border: 1px solid transparent;\n}\n.p-datatable .p-column-header-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-datatable .p-column-resizer-helper {\n width: 1px;\n position: absolute;\n z-index: 10;\n display: none;\n}\n.p-datatable .p-row-editor-init,\n.p-datatable .p-row-editor-save,\n.p-datatable .p-row-editor-cancel {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Expand */\n.p-datatable .p-row-toggler {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Reorder */\n.p-datatable-reorder-indicator-up,\n.p-datatable-reorder-indicator-down {\n position: absolute;\n display: none;\n}\n.p-reorderable-column,\n.p-datatable-reorderablerow-handle {\n cursor: move;\n}\n\n/* Loader */\n.p-datatable .p-datatable-loading-overlay {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n z-index: 2;\n}\n\n/* Filter */\n.p-column-filter-row {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n.p-column-filter-menu {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n margin-left: auto;\n}\n.p-column-filter-row .p-column-filter-element {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n}\n.p-column-filter-menu-button,\n.p-column-filter-clear-button {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-column-filter-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-column-filter-row-items {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-column-filter-row-item {\n cursor: pointer;\n}\n.p-column-filter-add-button,\n.p-column-filter-remove-button {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-column-filter-add-button .p-button-label,\n.p-column-filter-remove-button .p-button-label {\n -webkit-box-flex: 0;\n -ms-flex-positive: 0;\n flex-grow: 0;\n}\n.p-column-filter-buttonbar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-column-filter-buttonbar .p-button:not(.p-button-icon-only) {\n width: auto;\n}\n\n/* Responsive */\n.p-datatable .p-datatable-tbody > tr > td > .p-column-title {\n display: none;\n}\n\n/* VirtualScroller */\n.p-datatable .p-virtualscroller-loading {\n -webkit-transform: none !important;\n transform: none !important;\n min-height: 0;\n position: sticky;\n top: 0;\n left: 0;\n}\n";
|
|
5052
5189
|
styleInject(css_248z);
|
|
5053
5190
|
|
|
5054
5191
|
script.render = render;
|