primereact 9.3.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -38
- package/accordion/accordion.cjs.js +88 -90
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +90 -1
- package/accordion/accordion.esm.js +89 -91
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +89 -92
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +1 -0
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +1 -0
- package/api/api.esm.min.js +1 -1
- package/api/api.js +1 -0
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +9 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +9 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +8 -4
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +71 -22
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +37 -1
- package/avatar/avatar.esm.js +72 -23
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +72 -24
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +26 -42
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.d.ts +24 -0
- package/avatargroup/avatargroup.esm.js +13 -29
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +52 -69
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +12 -28
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +26 -0
- package/badge/badge.esm.js +13 -29
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +13 -30
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +12 -28
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +38 -0
- package/blockui/blockui.esm.js +13 -29
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +13 -30
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +49 -42
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +42 -1
- package/button/button.esm.js +50 -43
- package/button/button.esm.min.js +1 -1
- package/button/button.js +49 -43
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +31 -23
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.esm.js +31 -23
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +28 -20
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +52 -63
- package/card/card.cjs.min.js +1 -1
- package/card/card.d.ts +56 -0
- package/card/card.esm.js +39 -50
- package/card/card.esm.min.js +1 -1
- package/card/card.js +86 -98
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +16 -28
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +2 -2
- package/carousel/carousel.esm.js +16 -28
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +14 -26
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.js +1 -1
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +5 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +5 -0
- package/chart/chart.esm.js +5 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +5 -1
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +22 -7
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +14 -1
- package/checkbox/checkbox.esm.js +22 -7
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +23 -8
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +45 -42
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +53 -1
- package/chip/chip.esm.js +46 -43
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +46 -44
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +13 -5
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +13 -5
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +14 -6
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +7 -4
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +8 -0
- package/colorpicker/colorpicker.esm.js +7 -4
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +7 -4
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +6 -2
- package/componentbase/componentbase.cjs.js +105 -0
- package/componentbase/componentbase.cjs.min.js +1 -0
- package/componentbase/componentbase.esm.js +101 -0
- package/componentbase/componentbase.esm.min.js +1 -0
- package/componentbase/componentbase.js +109 -0
- package/componentbase/componentbase.min.js +1 -0
- package/componentbase/package.json +6 -0
- package/confirmdialog/confirmdialog.cjs.js +44 -27
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +90 -2
- package/confirmdialog/confirmdialog.esm.js +45 -28
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +45 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +53 -50
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +70 -1
- package/confirmpopup/confirmpopup.esm.js +54 -51
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +54 -52
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1253 -1048
- package/core/core.min.js +17 -15
- package/datatable/datatable.cjs.js +82 -41
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +39 -10
- package/datatable/datatable.esm.js +82 -41
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +72 -31
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.js +1 -1
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +13 -26
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +38 -0
- package/deferredcontent/deferredcontent.esm.js +14 -27
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +14 -28
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +83 -83
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +85 -3
- package/dialog/dialog.esm.js +83 -83
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +81 -82
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +35 -51
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.d.ts +30 -0
- package/divider/divider.esm.js +22 -38
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +66 -83
- package/divider/divider.min.js +1 -1
- package/dropdown/dropdown.cjs.js +45 -19
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +6 -1
- package/dropdown/dropdown.esm.js +45 -19
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +45 -19
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/fieldset.cjs.js +55 -54
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +77 -1
- package/fieldset/fieldset.esm.js +56 -55
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +56 -56
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +13 -14
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +14 -15
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +14 -16
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +5 -0
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +4 -4
- package/galleria/galleria.esm.js +5 -0
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +6 -1
- package/galleria/galleria.min.js +1 -1
- package/hooks/hooks.cjs.js +15 -2
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.esm.js +15 -2
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +15 -2
- package/hooks/hooks.min.js +1 -1
- package/image/image.cjs.js +63 -41
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +22 -6
- package/image/image.esm.js +63 -41
- package/image/image.esm.min.js +1 -1
- package/image/image.js +61 -39
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +33 -51
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +51 -1
- package/inplace/inplace.esm.js +33 -51
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +33 -52
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +6 -2
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +6 -2
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +6 -2
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +8 -4
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +8 -4
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +8 -4
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +6 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +6 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +6 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +7 -8
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +7 -8
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -8
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +5 -6
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.esm.js +5 -6
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +5 -6
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/listbox/listbox.cjs.js +12 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +12 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +13 -5
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.js +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +6 -6
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +6 -6
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +6 -6
- package/mention/mention.min.js +1 -1
- package/menubar/menubar.js +1 -1
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +0 -2
- package/message/message.d.ts +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +64 -50
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +5 -0
- package/messages/messages.esm.js +64 -50
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +62 -48
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +46 -22
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +4 -0
- package/multiselect/multiselect.esm.js +46 -22
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +45 -21
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +6 -2
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +6 -2
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +6 -2
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.js +1 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +18 -2
- package/organizationchart/organizationchart.js +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +40 -46
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +45 -1
- package/overlaypanel/overlaypanel.esm.js +41 -47
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -48
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +1 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +1 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -2
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +78 -63
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +100 -1
- package/panel/panel.esm.js +79 -64
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +79 -65
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +3 -9
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +1 -1
- package/password/password.esm.js +3 -9
- package/password/password.esm.min.js +1 -1
- package/password/password.js +4 -10
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +2 -2
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +2 -2
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +3 -3
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +2310 -1775
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2310 -1776
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2310 -1775
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +45 -57
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.d.ts +38 -0
- package/progressbar/progressbar.esm.js +32 -44
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +105 -118
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +37 -51
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.d.ts +34 -0
- package/progressspinner/progressspinner.esm.js +24 -38
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +75 -90
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +29 -14
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +14 -1
- package/radiobutton/radiobutton.esm.js +29 -14
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +29 -14
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +15 -7
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +15 -7
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +14 -6
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +538 -538
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +3 -0
- package/resources/themes/arya-green/theme.css +3 -0
- package/resources/themes/arya-orange/theme.css +3 -0
- package/resources/themes/arya-purple/theme.css +3 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +3 -0
- package/resources/themes/bootstrap4-dark-purple/theme.css +3 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +3 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +3 -0
- package/resources/themes/fluent-light/theme.css +3 -0
- package/resources/themes/lara-dark-blue/theme.css +3 -0
- package/resources/themes/lara-dark-indigo/theme.css +3 -0
- package/resources/themes/lara-dark-purple/theme.css +3 -0
- package/resources/themes/lara-dark-teal/theme.css +3 -0
- package/resources/themes/lara-light-blue/theme.css +3 -0
- package/resources/themes/lara-light-indigo/theme.css +3 -0
- package/resources/themes/lara-light-purple/theme.css +3 -0
- package/resources/themes/lara-light-teal/theme.css +3 -0
- package/resources/themes/luna-amber/theme.css +3 -0
- package/resources/themes/luna-blue/theme.css +3 -0
- package/resources/themes/luna-green/theme.css +3 -0
- package/resources/themes/luna-pink/theme.css +3 -0
- package/resources/themes/md-dark-deeppurple/theme.css +3 -0
- package/resources/themes/md-dark-indigo/theme.css +3 -0
- package/resources/themes/md-light-deeppurple/theme.css +3 -0
- package/resources/themes/md-light-indigo/theme.css +3 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +3 -0
- package/resources/themes/mdc-dark-indigo/theme.css +3 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +3 -0
- package/resources/themes/mdc-light-indigo/theme.css +3 -0
- package/resources/themes/mira/theme.css +3 -0
- package/resources/themes/nano/theme.css +3 -0
- package/resources/themes/nova/theme.css +3 -0
- package/resources/themes/nova-accent/theme.css +3 -0
- package/resources/themes/nova-alt/theme.css +3 -0
- package/resources/themes/rhea/theme.css +3 -0
- package/resources/themes/saga-blue/theme.css +3 -0
- package/resources/themes/saga-green/theme.css +3 -0
- package/resources/themes/saga-orange/theme.css +3 -0
- package/resources/themes/saga-purple/theme.css +3 -0
- package/resources/themes/soho-dark/theme.css +3 -0
- package/resources/themes/soho-light/theme.css +3 -0
- package/resources/themes/tailwind-light/theme.css +3 -0
- package/resources/themes/vela-blue/theme.css +3 -0
- package/resources/themes/vela-green/theme.css +3 -0
- package/resources/themes/vela-orange/theme.css +3 -0
- package/resources/themes/vela-purple/theme.css +3 -0
- package/resources/themes/viva-dark/theme.css +3 -0
- package/resources/themes/viva-light/theme.css +3 -0
- package/scrollpanel/scrollpanel.cjs.js +39 -52
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.d.ts +42 -0
- package/scrollpanel/scrollpanel.esm.js +26 -39
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +193 -207
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +64 -36
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +42 -1
- package/scrolltop/scrolltop.esm.js +65 -37
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +65 -38
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +6 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +6 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +6 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +88 -52
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +58 -1
- package/sidebar/sidebar.esm.js +89 -53
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +89 -54
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +26 -42
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.d.ts +26 -0
- package/skeleton/skeleton.esm.js +13 -29
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +70 -87
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.js +1 -1
- package/slidemenu/slidemenu.min.js +1 -1
- package/speeddial/speeddial.cjs.js +63 -56
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +64 -1
- package/speeddial/speeddial.esm.js +64 -57
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +62 -56
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +50 -40
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +59 -1
- package/splitbutton/splitbutton.esm.js +51 -41
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +50 -41
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +68 -70
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +60 -0
- package/splitter/splitter.esm.js +69 -71
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +69 -72
- package/splitter/splitter.min.js +1 -1
- package/styleclass/styleclass.cjs.js +9 -7
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +9 -7
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +9 -7
- package/styleclass/styleclass.min.js +1 -1
- package/tabview/tabview.cjs.js +143 -123
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +135 -4
- package/tabview/tabview.esm.js +144 -124
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +144 -125
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +18 -30
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +34 -1
- package/tag/tag.esm.js +19 -31
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +19 -32
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +49 -52
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +73 -0
- package/terminal/terminal.esm.js +50 -53
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +50 -54
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +1 -1
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +2 -2
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.d.ts +1 -1
- package/toast/toast.cjs.js +13 -10
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +4 -0
- package/toast/toast.esm.js +13 -10
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +14 -11
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +6 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +6 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +6 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +35 -49
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +44 -0
- package/toolbar/toolbar.esm.js +22 -36
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +72 -87
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +31 -37
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +55 -0
- package/tooltip/tooltip.esm.js +32 -38
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +32 -39
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +5 -0
- package/tree/tree.d.ts +1 -1
- package/tree/tree.js +1 -1
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +5 -1
- package/treeselect/treeselect.cjs.js +9 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +1 -1
- package/treeselect/treeselect.esm.js +9 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +8 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +10 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +1 -1
- package/treetable/treetable.esm.js +10 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +11 -4
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +8 -4
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +8 -4
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +8 -4
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +710 -672
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +4 -0
- package/utils/utils.esm.js +710 -673
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +710 -672
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.js +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +17 -199
package/tag/tag.esm.js
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function _extends() {
|
|
5
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
6
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
7
|
-
var source = arguments[i];
|
|
8
|
-
for (var key in source) {
|
|
9
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
10
|
-
target[key] = source[key];
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
return _extends.apply(this, arguments);
|
|
17
|
-
}
|
|
2
|
+
import { classNames, mergeProps, IconUtils } from 'primereact/utils';
|
|
3
|
+
import { ComponentBase } from 'primereact/componentbase';
|
|
18
4
|
|
|
19
5
|
function _typeof(obj) {
|
|
20
6
|
"@babel/helpers - typeof";
|
|
@@ -57,7 +43,7 @@ function _defineProperty(obj, key, value) {
|
|
|
57
43
|
return obj;
|
|
58
44
|
}
|
|
59
45
|
|
|
60
|
-
var TagBase = {
|
|
46
|
+
var TagBase = ComponentBase.extend({
|
|
61
47
|
defaultProps: {
|
|
62
48
|
__TYPE: 'Tag',
|
|
63
49
|
value: null,
|
|
@@ -67,24 +53,24 @@ var TagBase = {
|
|
|
67
53
|
style: null,
|
|
68
54
|
className: null,
|
|
69
55
|
children: undefined
|
|
70
|
-
},
|
|
71
|
-
getProps: function getProps(props) {
|
|
72
|
-
return ObjectUtils.getMergedProps(props, TagBase.defaultProps);
|
|
73
|
-
},
|
|
74
|
-
getOtherProps: function getOtherProps(props) {
|
|
75
|
-
return ObjectUtils.getDiffProps(props, TagBase.defaultProps);
|
|
76
56
|
}
|
|
77
|
-
};
|
|
57
|
+
});
|
|
78
58
|
|
|
59
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
60
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
79
61
|
var Tag = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
80
62
|
var _classNames;
|
|
81
63
|
var props = TagBase.getProps(inProps);
|
|
64
|
+
var _TagBase$setMetaData = TagBase.setMetaData({
|
|
65
|
+
props: props
|
|
66
|
+
}),
|
|
67
|
+
ptm = _TagBase$setMetaData.ptm;
|
|
82
68
|
var elementRef = React.useRef(null);
|
|
83
|
-
var otherProps = TagBase.getOtherProps(props);
|
|
84
69
|
var className = classNames('p-tag p-component', (_classNames = {}, _defineProperty(_classNames, "p-tag-".concat(props.severity), props.severity !== null), _defineProperty(_classNames, 'p-tag-rounded', props.rounded), _classNames), props.className);
|
|
85
|
-
var
|
|
70
|
+
var iconProps = mergeProps({
|
|
86
71
|
className: 'p-tag-icon'
|
|
87
|
-
},
|
|
72
|
+
}, ptm('icon'));
|
|
73
|
+
var icon = IconUtils.getJSXIcon(props.icon, _objectSpread({}, iconProps), {
|
|
88
74
|
props: props
|
|
89
75
|
});
|
|
90
76
|
React.useImperativeHandle(ref, function () {
|
|
@@ -95,13 +81,15 @@ var Tag = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
95
81
|
}
|
|
96
82
|
};
|
|
97
83
|
});
|
|
98
|
-
|
|
84
|
+
var rootProps = mergeProps({
|
|
99
85
|
ref: elementRef,
|
|
100
86
|
className: className,
|
|
101
87
|
style: props.style
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
}, TagBase.getOtherProps(props), ptm('root'));
|
|
89
|
+
var valueProps = mergeProps({
|
|
90
|
+
className: 'p-tag-value'
|
|
91
|
+
}, ptm('value'));
|
|
92
|
+
return /*#__PURE__*/React.createElement("span", rootProps, icon, /*#__PURE__*/React.createElement("span", valueProps, props.value), /*#__PURE__*/React.createElement("span", null, props.children));
|
|
105
93
|
});
|
|
106
94
|
Tag.displayName = 'Tag';
|
|
107
95
|
|
package/tag/tag.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{
|
|
1
|
+
import*as e from"react";import{classNames as t,mergeProps as r,IconUtils as n}from"primereact/utils";import{ComponentBase as o}from"primereact/componentbase";function a(e){return a="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},a(e)}function i(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e){var t=i(e,"string");return"symbol"===a(t)?t:String(t)}function c(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=o.extend({defaultProps:{__TYPE:"Tag",value:null,severity:null,rounded:!1,icon:null,style:null,className:null,children:void 0}});function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=e.forwardRef((function(o,a){var i,l=u.getProps(o),p=u.setMetaData({props:l}).ptm,f=e.useRef(null),m=t("p-tag p-component",(c(i={},"p-tag-".concat(l.severity),null!==l.severity),c(i,"p-tag-rounded",l.rounded),i),l.className),y=r({className:"p-tag-icon"},p("icon")),b=n.getJSXIcon(l.icon,s({},y),{props:l});e.useImperativeHandle(a,(function(){return{props:l,getElement:function(){return f.current}}}));var v=r({ref:f,className:m,style:l.style},u.getOtherProps(l),p("root")),g=r({className:"p-tag-value"},p("value"));return e.createElement("span",v,b,e.createElement("span",g,l.value),e.createElement("span",null,l.children))}));f.displayName="Tag";export{f as Tag};
|
package/tag/tag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.tag = (function (exports, React, utils) {
|
|
2
|
+
this.primereact.tag = (function (exports, React, utils, componentbase) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopNamespace(e) {
|
|
@@ -22,21 +22,6 @@ this.primereact.tag = (function (exports, React, utils) {
|
|
|
22
22
|
|
|
23
23
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
24
24
|
|
|
25
|
-
function _extends() {
|
|
26
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
27
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
28
|
-
var source = arguments[i];
|
|
29
|
-
for (var key in source) {
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
31
|
-
target[key] = source[key];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
return _extends.apply(this, arguments);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
25
|
function _typeof(obj) {
|
|
41
26
|
"@babel/helpers - typeof";
|
|
42
27
|
|
|
@@ -78,7 +63,7 @@ this.primereact.tag = (function (exports, React, utils) {
|
|
|
78
63
|
return obj;
|
|
79
64
|
}
|
|
80
65
|
|
|
81
|
-
var TagBase = {
|
|
66
|
+
var TagBase = componentbase.ComponentBase.extend({
|
|
82
67
|
defaultProps: {
|
|
83
68
|
__TYPE: 'Tag',
|
|
84
69
|
value: null,
|
|
@@ -88,24 +73,24 @@ this.primereact.tag = (function (exports, React, utils) {
|
|
|
88
73
|
style: null,
|
|
89
74
|
className: null,
|
|
90
75
|
children: undefined
|
|
91
|
-
},
|
|
92
|
-
getProps: function getProps(props) {
|
|
93
|
-
return utils.ObjectUtils.getMergedProps(props, TagBase.defaultProps);
|
|
94
|
-
},
|
|
95
|
-
getOtherProps: function getOtherProps(props) {
|
|
96
|
-
return utils.ObjectUtils.getDiffProps(props, TagBase.defaultProps);
|
|
97
76
|
}
|
|
98
|
-
};
|
|
77
|
+
});
|
|
99
78
|
|
|
79
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
80
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
100
81
|
var Tag = /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
101
82
|
var _classNames;
|
|
102
83
|
var props = TagBase.getProps(inProps);
|
|
84
|
+
var _TagBase$setMetaData = TagBase.setMetaData({
|
|
85
|
+
props: props
|
|
86
|
+
}),
|
|
87
|
+
ptm = _TagBase$setMetaData.ptm;
|
|
103
88
|
var elementRef = React__namespace.useRef(null);
|
|
104
|
-
var otherProps = TagBase.getOtherProps(props);
|
|
105
89
|
var className = utils.classNames('p-tag p-component', (_classNames = {}, _defineProperty(_classNames, "p-tag-".concat(props.severity), props.severity !== null), _defineProperty(_classNames, 'p-tag-rounded', props.rounded), _classNames), props.className);
|
|
106
|
-
var
|
|
90
|
+
var iconProps = utils.mergeProps({
|
|
107
91
|
className: 'p-tag-icon'
|
|
108
|
-
},
|
|
92
|
+
}, ptm('icon'));
|
|
93
|
+
var icon = utils.IconUtils.getJSXIcon(props.icon, _objectSpread({}, iconProps), {
|
|
109
94
|
props: props
|
|
110
95
|
});
|
|
111
96
|
React__namespace.useImperativeHandle(ref, function () {
|
|
@@ -116,13 +101,15 @@ this.primereact.tag = (function (exports, React, utils) {
|
|
|
116
101
|
}
|
|
117
102
|
};
|
|
118
103
|
});
|
|
119
|
-
|
|
104
|
+
var rootProps = utils.mergeProps({
|
|
120
105
|
ref: elementRef,
|
|
121
106
|
className: className,
|
|
122
107
|
style: props.style
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
|
|
108
|
+
}, TagBase.getOtherProps(props), ptm('root'));
|
|
109
|
+
var valueProps = utils.mergeProps({
|
|
110
|
+
className: 'p-tag-value'
|
|
111
|
+
}, ptm('value'));
|
|
112
|
+
return /*#__PURE__*/React__namespace.createElement("span", rootProps, icon, /*#__PURE__*/React__namespace.createElement("span", valueProps, props.value), /*#__PURE__*/React__namespace.createElement("span", null, props.children));
|
|
126
113
|
});
|
|
127
114
|
Tag.displayName = 'Tag';
|
|
128
115
|
|
|
@@ -132,4 +119,4 @@ this.primereact.tag = (function (exports, React, utils) {
|
|
|
132
119
|
|
|
133
120
|
return exports;
|
|
134
121
|
|
|
135
|
-
})({}, React, primereact.utils);
|
|
122
|
+
})({}, React, primereact.utils, primereact.componentbase);
|
package/tag/tag.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.tag=function(e,t,r){"use strict";function
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.tag=function(e,t,r,n){"use strict";function o(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 a=o(t);function c(e){return c="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},c(e)}function i(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e){var t=i(e,"string");return"symbol"===c(t)?t:String(t)}function l(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=n.ComponentBase.extend({defaultProps:{__TYPE:"Tag",value:null,severity:null,rounded:!1,icon:null,style:null,className:null,children:void 0}});function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m=a.forwardRef((function(e,t){var n,o=s.getProps(e),c=s.setMetaData({props:o}).ptm,i=a.useRef(null),u=r.classNames("p-tag p-component",(l(n={},"p-tag-".concat(o.severity),null!==o.severity),l(n,"p-tag-rounded",o.rounded),n),o.className),p=r.mergeProps({className:"p-tag-icon"},c("icon")),m=r.IconUtils.getJSXIcon(o.icon,f({},p),{props:o});a.useImperativeHandle(t,(function(){return{props:o,getElement:function(){return i.current}}}));var y=r.mergeProps({ref:i,className:u,style:o.style},s.getOtherProps(o),c("root")),b=r.mergeProps({className:"p-tag-value"},c("value"));return a.createElement("span",y,m,a.createElement("span",b,o.value),a.createElement("span",null,o.children))}));return m.displayName="Tag",e.Tag=m,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.componentbase);
|
package/terminal/terminal.cjs.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var terminalservice = require('primereact/terminalservice');
|
|
7
7
|
var utils = require('primereact/utils');
|
|
8
|
+
var componentbase = require('primereact/componentbase');
|
|
8
9
|
|
|
9
10
|
function _interopNamespace(e) {
|
|
10
11
|
if (e && e.__esModule) return e;
|
|
@@ -26,21 +27,6 @@ function _interopNamespace(e) {
|
|
|
26
27
|
|
|
27
28
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
29
|
|
|
29
|
-
function _extends() {
|
|
30
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
31
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
32
|
-
var source = arguments[i];
|
|
33
|
-
for (var key in source) {
|
|
34
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
35
|
-
target[key] = source[key];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return target;
|
|
40
|
-
};
|
|
41
|
-
return _extends.apply(this, arguments);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
30
|
function _arrayLikeToArray(arr, len) {
|
|
45
31
|
if (len == null || len > arr.length) len = arr.length;
|
|
46
32
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -112,7 +98,7 @@ function _slicedToArray(arr, i) {
|
|
|
112
98
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
113
99
|
}
|
|
114
100
|
|
|
115
|
-
var TerminalBase = {
|
|
101
|
+
var TerminalBase = componentbase.ComponentBase.extend({
|
|
116
102
|
defaultProps: {
|
|
117
103
|
__TYPE: 'Terminal',
|
|
118
104
|
id: null,
|
|
@@ -121,14 +107,8 @@ var TerminalBase = {
|
|
|
121
107
|
welcomeMessage: null,
|
|
122
108
|
prompt: null,
|
|
123
109
|
children: undefined
|
|
124
|
-
},
|
|
125
|
-
getProps: function getProps(props) {
|
|
126
|
-
return utils.ObjectUtils.getMergedProps(props, TerminalBase.defaultProps);
|
|
127
|
-
},
|
|
128
|
-
getOtherProps: function getOtherProps(props) {
|
|
129
|
-
return utils.ObjectUtils.getDiffProps(props, TerminalBase.defaultProps);
|
|
130
110
|
}
|
|
131
|
-
};
|
|
111
|
+
});
|
|
132
112
|
|
|
133
113
|
var Terminal = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
|
|
134
114
|
var props = TerminalBase.getProps(inProps);
|
|
@@ -151,6 +131,17 @@ var Terminal = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
151
131
|
var elementRef = React__namespace.useRef(null);
|
|
152
132
|
var inputRef = React__namespace.useRef(null);
|
|
153
133
|
var isEmitted = React__namespace.useRef(false);
|
|
134
|
+
var _TerminalBase$setMeta = TerminalBase.setMetaData({
|
|
135
|
+
props: props,
|
|
136
|
+
state: {
|
|
137
|
+
commandText: commandTextState,
|
|
138
|
+
commands: commandsState
|
|
139
|
+
}
|
|
140
|
+
}),
|
|
141
|
+
ptm = _TerminalBase$setMeta.ptm;
|
|
142
|
+
var promptProps = utils.mergeProps({
|
|
143
|
+
className: 'p-terminal-prompt'
|
|
144
|
+
}, ptm('prompt'));
|
|
154
145
|
var onClick = function onClick() {
|
|
155
146
|
utils.DomHandler.focus(inputRef.current);
|
|
156
147
|
};
|
|
@@ -227,7 +218,8 @@ var Terminal = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
227
218
|
});
|
|
228
219
|
var createWelcomeMessage = function createWelcomeMessage() {
|
|
229
220
|
if (props.welcomeMessage) {
|
|
230
|
-
|
|
221
|
+
var welcomeMessageProps = utils.mergeProps(ptm('welcomeMessage'));
|
|
222
|
+
return /*#__PURE__*/React__namespace.createElement("div", welcomeMessageProps, props.welcomeMessage);
|
|
231
223
|
}
|
|
232
224
|
return null;
|
|
233
225
|
};
|
|
@@ -235,50 +227,55 @@ var Terminal = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
235
227
|
var text = command.text,
|
|
236
228
|
response = command.response;
|
|
237
229
|
var key = text + '_' + index;
|
|
238
|
-
|
|
230
|
+
var commandsProps = utils.mergeProps({
|
|
239
231
|
key: key
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
className:
|
|
246
|
-
}, response));
|
|
232
|
+
}, ptm('commands'));
|
|
233
|
+
var commandProps = utils.mergeProps({
|
|
234
|
+
className: 'p-terminal-command'
|
|
235
|
+
}, ptm('command'));
|
|
236
|
+
var responseProps = utils.mergeProps({
|
|
237
|
+
className: 'p-terminal-response'
|
|
238
|
+
}, ptm('response'));
|
|
239
|
+
return /*#__PURE__*/React__namespace.createElement("div", commandsProps, /*#__PURE__*/React__namespace.createElement("span", promptProps, props.prompt, "\xA0"), /*#__PURE__*/React__namespace.createElement("span", commandProps, text), /*#__PURE__*/React__namespace.createElement("div", responseProps, response));
|
|
247
240
|
};
|
|
248
241
|
var createContent = function createContent() {
|
|
249
242
|
var content = commandsState.map(createCommand);
|
|
250
|
-
|
|
251
|
-
className:
|
|
252
|
-
}, content);
|
|
243
|
+
var contentProps = utils.mergeProps({
|
|
244
|
+
className: 'p-terminal-content'
|
|
245
|
+
}, ptm('content'));
|
|
246
|
+
return /*#__PURE__*/React__namespace.createElement("div", contentProps, content);
|
|
253
247
|
};
|
|
254
248
|
var createPromptContainer = function createPromptContainer() {
|
|
255
|
-
|
|
256
|
-
className:
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
}, props.prompt, "\xA0"), /*#__PURE__*/React__namespace.createElement("input", {
|
|
249
|
+
var containerProps = utils.mergeProps({
|
|
250
|
+
className: 'p-terminal-prompt-container'
|
|
251
|
+
}, ptm('container'));
|
|
252
|
+
var commandTextProps = utils.mergeProps({
|
|
260
253
|
ref: inputRef,
|
|
261
|
-
type: "text",
|
|
262
254
|
value: commandTextState,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
255
|
+
type: 'text',
|
|
256
|
+
className: 'p-terminal-input',
|
|
257
|
+
autoComplete: 'off',
|
|
258
|
+
onChange: function onChange(e) {
|
|
259
|
+
return onInputChange(e);
|
|
260
|
+
},
|
|
261
|
+
onKeyDown: function onKeyDown(e) {
|
|
262
|
+
return onInputKeyDown(e);
|
|
263
|
+
}
|
|
264
|
+
}, ptm('commandText'));
|
|
265
|
+
return /*#__PURE__*/React__namespace.createElement("div", containerProps, /*#__PURE__*/React__namespace.createElement("span", promptProps, props.prompt, "\xA0"), /*#__PURE__*/React__namespace.createElement("input", commandTextProps));
|
|
268
266
|
};
|
|
269
|
-
var otherProps = TerminalBase.getOtherProps(props);
|
|
270
267
|
var className = utils.classNames('p-terminal p-component', props.className);
|
|
271
268
|
var welcomeMessage = createWelcomeMessage();
|
|
272
269
|
var content = createContent();
|
|
273
270
|
var prompt = createPromptContainer();
|
|
274
|
-
|
|
275
|
-
ref: elementRef,
|
|
271
|
+
var rootProps = utils.mergeProps({
|
|
276
272
|
id: props.id,
|
|
273
|
+
ref: elementRef,
|
|
277
274
|
className: className,
|
|
278
|
-
style: props.style
|
|
279
|
-
}, otherProps, {
|
|
275
|
+
style: props.style,
|
|
280
276
|
onClick: onClick
|
|
281
|
-
}
|
|
277
|
+
}, TerminalBase.getOtherProps(props), ptm('root'));
|
|
278
|
+
return /*#__PURE__*/React__namespace.createElement("div", rootProps, welcomeMessage, content, prompt);
|
|
282
279
|
}));
|
|
283
280
|
Terminal.displayName = 'Terminal';
|
|
284
281
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("primereact/terminalservice"),t=require("primereact/utils");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("primereact/terminalservice"),t=require("primereact/utils"),n=require("primereact/componentbase");function a(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var o=a(e);function l(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){if(Array.isArray(e))return l(e)}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function u(e,r){if(e){if("string"==typeof e)return l(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)?l(e,r):void 0}}function s(){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 m(e){return c(e)||i(e)||u(e)||s()}function f(e){if(Array.isArray(e))return e}function p(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,a,o,l,c=[],i=!0,u=!1;try{if(o=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;i=!1}else for(;!(i=(n=o.call(t)).done)&&(c.push(n.value),c.length!==r);i=!0);}catch(e){u=!0,a=e}finally{try{if(!i&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw a}}return c}}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,r){return f(e)||p(e,r)||u(e,r)||d()}var y=n.ComponentBase.extend({defaultProps:{__TYPE:"Terminal",id:null,style:null,className:null,welcomeMessage:null,prompt:null,children:void 0}}),g=o.memo(o.forwardRef((function(e,n){var a=y.getProps(e),l=v(o.useState(""),2),c=l[0],i=l[1],u=v(o.useState([]),2),s=u[0],f=u[1],p=v(o.useState(0),2),d=p[0],g=p[1],b=v(o.useState(""),2),h=b[0],E=b[1],S=o.useRef(null),P=o.useRef(null),w=o.useRef(!1),T=y.setMetaData({props:a,state:{commandText:c,commands:s}}).ptm,j=t.mergeProps({className:"p-terminal-prompt"},T("prompt")),O=function(e){i(e.target.value)},N=function(e){switch(e.which||e.keyCode){case 38:if(s&&s.length){var r=d-1<0?s.length-1:d-1,t=s[r];g(r),i(t.text)}break;case 13:if(c){var n=m(s);n.push({text:c}),g((function(e){return e+1})),i(""),f(n),E(c),w.current=!0}}};o.useImperativeHandle(n,(function(){return{props:a,focus:function(){return t.DomHandler.focus(P.current)},getElement:function(){return S.current}}})),o.useEffect((function(){var e=function(e){if(s&&s.length>0){var r=m(s);r[r.length-1].response=e,f(r)}},t=function(){f([]),g(0)};return r.TerminalService.on("response",e),r.TerminalService.on("clear",t),function(){r.TerminalService.off("response",e),r.TerminalService.off("clear",t)}}),[s]),o.useEffect((function(){w.current&&(r.TerminalService.emit("command",h),w.current=!1),S.current.scrollTop=S.current.scrollHeight}));var x,A,M=function(e,r){var n=e.text,l=e.response,c=t.mergeProps({key:n+"_"+r},T("commands")),i=t.mergeProps({className:"p-terminal-command"},T("command")),u=t.mergeProps({className:"p-terminal-response"},T("response"));return o.createElement("div",c,o.createElement("span",j,a.prompt," "),o.createElement("span",i,n),o.createElement("div",u,l))},_=t.classNames("p-terminal p-component",a.className),C=function(){if(a.welcomeMessage){var e=t.mergeProps(T("welcomeMessage"));return o.createElement("div",e,a.welcomeMessage)}return null}(),I=function(){var e=s.map(M),r=t.mergeProps({className:"p-terminal-content"},T("content"));return o.createElement("div",r,e)}(),k=(x=t.mergeProps({className:"p-terminal-prompt-container"},T("container")),A=t.mergeProps({ref:P,value:c,type:"text",className:"p-terminal-input",autoComplete:"off",onChange:function(e){return O(e)},onKeyDown:function(e){return N(e)}},T("commandText")),o.createElement("div",x,o.createElement("span",j,a.prompt," "),o.createElement("input",A))),D=t.mergeProps({id:a.id,ref:S,className:_,style:a.style,onClick:function(){t.DomHandler.focus(P.current)}},y.getOtherProps(a),T("root"));return o.createElement("div",D,C,I,k)})));g.displayName="Terminal",exports.Terminal=g;
|
package/terminal/terminal.d.ts
CHANGED
|
@@ -8,6 +8,74 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
|
+
import { PassThroughType } from '../utils';
|
|
12
|
+
|
|
13
|
+
export declare type TerminalPassThroughType<T> = PassThroughType<T, TerminalPassThroughMethodOptions>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Defines current inline state in Terminal component.
|
|
17
|
+
*/
|
|
18
|
+
export interface TerminalState {
|
|
19
|
+
/**
|
|
20
|
+
* Current command text as a string.
|
|
21
|
+
*/
|
|
22
|
+
commandText: string;
|
|
23
|
+
/**
|
|
24
|
+
* Current commands as an array.
|
|
25
|
+
*/
|
|
26
|
+
commands: string[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Custom passthrough(pt) option method.
|
|
31
|
+
*/
|
|
32
|
+
export interface TerminalPassThroughMethodOptions {
|
|
33
|
+
props: TerminalProps;
|
|
34
|
+
state: TerminalState;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Custom passthrough(pt) options.
|
|
39
|
+
* @see {@link TerminalProps.pt}
|
|
40
|
+
*/
|
|
41
|
+
export interface TerminalPassThroughOptions {
|
|
42
|
+
/**
|
|
43
|
+
* Uses to pass attributes to the root's DOM element.
|
|
44
|
+
*/
|
|
45
|
+
root?: TerminalPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
46
|
+
/**
|
|
47
|
+
* Uses to pass attributes to the welcome message's DOM element.
|
|
48
|
+
*/
|
|
49
|
+
welcomeMessage?: TerminalPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
50
|
+
/**
|
|
51
|
+
* Uses to pass attributes to the content's DOM element.
|
|
52
|
+
*/
|
|
53
|
+
content?: TerminalPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
54
|
+
/**
|
|
55
|
+
* Uses to pass attributes to the commands' DOM element.
|
|
56
|
+
*/
|
|
57
|
+
commands?: TerminalPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
58
|
+
/**
|
|
59
|
+
* Uses to pass attributes to the prompt's DOM element.
|
|
60
|
+
*/
|
|
61
|
+
prompt?: TerminalPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
62
|
+
/**
|
|
63
|
+
* Uses to pass attributes to the command's DOM element.
|
|
64
|
+
*/
|
|
65
|
+
command?: TerminalPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
|
|
66
|
+
/**
|
|
67
|
+
* Uses to pass attributes to the response's DOM element.
|
|
68
|
+
*/
|
|
69
|
+
response?: TerminalPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
70
|
+
/**
|
|
71
|
+
* Uses to pass attributes to the container's DOM element.
|
|
72
|
+
*/
|
|
73
|
+
container?: TerminalPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
|
|
74
|
+
/**
|
|
75
|
+
* Uses to pass attributes to the command text's DOM element.
|
|
76
|
+
*/
|
|
77
|
+
commandText?: TerminalPassThroughType<React.HTMLAttributes<HTMLInputElement>>;
|
|
78
|
+
}
|
|
11
79
|
|
|
12
80
|
/**
|
|
13
81
|
* Defines valid properties in Terminal component. In addition to these, all properties of HTMLDivElement can be used in this component.
|
|
@@ -27,6 +95,11 @@ export interface TerminalProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
|
|
|
27
95
|
* @readonly
|
|
28
96
|
*/
|
|
29
97
|
children?: React.ReactNode | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
100
|
+
* @type {TerminalPassThroughOptions}
|
|
101
|
+
*/
|
|
102
|
+
pt?: TerminalPassThroughOptions;
|
|
30
103
|
}
|
|
31
104
|
|
|
32
105
|
/**
|