primereact 6.6.0 → 7.0.1
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 +34 -9
- package/accordion/accordion.cjs.js +32 -23
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +3 -2
- package/accordion/accordion.esm.js +17 -8
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +32 -24
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +374 -42
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +126 -32
- package/api/api.esm.js +371 -43
- package/api/api.esm.min.js +1 -1
- package/api/api.js +374 -44
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +79 -69
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +3 -1
- package/autocomplete/autocomplete.esm.js +15 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +75 -70
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +12 -9
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +7 -4
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +13 -10
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +5 -3
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +6 -4
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +5 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +6 -4
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +19 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +7 -2
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +18 -14
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +18 -16
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +19 -17
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -53
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -42
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -54
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +183 -153
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -1
- package/calendar/calendar.esm.js +57 -27
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +179 -154
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +3 -1
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +2 -0
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +4 -2
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +15 -13
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +16 -14
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +39 -36
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +39 -37
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +53 -47
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +8 -2
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +50 -48
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +8 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +7 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +22 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +15 -8
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +22 -16
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +18 -14
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +13 -9
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +19 -15
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +48 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +39 -11
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +48 -21
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +37 -31
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/colorpicker/colorpicker.esm.js +8 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +34 -32
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +34 -9
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +168 -13
- package/column/column.esm.js +34 -9
- package/column/column.esm.min.js +1 -1
- package/column/column.js +35 -10
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +2 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +2 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +3 -1
- package/columngroup/columngroup.min.js +1 -1
- package/common/common.min.css +1 -1
- package/confirmdialog/confirmdialog.cjs.js +24 -20
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +8 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +24 -21
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +47 -40
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +4 -3
- package/confirmpopup/confirmpopup.esm.js +12 -6
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +44 -40
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +70 -63
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +37 -31
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +67 -64
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11745 -1573
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +3 -1
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +2 -0
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -2
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +14 -11
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +6 -3
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +14 -12
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +4784 -3277
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +100 -29
- package/datatable/datatable.esm.js +4859 -3353
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4777 -3278
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +34 -29
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +8 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -30
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -0
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -2
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +68 -51
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +1 -0
- package/dialog/dialog.esm.js +22 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +65 -52
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +6 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +7 -5
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +53 -17
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +41 -5
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +53 -18
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +90 -76
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +28 -14
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +86 -77
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +40 -40
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +4 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +39 -37
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +19 -15
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +5 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +18 -16
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +65 -56
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +2 -1
- package/fileupload/fileupload.esm.js +26 -17
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +65 -57
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +8 -8
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +3 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +7 -5
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +72 -65
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +8 -2
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +69 -66
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +3 -1
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +2 -0
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +4 -2
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +33 -27
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +5 -5
- package/image/image.esm.js +7 -2
- package/image/image.esm.min.js +1 -1
- package/image/image.js +31 -28
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +10 -8
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +11 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +11 -8
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +4 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +11 -9
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +50 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +33 -12
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +49 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +17 -12
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +10 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +17 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +14 -10
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +5 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +13 -11
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +12 -9
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +4 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +12 -10
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +5 -5
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +1 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +6 -6
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +9 -7
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +3 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +10 -8
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +44 -39
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +9 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +42 -40
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +38 -35
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +4 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +38 -36
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +55 -46
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +10 -2
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +50 -47
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +35 -28
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -0
- package/menu/menu.esm.js +8 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +32 -29
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +40 -35
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +6 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +39 -36
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +11 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +5 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +12 -9
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +21 -17
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +20 -18
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +132 -118
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -2
- package/multiselect/multiselect.esm.js +47 -33
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +128 -119
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +16 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +4 -1
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +16 -14
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +37 -34
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +4 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +37 -35
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +28 -26
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +3 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +29 -27
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +33 -24
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +10 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +29 -25
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.cjs.js +2 -2
- package/overlayservice/overlayservice.cjs.min.js +1 -1
- package/overlayservice/overlayservice.esm.js +1 -1
- package/overlayservice/overlayservice.esm.min.js +1 -1
- package/overlayservice/overlayservice.js +3 -3
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +10 -4
- package/paginator/paginator.cjs.js +51 -48
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +5 -2
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +51 -49
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +21 -17
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +5 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +20 -18
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +42 -39
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +4 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +42 -40
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +35 -29
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +8 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +32 -30
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +60 -54
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +16 -10
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +60 -55
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -3
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +6 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +8 -4
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +8041 -5835
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6905 -4701
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +8040 -5832
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +11 -9
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +12 -10
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +7 -5
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +8 -6
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +12 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +4 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +12 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +12 -9
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +6 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +12 -10
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +430 -238
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +158 -27
- package/resources/themes/arya-green/theme.css +158 -27
- package/resources/themes/arya-orange/theme.css +158 -27
- package/resources/themes/arya-purple/theme.css +158 -27
- package/resources/themes/bootstrap4-dark-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-dark-purple/theme.css +162 -31
- package/resources/themes/bootstrap4-light-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-light-purple/theme.css +162 -31
- package/resources/themes/fluent-light/theme.css +158 -27
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5671 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5671 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5671 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5671 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5671 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5671 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5671 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5671 -0
- package/resources/themes/luna-amber/theme.css +162 -31
- package/resources/themes/luna-blue/theme.css +162 -31
- package/resources/themes/luna-green/theme.css +162 -31
- package/resources/themes/luna-pink/theme.css +162 -31
- package/resources/themes/md-dark-deeppurple/theme.css +347 -56
- package/resources/themes/md-dark-indigo/theme.css +347 -56
- package/resources/themes/md-light-deeppurple/theme.css +347 -56
- package/resources/themes/md-light-indigo/theme.css +347 -56
- package/resources/themes/mdc-dark-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-dark-indigo/theme.css +347 -56
- package/resources/themes/mdc-light-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-light-indigo/theme.css +347 -56
- package/resources/themes/nova/theme.css +162 -31
- package/resources/themes/nova-accent/theme.css +162 -31
- package/resources/themes/nova-alt/theme.css +162 -31
- package/resources/themes/rhea/theme.css +162 -31
- package/resources/themes/saga-blue/theme.css +158 -27
- package/resources/themes/saga-green/theme.css +158 -27
- package/resources/themes/saga-orange/theme.css +158 -27
- package/resources/themes/saga-purple/theme.css +158 -27
- package/resources/themes/tailwind-light/theme.css +162 -31
- package/resources/themes/vela-blue/theme.css +158 -27
- package/resources/themes/vela-green/theme.css +158 -27
- package/resources/themes/vela-orange/theme.css +158 -27
- package/resources/themes/vela-purple/theme.css +158 -27
- package/ripple/ripple.cjs.js +13 -11
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +5 -3
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +14 -12
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +3 -1
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +2 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +4 -2
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +21 -19
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +22 -20
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +20 -13
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +2 -1
- package/scrolltop/scrolltop.esm.js +11 -5
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +18 -14
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +19 -15
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +5 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +18 -16
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +144 -116
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +2 -0
- package/sidebar/sidebar.esm.js +135 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +141 -117
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +5 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +3 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +6 -4
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +39 -32
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +8 -2
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +36 -33
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -23
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -15
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -24
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +22 -19
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +4 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +22 -20
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +39 -33
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +4 -5
- package/splitbutton/splitbutton.esm.js +8 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +36 -34
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +21 -19
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +4 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +22 -20
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +12 -10
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +13 -11
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +35 -39
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +20 -24
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +36 -40
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +18 -15
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +4 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +18 -16
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +177 -54
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +4 -1
- package/tabview/tabview.esm.js +146 -23
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +177 -55
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +11 -8
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +7 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +12 -9
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +14 -12
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +15 -13
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.cjs.js +2 -2
- package/terminalservice/terminalservice.cjs.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +3 -3
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +44 -36
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +9 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +40 -37
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +14 -12
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +15 -13
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +48 -40
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +22 -15
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +46 -41
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +16 -9
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +10 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +15 -10
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +9 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +10 -8
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +36 -31
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +6 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +35 -32
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +54 -51
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +9 -2
- package/tree/tree.esm.js +4 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +54 -52
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +3 -1
- package/treeselect/treeselect.cjs.js +52 -46
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +9 -2
- package/treeselect/treeselect.esm.js +11 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +49 -47
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1290 -272
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +9 -2
- package/treetable/treetable.esm.js +1213 -195
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1288 -273
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +13 -10
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +4 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +13 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +502 -525
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +29 -20
- package/utils/utils.esm.js +501 -524
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +503 -526
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +285 -168
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +21 -9
- package/virtualscroller/virtualscroller.esm.js +278 -161
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +286 -169
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +17 -27
- package/core/core.cjs.js +0 -3080
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -3055
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
package/scrolltop/scrolltop.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.scrolltop = (function (exports, React,
|
|
2
|
+
this.primereact.scrolltop = (function (exports, React, utils, csstransition, ripple, PrimeReact) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
7
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
8
|
+
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
|
|
8
9
|
|
|
9
10
|
function _classCallCheck(instance, Constructor) {
|
|
10
11
|
if (!(instance instanceof Constructor)) {
|
|
@@ -79,6 +80,8 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
79
80
|
function _possibleConstructorReturn(self, call) {
|
|
80
81
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
81
82
|
return call;
|
|
83
|
+
} else if (call !== void 0) {
|
|
84
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
return _assertThisInitialized(self);
|
|
@@ -127,7 +130,7 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
127
130
|
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
|
|
128
131
|
_this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this));
|
|
129
132
|
_this.onExited = _this.onExited.bind(_assertThisInitialized(_this));
|
|
130
|
-
_this.scrollElementRef = /*#__PURE__*/React__default[
|
|
133
|
+
_this.scrollElementRef = /*#__PURE__*/React__default["default"].createRef();
|
|
131
134
|
return _this;
|
|
132
135
|
}
|
|
133
136
|
|
|
@@ -164,7 +167,7 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
164
167
|
var _this3 = this;
|
|
165
168
|
|
|
166
169
|
this.scrollListener = function () {
|
|
167
|
-
_this3.checkVisibility(
|
|
170
|
+
_this3.checkVisibility(utils.DomHandler.getWindowScrollTop());
|
|
168
171
|
};
|
|
169
172
|
|
|
170
173
|
window.addEventListener('scroll', this.scrollListener);
|
|
@@ -188,7 +191,7 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
188
191
|
}, {
|
|
189
192
|
key: "onEnter",
|
|
190
193
|
value: function onEnter() {
|
|
191
|
-
|
|
194
|
+
utils.ZIndexUtils.set('overlay', this.scrollElementRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
192
195
|
}
|
|
193
196
|
}, {
|
|
194
197
|
key: "onEntered",
|
|
@@ -198,7 +201,7 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
198
201
|
}, {
|
|
199
202
|
key: "onExited",
|
|
200
203
|
value: function onExited() {
|
|
201
|
-
|
|
204
|
+
utils.ZIndexUtils.clear(this.scrollElementRef.current);
|
|
202
205
|
this.props.onHide && this.props.onHide();
|
|
203
206
|
}
|
|
204
207
|
}, {
|
|
@@ -210,19 +213,18 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
210
213
|
key: "componentWillUnmount",
|
|
211
214
|
value: function componentWillUnmount() {
|
|
212
215
|
if (this.props.target === 'window') this.unbindDocumentScrollListener();else if (this.props.target === 'parent') this.unbindParentScrollListener();
|
|
213
|
-
|
|
216
|
+
utils.ZIndexUtils.clear(this.scrollElementRef.current);
|
|
214
217
|
}
|
|
215
218
|
}, {
|
|
216
219
|
key: "render",
|
|
217
220
|
value: function render() {
|
|
218
221
|
var _this4 = this;
|
|
219
222
|
|
|
220
|
-
var className =
|
|
223
|
+
var className = utils.classNames('p-scrolltop p-link p-component', {
|
|
221
224
|
'p-scrolltop-sticky': this.props.target !== 'window'
|
|
222
225
|
}, this.props.className);
|
|
223
|
-
var iconClassName = core.classNames('p-scrolltop-icon', this.props.icon);
|
|
224
226
|
var isTargetParent = this.props.target === 'parent';
|
|
225
|
-
return /*#__PURE__*/React__default[
|
|
227
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
|
|
226
228
|
nodeRef: this.scrollElementRef,
|
|
227
229
|
classNames: "p-scrolltop",
|
|
228
230
|
in: this.state.visible,
|
|
@@ -235,15 +237,17 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
235
237
|
onEnter: this.onEnter,
|
|
236
238
|
onEntered: this.onEntered,
|
|
237
239
|
onExited: this.onExited
|
|
238
|
-
}, /*#__PURE__*/React__default[
|
|
240
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
239
241
|
ref: this.scrollElementRef,
|
|
240
242
|
type: "button",
|
|
241
243
|
className: className,
|
|
242
244
|
style: this.props.style,
|
|
243
245
|
onClick: this.onClick
|
|
244
|
-
},
|
|
245
|
-
className:
|
|
246
|
-
}
|
|
246
|
+
}, utils.IconUtils.getJSXIcon(this.props.icon, {
|
|
247
|
+
className: 'p-scrolltop-icon'
|
|
248
|
+
}, {
|
|
249
|
+
props: this.props
|
|
250
|
+
}), /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null))), isTargetParent && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
247
251
|
ref: function ref(el) {
|
|
248
252
|
return _this4.helper = el;
|
|
249
253
|
},
|
|
@@ -273,4 +277,4 @@ this.primereact.scrolltop = (function (exports, React, core) {
|
|
|
273
277
|
|
|
274
278
|
return exports;
|
|
275
279
|
|
|
276
|
-
}({}, React, primereact.
|
|
280
|
+
})({}, React, primereact.utils, primereact.csstransition, primereact.ripple, primereact.api);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.scrolltop=function(e,t,n){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.scrolltop=function(e,t,n,r,o,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),c=l(i);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var v,E,w,k=function(e){h(E,e);var t,i,l,f,d,v=(t=E,i=b(),function(){var e,n=m(t);if(i){var r=m(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return y(this,e)});function E(e){var t;return u(this,E),(t=v.call(this,e)).state={visible:!1},t.onClick=t.onClick.bind(p(t)),t.onEnter=t.onEnter.bind(p(t)),t.onEntered=t.onEntered.bind(p(t)),t.onExited=t.onExited.bind(p(t)),t.scrollElementRef=s.default.createRef(),t}return l=E,(f=[{key:"onClick",value:function(){("window"===this.props.target?window:this.helper.parentElement).scroll({top:0,behavior:this.props.behavior})}},{key:"checkVisibility",value:function(e){this.setState({visible:e>this.props.threshold})}},{key:"bindParentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(e.helper.parentElement.scrollTop)},this.helper.parentElement.addEventListener("scroll",this.scrollListener)}},{key:"bindDocumentScrollListener",value:function(){var e=this;this.scrollListener=function(){e.checkVisibility(n.DomHandler.getWindowScrollTop())},window.addEventListener("scroll",this.scrollListener)}},{key:"unbindParentScrollListener",value:function(){this.scrollListener&&(this.helper.parentElement.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"unbindDocumentScrollListener",value:function(){this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null)}},{key:"onEnter",value:function(){n.ZIndexUtils.set("overlay",this.scrollElementRef.current,c.default.autoZIndex,c.default.zIndex.overlay)}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExited",value:function(){n.ZIndexUtils.clear(this.scrollElementRef.current),this.props.onHide&&this.props.onHide()}},{key:"componentDidMount",value:function(){"window"===this.props.target?this.bindDocumentScrollListener():"parent"===this.props.target&&this.bindParentScrollListener()}},{key:"componentWillUnmount",value:function(){"window"===this.props.target?this.unbindDocumentScrollListener():"parent"===this.props.target&&this.unbindParentScrollListener(),n.ZIndexUtils.clear(this.scrollElementRef.current)}},{key:"render",value:function(){var e=this,t=n.classNames("p-scrolltop p-link p-component",{"p-scrolltop-sticky":"window"!==this.props.target},this.props.className),i="parent"===this.props.target;return s.default.createElement(s.default.Fragment,null,s.default.createElement(r.CSSTransition,{nodeRef:this.scrollElementRef,classNames:"p-scrolltop",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntered:this.onEntered,onExited:this.onExited},s.default.createElement("button",{ref:this.scrollElementRef,type:"button",className:t,style:this.props.style,onClick:this.onClick},n.IconUtils.getJSXIcon(this.props.icon,{className:"p-scrolltop-icon"},{props:this.props}),s.default.createElement(o.Ripple,null))),i&&s.default.createElement("span",{ref:function(t){return e.helper=t},className:"p-scrolltop-helper"}))}}])&&a(l.prototype,f),d&&a(l,d),E}(t.Component);return w={target:"window",threshold:400,icon:"pi pi-chevron-up",behavior:"smooth",className:null,style:null,transitionOptions:null,onShow:null,onHide:null},(E="defaultProps")in(v=k)?Object.defineProperty(v,E,{value:w,enumerable:!0,configurable:!0,writable:!0}):v[E]=w,e.ScrollTop=k,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.csstransition,primereact.ripple,primereact.api);
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var utils = require('primereact/utils');
|
|
7
|
+
var ripple = require('primereact/ripple');
|
|
8
|
+
var tooltip = require('primereact/tooltip');
|
|
7
9
|
|
|
8
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
11
|
|
|
@@ -117,6 +119,8 @@ function _typeof(obj) {
|
|
|
117
119
|
function _possibleConstructorReturn(self, call) {
|
|
118
120
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
119
121
|
return call;
|
|
122
|
+
} else if (call !== void 0) {
|
|
123
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
return _assertThisInitialized(self);
|
|
@@ -209,7 +213,7 @@ var SelectButtonItem = /*#__PURE__*/function (_Component) {
|
|
|
209
213
|
if (this.props.template) {
|
|
210
214
|
return this.props.template(this.props.option);
|
|
211
215
|
} else {
|
|
212
|
-
return /*#__PURE__*/React__default[
|
|
216
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
213
217
|
className: "p-button-label p-c"
|
|
214
218
|
}, this.props.label);
|
|
215
219
|
}
|
|
@@ -217,13 +221,13 @@ var SelectButtonItem = /*#__PURE__*/function (_Component) {
|
|
|
217
221
|
}, {
|
|
218
222
|
key: "render",
|
|
219
223
|
value: function render() {
|
|
220
|
-
var className =
|
|
224
|
+
var className = utils.classNames('p-button p-component', {
|
|
221
225
|
'p-highlight': this.props.selected,
|
|
222
226
|
'p-disabled': this.props.disabled,
|
|
223
227
|
'p-focus': this.state.focused
|
|
224
228
|
}, this.props.className);
|
|
225
229
|
var content = this.renderContent();
|
|
226
|
-
return /*#__PURE__*/React__default[
|
|
230
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
227
231
|
className: className,
|
|
228
232
|
role: "button",
|
|
229
233
|
"aria-label": this.props.label,
|
|
@@ -234,7 +238,7 @@ var SelectButtonItem = /*#__PURE__*/function (_Component) {
|
|
|
234
238
|
tabIndex: this.props.tabIndex,
|
|
235
239
|
onFocus: this.onFocus,
|
|
236
240
|
onBlur: this.onBlur
|
|
237
|
-
}, content, !this.props.disabled && /*#__PURE__*/React__default[
|
|
241
|
+
}, content, !this.props.disabled && /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
238
242
|
}
|
|
239
243
|
}]);
|
|
240
244
|
|
|
@@ -301,7 +305,7 @@ var SelectButton = /*#__PURE__*/function (_Component) {
|
|
|
301
305
|
if (this.props.multiple) {
|
|
302
306
|
var currentValue = this.props.value ? _toConsumableArray(this.props.value) : [];
|
|
303
307
|
if (selected) newValue = currentValue.filter(function (val) {
|
|
304
|
-
return !
|
|
308
|
+
return !utils.ObjectUtils.equals(val, optionValue, _this2.props.dataKey);
|
|
305
309
|
});else newValue = [].concat(_toConsumableArray(currentValue), [optionValue]);
|
|
306
310
|
} else {
|
|
307
311
|
if (selected) newValue = null;else newValue = optionValue;
|
|
@@ -324,18 +328,18 @@ var SelectButton = /*#__PURE__*/function (_Component) {
|
|
|
324
328
|
}, {
|
|
325
329
|
key: "getOptionLabel",
|
|
326
330
|
value: function getOptionLabel(option) {
|
|
327
|
-
return this.props.optionLabel ?
|
|
331
|
+
return this.props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
|
|
328
332
|
}
|
|
329
333
|
}, {
|
|
330
334
|
key: "getOptionValue",
|
|
331
335
|
value: function getOptionValue(option) {
|
|
332
|
-
return this.props.optionValue ?
|
|
336
|
+
return this.props.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.props.optionValue) : option && option['value'] !== undefined ? option['value'] : option;
|
|
333
337
|
}
|
|
334
338
|
}, {
|
|
335
339
|
key: "isOptionDisabled",
|
|
336
340
|
value: function isOptionDisabled(option) {
|
|
337
341
|
if (this.props.optionDisabled) {
|
|
338
|
-
return
|
|
342
|
+
return utils.ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : utils.ObjectUtils.resolveFieldData(option, this.props.optionDisabled);
|
|
339
343
|
}
|
|
340
344
|
|
|
341
345
|
return option && option['disabled'] !== undefined ? option['disabled'] : false;
|
|
@@ -355,7 +359,7 @@ var SelectButton = /*#__PURE__*/function (_Component) {
|
|
|
355
359
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
356
360
|
var val = _step.value;
|
|
357
361
|
|
|
358
|
-
if (
|
|
362
|
+
if (utils.ObjectUtils.equals(val, optionValue, this.props.dataKey)) {
|
|
359
363
|
selected = true;
|
|
360
364
|
break;
|
|
361
365
|
}
|
|
@@ -367,7 +371,7 @@ var SelectButton = /*#__PURE__*/function (_Component) {
|
|
|
367
371
|
}
|
|
368
372
|
}
|
|
369
373
|
} else {
|
|
370
|
-
selected =
|
|
374
|
+
selected = utils.ObjectUtils.equals(this.props.value, optionValue, this.props.dataKey);
|
|
371
375
|
}
|
|
372
376
|
|
|
373
377
|
return selected;
|
|
@@ -399,7 +403,7 @@ var SelectButton = /*#__PURE__*/function (_Component) {
|
|
|
399
403
|
}, {
|
|
400
404
|
key: "renderTooltip",
|
|
401
405
|
value: function renderTooltip() {
|
|
402
|
-
this.tooltip =
|
|
406
|
+
this.tooltip = tooltip.tip({
|
|
403
407
|
target: this.element,
|
|
404
408
|
content: this.props.tooltip,
|
|
405
409
|
options: this.props.tooltipOptions
|
|
@@ -417,7 +421,7 @@ var SelectButton = /*#__PURE__*/function (_Component) {
|
|
|
417
421
|
var optionLabel = _this3.getOptionLabel(option);
|
|
418
422
|
|
|
419
423
|
var tabIndex = isDisabled ? null : 0;
|
|
420
|
-
return /*#__PURE__*/React__default[
|
|
424
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectButtonItem, {
|
|
421
425
|
key: "".concat(optionLabel, "_").concat(index),
|
|
422
426
|
label: optionLabel,
|
|
423
427
|
className: option.className,
|
|
@@ -439,9 +443,9 @@ var SelectButton = /*#__PURE__*/function (_Component) {
|
|
|
439
443
|
value: function render() {
|
|
440
444
|
var _this4 = this;
|
|
441
445
|
|
|
442
|
-
var className =
|
|
446
|
+
var className = utils.classNames('p-selectbutton p-buttonset p-component', this.props.className);
|
|
443
447
|
var items = this.renderItems();
|
|
444
|
-
return /*#__PURE__*/React__default[
|
|
448
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
445
449
|
id: this.props.id,
|
|
446
450
|
ref: function ref(el) {
|
|
447
451
|
return _this4.element = el;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils"),n=require("primereact/ripple"),o=require("primereact/tooltip");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=r(t);function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function s(t){if(Array.isArray(t))return l(t)}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return s(t)||a(t)||u(t)||p()}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function h(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),t}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t,e){return y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},y(t,e)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function O(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function j(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var w=function(o){v(a,t.Component);var r,l,s=(r=a,l=k(),function(){var t,e=g(r);if(l){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function a(t){var e;return f(this,a),(e=s.call(this,t)).state={focused:!1},e.onClick=e.onClick.bind(b(e)),e.onFocus=e.onFocus.bind(b(e)),e.onBlur=e.onBlur.bind(b(e)),e.onKeyDown=e.onKeyDown.bind(b(e)),e}return h(a,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"onKeyDown",value:function(t){var e=t.which;32!==e&&13!==e||(this.onClick(t),t.preventDefault())}},{key:"renderContent",value:function(){return this.props.template?this.props.template(this.props.option):i.default.createElement("span",{className:"p-button-label p-c"},this.props.label)}},{key:"render",value:function(){var t=e.classNames("p-button p-component",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled,"p-focus":this.state.focused},this.props.className),o=this.renderContent();return i.default.createElement("div",{className:t,role:"button","aria-label":this.props.label,"aria-pressed":this.props.selected,"aria-labelledby":this.props.ariaLabelledBy,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,onFocus:this.onFocus,onBlur:this.onBlur},o,!this.props.disabled&&i.default.createElement(n.Ripple,null))}}]),a}();function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){j(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function P(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function B(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}j(w,"defaultProps",{option:null,label:null,className:null,selected:null,tabIndex:null,ariaLabelledBy:null,template:null,onClick:null});var A=function(n){v(a,t.Component);var r,l,s=(r=a,l=B(),function(){var t,e=g(r);if(l){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function a(t){var e;return f(this,a),(e=s.call(this,t)).onOptionClick=e.onOptionClick.bind(b(e)),e}return h(a,[{key:"onOptionClick",value:function(t){var n=this;if(!this.props.disabled&&!this.isOptionDisabled(t.option)){var o=this.isSelected(t.option);if(!o||this.props.unselectable){var r,i=this.getOptionValue(t.option);if(this.props.multiple){var l=this.props.value?c(this.props.value):[];r=o?l.filter((function(t){return!e.ObjectUtils.equals(t,i,n.props.dataKey)})):[].concat(c(l),[i])}else r=o?null:i;this.props.onChange&&this.props.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}}}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?e.ObjectUtils.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?e.ObjectUtils.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?e.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):e.ObjectUtils.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"isSelected",value:function(t){var n=!1,o=this.getOptionValue(t);if(this.props.multiple){if(this.props.value&&this.props.value.length){var r,i=S(this.props.value);try{for(i.s();!(r=i.n()).done;){if(e.ObjectUtils.equals(r.value,o,this.props.dataKey)){n=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else n=e.ObjectUtils.equals(this.props.value,o,this.props.dataKey);return n}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(C({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=o.tip({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderItems",value:function(){var t=this;return this.props.options&&this.props.options.length?this.props.options.map((function(e,n){var o=t.props.disabled||t.isOptionDisabled(e),r=t.getOptionLabel(e),l=o?null:0;return i.default.createElement(w,{key:"".concat(r,"_").concat(n),label:r,className:e.className,option:e,onClick:t.onOptionClick,template:t.props.itemTemplate,selected:t.isSelected(e),tabIndex:l,disabled:o,ariaLabelledBy:t.props.ariaLabelledBy})})):null}},{key:"render",value:function(){var t=this,n=e.classNames("p-selectbutton p-buttonset p-component",this.props.className),o=this.renderItems();return i.default.createElement("div",{id:this.props.id,ref:function(e){return t.element=e},className:n,style:this.props.style,role:"group"},o)}}]),a}();j(A,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,itemTemplate:null,onChange:null}),exports.SelectButton=A;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { classNames,
|
|
2
|
+
import { classNames, ObjectUtils } from 'primereact/utils';
|
|
3
|
+
import { Ripple } from 'primereact/ripple';
|
|
4
|
+
import { tip } from 'primereact/tooltip';
|
|
3
5
|
|
|
4
6
|
function _arrayLikeToArray$1(arr, len) {
|
|
5
7
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -109,6 +111,8 @@ function _typeof(obj) {
|
|
|
109
111
|
function _possibleConstructorReturn(self, call) {
|
|
110
112
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
111
113
|
return call;
|
|
114
|
+
} else if (call !== void 0) {
|
|
115
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
return _assertThisInitialized(self);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{Component as e}from"react";import{classNames as n,
|
|
1
|
+
import t,{Component as e}from"react";import{classNames as n,ObjectUtils as o}from"primereact/utils";import{Ripple as r}from"primereact/ripple";import{tip as i}from"primereact/tooltip";function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function s(t){if(Array.isArray(t))return l(t)}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return s(t)||a(t)||p(t)||u()}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function O(t,e){if(e&&("object"===m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var j=function(o){v(a,e);var i,l,s=(i=a,l=w(),function(){var t,e=g(i);if(l){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function a(t){var e;return f(this,a),(e=s.call(this,t)).state={focused:!1},e.onClick=e.onClick.bind(d(e)),e.onFocus=e.onFocus.bind(d(e)),e.onBlur=e.onBlur.bind(d(e)),e.onKeyDown=e.onKeyDown.bind(d(e)),e}return y(a,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"onKeyDown",value:function(t){var e=t.which;32!==e&&13!==e||(this.onClick(t),t.preventDefault())}},{key:"renderContent",value:function(){return this.props.template?this.props.template(this.props.option):t.createElement("span",{className:"p-button-label p-c"},this.props.label)}},{key:"render",value:function(){var e=n("p-button p-component",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled,"p-focus":this.state.focused},this.props.className),o=this.renderContent();return t.createElement("div",{className:e,role:"button","aria-label":this.props.label,"aria-pressed":this.props.selected,"aria-labelledby":this.props.ariaLabelledBy,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,onFocus:this.onFocus,onBlur:this.onBlur},o,!this.props.disabled&&t.createElement(r,null))}}]),a}();function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function P(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function B(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}k(j,"defaultProps",{option:null,label:null,className:null,selected:null,tabIndex:null,ariaLabelledBy:null,template:null,onClick:null});var A=function(r){v(p,e);var l,s,a=(l=p,s=B(),function(){var t,e=g(l);if(s){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return O(this,t)});function p(t){var e;return f(this,p),(e=a.call(this,t)).onOptionClick=e.onOptionClick.bind(d(e)),e}return y(p,[{key:"onOptionClick",value:function(t){var e=this;if(!this.props.disabled&&!this.isOptionDisabled(t.option)){var n=this.isSelected(t.option);if(!n||this.props.unselectable){var r,i=this.getOptionValue(t.option);if(this.props.multiple){var l=this.props.value?c(this.props.value):[];r=n?l.filter((function(t){return!o.equals(t,i,e.props.dataKey)})):[].concat(c(l),[i])}else r=n?null:i;this.props.onChange&&this.props.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}}}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?o.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?o.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?o.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):o.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"isSelected",value:function(t){var e=!1,n=this.getOptionValue(t);if(this.props.multiple){if(this.props.value&&this.props.value.length){var r,i=C(this.props.value);try{for(i.s();!(r=i.n()).done;){if(o.equals(r.value,n,this.props.dataKey)){e=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else e=o.equals(this.props.value,n,this.props.dataKey);return e}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(S({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=i({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderItems",value:function(){var e=this;return this.props.options&&this.props.options.length?this.props.options.map((function(n,o){var r=e.props.disabled||e.isOptionDisabled(n),i=e.getOptionLabel(n),l=r?null:0;return t.createElement(j,{key:"".concat(i,"_").concat(o),label:i,className:n.className,option:n,onClick:e.onOptionClick,template:e.props.itemTemplate,selected:e.isSelected(n),tabIndex:l,disabled:r,ariaLabelledBy:e.props.ariaLabelledBy})})):null}},{key:"render",value:function(){var e=this,o=n("p-selectbutton p-buttonset p-component",this.props.className),r=this.renderItems();return t.createElement("div",{id:this.props.id,ref:function(t){return e.element=t},className:o,style:this.props.style,role:"group"},r)}}]),p}();k(A,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,itemTemplate:null,onChange:null});export{A as SelectButton};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.selectbutton = (function (exports, React,
|
|
2
|
+
this.primereact.selectbutton = (function (exports, React, utils, ripple, tooltip) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -114,6 +114,8 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
114
114
|
function _possibleConstructorReturn(self, call) {
|
|
115
115
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
116
116
|
return call;
|
|
117
|
+
} else if (call !== void 0) {
|
|
118
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
return _assertThisInitialized(self);
|
|
@@ -206,7 +208,7 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
206
208
|
if (this.props.template) {
|
|
207
209
|
return this.props.template(this.props.option);
|
|
208
210
|
} else {
|
|
209
|
-
return /*#__PURE__*/React__default[
|
|
211
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
210
212
|
className: "p-button-label p-c"
|
|
211
213
|
}, this.props.label);
|
|
212
214
|
}
|
|
@@ -214,13 +216,13 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
214
216
|
}, {
|
|
215
217
|
key: "render",
|
|
216
218
|
value: function render() {
|
|
217
|
-
var className =
|
|
219
|
+
var className = utils.classNames('p-button p-component', {
|
|
218
220
|
'p-highlight': this.props.selected,
|
|
219
221
|
'p-disabled': this.props.disabled,
|
|
220
222
|
'p-focus': this.state.focused
|
|
221
223
|
}, this.props.className);
|
|
222
224
|
var content = this.renderContent();
|
|
223
|
-
return /*#__PURE__*/React__default[
|
|
225
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
224
226
|
className: className,
|
|
225
227
|
role: "button",
|
|
226
228
|
"aria-label": this.props.label,
|
|
@@ -231,7 +233,7 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
231
233
|
tabIndex: this.props.tabIndex,
|
|
232
234
|
onFocus: this.onFocus,
|
|
233
235
|
onBlur: this.onBlur
|
|
234
|
-
}, content, !this.props.disabled && /*#__PURE__*/React__default[
|
|
236
|
+
}, content, !this.props.disabled && /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
235
237
|
}
|
|
236
238
|
}]);
|
|
237
239
|
|
|
@@ -298,7 +300,7 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
298
300
|
if (this.props.multiple) {
|
|
299
301
|
var currentValue = this.props.value ? _toConsumableArray(this.props.value) : [];
|
|
300
302
|
if (selected) newValue = currentValue.filter(function (val) {
|
|
301
|
-
return !
|
|
303
|
+
return !utils.ObjectUtils.equals(val, optionValue, _this2.props.dataKey);
|
|
302
304
|
});else newValue = [].concat(_toConsumableArray(currentValue), [optionValue]);
|
|
303
305
|
} else {
|
|
304
306
|
if (selected) newValue = null;else newValue = optionValue;
|
|
@@ -321,18 +323,18 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
321
323
|
}, {
|
|
322
324
|
key: "getOptionLabel",
|
|
323
325
|
value: function getOptionLabel(option) {
|
|
324
|
-
return this.props.optionLabel ?
|
|
326
|
+
return this.props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
|
|
325
327
|
}
|
|
326
328
|
}, {
|
|
327
329
|
key: "getOptionValue",
|
|
328
330
|
value: function getOptionValue(option) {
|
|
329
|
-
return this.props.optionValue ?
|
|
331
|
+
return this.props.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.props.optionValue) : option && option['value'] !== undefined ? option['value'] : option;
|
|
330
332
|
}
|
|
331
333
|
}, {
|
|
332
334
|
key: "isOptionDisabled",
|
|
333
335
|
value: function isOptionDisabled(option) {
|
|
334
336
|
if (this.props.optionDisabled) {
|
|
335
|
-
return
|
|
337
|
+
return utils.ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : utils.ObjectUtils.resolveFieldData(option, this.props.optionDisabled);
|
|
336
338
|
}
|
|
337
339
|
|
|
338
340
|
return option && option['disabled'] !== undefined ? option['disabled'] : false;
|
|
@@ -352,7 +354,7 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
352
354
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
353
355
|
var val = _step.value;
|
|
354
356
|
|
|
355
|
-
if (
|
|
357
|
+
if (utils.ObjectUtils.equals(val, optionValue, this.props.dataKey)) {
|
|
356
358
|
selected = true;
|
|
357
359
|
break;
|
|
358
360
|
}
|
|
@@ -364,7 +366,7 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
364
366
|
}
|
|
365
367
|
}
|
|
366
368
|
} else {
|
|
367
|
-
selected =
|
|
369
|
+
selected = utils.ObjectUtils.equals(this.props.value, optionValue, this.props.dataKey);
|
|
368
370
|
}
|
|
369
371
|
|
|
370
372
|
return selected;
|
|
@@ -396,7 +398,7 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
396
398
|
}, {
|
|
397
399
|
key: "renderTooltip",
|
|
398
400
|
value: function renderTooltip() {
|
|
399
|
-
this.tooltip =
|
|
401
|
+
this.tooltip = tooltip.tip({
|
|
400
402
|
target: this.element,
|
|
401
403
|
content: this.props.tooltip,
|
|
402
404
|
options: this.props.tooltipOptions
|
|
@@ -414,7 +416,7 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
414
416
|
var optionLabel = _this3.getOptionLabel(option);
|
|
415
417
|
|
|
416
418
|
var tabIndex = isDisabled ? null : 0;
|
|
417
|
-
return /*#__PURE__*/React__default[
|
|
419
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectButtonItem, {
|
|
418
420
|
key: "".concat(optionLabel, "_").concat(index),
|
|
419
421
|
label: optionLabel,
|
|
420
422
|
className: option.className,
|
|
@@ -436,9 +438,9 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
436
438
|
value: function render() {
|
|
437
439
|
var _this4 = this;
|
|
438
440
|
|
|
439
|
-
var className =
|
|
441
|
+
var className = utils.classNames('p-selectbutton p-buttonset p-component', this.props.className);
|
|
440
442
|
var items = this.renderItems();
|
|
441
|
-
return /*#__PURE__*/React__default[
|
|
443
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
442
444
|
id: this.props.id,
|
|
443
445
|
ref: function ref(el) {
|
|
444
446
|
return _this4.element = el;
|
|
@@ -480,4 +482,4 @@ this.primereact.selectbutton = (function (exports, React, core) {
|
|
|
480
482
|
|
|
481
483
|
return exports;
|
|
482
484
|
|
|
483
|
-
}({}, React, primereact.
|
|
485
|
+
})({}, React, primereact.utils, primereact.ripple, primereact.tooltip);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.selectbutton=function(t,e,n){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.selectbutton=function(t,e,n,o,r){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=i(e);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function a(t){if(Array.isArray(t))return s(t)}function u(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t){return a(t)||u(t)||p(t)||c()}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),t}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function g(t,e){if(e&&("object"===O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var D=function(t){m(s,t);var e,r,i=(e=s,r=w(),function(){var t,n=j(e);if(r){var o=j(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return g(this,t)});function s(t){var e;return h(this,s),(e=i.call(this,t)).state={focused:!1},e.onClick=e.onClick.bind(y(e)),e.onFocus=e.onFocus.bind(y(e)),e.onBlur=e.onBlur.bind(y(e)),e.onKeyDown=e.onKeyDown.bind(y(e)),e}return b(s,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"onKeyDown",value:function(t){var e=t.which;32!==e&&13!==e||(this.onClick(t),t.preventDefault())}},{key:"renderContent",value:function(){return this.props.template?this.props.template(this.props.option):l.default.createElement("span",{className:"p-button-label p-c"},this.props.label)}},{key:"render",value:function(){var t=n.classNames("p-button p-component",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled,"p-focus":this.state.focused},this.props.className),e=this.renderContent();return l.default.createElement("div",{className:t,role:"button","aria-label":this.props.label,"aria-pressed":this.props.selected,"aria-labelledby":this.props.ariaLabelledBy,onClick:this.onClick,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,onFocus:this.onFocus,onBlur:this.onBlur},e,!this.props.disabled&&l.default.createElement(o.Ripple,null))}}]),s}(e.Component);function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function P(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=E(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function E(t,e){if(t){if("string"==typeof t)return B(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function A(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}k(D,"defaultProps",{option:null,label:null,className:null,selected:null,tabIndex:null,ariaLabelledBy:null,template:null,onClick:null});var I=function(t){m(s,t);var e,o,i=(e=s,o=A(),function(){var t,n=j(e);if(o){var r=j(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return g(this,t)});function s(t){var e;return h(this,s),(e=i.call(this,t)).onOptionClick=e.onOptionClick.bind(y(e)),e}return b(s,[{key:"onOptionClick",value:function(t){var e=this;if(!this.props.disabled&&!this.isOptionDisabled(t.option)){var o=this.isSelected(t.option);if(!o||this.props.unselectable){var r,i=this.getOptionValue(t.option);if(this.props.multiple){var l=this.props.value?f(this.props.value):[];r=o?l.filter((function(t){return!n.ObjectUtils.equals(t,i,e.props.dataKey)})):[].concat(f(l),[i])}else r=o?null:i;this.props.onChange&&this.props.onChange({originalEvent:t.originalEvent,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}}}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?n.ObjectUtils.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?n.ObjectUtils.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?n.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):n.ObjectUtils.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"isSelected",value:function(t){var e=!1,o=this.getOptionValue(t);if(this.props.multiple){if(this.props.value&&this.props.value.length){var r,i=P(this.props.value);try{for(i.s();!(r=i.n()).done;){if(n.ObjectUtils.equals(r.value,o,this.props.dataKey)){e=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else e=n.ObjectUtils.equals(this.props.value,o,this.props.dataKey);return e}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(S({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=r.tip({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderItems",value:function(){var t=this;return this.props.options&&this.props.options.length?this.props.options.map((function(e,n){var o=t.props.disabled||t.isOptionDisabled(e),r=t.getOptionLabel(e),i=o?null:0;return l.default.createElement(D,{key:"".concat(r,"_").concat(n),label:r,className:e.className,option:e,onClick:t.onOptionClick,template:t.props.itemTemplate,selected:t.isSelected(e),tabIndex:i,disabled:o,ariaLabelledBy:t.props.ariaLabelledBy})})):null}},{key:"render",value:function(){var t=this,e=n.classNames("p-selectbutton p-buttonset p-component",this.props.className),o=this.renderItems();return l.default.createElement("div",{id:this.props.id,ref:function(e){return t.element=e},className:e,style:this.props.style,role:"group"},o)}}]),s}(e.Component);return k(I,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,tabIndex:null,multiple:!1,unselectable:!0,disabled:!1,style:null,className:null,dataKey:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,itemTemplate:null,onChange:null}),t.SelectButton=I,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.utils,primereact.ripple,primereact.tooltip);
|