primereact 6.6.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -9
- package/accordion/accordion.cjs.js +32 -23
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +3 -2
- package/accordion/accordion.esm.js +17 -8
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +32 -24
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +374 -42
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +126 -32
- package/api/api.esm.js +371 -43
- package/api/api.esm.min.js +1 -1
- package/api/api.js +374 -44
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +79 -69
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +3 -1
- package/autocomplete/autocomplete.esm.js +15 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +75 -70
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +12 -9
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +7 -4
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +13 -10
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +5 -3
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +6 -4
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +5 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +6 -4
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +19 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +7 -2
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +18 -14
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +18 -16
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +19 -17
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -53
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -42
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -54
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +183 -153
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -1
- package/calendar/calendar.esm.js +57 -27
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +179 -154
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +3 -1
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +2 -0
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +4 -2
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +15 -13
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +16 -14
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +39 -36
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +39 -37
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +53 -47
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +8 -2
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +50 -48
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +8 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +7 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +22 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +15 -8
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +22 -16
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +18 -14
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +13 -9
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +19 -15
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +48 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +39 -11
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +48 -21
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +37 -31
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/colorpicker/colorpicker.esm.js +8 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +34 -32
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +34 -9
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +168 -13
- package/column/column.esm.js +34 -9
- package/column/column.esm.min.js +1 -1
- package/column/column.js +35 -10
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +2 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +2 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +3 -1
- package/columngroup/columngroup.min.js +1 -1
- package/common/common.min.css +1 -1
- package/confirmdialog/confirmdialog.cjs.js +24 -20
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +8 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +24 -21
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +47 -40
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +4 -3
- package/confirmpopup/confirmpopup.esm.js +12 -6
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +44 -40
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +70 -63
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +37 -31
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +67 -64
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11745 -1573
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +3 -1
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +2 -0
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -2
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +14 -11
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +6 -3
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +14 -12
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +4784 -3277
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +100 -29
- package/datatable/datatable.esm.js +4859 -3353
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4777 -3278
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +34 -29
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +8 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -30
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -0
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -2
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +68 -51
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +1 -0
- package/dialog/dialog.esm.js +22 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +65 -52
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +6 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +7 -5
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +53 -17
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +41 -5
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +53 -18
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +90 -76
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +28 -14
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +86 -77
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +40 -40
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +4 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +39 -37
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +19 -15
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +5 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +18 -16
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +65 -56
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +2 -1
- package/fileupload/fileupload.esm.js +26 -17
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +65 -57
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +8 -8
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +3 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +7 -5
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +72 -65
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +8 -2
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +69 -66
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +3 -1
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +2 -0
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +4 -2
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +33 -27
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +5 -5
- package/image/image.esm.js +7 -2
- package/image/image.esm.min.js +1 -1
- package/image/image.js +31 -28
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +10 -8
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +11 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +11 -8
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +4 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +11 -9
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +50 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +33 -12
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +49 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +17 -12
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +10 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +17 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +14 -10
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +5 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +13 -11
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +12 -9
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +4 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +12 -10
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +5 -5
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +1 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +6 -6
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +9 -7
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +3 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +10 -8
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +44 -39
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +9 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +42 -40
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +38 -35
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +4 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +38 -36
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +55 -46
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +10 -2
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +50 -47
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +35 -28
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -0
- package/menu/menu.esm.js +8 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +32 -29
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +40 -35
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +6 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +39 -36
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +11 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +5 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +12 -9
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +21 -17
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +20 -18
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +132 -118
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -2
- package/multiselect/multiselect.esm.js +47 -33
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +128 -119
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +16 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +4 -1
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +16 -14
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +37 -34
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +4 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +37 -35
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +28 -26
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +3 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +29 -27
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +33 -24
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +10 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +29 -25
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.cjs.js +2 -2
- package/overlayservice/overlayservice.cjs.min.js +1 -1
- package/overlayservice/overlayservice.esm.js +1 -1
- package/overlayservice/overlayservice.esm.min.js +1 -1
- package/overlayservice/overlayservice.js +3 -3
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +10 -4
- package/paginator/paginator.cjs.js +51 -48
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +5 -2
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +51 -49
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +21 -17
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +5 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +20 -18
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +42 -39
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +4 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +42 -40
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +35 -29
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +8 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +32 -30
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +60 -54
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +16 -10
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +60 -55
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -3
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +6 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +8 -4
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +8041 -5835
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6905 -4701
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +8040 -5832
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +11 -9
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +12 -10
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +7 -5
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +8 -6
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +12 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +4 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +12 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +12 -9
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +6 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +12 -10
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +430 -238
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +158 -27
- package/resources/themes/arya-green/theme.css +158 -27
- package/resources/themes/arya-orange/theme.css +158 -27
- package/resources/themes/arya-purple/theme.css +158 -27
- package/resources/themes/bootstrap4-dark-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-dark-purple/theme.css +162 -31
- package/resources/themes/bootstrap4-light-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-light-purple/theme.css +162 -31
- package/resources/themes/fluent-light/theme.css +158 -27
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5671 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5671 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5671 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5671 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5671 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5671 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5671 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5671 -0
- package/resources/themes/luna-amber/theme.css +162 -31
- package/resources/themes/luna-blue/theme.css +162 -31
- package/resources/themes/luna-green/theme.css +162 -31
- package/resources/themes/luna-pink/theme.css +162 -31
- package/resources/themes/md-dark-deeppurple/theme.css +347 -56
- package/resources/themes/md-dark-indigo/theme.css +347 -56
- package/resources/themes/md-light-deeppurple/theme.css +347 -56
- package/resources/themes/md-light-indigo/theme.css +347 -56
- package/resources/themes/mdc-dark-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-dark-indigo/theme.css +347 -56
- package/resources/themes/mdc-light-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-light-indigo/theme.css +347 -56
- package/resources/themes/nova/theme.css +162 -31
- package/resources/themes/nova-accent/theme.css +162 -31
- package/resources/themes/nova-alt/theme.css +162 -31
- package/resources/themes/rhea/theme.css +162 -31
- package/resources/themes/saga-blue/theme.css +158 -27
- package/resources/themes/saga-green/theme.css +158 -27
- package/resources/themes/saga-orange/theme.css +158 -27
- package/resources/themes/saga-purple/theme.css +158 -27
- package/resources/themes/tailwind-light/theme.css +162 -31
- package/resources/themes/vela-blue/theme.css +158 -27
- package/resources/themes/vela-green/theme.css +158 -27
- package/resources/themes/vela-orange/theme.css +158 -27
- package/resources/themes/vela-purple/theme.css +158 -27
- package/ripple/ripple.cjs.js +13 -11
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +5 -3
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +14 -12
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +3 -1
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +2 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +4 -2
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +21 -19
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +22 -20
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +20 -13
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +2 -1
- package/scrolltop/scrolltop.esm.js +11 -5
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +18 -14
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +19 -15
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +5 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +18 -16
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +144 -116
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +2 -0
- package/sidebar/sidebar.esm.js +135 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +141 -117
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +5 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +3 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +6 -4
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +39 -32
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +8 -2
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +36 -33
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -23
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -15
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -24
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +22 -19
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +4 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +22 -20
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +39 -33
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +4 -5
- package/splitbutton/splitbutton.esm.js +8 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +36 -34
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +21 -19
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +4 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +22 -20
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +12 -10
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +13 -11
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +35 -39
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +20 -24
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +36 -40
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +18 -15
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +4 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +18 -16
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +177 -54
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +4 -1
- package/tabview/tabview.esm.js +146 -23
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +177 -55
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +11 -8
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +7 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +12 -9
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +14 -12
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +15 -13
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.cjs.js +2 -2
- package/terminalservice/terminalservice.cjs.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +3 -3
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +44 -36
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +9 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +40 -37
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +14 -12
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +15 -13
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +48 -40
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +22 -15
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +46 -41
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +16 -9
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +10 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +15 -10
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +9 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +10 -8
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +36 -31
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +6 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +35 -32
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +54 -51
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +9 -2
- package/tree/tree.esm.js +4 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +54 -52
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +3 -1
- package/treeselect/treeselect.cjs.js +52 -46
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +9 -2
- package/treeselect/treeselect.esm.js +11 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +49 -47
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1290 -272
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +9 -2
- package/treetable/treetable.esm.js +1213 -195
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1288 -273
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +13 -10
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +4 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +13 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +502 -525
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +29 -20
- package/utils/utils.esm.js +501 -524
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +503 -526
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +285 -168
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +21 -9
- package/virtualscroller/virtualscroller.esm.js +278 -161
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +286 -169
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +17 -27
- package/core/core.cjs.js +0 -3080
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -3055
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{Component as t,createRef as n}from"react";import{classNames as o,CSSTransition as i,Portal as r,OverlayService as s,DomHandler as u,ZIndexUtils as a,ConnectedOverlayScrollHandler as l,tip as c,ObjectUtils as h}from"primereact/core";import p from"primereact/api";function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}function k(e){return(k="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})(e)}function M(e,t){return!t||"object"!==k(t)&&"function"!=typeof t?b(e):t}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(){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 O=function(n){m(l,t);var s,u,a=(s=l,u=D(),function(){var e,t=E(s);if(u){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(this,e)});function l(){return f(this,l),a.apply(this,arguments)}return y(l,[{key:"renderElement",value:function(){var t=o("p-colorpicker-panel",{"p-colorpicker-overlay-panel":!this.props.inline,"p-disabled":this.props.disabled});return e.createElement(i,{nodeRef:this.props.forwardRef,classNames:"p-connected-overlay",in:this.props.in,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.props.onEnter,onEntered:this.props.onEntered,onExit:this.props.onExit,onExited:this.props.onExited},e.createElement("div",{ref:this.props.forwardRef,className:t,onClick:this.props.onClick},this.props.children))}},{key:"render",value:function(){var t=this.renderElement();return this.props.inline?t:e.createElement(r,{element:t,appendTo:this.props.appendTo})}}]),l}();H(O,"defaultProps",{appendTo:null,inline:!1,disabled:!1,onClick:null});var C=e.forwardRef((function(t,n){return e.createElement(O,d({forwardRef:n},t))}));function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(){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 w=function(i){m(k,t);var r,v,g=(r=k,v=R(),function(){var e,t=E(r);if(v){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(this,e)});function k(e){var t;return f(this,k),(t=g.call(this,e)).state={overlayVisible:!1},t.onInputClick=t.onInputClick.bind(b(t)),t.onInputKeydown=t.onInputKeydown.bind(b(t)),t.onOverlayEnter=t.onOverlayEnter.bind(b(t)),t.onOverlayEntered=t.onOverlayEntered.bind(b(t)),t.onOverlayExit=t.onOverlayExit.bind(b(t)),t.onOverlayExited=t.onOverlayExited.bind(b(t)),t.onPanelClick=t.onPanelClick.bind(b(t)),t.onColorMousedown=t.onColorMousedown.bind(b(t)),t.onHueMousedown=t.onHueMousedown.bind(b(t)),t.onColorDragStart=t.onColorDragStart.bind(b(t)),t.onHueDragStart=t.onHueDragStart.bind(b(t)),t.onDrag=t.onDrag.bind(b(t)),t.onDragEnd=t.onDragEnd.bind(b(t)),t.overlayRef=n(),t.inputRef=n(t.props.inputRef),t}return y(k,[{key:"onPanelClick",value:function(e){this.props.inline||s.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"onHueMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onHueDragStart(e))}},{key:"onHueDragStart",value:function(e){this.props.disabled||(this.hueDragging=!0,this.pickHue(e),u.addClass(this.container,"p-colorpicker-dragging"))}},{key:"pickHue",value:function(e){var t=this.hueView.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);this.hsbValue=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150),s:100,b:100}),this.updateColorSelector(),this.updateHue(),this.updateModel()}},{key:"onColorMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onColorDragStart(e))}},{key:"onColorDragStart",value:function(e){this.props.disabled||(this.colorDragging=!0,this.pickColor(e),u.addClass(this.container,"p-colorpicker-dragging"),e.preventDefault())}},{key:"onDrag",value:function(e){this.colorDragging&&(this.pickColor(e),e.preventDefault()),this.hueDragging&&(this.pickHue(e),e.preventDefault())}},{key:"onDragEnd",value:function(){this.colorDragging=!1,this.hueDragging=!1,u.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDragListeners()}},{key:"bindDragListeners",value:function(){this.bindDocumentMouseMoveListener(),this.bindDocumentMouseUpListener()}},{key:"unbindDragListeners",value:function(){this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"pickColor",value:function(e){var t=this.colorSelector.getBoundingClientRect(),n=t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),o=t.left+document.body.scrollLeft,i=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-o))/150),r=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150);this.hsbValue=this.validateHSB({h:this.hsbValue.h,s:i,b:r}),this.updateColorHandle(),this.updateInput(),this.updateModel()}},{key:"updateModel",value:function(){switch(this.props.format){case"hex":this.onChange(this.HSBtoHEX(this.hsbValue));break;case"rgb":this.onChange(this.HSBtoRGB(this.hsbValue));break;case"hsb":this.onChange(this.hsbValue)}}},{key:"toHSB",value:function(e){var t;if(e)switch(this.props.format){case"hex":t=this.HEXtoHSB(e);break;case"rgb":t=this.RGBtoHSB(e);break;case"hsb":t=e}else t=this.HEXtoHSB(this.props.defaultColor);return t}},{key:"updateHSBValue",value:function(e){this.hsbValue=this.toHSB(e)}},{key:"areHSBEqual",value:function(e,t){return e.h===t.h&&e.s===t.s&&e.b===t.b}},{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange({value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"updateColorSelector",value:function(){if(this.colorSelector){var e=this.validateHSB({h:this.hsbValue.h,s:100,b:100});this.colorSelector.style.backgroundColor="#"+this.HSBtoHEX(e)}}},{key:"updateColorHandle",value:function(){this.colorHandle&&(this.colorHandle.style.left=Math.floor(150*this.hsbValue.s/100)+"px",this.colorHandle.style.top=Math.floor(150*(100-this.hsbValue.b)/100)+"px")}},{key:"updateHue",value:function(){this.hueHandle&&(this.hueHandle.style.top=Math.floor(150-150*this.hsbValue.h/360)+"px")}},{key:"updateInput",value:function(){this.inputRef&&this.inputRef.current&&(this.inputRef.current.style.backgroundColor="#"+this.HSBtoHEX(this.hsbValue))}},{key:"show",value:function(){this.setState({overlayVisible:!0})}},{key:"hide",value:function(){this.setState({overlayVisible:!1})}},{key:"onOverlayEnter",value:function(){a.set("overlay",this.overlayRef.current),this.alignOverlay()}},{key:"onOverlayEntered",value:function(){this.bindDocumentClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindDocumentClickListener(),this.unbindScrollListener(),this.unbindResizeListener()}},{key:"onOverlayExited",value:function(){a.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"onInputClick",value:function(){this.togglePanel()}},{key:"togglePanel",value:function(){this.state.overlayVisible?this.hide():this.show()}},{key:"onInputKeydown",value:function(e){switch(e.which){case 32:this.togglePanel(),e.preventDefault();break;case 27:case 9:this.hide()}}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new l(this.container,(function(){e.state.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindResizeListener",value:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.state.overlayVisible&&!u.isAndroid()&&e.hide()},window.addEventListener("resize",this.resizeListener))}},{key:"unbindResizeListener",value:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},{key:"isOutsideClicked",value:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.overlayRef&&this.overlayRef.current.contains(e.target))}},{key:"bindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener||(this.documentMouseMoveListener=this.onDocumentMouseMove.bind(this),document.addEventListener("mousemove",this.documentMouseMoveListener))}},{key:"onDocumentMouseMove",value:function(e){this.colorDragging&&this.pickColor(e),this.hueDragging&&this.pickHue(e)}},{key:"unbindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null)}},{key:"bindDocumentMouseUpListener",value:function(){this.documentMouseUpListener||(this.documentMouseUpListener=this.onDocumentMouseUp.bind(this),document.addEventListener("mouseup",this.documentMouseUpListener))}},{key:"onDocumentMouseUp",value:function(){this.colorDragging=!1,this.hueDragging=!1,u.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"unbindDocumentMouseUpListener",value:function(){this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)}},{key:"validateHSB",value:function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}}},{key:"validateRGB",value:function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}}},{key:"validateHEX",value:function(e){var t=6-e.length;if(t>0){for(var n=[],o=0;o<t;o++)n.push("0");n.push(e),e=n.join("")}return e}},{key:"HEXtoRGB",value:function(e){var t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(65280&t)>>8,b:255&t}}},{key:"HEXtoHSB",value:function(e){return this.RGBtoHSB(this.HEXtoRGB(e))}},{key:"RGBtoHSB",value:function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),o=Math.max(e.r,e.g,e.b),i=o-n;return t.b=o,t.s=0!==o?255*i/o:0,t.h=0!==t.s?e.r===o?(e.g-e.b)/i:e.g===o?2+(e.b-e.r)/i:4+(e.r-e.g)/i:-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}},{key:"HSBtoRGB",value:function(e){var t={r:null,g:null,b:null},n=Math.round(e.h),o=Math.round(255*e.s/100),i=Math.round(255*e.b/100);if(0===o)t={r:i,g:i,b:i};else{var r=i,s=(255-o)*i/255,u=n%60*(r-s)/60;360===n&&(n=0),n<60?(t.r=r,t.b=s,t.g=s+u):n<120?(t.g=r,t.b=s,t.r=r-u):n<180?(t.g=r,t.r=s,t.b=s+u):n<240?(t.b=r,t.r=s,t.g=r-u):n<300?(t.b=r,t.g=s,t.r=s+u):n<360?(t.r=r,t.g=s,t.b=r-u):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}},{key:"RGBtoHEX",value:function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var n in t)1===t[n].length&&(t[n]="0"+t[n]);return t.join("")}},{key:"HSBtoHEX",value:function(e){return this.RGBtoHEX(this.HSBtoRGB(e))}},{key:"updateInputRef",value:function(){var e=this.props.inputRef;e&&("function"==typeof e?e(this.inputRef.current):e.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.updateHSBValue(this.props.value),this.updateUI(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){this.colorDragging||this.hueDragging||this.props.value===e.value||this.updateHSBValue(this.props.value),this.updateUI(),e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(L({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),a.clear(this.overlayRef.current)}},{key:"updateUI",value:function(){this.updateHue(),this.updateColorHandle(),this.updateInput(),this.updateColorSelector()}},{key:"alignOverlay",value:function(){this.inputRef&&this.inputRef.current&&u.alignOverlay(this.overlayRef.current,this.inputRef.current.parentElement,this.props.appendTo||p.appendTo)}},{key:"renderTooltip",value:function(){this.tooltip=c({target:this.container,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderColorSelector",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.colorSelector=e},className:"p-colorpicker-color-selector",onMouseDown:this.onColorMousedown,onTouchStart:this.onColorDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},e.createElement("div",{className:"p-colorpicker-color"},e.createElement("div",{ref:function(e){return t.colorHandle=e},className:"p-colorpicker-color-handle"})))}},{key:"renderHue",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.hueView=e},className:"p-colorpicker-hue",onMouseDown:this.onHueMousedown,onTouchStart:this.onHueDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},e.createElement("div",{ref:function(e){return t.hueHandle=e},className:"p-colorpicker-hue-handle"}))}},{key:"renderContent",value:function(){var t=this.renderColorSelector(),n=this.renderHue();return e.createElement("div",{className:"p-colorpicker-content"},t,n)}},{key:"renderInput",value:function(){if(!this.props.inline){var t=o("p-colorpicker-preview p-inputtext",{"p-disabled":this.props.disabled}),n=h.findDiffKeys(this.props,k.defaultProps);return e.createElement("input",d({ref:this.inputRef,type:"text",className:t,readOnly:!0,id:this.props.inputId,tabIndex:this.props.tabIndex,disabled:this.props.disabled,onClick:this.onInputClick,onKeyDown:this.onInputKeydown},n))}return null}},{key:"render",value:function(){var t=this,n=o("p-colorpicker p-component",{"p-colorpicker-overlay":!this.props.inline},this.props.className),i=this.renderContent(),r=this.renderInput();return e.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,style:this.props.style,className:n},r,e.createElement(C,{ref:this.overlayRef,appendTo:this.props.appendTo,inline:this.props.inline,disabled:this.props.disabled,onClick:this.onPanelClick,in:this.props.inline||this.state.overlayVisible,onEnter:this.onOverlayEnter,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited,transitionOptions:this.props.transitionOptions},i))}}]),k}();H(w,"defaultProps",{id:null,inputRef:null,value:null,style:null,className:null,defaultColor:"ff0000",inline:!1,format:"hex",appendTo:null,disabled:!1,tabIndex:null,inputId:null,tooltip:null,tooltipOptions:null,transitionOptions:null,onChange:null,onShow:null,onHide:null});export{w as ColorPicker};
|
|
1
|
+
import e,{Component as t,createRef as n}from"react";import{classNames as o,DomHandler as i,ZIndexUtils as r,ConnectedOverlayScrollHandler as s,ObjectUtils as u}from"primereact/utils";import{CSSTransition as a}from"primereact/csstransition";import{Portal as l}from"primereact/portal";import{tip as c}from"primereact/tooltip";import{OverlayService as h}from"primereact/overlayservice";import p from"primereact/api";function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(this,arguments)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function k(e){return k="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},k(e)}function M(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(){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 O=function(n){g(u,t);var i,r,s=(i=u,r=H(),function(){var e,t=E(i);if(r){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(this,e)});function u(){return f(this,u),s.apply(this,arguments)}return y(u,[{key:"renderElement",value:function(){var t=o("p-colorpicker-panel",{"p-colorpicker-overlay-panel":!this.props.inline,"p-disabled":this.props.disabled});return e.createElement(a,{nodeRef:this.props.forwardRef,classNames:"p-connected-overlay",in:this.props.in,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.props.onEnter,onEntered:this.props.onEntered,onExit:this.props.onExit,onExited:this.props.onExited},e.createElement("div",{ref:this.props.forwardRef,className:t,onClick:this.props.onClick},this.props.children))}},{key:"render",value:function(){var t=this.renderElement();return this.props.inline?t:e.createElement(l,{element:t,appendTo:this.props.appendTo})}}]),u}();D(O,"defaultProps",{appendTo:null,inline:!1,disabled:!1,onClick:null});var C=e.forwardRef((function(t,n){return e.createElement(O,d({forwardRef:n},t))}));function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var R=function(a){g(k,t);var l,v,m=(l=k,v=w(),function(){var e,t=E(l);if(v){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(this,e)});function k(e){var t;return f(this,k),(t=m.call(this,e)).state={overlayVisible:!1},t.onInputClick=t.onInputClick.bind(b(t)),t.onInputKeydown=t.onInputKeydown.bind(b(t)),t.onOverlayEnter=t.onOverlayEnter.bind(b(t)),t.onOverlayEntered=t.onOverlayEntered.bind(b(t)),t.onOverlayExit=t.onOverlayExit.bind(b(t)),t.onOverlayExited=t.onOverlayExited.bind(b(t)),t.onPanelClick=t.onPanelClick.bind(b(t)),t.onColorMousedown=t.onColorMousedown.bind(b(t)),t.onHueMousedown=t.onHueMousedown.bind(b(t)),t.onColorDragStart=t.onColorDragStart.bind(b(t)),t.onHueDragStart=t.onHueDragStart.bind(b(t)),t.onDrag=t.onDrag.bind(b(t)),t.onDragEnd=t.onDragEnd.bind(b(t)),t.overlayRef=n(),t.inputRef=n(t.props.inputRef),t}return y(k,[{key:"onPanelClick",value:function(e){this.props.inline||h.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"onHueMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onHueDragStart(e))}},{key:"onHueDragStart",value:function(e){this.props.disabled||(this.hueDragging=!0,this.pickHue(e),i.addClass(this.container,"p-colorpicker-dragging"))}},{key:"pickHue",value:function(e){var t=this.hueView.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);this.hsbValue=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150),s:100,b:100}),this.updateColorSelector(),this.updateHue(),this.updateModel()}},{key:"onColorMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onColorDragStart(e))}},{key:"onColorDragStart",value:function(e){this.props.disabled||(this.colorDragging=!0,this.pickColor(e),i.addClass(this.container,"p-colorpicker-dragging"),e.preventDefault())}},{key:"onDrag",value:function(e){this.colorDragging&&(this.pickColor(e),e.preventDefault()),this.hueDragging&&(this.pickHue(e),e.preventDefault())}},{key:"onDragEnd",value:function(){this.colorDragging=!1,this.hueDragging=!1,i.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDragListeners()}},{key:"bindDragListeners",value:function(){this.bindDocumentMouseMoveListener(),this.bindDocumentMouseUpListener()}},{key:"unbindDragListeners",value:function(){this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"pickColor",value:function(e){var t=this.colorSelector.getBoundingClientRect(),n=t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),o=t.left+document.body.scrollLeft,i=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-o))/150),r=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150);this.hsbValue=this.validateHSB({h:this.hsbValue.h,s:i,b:r}),this.updateColorHandle(),this.updateInput(),this.updateModel()}},{key:"updateModel",value:function(){switch(this.props.format){case"hex":this.onChange(this.HSBtoHEX(this.hsbValue));break;case"rgb":this.onChange(this.HSBtoRGB(this.hsbValue));break;case"hsb":this.onChange(this.hsbValue)}}},{key:"toHSB",value:function(e){var t;if(e)switch(this.props.format){case"hex":t=this.HEXtoHSB(e);break;case"rgb":t=this.RGBtoHSB(e);break;case"hsb":t=e}else t=this.HEXtoHSB(this.props.defaultColor);return t}},{key:"updateHSBValue",value:function(e){this.hsbValue=this.toHSB(e)}},{key:"areHSBEqual",value:function(e,t){return e.h===t.h&&e.s===t.s&&e.b===t.b}},{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange({value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"updateColorSelector",value:function(){if(this.colorSelector){var e=this.validateHSB({h:this.hsbValue.h,s:100,b:100});this.colorSelector.style.backgroundColor="#"+this.HSBtoHEX(e)}}},{key:"updateColorHandle",value:function(){this.colorHandle&&(this.colorHandle.style.left=Math.floor(150*this.hsbValue.s/100)+"px",this.colorHandle.style.top=Math.floor(150*(100-this.hsbValue.b)/100)+"px")}},{key:"updateHue",value:function(){this.hueHandle&&(this.hueHandle.style.top=Math.floor(150-150*this.hsbValue.h/360)+"px")}},{key:"updateInput",value:function(){this.inputRef&&this.inputRef.current&&(this.inputRef.current.style.backgroundColor="#"+this.HSBtoHEX(this.hsbValue))}},{key:"show",value:function(){this.setState({overlayVisible:!0})}},{key:"hide",value:function(){this.setState({overlayVisible:!1})}},{key:"onOverlayEnter",value:function(){r.set("overlay",this.overlayRef.current,p.autoZIndex,p.zIndex.overlay),this.alignOverlay()}},{key:"onOverlayEntered",value:function(){this.bindDocumentClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindDocumentClickListener(),this.unbindScrollListener(),this.unbindResizeListener()}},{key:"onOverlayExited",value:function(){r.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"onInputClick",value:function(){this.togglePanel()}},{key:"togglePanel",value:function(){this.state.overlayVisible?this.hide():this.show()}},{key:"onInputKeydown",value:function(e){switch(e.which){case 32:this.togglePanel(),e.preventDefault();break;case 27:case 9:this.hide()}}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s(this.container,(function(){e.state.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindResizeListener",value:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.state.overlayVisible&&!i.isAndroid()&&e.hide()},window.addEventListener("resize",this.resizeListener))}},{key:"unbindResizeListener",value:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},{key:"isOutsideClicked",value:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.overlayRef&&this.overlayRef.current.contains(e.target))}},{key:"bindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener||(this.documentMouseMoveListener=this.onDocumentMouseMove.bind(this),document.addEventListener("mousemove",this.documentMouseMoveListener))}},{key:"onDocumentMouseMove",value:function(e){this.colorDragging&&this.pickColor(e),this.hueDragging&&this.pickHue(e)}},{key:"unbindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null)}},{key:"bindDocumentMouseUpListener",value:function(){this.documentMouseUpListener||(this.documentMouseUpListener=this.onDocumentMouseUp.bind(this),document.addEventListener("mouseup",this.documentMouseUpListener))}},{key:"onDocumentMouseUp",value:function(){this.colorDragging=!1,this.hueDragging=!1,i.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"unbindDocumentMouseUpListener",value:function(){this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)}},{key:"validateHSB",value:function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}}},{key:"validateRGB",value:function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}}},{key:"validateHEX",value:function(e){var t=6-e.length;if(t>0){for(var n=[],o=0;o<t;o++)n.push("0");n.push(e),e=n.join("")}return e}},{key:"HEXtoRGB",value:function(e){var t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(65280&t)>>8,b:255&t}}},{key:"HEXtoHSB",value:function(e){return this.RGBtoHSB(this.HEXtoRGB(e))}},{key:"RGBtoHSB",value:function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),o=Math.max(e.r,e.g,e.b),i=o-n;return t.b=o,t.s=0!==o?255*i/o:0,t.h=0!==t.s?e.r===o?(e.g-e.b)/i:e.g===o?2+(e.b-e.r)/i:4+(e.r-e.g)/i:-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}},{key:"HSBtoRGB",value:function(e){var t={r:null,g:null,b:null},n=Math.round(e.h),o=Math.round(255*e.s/100),i=Math.round(255*e.b/100);if(0===o)t={r:i,g:i,b:i};else{var r=i,s=(255-o)*i/255,u=n%60*(r-s)/60;360===n&&(n=0),n<60?(t.r=r,t.b=s,t.g=s+u):n<120?(t.g=r,t.b=s,t.r=r-u):n<180?(t.g=r,t.r=s,t.b=s+u):n<240?(t.b=r,t.r=s,t.g=r-u):n<300?(t.b=r,t.g=s,t.r=s+u):n<360?(t.r=r,t.g=s,t.b=r-u):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}},{key:"RGBtoHEX",value:function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var n in t)1===t[n].length&&(t[n]="0"+t[n]);return t.join("")}},{key:"HSBtoHEX",value:function(e){return this.RGBtoHEX(this.HSBtoRGB(e))}},{key:"updateInputRef",value:function(){var e=this.props.inputRef;e&&("function"==typeof e?e(this.inputRef.current):e.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.updateHSBValue(this.props.value),this.updateUI(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){this.colorDragging||this.hueDragging||this.props.value===e.value||this.updateHSBValue(this.props.value),this.updateUI(),e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(L({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),r.clear(this.overlayRef.current)}},{key:"updateUI",value:function(){this.updateHue(),this.updateColorHandle(),this.updateInput(),this.updateColorSelector()}},{key:"alignOverlay",value:function(){this.inputRef&&this.inputRef.current&&i.alignOverlay(this.overlayRef.current,this.inputRef.current.parentElement,this.props.appendTo||p.appendTo)}},{key:"renderTooltip",value:function(){this.tooltip=c({target:this.container,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderColorSelector",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.colorSelector=e},className:"p-colorpicker-color-selector",onMouseDown:this.onColorMousedown,onTouchStart:this.onColorDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},e.createElement("div",{className:"p-colorpicker-color"},e.createElement("div",{ref:function(e){return t.colorHandle=e},className:"p-colorpicker-color-handle"})))}},{key:"renderHue",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.hueView=e},className:"p-colorpicker-hue",onMouseDown:this.onHueMousedown,onTouchStart:this.onHueDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},e.createElement("div",{ref:function(e){return t.hueHandle=e},className:"p-colorpicker-hue-handle"}))}},{key:"renderContent",value:function(){var t=this.renderColorSelector(),n=this.renderHue();return e.createElement("div",{className:"p-colorpicker-content"},t,n)}},{key:"renderInput",value:function(){if(!this.props.inline){var t=o("p-colorpicker-preview p-inputtext",{"p-disabled":this.props.disabled}),n=u.findDiffKeys(this.props,k.defaultProps);return e.createElement("input",d({ref:this.inputRef,type:"text",className:t,readOnly:!0,id:this.props.inputId,tabIndex:this.props.tabIndex,disabled:this.props.disabled,onClick:this.onInputClick,onKeyDown:this.onInputKeydown},n))}return null}},{key:"render",value:function(){var t=this,n=o("p-colorpicker p-component",{"p-colorpicker-overlay":!this.props.inline},this.props.className),i=this.renderContent(),r=this.renderInput();return e.createElement("div",{ref:function(e){return t.container=e},id:this.props.id,style:this.props.style,className:n},r,e.createElement(C,{ref:this.overlayRef,appendTo:this.props.appendTo,inline:this.props.inline,disabled:this.props.disabled,onClick:this.onPanelClick,in:this.props.inline||this.state.overlayVisible,onEnter:this.onOverlayEnter,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited,transitionOptions:this.props.transitionOptions},i))}}]),k}();D(R,"defaultProps",{id:null,inputRef:null,value:null,style:null,className:null,defaultColor:"ff0000",inline:!1,format:"hex",appendTo:null,disabled:!1,tabIndex:null,inputId:null,tooltip:null,tooltipOptions:null,transitionOptions:null,onChange:null,onShow:null,onHide:null});export{R as ColorPicker};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.colorpicker = (function (exports, React,
|
|
2
|
+
this.primereact.colorpicker = (function (exports, React, utils, csstransition, portal, tooltip, overlayservice, PrimeReact) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -98,6 +98,8 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
98
98
|
function _possibleConstructorReturn(self, call) {
|
|
99
99
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
100
100
|
return call;
|
|
101
|
+
} else if (call !== void 0) {
|
|
102
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
return _assertThisInitialized(self);
|
|
@@ -143,11 +145,11 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
143
145
|
_createClass(ColorPickerPanelComponent, [{
|
|
144
146
|
key: "renderElement",
|
|
145
147
|
value: function renderElement() {
|
|
146
|
-
var className =
|
|
148
|
+
var className = utils.classNames('p-colorpicker-panel', {
|
|
147
149
|
'p-colorpicker-overlay-panel': !this.props.inline,
|
|
148
150
|
'p-disabled': this.props.disabled
|
|
149
151
|
});
|
|
150
|
-
return /*#__PURE__*/React__default[
|
|
152
|
+
return /*#__PURE__*/React__default["default"].createElement(csstransition.CSSTransition, {
|
|
151
153
|
nodeRef: this.props.forwardRef,
|
|
152
154
|
classNames: "p-connected-overlay",
|
|
153
155
|
in: this.props.in,
|
|
@@ -161,7 +163,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
161
163
|
onEntered: this.props.onEntered,
|
|
162
164
|
onExit: this.props.onExit,
|
|
163
165
|
onExited: this.props.onExited
|
|
164
|
-
}, /*#__PURE__*/React__default[
|
|
166
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
165
167
|
ref: this.props.forwardRef,
|
|
166
168
|
className: className,
|
|
167
169
|
onClick: this.props.onClick
|
|
@@ -171,7 +173,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
171
173
|
key: "render",
|
|
172
174
|
value: function render() {
|
|
173
175
|
var element = this.renderElement();
|
|
174
|
-
return this.props.inline ? element : /*#__PURE__*/React__default[
|
|
176
|
+
return this.props.inline ? element : /*#__PURE__*/React__default["default"].createElement(portal.Portal, {
|
|
175
177
|
element: element,
|
|
176
178
|
appendTo: this.props.appendTo
|
|
177
179
|
});
|
|
@@ -188,8 +190,8 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
188
190
|
onClick: null
|
|
189
191
|
});
|
|
190
192
|
|
|
191
|
-
var ColorPickerPanel = /*#__PURE__*/React__default[
|
|
192
|
-
return /*#__PURE__*/React__default[
|
|
193
|
+
var ColorPickerPanel = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
194
|
+
return /*#__PURE__*/React__default["default"].createElement(ColorPickerPanelComponent, _extends({
|
|
193
195
|
forwardRef: ref
|
|
194
196
|
}, props));
|
|
195
197
|
});
|
|
@@ -237,7 +239,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
237
239
|
key: "onPanelClick",
|
|
238
240
|
value: function onPanelClick(event) {
|
|
239
241
|
if (!this.props.inline) {
|
|
240
|
-
|
|
242
|
+
overlayservice.OverlayService.emit('overlay-click', {
|
|
241
243
|
originalEvent: event,
|
|
242
244
|
target: this.container
|
|
243
245
|
});
|
|
@@ -262,7 +264,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
262
264
|
|
|
263
265
|
this.hueDragging = true;
|
|
264
266
|
this.pickHue(event);
|
|
265
|
-
|
|
267
|
+
utils.DomHandler.addClass(this.container, 'p-colorpicker-dragging');
|
|
266
268
|
}
|
|
267
269
|
}, {
|
|
268
270
|
key: "pickHue",
|
|
@@ -296,7 +298,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
296
298
|
|
|
297
299
|
this.colorDragging = true;
|
|
298
300
|
this.pickColor(event);
|
|
299
|
-
|
|
301
|
+
utils.DomHandler.addClass(this.container, 'p-colorpicker-dragging');
|
|
300
302
|
event.preventDefault();
|
|
301
303
|
}
|
|
302
304
|
}, {
|
|
@@ -317,7 +319,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
317
319
|
value: function onDragEnd() {
|
|
318
320
|
this.colorDragging = false;
|
|
319
321
|
this.hueDragging = false;
|
|
320
|
-
|
|
322
|
+
utils.DomHandler.removeClass(this.container, 'p-colorpicker-dragging');
|
|
321
323
|
this.unbindDragListeners();
|
|
322
324
|
}
|
|
323
325
|
}, {
|
|
@@ -468,7 +470,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
468
470
|
}, {
|
|
469
471
|
key: "onOverlayEnter",
|
|
470
472
|
value: function onOverlayEnter() {
|
|
471
|
-
|
|
473
|
+
utils.ZIndexUtils.set('overlay', this.overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
472
474
|
this.alignOverlay();
|
|
473
475
|
}
|
|
474
476
|
}, {
|
|
@@ -489,7 +491,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
489
491
|
}, {
|
|
490
492
|
key: "onOverlayExited",
|
|
491
493
|
value: function onOverlayExited() {
|
|
492
|
-
|
|
494
|
+
utils.ZIndexUtils.clear(this.overlayRef.current);
|
|
493
495
|
this.props.onHide && this.props.onHide();
|
|
494
496
|
}
|
|
495
497
|
}, {
|
|
@@ -548,7 +550,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
548
550
|
var _this3 = this;
|
|
549
551
|
|
|
550
552
|
if (!this.scrollHandler) {
|
|
551
|
-
this.scrollHandler = new
|
|
553
|
+
this.scrollHandler = new utils.ConnectedOverlayScrollHandler(this.container, function () {
|
|
552
554
|
if (_this3.state.overlayVisible) {
|
|
553
555
|
_this3.hide();
|
|
554
556
|
}
|
|
@@ -571,7 +573,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
571
573
|
|
|
572
574
|
if (!this.resizeListener) {
|
|
573
575
|
this.resizeListener = function () {
|
|
574
|
-
if (_this4.state.overlayVisible && !
|
|
576
|
+
if (_this4.state.overlayVisible && !utils.DomHandler.isAndroid()) {
|
|
575
577
|
_this4.hide();
|
|
576
578
|
}
|
|
577
579
|
};
|
|
@@ -632,7 +634,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
632
634
|
value: function onDocumentMouseUp() {
|
|
633
635
|
this.colorDragging = false;
|
|
634
636
|
this.hueDragging = false;
|
|
635
|
-
|
|
637
|
+
utils.DomHandler.removeClass(this.container, 'p-colorpicker-dragging');
|
|
636
638
|
this.unbindDocumentMouseMoveListener();
|
|
637
639
|
this.unbindDocumentMouseUpListener();
|
|
638
640
|
}
|
|
@@ -867,7 +869,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
867
869
|
this.tooltip = null;
|
|
868
870
|
}
|
|
869
871
|
|
|
870
|
-
|
|
872
|
+
utils.ZIndexUtils.clear(this.overlayRef.current);
|
|
871
873
|
}
|
|
872
874
|
}, {
|
|
873
875
|
key: "updateUI",
|
|
@@ -881,13 +883,13 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
881
883
|
key: "alignOverlay",
|
|
882
884
|
value: function alignOverlay() {
|
|
883
885
|
if (this.inputRef && this.inputRef.current) {
|
|
884
|
-
|
|
886
|
+
utils.DomHandler.alignOverlay(this.overlayRef.current, this.inputRef.current.parentElement, this.props.appendTo || PrimeReact__default["default"].appendTo);
|
|
885
887
|
}
|
|
886
888
|
}
|
|
887
889
|
}, {
|
|
888
890
|
key: "renderTooltip",
|
|
889
891
|
value: function renderTooltip() {
|
|
890
|
-
this.tooltip =
|
|
892
|
+
this.tooltip = tooltip.tip({
|
|
891
893
|
target: this.container,
|
|
892
894
|
content: this.props.tooltip,
|
|
893
895
|
options: this.props.tooltipOptions
|
|
@@ -898,7 +900,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
898
900
|
value: function renderColorSelector() {
|
|
899
901
|
var _this5 = this;
|
|
900
902
|
|
|
901
|
-
return /*#__PURE__*/React__default[
|
|
903
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
902
904
|
ref: function ref(el) {
|
|
903
905
|
return _this5.colorSelector = el;
|
|
904
906
|
},
|
|
@@ -907,9 +909,9 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
907
909
|
onTouchStart: this.onColorDragStart,
|
|
908
910
|
onTouchMove: this.onDrag,
|
|
909
911
|
onTouchEnd: this.onDragEnd
|
|
910
|
-
}, /*#__PURE__*/React__default[
|
|
912
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
911
913
|
className: "p-colorpicker-color"
|
|
912
|
-
}, /*#__PURE__*/React__default[
|
|
914
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
913
915
|
ref: function ref(el) {
|
|
914
916
|
return _this5.colorHandle = el;
|
|
915
917
|
},
|
|
@@ -921,7 +923,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
921
923
|
value: function renderHue() {
|
|
922
924
|
var _this6 = this;
|
|
923
925
|
|
|
924
|
-
return /*#__PURE__*/React__default[
|
|
926
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
925
927
|
ref: function ref(el) {
|
|
926
928
|
return _this6.hueView = el;
|
|
927
929
|
},
|
|
@@ -930,7 +932,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
930
932
|
onTouchStart: this.onHueDragStart,
|
|
931
933
|
onTouchMove: this.onDrag,
|
|
932
934
|
onTouchEnd: this.onDragEnd
|
|
933
|
-
}, /*#__PURE__*/React__default[
|
|
935
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
934
936
|
ref: function ref(el) {
|
|
935
937
|
return _this6.hueHandle = el;
|
|
936
938
|
},
|
|
@@ -942,7 +944,7 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
942
944
|
value: function renderContent() {
|
|
943
945
|
var colorSelector = this.renderColorSelector();
|
|
944
946
|
var hue = this.renderHue();
|
|
945
|
-
return /*#__PURE__*/React__default[
|
|
947
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
946
948
|
className: "p-colorpicker-content"
|
|
947
949
|
}, colorSelector, hue);
|
|
948
950
|
}
|
|
@@ -950,11 +952,11 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
950
952
|
key: "renderInput",
|
|
951
953
|
value: function renderInput() {
|
|
952
954
|
if (!this.props.inline) {
|
|
953
|
-
var inputClassName =
|
|
955
|
+
var inputClassName = utils.classNames('p-colorpicker-preview p-inputtext', {
|
|
954
956
|
'p-disabled': this.props.disabled
|
|
955
957
|
});
|
|
956
|
-
var inputProps =
|
|
957
|
-
return /*#__PURE__*/React__default[
|
|
958
|
+
var inputProps = utils.ObjectUtils.findDiffKeys(this.props, ColorPicker.defaultProps);
|
|
959
|
+
return /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
958
960
|
ref: this.inputRef,
|
|
959
961
|
type: "text",
|
|
960
962
|
className: inputClassName,
|
|
@@ -974,19 +976,19 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
974
976
|
value: function render() {
|
|
975
977
|
var _this7 = this;
|
|
976
978
|
|
|
977
|
-
var containerClassName =
|
|
979
|
+
var containerClassName = utils.classNames('p-colorpicker p-component', {
|
|
978
980
|
'p-colorpicker-overlay': !this.props.inline
|
|
979
981
|
}, this.props.className);
|
|
980
982
|
var content = this.renderContent();
|
|
981
983
|
var input = this.renderInput();
|
|
982
|
-
return /*#__PURE__*/React__default[
|
|
984
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
983
985
|
ref: function ref(el) {
|
|
984
986
|
return _this7.container = el;
|
|
985
987
|
},
|
|
986
988
|
id: this.props.id,
|
|
987
989
|
style: this.props.style,
|
|
988
990
|
className: containerClassName
|
|
989
|
-
}, input, /*#__PURE__*/React__default[
|
|
991
|
+
}, input, /*#__PURE__*/React__default["default"].createElement(ColorPickerPanel, {
|
|
990
992
|
ref: this.overlayRef,
|
|
991
993
|
appendTo: this.props.appendTo,
|
|
992
994
|
inline: this.props.inline,
|
|
@@ -1032,4 +1034,4 @@ this.primereact.colorpicker = (function (exports, React, core, PrimeReact) {
|
|
|
1032
1034
|
|
|
1033
1035
|
return exports;
|
|
1034
1036
|
|
|
1035
|
-
}({}, React, primereact.
|
|
1037
|
+
})({}, React, primereact.utils, primereact.csstransition, primereact.portal, primereact.tooltip, primereact.overlayservice, primereact.api);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.colorpicker=function(e,t,n,o){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(t),s=i(o);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(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})(e)}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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(e){return!1}}var g=function(e){d(s,e);var t,o,i=(t=s,o=m(),function(){var e,n=y(t);if(o){var i=y(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return v(this,e)});function s(){return a(this,s),i.apply(this,arguments)}return c(s,[{key:"renderElement",value:function(){var e=n.classNames("p-colorpicker-panel",{"p-colorpicker-overlay-panel":!this.props.inline,"p-disabled":this.props.disabled});return r.default.createElement(n.CSSTransition,{nodeRef:this.props.forwardRef,classNames:"p-connected-overlay",in:this.props.in,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.props.onEnter,onEntered:this.props.onEntered,onExit:this.props.onExit,onExited:this.props.onExited},r.default.createElement("div",{ref:this.props.forwardRef,className:e,onClick:this.props.onClick},this.props.children))}},{key:"render",value:function(){var e=this.renderElement();return this.props.inline?e:r.default.createElement(n.Portal,{element:e,appendTo:this.props.appendTo})}}]),s}(t.Component);b(g,"defaultProps",{appendTo:null,inline:!1,disabled:!1,onClick:null});var k=r.default.forwardRef((function(e,t){return r.default.createElement(g,u({forwardRef:t},e))}));function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(){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 D=function(e){d(p,e);var o,i,l=(o=p,i=H(),function(){var e,t=y(o);if(i){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(this,e)});function p(e){var n;return a(this,p),(n=l.call(this,e)).state={overlayVisible:!1},n.onInputClick=n.onInputClick.bind(h(n)),n.onInputKeydown=n.onInputKeydown.bind(h(n)),n.onOverlayEnter=n.onOverlayEnter.bind(h(n)),n.onOverlayEntered=n.onOverlayEntered.bind(h(n)),n.onOverlayExit=n.onOverlayExit.bind(h(n)),n.onOverlayExited=n.onOverlayExited.bind(h(n)),n.onPanelClick=n.onPanelClick.bind(h(n)),n.onColorMousedown=n.onColorMousedown.bind(h(n)),n.onHueMousedown=n.onHueMousedown.bind(h(n)),n.onColorDragStart=n.onColorDragStart.bind(h(n)),n.onHueDragStart=n.onHueDragStart.bind(h(n)),n.onDrag=n.onDrag.bind(h(n)),n.onDragEnd=n.onDragEnd.bind(h(n)),n.overlayRef=t.createRef(),n.inputRef=t.createRef(n.props.inputRef),n}return c(p,[{key:"onPanelClick",value:function(e){this.props.inline||n.OverlayService.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"onHueMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onHueDragStart(e))}},{key:"onHueDragStart",value:function(e){this.props.disabled||(this.hueDragging=!0,this.pickHue(e),n.DomHandler.addClass(this.container,"p-colorpicker-dragging"))}},{key:"pickHue",value:function(e){var t=this.hueView.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);this.hsbValue=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150),s:100,b:100}),this.updateColorSelector(),this.updateHue(),this.updateModel()}},{key:"onColorMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onColorDragStart(e))}},{key:"onColorDragStart",value:function(e){this.props.disabled||(this.colorDragging=!0,this.pickColor(e),n.DomHandler.addClass(this.container,"p-colorpicker-dragging"),e.preventDefault())}},{key:"onDrag",value:function(e){this.colorDragging&&(this.pickColor(e),e.preventDefault()),this.hueDragging&&(this.pickHue(e),e.preventDefault())}},{key:"onDragEnd",value:function(){this.colorDragging=!1,this.hueDragging=!1,n.DomHandler.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDragListeners()}},{key:"bindDragListeners",value:function(){this.bindDocumentMouseMoveListener(),this.bindDocumentMouseUpListener()}},{key:"unbindDragListeners",value:function(){this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"pickColor",value:function(e){var t=this.colorSelector.getBoundingClientRect(),n=t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),o=t.left+document.body.scrollLeft,i=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-o))/150),r=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150);this.hsbValue=this.validateHSB({h:this.hsbValue.h,s:i,b:r}),this.updateColorHandle(),this.updateInput(),this.updateModel()}},{key:"updateModel",value:function(){switch(this.props.format){case"hex":this.onChange(this.HSBtoHEX(this.hsbValue));break;case"rgb":this.onChange(this.HSBtoRGB(this.hsbValue));break;case"hsb":this.onChange(this.hsbValue)}}},{key:"toHSB",value:function(e){var t;if(e)switch(this.props.format){case"hex":t=this.HEXtoHSB(e);break;case"rgb":t=this.RGBtoHSB(e);break;case"hsb":t=e}else t=this.HEXtoHSB(this.props.defaultColor);return t}},{key:"updateHSBValue",value:function(e){this.hsbValue=this.toHSB(e)}},{key:"areHSBEqual",value:function(e,t){return e.h===t.h&&e.s===t.s&&e.b===t.b}},{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange({value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"updateColorSelector",value:function(){if(this.colorSelector){var e=this.validateHSB({h:this.hsbValue.h,s:100,b:100});this.colorSelector.style.backgroundColor="#"+this.HSBtoHEX(e)}}},{key:"updateColorHandle",value:function(){this.colorHandle&&(this.colorHandle.style.left=Math.floor(150*this.hsbValue.s/100)+"px",this.colorHandle.style.top=Math.floor(150*(100-this.hsbValue.b)/100)+"px")}},{key:"updateHue",value:function(){this.hueHandle&&(this.hueHandle.style.top=Math.floor(150-150*this.hsbValue.h/360)+"px")}},{key:"updateInput",value:function(){this.inputRef&&this.inputRef.current&&(this.inputRef.current.style.backgroundColor="#"+this.HSBtoHEX(this.hsbValue))}},{key:"show",value:function(){this.setState({overlayVisible:!0})}},{key:"hide",value:function(){this.setState({overlayVisible:!1})}},{key:"onOverlayEnter",value:function(){n.ZIndexUtils.set("overlay",this.overlayRef.current),this.alignOverlay()}},{key:"onOverlayEntered",value:function(){this.bindDocumentClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindDocumentClickListener(),this.unbindScrollListener(),this.unbindResizeListener()}},{key:"onOverlayExited",value:function(){n.ZIndexUtils.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"onInputClick",value:function(){this.togglePanel()}},{key:"togglePanel",value:function(){this.state.overlayVisible?this.hide():this.show()}},{key:"onInputKeydown",value:function(e){switch(e.which){case 32:this.togglePanel(),e.preventDefault();break;case 27:case 9:this.hide()}}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new n.ConnectedOverlayScrollHandler(this.container,(function(){e.state.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindResizeListener",value:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.state.overlayVisible&&!n.DomHandler.isAndroid()&&e.hide()},window.addEventListener("resize",this.resizeListener))}},{key:"unbindResizeListener",value:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},{key:"isOutsideClicked",value:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.overlayRef&&this.overlayRef.current.contains(e.target))}},{key:"bindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener||(this.documentMouseMoveListener=this.onDocumentMouseMove.bind(this),document.addEventListener("mousemove",this.documentMouseMoveListener))}},{key:"onDocumentMouseMove",value:function(e){this.colorDragging&&this.pickColor(e),this.hueDragging&&this.pickHue(e)}},{key:"unbindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null)}},{key:"bindDocumentMouseUpListener",value:function(){this.documentMouseUpListener||(this.documentMouseUpListener=this.onDocumentMouseUp.bind(this),document.addEventListener("mouseup",this.documentMouseUpListener))}},{key:"onDocumentMouseUp",value:function(){this.colorDragging=!1,this.hueDragging=!1,n.DomHandler.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"unbindDocumentMouseUpListener",value:function(){this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)}},{key:"validateHSB",value:function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}}},{key:"validateRGB",value:function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}}},{key:"validateHEX",value:function(e){var t=6-e.length;if(t>0){for(var n=[],o=0;o<t;o++)n.push("0");n.push(e),e=n.join("")}return e}},{key:"HEXtoRGB",value:function(e){var t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(65280&t)>>8,b:255&t}}},{key:"HEXtoHSB",value:function(e){return this.RGBtoHSB(this.HEXtoRGB(e))}},{key:"RGBtoHSB",value:function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),o=Math.max(e.r,e.g,e.b),i=o-n;return t.b=o,t.s=0!==o?255*i/o:0,t.h=0!==t.s?e.r===o?(e.g-e.b)/i:e.g===o?2+(e.b-e.r)/i:4+(e.r-e.g)/i:-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}},{key:"HSBtoRGB",value:function(e){var t={r:null,g:null,b:null},n=Math.round(e.h),o=Math.round(255*e.s/100),i=Math.round(255*e.b/100);if(0===o)t={r:i,g:i,b:i};else{var r=i,s=(255-o)*i/255,u=n%60*(r-s)/60;360===n&&(n=0),n<60?(t.r=r,t.b=s,t.g=s+u):n<120?(t.g=r,t.b=s,t.r=r-u):n<180?(t.g=r,t.r=s,t.b=s+u):n<240?(t.b=r,t.r=s,t.g=r-u):n<300?(t.b=r,t.g=s,t.r=s+u):n<360?(t.r=r,t.g=s,t.b=r-u):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}},{key:"RGBtoHEX",value:function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var n in t)1===t[n].length&&(t[n]="0"+t[n]);return t.join("")}},{key:"HSBtoHEX",value:function(e){return this.RGBtoHEX(this.HSBtoRGB(e))}},{key:"updateInputRef",value:function(){var e=this.props.inputRef;e&&("function"==typeof e?e(this.inputRef.current):e.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.updateHSBValue(this.props.value),this.updateUI(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){this.colorDragging||this.hueDragging||this.props.value===e.value||this.updateHSBValue(this.props.value),this.updateUI(),e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(E({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),n.ZIndexUtils.clear(this.overlayRef.current)}},{key:"updateUI",value:function(){this.updateHue(),this.updateColorHandle(),this.updateInput(),this.updateColorSelector()}},{key:"alignOverlay",value:function(){this.inputRef&&this.inputRef.current&&n.DomHandler.alignOverlay(this.overlayRef.current,this.inputRef.current.parentElement,this.props.appendTo||s.default.appendTo)}},{key:"renderTooltip",value:function(){this.tooltip=n.tip({target:this.container,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderColorSelector",value:function(){var e=this;return r.default.createElement("div",{ref:function(t){return e.colorSelector=t},className:"p-colorpicker-color-selector",onMouseDown:this.onColorMousedown,onTouchStart:this.onColorDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},r.default.createElement("div",{className:"p-colorpicker-color"},r.default.createElement("div",{ref:function(t){return e.colorHandle=t},className:"p-colorpicker-color-handle"})))}},{key:"renderHue",value:function(){var e=this;return r.default.createElement("div",{ref:function(t){return e.hueView=t},className:"p-colorpicker-hue",onMouseDown:this.onHueMousedown,onTouchStart:this.onHueDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},r.default.createElement("div",{ref:function(t){return e.hueHandle=t},className:"p-colorpicker-hue-handle"}))}},{key:"renderContent",value:function(){var e=this.renderColorSelector(),t=this.renderHue();return r.default.createElement("div",{className:"p-colorpicker-content"},e,t)}},{key:"renderInput",value:function(){if(!this.props.inline){var e=n.classNames("p-colorpicker-preview p-inputtext",{"p-disabled":this.props.disabled}),t=n.ObjectUtils.findDiffKeys(this.props,p.defaultProps);return r.default.createElement("input",u({ref:this.inputRef,type:"text",className:e,readOnly:!0,id:this.props.inputId,tabIndex:this.props.tabIndex,disabled:this.props.disabled,onClick:this.onInputClick,onKeyDown:this.onInputKeydown},t))}return null}},{key:"render",value:function(){var e=this,t=n.classNames("p-colorpicker p-component",{"p-colorpicker-overlay":!this.props.inline},this.props.className),o=this.renderContent(),i=this.renderInput();return r.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,style:this.props.style,className:t},i,r.default.createElement(k,{ref:this.overlayRef,appendTo:this.props.appendTo,inline:this.props.inline,disabled:this.props.disabled,onClick:this.onPanelClick,in:this.props.inline||this.state.overlayVisible,onEnter:this.onOverlayEnter,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited,transitionOptions:this.props.transitionOptions},o))}}]),p}(t.Component);return b(D,"defaultProps",{id:null,inputRef:null,value:null,style:null,className:null,defaultColor:"ff0000",inline:!1,format:"hex",appendTo:null,disabled:!1,tabIndex:null,inputId:null,tooltip:null,tooltipOptions:null,transitionOptions:null,onChange:null,onShow:null,onHide:null}),e.ColorPicker=D,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.core,primereact.api);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.colorpicker=function(e,t,n,o,i,r,s,a){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(t),c=u(a);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},h.apply(this,arguments)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(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 v(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(){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 H=function(e){b(a,e);var t,r,s=(t=a,r=E(),function(){var e,n=k(t);if(r){var o=k(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return g(this,e)});function a(){return p(this,a),s.apply(this,arguments)}return f(a,[{key:"renderElement",value:function(){var e=n.classNames("p-colorpicker-panel",{"p-colorpicker-overlay-panel":!this.props.inline,"p-disabled":this.props.disabled});return l.default.createElement(o.CSSTransition,{nodeRef:this.props.forwardRef,classNames:"p-connected-overlay",in:this.props.in,timeout:{enter:120,exit:100},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.props.onEnter,onEntered:this.props.onEntered,onExit:this.props.onExit,onExited:this.props.onExited},l.default.createElement("div",{ref:this.props.forwardRef,className:e,onClick:this.props.onClick},this.props.children))}},{key:"render",value:function(){var e=this.renderElement();return this.props.inline?e:l.default.createElement(i.Portal,{element:e,appendTo:this.props.appendTo})}}]),a}(t.Component);M(H,"defaultProps",{appendTo:null,inline:!1,disabled:!1,onClick:null});var D=l.default.forwardRef((function(e,t){return l.default.createElement(H,h({forwardRef:t},e))}));function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(){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 L=function(e){b(u,e);var o,i,a=(o=u,i=S(),function(){var e,t=k(o);if(i){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function u(e){var n;return p(this,u),(n=a.call(this,e)).state={overlayVisible:!1},n.onInputClick=n.onInputClick.bind(v(n)),n.onInputKeydown=n.onInputKeydown.bind(v(n)),n.onOverlayEnter=n.onOverlayEnter.bind(v(n)),n.onOverlayEntered=n.onOverlayEntered.bind(v(n)),n.onOverlayExit=n.onOverlayExit.bind(v(n)),n.onOverlayExited=n.onOverlayExited.bind(v(n)),n.onPanelClick=n.onPanelClick.bind(v(n)),n.onColorMousedown=n.onColorMousedown.bind(v(n)),n.onHueMousedown=n.onHueMousedown.bind(v(n)),n.onColorDragStart=n.onColorDragStart.bind(v(n)),n.onHueDragStart=n.onHueDragStart.bind(v(n)),n.onDrag=n.onDrag.bind(v(n)),n.onDragEnd=n.onDragEnd.bind(v(n)),n.overlayRef=t.createRef(),n.inputRef=t.createRef(n.props.inputRef),n}return f(u,[{key:"onPanelClick",value:function(e){this.props.inline||s.OverlayService.emit("overlay-click",{originalEvent:e,target:this.container})}},{key:"onHueMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onHueDragStart(e))}},{key:"onHueDragStart",value:function(e){this.props.disabled||(this.hueDragging=!0,this.pickHue(e),n.DomHandler.addClass(this.container,"p-colorpicker-dragging"))}},{key:"pickHue",value:function(e){var t=this.hueView.getBoundingClientRect().top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);this.hsbValue=this.validateHSB({h:Math.floor(360*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-t)))/150),s:100,b:100}),this.updateColorSelector(),this.updateHue(),this.updateModel()}},{key:"onColorMousedown",value:function(e){this.props.disabled||(this.bindDragListeners(),this.onColorDragStart(e))}},{key:"onColorDragStart",value:function(e){this.props.disabled||(this.colorDragging=!0,this.pickColor(e),n.DomHandler.addClass(this.container,"p-colorpicker-dragging"),e.preventDefault())}},{key:"onDrag",value:function(e){this.colorDragging&&(this.pickColor(e),e.preventDefault()),this.hueDragging&&(this.pickHue(e),e.preventDefault())}},{key:"onDragEnd",value:function(){this.colorDragging=!1,this.hueDragging=!1,n.DomHandler.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDragListeners()}},{key:"bindDragListeners",value:function(){this.bindDocumentMouseMoveListener(),this.bindDocumentMouseUpListener()}},{key:"unbindDragListeners",value:function(){this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"pickColor",value:function(e){var t=this.colorSelector.getBoundingClientRect(),n=t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),o=t.left+document.body.scrollLeft,i=Math.floor(100*Math.max(0,Math.min(150,(e.pageX||e.changedTouches[0].pageX)-o))/150),r=Math.floor(100*(150-Math.max(0,Math.min(150,(e.pageY||e.changedTouches[0].pageY)-n)))/150);this.hsbValue=this.validateHSB({h:this.hsbValue.h,s:i,b:r}),this.updateColorHandle(),this.updateInput(),this.updateModel()}},{key:"updateModel",value:function(){switch(this.props.format){case"hex":this.onChange(this.HSBtoHEX(this.hsbValue));break;case"rgb":this.onChange(this.HSBtoRGB(this.hsbValue));break;case"hsb":this.onChange(this.hsbValue)}}},{key:"toHSB",value:function(e){var t;if(e)switch(this.props.format){case"hex":t=this.HEXtoHSB(e);break;case"rgb":t=this.RGBtoHSB(e);break;case"hsb":t=e}else t=this.HEXtoHSB(this.props.defaultColor);return t}},{key:"updateHSBValue",value:function(e){this.hsbValue=this.toHSB(e)}},{key:"areHSBEqual",value:function(e,t){return e.h===t.h&&e.s===t.s&&e.b===t.b}},{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange({value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"updateColorSelector",value:function(){if(this.colorSelector){var e=this.validateHSB({h:this.hsbValue.h,s:100,b:100});this.colorSelector.style.backgroundColor="#"+this.HSBtoHEX(e)}}},{key:"updateColorHandle",value:function(){this.colorHandle&&(this.colorHandle.style.left=Math.floor(150*this.hsbValue.s/100)+"px",this.colorHandle.style.top=Math.floor(150*(100-this.hsbValue.b)/100)+"px")}},{key:"updateHue",value:function(){this.hueHandle&&(this.hueHandle.style.top=Math.floor(150-150*this.hsbValue.h/360)+"px")}},{key:"updateInput",value:function(){this.inputRef&&this.inputRef.current&&(this.inputRef.current.style.backgroundColor="#"+this.HSBtoHEX(this.hsbValue))}},{key:"show",value:function(){this.setState({overlayVisible:!0})}},{key:"hide",value:function(){this.setState({overlayVisible:!1})}},{key:"onOverlayEnter",value:function(){n.ZIndexUtils.set("overlay",this.overlayRef.current,c.default.autoZIndex,c.default.zIndex.overlay),this.alignOverlay()}},{key:"onOverlayEntered",value:function(){this.bindDocumentClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.props.onShow&&this.props.onShow()}},{key:"onOverlayExit",value:function(){this.unbindDocumentClickListener(),this.unbindScrollListener(),this.unbindResizeListener()}},{key:"onOverlayExited",value:function(){n.ZIndexUtils.clear(this.overlayRef.current),this.props.onHide&&this.props.onHide()}},{key:"onInputClick",value:function(){this.togglePanel()}},{key:"togglePanel",value:function(){this.state.overlayVisible?this.hide():this.show()}},{key:"onInputKeydown",value:function(e){switch(e.which){case 32:this.togglePanel(),e.preventDefault();break;case 27:case 9:this.hide()}}},{key:"bindDocumentClickListener",value:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.state.overlayVisible&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.documentClickListener))}},{key:"unbindDocumentClickListener",value:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new n.ConnectedOverlayScrollHandler(this.container,(function(){e.state.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindResizeListener",value:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.state.overlayVisible&&!n.DomHandler.isAndroid()&&e.hide()},window.addEventListener("resize",this.resizeListener))}},{key:"unbindResizeListener",value:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},{key:"isOutsideClicked",value:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.overlayRef&&this.overlayRef.current.contains(e.target))}},{key:"bindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener||(this.documentMouseMoveListener=this.onDocumentMouseMove.bind(this),document.addEventListener("mousemove",this.documentMouseMoveListener))}},{key:"onDocumentMouseMove",value:function(e){this.colorDragging&&this.pickColor(e),this.hueDragging&&this.pickHue(e)}},{key:"unbindDocumentMouseMoveListener",value:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null)}},{key:"bindDocumentMouseUpListener",value:function(){this.documentMouseUpListener||(this.documentMouseUpListener=this.onDocumentMouseUp.bind(this),document.addEventListener("mouseup",this.documentMouseUpListener))}},{key:"onDocumentMouseUp",value:function(){this.colorDragging=!1,this.hueDragging=!1,n.DomHandler.removeClass(this.container,"p-colorpicker-dragging"),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener()}},{key:"unbindDocumentMouseUpListener",value:function(){this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)}},{key:"validateHSB",value:function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}}},{key:"validateRGB",value:function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}}},{key:"validateHEX",value:function(e){var t=6-e.length;if(t>0){for(var n=[],o=0;o<t;o++)n.push("0");n.push(e),e=n.join("")}return e}},{key:"HEXtoRGB",value:function(e){var t=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:t>>16,g:(65280&t)>>8,b:255&t}}},{key:"HEXtoHSB",value:function(e){return this.RGBtoHSB(this.HEXtoRGB(e))}},{key:"RGBtoHSB",value:function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),o=Math.max(e.r,e.g,e.b),i=o-n;return t.b=o,t.s=0!==o?255*i/o:0,t.h=0!==t.s?e.r===o?(e.g-e.b)/i:e.g===o?2+(e.b-e.r)/i:4+(e.r-e.g)/i:-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}},{key:"HSBtoRGB",value:function(e){var t={r:null,g:null,b:null},n=Math.round(e.h),o=Math.round(255*e.s/100),i=Math.round(255*e.b/100);if(0===o)t={r:i,g:i,b:i};else{var r=i,s=(255-o)*i/255,a=n%60*(r-s)/60;360===n&&(n=0),n<60?(t.r=r,t.b=s,t.g=s+a):n<120?(t.g=r,t.b=s,t.r=r-a):n<180?(t.g=r,t.r=s,t.b=s+a):n<240?(t.b=r,t.r=s,t.g=r-a):n<300?(t.b=r,t.g=s,t.r=s+a):n<360?(t.r=r,t.g=s,t.b=r-a):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}},{key:"RGBtoHEX",value:function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];for(var n in t)1===t[n].length&&(t[n]="0"+t[n]);return t.join("")}},{key:"HSBtoHEX",value:function(e){return this.RGBtoHEX(this.HSBtoRGB(e))}},{key:"updateInputRef",value:function(){var e=this.props.inputRef;e&&("function"==typeof e?e(this.inputRef.current):e.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.updateHSBValue(this.props.value),this.updateUI(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){this.colorDragging||this.hueDragging||this.props.value===e.value||this.updateHSBValue(this.props.value),this.updateUI(),e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(O({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.unbindDocumentClickListener(),this.unbindDocumentMouseMoveListener(),this.unbindDocumentMouseUpListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),n.ZIndexUtils.clear(this.overlayRef.current)}},{key:"updateUI",value:function(){this.updateHue(),this.updateColorHandle(),this.updateInput(),this.updateColorSelector()}},{key:"alignOverlay",value:function(){this.inputRef&&this.inputRef.current&&n.DomHandler.alignOverlay(this.overlayRef.current,this.inputRef.current.parentElement,this.props.appendTo||c.default.appendTo)}},{key:"renderTooltip",value:function(){this.tooltip=r.tip({target:this.container,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderColorSelector",value:function(){var e=this;return l.default.createElement("div",{ref:function(t){return e.colorSelector=t},className:"p-colorpicker-color-selector",onMouseDown:this.onColorMousedown,onTouchStart:this.onColorDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},l.default.createElement("div",{className:"p-colorpicker-color"},l.default.createElement("div",{ref:function(t){return e.colorHandle=t},className:"p-colorpicker-color-handle"})))}},{key:"renderHue",value:function(){var e=this;return l.default.createElement("div",{ref:function(t){return e.hueView=t},className:"p-colorpicker-hue",onMouseDown:this.onHueMousedown,onTouchStart:this.onHueDragStart,onTouchMove:this.onDrag,onTouchEnd:this.onDragEnd},l.default.createElement("div",{ref:function(t){return e.hueHandle=t},className:"p-colorpicker-hue-handle"}))}},{key:"renderContent",value:function(){var e=this.renderColorSelector(),t=this.renderHue();return l.default.createElement("div",{className:"p-colorpicker-content"},e,t)}},{key:"renderInput",value:function(){if(!this.props.inline){var e=n.classNames("p-colorpicker-preview p-inputtext",{"p-disabled":this.props.disabled}),t=n.ObjectUtils.findDiffKeys(this.props,u.defaultProps);return l.default.createElement("input",h({ref:this.inputRef,type:"text",className:e,readOnly:!0,id:this.props.inputId,tabIndex:this.props.tabIndex,disabled:this.props.disabled,onClick:this.onInputClick,onKeyDown:this.onInputKeydown},t))}return null}},{key:"render",value:function(){var e=this,t=n.classNames("p-colorpicker p-component",{"p-colorpicker-overlay":!this.props.inline},this.props.className),o=this.renderContent(),i=this.renderInput();return l.default.createElement("div",{ref:function(t){return e.container=t},id:this.props.id,style:this.props.style,className:t},i,l.default.createElement(D,{ref:this.overlayRef,appendTo:this.props.appendTo,inline:this.props.inline,disabled:this.props.disabled,onClick:this.onPanelClick,in:this.props.inline||this.state.overlayVisible,onEnter:this.onOverlayEnter,onEntered:this.onOverlayEntered,onExit:this.onOverlayExit,onExited:this.onOverlayExited,transitionOptions:this.props.transitionOptions},o))}}]),u}(t.Component);return M(L,"defaultProps",{id:null,inputRef:null,value:null,style:null,className:null,defaultColor:"ff0000",inline:!1,format:"hex",appendTo:null,disabled:!1,tabIndex:null,inputId:null,tooltip:null,tooltipOptions:null,transitionOptions:null,onChange:null,onShow:null,onHide:null}),e.ColorPicker=L,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.csstransition,primereact.portal,primereact.tooltip,primereact.overlayservice,primereact.api);
|
package/column/column.cjs.js
CHANGED
|
@@ -61,6 +61,8 @@ function _assertThisInitialized(self) {
|
|
|
61
61
|
function _possibleConstructorReturn(self, call) {
|
|
62
62
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
63
63
|
return call;
|
|
64
|
+
} else if (call !== void 0) {
|
|
65
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
return _assertThisInitialized(self);
|
|
@@ -112,13 +114,13 @@ _defineProperty(Column, "defaultProps", {
|
|
|
112
114
|
filterField: null,
|
|
113
115
|
header: null,
|
|
114
116
|
body: null,
|
|
115
|
-
loadingBody: null,
|
|
116
117
|
footer: null,
|
|
117
118
|
sortable: false,
|
|
118
119
|
sortableDisabled: false,
|
|
119
120
|
sortFunction: null,
|
|
121
|
+
dataType: 'text',
|
|
120
122
|
filter: false,
|
|
121
|
-
filterMatchMode:
|
|
123
|
+
filterMatchMode: null,
|
|
122
124
|
filterPlaceholder: null,
|
|
123
125
|
filterType: 'text',
|
|
124
126
|
filterMaxLength: null,
|
|
@@ -126,6 +128,29 @@ _defineProperty(Column, "defaultProps", {
|
|
|
126
128
|
filterFunction: null,
|
|
127
129
|
filterHeaderStyle: null,
|
|
128
130
|
filterHeaderClassName: null,
|
|
131
|
+
showFilterMenu: true,
|
|
132
|
+
showFilterOperator: true,
|
|
133
|
+
showClearButton: true,
|
|
134
|
+
showApplyButton: true,
|
|
135
|
+
showFilterMatchModes: true,
|
|
136
|
+
showFilterMenuOptions: true,
|
|
137
|
+
showAddButton: true,
|
|
138
|
+
filterMatchModeOptions: null,
|
|
139
|
+
maxConstraints: 2,
|
|
140
|
+
filterMenuClassName: null,
|
|
141
|
+
filterMenuStyle: null,
|
|
142
|
+
alignFrozen: 'left',
|
|
143
|
+
hidden: false,
|
|
144
|
+
onFilterClear: null,
|
|
145
|
+
onFilterApplyClick: null,
|
|
146
|
+
onFilterMatchModeChange: null,
|
|
147
|
+
onFilterOperatorChange: null,
|
|
148
|
+
onFilterConstraintAdd: null,
|
|
149
|
+
onFilterConstraintRemove: null,
|
|
150
|
+
filterClear: null,
|
|
151
|
+
filterApply: null,
|
|
152
|
+
filterHeader: null,
|
|
153
|
+
filterFooter: null,
|
|
129
154
|
style: null,
|
|
130
155
|
className: null,
|
|
131
156
|
headerStyle: null,
|
|
@@ -140,13 +165,13 @@ _defineProperty(Column, "defaultProps", {
|
|
|
140
165
|
colSpan: null,
|
|
141
166
|
rowSpan: null,
|
|
142
167
|
editor: null,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
168
|
+
cellEditValidator: null,
|
|
169
|
+
cellEditValidatorEvent: 'click',
|
|
170
|
+
onBeforeCellEditHide: null,
|
|
171
|
+
onBeforeCellEditShow: null,
|
|
172
|
+
onCellEditInit: null,
|
|
173
|
+
onCellEditComplete: null,
|
|
174
|
+
onCellEditCancel: null,
|
|
150
175
|
excludeGlobalFilter: false,
|
|
151
176
|
rowReorder: false,
|
|
152
177
|
rowReorderIcon: 'pi pi-bars',
|
package/column/column.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function r(e){return r="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},r(e)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var c,f,s,p=function(l){n(f,e.Component);var r,o,c=(r=f,o=a(),function(){var e,t=i(r);if(o){var l=i(this).constructor;e=Reflect.construct(t,arguments,l)}else e=t.apply(this,arguments);return u(this,e)});function f(){return t(this,f),c.apply(this,arguments)}return f}();s={columnKey:null,field:null,sortField:null,filterField:null,header:null,body:null,footer:null,sortable:!1,sortableDisabled:!1,sortFunction:null,dataType:"text",filter:!1,filterMatchMode:null,filterPlaceholder:null,filterType:"text",filterMaxLength:null,filterElement:null,filterFunction:null,filterHeaderStyle:null,filterHeaderClassName:null,showFilterMenu:!0,showFilterOperator:!0,showClearButton:!0,showApplyButton:!0,showFilterMatchModes:!0,showFilterMenuOptions:!0,showAddButton:!0,filterMatchModeOptions:null,maxConstraints:2,filterMenuClassName:null,filterMenuStyle:null,alignFrozen:"left",hidden:!1,onFilterClear:null,onFilterApplyClick:null,onFilterMatchModeChange:null,onFilterOperatorChange:null,onFilterConstraintAdd:null,onFilterConstraintRemove:null,filterClear:null,filterApply:null,filterHeader:null,filterFooter:null,style:null,className:null,headerStyle:null,headerClassName:null,bodyStyle:null,bodyClassName:null,footerStyle:null,footerClassName:null,expander:!1,frozen:!1,selectionMode:null,colSpan:null,rowSpan:null,editor:null,cellEditValidator:null,cellEditValidatorEvent:"click",onBeforeCellEditHide:null,onBeforeCellEditShow:null,onCellEditInit:null,onCellEditComplete:null,onCellEditCancel:null,excludeGlobalFilter:!1,rowReorder:!1,rowReorderIcon:"pi pi-bars",rowEditor:!1,exportable:!0,reorderable:!0},(f="defaultProps")in(c=p)?Object.defineProperty(c,f,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[f]=s,exports.Column=p;
|