primereact 7.0.0-rc.2 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +35 -10
- package/accordion/accordion.cjs.js +55 -42
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +7 -3
- package/accordion/accordion.esm.js +42 -29
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +55 -43
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +109 -52
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +96 -61
- package/api/api.esm.js +96 -39
- package/api/api.esm.min.js +1 -1
- package/api/api.js +110 -53
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +97 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +11 -4
- package/autocomplete/autocomplete.esm.js +34 -26
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +93 -90
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +21 -20
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +16 -15
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +22 -21
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +14 -14
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +12 -12
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +15 -15
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +14 -14
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +12 -12
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +15 -15
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +38 -27
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +28 -18
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +37 -28
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +27 -27
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -12
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +28 -28
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -55
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -44
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -56
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +209 -170
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +7 -2
- package/calendar/calendar.esm.js +84 -45
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +205 -171
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +12 -12
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +11 -11
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +13 -13
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +24 -24
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +12 -12
- package/card/card.esm.min.js +1 -1
- package/card/card.js +25 -25
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +60 -58
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +24 -23
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +59 -59
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +65 -61
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +21 -17
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +62 -62
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +19 -21
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +14 -14
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +18 -18
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +33 -28
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +26 -21
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +33 -29
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +27 -25
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +22 -20
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +28 -26
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +59 -33
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +50 -24
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +59 -34
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +50 -46
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +20 -6
- package/colorpicker/colorpicker.esm.js +22 -18
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +47 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +31 -12
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +28 -2
- package/column/column.esm.js +31 -12
- package/column/column.esm.min.js +1 -1
- package/column/column.js +32 -13
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +28 -12
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +28 -12
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +29 -13
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +35 -33
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +19 -17
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -34
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +60 -55
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +6 -4
- package/confirmpopup/confirmpopup.esm.js +26 -22
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +57 -55
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +81 -76
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +48 -44
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +78 -77
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11284 -852
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +62 -32
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +61 -32
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +62 -34
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +23 -22
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +15 -14
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +23 -23
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +838 -632
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +38 -14
- package/datatable/datatable.esm.js +575 -369
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +835 -633
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +43 -40
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +17 -14
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +42 -41
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +12 -12
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +11 -11
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +13 -13
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +78 -73
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +3 -1
- package/dialog/dialog.esm.js +31 -27
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +75 -74
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +15 -15
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +12 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +16 -16
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +62 -28
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +50 -16
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +62 -29
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +120 -98
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +58 -36
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +116 -99
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +58 -56
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +22 -18
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +57 -53
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +31 -29
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +17 -15
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +30 -30
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +79 -69
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -1
- package/fileupload/fileupload.esm.js +40 -30
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +79 -70
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +17 -19
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +12 -12
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +16 -16
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +85 -81
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +21 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +82 -82
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +13 -13
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +12 -12
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +14 -14
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +69 -44
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +6 -5
- package/image/image.esm.js +44 -20
- package/image/image.esm.min.js +1 -1
- package/image/image.js +67 -45
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +19 -19
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +12 -12
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +20 -20
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -23
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +17 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -24
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +90 -63
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +73 -46
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +89 -64
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +28 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +21 -18
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +28 -26
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -23
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +16 -14
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +24 -24
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +23 -22
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +15 -14
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +23 -23
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +9 -6
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +5 -2
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +10 -7
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +18 -18
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +12 -12
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +19 -19
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +52 -50
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +17 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +51 -51
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +47 -46
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +13 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +47 -47
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +69 -62
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +25 -19
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +64 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +45 -40
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +4 -1
- package/menu/menu.esm.js +19 -15
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +42 -41
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -46
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -13
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -47
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +20 -19
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +14 -13
- package/message/message.esm.min.js +1 -1
- package/message/message.js +21 -20
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +30 -28
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +14 -12
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +29 -29
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -136
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -2
- package/multiselect/multiselect.esm.js +64 -52
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +144 -137
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +27 -26
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -14
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +27 -27
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +46 -45
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +13 -12
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +46 -46
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +37 -37
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +12 -12
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +38 -38
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +45 -42
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +3 -2
- package/overlaypanel/overlaypanel.esm.js +23 -21
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -43
- 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 +11 -4
- package/paginator/paginator.cjs.js +61 -60
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +15 -14
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +61 -61
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +35 -32
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +20 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +34 -33
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +53 -52
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +15 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +53 -53
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +47 -43
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +3 -2
- package/password/password.esm.js +21 -17
- package/password/password.esm.min.js +1 -1
- package/password/password.js +44 -44
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +69 -65
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +25 -21
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +69 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +17 -20
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -18
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +18 -22
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3793 -2921
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2567 -1694
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3792 -2918
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +20 -20
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +12 -12
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +21 -21
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +16 -16
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +12 -12
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +17 -17
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +23 -22
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +15 -14
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +23 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +23 -22
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +17 -16
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +23 -23
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +216 -140
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +94 -42
- package/resources/themes/arya-green/theme.css +94 -42
- package/resources/themes/arya-orange/theme.css +94 -42
- package/resources/themes/arya-purple/theme.css +94 -42
- package/resources/themes/bootstrap4-dark-blue/theme.css +75 -30
- package/resources/themes/bootstrap4-dark-purple/theme.css +75 -30
- package/resources/themes/bootstrap4-light-blue/theme.css +74 -29
- package/resources/themes/bootstrap4-light-purple/theme.css +74 -29
- package/resources/themes/fluent-light/theme.css +94 -42
- 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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -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 +5707 -0
- package/resources/themes/luna-amber/theme.css +91 -46
- package/resources/themes/luna-blue/theme.css +91 -46
- package/resources/themes/luna-green/theme.css +91 -46
- package/resources/themes/luna-pink/theme.css +91 -46
- package/resources/themes/md-dark-deeppurple/theme.css +265 -53
- package/resources/themes/md-dark-indigo/theme.css +265 -53
- package/resources/themes/md-light-deeppurple/theme.css +265 -53
- package/resources/themes/md-light-indigo/theme.css +265 -53
- package/resources/themes/mdc-dark-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-dark-indigo/theme.css +265 -53
- package/resources/themes/mdc-light-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-light-indigo/theme.css +265 -53
- package/resources/themes/nova/theme.css +91 -46
- package/resources/themes/nova-accent/theme.css +91 -46
- package/resources/themes/nova-alt/theme.css +91 -46
- package/resources/themes/rhea/theme.css +91 -46
- package/resources/themes/saga-blue/theme.css +77 -25
- package/resources/themes/saga-green/theme.css +77 -25
- package/resources/themes/saga-orange/theme.css +77 -25
- package/resources/themes/saga-purple/theme.css +77 -25
- package/resources/themes/tailwind-light/theme.css +101 -49
- package/resources/themes/vela-blue/theme.css +94 -42
- package/resources/themes/vela-green/theme.css +94 -42
- package/resources/themes/vela-orange/theme.css +94 -42
- package/resources/themes/vela-purple/theme.css +94 -42
- package/ripple/ripple.cjs.js +22 -22
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +14 -14
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +23 -23
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +12 -12
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +11 -11
- package/row/row.esm.min.js +1 -1
- package/row/row.js +13 -13
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +30 -30
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +12 -12
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +31 -31
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +30 -25
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +4 -2
- package/scrolltop/scrolltop.esm.js +21 -17
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +28 -26
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +31 -29
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +17 -15
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +30 -30
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +154 -127
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -1
- package/sidebar/sidebar.esm.js +145 -119
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +151 -128
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +14 -14
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +12 -12
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +15 -15
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +49 -44
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +19 -15
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +46 -45
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -30
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -22
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -31
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +33 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +15 -14
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +33 -33
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +58 -50
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +8 -6
- package/splitbutton/splitbutton.esm.js +28 -20
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +55 -51
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +31 -31
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +14 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +32 -32
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +21 -21
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +12 -12
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +22 -22
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +28 -28
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +12 -12
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +29 -29
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +27 -26
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +13 -12
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -27
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +224 -79
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +12 -1
- package/tabview/tabview.esm.js +194 -49
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +224 -80
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +20 -19
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +16 -15
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +21 -20
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +23 -23
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +12 -12
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -24
- 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 +54 -48
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +20 -15
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +50 -49
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +23 -23
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +12 -12
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +24 -24
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +72 -55
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +5 -1
- package/toast/toast.esm.js +46 -30
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +69 -56
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +27 -22
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +21 -16
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +26 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +18 -18
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +12 -12
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +19 -19
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +78 -49
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +49 -21
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +77 -50
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.cjs.js +69 -68
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +14 -3
- package/tree/tree.esm.js +19 -18
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +69 -69
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +4 -1
- package/treeselect/treeselect.cjs.js +66 -62
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +11 -3
- package/treeselect/treeselect.esm.js +26 -22
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +63 -63
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1393 -330
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +11 -3
- package/treetable/treetable.esm.js +1303 -240
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1392 -331
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -23
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +15 -14
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +174 -51
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +18 -0
- package/utils/utils.esm.js +173 -51
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +175 -52
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +79 -53
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +64 -38
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +80 -54
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +45 -8
- package/core/core.cjs.js +0 -2987
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -2963
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
- package/util.d.ts +0 -1
package/slider/slider.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { DomHandler, classNames } from 'primereact/
|
|
2
|
+
import { DomHandler, classNames } from 'primereact/utils';
|
|
3
3
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) {
|
|
5
5
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -55,6 +55,9 @@ function _defineProperties(target, props) {
|
|
|
55
55
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
56
56
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
57
57
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
58
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
59
|
+
writable: false
|
|
60
|
+
});
|
|
58
61
|
return Constructor;
|
|
59
62
|
}
|
|
60
63
|
|
|
@@ -87,23 +90,20 @@ function _inherits(subClass, superClass) {
|
|
|
87
90
|
configurable: true
|
|
88
91
|
}
|
|
89
92
|
});
|
|
93
|
+
Object.defineProperty(subClass, "prototype", {
|
|
94
|
+
writable: false
|
|
95
|
+
});
|
|
90
96
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
function _typeof(obj) {
|
|
94
100
|
"@babel/helpers - typeof";
|
|
95
101
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
_typeof = function _typeof(obj) {
|
|
102
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return _typeof(obj);
|
|
102
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
103
|
+
return typeof obj;
|
|
104
|
+
} : function (obj) {
|
|
105
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
106
|
+
}, _typeof(obj);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -220,7 +220,14 @@ var Slider = /*#__PURE__*/function (_Component) {
|
|
|
220
220
|
|
|
221
221
|
if (!this.sliderHandleClick) {
|
|
222
222
|
this.updateDomData();
|
|
223
|
-
this.setValue(event);
|
|
223
|
+
var value = this.setValue(event);
|
|
224
|
+
|
|
225
|
+
if (this.props.onSlideEnd) {
|
|
226
|
+
this.props.onSlideEnd({
|
|
227
|
+
originalEvent: event,
|
|
228
|
+
value: value
|
|
229
|
+
});
|
|
230
|
+
}
|
|
224
231
|
}
|
|
225
232
|
|
|
226
233
|
this.sliderHandleClick = false;
|
|
@@ -328,32 +335,33 @@ var Slider = /*#__PURE__*/function (_Component) {
|
|
|
328
335
|
newValue = Math.floor(newValue);
|
|
329
336
|
}
|
|
330
337
|
|
|
331
|
-
this.updateValue(event, newValue);
|
|
338
|
+
return this.updateValue(event, newValue);
|
|
332
339
|
}
|
|
333
340
|
}, {
|
|
334
341
|
key: "updateValue",
|
|
335
342
|
value: function updateValue(event, value) {
|
|
336
|
-
var
|
|
343
|
+
var parsedValue = parseFloat(value.toFixed(10));
|
|
344
|
+
var newValue = parsedValue;
|
|
337
345
|
|
|
338
346
|
if (this.props.range) {
|
|
339
347
|
if (this.handleIndex === 0) {
|
|
340
|
-
if (
|
|
348
|
+
if (parsedValue < this.props.min) parsedValue = this.props.min;else if (parsedValue > this.value[1]) parsedValue = this.value[1];
|
|
341
349
|
} else {
|
|
342
|
-
if (
|
|
350
|
+
if (parsedValue > this.props.max) parsedValue = this.props.max;else if (parsedValue < this.value[0]) parsedValue = this.value[0];
|
|
343
351
|
}
|
|
344
352
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
newValues[this.handleIndex] = newValue;
|
|
353
|
+
newValue = _toConsumableArray(this.value);
|
|
354
|
+
newValue[this.handleIndex] = parsedValue;
|
|
348
355
|
|
|
349
356
|
if (this.props.onChange) {
|
|
350
357
|
this.props.onChange({
|
|
351
358
|
originalEvent: event,
|
|
352
|
-
value:
|
|
359
|
+
value: newValue
|
|
353
360
|
});
|
|
354
361
|
}
|
|
355
362
|
} else {
|
|
356
|
-
if (
|
|
363
|
+
if (parsedValue < this.props.min) parsedValue = this.props.min;else if (parsedValue > this.props.max) parsedValue = this.props.max;
|
|
364
|
+
newValue = parsedValue;
|
|
357
365
|
|
|
358
366
|
if (this.props.onChange) {
|
|
359
367
|
this.props.onChange({
|
|
@@ -362,6 +370,8 @@ var Slider = /*#__PURE__*/function (_Component) {
|
|
|
362
370
|
});
|
|
363
371
|
}
|
|
364
372
|
}
|
|
373
|
+
|
|
374
|
+
return newValue;
|
|
365
375
|
}
|
|
366
376
|
}, {
|
|
367
377
|
key: "componentWillUnmount",
|
package/slider/slider.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{Component as t}from"react";import{DomHandler as n,classNames as r}from"primereact/
|
|
1
|
+
import e,{Component as t}from"react";import{DomHandler as n,classNames as r}from"primereact/utils";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){if(Array.isArray(e))return i(e)}function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function l(){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 u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(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 d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function c(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function f(e){return f="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},f(e)}function g(e,t){if(t&&("object"===f(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 v(){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 y,b,L,E=function(i){c(w,t);var d,f,y,b,L,E=(d=w,f=v(),function(){var e,t=m(d);if(f){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function w(e){var t;return u(this,w),(t=E.call(this,e)).onBarClick=t.onBarClick.bind(p(t)),t.onKeyDown=t.onKeyDown.bind(p(t)),t.handleIndex=0,t}return y=w,(b=[{key:"value",get:function(){return this.props.range?this.props.value||[0,100]:this.props.value||0}},{key:"spin",value:function(e,t){this.updateValue(e,(this.props.range?this.value[this.handleIndex]:this.value)+(this.props.step||1)*t),e.preventDefault()}},{key:"onDragStart",value:function(e,t){this.props.disabled||(this.dragging=!0,this.updateDomData(),this.sliderHandleClick=!0,this.handleIndex=t)}},{key:"onMouseDown",value:function(e,t){this.bindDragListeners(),this.onDragStart(e,t)}},{key:"onTouchStart",value:function(e,t){this.bindTouchListeners(),this.onDragStart(e,t)}},{key:"onKeyDown",value:function(e,t){if(!this.props.disabled){this.handleIndex=t;var n=e.key;"ArrowRight"===n||"ArrowUp"===n?this.spin(e,1):"ArrowLeft"!==n&&"ArrowDown"!==n||this.spin(e,-1)}}},{key:"onBarClick",value:function(e){if(!this.props.disabled){if(!this.sliderHandleClick){this.updateDomData();var t=this.setValue(e);this.props.onSlideEnd&&this.props.onSlideEnd({originalEvent:e,value:t})}this.sliderHandleClick=!1}}},{key:"onDrag",value:function(e){this.dragging&&(this.setValue(e),e.preventDefault())}},{key:"onDragEnd",value:function(e){this.dragging&&(this.dragging=!1,this.props.onSlideEnd&&this.props.onSlideEnd({originalEvent:e,value:this.props.value}),this.unbindDragListeners(),this.unbindTouchListeners())}},{key:"bindDragListeners",value:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))}},{key:"unbindDragListeners",value:function(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)}},{key:"bindTouchListeners",value:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("touchmove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("touchend",this.dragEndListener))}},{key:"unbindTouchListeners",value:function(){this.dragListener&&(document.removeEventListener("touchmove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("touchend",this.dragEndListener),this.dragEndListener=null)}},{key:"updateDomData",value:function(){var e=this.el.getBoundingClientRect();this.initX=e.left+n.getWindowScrollLeft(),this.initY=e.top+n.getWindowScrollTop(),this.barWidth=this.el.offsetWidth,this.barHeight=this.el.offsetHeight}},{key:"setValue",value:function(e){var t=("horizontal"===this.props.orientation?100*((e.touches?e.touches[0].pageX:e.pageX)-this.initX)/this.barWidth:100*(this.initY+this.barHeight-(e.touches?e.touches[0].pageY:e.pageY))/this.barHeight)/100*(this.props.max-this.props.min)+this.props.min;if(this.props.step){var n=this.props.range?this.value[this.handleIndex]:this.value,r=t-n;r<0?t=n+Math.ceil(t/this.props.step-n/this.props.step)*this.props.step:r>0&&(t=n+Math.floor(t/this.props.step-n/this.props.step)*this.props.step)}else t=Math.floor(t);return this.updateValue(e,t)}},{key:"updateValue",value:function(e,t){var n,r=parseFloat(t.toFixed(10)),i=r;return this.props.range?(0===this.handleIndex?r<this.props.min?r=this.props.min:r>this.value[1]&&(r=this.value[1]):r>this.props.max?r=this.props.max:r<this.value[0]&&(r=this.value[0]),(i=s(n=this.value)||o(n)||a(n)||l())[this.handleIndex]=r,this.props.onChange&&this.props.onChange({originalEvent:e,value:i})):(r<this.props.min?r=this.props.min:r>this.props.max&&(r=this.props.max),i=r,this.props.onChange&&this.props.onChange({originalEvent:e,value:i})),i}},{key:"componentWillUnmount",value:function(){this.unbindDragListeners(),this.unbindTouchListeners()}},{key:"renderHandle",value:function(t,n,i){var s=this,o=r("p-slider-handle",{"p-slider-handle-start":0===i,"p-slider-handle-end":1===i,"p-slider-handle-active":this.handleIndex===i});return e.createElement("span",{onMouseDown:function(e){return s.onMouseDown(e,i)},onTouchStart:function(e){return s.onTouchStart(e,i)},onKeyDown:function(e){return s.onKeyDown(e,i)},tabIndex:this.props.tabIndex,className:o,style:{transition:this.dragging?"none":null,left:null!==t&&t+"%",bottom:n&&n+"%"},role:"slider","aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":t||n,"aria-labelledby":this.props.ariaLabelledBy})}},{key:"renderRangeSlider",value:function(){var t=this.value,n="horizontal"===this.props.orientation,r=100*(t[0]<this.props.min?0:t[0]-this.props.min)/(this.props.max-this.props.min),i=100*(t[1]>this.props.max?100:t[1]-this.props.min)/(this.props.max-this.props.min),s=n?this.renderHandle(r,null,0):this.renderHandle(null,r,0),o=n?this.renderHandle(i,null,1):this.renderHandle(null,i,1);return e.createElement(e.Fragment,null,e.createElement("span",{className:"p-slider-range",style:n?{left:r+"%",width:i-r+"%"}:{bottom:r+"%",height:i-r+"%"}}),s,o)}},{key:"renderSingleSlider",value:function(){var t,n=this.value;t=n<this.props.min?0:n>this.props.max?100:100*(n-this.props.min)/(this.props.max-this.props.min);var r="horizontal"===this.props.orientation?{width:t+"%"}:{height:t+"%"},i="horizontal"===this.props.orientation?this.renderHandle(t,null,null):this.renderHandle(null,t,null);return e.createElement(e.Fragment,null,e.createElement("span",{className:"p-slider-range",style:r}),i)}},{key:"render",value:function(){var t=this,n=r("p-slider p-component",this.props.className,{"p-disabled":this.props.disabled,"p-slider-horizontal":"horizontal"===this.props.orientation,"p-slider-vertical":"vertical"===this.props.orientation}),i=this.props.range?this.renderRangeSlider():this.renderSingleSlider();return e.createElement("div",{id:this.props.id,ref:function(e){return t.el=e},style:this.props.style,className:n,onClick:this.onBarClick},i)}}])&&h(y.prototype,b),L&&h(y,L),Object.defineProperty(y,"prototype",{writable:!1}),w}();L={id:null,value:null,min:0,max:100,orientation:"horizontal",step:null,range:!1,style:null,className:null,disabled:!1,tabIndex:0,ariaLabelledBy:null,onChange:null,onSlideEnd:null},(b="defaultProps")in(y=E)?Object.defineProperty(y,b,{value:L,enumerable:!0,configurable:!0,writable:!0}):y[b]=L;export{E as Slider};
|
package/slider/slider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.slider = (function (exports, React,
|
|
2
|
+
this.primereact.slider = (function (exports, React, utils) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -60,6 +60,9 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
60
60
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
61
61
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
62
62
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
63
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
64
|
+
writable: false
|
|
65
|
+
});
|
|
63
66
|
return Constructor;
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -92,23 +95,20 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
92
95
|
configurable: true
|
|
93
96
|
}
|
|
94
97
|
});
|
|
98
|
+
Object.defineProperty(subClass, "prototype", {
|
|
99
|
+
writable: false
|
|
100
|
+
});
|
|
95
101
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
function _typeof(obj) {
|
|
99
105
|
"@babel/helpers - typeof";
|
|
100
106
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
_typeof = function _typeof(obj) {
|
|
107
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return _typeof(obj);
|
|
107
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
108
|
+
return typeof obj;
|
|
109
|
+
} : function (obj) {
|
|
110
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
111
|
+
}, _typeof(obj);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -225,7 +225,14 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
225
225
|
|
|
226
226
|
if (!this.sliderHandleClick) {
|
|
227
227
|
this.updateDomData();
|
|
228
|
-
this.setValue(event);
|
|
228
|
+
var value = this.setValue(event);
|
|
229
|
+
|
|
230
|
+
if (this.props.onSlideEnd) {
|
|
231
|
+
this.props.onSlideEnd({
|
|
232
|
+
originalEvent: event,
|
|
233
|
+
value: value
|
|
234
|
+
});
|
|
235
|
+
}
|
|
229
236
|
}
|
|
230
237
|
|
|
231
238
|
this.sliderHandleClick = false;
|
|
@@ -311,8 +318,8 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
311
318
|
key: "updateDomData",
|
|
312
319
|
value: function updateDomData() {
|
|
313
320
|
var rect = this.el.getBoundingClientRect();
|
|
314
|
-
this.initX = rect.left +
|
|
315
|
-
this.initY = rect.top +
|
|
321
|
+
this.initX = rect.left + utils.DomHandler.getWindowScrollLeft();
|
|
322
|
+
this.initY = rect.top + utils.DomHandler.getWindowScrollTop();
|
|
316
323
|
this.barWidth = this.el.offsetWidth;
|
|
317
324
|
this.barHeight = this.el.offsetHeight;
|
|
318
325
|
}
|
|
@@ -333,32 +340,33 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
333
340
|
newValue = Math.floor(newValue);
|
|
334
341
|
}
|
|
335
342
|
|
|
336
|
-
this.updateValue(event, newValue);
|
|
343
|
+
return this.updateValue(event, newValue);
|
|
337
344
|
}
|
|
338
345
|
}, {
|
|
339
346
|
key: "updateValue",
|
|
340
347
|
value: function updateValue(event, value) {
|
|
341
|
-
var
|
|
348
|
+
var parsedValue = parseFloat(value.toFixed(10));
|
|
349
|
+
var newValue = parsedValue;
|
|
342
350
|
|
|
343
351
|
if (this.props.range) {
|
|
344
352
|
if (this.handleIndex === 0) {
|
|
345
|
-
if (
|
|
353
|
+
if (parsedValue < this.props.min) parsedValue = this.props.min;else if (parsedValue > this.value[1]) parsedValue = this.value[1];
|
|
346
354
|
} else {
|
|
347
|
-
if (
|
|
355
|
+
if (parsedValue > this.props.max) parsedValue = this.props.max;else if (parsedValue < this.value[0]) parsedValue = this.value[0];
|
|
348
356
|
}
|
|
349
357
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
newValues[this.handleIndex] = newValue;
|
|
358
|
+
newValue = _toConsumableArray(this.value);
|
|
359
|
+
newValue[this.handleIndex] = parsedValue;
|
|
353
360
|
|
|
354
361
|
if (this.props.onChange) {
|
|
355
362
|
this.props.onChange({
|
|
356
363
|
originalEvent: event,
|
|
357
|
-
value:
|
|
364
|
+
value: newValue
|
|
358
365
|
});
|
|
359
366
|
}
|
|
360
367
|
} else {
|
|
361
|
-
if (
|
|
368
|
+
if (parsedValue < this.props.min) parsedValue = this.props.min;else if (parsedValue > this.props.max) parsedValue = this.props.max;
|
|
369
|
+
newValue = parsedValue;
|
|
362
370
|
|
|
363
371
|
if (this.props.onChange) {
|
|
364
372
|
this.props.onChange({
|
|
@@ -367,6 +375,8 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
367
375
|
});
|
|
368
376
|
}
|
|
369
377
|
}
|
|
378
|
+
|
|
379
|
+
return newValue;
|
|
370
380
|
}
|
|
371
381
|
}, {
|
|
372
382
|
key: "componentWillUnmount",
|
|
@@ -379,12 +389,12 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
379
389
|
value: function renderHandle(leftValue, bottomValue, index) {
|
|
380
390
|
var _this2 = this;
|
|
381
391
|
|
|
382
|
-
var handleClassName =
|
|
392
|
+
var handleClassName = utils.classNames('p-slider-handle', {
|
|
383
393
|
'p-slider-handle-start': index === 0,
|
|
384
394
|
'p-slider-handle-end': index === 1,
|
|
385
395
|
'p-slider-handle-active': this.handleIndex === index
|
|
386
396
|
});
|
|
387
|
-
return /*#__PURE__*/React__default[
|
|
397
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
388
398
|
onMouseDown: function onMouseDown(event) {
|
|
389
399
|
return _this2.onMouseDown(event, index);
|
|
390
400
|
},
|
|
@@ -424,7 +434,7 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
424
434
|
bottom: handleValueStart + '%',
|
|
425
435
|
height: handleValueEnd - handleValueStart + '%'
|
|
426
436
|
};
|
|
427
|
-
return /*#__PURE__*/React__default[
|
|
437
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
428
438
|
className: "p-slider-range",
|
|
429
439
|
style: rangeStyle
|
|
430
440
|
}), rangeStartHandle, rangeEndHandle);
|
|
@@ -441,7 +451,7 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
441
451
|
height: handleValue + '%'
|
|
442
452
|
};
|
|
443
453
|
var handle = this.props.orientation === 'horizontal' ? this.renderHandle(handleValue, null, null) : this.renderHandle(null, handleValue, null);
|
|
444
|
-
return /*#__PURE__*/React__default[
|
|
454
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
445
455
|
className: "p-slider-range",
|
|
446
456
|
style: rangeStyle
|
|
447
457
|
}), handle);
|
|
@@ -451,13 +461,13 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
451
461
|
value: function render() {
|
|
452
462
|
var _this3 = this;
|
|
453
463
|
|
|
454
|
-
var className =
|
|
464
|
+
var className = utils.classNames('p-slider p-component', this.props.className, {
|
|
455
465
|
'p-disabled': this.props.disabled,
|
|
456
466
|
'p-slider-horizontal': this.props.orientation === 'horizontal',
|
|
457
467
|
'p-slider-vertical': this.props.orientation === 'vertical'
|
|
458
468
|
});
|
|
459
469
|
var content = this.props.range ? this.renderRangeSlider() : this.renderSingleSlider();
|
|
460
|
-
return /*#__PURE__*/React__default[
|
|
470
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
461
471
|
id: this.props.id,
|
|
462
472
|
ref: function ref(el) {
|
|
463
473
|
return _this3.el = el;
|
|
@@ -495,4 +505,4 @@ this.primereact.slider = (function (exports, React, core) {
|
|
|
495
505
|
|
|
496
506
|
return exports;
|
|
497
507
|
|
|
498
|
-
}({}, React, primereact.
|
|
508
|
+
})({}, React, primereact.utils);
|
package/slider/slider.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.slider=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(t);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e){if(Array.isArray(e))return s(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):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 h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.slider=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(t);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e){if(Array.isArray(e))return s(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):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 h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function f(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function g(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(){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 b,L,E,w=function(e){f(L,e);var t,r,s,c,m,b=(t=L,r=y(),function(){var e,n=v(t);if(r){var i=v(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return g(this,e)});function L(e){var t;return h(this,L),(t=b.call(this,e)).onBarClick=t.onBarClick.bind(d(t)),t.onKeyDown=t.onKeyDown.bind(d(t)),t.handleIndex=0,t}return s=L,(c=[{key:"value",get:function(){return this.props.range?this.props.value||[0,100]:this.props.value||0}},{key:"spin",value:function(e,t){this.updateValue(e,(this.props.range?this.value[this.handleIndex]:this.value)+(this.props.step||1)*t),e.preventDefault()}},{key:"onDragStart",value:function(e,t){this.props.disabled||(this.dragging=!0,this.updateDomData(),this.sliderHandleClick=!0,this.handleIndex=t)}},{key:"onMouseDown",value:function(e,t){this.bindDragListeners(),this.onDragStart(e,t)}},{key:"onTouchStart",value:function(e,t){this.bindTouchListeners(),this.onDragStart(e,t)}},{key:"onKeyDown",value:function(e,t){if(!this.props.disabled){this.handleIndex=t;var n=e.key;"ArrowRight"===n||"ArrowUp"===n?this.spin(e,1):"ArrowLeft"!==n&&"ArrowDown"!==n||this.spin(e,-1)}}},{key:"onBarClick",value:function(e){if(!this.props.disabled){if(!this.sliderHandleClick){this.updateDomData();var t=this.setValue(e);this.props.onSlideEnd&&this.props.onSlideEnd({originalEvent:e,value:t})}this.sliderHandleClick=!1}}},{key:"onDrag",value:function(e){this.dragging&&(this.setValue(e),e.preventDefault())}},{key:"onDragEnd",value:function(e){this.dragging&&(this.dragging=!1,this.props.onSlideEnd&&this.props.onSlideEnd({originalEvent:e,value:this.props.value}),this.unbindDragListeners(),this.unbindTouchListeners())}},{key:"bindDragListeners",value:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))}},{key:"unbindDragListeners",value:function(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)}},{key:"bindTouchListeners",value:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("touchmove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("touchend",this.dragEndListener))}},{key:"unbindTouchListeners",value:function(){this.dragListener&&(document.removeEventListener("touchmove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("touchend",this.dragEndListener),this.dragEndListener=null)}},{key:"updateDomData",value:function(){var e=this.el.getBoundingClientRect();this.initX=e.left+n.DomHandler.getWindowScrollLeft(),this.initY=e.top+n.DomHandler.getWindowScrollTop(),this.barWidth=this.el.offsetWidth,this.barHeight=this.el.offsetHeight}},{key:"setValue",value:function(e){var t=("horizontal"===this.props.orientation?100*((e.touches?e.touches[0].pageX:e.pageX)-this.initX)/this.barWidth:100*(this.initY+this.barHeight-(e.touches?e.touches[0].pageY:e.pageY))/this.barHeight)/100*(this.props.max-this.props.min)+this.props.min;if(this.props.step){var n=this.props.range?this.value[this.handleIndex]:this.value,r=t-n;r<0?t=n+Math.ceil(t/this.props.step-n/this.props.step)*this.props.step:r>0&&(t=n+Math.floor(t/this.props.step-n/this.props.step)*this.props.step)}else t=Math.floor(t);return this.updateValue(e,t)}},{key:"updateValue",value:function(e,t){var n,r=parseFloat(t.toFixed(10)),i=r;return this.props.range?(0===this.handleIndex?r<this.props.min?r=this.props.min:r>this.value[1]&&(r=this.value[1]):r>this.props.max?r=this.props.max:r<this.value[0]&&(r=this.value[0]),(i=o(n=this.value)||a(n)||l(n)||u())[this.handleIndex]=r,this.props.onChange&&this.props.onChange({originalEvent:e,value:i})):(r<this.props.min?r=this.props.min:r>this.props.max&&(r=this.props.max),i=r,this.props.onChange&&this.props.onChange({originalEvent:e,value:i})),i}},{key:"componentWillUnmount",value:function(){this.unbindDragListeners(),this.unbindTouchListeners()}},{key:"renderHandle",value:function(e,t,r){var s=this,o=n.classNames("p-slider-handle",{"p-slider-handle-start":0===r,"p-slider-handle-end":1===r,"p-slider-handle-active":this.handleIndex===r});return i.default.createElement("span",{onMouseDown:function(e){return s.onMouseDown(e,r)},onTouchStart:function(e){return s.onTouchStart(e,r)},onKeyDown:function(e){return s.onKeyDown(e,r)},tabIndex:this.props.tabIndex,className:o,style:{transition:this.dragging?"none":null,left:null!==e&&e+"%",bottom:t&&t+"%"},role:"slider","aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":e||t,"aria-labelledby":this.props.ariaLabelledBy})}},{key:"renderRangeSlider",value:function(){var e=this.value,t="horizontal"===this.props.orientation,n=100*(e[0]<this.props.min?0:e[0]-this.props.min)/(this.props.max-this.props.min),r=100*(e[1]>this.props.max?100:e[1]-this.props.min)/(this.props.max-this.props.min),s=t?this.renderHandle(n,null,0):this.renderHandle(null,n,0),o=t?this.renderHandle(r,null,1):this.renderHandle(null,r,1);return i.default.createElement(i.default.Fragment,null,i.default.createElement("span",{className:"p-slider-range",style:t?{left:n+"%",width:r-n+"%"}:{bottom:n+"%",height:r-n+"%"}}),s,o)}},{key:"renderSingleSlider",value:function(){var e,t=this.value;e=t<this.props.min?0:t>this.props.max?100:100*(t-this.props.min)/(this.props.max-this.props.min);var n="horizontal"===this.props.orientation?{width:e+"%"}:{height:e+"%"},r="horizontal"===this.props.orientation?this.renderHandle(e,null,null):this.renderHandle(null,e,null);return i.default.createElement(i.default.Fragment,null,i.default.createElement("span",{className:"p-slider-range",style:n}),r)}},{key:"render",value:function(){var e=this,t=n.classNames("p-slider p-component",this.props.className,{"p-disabled":this.props.disabled,"p-slider-horizontal":"horizontal"===this.props.orientation,"p-slider-vertical":"vertical"===this.props.orientation}),r=this.props.range?this.renderRangeSlider():this.renderSingleSlider();return i.default.createElement("div",{id:this.props.id,ref:function(t){return e.el=t},style:this.props.style,className:t,onClick:this.onBarClick},r)}}])&&p(s.prototype,c),m&&p(s,m),Object.defineProperty(s,"prototype",{writable:!1}),L}(t.Component);return E={id:null,value:null,min:0,max:100,orientation:"horizontal",step:null,range:!1,style:null,className:null,disabled:!1,tabIndex:0,ariaLabelledBy:null,onChange:null,onSlideEnd:null},(L="defaultProps")in(b=w)?Object.defineProperty(b,L,{value:E,enumerable:!0,configurable:!0,writable:!0}):b[L]=E,e.Slider=w,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
|
|
@@ -4,7 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var button = require('primereact/button');
|
|
7
|
-
var
|
|
7
|
+
var ripple = require('primereact/ripple');
|
|
8
|
+
var utils = require('primereact/utils');
|
|
8
9
|
|
|
9
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
11
|
|
|
@@ -29,6 +30,9 @@ function _defineProperties(target, props) {
|
|
|
29
30
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
30
31
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
31
32
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
33
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
34
|
+
writable: false
|
|
35
|
+
});
|
|
32
36
|
return Constructor;
|
|
33
37
|
}
|
|
34
38
|
|
|
@@ -61,23 +65,20 @@ function _inherits(subClass, superClass) {
|
|
|
61
65
|
configurable: true
|
|
62
66
|
}
|
|
63
67
|
});
|
|
68
|
+
Object.defineProperty(subClass, "prototype", {
|
|
69
|
+
writable: false
|
|
70
|
+
});
|
|
64
71
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
function _typeof(obj) {
|
|
68
75
|
"@babel/helpers - typeof";
|
|
69
76
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
_typeof = function _typeof(obj) {
|
|
76
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return _typeof(obj);
|
|
77
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
78
|
+
return typeof obj;
|
|
79
|
+
} : function (obj) {
|
|
80
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
81
|
+
}, _typeof(obj);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -112,9 +113,9 @@ function _defineProperty(obj, key, value) {
|
|
|
112
113
|
return obj;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
116
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
116
117
|
|
|
117
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
118
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
118
119
|
|
|
119
120
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
120
121
|
|
|
@@ -319,8 +320,8 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
319
320
|
key: "componentDidMount",
|
|
320
321
|
value: function componentDidMount() {
|
|
321
322
|
if (this.props.type !== 'linear') {
|
|
322
|
-
var button =
|
|
323
|
-
var firstItem =
|
|
323
|
+
var button = utils.DomHandler.findSingle(this.container, '.p-speeddial-button');
|
|
324
|
+
var firstItem = utils.DomHandler.findSingle(this.list, '.p-speeddial-item');
|
|
324
325
|
|
|
325
326
|
if (button && firstItem) {
|
|
326
327
|
var wDiff = Math.abs(button.offsetWidth - firstItem.offsetWidth);
|
|
@@ -353,16 +354,16 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
353
354
|
template = item.template,
|
|
354
355
|
url = item.url,
|
|
355
356
|
target = item.target;
|
|
356
|
-
var contentClassName =
|
|
357
|
+
var contentClassName = utils.classNames('p-speeddial-action', {
|
|
357
358
|
'p-disabled': disabled
|
|
358
359
|
});
|
|
359
|
-
var iconClassName =
|
|
360
|
+
var iconClassName = utils.classNames('p-speeddial-action-icon', _icon);
|
|
360
361
|
|
|
361
|
-
var icon = _icon && /*#__PURE__*/React__default[
|
|
362
|
+
var icon = _icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
362
363
|
className: iconClassName
|
|
363
364
|
});
|
|
364
365
|
|
|
365
|
-
var content = /*#__PURE__*/React__default[
|
|
366
|
+
var content = /*#__PURE__*/React__default["default"].createElement("a", {
|
|
366
367
|
href: url || '#',
|
|
367
368
|
role: "menuitem",
|
|
368
369
|
className: contentClassName,
|
|
@@ -371,7 +372,7 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
371
372
|
onClick: function onClick(e) {
|
|
372
373
|
return _this3.onItemClick(e, item);
|
|
373
374
|
}
|
|
374
|
-
}, icon, /*#__PURE__*/React__default[
|
|
375
|
+
}, icon, /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
375
376
|
|
|
376
377
|
if (template) {
|
|
377
378
|
var defaultContentOptions = {
|
|
@@ -384,10 +385,10 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
384
385
|
props: this.props,
|
|
385
386
|
visible: this.isVisible()
|
|
386
387
|
};
|
|
387
|
-
content =
|
|
388
|
+
content = utils.ObjectUtils.getJSXElement(template, item, defaultContentOptions);
|
|
388
389
|
}
|
|
389
390
|
|
|
390
|
-
return /*#__PURE__*/React__default[
|
|
391
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
391
392
|
key: index,
|
|
392
393
|
className: "p-speeddial-item",
|
|
393
394
|
style: style,
|
|
@@ -413,7 +414,7 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
413
414
|
var _this5 = this;
|
|
414
415
|
|
|
415
416
|
var items = this.renderItems();
|
|
416
|
-
return /*#__PURE__*/React__default[
|
|
417
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
417
418
|
ref: function ref(el) {
|
|
418
419
|
return _this5.list = el;
|
|
419
420
|
},
|
|
@@ -428,11 +429,11 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
428
429
|
_this6 = this;
|
|
429
430
|
|
|
430
431
|
var visible = this.isVisible();
|
|
431
|
-
var className =
|
|
432
|
+
var className = utils.classNames('p-speeddial-button p-button-rounded', {
|
|
432
433
|
'p-speeddial-rotate': this.props.rotateAnimation && !this.props.hideIcon
|
|
433
434
|
}, this.props.buttonClassName);
|
|
434
|
-
var iconClassName =
|
|
435
|
-
var content = /*#__PURE__*/React__default[
|
|
435
|
+
var iconClassName = utils.classNames((_classNames = {}, _defineProperty(_classNames, "".concat(this.props.showIcon), !visible && !!this.props.showIcon || !this.props.hideIcon), _defineProperty(_classNames, "".concat(this.props.hideIcon), visible && !!this.props.hideIcon), _classNames));
|
|
436
|
+
var content = /*#__PURE__*/React__default["default"].createElement(button.Button, {
|
|
436
437
|
type: "button",
|
|
437
438
|
style: this.props.buttonStyle,
|
|
438
439
|
className: className,
|
|
@@ -452,7 +453,7 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
452
453
|
props: this.props,
|
|
453
454
|
visible: visible
|
|
454
455
|
};
|
|
455
|
-
return
|
|
456
|
+
return utils.ObjectUtils.getJSXElement(this.props.buttonTemplate, defaultContentOptions);
|
|
456
457
|
}
|
|
457
458
|
|
|
458
459
|
return content;
|
|
@@ -462,10 +463,10 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
462
463
|
value: function renderMask() {
|
|
463
464
|
if (this.props.mask) {
|
|
464
465
|
var visible = this.isVisible();
|
|
465
|
-
var className =
|
|
466
|
+
var className = utils.classNames('p-speeddial-mask', {
|
|
466
467
|
'p-speeddial-mask-visible': visible
|
|
467
468
|
}, this.props.maskClassName);
|
|
468
|
-
return /*#__PURE__*/React__default[
|
|
469
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
469
470
|
className: className,
|
|
470
471
|
style: this.props.maskStyle
|
|
471
472
|
});
|
|
@@ -479,11 +480,11 @@ var SpeedDial = /*#__PURE__*/function (_Component) {
|
|
|
479
480
|
var _classNames2,
|
|
480
481
|
_this7 = this;
|
|
481
482
|
|
|
482
|
-
var className =
|
|
483
|
+
var className = utils.classNames("p-speeddial p-component p-speeddial-".concat(this.props.type), (_classNames2 = {}, _defineProperty(_classNames2, "p-speeddial-direction-".concat(this.props.direction), this.props.type !== 'circle'), _defineProperty(_classNames2, 'p-speeddial-opened', this.isVisible()), _defineProperty(_classNames2, 'p-disabled', this.props.disabled), _classNames2), this.props.className);
|
|
483
484
|
var button = this.renderButton();
|
|
484
485
|
var list = this.renderList();
|
|
485
486
|
var mask = this.renderMask();
|
|
486
|
-
return /*#__PURE__*/React__default[
|
|
487
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
487
488
|
ref: function ref(el) {
|
|
488
489
|
return _this7.container = el;
|
|
489
490
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/button"),i=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/button"),i=require("primereact/ripple"),n=require("primereact/utils");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function p(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function u(e){return u="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},u(e)}function f(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function m(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?m(Object(i),!0).forEach((function(t){h(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return 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=function(r){p(O,e.Component);var c,u,m,v,k,C=(c=O,u=b(),function(){var e,t=d(c);if(u){var i=d(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return f(this,e)});function O(e){var t;return s(this,O),(t=C.call(this,e)).state={visible:!1},t.onClick=t.onClick.bind(a(t)),t.onItemClick=t.onItemClick.bind(a(t)),t}return m=O,v=[{key:"isVisible",value:function(){return this.props.onVisibleChange?this.props.visible:this.state.visible}},{key:"show",value:function(){this.props.onVisibleChange?this.props.onVisibleChange(!0):this.setState({visible:!0}),this.props.onShow&&this.props.onShow()}},{key:"hide",value:function(){this.props.onVisibleChange?this.props.onVisibleChange(!1):this.setState({visible:!1}),this.props.onHide&&this.props.onHide()}},{key:"onClick",value:function(e){this.isVisible()?this.hide():this.show(),this.props.onClick&&this.props.onClick(e),this.isItemClicked=!0}},{key:"onItemClick",value:function(e,t){t.command&&t.command({originalEvent:e,item:t}),this.hide(),this.isItemClicked=!0,e.preventDefault()}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.isVisible()&&e.isOutsideClicked(t)&&e.hide(),e.isItemClicked=!1},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"isOutsideClicked",value:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.isItemClicked)}},{key:"calculateTransitionDelay",value:function(e){var t=this.props.model.length;return(this.isVisible()?e:t-e-1)*this.props.transitionDelay}},{key:"calculatePointStyle",value:function(e){var t=this.props.type;if("linear"!==t){var i=this.props.model.length,n=this.props.radius||20*i;if("circle"===t){var r=2*Math.PI/i;return{left:"calc(".concat(n*Math.cos(r*e),"px + var(--item-diff-x, 0px))"),top:"calc(".concat(n*Math.sin(r*e),"px + var(--item-diff-y, 0px))")}}if("semi-circle"===t){var o=this.props.direction,s=Math.PI/(i-1),l="calc(".concat(n*Math.cos(s*e),"px + var(--item-diff-x, 0px))"),a="calc(".concat(n*Math.sin(s*e),"px + var(--item-diff-y, 0px))");if("up"===o)return{left:l,bottom:a};if("down"===o)return{left:l,top:a};if("left"===o)return{right:a,top:l};if("right"===o)return{left:a,top:l}}else if("quarter-circle"===t){var c=this.props.direction,p=Math.PI/(2*(i-1)),u="calc(".concat(n*Math.cos(p*e),"px + var(--item-diff-x, 0px))"),f="calc(".concat(n*Math.sin(p*e),"px + var(--item-diff-y, 0px))");if("up-left"===c)return{right:u,bottom:f};if("up-right"===c)return{left:u,bottom:f};if("down-left"===c)return{right:f,top:u};if("down-right"===c)return{left:f,top:u}}}return{}}},{key:"getItemStyle",value:function(e){var t=this.calculateTransitionDelay(e),i=this.calculatePointStyle(e);return y({transitionDelay:"".concat(t,"ms")},i)}},{key:"componentDidMount",value:function(){if("linear"!==this.props.type){var e=n.DomHandler.findSingle(this.container,".p-speeddial-button"),t=n.DomHandler.findSingle(this.list,".p-speeddial-item");if(e&&t){var i=Math.abs(e.offsetWidth-t.offsetWidth),r=Math.abs(e.offsetHeight-t.offsetHeight);this.list.style.setProperty("--item-diff-x","".concat(i/2,"px")),this.list.style.setProperty("--item-diff-y","".concat(r/2,"px"))}}this.props.hideOnClickOutside&&this.bindDocumentClickListener()}},{key:"componentWillUnmount",value:function(){this.props.hideOnClickOutside&&this.unbindDocumentClickListener()}},{key:"renderItem",value:function(e,t){var r=this,s=this.getItemStyle(t),l=e.icon,a=e.label,c=e.template,p=e.url,u=e.target,f=n.classNames("p-speeddial-action",{"p-disabled":e.disabled}),d=n.classNames("p-speeddial-action-icon",l),h=o.default.createElement("a",{href:p||"#",role:"menuitem",className:f,target:u,"data-pr-tooltip":a,onClick:function(t){return r.onItemClick(t,e)}},l&&o.default.createElement("span",{className:d}),o.default.createElement(i.Ripple,null));if(c){var m={onClick:function(t){return r.onItemClick(t,e)},className:f,iconClassName:d,element:h,props:this.props,visible:this.isVisible()};h=n.ObjectUtils.getJSXElement(c,e,m)}return o.default.createElement("li",{key:t,className:"p-speeddial-item",style:s,role:"none"},h)}},{key:"renderItems",value:function(){var e=this;return this.props.model?this.props.model.map((function(t,i){return e.renderItem(t,i)})):null}},{key:"renderList",value:function(){var e=this,t=this.renderItems();return o.default.createElement("ul",{ref:function(t){return e.list=t},className:"p-speeddial-list",role:"menu"},t)}},{key:"renderButton",value:function(){var e,i=this,r=this.isVisible(),s=n.classNames("p-speeddial-button p-button-rounded",{"p-speeddial-rotate":this.props.rotateAnimation&&!this.props.hideIcon},this.props.buttonClassName),l=n.classNames((h(e={},"".concat(this.props.showIcon),!r&&!!this.props.showIcon||!this.props.hideIcon),h(e,"".concat(this.props.hideIcon),r&&!!this.props.hideIcon),e)),a=o.default.createElement(t.Button,{type:"button",style:this.props.buttonStyle,className:s,icon:l,onClick:this.onClick,disabled:this.props.disabled});return this.props.buttonTemplate?n.ObjectUtils.getJSXElement(this.props.buttonTemplate,{onClick:function(e){return i.onClick(e)},className:s,iconClassName:l,element:a,props:this.props,visible:r}):a}},{key:"renderMask",value:function(){if(this.props.mask){var e=this.isVisible(),t=n.classNames("p-speeddial-mask",{"p-speeddial-mask-visible":e},this.props.maskClassName);return o.default.createElement("div",{className:t,style:this.props.maskStyle})}return null}},{key:"render",value:function(){var e,t=this,i=n.classNames("p-speeddial p-component p-speeddial-".concat(this.props.type),(h(e={},"p-speeddial-direction-".concat(this.props.direction),"circle"!==this.props.type),h(e,"p-speeddial-opened",this.isVisible()),h(e,"p-disabled",this.props.disabled),e),this.props.className),r=this.renderButton(),s=this.renderList(),l=this.renderMask();return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,className:i,style:this.props.style},r,s),l)}}],v&&l(m.prototype,v),k&&l(m,k),Object.defineProperty(m,"prototype",{writable:!1}),O}();h(v,"defaultProps",{id:null,model:null,visible:!1,style:null,className:null,direction:"up",transitionDelay:30,type:"linear",radius:0,mask:!1,disabled:!1,hideOnClickOutside:!0,buttonStyle:null,buttonClassName:null,buttonTemplate:null,maskStyle:null,maskClassName:null,showIcon:"pi pi-plus",hideIcon:null,rotateAnimation:!0,onVisibleChange:null,onClick:null,onShow:null,onHide:null}),exports.SpeedDial=v;
|