primereact 8.7.2 → 9.0.0-beta.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/accordion/accordion.cjs.js +56 -57
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +168 -25
- package/accordion/accordion.esm.js +56 -57
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +56 -57
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +31 -69
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +11 -3
- package/api/api.esm.js +31 -69
- package/api/api.esm.min.js +1 -1
- package/api/api.js +31 -69
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +100 -157
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +385 -80
- package/autocomplete/autocomplete.esm.js +100 -157
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +100 -157
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +86 -14
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +77 -14
- package/avatar/avatar.esm.js +86 -14
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +86 -14
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +0 -2
- package/avatargroup/avatargroup.d.ts +33 -1
- package/avatargroup/avatargroup.esm.js +0 -2
- package/avatargroup/avatargroup.js +0 -2
- package/badge/badge.cjs.js +27 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +48 -8
- package/badge/badge.esm.js +27 -3
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +27 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +40 -54
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +71 -8
- package/blockui/blockui.esm.js +40 -54
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +40 -54
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +6 -29
- package/breadcrumb/breadcrumb.d.ts +41 -3
- package/breadcrumb/breadcrumb.esm.js +6 -29
- package/breadcrumb/breadcrumb.js +6 -29
- package/button/button.cjs.js +29 -11
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +67 -15
- package/button/button.esm.js +29 -11
- package/button/button.esm.min.js +1 -1
- package/button/button.js +29 -11
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +203 -668
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +585 -110
- package/calendar/calendar.esm.js +203 -668
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +203 -668
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +7 -21
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.d.ts +77 -7
- package/captcha/captcha.esm.js +7 -21
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +7 -21
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +0 -6
- package/card/card.d.ts +45 -7
- package/card/card.esm.js +0 -6
- package/card/card.js +0 -6
- package/carousel/carousel.cjs.js +42 -130
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +138 -22
- package/carousel/carousel.esm.js +42 -130
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +42 -130
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +54 -133
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +177 -29
- package/cascadeselect/cascadeselect.esm.js +54 -133
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +54 -133
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +6 -7
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +88 -10
- package/chart/chart.esm.js +6 -7
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +6 -7
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +31 -41
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +137 -33
- package/checkbox/checkbox.esm.js +32 -42
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +31 -41
- package/checkbox/checkbox.min.css +1 -1
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +26 -41
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +75 -7
- package/chip/chip.esm.js +26 -41
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +26 -41
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +39 -79
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +188 -36
- package/chips/chips.esm.js +39 -79
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +39 -79
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +81 -144
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +150 -31
- package/colorpicker/colorpicker.esm.js +81 -144
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +81 -144
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +736 -134
- package/columngroup/columngroup.d.ts +30 -1
- package/confirmdialog/confirmdialog.cjs.js +60 -60
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +142 -18
- package/confirmdialog/confirmdialog.esm.js +60 -60
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +60 -60
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +78 -95
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +165 -22
- package/confirmpopup/confirmpopup.esm.js +78 -95
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +78 -95
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +79 -121
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +79 -11
- package/contextmenu/contextmenu.esm.js +79 -121
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +79 -121
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1048 -2092
- package/core/core.min.js +15 -15
- package/csstransition/csstransition.cjs.js +27 -13
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +31 -1
- package/csstransition/csstransition.esm.js +27 -13
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +27 -13
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +32 -64
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +102 -16
- package/datascroller/datascroller.esm.js +32 -64
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +32 -64
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +345 -1092
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +1259 -226
- package/datatable/datatable.esm.js +345 -1092
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +345 -1092
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +56 -68
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +222 -43
- package/dataview/dataview.esm.js +56 -68
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +56 -68
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +37 -46
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +37 -1
- package/deferredcontent/deferredcontent.esm.js +37 -46
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +37 -46
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +99 -191
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +282 -51
- package/dialog/dialog.esm.js +100 -192
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +99 -191
- package/dialog/dialog.min.css +1 -1
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +0 -2
- package/divider/divider.d.ts +47 -10
- package/divider/divider.esm.js +0 -2
- package/divider/divider.js +0 -2
- package/dock/dock.cjs.js +31 -53
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +68 -12
- package/dock/dock.esm.js +31 -53
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +31 -53
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +98 -209
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +338 -83
- package/dropdown/dropdown.esm.js +99 -210
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -209
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +31 -22
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +129 -12
- package/editor/editor.esm.js +31 -22
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +31 -22
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +29 -51
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +85 -7
- package/fieldset/fieldset.esm.js +29 -51
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +29 -51
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +49 -128
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +425 -62
- package/fileupload/fileupload.esm.js +49 -128
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +49 -128
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +57 -166
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +198 -30
- package/galleria/galleria.esm.js +57 -166
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +57 -166
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +2 -23
- package/gmap/gmap.d.ts +91 -5
- package/gmap/gmap.esm.js +2 -23
- package/gmap/gmap.js +2 -23
- package/hooks/hooks.cjs.js +101 -131
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +114 -7
- package/hooks/hooks.esm.js +101 -131
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +101 -131
- package/hooks/hooks.min.js +1 -1
- package/image/image.cjs.js +41 -67
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +91 -11
- package/image/image.esm.js +41 -67
- package/image/image.esm.min.js +1 -1
- package/image/image.js +41 -67
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +26 -45
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +101 -9
- package/inplace/inplace.esm.js +26 -45
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +26 -45
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +22 -113
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +120 -28
- package/inputmask/inputmask.esm.js +23 -114
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +22 -113
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +93 -267
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +266 -58
- package/inputnumber/inputnumber.esm.js +94 -268
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +93 -267
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +30 -38
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +118 -27
- package/inputswitch/inputswitch.esm.js +31 -39
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +30 -38
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +0 -11
- package/inputtext/inputtext.d.ts +58 -9
- package/inputtext/inputtext.esm.js +0 -11
- package/inputtext/inputtext.js +0 -11
- package/inputtextarea/inputtextarea.cjs.js +0 -20
- package/inputtextarea/inputtextarea.d.ts +53 -9
- package/inputtextarea/inputtextarea.esm.js +0 -20
- package/inputtextarea/inputtextarea.js +0 -20
- package/keyfilter/keyfilter.cjs.js +4 -15
- package/keyfilter/keyfilter.esm.js +4 -15
- package/keyfilter/keyfilter.js +4 -15
- package/keyfilter/keyfilteroptions.d.ts +15 -0
- package/knob/knob.cjs.js +74 -106
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +127 -20
- package/knob/knob.esm.js +74 -106
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +74 -106
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +97 -125
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +270 -42
- package/listbox/listbox.esm.js +98 -126
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +97 -125
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +36 -99
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +50 -11
- package/megamenu/megamenu.esm.js +36 -99
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +36 -99
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +85 -138
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +187 -33
- package/mention/mention.esm.js +85 -138
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +85 -138
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +41 -73
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +89 -12
- package/menu/menu.esm.js +41 -73
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +41 -73
- package/menu/menu.min.css +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -99
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +53 -8
- package/menubar/menubar.esm.js +49 -99
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +49 -99
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +114 -19
- package/message/message.cjs.js +0 -7
- package/message/message.d.ts +50 -11
- package/message/message.esm.js +0 -7
- package/message/message.js +0 -7
- package/messages/messages.cjs.js +39 -67
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +91 -11
- package/messages/messages.esm.js +39 -67
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +39 -67
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -212
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +433 -81
- package/multiselect/multiselect.esm.js +149 -213
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +148 -212
- package/multiselect/multiselect.min.css +1 -1
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +61 -53
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +157 -22
- package/multistatecheckbox/multistatecheckbox.esm.js +62 -54
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +61 -53
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +38 -103
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +113 -16
- package/orderlist/orderlist.esm.js +38 -103
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +38 -103
- package/orderlist/orderlist.min.css +1 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +26 -52
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +107 -16
- package/organizationchart/organizationchart.esm.js +26 -52
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +26 -52
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +44 -80
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +89 -15
- package/overlaypanel/overlaypanel.esm.js +44 -80
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +44 -80
- package/overlaypanel/overlaypanel.min.css +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.d.ts +52 -7
- package/package.json +2 -2
- package/paginator/paginator.cjs.js +46 -87
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +409 -44
- package/paginator/paginator.esm.js +46 -87
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +46 -87
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +29 -50
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +142 -16
- package/panel/panel.esm.js +29 -50
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +29 -50
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +35 -81
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +46 -4
- package/panelmenu/panelmenu.esm.js +35 -81
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +35 -81
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +61 -108
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +177 -37
- package/password/password.esm.js +61 -108
- package/password/password.esm.min.js +1 -1
- package/password/password.js +61 -108
- package/password/password.min.css +1 -1
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +48 -159
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +272 -46
- package/picklist/picklist.esm.js +48 -159
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +48 -159
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +26 -31
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +26 -31
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +26 -31
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +2541 -7484
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2541 -7484
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2541 -7484
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +0 -7
- package/progressbar/progressbar.d.ts +60 -11
- package/progressbar/progressbar.esm.js +0 -7
- package/progressbar/progressbar.js +0 -7
- package/progressspinner/progressspinner.cjs.js +0 -2
- package/progressspinner/progressspinner.d.ts +47 -4
- package/progressspinner/progressspinner.esm.js +0 -2
- package/progressspinner/progressspinner.js +0 -2
- package/radiobutton/radiobutton.cjs.js +35 -41
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +99 -29
- package/radiobutton/radiobutton.esm.js +35 -41
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +35 -41
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +27 -14
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +101 -24
- package/rating/rating.esm.js +27 -14
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +27 -14
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +121 -64
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +5 -9
- package/resources/themes/arya-green/theme.css +4 -10
- package/resources/themes/arya-orange/theme.css +4 -9
- package/resources/themes/arya-purple/theme.css +4 -9
- package/resources/themes/bootstrap4-dark-blue/theme.css +4 -9
- package/resources/themes/bootstrap4-dark-purple/theme.css +4 -9
- package/resources/themes/bootstrap4-light-blue/theme.css +4 -9
- package/resources/themes/bootstrap4-light-purple/theme.css +4 -10
- package/resources/themes/fluent-light/theme.css +4 -10
- package/resources/themes/lara-dark-blue/theme.css +4 -9
- package/resources/themes/lara-dark-indigo/theme.css +4 -10
- package/resources/themes/lara-dark-purple/theme.css +4 -9
- package/resources/themes/lara-dark-teal/theme.css +4 -10
- package/resources/themes/lara-light-blue/theme.css +4 -9
- package/resources/themes/lara-light-indigo/theme.css +4 -9
- package/resources/themes/lara-light-purple/theme.css +4 -9
- package/resources/themes/lara-light-teal/theme.css +4 -9
- package/resources/themes/luna-amber/theme.css +5 -9
- package/resources/themes/luna-blue/theme.css +4 -9
- package/resources/themes/luna-green/theme.css +5 -9
- package/resources/themes/luna-pink/theme.css +4 -9
- package/resources/themes/md-dark-deeppurple/theme.css +4 -9
- package/resources/themes/md-dark-indigo/theme.css +5 -9
- package/resources/themes/md-light-deeppurple/theme.css +5 -9
- package/resources/themes/md-light-indigo/theme.css +5 -9
- package/resources/themes/mdc-dark-deeppurple/theme.css +5 -9
- package/resources/themes/mdc-dark-indigo/theme.css +4 -9
- package/resources/themes/mdc-light-deeppurple/theme.css +5 -9
- package/resources/themes/mdc-light-indigo/theme.css +4 -9
- package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/mira/theme.css +6237 -0
- package/resources/themes/nano/theme.css +6009 -0
- package/resources/themes/nova/theme.css +4 -9
- package/resources/themes/nova-accent/theme.css +5 -9
- package/resources/themes/nova-alt/theme.css +4 -9
- package/resources/themes/rhea/theme.css +5 -9
- package/resources/themes/saga-blue/theme.css +4 -9
- package/resources/themes/saga-green/theme.css +5 -9
- package/resources/themes/saga-orange/theme.css +5 -9
- package/resources/themes/saga-purple/theme.css +5 -9
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-dark/theme.css +6002 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-light/theme.css +6056 -0
- package/resources/themes/vela-blue/theme.css +4 -9
- package/resources/themes/vela-green/theme.css +4 -9
- package/resources/themes/vela-orange/theme.css +4 -9
- package/resources/themes/vela-purple/theme.css +5 -9
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-dark/theme.css +6164 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-light/theme.css +6164 -0
- package/ripple/ripple.cjs.js +0 -12
- package/ripple/ripple.d.ts +29 -1
- package/ripple/ripple.esm.js +0 -12
- package/ripple/ripple.js +0 -12
- package/row/row.cjs.js +0 -2
- package/row/row.d.ts +37 -3
- package/row/row.esm.js +0 -2
- package/row/row.js +0 -2
- package/scrollpanel/scrollpanel.cjs.js +2 -16
- package/scrollpanel/scrollpanel.d.ts +45 -1
- package/scrollpanel/scrollpanel.esm.js +2 -16
- package/scrollpanel/scrollpanel.js +2 -16
- package/scrolltop/scrolltop.cjs.js +44 -57
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +70 -10
- package/scrolltop/scrolltop.esm.js +44 -57
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +44 -57
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +29 -53
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +111 -32
- package/selectbutton/selectbutton.esm.js +30 -54
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +29 -53
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +34 -0
- package/sidebar/sidebar.cjs.js +65 -84
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +120 -22
- package/sidebar/sidebar.esm.js +65 -84
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +65 -84
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +0 -2
- package/skeleton/skeleton.d.ts +61 -11
- package/skeleton/skeleton.esm.js +0 -2
- package/skeleton/skeleton.js +0 -2
- package/slidemenu/slidemenu.cjs.js +73 -87
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +132 -18
- package/slidemenu/slidemenu.esm.js +73 -87
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +73 -87
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +61 -96
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +101 -18
- package/slider/slider.esm.js +61 -96
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +61 -96
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +70 -89
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +149 -20
- package/speeddial/speeddial.esm.js +70 -89
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +70 -89
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +48 -81
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +131 -23
- package/splitbutton/splitbutton.esm.js +48 -81
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +48 -81
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +72 -85
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +98 -12
- package/splitter/splitter.esm.js +72 -85
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +72 -85
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +0 -14
- package/steps/steps.d.ts +67 -6
- package/steps/steps.esm.js +0 -14
- package/steps/steps.js +0 -14
- package/styleclass/styleclass.cjs.js +75 -111
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +77 -12
- package/styleclass/styleclass.esm.js +75 -111
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +75 -111
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +33 -54
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -5
- package/tabmenu/tabmenu.esm.js +33 -54
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +33 -54
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +84 -103
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +213 -27
- package/tabview/tabview.esm.js +84 -103
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +84 -103
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +27 -4
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +50 -6
- package/tag/tag.esm.js +27 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +27 -4
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +40 -63
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +45 -3
- package/terminal/terminal.esm.js +41 -64
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +40 -63
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +42 -4
- package/tieredmenu/tieredmenu.cjs.js +68 -111
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +77 -12
- package/tieredmenu/tieredmenu.esm.js +68 -111
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +68 -111
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +33 -17
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +62 -13
- package/timeline/timeline.esm.js +33 -17
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +33 -17
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +85 -100
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +134 -27
- package/toast/toast.esm.js +85 -100
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +85 -100
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +4 -8
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +122 -15
- package/togglebutton/togglebutton.esm.js +5 -9
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +4 -8
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +13 -9
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +55 -5
- package/toolbar/toolbar.esm.js +13 -9
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +13 -9
- package/toolbar/toolbar.min.css +1 -1
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +111 -164
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +73 -9
- package/tooltip/tooltip.esm.js +111 -164
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +111 -164
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +350 -31
- package/tree/tree.cjs.js +68 -223
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +435 -71
- package/tree/tree.esm.js +68 -223
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +68 -223
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +62 -12
- package/treeselect/treeselect.cjs.js +124 -168
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +327 -77
- package/treeselect/treeselect.esm.js +125 -169
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +124 -168
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +143 -461
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +501 -112
- package/treetable/treetable.esm.js +143 -461
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +143 -461
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +32 -39
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +72 -20
- package/tristatecheckbox/tristatecheckbox.esm.js +33 -40
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +32 -39
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +24 -0
- package/utils/utils.cjs.js +137 -339
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +8 -1
- package/utils/utils.esm.js +137 -339
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +137 -339
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +108 -204
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +351 -59
- package/virtualscroller/virtualscroller.esm.js +108 -204
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +108 -204
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +173 -41
package/chip/chip.esm.js
CHANGED
|
@@ -5,14 +5,12 @@ function _extends() {
|
|
|
5
5
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
6
6
|
for (var i = 1; i < arguments.length; i++) {
|
|
7
7
|
var source = arguments[i];
|
|
8
|
-
|
|
9
8
|
for (var key in source) {
|
|
10
9
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
10
|
target[key] = source[key];
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
return target;
|
|
17
15
|
};
|
|
18
16
|
return _extends.apply(this, arguments);
|
|
@@ -23,42 +21,40 @@ function _arrayWithHoles(arr) {
|
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
function _iterableToArrayLimit(arr, i) {
|
|
26
|
-
var _i =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
37
|
-
_arr.push(_s.value);
|
|
38
|
-
|
|
39
|
-
if (i && _arr.length === i) break;
|
|
40
|
-
}
|
|
41
|
-
} catch (err) {
|
|
42
|
-
_d = true;
|
|
43
|
-
_e = err;
|
|
44
|
-
} finally {
|
|
24
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
25
|
+
if (null != _i) {
|
|
26
|
+
var _s,
|
|
27
|
+
_e,
|
|
28
|
+
_x,
|
|
29
|
+
_r,
|
|
30
|
+
_arr = [],
|
|
31
|
+
_n = !0,
|
|
32
|
+
_d = !1;
|
|
45
33
|
try {
|
|
46
|
-
if (
|
|
34
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
35
|
+
if (Object(_i) !== _i) return;
|
|
36
|
+
_n = !1;
|
|
37
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
|
|
38
|
+
;
|
|
39
|
+
}
|
|
40
|
+
} catch (err) {
|
|
41
|
+
_d = !0, _e = err;
|
|
47
42
|
} finally {
|
|
48
|
-
|
|
43
|
+
try {
|
|
44
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
45
|
+
} finally {
|
|
46
|
+
if (_d) throw _e;
|
|
47
|
+
}
|
|
49
48
|
}
|
|
49
|
+
return _arr;
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
return _arr;
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
function _arrayLikeToArray(arr, len) {
|
|
56
54
|
if (len == null || len > arr.length) len = arr.length;
|
|
57
|
-
|
|
58
55
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
59
56
|
arr2[i] = arr[i];
|
|
60
57
|
}
|
|
61
|
-
|
|
62
58
|
return arr2;
|
|
63
59
|
}
|
|
64
60
|
|
|
@@ -81,30 +77,24 @@ function _slicedToArray(arr, i) {
|
|
|
81
77
|
|
|
82
78
|
var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
83
79
|
var elementRef = React.useRef(null);
|
|
84
|
-
|
|
85
80
|
var _React$useState = React.useState(true),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
82
|
+
visibleState = _React$useState2[0],
|
|
83
|
+
setVisibleState = _React$useState2[1];
|
|
90
84
|
var onKeyDown = function onKeyDown(event) {
|
|
91
85
|
if (event.keyCode === 13) {
|
|
92
86
|
// enter
|
|
93
87
|
close(event);
|
|
94
88
|
}
|
|
95
89
|
};
|
|
96
|
-
|
|
97
90
|
var close = function close(event) {
|
|
98
91
|
setVisibleState(false);
|
|
99
|
-
|
|
100
92
|
if (props.onRemove) {
|
|
101
93
|
props.onRemove(event);
|
|
102
94
|
}
|
|
103
95
|
};
|
|
104
|
-
|
|
105
96
|
var createContent = function createContent() {
|
|
106
97
|
var content = [];
|
|
107
|
-
|
|
108
98
|
if (props.image) {
|
|
109
99
|
content.push( /*#__PURE__*/React.createElement("img", {
|
|
110
100
|
key: "image",
|
|
@@ -120,14 +110,12 @@ var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (prop
|
|
|
120
110
|
props: props
|
|
121
111
|
}));
|
|
122
112
|
}
|
|
123
|
-
|
|
124
113
|
if (props.label) {
|
|
125
114
|
content.push( /*#__PURE__*/React.createElement("span", {
|
|
126
115
|
key: "label",
|
|
127
116
|
className: "p-chip-text"
|
|
128
117
|
}, props.label));
|
|
129
118
|
}
|
|
130
|
-
|
|
131
119
|
if (props.removable) {
|
|
132
120
|
content.push(IconUtils.getJSXIcon(props.removeIcon, {
|
|
133
121
|
key: 'removeIcon',
|
|
@@ -139,10 +127,8 @@ var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (prop
|
|
|
139
127
|
props: props
|
|
140
128
|
}));
|
|
141
129
|
}
|
|
142
|
-
|
|
143
130
|
return content;
|
|
144
131
|
};
|
|
145
|
-
|
|
146
132
|
var createElement = function createElement() {
|
|
147
133
|
var otherProps = ObjectUtils.findDiffKeys(props, Chip.defaultProps);
|
|
148
134
|
var className = classNames('p-chip p-component', {
|
|
@@ -155,7 +141,6 @@ var Chip = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (prop
|
|
|
155
141
|
style: props.style
|
|
156
142
|
}, otherProps), content);
|
|
157
143
|
};
|
|
158
|
-
|
|
159
144
|
React.useImperativeHandle(ref, function () {
|
|
160
145
|
return {
|
|
161
146
|
props: props,
|
package/chip/chip.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{ObjectUtils as r,classNames as t,IconUtils as n}from"primereact/utils";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}function l(e){if(Array.isArray(e))return e}function a(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,l=[],
|
|
1
|
+
import*as e from"react";import{ObjectUtils as r,classNames as t,IconUtils as n}from"primereact/utils";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(this,arguments)}function l(e){if(Array.isArray(e))return e}function a(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,l,a,i=[],c=!0,u=!1;try{if(l=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=l.call(t)).done)&&(i.push(n.value),i.length!==r);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function c(e,r){if(e){if("string"==typeof e)return i(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,r):void 0}}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var m=e.memo(e.forwardRef((function(i,p){var s,f,y,v,g,h=e.useRef(null),b=e.useState(!0),d=(f=2,l(s=b)||a(s,f)||c(s,f)||u()),I=d[0],E=d[1],S=function(e){13===e.keyCode&&j(e)},j=function(e){E(!1),i.onRemove&&i.onRemove(e)},A=function(){var r=[];return i.image?r.push(e.createElement("img",{key:"image",src:i.image,alt:i.imageAlt,onError:i.onImageError})):i.icon&&r.push(n.getJSXIcon(i.icon,{key:"icon",className:"p-chip-icon"},{props:i})),i.label&&r.push(e.createElement("span",{key:"label",className:"p-chip-text"},i.label)),i.removable&&r.push(n.getJSXIcon(i.removeIcon,{key:"removeIcon",tabIndex:0,className:"p-chip-remove-icon",onClick:j,onKeyDown:S},{props:i})),r};return e.useImperativeHandle(p,(function(){return{props:i,getElement:function(){return h.current}}})),I&&(y=r.findDiffKeys(i,m.defaultProps),v=t("p-chip p-component",{"p-chip-image":null!=i.image},i.className),g=i.template?r.getJSXElement(i.template,i):A(),e.createElement("div",o({ref:h,className:v,style:i.style},y),g))})));m.displayName="Chip",m.defaultProps={__TYPE:"Chip",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};export{m as Chip};
|
package/chip/chip.js
CHANGED
|
@@ -26,14 +26,12 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
26
26
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
27
27
|
for (var i = 1; i < arguments.length; i++) {
|
|
28
28
|
var source = arguments[i];
|
|
29
|
-
|
|
30
29
|
for (var key in source) {
|
|
31
30
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
31
|
target[key] = source[key];
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
return target;
|
|
38
36
|
};
|
|
39
37
|
return _extends.apply(this, arguments);
|
|
@@ -44,42 +42,40 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
function _iterableToArrayLimit(arr, i) {
|
|
47
|
-
var _i =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
try {
|
|
57
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
58
|
-
_arr.push(_s.value);
|
|
59
|
-
|
|
60
|
-
if (i && _arr.length === i) break;
|
|
61
|
-
}
|
|
62
|
-
} catch (err) {
|
|
63
|
-
_d = true;
|
|
64
|
-
_e = err;
|
|
65
|
-
} finally {
|
|
45
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
46
|
+
if (null != _i) {
|
|
47
|
+
var _s,
|
|
48
|
+
_e,
|
|
49
|
+
_x,
|
|
50
|
+
_r,
|
|
51
|
+
_arr = [],
|
|
52
|
+
_n = !0,
|
|
53
|
+
_d = !1;
|
|
66
54
|
try {
|
|
67
|
-
if (
|
|
55
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
56
|
+
if (Object(_i) !== _i) return;
|
|
57
|
+
_n = !1;
|
|
58
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
|
|
59
|
+
;
|
|
60
|
+
}
|
|
61
|
+
} catch (err) {
|
|
62
|
+
_d = !0, _e = err;
|
|
68
63
|
} finally {
|
|
69
|
-
|
|
64
|
+
try {
|
|
65
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
66
|
+
} finally {
|
|
67
|
+
if (_d) throw _e;
|
|
68
|
+
}
|
|
70
69
|
}
|
|
70
|
+
return _arr;
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
return _arr;
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
function _arrayLikeToArray(arr, len) {
|
|
77
75
|
if (len == null || len > arr.length) len = arr.length;
|
|
78
|
-
|
|
79
76
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
80
77
|
arr2[i] = arr[i];
|
|
81
78
|
}
|
|
82
|
-
|
|
83
79
|
return arr2;
|
|
84
80
|
}
|
|
85
81
|
|
|
@@ -102,30 +98,24 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
102
98
|
|
|
103
99
|
var Chip = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
104
100
|
var elementRef = React__namespace.useRef(null);
|
|
105
|
-
|
|
106
101
|
var _React$useState = React__namespace.useState(true),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
103
|
+
visibleState = _React$useState2[0],
|
|
104
|
+
setVisibleState = _React$useState2[1];
|
|
111
105
|
var onKeyDown = function onKeyDown(event) {
|
|
112
106
|
if (event.keyCode === 13) {
|
|
113
107
|
// enter
|
|
114
108
|
close(event);
|
|
115
109
|
}
|
|
116
110
|
};
|
|
117
|
-
|
|
118
111
|
var close = function close(event) {
|
|
119
112
|
setVisibleState(false);
|
|
120
|
-
|
|
121
113
|
if (props.onRemove) {
|
|
122
114
|
props.onRemove(event);
|
|
123
115
|
}
|
|
124
116
|
};
|
|
125
|
-
|
|
126
117
|
var createContent = function createContent() {
|
|
127
118
|
var content = [];
|
|
128
|
-
|
|
129
119
|
if (props.image) {
|
|
130
120
|
content.push( /*#__PURE__*/React__namespace.createElement("img", {
|
|
131
121
|
key: "image",
|
|
@@ -141,14 +131,12 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
141
131
|
props: props
|
|
142
132
|
}));
|
|
143
133
|
}
|
|
144
|
-
|
|
145
134
|
if (props.label) {
|
|
146
135
|
content.push( /*#__PURE__*/React__namespace.createElement("span", {
|
|
147
136
|
key: "label",
|
|
148
137
|
className: "p-chip-text"
|
|
149
138
|
}, props.label));
|
|
150
139
|
}
|
|
151
|
-
|
|
152
140
|
if (props.removable) {
|
|
153
141
|
content.push(utils.IconUtils.getJSXIcon(props.removeIcon, {
|
|
154
142
|
key: 'removeIcon',
|
|
@@ -160,10 +148,8 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
160
148
|
props: props
|
|
161
149
|
}));
|
|
162
150
|
}
|
|
163
|
-
|
|
164
151
|
return content;
|
|
165
152
|
};
|
|
166
|
-
|
|
167
153
|
var createElement = function createElement() {
|
|
168
154
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, Chip.defaultProps);
|
|
169
155
|
var className = utils.classNames('p-chip p-component', {
|
|
@@ -176,7 +162,6 @@ this.primereact.chip = (function (exports, React, utils) {
|
|
|
176
162
|
style: props.style
|
|
177
163
|
}, otherProps), content);
|
|
178
164
|
};
|
|
179
|
-
|
|
180
165
|
React__namespace.useImperativeHandle(ref, function () {
|
|
181
166
|
return {
|
|
182
167
|
props: props,
|
package/chip/chip.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=n(t);function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.chip=function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=n(t);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}function o(e){if(Array.isArray(e))return e}function i(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,l,a,o,i=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,l=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return i}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=l.memo(l.forwardRef((function(e,t){var n,c,m,f,y,b=l.useRef(null),h=l.useState(!0),v=(c=2,o(n=h)||i(n,c)||u(n,c)||s()),g=v[0],d=v[1],O=function(e){13===e.keyCode&&j(e)},j=function(t){d(!1),e.onRemove&&e.onRemove(t)},I=function(){var t=[];return e.image?t.push(l.createElement("img",{key:"image",src:e.image,alt:e.imageAlt,onError:e.onImageError})):e.icon&&t.push(r.IconUtils.getJSXIcon(e.icon,{key:"icon",className:"p-chip-icon"},{props:e})),e.label&&t.push(l.createElement("span",{key:"label",className:"p-chip-text"},e.label)),e.removable&&t.push(r.IconUtils.getJSXIcon(e.removeIcon,{key:"removeIcon",tabIndex:0,className:"p-chip-remove-icon",onClick:j,onKeyDown:O},{props:e})),t};return l.useImperativeHandle(t,(function(){return{props:e,getElement:function(){return b.current}}})),g&&(m=r.ObjectUtils.findDiffKeys(e,p.defaultProps),f=r.classNames("p-chip p-component",{"p-chip-image":null!=e.image},e.className),y=e.template?r.ObjectUtils.getJSXElement(e.template,e):I(),l.createElement("div",a({ref:b,className:f,style:e.style},m),y))})));return p.displayName="Chip",p.defaultProps={__TYPE:"Chip",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},e.Chip=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
|
package/chips/chips.cjs.js
CHANGED
|
@@ -31,14 +31,12 @@ function _extends() {
|
|
|
31
31
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
32
32
|
for (var i = 1; i < arguments.length; i++) {
|
|
33
33
|
var source = arguments[i];
|
|
34
|
-
|
|
35
34
|
for (var key in source) {
|
|
36
35
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
37
36
|
target[key] = source[key];
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
|
-
|
|
42
40
|
return target;
|
|
43
41
|
};
|
|
44
42
|
return _extends.apply(this, arguments);
|
|
@@ -46,11 +44,9 @@ function _extends() {
|
|
|
46
44
|
|
|
47
45
|
function _arrayLikeToArray(arr, len) {
|
|
48
46
|
if (len == null || len > arr.length) len = arr.length;
|
|
49
|
-
|
|
50
47
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
51
48
|
arr2[i] = arr[i];
|
|
52
49
|
}
|
|
53
|
-
|
|
54
50
|
return arr2;
|
|
55
51
|
}
|
|
56
52
|
|
|
@@ -84,33 +80,33 @@ function _arrayWithHoles(arr) {
|
|
|
84
80
|
}
|
|
85
81
|
|
|
86
82
|
function _iterableToArrayLimit(arr, i) {
|
|
87
|
-
var _i =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
try {
|
|
97
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
98
|
-
_arr.push(_s.value);
|
|
99
|
-
|
|
100
|
-
if (i && _arr.length === i) break;
|
|
101
|
-
}
|
|
102
|
-
} catch (err) {
|
|
103
|
-
_d = true;
|
|
104
|
-
_e = err;
|
|
105
|
-
} finally {
|
|
83
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
84
|
+
if (null != _i) {
|
|
85
|
+
var _s,
|
|
86
|
+
_e,
|
|
87
|
+
_x,
|
|
88
|
+
_r,
|
|
89
|
+
_arr = [],
|
|
90
|
+
_n = !0,
|
|
91
|
+
_d = !1;
|
|
106
92
|
try {
|
|
107
|
-
if (
|
|
93
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
94
|
+
if (Object(_i) !== _i) return;
|
|
95
|
+
_n = !1;
|
|
96
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
|
|
97
|
+
;
|
|
98
|
+
}
|
|
99
|
+
} catch (err) {
|
|
100
|
+
_d = !0, _e = err;
|
|
108
101
|
} finally {
|
|
109
|
-
|
|
102
|
+
try {
|
|
103
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
104
|
+
} finally {
|
|
105
|
+
if (_d) throw _e;
|
|
106
|
+
}
|
|
110
107
|
}
|
|
108
|
+
return _arr;
|
|
111
109
|
}
|
|
112
|
-
|
|
113
|
-
return _arr;
|
|
114
110
|
}
|
|
115
111
|
|
|
116
112
|
function _nonIterableRest() {
|
|
@@ -123,34 +119,27 @@ function _slicedToArray(arr, i) {
|
|
|
123
119
|
|
|
124
120
|
var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
125
121
|
var _React$useState = React__namespace.useState(false),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
123
|
+
focusedState = _React$useState2[0],
|
|
124
|
+
setFocusedState = _React$useState2[1];
|
|
130
125
|
var elementRef = React__namespace.useRef(null);
|
|
131
126
|
var listRef = React__namespace.useRef(null);
|
|
132
127
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
133
|
-
|
|
134
128
|
var removeItem = function removeItem(event, index) {
|
|
135
129
|
if (props.disabled && props.readOnly) {
|
|
136
130
|
return;
|
|
137
131
|
}
|
|
138
|
-
|
|
139
132
|
var values = _toConsumableArray(props.value);
|
|
140
|
-
|
|
141
133
|
var removedItem = values.splice(index, 1);
|
|
142
|
-
|
|
143
134
|
if (!isRemovable(removedItem, index)) {
|
|
144
135
|
return;
|
|
145
136
|
}
|
|
146
|
-
|
|
147
137
|
if (props.onRemove) {
|
|
148
138
|
props.onRemove({
|
|
149
139
|
originalEvent: event,
|
|
150
140
|
value: removedItem
|
|
151
141
|
});
|
|
152
142
|
}
|
|
153
|
-
|
|
154
143
|
if (props.onChange) {
|
|
155
144
|
props.onChange({
|
|
156
145
|
originalEvent: event,
|
|
@@ -165,75 +154,62 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
165
154
|
});
|
|
166
155
|
}
|
|
167
156
|
};
|
|
168
|
-
|
|
169
157
|
var addItem = function addItem(event, item, preventDefault) {
|
|
170
158
|
if (item && item.trim().length) {
|
|
171
159
|
var values = props.value ? _toConsumableArray(props.value) : [];
|
|
172
|
-
|
|
173
160
|
if (props.allowDuplicate || values.indexOf(item) === -1) {
|
|
174
161
|
var allowAddition = true;
|
|
175
|
-
|
|
176
162
|
if (props.onAdd) {
|
|
177
163
|
allowAddition = props.onAdd({
|
|
178
164
|
originalEvent: event,
|
|
179
165
|
value: item
|
|
180
166
|
});
|
|
181
167
|
}
|
|
182
|
-
|
|
183
168
|
if (allowAddition !== false) {
|
|
184
169
|
values.push(item);
|
|
185
170
|
}
|
|
186
171
|
}
|
|
187
|
-
|
|
188
172
|
updateInput(event, values, preventDefault);
|
|
189
173
|
}
|
|
190
174
|
};
|
|
191
|
-
|
|
192
175
|
var onWrapperClick = function onWrapperClick() {
|
|
193
176
|
utils.DomHandler.focus(inputRef.current);
|
|
194
177
|
};
|
|
195
|
-
|
|
196
178
|
var onKeyDown = function onKeyDown(event) {
|
|
197
179
|
var inputValue = event.target.value;
|
|
198
180
|
var values = props.value || [];
|
|
199
|
-
props.onKeyDown && props.onKeyDown(event);
|
|
181
|
+
props.onKeyDown && props.onKeyDown(event);
|
|
200
182
|
|
|
183
|
+
// do not continue if the user defined keydown wants to prevent
|
|
201
184
|
if (event.defaultPrevented) {
|
|
202
185
|
return;
|
|
203
186
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
//backspace
|
|
207
|
-
case 8:
|
|
187
|
+
switch (event.key) {
|
|
188
|
+
case 'Backspace':
|
|
208
189
|
if (inputRef.current.value.length === 0 && values.length > 0) {
|
|
209
190
|
removeItem(event, values.length - 1);
|
|
210
191
|
}
|
|
211
|
-
|
|
212
192
|
break;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
case 13:
|
|
193
|
+
case 'Enter':
|
|
216
194
|
if (inputValue && inputValue.trim().length && (!props.max || props.max > values.length)) {
|
|
217
195
|
addItem(event, inputValue, true);
|
|
218
196
|
}
|
|
219
|
-
|
|
220
197
|
break;
|
|
221
|
-
|
|
222
198
|
default:
|
|
223
199
|
if (props.keyfilter) {
|
|
224
200
|
keyfilter.KeyFilter.onKeyPress(event, props.keyfilter);
|
|
225
201
|
}
|
|
226
|
-
|
|
227
202
|
if (isMaxedOut()) {
|
|
228
203
|
event.preventDefault();
|
|
229
|
-
} else if (props.separator === ','
|
|
230
|
-
|
|
204
|
+
} else if (props.separator === ',') {
|
|
205
|
+
// GitHub #3885 Android Opera gives strange code 229 for comma
|
|
206
|
+
if (event.key === props.separator || utils.DomHandler.isAndroid() && event.which === 229) {
|
|
207
|
+
addItem(event, inputValue, true);
|
|
208
|
+
}
|
|
231
209
|
}
|
|
232
|
-
|
|
233
210
|
break;
|
|
234
211
|
}
|
|
235
212
|
};
|
|
236
|
-
|
|
237
213
|
var updateInput = function updateInput(event, items, preventDefault) {
|
|
238
214
|
if (props.onChange) {
|
|
239
215
|
props.onChange({
|
|
@@ -248,19 +224,15 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
248
224
|
}
|
|
249
225
|
});
|
|
250
226
|
}
|
|
251
|
-
|
|
252
227
|
inputRef.current.value = '';
|
|
253
228
|
preventDefault && event.preventDefault();
|
|
254
229
|
};
|
|
255
|
-
|
|
256
230
|
var onPaste = function onPaste(event) {
|
|
257
231
|
if (props.separator) {
|
|
258
232
|
var pastedData = (event.clipboardData || window['clipboardData']).getData('Text');
|
|
259
|
-
|
|
260
233
|
if (props.keyfilter) {
|
|
261
234
|
keyfilter.KeyFilter.onPaste(event, props.keyfilter);
|
|
262
235
|
}
|
|
263
|
-
|
|
264
236
|
if (pastedData) {
|
|
265
237
|
var values = props.value || [];
|
|
266
238
|
var pastedValues = pastedData.split(props.separator);
|
|
@@ -272,35 +244,28 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
272
244
|
}
|
|
273
245
|
}
|
|
274
246
|
};
|
|
275
|
-
|
|
276
247
|
var onFocus = function onFocus(event) {
|
|
277
248
|
setFocusedState(true);
|
|
278
249
|
props.onFocus && props.onFocus(event);
|
|
279
250
|
};
|
|
280
|
-
|
|
281
251
|
var onBlur = function onBlur(event) {
|
|
282
252
|
if (props.addOnBlur) {
|
|
283
253
|
var inputValue = event.target.value;
|
|
284
254
|
var values = props.value || [];
|
|
285
|
-
|
|
286
255
|
if (inputValue && inputValue.trim().length && (!props.max || props.max > values.length)) {
|
|
287
256
|
addItem(event, inputValue, true);
|
|
288
257
|
}
|
|
289
258
|
}
|
|
290
|
-
|
|
291
259
|
setFocusedState(false);
|
|
292
260
|
props.onBlur && props.onBlur(event);
|
|
293
261
|
};
|
|
294
|
-
|
|
295
262
|
var isMaxedOut = function isMaxedOut() {
|
|
296
263
|
return props.max && props.value && props.max === props.value.length;
|
|
297
264
|
};
|
|
298
|
-
|
|
299
265
|
var currentValue = inputRef.current && inputRef.current.value;
|
|
300
266
|
var isFilled = React__namespace.useMemo(function () {
|
|
301
267
|
return utils.ObjectUtils.isNotEmpty(props.value) || utils.ObjectUtils.isNotEmpty(currentValue);
|
|
302
268
|
}, [props.value, currentValue]);
|
|
303
|
-
|
|
304
269
|
var isRemovable = function isRemovable(value, index) {
|
|
305
270
|
return utils.ObjectUtils.getPropValue(props.removable, {
|
|
306
271
|
value: value,
|
|
@@ -308,10 +273,12 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
308
273
|
props: props
|
|
309
274
|
});
|
|
310
275
|
};
|
|
311
|
-
|
|
312
276
|
React__namespace.useImperativeHandle(ref, function () {
|
|
313
277
|
return {
|
|
314
278
|
props: props,
|
|
279
|
+
focus: function focus() {
|
|
280
|
+
return utils.DomHandler.focus(inputRef.current);
|
|
281
|
+
},
|
|
315
282
|
getElement: function getElement() {
|
|
316
283
|
return elementRef.current;
|
|
317
284
|
},
|
|
@@ -323,7 +290,6 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
323
290
|
React__namespace.useEffect(function () {
|
|
324
291
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
325
292
|
}, [inputRef, props.inputRef]);
|
|
326
|
-
|
|
327
293
|
var createRemoveIcon = function createRemoveIcon(value, index) {
|
|
328
294
|
if (!props.disabled && !props.readOnly && isRemovable(value, index)) {
|
|
329
295
|
return /*#__PURE__*/React__namespace.createElement("span", {
|
|
@@ -333,10 +299,8 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
333
299
|
}
|
|
334
300
|
});
|
|
335
301
|
}
|
|
336
|
-
|
|
337
302
|
return null;
|
|
338
303
|
};
|
|
339
|
-
|
|
340
304
|
var createItem = function createItem(value, index) {
|
|
341
305
|
var content = props.itemTemplate ? props.itemTemplate(value) : value;
|
|
342
306
|
var label = /*#__PURE__*/React__namespace.createElement("span", {
|
|
@@ -348,7 +312,6 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
348
312
|
className: "p-chips-token p-highlight"
|
|
349
313
|
}, label, icon);
|
|
350
314
|
};
|
|
351
|
-
|
|
352
315
|
var createInput = function createInput() {
|
|
353
316
|
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
354
317
|
className: "p-chips-input-token"
|
|
@@ -366,11 +329,9 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
366
329
|
readOnly: props.readOnly
|
|
367
330
|
}, ariaProps)));
|
|
368
331
|
};
|
|
369
|
-
|
|
370
332
|
var createItems = function createItems() {
|
|
371
333
|
return props.value ? props.value.map(createItem) : null;
|
|
372
334
|
};
|
|
373
|
-
|
|
374
335
|
var createList = function createList() {
|
|
375
336
|
var className = utils.classNames('p-inputtext p-chips-multiple-container', {
|
|
376
337
|
'p-disabled': props.disabled,
|
|
@@ -384,7 +345,6 @@ var Chips = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.fo
|
|
|
384
345
|
onClick: onWrapperClick
|
|
385
346
|
}, items, input);
|
|
386
347
|
};
|
|
387
|
-
|
|
388
348
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
389
349
|
var otherProps = utils.ObjectUtils.findDiffKeys(props, Chips.defaultProps);
|
|
390
350
|
var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
|