primereact 6.6.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -9
- package/accordion/accordion.cjs.js +32 -23
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +3 -2
- package/accordion/accordion.esm.js +17 -8
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +32 -24
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +374 -42
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +126 -32
- package/api/api.esm.js +371 -43
- package/api/api.esm.min.js +1 -1
- package/api/api.js +374 -44
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +79 -69
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +3 -1
- package/autocomplete/autocomplete.esm.js +15 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +75 -70
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +12 -9
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +7 -4
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +13 -10
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +5 -3
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +6 -4
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +5 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +6 -4
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +19 -13
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +7 -2
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +18 -14
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +18 -16
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +19 -17
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -53
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -42
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -54
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +183 -153
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -1
- package/calendar/calendar.esm.js +57 -27
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +179 -154
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +3 -1
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +2 -0
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +4 -2
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +15 -13
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +16 -14
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +39 -36
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +39 -37
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +53 -47
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +8 -2
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +50 -48
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +8 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +3 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +7 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +22 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +15 -8
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +22 -16
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +18 -14
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +13 -9
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +19 -15
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +48 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +39 -11
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +48 -21
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +37 -31
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/colorpicker/colorpicker.esm.js +8 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +34 -32
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +34 -9
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +168 -13
- package/column/column.esm.js +34 -9
- package/column/column.esm.min.js +1 -1
- package/column/column.js +35 -10
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +2 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +2 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +3 -1
- package/columngroup/columngroup.min.js +1 -1
- package/common/common.min.css +1 -1
- package/confirmdialog/confirmdialog.cjs.js +24 -20
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +8 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +24 -21
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +47 -40
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +4 -3
- package/confirmpopup/confirmpopup.esm.js +12 -6
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +44 -40
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +70 -63
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +37 -31
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +67 -64
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11745 -1573
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +3 -1
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.esm.js +2 -0
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +4 -2
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +14 -11
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +6 -3
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +14 -12
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +4784 -3277
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +100 -29
- package/datatable/datatable.esm.js +4859 -3353
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4777 -3278
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +34 -29
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +8 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -30
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +3 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -0
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +4 -2
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +68 -51
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +1 -0
- package/dialog/dialog.esm.js +22 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +65 -52
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +6 -4
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +7 -5
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +53 -17
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +41 -5
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +53 -18
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +90 -76
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +28 -14
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +86 -77
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +40 -40
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +4 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +39 -37
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +19 -15
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +5 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +18 -16
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +65 -56
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +2 -1
- package/fileupload/fileupload.esm.js +26 -17
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +65 -57
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +8 -8
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +3 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +7 -5
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +72 -65
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +8 -2
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +69 -66
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +3 -1
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +2 -0
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +4 -2
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +33 -27
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +5 -5
- package/image/image.esm.js +7 -2
- package/image/image.esm.min.js +1 -1
- package/image/image.js +31 -28
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +10 -8
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +3 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +11 -9
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +11 -8
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +4 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +11 -9
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +50 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +33 -12
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +49 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +17 -12
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +10 -5
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +17 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +14 -10
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +5 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +13 -11
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +12 -9
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +4 -1
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +12 -10
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +5 -5
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +1 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +6 -6
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +9 -7
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +3 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +10 -8
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +44 -39
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +9 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +42 -40
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +38 -35
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +4 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +38 -36
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +55 -46
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +10 -2
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +50 -47
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +35 -28
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +2 -0
- package/menu/menu.esm.js +8 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +32 -29
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +40 -35
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +6 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +39 -36
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +11 -8
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +5 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +12 -9
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +21 -17
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +5 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +20 -18
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +132 -118
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +6 -2
- package/multiselect/multiselect.esm.js +47 -33
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +128 -119
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +16 -13
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +4 -1
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +16 -14
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +37 -34
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +4 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +37 -35
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +28 -26
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +3 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +29 -27
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +33 -24
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +1 -1
- package/overlaypanel/overlaypanel.esm.js +10 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +29 -25
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.cjs.js +2 -2
- package/overlayservice/overlayservice.cjs.min.js +1 -1
- package/overlayservice/overlayservice.esm.js +1 -1
- package/overlayservice/overlayservice.esm.min.js +1 -1
- package/overlayservice/overlayservice.js +3 -3
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +10 -4
- package/paginator/paginator.cjs.js +51 -48
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +5 -2
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +51 -49
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +21 -17
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +5 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +20 -18
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +42 -39
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +4 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +42 -40
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +35 -29
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +8 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +32 -30
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +60 -54
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +16 -10
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +60 -55
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +7 -3
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +6 -2
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +8 -4
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +8041 -5835
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +6905 -4701
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +8040 -5832
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +11 -9
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +12 -10
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +7 -5
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +3 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +8 -6
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +12 -9
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +4 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +12 -10
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +12 -9
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +6 -3
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +12 -10
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +430 -238
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +158 -27
- package/resources/themes/arya-green/theme.css +158 -27
- package/resources/themes/arya-orange/theme.css +158 -27
- package/resources/themes/arya-purple/theme.css +158 -27
- package/resources/themes/bootstrap4-dark-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-dark-purple/theme.css +162 -31
- package/resources/themes/bootstrap4-light-blue/theme.css +162 -31
- package/resources/themes/bootstrap4-light-purple/theme.css +162 -31
- package/resources/themes/fluent-light/theme.css +158 -27
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5671 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5671 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5671 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5671 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5671 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5671 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5671 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5671 -0
- package/resources/themes/luna-amber/theme.css +162 -31
- package/resources/themes/luna-blue/theme.css +162 -31
- package/resources/themes/luna-green/theme.css +162 -31
- package/resources/themes/luna-pink/theme.css +162 -31
- package/resources/themes/md-dark-deeppurple/theme.css +347 -56
- package/resources/themes/md-dark-indigo/theme.css +347 -56
- package/resources/themes/md-light-deeppurple/theme.css +347 -56
- package/resources/themes/md-light-indigo/theme.css +347 -56
- package/resources/themes/mdc-dark-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-dark-indigo/theme.css +347 -56
- package/resources/themes/mdc-light-deeppurple/theme.css +347 -56
- package/resources/themes/mdc-light-indigo/theme.css +347 -56
- package/resources/themes/nova/theme.css +162 -31
- package/resources/themes/nova-accent/theme.css +162 -31
- package/resources/themes/nova-alt/theme.css +162 -31
- package/resources/themes/rhea/theme.css +162 -31
- package/resources/themes/saga-blue/theme.css +158 -27
- package/resources/themes/saga-green/theme.css +158 -27
- package/resources/themes/saga-orange/theme.css +158 -27
- package/resources/themes/saga-purple/theme.css +158 -27
- package/resources/themes/tailwind-light/theme.css +162 -31
- package/resources/themes/vela-blue/theme.css +158 -27
- package/resources/themes/vela-green/theme.css +158 -27
- package/resources/themes/vela-orange/theme.css +158 -27
- package/resources/themes/vela-purple/theme.css +158 -27
- package/ripple/ripple.cjs.js +13 -11
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +5 -3
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +14 -12
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +3 -1
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +2 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +4 -2
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +21 -19
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +22 -20
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +20 -13
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +2 -1
- package/scrolltop/scrolltop.esm.js +11 -5
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +18 -14
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +19 -15
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +5 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +18 -16
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +144 -116
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +2 -0
- package/sidebar/sidebar.esm.js +135 -108
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +141 -117
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +5 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +3 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +6 -4
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +39 -32
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +8 -2
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +36 -33
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -23
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -15
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -24
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +22 -19
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +4 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +22 -20
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +39 -33
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +4 -5
- package/splitbutton/splitbutton.esm.js +8 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +36 -34
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +21 -19
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +4 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +22 -20
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +12 -10
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +3 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +13 -11
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +35 -39
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +20 -24
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +36 -40
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +18 -15
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +4 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +18 -16
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +177 -54
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +4 -1
- package/tabview/tabview.esm.js +146 -23
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +177 -55
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +11 -8
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +7 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +12 -9
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +14 -12
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +3 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +15 -13
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.cjs.js +2 -2
- package/terminalservice/terminalservice.cjs.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +3 -3
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +44 -36
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +9 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +40 -37
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +14 -12
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +3 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +15 -13
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +48 -40
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +22 -15
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +46 -41
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +16 -9
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +10 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +15 -10
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +9 -7
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +10 -8
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +36 -31
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +6 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +35 -32
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +54 -51
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +9 -2
- package/tree/tree.esm.js +4 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +54 -52
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +3 -1
- package/treeselect/treeselect.cjs.js +52 -46
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +9 -2
- package/treeselect/treeselect.esm.js +11 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +49 -47
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1290 -272
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +9 -2
- package/treetable/treetable.esm.js +1213 -195
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1288 -273
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +13 -10
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +4 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +13 -11
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +502 -525
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +29 -20
- package/utils/utils.esm.js +501 -524
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +503 -526
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +285 -168
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +21 -9
- package/virtualscroller/virtualscroller.esm.js +278 -161
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +286 -169
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +17 -27
- package/core/core.cjs.js +0 -3080
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -3055
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
package/chip/chip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.chip = (function (exports, React,
|
|
2
|
+
this.primereact.chip = (function (exports, React, utils) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -79,6 +79,8 @@ this.primereact.chip = (function (exports, React, core) {
|
|
|
79
79
|
function _possibleConstructorReturn(self, call) {
|
|
80
80
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
81
81
|
return call;
|
|
82
|
+
} else if (call !== void 0) {
|
|
83
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
return _assertThisInitialized(self);
|
|
@@ -164,35 +166,37 @@ this.primereact.chip = (function (exports, React, core) {
|
|
|
164
166
|
}
|
|
165
167
|
};
|
|
166
168
|
|
|
167
|
-
content.push( /*#__PURE__*/React__default[
|
|
169
|
+
content.push( /*#__PURE__*/React__default["default"].createElement("img", {
|
|
168
170
|
key: "image",
|
|
169
171
|
src: this.props.image,
|
|
170
172
|
alt: this.props.imageAlt,
|
|
171
173
|
onError: onError
|
|
172
174
|
}));
|
|
173
175
|
} else if (this.props.icon) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
content.push(utils.IconUtils.getJSXIcon(this.props.icon, {
|
|
177
|
+
key: 'icon',
|
|
178
|
+
className: 'p-chip-icon'
|
|
179
|
+
}, {
|
|
180
|
+
props: this.props
|
|
178
181
|
}));
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
if (this.props.label) {
|
|
182
|
-
content.push( /*#__PURE__*/React__default[
|
|
185
|
+
content.push( /*#__PURE__*/React__default["default"].createElement("span", {
|
|
183
186
|
key: "label",
|
|
184
187
|
className: "p-chip-text"
|
|
185
188
|
}, this.props.label));
|
|
186
189
|
}
|
|
187
190
|
|
|
188
191
|
if (this.props.removable) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
key: "removeIcon",
|
|
192
|
+
content.push(utils.IconUtils.getJSXIcon(this.props.removeIcon, {
|
|
193
|
+
key: 'removeIcon',
|
|
192
194
|
tabIndex: 0,
|
|
193
|
-
className:
|
|
195
|
+
className: 'p-chip-remove-icon',
|
|
194
196
|
onClick: this.close,
|
|
195
197
|
onKeyDown: this.onKeyDown
|
|
198
|
+
}, {
|
|
199
|
+
props: this.props
|
|
196
200
|
}));
|
|
197
201
|
}
|
|
198
202
|
|
|
@@ -201,11 +205,11 @@ this.primereact.chip = (function (exports, React, core) {
|
|
|
201
205
|
}, {
|
|
202
206
|
key: "renderElement",
|
|
203
207
|
value: function renderElement() {
|
|
204
|
-
var containerClassName =
|
|
208
|
+
var containerClassName = utils.classNames('p-chip p-component', {
|
|
205
209
|
'p-chip-image': this.props.image != null
|
|
206
210
|
}, this.props.className);
|
|
207
|
-
var content = this.props.template ?
|
|
208
|
-
return /*#__PURE__*/React__default[
|
|
211
|
+
var content = this.props.template ? utils.ObjectUtils.getJSXElement(this.props.template, this.props) : this.renderContent();
|
|
212
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
209
213
|
className: containerClassName,
|
|
210
214
|
style: this.props.style
|
|
211
215
|
}, content);
|
|
@@ -240,4 +244,4 @@ this.primereact.chip = (function (exports, React, core) {
|
|
|
240
244
|
|
|
241
245
|
return exports;
|
|
242
246
|
|
|
243
|
-
}({}, React, primereact.
|
|
247
|
+
})({}, React, primereact.utils);
|
package/chip/chip.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,n){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function a(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(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 m,y,b,v=function(e){p(b,e);var t,o,l,u,m,y=(t=b,o=h(),function(){var e,n=f(t);if(o){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)});function b(e){var t;return i(this,b),(t=y.call(this,e)).state={visible:!0},t.close=t.close.bind(c(t)),t.onKeyDown=t.onKeyDown.bind(c(t)),t}return l=b,(u=[{key:"onKeyDown",value:function(e){13===e.keyCode&&this.close(e)}},{key:"close",value:function(e){var t=this;e.persist(),this.setState({visible:!1},(function(){t.props.onRemove&&t.props.onRemove(e)}))}},{key:"renderContent",value:function(){var e=this,t=[];return this.props.image?t.push(r.default.createElement("img",{key:"image",src:this.props.image,alt:this.props.imageAlt,onError:function(t){e.props.onImageError&&e.props.onImageError(t)}})):this.props.icon&&t.push(n.IconUtils.getJSXIcon(this.props.icon,{key:"icon",className:"p-chip-icon"},{props:this.props})),this.props.label&&t.push(r.default.createElement("span",{key:"label",className:"p-chip-text"},this.props.label)),this.props.removable&&t.push(n.IconUtils.getJSXIcon(this.props.removeIcon,{key:"removeIcon",tabIndex:0,className:"p-chip-remove-icon",onClick:this.close,onKeyDown:this.onKeyDown},{props:this.props})),t}},{key:"renderElement",value:function(){var e=n.classNames("p-chip p-component",{"p-chip-image":null!=this.props.image},this.props.className),t=this.props.template?n.ObjectUtils.getJSXElement(this.props.template,this.props):this.renderContent();return r.default.createElement("div",{className:e,style:this.props.style},t)}},{key:"render",value:function(){return this.state.visible&&this.renderElement()}}])&&s(l.prototype,u),m&&s(l,m),b}(t.Component);return b={label:null,icon:null,image:null,removable:!1,removeIcon:"pi pi-times-circle",className:null,style:null,template:null,imageAlt:"chip",onImageError:null,onRemove:null},(y="defaultProps")in(m=v)?Object.defineProperty(m,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):m[y]=b,e.Chip=v,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
|
package/chips/chips.cjs.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var utils = require('primereact/utils');
|
|
7
|
+
var tooltip = require('primereact/tooltip');
|
|
7
8
|
|
|
8
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
10
|
|
|
@@ -117,6 +118,8 @@ function _typeof(obj) {
|
|
|
117
118
|
function _possibleConstructorReturn(self, call) {
|
|
118
119
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
119
120
|
return call;
|
|
121
|
+
} else if (call !== void 0) {
|
|
122
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
return _assertThisInitialized(self);
|
|
@@ -177,7 +180,7 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
177
180
|
_createClass(Chips, [{
|
|
178
181
|
key: "removeItem",
|
|
179
182
|
value: function removeItem(event, index) {
|
|
180
|
-
if (this.props.disabled) {
|
|
183
|
+
if (this.props.disabled && this.props.readOnly) {
|
|
181
184
|
return;
|
|
182
185
|
}
|
|
183
186
|
|
|
@@ -185,6 +188,10 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
185
188
|
|
|
186
189
|
var removedItem = values.splice(index, 1);
|
|
187
190
|
|
|
191
|
+
if (!this.isRemovable(removedItem, index)) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
|
|
188
195
|
if (this.props.onRemove) {
|
|
189
196
|
this.props.onRemove({
|
|
190
197
|
originalEvent: event,
|
|
@@ -346,6 +353,15 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
346
353
|
value: function isFilled() {
|
|
347
354
|
return this.props.value && this.props.value.length || this.inputRef && this.inputRef.current && this.inputRef.current.value && this.inputRef.current.value.length;
|
|
348
355
|
}
|
|
356
|
+
}, {
|
|
357
|
+
key: "isRemovable",
|
|
358
|
+
value: function isRemovable(value, index) {
|
|
359
|
+
return utils.ObjectUtils.getPropValue(this.props.removable, {
|
|
360
|
+
value: value,
|
|
361
|
+
index: index,
|
|
362
|
+
props: this.props
|
|
363
|
+
});
|
|
364
|
+
}
|
|
349
365
|
}, {
|
|
350
366
|
key: "updateInputRef",
|
|
351
367
|
value: function updateInputRef() {
|
|
@@ -395,7 +411,7 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
395
411
|
}, {
|
|
396
412
|
key: "renderTooltip",
|
|
397
413
|
value: function renderTooltip() {
|
|
398
|
-
this.tooltip =
|
|
414
|
+
this.tooltip = tooltip.tip({
|
|
399
415
|
target: this.inputRef.current,
|
|
400
416
|
targetContainer: this.listElement,
|
|
401
417
|
content: this.props.tooltip,
|
|
@@ -403,30 +419,39 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
403
419
|
});
|
|
404
420
|
}
|
|
405
421
|
}, {
|
|
406
|
-
key: "
|
|
407
|
-
value: function
|
|
422
|
+
key: "renderRemoveIcon",
|
|
423
|
+
value: function renderRemoveIcon(value, index) {
|
|
408
424
|
var _this5 = this;
|
|
409
425
|
|
|
426
|
+
if (!this.props.disabled && !this.props.readOnly && this.isRemovable(value, index)) {
|
|
427
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
428
|
+
className: "p-chips-token-icon pi pi-times-circle",
|
|
429
|
+
onClick: function onClick(event) {
|
|
430
|
+
return _this5.removeItem(event, index);
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
return null;
|
|
436
|
+
}
|
|
437
|
+
}, {
|
|
438
|
+
key: "renderItem",
|
|
439
|
+
value: function renderItem(value, index) {
|
|
410
440
|
var content = this.props.itemTemplate ? this.props.itemTemplate(value) : value;
|
|
411
|
-
var icon = this.
|
|
412
|
-
|
|
413
|
-
onClick: function onClick(event) {
|
|
414
|
-
return _this5.removeItem(event, index);
|
|
415
|
-
}
|
|
416
|
-
});
|
|
417
|
-
return /*#__PURE__*/React__default['default'].createElement("li", {
|
|
441
|
+
var icon = this.renderRemoveIcon(value, index);
|
|
442
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
418
443
|
key: index,
|
|
419
444
|
className: "p-chips-token p-highlight"
|
|
420
|
-
}, /*#__PURE__*/React__default[
|
|
445
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
421
446
|
className: "p-chips-token-label"
|
|
422
447
|
}, content), icon);
|
|
423
448
|
}
|
|
424
449
|
}, {
|
|
425
450
|
key: "renderInputElement",
|
|
426
451
|
value: function renderInputElement() {
|
|
427
|
-
return /*#__PURE__*/React__default[
|
|
452
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
428
453
|
className: "p-chips-input-token"
|
|
429
|
-
}, /*#__PURE__*/React__default[
|
|
454
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
430
455
|
ref: this.inputRef,
|
|
431
456
|
placeholder: this.props.placeholder,
|
|
432
457
|
type: "text",
|
|
@@ -436,7 +461,8 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
436
461
|
onPaste: this.onPaste,
|
|
437
462
|
onFocus: this.onFocus,
|
|
438
463
|
onBlur: this.onBlur,
|
|
439
|
-
"aria-labelledby": this.props.ariaLabelledBy
|
|
464
|
+
"aria-labelledby": this.props.ariaLabelledBy,
|
|
465
|
+
readOnly: this.props.readOnly
|
|
440
466
|
}));
|
|
441
467
|
}
|
|
442
468
|
}, {
|
|
@@ -457,13 +483,13 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
457
483
|
value: function renderList() {
|
|
458
484
|
var _this7 = this;
|
|
459
485
|
|
|
460
|
-
var className =
|
|
486
|
+
var className = utils.classNames('p-inputtext p-chips-multiple-container', {
|
|
461
487
|
'p-disabled': this.props.disabled,
|
|
462
488
|
'p-focus': this.state.focused
|
|
463
489
|
});
|
|
464
490
|
var items = this.renderItems();
|
|
465
491
|
var inputElement = this.renderInputElement();
|
|
466
|
-
return /*#__PURE__*/React__default[
|
|
492
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
467
493
|
ref: function ref(el) {
|
|
468
494
|
return _this7.listElement = el;
|
|
469
495
|
},
|
|
@@ -476,12 +502,12 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
476
502
|
value: function render() {
|
|
477
503
|
var _this8 = this;
|
|
478
504
|
|
|
479
|
-
var className =
|
|
505
|
+
var className = utils.classNames('p-chips p-component p-inputwrapper', this.props.className, {
|
|
480
506
|
'p-inputwrapper-filled': this.isFilled(),
|
|
481
507
|
'p-inputwrapper-focus': this.state.focused
|
|
482
508
|
});
|
|
483
509
|
var list = this.renderList();
|
|
484
|
-
return /*#__PURE__*/React__default[
|
|
510
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
485
511
|
ref: function ref(el) {
|
|
486
512
|
return _this8.element = el;
|
|
487
513
|
},
|
|
@@ -503,6 +529,8 @@ _defineProperty(Chips, "defaultProps", {
|
|
|
503
529
|
value: null,
|
|
504
530
|
max: null,
|
|
505
531
|
disabled: null,
|
|
532
|
+
readOnly: false,
|
|
533
|
+
removable: true,
|
|
506
534
|
style: null,
|
|
507
535
|
className: null,
|
|
508
536
|
tooltip: null,
|
package/chips/chips.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils"),n=require("primereact/tooltip");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(t);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t){if(Array.isArray(t))return i(t)}function p(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t){return s(t)||p(t)||l(t)||u()}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function m(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var R=function(r){v(y,t.Component);var i,s,p,l,u,d=(i=y,s=w(),function(){var t,e=b(i);if(s){var n=b(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return m(this,t)});function y(e){var n;return c(this,y),(n=d.call(this,e)).state={focused:!1},n.onWrapperClick=n.onWrapperClick.bind(h(n)),n.onKeyDown=n.onKeyDown.bind(h(n)),n.onPaste=n.onPaste.bind(h(n)),n.onFocus=n.onFocus.bind(h(n)),n.onBlur=n.onBlur.bind(h(n)),n.inputRef=t.createRef(n.props.inputRef),n}return p=y,(l=[{key:"removeItem",value:function(t,e){if(!this.props.disabled||!this.props.readOnly){var n=a(this.props.value),r=n.splice(e,1);this.isRemovable(r,e)&&(this.props.onRemove&&this.props.onRemove({originalEvent:t,value:r}),this.props.onChange&&this.props.onChange({originalEvent:t,value:n,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:n}}))}}},{key:"addItem",value:function(t,e,n){if(e&&e.trim().length){var r=this.props.value?a(this.props.value):[];(this.props.allowDuplicate||-1===r.indexOf(e))&&(r.push(e),this.props.onAdd&&this.props.onAdd({originalEvent:t,value:e})),this.updateInput(t,r,n)}}},{key:"onWrapperClick",value:function(){this.inputRef.current.focus()}},{key:"onKeyDown",value:function(t){var e=t.target.value,n=this.props.value||[];switch(t.which){case 8:0===this.inputRef.current.value.length&&n.length>0&&this.removeItem(t,n.length-1);break;case 13:e&&e.trim().length&&(!this.props.max||this.props.max>n.length)&&this.addItem(t,e,!0);break;default:this.isMaxedOut()?t.preventDefault():this.props.separator&&","===this.props.separator&&188===t.which&&this.addItem(t,e,!0)}}},{key:"updateInput",value:function(t,e,n){this.props.onChange&&this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}}),this.inputRef.current.value="",n&&t.preventDefault()}},{key:"onPaste",value:function(t){var e=this;if(this.props.separator){var n=(t.clipboardData||window.clipboardData).getData("Text");if(n){var r=this.props.value||[],o=n.split(this.props.separator);o=o.filter((function(t){return(e.props.allowDuplicate||-1===r.indexOf(t))&&t.trim().length})),r=[].concat(a(r),a(o)),this.updateInput(t,r,!0)}}}},{key:"onFocus",value:function(t){var e=this;t.persist(),this.setState({focused:!0},(function(){e.props.onFocus&&e.props.onFocus(t)}))}},{key:"onBlur",value:function(t){var e=this;t.persist(),this.setState({focused:!1},(function(){e.props.onBlur&&e.props.onBlur(t)}))}},{key:"isMaxedOut",value:function(){return this.props.max&&this.props.value&&this.props.max===this.props.value.length}},{key:"isFilled",value:function(){return this.props.value&&this.props.value.length||this.inputRef&&this.inputRef.current&&this.inputRef.current.value&&this.inputRef.current.value.length}},{key:"isRemovable",value:function(t,n){return e.ObjectUtils.getPropValue(this.props.removable,{value:t,index:n,props:this.props})}},{key:"updateInputRef",value:function(){var t=this.props.inputRef;t&&("function"==typeof t?t(this.inputRef.current):t.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){var e=this.props.value&&t.value&&t.value.length===this.props.value.length;this.props.tooltip&&(t.tooltip!==this.props.tooltip||t.tooltipOptions!==this.props.tooltipOptions?this.tooltip?this.tooltip.update(k({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip():!e&&this.tooltip&&(this.tooltip.deactivate(),this.tooltip.activate()))}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=n.tip({target:this.inputRef.current,targetContainer:this.listElement,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderRemoveIcon",value:function(t,e){var n=this;return this.props.disabled||this.props.readOnly||!this.isRemovable(t,e)?null:o.default.createElement("span",{className:"p-chips-token-icon pi pi-times-circle",onClick:function(t){return n.removeItem(t,e)}})}},{key:"renderItem",value:function(t,e){var n=this.props.itemTemplate?this.props.itemTemplate(t):t,r=this.renderRemoveIcon(t,e);return o.default.createElement("li",{key:e,className:"p-chips-token p-highlight"},o.default.createElement("span",{className:"p-chips-token-label"},n),r)}},{key:"renderInputElement",value:function(){return o.default.createElement("li",{className:"p-chips-input-token"},o.default.createElement("input",{ref:this.inputRef,placeholder:this.props.placeholder,type:"text",name:this.props.name,disabled:this.props.disabled||this.isMaxedOut(),onKeyDown:this.onKeyDown,onPaste:this.onPaste,onFocus:this.onFocus,onBlur:this.onBlur,"aria-labelledby":this.props.ariaLabelledBy,readOnly:this.props.readOnly}))}},{key:"renderItems",value:function(){var t=this;return this.props.value?this.props.value.map((function(e,n){return t.renderItem(e,n)})):null}},{key:"renderList",value:function(){var t=this,n=e.classNames("p-inputtext p-chips-multiple-container",{"p-disabled":this.props.disabled,"p-focus":this.state.focused}),r=this.renderItems(),i=this.renderInputElement();return o.default.createElement("ul",{ref:function(e){return t.listElement=e},className:n,onClick:this.onWrapperClick},r,i)}},{key:"render",value:function(){var t=this,n=e.classNames("p-chips p-component p-inputwrapper",this.props.className,{"p-inputwrapper-filled":this.isFilled(),"p-inputwrapper-focus":this.state.focused}),r=this.renderList();return o.default.createElement("div",{ref:function(e){return t.element=e},id:this.props.id,className:n,style:this.props.style},r)}}])&&f(p.prototype,l),u&&f(p,u),y}();g(R,"defaultProps",{id:null,inputRef:null,name:null,placeholder:null,value:null,max:null,disabled:null,readOnly:!1,removable:!0,style:null,className:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,separator:null,allowDuplicate:!0,itemTemplate:null,onAdd:null,onRemove:null,onChange:null,onFocus:null,onBlur:null}),exports.Chips=R;
|
package/chips/chips.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import TooltipOptions from '../tooltip/tooltipoptions';
|
|
3
3
|
|
|
4
|
+
type ChipsRemovableType = boolean | ((options: ChipsRemovableOptions) => boolean);
|
|
5
|
+
|
|
6
|
+
interface ChipsRemovableOptions {
|
|
7
|
+
value: any;
|
|
8
|
+
index: number;
|
|
9
|
+
props: ChipsProps;
|
|
10
|
+
}
|
|
11
|
+
|
|
4
12
|
interface ChipsAddParams {
|
|
5
13
|
originalEvent: React.SyntheticEvent;
|
|
6
14
|
value: any;
|
|
@@ -30,6 +38,8 @@ export interface ChipsProps {
|
|
|
30
38
|
value?: any[];
|
|
31
39
|
max?: number;
|
|
32
40
|
disabled?: boolean;
|
|
41
|
+
readOnly?: boolean;
|
|
42
|
+
removable?: ChipsRemovableType;
|
|
33
43
|
style?: object;
|
|
34
44
|
className?: string;
|
|
35
45
|
tooltip?: string;
|
package/chips/chips.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { createRef, Component } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ObjectUtils, classNames } from 'primereact/utils';
|
|
3
|
+
import { tip } from 'primereact/tooltip';
|
|
3
4
|
|
|
4
5
|
function _arrayLikeToArray(arr, len) {
|
|
5
6
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -109,6 +110,8 @@ function _typeof(obj) {
|
|
|
109
110
|
function _possibleConstructorReturn(self, call) {
|
|
110
111
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
111
112
|
return call;
|
|
113
|
+
} else if (call !== void 0) {
|
|
114
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
return _assertThisInitialized(self);
|
|
@@ -169,7 +172,7 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
169
172
|
_createClass(Chips, [{
|
|
170
173
|
key: "removeItem",
|
|
171
174
|
value: function removeItem(event, index) {
|
|
172
|
-
if (this.props.disabled) {
|
|
175
|
+
if (this.props.disabled && this.props.readOnly) {
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
175
178
|
|
|
@@ -177,6 +180,10 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
177
180
|
|
|
178
181
|
var removedItem = values.splice(index, 1);
|
|
179
182
|
|
|
183
|
+
if (!this.isRemovable(removedItem, index)) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
|
|
180
187
|
if (this.props.onRemove) {
|
|
181
188
|
this.props.onRemove({
|
|
182
189
|
originalEvent: event,
|
|
@@ -338,6 +345,15 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
338
345
|
value: function isFilled() {
|
|
339
346
|
return this.props.value && this.props.value.length || this.inputRef && this.inputRef.current && this.inputRef.current.value && this.inputRef.current.value.length;
|
|
340
347
|
}
|
|
348
|
+
}, {
|
|
349
|
+
key: "isRemovable",
|
|
350
|
+
value: function isRemovable(value, index) {
|
|
351
|
+
return ObjectUtils.getPropValue(this.props.removable, {
|
|
352
|
+
value: value,
|
|
353
|
+
index: index,
|
|
354
|
+
props: this.props
|
|
355
|
+
});
|
|
356
|
+
}
|
|
341
357
|
}, {
|
|
342
358
|
key: "updateInputRef",
|
|
343
359
|
value: function updateInputRef() {
|
|
@@ -395,17 +411,26 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
395
411
|
});
|
|
396
412
|
}
|
|
397
413
|
}, {
|
|
398
|
-
key: "
|
|
399
|
-
value: function
|
|
414
|
+
key: "renderRemoveIcon",
|
|
415
|
+
value: function renderRemoveIcon(value, index) {
|
|
400
416
|
var _this5 = this;
|
|
401
417
|
|
|
418
|
+
if (!this.props.disabled && !this.props.readOnly && this.isRemovable(value, index)) {
|
|
419
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
420
|
+
className: "p-chips-token-icon pi pi-times-circle",
|
|
421
|
+
onClick: function onClick(event) {
|
|
422
|
+
return _this5.removeItem(event, index);
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
return null;
|
|
428
|
+
}
|
|
429
|
+
}, {
|
|
430
|
+
key: "renderItem",
|
|
431
|
+
value: function renderItem(value, index) {
|
|
402
432
|
var content = this.props.itemTemplate ? this.props.itemTemplate(value) : value;
|
|
403
|
-
var icon = this.
|
|
404
|
-
className: "p-chips-token-icon pi pi-times-circle",
|
|
405
|
-
onClick: function onClick(event) {
|
|
406
|
-
return _this5.removeItem(event, index);
|
|
407
|
-
}
|
|
408
|
-
});
|
|
433
|
+
var icon = this.renderRemoveIcon(value, index);
|
|
409
434
|
return /*#__PURE__*/React.createElement("li", {
|
|
410
435
|
key: index,
|
|
411
436
|
className: "p-chips-token p-highlight"
|
|
@@ -428,7 +453,8 @@ var Chips = /*#__PURE__*/function (_Component) {
|
|
|
428
453
|
onPaste: this.onPaste,
|
|
429
454
|
onFocus: this.onFocus,
|
|
430
455
|
onBlur: this.onBlur,
|
|
431
|
-
"aria-labelledby": this.props.ariaLabelledBy
|
|
456
|
+
"aria-labelledby": this.props.ariaLabelledBy,
|
|
457
|
+
readOnly: this.props.readOnly
|
|
432
458
|
}));
|
|
433
459
|
}
|
|
434
460
|
}, {
|
|
@@ -495,6 +521,8 @@ _defineProperty(Chips, "defaultProps", {
|
|
|
495
521
|
value: null,
|
|
496
522
|
max: null,
|
|
497
523
|
disabled: null,
|
|
524
|
+
readOnly: false,
|
|
525
|
+
removable: true,
|
|
498
526
|
style: null,
|
|
499
527
|
className: null,
|
|
500
528
|
tooltip: null,
|
package/chips/chips.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{createRef as e,Component as n}from"react";import{
|
|
1
|
+
import t,{createRef as e,Component as n}from"react";import{ObjectUtils as r,classNames as o}from"primereact/utils";import{tip as i}from"primereact/tooltip";function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t){if(Array.isArray(t))return p(t)}function l(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t,e){if(t){if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){return s(t)||l(t)||u(t)||a()}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function b(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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(t){return!1}}var P=function(p){m(O,n);var s,l,u,a,v,y=(s=O,l=R(),function(){var t,e=g(s);if(l){var n=g(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return b(this,t)});function O(t){var n;return h(this,O),(n=y.call(this,t)).state={focused:!1},n.onWrapperClick=n.onWrapperClick.bind(d(n)),n.onKeyDown=n.onKeyDown.bind(d(n)),n.onPaste=n.onPaste.bind(d(n)),n.onFocus=n.onFocus.bind(d(n)),n.onBlur=n.onBlur.bind(d(n)),n.inputRef=e(n.props.inputRef),n}return u=O,(a=[{key:"removeItem",value:function(t,e){if(!this.props.disabled||!this.props.readOnly){var n=c(this.props.value),r=n.splice(e,1);this.isRemovable(r,e)&&(this.props.onRemove&&this.props.onRemove({originalEvent:t,value:r}),this.props.onChange&&this.props.onChange({originalEvent:t,value:n,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:n}}))}}},{key:"addItem",value:function(t,e,n){if(e&&e.trim().length){var r=this.props.value?c(this.props.value):[];(this.props.allowDuplicate||-1===r.indexOf(e))&&(r.push(e),this.props.onAdd&&this.props.onAdd({originalEvent:t,value:e})),this.updateInput(t,r,n)}}},{key:"onWrapperClick",value:function(){this.inputRef.current.focus()}},{key:"onKeyDown",value:function(t){var e=t.target.value,n=this.props.value||[];switch(t.which){case 8:0===this.inputRef.current.value.length&&n.length>0&&this.removeItem(t,n.length-1);break;case 13:e&&e.trim().length&&(!this.props.max||this.props.max>n.length)&&this.addItem(t,e,!0);break;default:this.isMaxedOut()?t.preventDefault():this.props.separator&&","===this.props.separator&&188===t.which&&this.addItem(t,e,!0)}}},{key:"updateInput",value:function(t,e,n){this.props.onChange&&this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}}),this.inputRef.current.value="",n&&t.preventDefault()}},{key:"onPaste",value:function(t){var e=this;if(this.props.separator){var n=(t.clipboardData||window.clipboardData).getData("Text");if(n){var r=this.props.value||[],o=n.split(this.props.separator);o=o.filter((function(t){return(e.props.allowDuplicate||-1===r.indexOf(t))&&t.trim().length})),r=[].concat(c(r),c(o)),this.updateInput(t,r,!0)}}}},{key:"onFocus",value:function(t){var e=this;t.persist(),this.setState({focused:!0},(function(){e.props.onFocus&&e.props.onFocus(t)}))}},{key:"onBlur",value:function(t){var e=this;t.persist(),this.setState({focused:!1},(function(){e.props.onBlur&&e.props.onBlur(t)}))}},{key:"isMaxedOut",value:function(){return this.props.max&&this.props.value&&this.props.max===this.props.value.length}},{key:"isFilled",value:function(){return this.props.value&&this.props.value.length||this.inputRef&&this.inputRef.current&&this.inputRef.current.value&&this.inputRef.current.value.length}},{key:"isRemovable",value:function(t,e){return r.getPropValue(this.props.removable,{value:t,index:e,props:this.props})}},{key:"updateInputRef",value:function(){var t=this.props.inputRef;t&&("function"==typeof t?t(this.inputRef.current):t.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){var e=this.props.value&&t.value&&t.value.length===this.props.value.length;this.props.tooltip&&(t.tooltip!==this.props.tooltip||t.tooltipOptions!==this.props.tooltipOptions?this.tooltip?this.tooltip.update(w({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip():!e&&this.tooltip&&(this.tooltip.deactivate(),this.tooltip.activate()))}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=i({target:this.inputRef.current,targetContainer:this.listElement,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderRemoveIcon",value:function(e,n){var r=this;return this.props.disabled||this.props.readOnly||!this.isRemovable(e,n)?null:t.createElement("span",{className:"p-chips-token-icon pi pi-times-circle",onClick:function(t){return r.removeItem(t,n)}})}},{key:"renderItem",value:function(e,n){var r=this.props.itemTemplate?this.props.itemTemplate(e):e,o=this.renderRemoveIcon(e,n);return t.createElement("li",{key:n,className:"p-chips-token p-highlight"},t.createElement("span",{className:"p-chips-token-label"},r),o)}},{key:"renderInputElement",value:function(){return t.createElement("li",{className:"p-chips-input-token"},t.createElement("input",{ref:this.inputRef,placeholder:this.props.placeholder,type:"text",name:this.props.name,disabled:this.props.disabled||this.isMaxedOut(),onKeyDown:this.onKeyDown,onPaste:this.onPaste,onFocus:this.onFocus,onBlur:this.onBlur,"aria-labelledby":this.props.ariaLabelledBy,readOnly:this.props.readOnly}))}},{key:"renderItems",value:function(){var t=this;return this.props.value?this.props.value.map((function(e,n){return t.renderItem(e,n)})):null}},{key:"renderList",value:function(){var e=this,n=o("p-inputtext p-chips-multiple-container",{"p-disabled":this.props.disabled,"p-focus":this.state.focused}),r=this.renderItems(),i=this.renderInputElement();return t.createElement("ul",{ref:function(t){return e.listElement=t},className:n,onClick:this.onWrapperClick},r,i)}},{key:"render",value:function(){var e=this,n=o("p-chips p-component p-inputwrapper",this.props.className,{"p-inputwrapper-filled":this.isFilled(),"p-inputwrapper-focus":this.state.focused}),r=this.renderList();return t.createElement("div",{ref:function(t){return e.element=t},id:this.props.id,className:n,style:this.props.style},r)}}])&&f(u.prototype,a),v&&f(u,v),O}();O(P,"defaultProps",{id:null,inputRef:null,name:null,placeholder:null,value:null,max:null,disabled:null,readOnly:!1,removable:!0,style:null,className:null,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,separator:null,allowDuplicate:!0,itemTemplate:null,onAdd:null,onRemove:null,onChange:null,onFocus:null,onBlur:null});export{P as Chips};
|