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
|
@@ -3,7 +3,8 @@
|
|
|
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 tooltip = require('primereact/tooltip');
|
|
7
8
|
|
|
8
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
10
|
|
|
@@ -46,6 +47,9 @@ function _defineProperties(target, props) {
|
|
|
46
47
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
47
48
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
48
49
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
50
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
51
|
+
writable: false
|
|
52
|
+
});
|
|
49
53
|
return Constructor;
|
|
50
54
|
}
|
|
51
55
|
|
|
@@ -78,23 +82,20 @@ function _inherits(subClass, superClass) {
|
|
|
78
82
|
configurable: true
|
|
79
83
|
}
|
|
80
84
|
});
|
|
85
|
+
Object.defineProperty(subClass, "prototype", {
|
|
86
|
+
writable: false
|
|
87
|
+
});
|
|
81
88
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
function _typeof(obj) {
|
|
85
92
|
"@babel/helpers - typeof";
|
|
86
93
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
_typeof = function _typeof(obj) {
|
|
93
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return _typeof(obj);
|
|
94
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
95
|
+
return typeof obj;
|
|
96
|
+
} : function (obj) {
|
|
97
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
98
|
+
}, _typeof(obj);
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -129,9 +130,9 @@ function _defineProperty(obj, key, value) {
|
|
|
129
130
|
return obj;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
133
|
+
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; }
|
|
133
134
|
|
|
134
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
135
|
+
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; }
|
|
135
136
|
|
|
136
137
|
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); }; }
|
|
137
138
|
|
|
@@ -168,6 +169,7 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
168
169
|
|
|
169
170
|
this.toggle(event);
|
|
170
171
|
this.inputRef.current.focus();
|
|
172
|
+
event.preventDefault();
|
|
171
173
|
}
|
|
172
174
|
}, {
|
|
173
175
|
key: "toggle",
|
|
@@ -264,7 +266,7 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
264
266
|
}, {
|
|
265
267
|
key: "renderTooltip",
|
|
266
268
|
value: function renderTooltip() {
|
|
267
|
-
this.tooltip =
|
|
269
|
+
this.tooltip = tooltip.tip({
|
|
268
270
|
target: this.container,
|
|
269
271
|
content: this.props.tooltip,
|
|
270
272
|
options: this.props.tooltipOptions
|
|
@@ -280,13 +282,14 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
280
282
|
value: function render() {
|
|
281
283
|
var _this4 = this;
|
|
282
284
|
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
+
var checked = this.isChecked();
|
|
286
|
+
var className = utils.classNames('p-inputswitch p-component', {
|
|
287
|
+
'p-inputswitch-checked': checked,
|
|
285
288
|
'p-disabled': this.props.disabled,
|
|
286
289
|
'p-inputswitch-focus': this.state.focused
|
|
287
290
|
}, this.props.className);
|
|
288
|
-
var inputSwitchProps =
|
|
289
|
-
return /*#__PURE__*/React__default[
|
|
291
|
+
var inputSwitchProps = utils.ObjectUtils.findDiffKeys(this.props, InputSwitch.defaultProps);
|
|
292
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
|
290
293
|
ref: function ref(el) {
|
|
291
294
|
return _this4.container = el;
|
|
292
295
|
},
|
|
@@ -295,24 +298,24 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
295
298
|
style: this.props.style,
|
|
296
299
|
onClick: this.onClick,
|
|
297
300
|
role: "checkbox",
|
|
298
|
-
"aria-checked":
|
|
299
|
-
}, inputSwitchProps), /*#__PURE__*/React__default[
|
|
301
|
+
"aria-checked": checked
|
|
302
|
+
}, inputSwitchProps), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
300
303
|
className: "p-hidden-accessible"
|
|
301
|
-
}, /*#__PURE__*/React__default[
|
|
304
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
302
305
|
ref: this.inputRef,
|
|
303
306
|
type: "checkbox",
|
|
304
307
|
id: this.props.inputId,
|
|
305
308
|
name: this.props.name,
|
|
306
|
-
checked:
|
|
309
|
+
checked: checked,
|
|
307
310
|
onChange: this.toggle,
|
|
308
311
|
onFocus: this.onFocus,
|
|
309
312
|
onBlur: this.onBlur,
|
|
310
313
|
onKeyDown: this.onKeyDown,
|
|
311
314
|
disabled: this.props.disabled,
|
|
312
315
|
role: "switch",
|
|
313
|
-
"aria-checked":
|
|
316
|
+
"aria-checked": checked,
|
|
314
317
|
"aria-labelledby": this.props.ariaLabelledBy
|
|
315
|
-
})), /*#__PURE__*/React__default[
|
|
318
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
316
319
|
className: "p-inputswitch-slider"
|
|
317
320
|
}));
|
|
318
321
|
}
|
|
@@ -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"),o=require("primereact/tooltip");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=n(t);function i(){return i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},i.apply(this,arguments)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function l(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}function a(t){return a="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},a(t)}function f(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function y(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function d(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function b(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?d(Object(o),!0).forEach((function(e){y(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}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(t){return!1}}var O=function(n){l(g,t.Component);var c,a,y,d,O,m=(c=g,a=v(),function(){var t,e=h(c);if(a){var o=h(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return f(this,t)});function g(e){var o;return u(this,g),(o=m.call(this,e)).state={focused:!1},o.onClick=o.onClick.bind(p(o)),o.toggle=o.toggle.bind(p(o)),o.onFocus=o.onFocus.bind(p(o)),o.onBlur=o.onBlur.bind(p(o)),o.onKeyDown=o.onKeyDown.bind(p(o)),o.inputRef=t.createRef(o.props.inputRef),o}return y=g,(d=[{key:"onClick",value:function(t){this.props.disabled||(this.toggle(t),this.inputRef.current.focus(),t.preventDefault())}},{key:"toggle",value:function(t){if(this.props.onChange){var e=this.isChecked()?this.props.falseValue:this.props.trueValue;this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}}},{key:"onFocus",value:function(t){var e=this,o=t;this.setState({focused:!0},(function(){e.props.onFocus&&e.props.onFocus(o)}))}},{key:"onBlur",value:function(t){var e=this,o=t;this.setState({focused:!1},(function(){e.props.onBlur&&e.props.onBlur(o)}))}},{key:"onKeyDown",value:function(t){"Enter"===t.key&&this.onClick(t)}},{key:"updateInputRef",value:function(){var t=this.props.inputRef;t&&("function"==typeof t?t(this.inputRef.current):t.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),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(b({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.container,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"isChecked",value:function(){return this.props.checked===this.props.trueValue}},{key:"render",value:function(){var t=this,o=this.isChecked(),n=e.classNames("p-inputswitch p-component",{"p-inputswitch-checked":o,"p-disabled":this.props.disabled,"p-inputswitch-focus":this.state.focused},this.props.className),u=e.ObjectUtils.findDiffKeys(this.props,g.defaultProps);return r.default.createElement("div",i({ref:function(e){return t.container=e},id:this.props.id,className:n,style:this.props.style,onClick:this.onClick,role:"checkbox","aria-checked":o},u),r.default.createElement("div",{className:"p-hidden-accessible"},r.default.createElement("input",{ref:this.inputRef,type:"checkbox",id:this.props.inputId,name:this.props.name,checked:o,onChange:this.toggle,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,disabled:this.props.disabled,role:"switch","aria-checked":o,"aria-labelledby":this.props.ariaLabelledBy})),r.default.createElement("span",{className:"p-inputswitch-slider"}))}}])&&s(y.prototype,d),O&&s(y,O),Object.defineProperty(y,"prototype",{writable:!1}),g}();y(O,"defaultProps",{id:null,inputRef:null,style:null,className:null,inputId:null,name:null,checked:!1,trueValue:!0,falseValue:!1,disabled:!1,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null,onFocus:null,onBlur:null}),exports.InputSwitch=O;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { createRef, Component } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { classNames, ObjectUtils } from 'primereact/utils';
|
|
3
|
+
import { tip } from 'primereact/tooltip';
|
|
3
4
|
|
|
4
5
|
function _extends() {
|
|
5
6
|
_extends = Object.assign || function (target) {
|
|
@@ -38,6 +39,9 @@ function _defineProperties(target, props) {
|
|
|
38
39
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
39
40
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40
41
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
42
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
43
|
+
writable: false
|
|
44
|
+
});
|
|
41
45
|
return Constructor;
|
|
42
46
|
}
|
|
43
47
|
|
|
@@ -70,23 +74,20 @@ function _inherits(subClass, superClass) {
|
|
|
70
74
|
configurable: true
|
|
71
75
|
}
|
|
72
76
|
});
|
|
77
|
+
Object.defineProperty(subClass, "prototype", {
|
|
78
|
+
writable: false
|
|
79
|
+
});
|
|
73
80
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
function _typeof(obj) {
|
|
77
84
|
"@babel/helpers - typeof";
|
|
78
85
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
_typeof = function _typeof(obj) {
|
|
85
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return _typeof(obj);
|
|
86
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
87
|
+
return typeof obj;
|
|
88
|
+
} : function (obj) {
|
|
89
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
90
|
+
}, _typeof(obj);
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -121,9 +122,9 @@ function _defineProperty(obj, key, value) {
|
|
|
121
122
|
return obj;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
125
|
+
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; }
|
|
125
126
|
|
|
126
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
127
|
+
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; }
|
|
127
128
|
|
|
128
129
|
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); }; }
|
|
129
130
|
|
|
@@ -160,6 +161,7 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
160
161
|
|
|
161
162
|
this.toggle(event);
|
|
162
163
|
this.inputRef.current.focus();
|
|
164
|
+
event.preventDefault();
|
|
163
165
|
}
|
|
164
166
|
}, {
|
|
165
167
|
key: "toggle",
|
|
@@ -272,8 +274,9 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
272
274
|
value: function render() {
|
|
273
275
|
var _this4 = this;
|
|
274
276
|
|
|
277
|
+
var checked = this.isChecked();
|
|
275
278
|
var className = classNames('p-inputswitch p-component', {
|
|
276
|
-
'p-inputswitch-checked':
|
|
279
|
+
'p-inputswitch-checked': checked,
|
|
277
280
|
'p-disabled': this.props.disabled,
|
|
278
281
|
'p-inputswitch-focus': this.state.focused
|
|
279
282
|
}, this.props.className);
|
|
@@ -287,7 +290,7 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
287
290
|
style: this.props.style,
|
|
288
291
|
onClick: this.onClick,
|
|
289
292
|
role: "checkbox",
|
|
290
|
-
"aria-checked":
|
|
293
|
+
"aria-checked": checked
|
|
291
294
|
}, inputSwitchProps), /*#__PURE__*/React.createElement("div", {
|
|
292
295
|
className: "p-hidden-accessible"
|
|
293
296
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -295,14 +298,14 @@ var InputSwitch = /*#__PURE__*/function (_Component) {
|
|
|
295
298
|
type: "checkbox",
|
|
296
299
|
id: this.props.inputId,
|
|
297
300
|
name: this.props.name,
|
|
298
|
-
checked:
|
|
301
|
+
checked: checked,
|
|
299
302
|
onChange: this.toggle,
|
|
300
303
|
onFocus: this.onFocus,
|
|
301
304
|
onBlur: this.onBlur,
|
|
302
305
|
onKeyDown: this.onKeyDown,
|
|
303
306
|
disabled: this.props.disabled,
|
|
304
307
|
role: "switch",
|
|
305
|
-
"aria-checked":
|
|
308
|
+
"aria-checked": checked,
|
|
306
309
|
"aria-labelledby": this.props.ariaLabelledBy
|
|
307
310
|
})), /*#__PURE__*/React.createElement("span", {
|
|
308
311
|
className: "p-inputswitch-slider"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{createRef as e,Component as o}from"react";import{
|
|
1
|
+
import t,{createRef as e,Component as o}from"react";import{classNames as n,ObjectUtils as r}from"primereact/utils";import{tip as i}from"primereact/tooltip";function p(){return p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},p.apply(this,arguments)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function a(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}function f(t){return f="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},f(t)}function h(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function d(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function b(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function v(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?b(Object(o),!0).forEach((function(e){d(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function m(){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 O=function(l){a(w,o);var f,d,b,O,g,k=(f=w,d=m(),function(){var t,e=y(f);if(d){var o=y(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return h(this,t)});function w(t){var o;return s(this,w),(o=k.call(this,t)).state={focused:!1},o.onClick=o.onClick.bind(c(o)),o.toggle=o.toggle.bind(c(o)),o.onFocus=o.onFocus.bind(c(o)),o.onBlur=o.onBlur.bind(c(o)),o.onKeyDown=o.onKeyDown.bind(c(o)),o.inputRef=e(o.props.inputRef),o}return b=w,(O=[{key:"onClick",value:function(t){this.props.disabled||(this.toggle(t),this.inputRef.current.focus(),t.preventDefault())}},{key:"toggle",value:function(t){if(this.props.onChange){var e=this.isChecked()?this.props.falseValue:this.props.trueValue;this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}}},{key:"onFocus",value:function(t){var e=this,o=t;this.setState({focused:!0},(function(){e.props.onFocus&&e.props.onFocus(o)}))}},{key:"onBlur",value:function(t){var e=this,o=t;this.setState({focused:!1},(function(){e.props.onBlur&&e.props.onBlur(o)}))}},{key:"onKeyDown",value:function(t){"Enter"===t.key&&this.onClick(t)}},{key:"updateInputRef",value:function(){var t=this.props.inputRef;t&&("function"==typeof t?t(this.inputRef.current):t.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),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(v({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.container,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"isChecked",value:function(){return this.props.checked===this.props.trueValue}},{key:"render",value:function(){var e=this,o=this.isChecked(),i=n("p-inputswitch p-component",{"p-inputswitch-checked":o,"p-disabled":this.props.disabled,"p-inputswitch-focus":this.state.focused},this.props.className),s=r.findDiffKeys(this.props,w.defaultProps);return t.createElement("div",p({ref:function(t){return e.container=t},id:this.props.id,className:i,style:this.props.style,onClick:this.onClick,role:"checkbox","aria-checked":o},s),t.createElement("div",{className:"p-hidden-accessible"},t.createElement("input",{ref:this.inputRef,type:"checkbox",id:this.props.inputId,name:this.props.name,checked:o,onChange:this.toggle,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,disabled:this.props.disabled,role:"switch","aria-checked":o,"aria-labelledby":this.props.ariaLabelledBy})),t.createElement("span",{className:"p-inputswitch-slider"}))}}])&&u(b.prototype,O),g&&u(b,g),Object.defineProperty(b,"prototype",{writable:!1}),w}();d(O,"defaultProps",{id:null,inputRef:null,style:null,className:null,inputId:null,name:null,checked:!1,trueValue:!0,falseValue:!1,disabled:!1,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null,onFocus:null,onBlur:null});export{O as InputSwitch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.inputswitch = (function (exports, React,
|
|
2
|
+
this.primereact.inputswitch = (function (exports, React, utils, tooltip) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -43,6 +43,9 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
43
43
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
44
44
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
45
45
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
46
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
47
|
+
writable: false
|
|
48
|
+
});
|
|
46
49
|
return Constructor;
|
|
47
50
|
}
|
|
48
51
|
|
|
@@ -75,23 +78,20 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
75
78
|
configurable: true
|
|
76
79
|
}
|
|
77
80
|
});
|
|
81
|
+
Object.defineProperty(subClass, "prototype", {
|
|
82
|
+
writable: false
|
|
83
|
+
});
|
|
78
84
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
function _typeof(obj) {
|
|
82
88
|
"@babel/helpers - typeof";
|
|
83
89
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
_typeof = function _typeof(obj) {
|
|
90
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return _typeof(obj);
|
|
90
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
91
|
+
return typeof obj;
|
|
92
|
+
} : function (obj) {
|
|
93
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
94
|
+
}, _typeof(obj);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -126,9 +126,9 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
126
126
|
return obj;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
129
|
+
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; }
|
|
130
130
|
|
|
131
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
131
|
+
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; }
|
|
132
132
|
|
|
133
133
|
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); }; }
|
|
134
134
|
|
|
@@ -165,6 +165,7 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
165
165
|
|
|
166
166
|
this.toggle(event);
|
|
167
167
|
this.inputRef.current.focus();
|
|
168
|
+
event.preventDefault();
|
|
168
169
|
}
|
|
169
170
|
}, {
|
|
170
171
|
key: "toggle",
|
|
@@ -261,7 +262,7 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
261
262
|
}, {
|
|
262
263
|
key: "renderTooltip",
|
|
263
264
|
value: function renderTooltip() {
|
|
264
|
-
this.tooltip =
|
|
265
|
+
this.tooltip = tooltip.tip({
|
|
265
266
|
target: this.container,
|
|
266
267
|
content: this.props.tooltip,
|
|
267
268
|
options: this.props.tooltipOptions
|
|
@@ -277,13 +278,14 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
277
278
|
value: function render() {
|
|
278
279
|
var _this4 = this;
|
|
279
280
|
|
|
280
|
-
var
|
|
281
|
-
|
|
281
|
+
var checked = this.isChecked();
|
|
282
|
+
var className = utils.classNames('p-inputswitch p-component', {
|
|
283
|
+
'p-inputswitch-checked': checked,
|
|
282
284
|
'p-disabled': this.props.disabled,
|
|
283
285
|
'p-inputswitch-focus': this.state.focused
|
|
284
286
|
}, this.props.className);
|
|
285
|
-
var inputSwitchProps =
|
|
286
|
-
return /*#__PURE__*/React__default[
|
|
287
|
+
var inputSwitchProps = utils.ObjectUtils.findDiffKeys(this.props, InputSwitch.defaultProps);
|
|
288
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
|
287
289
|
ref: function ref(el) {
|
|
288
290
|
return _this4.container = el;
|
|
289
291
|
},
|
|
@@ -292,24 +294,24 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
292
294
|
style: this.props.style,
|
|
293
295
|
onClick: this.onClick,
|
|
294
296
|
role: "checkbox",
|
|
295
|
-
"aria-checked":
|
|
296
|
-
}, inputSwitchProps), /*#__PURE__*/React__default[
|
|
297
|
+
"aria-checked": checked
|
|
298
|
+
}, inputSwitchProps), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
297
299
|
className: "p-hidden-accessible"
|
|
298
|
-
}, /*#__PURE__*/React__default[
|
|
300
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
299
301
|
ref: this.inputRef,
|
|
300
302
|
type: "checkbox",
|
|
301
303
|
id: this.props.inputId,
|
|
302
304
|
name: this.props.name,
|
|
303
|
-
checked:
|
|
305
|
+
checked: checked,
|
|
304
306
|
onChange: this.toggle,
|
|
305
307
|
onFocus: this.onFocus,
|
|
306
308
|
onBlur: this.onBlur,
|
|
307
309
|
onKeyDown: this.onKeyDown,
|
|
308
310
|
disabled: this.props.disabled,
|
|
309
311
|
role: "switch",
|
|
310
|
-
"aria-checked":
|
|
312
|
+
"aria-checked": checked,
|
|
311
313
|
"aria-labelledby": this.props.ariaLabelledBy
|
|
312
|
-
})), /*#__PURE__*/React__default[
|
|
314
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
313
315
|
className: "p-inputswitch-slider"
|
|
314
316
|
}));
|
|
315
317
|
}
|
|
@@ -343,4 +345,4 @@ this.primereact.inputswitch = (function (exports, React, core) {
|
|
|
343
345
|
|
|
344
346
|
return exports;
|
|
345
347
|
|
|
346
|
-
}({}, React, primereact.
|
|
348
|
+
})({}, React, primereact.utils, primereact.tooltip);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.inputswitch=function(t,e,n){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.inputswitch=function(t,e,o,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=r(e);function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},u.apply(this,arguments)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function a(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}function f(t){return f="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},f(t)}function h(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function d(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function b(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function v(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?b(Object(o),!0).forEach((function(e){d(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function m(){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 O=function(t){a(g,t);var r,l,f,d,b,O=(r=g,l=m(),function(){var t,e=y(r);if(l){var o=y(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return h(this,t)});function g(t){var o;return s(this,g),(o=O.call(this,t)).state={focused:!1},o.onClick=o.onClick.bind(c(o)),o.toggle=o.toggle.bind(c(o)),o.onFocus=o.onFocus.bind(c(o)),o.onBlur=o.onBlur.bind(c(o)),o.onKeyDown=o.onKeyDown.bind(c(o)),o.inputRef=e.createRef(o.props.inputRef),o}return f=g,(d=[{key:"onClick",value:function(t){this.props.disabled||(this.toggle(t),this.inputRef.current.focus(),t.preventDefault())}},{key:"toggle",value:function(t){if(this.props.onChange){var e=this.isChecked()?this.props.falseValue:this.props.trueValue;this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}}},{key:"onFocus",value:function(t){var e=this,o=t;this.setState({focused:!0},(function(){e.props.onFocus&&e.props.onFocus(o)}))}},{key:"onBlur",value:function(t){var e=this,o=t;this.setState({focused:!1},(function(){e.props.onBlur&&e.props.onBlur(o)}))}},{key:"onKeyDown",value:function(t){"Enter"===t.key&&this.onClick(t)}},{key:"updateInputRef",value:function(){var t=this.props.inputRef;t&&("function"==typeof t?t(this.inputRef.current):t.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),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(v({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=n.tip({target:this.container,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"isChecked",value:function(){return this.props.checked===this.props.trueValue}},{key:"render",value:function(){var t=this,e=this.isChecked(),n=o.classNames("p-inputswitch p-component",{"p-inputswitch-checked":e,"p-disabled":this.props.disabled,"p-inputswitch-focus":this.state.focused},this.props.className),r=o.ObjectUtils.findDiffKeys(this.props,g.defaultProps);return i.default.createElement("div",u({ref:function(e){return t.container=e},id:this.props.id,className:n,style:this.props.style,onClick:this.onClick,role:"checkbox","aria-checked":e},r),i.default.createElement("div",{className:"p-hidden-accessible"},i.default.createElement("input",{ref:this.inputRef,type:"checkbox",id:this.props.inputId,name:this.props.name,checked:e,onChange:this.toggle,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,disabled:this.props.disabled,role:"switch","aria-checked":e,"aria-labelledby":this.props.ariaLabelledBy})),i.default.createElement("span",{className:"p-inputswitch-slider"}))}}])&&p(f.prototype,d),b&&p(f,b),Object.defineProperty(f,"prototype",{writable:!1}),g}(e.Component);return d(O,"defaultProps",{id:null,inputRef:null,style:null,className:null,inputId:null,name:null,checked:!1,trueValue:!0,falseValue:!1,disabled:!1,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null,onFocus:null,onBlur:null}),t.InputSwitch=O,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.utils,primereact.tooltip);
|
|
@@ -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 keyfilter = require('primereact/keyfilter');
|
|
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
|
|
|
@@ -46,6 +48,9 @@ function _defineProperties(target, props) {
|
|
|
46
48
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
47
49
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
48
50
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
51
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
52
|
+
writable: false
|
|
53
|
+
});
|
|
49
54
|
return Constructor;
|
|
50
55
|
}
|
|
51
56
|
|
|
@@ -78,23 +83,20 @@ function _inherits(subClass, superClass) {
|
|
|
78
83
|
configurable: true
|
|
79
84
|
}
|
|
80
85
|
});
|
|
86
|
+
Object.defineProperty(subClass, "prototype", {
|
|
87
|
+
writable: false
|
|
88
|
+
});
|
|
81
89
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
function _typeof(obj) {
|
|
85
93
|
"@babel/helpers - typeof";
|
|
86
94
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
_typeof = function _typeof(obj) {
|
|
93
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return _typeof(obj);
|
|
95
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
96
|
+
return typeof obj;
|
|
97
|
+
} : function (obj) {
|
|
98
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
99
|
+
}, _typeof(obj);
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -129,9 +131,9 @@ function _defineProperty(obj, key, value) {
|
|
|
129
131
|
return obj;
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
134
|
+
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; }
|
|
133
135
|
|
|
134
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
136
|
+
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; }
|
|
135
137
|
|
|
136
138
|
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); }; }
|
|
137
139
|
|
|
@@ -167,7 +169,7 @@ var InputTextComponent = /*#__PURE__*/function (_Component) {
|
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
if (this.props.keyfilter) {
|
|
170
|
-
|
|
172
|
+
keyfilter.KeyFilter.onKeyPress(event, this.props.keyfilter, this.props.validateOnly);
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
175
|
}, {
|
|
@@ -176,7 +178,7 @@ var InputTextComponent = /*#__PURE__*/function (_Component) {
|
|
|
176
178
|
var validatePattern = true;
|
|
177
179
|
|
|
178
180
|
if (this.props.keyfilter && this.props.validateOnly) {
|
|
179
|
-
validatePattern =
|
|
181
|
+
validatePattern = keyfilter.KeyFilter.validate(event, this.props.keyfilter);
|
|
180
182
|
}
|
|
181
183
|
|
|
182
184
|
if (this.props.onInput) {
|
|
@@ -184,7 +186,7 @@ var InputTextComponent = /*#__PURE__*/function (_Component) {
|
|
|
184
186
|
}
|
|
185
187
|
|
|
186
188
|
if (!this.props.onChange) {
|
|
187
|
-
if (event.target.value.length > 0)
|
|
189
|
+
if (event.target.value.length > 0) utils.DomHandler.addClass(event.target, 'p-filled');else utils.DomHandler.removeClass(event.target, 'p-filled');
|
|
188
190
|
}
|
|
189
191
|
}
|
|
190
192
|
}, {
|
|
@@ -229,7 +231,7 @@ var InputTextComponent = /*#__PURE__*/function (_Component) {
|
|
|
229
231
|
}, {
|
|
230
232
|
key: "renderTooltip",
|
|
231
233
|
value: function renderTooltip() {
|
|
232
|
-
this.tooltip =
|
|
234
|
+
this.tooltip = tooltip.tip({
|
|
233
235
|
target: this.elementRef.current,
|
|
234
236
|
content: this.props.tooltip,
|
|
235
237
|
options: this.props.tooltipOptions
|
|
@@ -238,12 +240,12 @@ var InputTextComponent = /*#__PURE__*/function (_Component) {
|
|
|
238
240
|
}, {
|
|
239
241
|
key: "render",
|
|
240
242
|
value: function render() {
|
|
241
|
-
var className =
|
|
243
|
+
var className = utils.classNames('p-inputtext p-component', {
|
|
242
244
|
'p-disabled': this.props.disabled,
|
|
243
245
|
'p-filled': this.isFilled()
|
|
244
246
|
}, this.props.className);
|
|
245
|
-
var inputProps =
|
|
246
|
-
return /*#__PURE__*/React__default[
|
|
247
|
+
var inputProps = utils.ObjectUtils.findDiffKeys(this.props, InputTextComponent.defaultProps);
|
|
248
|
+
return /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
247
249
|
ref: this.elementRef
|
|
248
250
|
}, inputProps, {
|
|
249
251
|
className: className,
|
|
@@ -266,8 +268,8 @@ _defineProperty(InputTextComponent, "defaultProps", {
|
|
|
266
268
|
forwardRef: null
|
|
267
269
|
});
|
|
268
270
|
|
|
269
|
-
var InputText = /*#__PURE__*/React__default[
|
|
270
|
-
return /*#__PURE__*/React__default[
|
|
271
|
+
var InputText = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
272
|
+
return /*#__PURE__*/React__default["default"].createElement(InputTextComponent, _extends({
|
|
271
273
|
forwardRef: ref
|
|
272
274
|
}, props));
|
|
273
275
|
});
|