primereact 10.0.0 → 10.0.2
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 +1 -1
- package/accordion/accordion.esm.js +0 -1
- package/api/api.esm.js +0 -1
- package/autocomplete/autocomplete.esm.js +8 -7
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/avatar/avatar.esm.js +0 -1
- package/avatargroup/avatargroup.esm.js +0 -1
- package/badge/badge.esm.js +0 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +0 -1
- package/button/button.esm.js +0 -1
- package/calendar/calendar.esm.js +2 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/card/card.esm.js +0 -1
- package/carousel/carousel.esm.js +7 -8
- package/carousel/carousel.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +0 -1
- package/chart/chart.esm.js +0 -1
- package/checkbox/checkbox.esm.js +0 -1
- package/chip/chip.esm.js +0 -1
- package/chips/chips.esm.js +0 -1
- package/colorpicker/colorpicker.esm.js +0 -1
- package/column/column.esm.js +0 -1
- package/columngroup/columngroup.esm.js +0 -1
- package/componentbase/componentbase.cjs.js +12 -7
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +23 -13
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +12 -7
- package/componentbase/componentbase.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +0 -1
- package/confirmpopup/confirmpopup.esm.js +0 -1
- package/contextmenu/contextmenu.esm.js +0 -1
- package/core/core.js +12 -7
- package/core/core.min.js +1 -1
- package/csstransition/csstransition.esm.js +0 -1
- package/datascroller/datascroller.esm.js +0 -1
- package/datatable/datatable.esm.js +0 -1
- package/dataview/dataview.esm.js +0 -1
- package/deferredcontent/deferredcontent.esm.js +0 -1
- package/dialog/dialog.esm.js +2 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/divider/divider.esm.js +0 -1
- package/dock/dock.esm.js +0 -1
- package/dropdown/dropdown.esm.js +0 -1
- package/editor/editor.esm.js +0 -1
- package/fieldset/fieldset.esm.js +0 -1
- package/fileupload/fileupload.esm.js +0 -1
- package/galleria/galleria.esm.js +11 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/hooks/hooks.esm.js +0 -6
- package/iconbase/iconbase.esm.js +0 -1
- package/icons/angledoubledown/index.esm.js +0 -1
- package/icons/angledoubleleft/index.esm.js +0 -1
- package/icons/angledoubleright/index.esm.js +0 -1
- package/icons/angledoubleup/index.esm.js +0 -1
- package/icons/angledown/index.esm.js +0 -1
- package/icons/angleleft/index.esm.js +0 -1
- package/icons/angleright/index.esm.js +0 -1
- package/icons/angleup/index.esm.js +0 -1
- package/icons/arrowdown/index.esm.js +0 -1
- package/icons/arrowup/index.esm.js +0 -1
- package/icons/ban/index.esm.js +0 -1
- package/icons/bars/index.esm.js +0 -1
- package/icons/calendar/index.esm.js +0 -1
- package/icons/check/index.esm.js +0 -1
- package/icons/chevrondown/index.esm.js +0 -1
- package/icons/chevronleft/index.esm.js +0 -1
- package/icons/chevronright/index.esm.js +0 -1
- package/icons/chevronup/index.esm.js +0 -1
- package/icons/download/index.esm.js +0 -1
- package/icons/exclamationtriangle/index.esm.js +0 -1
- package/icons/eye/index.esm.js +0 -1
- package/icons/eyeslash/index.esm.js +0 -1
- package/icons/filter/index.esm.js +0 -1
- package/icons/filterslash/index.esm.js +0 -1
- package/icons/infocircle/index.esm.js +0 -1
- package/icons/minus/index.esm.js +0 -1
- package/icons/pencil/index.esm.js +0 -1
- package/icons/plus/index.esm.js +0 -1
- package/icons/refresh/index.esm.js +0 -1
- package/icons/search/index.esm.js +0 -1
- package/icons/searchminus/index.esm.js +0 -1
- package/icons/searchplus/index.esm.js +0 -1
- package/icons/sortalt/index.esm.js +0 -1
- package/icons/sortamountdown/index.esm.js +0 -1
- package/icons/sortamountupalt/index.esm.js +0 -1
- package/icons/spinner/index.esm.js +0 -1
- package/icons/star/index.esm.js +0 -1
- package/icons/starfill/index.esm.js +0 -1
- package/icons/thlarge/index.esm.js +0 -1
- package/icons/times/index.esm.js +0 -1
- package/icons/timescircle/index.esm.js +0 -1
- package/icons/trash/index.esm.js +0 -1
- package/icons/undo/index.esm.js +0 -1
- package/icons/upload/index.esm.js +0 -1
- package/icons/windowmaximize/index.esm.js +0 -1
- package/icons/windowminimize/index.esm.js +0 -1
- package/image/image.esm.js +2 -1
- package/image/image.esm.min.js +1 -1
- package/inplace/inplace.esm.js +0 -1
- package/inputmask/inputmask.esm.js +0 -1
- package/inputnumber/inputnumber.esm.js +0 -1
- package/inputswitch/inputswitch.esm.js +0 -1
- package/inputtext/inputtext.esm.js +0 -1
- package/inputtextarea/inputtextarea.esm.js +0 -1
- package/keyfilter/keyfilter.esm.js +0 -1
- package/knob/knob.esm.js +0 -1
- package/listbox/listbox.esm.js +0 -1
- package/megamenu/megamenu.esm.js +0 -1
- package/mention/mention.esm.js +0 -1
- package/menu/menu.esm.js +0 -1
- package/menubar/menubar.esm.js +0 -1
- package/message/message.esm.js +0 -1
- package/messages/messages.esm.js +1 -2
- package/messages/messages.esm.min.js +1 -1
- package/multiselect/multiselect.esm.js +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +0 -1
- package/orderlist/orderlist.esm.js +9 -5
- package/orderlist/orderlist.esm.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +0 -1
- package/overlaypanel/overlaypanel.esm.js +0 -1
- package/overlayservice/overlayservice.esm.js +0 -1
- package/package.json +2 -2
- package/paginator/paginator.esm.js +0 -1
- package/panel/panel.esm.js +0 -1
- package/panelmenu/panelmenu.esm.js +0 -1
- package/passthrough/index.esm.js +0 -1
- package/passthrough/tailwind/index.cjs.js +2 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +149 -148
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +2 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.esm.js +0 -1
- package/picklist/picklist.esm.js +0 -1
- package/portal/portal.esm.js +0 -1
- package/primereact.all.cjs.js +12 -7
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +70 -42
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +12 -7
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.esm.js +0 -1
- package/progressspinner/progressspinner.esm.js +0 -1
- package/radiobutton/radiobutton.esm.js +0 -1
- package/rating/rating.esm.js +0 -1
- package/ripple/ripple.esm.js +0 -1
- package/row/row.esm.js +0 -1
- package/scrollpanel/scrollpanel.esm.js +0 -1
- package/scrolltop/scrolltop.esm.js +0 -1
- package/selectbutton/selectbutton.esm.js +0 -1
- package/sidebar/sidebar.esm.js +2 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/skeleton/skeleton.esm.js +0 -1
- package/slidemenu/slidemenu.esm.js +0 -1
- package/slider/slider.esm.js +0 -1
- package/speeddial/speeddial.esm.js +0 -1
- package/splitbutton/splitbutton.esm.js +0 -1
- package/splitter/splitter.esm.js +0 -1
- package/steps/steps.esm.js +0 -1
- package/styleclass/styleclass.esm.js +0 -1
- package/tabmenu/tabmenu.esm.js +0 -1
- package/tabview/tabview.esm.js +0 -1
- package/tag/tag.esm.js +0 -1
- package/terminal/terminal.esm.js +0 -1
- package/terminalservice/terminalservice.esm.js +0 -1
- package/tieredmenu/tieredmenu.esm.js +0 -1
- package/timeline/timeline.esm.js +0 -1
- package/toast/toast.esm.js +0 -1
- package/togglebutton/togglebutton.esm.js +0 -1
- package/toolbar/toolbar.esm.js +0 -1
- package/tooltip/tooltip.esm.js +0 -1
- package/tree/tree.esm.js +0 -1
- package/treeselect/treeselect.esm.js +0 -1
- package/treetable/treetable.esm.js +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +0 -1
- package/utils/utils.esm.js +0 -1
- package/virtualscroller/virtualscroller.esm.js +0 -1
- package/web-types.json +1 -1
- package/accordion/accordion.esm.min.mjs +0 -1
- package/accordion/accordion.esm.mjs +0 -420
- package/api/api.esm.min.mjs +0 -1
- package/api/api.esm.mjs +0 -943
- package/autocomplete/autocomplete.esm.min.mjs +0 -1
- package/autocomplete/autocomplete.esm.mjs +0 -1128
- package/avatar/avatar.esm.min.mjs +0 -1
- package/avatar/avatar.esm.mjs +0 -244
- package/avatargroup/avatargroup.esm.min.mjs +0 -1
- package/avatargroup/avatargroup.esm.mjs +0 -54
- package/badge/badge.esm.min.mjs +0 -1
- package/badge/badge.esm.mjs +0 -109
- package/blockui/blockui.esm.min.mjs +0 -1
- package/blockui/blockui.esm.mjs +0 -267
- package/breadcrumb/breadcrumb.esm.min.mjs +0 -1
- package/breadcrumb/breadcrumb.esm.mjs +0 -350
- package/button/button.esm.min.mjs +0 -1
- package/button/button.esm.mjs +0 -294
- package/calendar/calendar.esm.min.mjs +0 -1
- package/calendar/calendar.esm.mjs +0 -3474
- package/card/card.esm.min.mjs +0 -1
- package/card/card.esm.mjs +0 -97
- package/carousel/carousel.esm.min.mjs +0 -1
- package/carousel/carousel.esm.mjs +0 -800
- package/cascadeselect/cascadeselect.esm.min.mjs +0 -1
- package/cascadeselect/cascadeselect.esm.mjs +0 -818
- package/chart/chart.esm.min.mjs +0 -1
- package/chart/chart.esm.mjs +0 -154
- package/checkbox/checkbox.esm.min.mjs +0 -1
- package/checkbox/checkbox.esm.mjs +0 -356
- package/chip/chip.esm.min.mjs +0 -1
- package/chip/chip.esm.mjs +0 -247
- package/chips/chips.esm.min.mjs +0 -1
- package/chips/chips.esm.mjs +0 -500
- package/colorpicker/colorpicker.esm.min.mjs +0 -1
- package/colorpicker/colorpicker.esm.mjs +0 -787
- package/column/column.esm.min.mjs +0 -1
- package/column/column.esm.mjs +0 -7
- package/columngroup/columngroup.esm.min.mjs +0 -1
- package/columngroup/columngroup.esm.mjs +0 -5
- package/componentbase/componentbase.esm.min.mjs +0 -1
- package/componentbase/componentbase.esm.mjs +0 -328
- package/confirmdialog/confirmdialog.esm.min.mjs +0 -1
- package/confirmdialog/confirmdialog.esm.mjs +0 -375
- package/confirmpopup/confirmpopup.esm.min.mjs +0 -1
- package/confirmpopup/confirmpopup.esm.mjs +0 -609
- package/contextmenu/contextmenu.esm.min.mjs +0 -1
- package/contextmenu/contextmenu.esm.mjs +0 -663
- package/csstransition/csstransition.esm.min.mjs +0 -1
- package/csstransition/csstransition.esm.mjs +0 -137
- package/datascroller/datascroller.esm.min.mjs +0 -1
- package/datascroller/datascroller.esm.mjs +0 -319
- package/datatable/datatable.esm.min.mjs +0 -1
- package/datatable/datatable.esm.mjs +0 -6635
- package/dataview/dataview.esm.min.mjs +0 -1
- package/dataview/dataview.esm.mjs +0 -505
- package/deferredcontent/deferredcontent.esm.min.mjs +0 -1
- package/deferredcontent/deferredcontent.esm.mjs +0 -132
- package/dialog/dialog.esm.min.mjs +0 -1
- package/dialog/dialog.esm.mjs +0 -984
- package/divider/divider.esm.min.mjs +0 -1
- package/divider/divider.esm.mjs +0 -78
- package/dock/dock.esm.min.mjs +0 -1
- package/dock/dock.esm.mjs +0 -347
- package/dropdown/dropdown.esm.min.mjs +0 -1
- package/dropdown/dropdown.esm.mjs +0 -1379
- package/editor/editor.esm.min.mjs +0 -1
- package/editor/editor.esm.mjs +0 -337
- package/fieldset/fieldset.esm.min.mjs +0 -1
- package/fieldset/fieldset.esm.mjs +0 -269
- package/fileupload/fileupload.esm.min.mjs +0 -1
- package/fileupload/fileupload.esm.mjs +0 -1004
- package/galleria/galleria.esm.min.mjs +0 -1
- package/galleria/galleria.esm.mjs +0 -1094
- package/hooks/hooks.esm.min.mjs +0 -1
- package/hooks/hooks.esm.mjs +0 -1036
- package/iconbase/iconbase.esm.min.mjs +0 -1
- package/iconbase/iconbase.esm.mjs +0 -32
- package/icons/angledoubledown/index.esm.min.mjs +0 -1
- package/icons/angledoubledown/index.esm.mjs +0 -38
- package/icons/angledoubleleft/index.esm.min.mjs +0 -1
- package/icons/angledoubleleft/index.esm.mjs +0 -38
- package/icons/angledoubleright/index.esm.min.mjs +0 -1
- package/icons/angledoubleright/index.esm.mjs +0 -38
- package/icons/angledoubleup/index.esm.min.mjs +0 -1
- package/icons/angledoubleup/index.esm.mjs +0 -38
- package/icons/angledown/index.esm.min.mjs +0 -1
- package/icons/angledown/index.esm.mjs +0 -36
- package/icons/angleleft/index.esm.min.mjs +0 -1
- package/icons/angleleft/index.esm.mjs +0 -36
- package/icons/angleright/index.esm.min.mjs +0 -1
- package/icons/angleright/index.esm.mjs +0 -36
- package/icons/angleup/index.esm.min.mjs +0 -1
- package/icons/angleup/index.esm.mjs +0 -36
- package/icons/arrowdown/index.esm.min.mjs +0 -1
- package/icons/arrowdown/index.esm.mjs +0 -660
- package/icons/arrowup/index.esm.min.mjs +0 -1
- package/icons/arrowup/index.esm.mjs +0 -660
- package/icons/ban/index.esm.min.mjs +0 -1
- package/icons/ban/index.esm.mjs +0 -658
- package/icons/bars/index.esm.min.mjs +0 -1
- package/icons/bars/index.esm.mjs +0 -38
- package/icons/calendar/index.esm.min.mjs +0 -1
- package/icons/calendar/index.esm.mjs +0 -36
- package/icons/check/index.esm.min.mjs +0 -1
- package/icons/check/index.esm.mjs +0 -36
- package/icons/chevrondown/index.esm.min.mjs +0 -1
- package/icons/chevrondown/index.esm.mjs +0 -36
- package/icons/chevronleft/index.esm.min.mjs +0 -1
- package/icons/chevronleft/index.esm.mjs +0 -36
- package/icons/chevronright/index.esm.min.mjs +0 -1
- package/icons/chevronright/index.esm.mjs +0 -36
- package/icons/chevronup/index.esm.min.mjs +0 -1
- package/icons/chevronup/index.esm.mjs +0 -36
- package/icons/download/index.esm.min.mjs +0 -1
- package/icons/download/index.esm.mjs +0 -660
- package/icons/exclamationtriangle/index.esm.min.mjs +0 -1
- package/icons/exclamationtriangle/index.esm.mjs +0 -664
- package/icons/eye/index.esm.min.mjs +0 -1
- package/icons/eye/index.esm.mjs +0 -38
- package/icons/eyeslash/index.esm.min.mjs +0 -1
- package/icons/eyeslash/index.esm.mjs +0 -660
- package/icons/filter/index.esm.min.mjs +0 -1
- package/icons/filter/index.esm.mjs +0 -658
- package/icons/filterslash/index.esm.min.mjs +0 -1
- package/icons/filterslash/index.esm.mjs +0 -660
- package/icons/infocircle/index.esm.min.mjs +0 -1
- package/icons/infocircle/index.esm.mjs +0 -660
- package/icons/minus/index.esm.min.mjs +0 -1
- package/icons/minus/index.esm.mjs +0 -36
- package/icons/pencil/index.esm.min.mjs +0 -1
- package/icons/pencil/index.esm.mjs +0 -658
- package/icons/plus/index.esm.min.mjs +0 -1
- package/icons/plus/index.esm.mjs +0 -658
- package/icons/refresh/index.esm.min.mjs +0 -1
- package/icons/refresh/index.esm.mjs +0 -660
- package/icons/search/index.esm.min.mjs +0 -1
- package/icons/search/index.esm.mjs +0 -660
- package/icons/searchminus/index.esm.min.mjs +0 -1
- package/icons/searchminus/index.esm.mjs +0 -660
- package/icons/searchplus/index.esm.min.mjs +0 -1
- package/icons/searchplus/index.esm.mjs +0 -660
- package/icons/sortalt/index.esm.min.mjs +0 -1
- package/icons/sortalt/index.esm.mjs +0 -667
- package/icons/sortamountdown/index.esm.min.mjs +0 -1
- package/icons/sortamountdown/index.esm.mjs +0 -673
- package/icons/sortamountupalt/index.esm.min.mjs +0 -1
- package/icons/sortamountupalt/index.esm.mjs +0 -673
- package/icons/spinner/index.esm.min.mjs +0 -1
- package/icons/spinner/index.esm.mjs +0 -658
- package/icons/star/index.esm.min.mjs +0 -1
- package/icons/star/index.esm.mjs +0 -658
- package/icons/starfill/index.esm.min.mjs +0 -1
- package/icons/starfill/index.esm.mjs +0 -658
- package/icons/thlarge/index.esm.min.mjs +0 -1
- package/icons/thlarge/index.esm.mjs +0 -660
- package/icons/times/index.esm.min.mjs +0 -1
- package/icons/times/index.esm.mjs +0 -36
- package/icons/timescircle/index.esm.min.mjs +0 -1
- package/icons/timescircle/index.esm.mjs +0 -660
- package/icons/trash/index.esm.min.mjs +0 -1
- package/icons/trash/index.esm.mjs +0 -660
- package/icons/undo/index.esm.min.mjs +0 -1
- package/icons/undo/index.esm.mjs +0 -660
- package/icons/upload/index.esm.min.mjs +0 -1
- package/icons/upload/index.esm.mjs +0 -660
- package/icons/windowmaximize/index.esm.min.mjs +0 -1
- package/icons/windowmaximize/index.esm.mjs +0 -660
- package/icons/windowminimize/index.esm.min.mjs +0 -1
- package/icons/windowminimize/index.esm.mjs +0 -660
- package/image/image.esm.min.mjs +0 -1
- package/image/image.esm.mjs +0 -1163
- package/inplace/inplace.esm.min.mjs +0 -1
- package/inplace/inplace.esm.mjs +0 -242
- package/inputmask/inputmask.esm.min.mjs +0 -1
- package/inputmask/inputmask.esm.mjs +0 -559
- package/inputnumber/inputnumber.esm.min.mjs +0 -1
- package/inputnumber/inputnumber.esm.mjs +0 -1208
- package/inputswitch/inputswitch.esm.min.mjs +0 -1
- package/inputswitch/inputswitch.esm.mjs +0 -290
- package/inputtext/inputtext.esm.min.mjs +0 -1
- package/inputtext/inputtext.esm.mjs +0 -170
- package/inputtextarea/inputtextarea.esm.min.mjs +0 -1
- package/inputtextarea/inputtextarea.esm.mjs +0 -219
- package/keyfilter/keyfilter.esm.min.mjs +0 -1
- package/keyfilter/keyfilter.esm.mjs +0 -107
- package/knob/knob.esm.min.mjs +0 -1
- package/knob/knob.esm.mjs +0 -317
- package/listbox/listbox.esm.min.mjs +0 -1
- package/listbox/listbox.esm.mjs +0 -809
- package/megamenu/megamenu.esm.min.mjs +0 -1
- package/megamenu/megamenu.esm.mjs +0 -715
- package/mention/mention.esm.min.mjs +0 -1
- package/mention/mention.esm.mjs +0 -770
- package/menu/menu.esm.min.mjs +0 -1
- package/menu/menu.esm.mjs +0 -484
- package/menubar/menubar.esm.min.mjs +0 -1
- package/menubar/menubar.esm.mjs +0 -583
- package/message/message.esm.min.mjs +0 -1
- package/message/message.esm.mjs +0 -168
- package/messages/messages.esm.min.mjs +0 -1
- package/messages/messages.esm.mjs +0 -438
- package/multiselect/multiselect.esm.min.mjs +0 -1
- package/multiselect/multiselect.esm.mjs +0 -1723
- package/multistatecheckbox/multistatecheckbox.esm.min.mjs +0 -1
- package/multistatecheckbox/multistatecheckbox.esm.mjs +0 -351
- package/orderlist/orderlist.esm.min.mjs +0 -1
- package/orderlist/orderlist.esm.mjs +0 -820
- package/organizationchart/organizationchart.esm.min.mjs +0 -1
- package/organizationchart/organizationchart.esm.mjs +0 -479
- package/overlaypanel/overlaypanel.esm.min.mjs +0 -1
- package/overlaypanel/overlaypanel.esm.mjs +0 -515
- package/overlayservice/overlayservice.esm.min.mjs +0 -1
- package/overlayservice/overlayservice.esm.mjs +0 -6
- package/paginator/paginator.esm.min.mjs +0 -1
- package/paginator/paginator.esm.mjs +0 -932
- package/panel/panel.esm.min.mjs +0 -1
- package/panel/panel.esm.mjs +0 -315
- package/panelmenu/panelmenu.esm.min.mjs +0 -1
- package/panelmenu/panelmenu.esm.mjs +0 -644
- package/passthrough/index.esm.min.mjs +0 -1
- package/passthrough/index.esm.mjs +0 -70
- package/passthrough/tailwind/index.esm.min.mjs +0 -1
- package/passthrough/tailwind/index.esm.mjs +0 -3513
- package/password/password.esm.min.mjs +0 -1
- package/password/password.esm.mjs +0 -566
- package/picklist/picklist.esm.min.mjs +0 -1
- package/picklist/picklist.esm.mjs +0 -1118
- package/portal/portal.esm.min.mjs +0 -1
- package/portal/portal.esm.mjs +0 -109
- package/primereact.all.esm.min.mjs +0 -1
- package/primereact.all.esm.mjs +0 -51669
- package/progressbar/progressbar.esm.min.mjs +0 -1
- package/progressbar/progressbar.esm.mjs +0 -189
- package/progressspinner/progressspinner.esm.min.mjs +0 -1
- package/progressspinner/progressspinner.esm.mjs +0 -87
- package/radiobutton/radiobutton.esm.min.mjs +0 -1
- package/radiobutton/radiobutton.esm.mjs +0 -328
- package/rating/rating.esm.min.mjs +0 -1
- package/rating/rating.esm.mjs +0 -272
- package/ripple/ripple.esm.min.mjs +0 -1
- package/ripple/ripple.esm.mjs +0 -99
- package/row/row.esm.min.mjs +0 -1
- package/row/row.esm.mjs +0 -35
- package/scrollpanel/scrollpanel.esm.min.mjs +0 -1
- package/scrollpanel/scrollpanel.esm.mjs +0 -209
- package/scrolltop/scrolltop.esm.min.mjs +0 -1
- package/scrolltop/scrolltop.esm.mjs +0 -268
- package/selectbutton/selectbutton.esm.min.mjs +0 -1
- package/selectbutton/selectbutton.esm.mjs +0 -326
- package/sidebar/sidebar.esm.min.mjs +0 -1
- package/sidebar/sidebar.esm.mjs +0 -544
- package/skeleton/skeleton.esm.min.mjs +0 -1
- package/skeleton/skeleton.esm.mjs +0 -124
- package/slidemenu/slidemenu.esm.min.mjs +0 -1
- package/slidemenu/slidemenu.esm.mjs +0 -688
- package/slider/slider.esm.min.mjs +0 -1
- package/slider/slider.esm.mjs +0 -477
- package/speeddial/speeddial.esm.min.mjs +0 -1
- package/speeddial/speeddial.esm.mjs +0 -520
- package/splitbutton/splitbutton.esm.min.mjs +0 -1
- package/splitbutton/splitbutton.esm.mjs +0 -544
- package/splitter/splitter.esm.min.mjs +0 -1
- package/splitter/splitter.esm.mjs +0 -465
- package/steps/steps.esm.min.mjs +0 -1
- package/steps/steps.esm.mjs +0 -293
- package/styleclass/styleclass.esm.min.mjs +0 -1
- package/styleclass/styleclass.esm.mjs +0 -268
- package/tabmenu/tabmenu.esm.min.mjs +0 -1
- package/tabmenu/tabmenu.esm.mjs +0 -331
- package/tabview/tabview.esm.min.mjs +0 -1
- package/tabview/tabview.esm.mjs +0 -677
- package/tag/tag.esm.min.mjs +0 -1
- package/tag/tag.esm.mjs +0 -116
- package/terminal/terminal.esm.min.mjs +0 -1
- package/terminal/terminal.esm.mjs +0 -279
- package/terminalservice/terminalservice.esm.min.mjs +0 -1
- package/terminalservice/terminalservice.esm.mjs +0 -6
- package/tieredmenu/tieredmenu.esm.min.mjs +0 -1
- package/tieredmenu/tieredmenu.esm.mjs +0 -698
- package/timeline/timeline.esm.min.mjs +0 -1
- package/timeline/timeline.esm.mjs +0 -163
- package/toast/toast.esm.min.mjs +0 -1
- package/toast/toast.esm.mjs +0 -738
- package/togglebutton/togglebutton.esm.min.mjs +0 -1
- package/togglebutton/togglebutton.esm.mjs +0 -216
- package/toolbar/toolbar.esm.min.mjs +0 -1
- package/toolbar/toolbar.esm.mjs +0 -78
- package/tooltip/tooltip.esm.min.mjs +0 -1
- package/tooltip/tooltip.esm.mjs +0 -695
- package/tree/tree.esm.min.mjs +0 -1
- package/tree/tree.esm.mjs +0 -1402
- package/treeselect/treeselect.esm.min.mjs +0 -1
- package/treeselect/treeselect.esm.mjs +0 -929
- package/treetable/treetable.esm.min.mjs +0 -1
- package/treetable/treetable.esm.mjs +0 -3093
- package/tristatecheckbox/tristatecheckbox.esm.min.mjs +0 -1
- package/tristatecheckbox/tristatecheckbox.esm.mjs +0 -291
- package/utils/utils.esm.min.mjs +0 -1
- package/utils/utils.esm.mjs +0 -2382
- package/virtualscroller/virtualscroller.esm.min.mjs +0 -1
- package/virtualscroller/virtualscroller.esm.mjs +0 -971
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as t from"react";import e,{PrimeReactContext as r,localeOption as n}from"primereact/api";import{ComponentBase as o,useHandleStyle as a}from"primereact/componentbase";import{BarsIcon as i}from"primereact/icons/bars";import{SpinnerIcon as l}from"primereact/icons/spinner";import{ThLargeIcon as u}from"primereact/icons/thlarge";import{Paginator as s}from"primereact/paginator";import{Ripple as p}from"primereact/ripple";import{classNames as c,mergeProps as m,IconUtils as f,ObjectUtils as g}from"primereact/utils";function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},d.apply(this,arguments)}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function v(t){if(Array.isArray(t))return y(t)}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function h(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function w(){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 P(t){if(Array.isArray(t))return t}function O(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,l=[],u=!0,s=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}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.")}function E(t,e){return P(t)||O(t,e)||h(t,e)||S()}function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function N(t,e){if("object"!==j(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function I(t){var e=N(t,"string");return"symbol"===j(e)?e:String(e)}function A(t,e,r){return(e=I(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var D=o.extend({defaultProps:{__TYPE:"DataView",id:null,header:null,footer:null,value:null,layout:"list",dataKey:null,rows:null,first:0,totalRecords:null,paginator:!1,paginatorPosition:"bottom",alwaysShowPaginator:!0,paginatorClassName:null,paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",paginatorLeft:null,paginatorRight:null,paginatorDropdownAppendTo:null,pageLinkSize:5,rowsPerPageOptions:null,currentPageReportTemplate:"({currentPage} of {totalPages})",emptyMessage:null,sortField:null,sortOrder:null,style:null,className:null,lazy:!1,loading:!1,loadingIcon:null,gutter:!1,itemTemplate:null,onPage:null,children:void 0},css:{classes:{option:{root:"p-dataview-layout-options p-selectbutton p-buttonset",listButton:function(t){return c("p-button p-button-icon-only",{"p-highlight":"list"===t.props.layout})},gridButton:function(t){return c("p-button p-button-icon-only",{"p-highlight":"grid"===t.props.layout})}},loadingIcon:"p-dataview-loading-icon",loadingOverlay:"p-dataview-loading-overlay p-component-overlay",emptyMessage:"p-col-12 col-12 p-dataview-emptymessage",header:"p-dataview-header",footer:"p-dataview-footer",content:"p-dataview-content",grid:function(t){return c("p-grid grid",{"p-nogutter grid-nogutter":!t.props.gutter})},root:function(t){var e,r=t.props;return c("p-dataview p-component",(A(e={},"p-dataview-".concat(r.layout),!!r.layout),A(e,"p-dataview-loading",r.loading),e))}},styles:"\n@layer primereact {\n .p-dataview-loading {\n position: relative;\n min-height: 4rem;\n }\n \n .p-dataview .p-dataview-loading-overlay {\n position: absolute;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n"}}),T=o.extend({defaultProps:{__TYPE:"DataViewLayoutOptions",id:null,style:null,className:null,layout:null,listIcon:null,gridIcon:null,onChange:null,children:void 0}});function C(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=k(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){l=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw a}}}}function k(t,e){if(t){if("string"==typeof t)return L(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function M(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?M(Object(r),!0).forEach((function(e){A(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var R=t.memo((function(e){var n=t.useContext(r),o=T.getProps(e,n),a=T.setMetaData({props:o}),l=a.ptm,s=a.cx,g=function(t,e){o.onChange({originalEvent:t,value:e}),t.preventDefault()},d=m(l("list")),y=m(l("grid")),v=f.getJSXIcon(o.listIcon||t.createElement(i,d),x({},d),{props:o}),b=f.getJSXIcon(o.gridIcon||t.createElement(u,y),x({},y),{props:o}),h=m({id:o.id,style:o.style,className:c(o.className,s("option.root"))},T.getOtherProps(o),l("root")),w=m({type:"button",className:s("option.listButton"),onClick:function(t){return g(t,"list")}},l("listButton")),P=m({type:"button",className:s("option.gridButton"),onClick:function(t){return g(t,"grid")}},l("gridButton"));return t.createElement("div",h,t.createElement("button",w,v,t.createElement(p,null)),t.createElement("button",P,b,t.createElement(p,null)))})),z=t.memo((function(t){return t.template(t.item,t.layout)})),B=t.memo(t.forwardRef((function(o,i){var u=t.useContext(r),p=D.getProps(o,u),y=E(t.useState(p.first),2),P=y[0],O=y[1],S=E(t.useState(p.rows),2),j=S[0],N=S[1],I={props:p,state:{first:P,rows:j}},A=D.setMetaData(I),T=A.ptm,k=A.cx;a(D.css.styles,A.isUnstyled,{name:"dataview"});var L=t.useRef(null),M=p.onPage?p.first:P,R=p.onPage?p.rows:j,B=function(t){return p.dataKey?g.resolveFieldData(t,p.dataKey):null},F=function(){return p.totalRecords?p.totalRecords:p.value?p.value.length:0},_=function(e){var r=c("p-paginator-"+e,p.paginatorClassName),n=F();return t.createElement(s,{first:M,rows:R,pageLinkSize:p.pageLinkSize,className:r,onPageChange:V,template:p.paginatorTemplate,totalRecords:n,rowsPerPageOptions:p.rowsPerPageOptions,currentPageReportTemplate:p.currentPageReportTemplate,leftContent:p.paginatorLeft,rightContent:p.paginatorRight,alwaysShow:p.alwaysShowPaginator,dropdownAppendTo:p.paginatorDropdownAppendTo,ptm:T("paginator"),unstyled:p.unstyled,__parentMetadata:{parent:I}})},V=function(t){p.onPage?p.onPage(t):(O(t.first),N(t.rows))},J=function(){if(p.value){var t,r=new Map,n=g.localeComparator(u&&u.locale||e.locale),o=v(l=p.value)||b(l)||h(l)||w(),a=C(o);try{for(a.s();!(t=a.n()).done;){var i=t.value;r.set(i,g.resolveFieldData(i,p.sortField))}}catch(t){a.e(t)}finally{a.f()}return o.sort((function(t,o){var a=r.get(t),i=r.get(o);return g.sort(a,i,p.sortOrder,n,u&&u.nullSortOrder||e.nullSortOrder)})),o}var l;return null},K=function(){if(!p.loading){var e=p.emptyMessage||n("emptyMessage"),r=m({className:k("emptyMessage")},T("emptyMessage"));return t.createElement("div",r,e)}return null},U=function(e){if(g.isNotEmpty(e)){if(p.paginator){for(var r=p.lazy?0:M,n=F(),o=Math.min(R+r,n),a=[],i=r;i<o;i++){var l=e[i];l&&a.push(t.createElement(z,{key:B(e)||i,template:p.itemTemplate,layout:p.layout,item:l}))}return a}return e.map((function(e,r){return t.createElement(z,{key:B(e)||r,template:p.itemTemplate,layout:p.layout,item:e})}))}return K()};t.useImperativeHandle(i,(function(){return{props:p,getElement:function(){return L.current}}}));var X,Y,$,H=function(){var t=p.value;return g.isNotEmpty(t)&&p.sortField&&(t=J()),t}(),q=function(){if(p.loading){var e=m({className:k("loadingIcon")},T("loadingIcon")),r=p.loadingIcon||t.createElement(l,d({},e,{spin:!0})),n=f.getJSXIcon(r,x({},e),{props:p}),o=m({className:k("loadingOverlay")},T("loadingOverlay"));return t.createElement("div",o,n)}return null}(),G=!p.paginator||"bottom"===p.paginatorPosition&&"both"!==p.paginatorPosition?null:_("top"),Q=!p.paginator||"top"===p.paginatorPosition&&"both"!==p.paginatorPosition?null:_("bottom"),W=function(){if(p.header){var e=m({className:k("header")},T("header"));return t.createElement("div",e,p.header)}return null}(),Z=function(){if(p.footer){var e=m({className:k("footer")},T("footer"));return t.createElement("div",e,p.footer)}return null}(),tt=(X=U(H),Y=m({className:k("grid")},T("grid")),$=m({className:k("content")},T("content")),t.createElement("div",$,t.createElement("div",Y,X))),et=m({id:p.id,ref:L,style:p.style,className:c(p.className,k("root"))},D.getOtherProps(p),T("root"));return t.createElement("div",et,q,W,G,tt,Q,Z)})));R.displayName="DataViewLayoutOptions",z.displayName="DataViewItem",B.displayName="DataView";export{B as DataView,z as DataViewItem,R as DataViewLayoutOptions};
|
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PrimeReact, { PrimeReactContext, localeOption } from 'primereact/api';
|
|
4
|
-
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
|
|
5
|
-
import { BarsIcon } from 'primereact/icons/bars';
|
|
6
|
-
import { SpinnerIcon } from 'primereact/icons/spinner';
|
|
7
|
-
import { ThLargeIcon } from 'primereact/icons/thlarge';
|
|
8
|
-
import { Paginator } from 'primereact/paginator';
|
|
9
|
-
import { Ripple } from 'primereact/ripple';
|
|
10
|
-
import { classNames, mergeProps, IconUtils, ObjectUtils } from 'primereact/utils';
|
|
11
|
-
|
|
12
|
-
function _extends() {
|
|
13
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
14
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
15
|
-
var source = arguments[i];
|
|
16
|
-
for (var key in source) {
|
|
17
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
18
|
-
target[key] = source[key];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return target;
|
|
23
|
-
};
|
|
24
|
-
return _extends.apply(this, arguments);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function _arrayLikeToArray$1(arr, len) {
|
|
28
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
29
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
30
|
-
return arr2;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _arrayWithoutHoles(arr) {
|
|
34
|
-
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function _iterableToArray(iter) {
|
|
38
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function _unsupportedIterableToArray$1(o, minLen) {
|
|
42
|
-
if (!o) return;
|
|
43
|
-
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
44
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
45
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
46
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
47
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function _nonIterableSpread() {
|
|
51
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _toConsumableArray(arr) {
|
|
55
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _arrayWithHoles(arr) {
|
|
59
|
-
if (Array.isArray(arr)) return arr;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _iterableToArrayLimit(r, l) {
|
|
63
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
64
|
-
if (null != t) {
|
|
65
|
-
var e,
|
|
66
|
-
n,
|
|
67
|
-
i,
|
|
68
|
-
u,
|
|
69
|
-
a = [],
|
|
70
|
-
f = !0,
|
|
71
|
-
o = !1;
|
|
72
|
-
try {
|
|
73
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
74
|
-
if (Object(t) !== t) return;
|
|
75
|
-
f = !1;
|
|
76
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
77
|
-
} catch (r) {
|
|
78
|
-
o = !0, n = r;
|
|
79
|
-
} finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
82
|
-
} finally {
|
|
83
|
-
if (o) throw n;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return a;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function _nonIterableRest() {
|
|
91
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _slicedToArray(arr, i) {
|
|
95
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _typeof(o) {
|
|
99
|
-
"@babel/helpers - typeof";
|
|
100
|
-
|
|
101
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
102
|
-
return typeof o;
|
|
103
|
-
} : function (o) {
|
|
104
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
105
|
-
}, _typeof(o);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _toPrimitive(input, hint) {
|
|
109
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
110
|
-
var prim = input[Symbol.toPrimitive];
|
|
111
|
-
if (prim !== undefined) {
|
|
112
|
-
var res = prim.call(input, hint || "default");
|
|
113
|
-
if (_typeof(res) !== "object") return res;
|
|
114
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
115
|
-
}
|
|
116
|
-
return (hint === "string" ? String : Number)(input);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _toPropertyKey(arg) {
|
|
120
|
-
var key = _toPrimitive(arg, "string");
|
|
121
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function _defineProperty(obj, key, value) {
|
|
125
|
-
key = _toPropertyKey(key);
|
|
126
|
-
if (key in obj) {
|
|
127
|
-
Object.defineProperty(obj, key, {
|
|
128
|
-
value: value,
|
|
129
|
-
enumerable: true,
|
|
130
|
-
configurable: true,
|
|
131
|
-
writable: true
|
|
132
|
-
});
|
|
133
|
-
} else {
|
|
134
|
-
obj[key] = value;
|
|
135
|
-
}
|
|
136
|
-
return obj;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
var classes = {
|
|
140
|
-
option: {
|
|
141
|
-
root: 'p-dataview-layout-options p-selectbutton p-buttonset',
|
|
142
|
-
listButton: function listButton(_ref) {
|
|
143
|
-
var props = _ref.props;
|
|
144
|
-
return classNames('p-button p-button-icon-only', {
|
|
145
|
-
'p-highlight': props.layout === 'list'
|
|
146
|
-
});
|
|
147
|
-
},
|
|
148
|
-
gridButton: function gridButton(_ref2) {
|
|
149
|
-
var props = _ref2.props;
|
|
150
|
-
return classNames('p-button p-button-icon-only', {
|
|
151
|
-
'p-highlight': props.layout === 'grid'
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
loadingIcon: 'p-dataview-loading-icon',
|
|
156
|
-
loadingOverlay: 'p-dataview-loading-overlay p-component-overlay',
|
|
157
|
-
emptyMessage: 'p-col-12 col-12 p-dataview-emptymessage',
|
|
158
|
-
header: 'p-dataview-header',
|
|
159
|
-
footer: 'p-dataview-footer',
|
|
160
|
-
content: 'p-dataview-content',
|
|
161
|
-
grid: function grid(_ref3) {
|
|
162
|
-
var props = _ref3.props;
|
|
163
|
-
return classNames('p-grid grid', {
|
|
164
|
-
'p-nogutter grid-nogutter': !props.gutter
|
|
165
|
-
});
|
|
166
|
-
},
|
|
167
|
-
root: function root(_ref4) {
|
|
168
|
-
var _classNames;
|
|
169
|
-
var props = _ref4.props;
|
|
170
|
-
return classNames('p-dataview p-component', (_classNames = {}, _defineProperty(_classNames, "p-dataview-".concat(props.layout), !!props.layout), _defineProperty(_classNames, 'p-dataview-loading', props.loading), _classNames));
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
var styles = "\n@layer primereact {\n .p-dataview-loading {\n position: relative;\n min-height: 4rem;\n }\n \n .p-dataview .p-dataview-loading-overlay {\n position: absolute;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n";
|
|
174
|
-
var DataViewBase = ComponentBase.extend({
|
|
175
|
-
defaultProps: {
|
|
176
|
-
__TYPE: 'DataView',
|
|
177
|
-
id: null,
|
|
178
|
-
header: null,
|
|
179
|
-
footer: null,
|
|
180
|
-
value: null,
|
|
181
|
-
layout: 'list',
|
|
182
|
-
dataKey: null,
|
|
183
|
-
rows: null,
|
|
184
|
-
first: 0,
|
|
185
|
-
totalRecords: null,
|
|
186
|
-
paginator: false,
|
|
187
|
-
paginatorPosition: 'bottom',
|
|
188
|
-
alwaysShowPaginator: true,
|
|
189
|
-
paginatorClassName: null,
|
|
190
|
-
paginatorTemplate: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown',
|
|
191
|
-
paginatorLeft: null,
|
|
192
|
-
paginatorRight: null,
|
|
193
|
-
paginatorDropdownAppendTo: null,
|
|
194
|
-
pageLinkSize: 5,
|
|
195
|
-
rowsPerPageOptions: null,
|
|
196
|
-
currentPageReportTemplate: '({currentPage} of {totalPages})',
|
|
197
|
-
emptyMessage: null,
|
|
198
|
-
sortField: null,
|
|
199
|
-
sortOrder: null,
|
|
200
|
-
style: null,
|
|
201
|
-
className: null,
|
|
202
|
-
lazy: false,
|
|
203
|
-
loading: false,
|
|
204
|
-
loadingIcon: null,
|
|
205
|
-
gutter: false,
|
|
206
|
-
itemTemplate: null,
|
|
207
|
-
onPage: null,
|
|
208
|
-
children: undefined
|
|
209
|
-
},
|
|
210
|
-
css: {
|
|
211
|
-
classes: classes,
|
|
212
|
-
styles: styles
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
var DataViewLayoutOptionsBase = ComponentBase.extend({
|
|
216
|
-
defaultProps: {
|
|
217
|
-
__TYPE: 'DataViewLayoutOptions',
|
|
218
|
-
id: null,
|
|
219
|
-
style: null,
|
|
220
|
-
className: null,
|
|
221
|
-
layout: null,
|
|
222
|
-
listIcon: null,
|
|
223
|
-
gridIcon: null,
|
|
224
|
-
onChange: null,
|
|
225
|
-
children: undefined
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
230
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
231
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
232
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
233
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
234
|
-
var DataViewLayoutOptions = /*#__PURE__*/React.memo(function (inProps) {
|
|
235
|
-
var context = React.useContext(PrimeReactContext);
|
|
236
|
-
var props = DataViewLayoutOptionsBase.getProps(inProps, context);
|
|
237
|
-
var _DataViewLayoutOption = DataViewLayoutOptionsBase.setMetaData({
|
|
238
|
-
props: props
|
|
239
|
-
}),
|
|
240
|
-
ptm = _DataViewLayoutOption.ptm,
|
|
241
|
-
cx = _DataViewLayoutOption.cx;
|
|
242
|
-
var changeLayout = function changeLayout(event, layoutMode) {
|
|
243
|
-
props.onChange({
|
|
244
|
-
originalEvent: event,
|
|
245
|
-
value: layoutMode
|
|
246
|
-
});
|
|
247
|
-
event.preventDefault();
|
|
248
|
-
};
|
|
249
|
-
var listIconProps = mergeProps(ptm('list'));
|
|
250
|
-
var gridIconProps = mergeProps(ptm('grid'));
|
|
251
|
-
var listIcon = IconUtils.getJSXIcon(props.listIcon || /*#__PURE__*/React.createElement(BarsIcon, listIconProps), _objectSpread({}, listIconProps), {
|
|
252
|
-
props: props
|
|
253
|
-
});
|
|
254
|
-
var gridIcon = IconUtils.getJSXIcon(props.gridIcon || /*#__PURE__*/React.createElement(ThLargeIcon, gridIconProps), _objectSpread({}, gridIconProps), {
|
|
255
|
-
props: props
|
|
256
|
-
});
|
|
257
|
-
var rootProps = mergeProps({
|
|
258
|
-
id: props.id,
|
|
259
|
-
style: props.style,
|
|
260
|
-
className: classNames(props.className, cx('option.root'))
|
|
261
|
-
}, DataViewLayoutOptionsBase.getOtherProps(props), ptm('root'));
|
|
262
|
-
var listButtonProps = mergeProps({
|
|
263
|
-
type: 'button',
|
|
264
|
-
className: cx('option.listButton'),
|
|
265
|
-
onClick: function onClick(event) {
|
|
266
|
-
return changeLayout(event, 'list');
|
|
267
|
-
}
|
|
268
|
-
}, ptm('listButton'));
|
|
269
|
-
var gridButtonProps = mergeProps({
|
|
270
|
-
type: 'button',
|
|
271
|
-
className: cx('option.gridButton'),
|
|
272
|
-
onClick: function onClick(event) {
|
|
273
|
-
return changeLayout(event, 'grid');
|
|
274
|
-
}
|
|
275
|
-
}, ptm('gridButton'));
|
|
276
|
-
return /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement("button", listButtonProps, listIcon, /*#__PURE__*/React.createElement(Ripple, null)), /*#__PURE__*/React.createElement("button", gridButtonProps, gridIcon, /*#__PURE__*/React.createElement(Ripple, null)));
|
|
277
|
-
});
|
|
278
|
-
var DataViewItem = /*#__PURE__*/React.memo(function (props) {
|
|
279
|
-
return props.template(props.item, props.layout);
|
|
280
|
-
});
|
|
281
|
-
var DataView = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
282
|
-
var context = React.useContext(PrimeReactContext);
|
|
283
|
-
var props = DataViewBase.getProps(inProps, context);
|
|
284
|
-
var _React$useState = React.useState(props.first),
|
|
285
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
286
|
-
firstState = _React$useState2[0],
|
|
287
|
-
setFirstState = _React$useState2[1];
|
|
288
|
-
var _React$useState3 = React.useState(props.rows),
|
|
289
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
290
|
-
rowsState = _React$useState4[0],
|
|
291
|
-
setRowsState = _React$useState4[1];
|
|
292
|
-
var metaData = {
|
|
293
|
-
props: props,
|
|
294
|
-
state: {
|
|
295
|
-
first: firstState,
|
|
296
|
-
rows: rowsState
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
var _DataViewBase$setMeta = DataViewBase.setMetaData(metaData),
|
|
300
|
-
ptm = _DataViewBase$setMeta.ptm,
|
|
301
|
-
cx = _DataViewBase$setMeta.cx,
|
|
302
|
-
isUnstyled = _DataViewBase$setMeta.isUnstyled;
|
|
303
|
-
useHandleStyle(DataViewBase.css.styles, isUnstyled, {
|
|
304
|
-
name: 'dataview'
|
|
305
|
-
});
|
|
306
|
-
var elementRef = React.useRef(null);
|
|
307
|
-
var first = props.onPage ? props.first : firstState;
|
|
308
|
-
var rows = props.onPage ? props.rows : rowsState;
|
|
309
|
-
var getItemRenderKey = function getItemRenderKey(value) {
|
|
310
|
-
return props.dataKey ? ObjectUtils.resolveFieldData(value, props.dataKey) : null;
|
|
311
|
-
};
|
|
312
|
-
var getTotalRecords = function getTotalRecords() {
|
|
313
|
-
return props.totalRecords ? props.totalRecords : props.value ? props.value.length : 0;
|
|
314
|
-
};
|
|
315
|
-
var createPaginator = function createPaginator(position) {
|
|
316
|
-
var className = classNames('p-paginator-' + position, props.paginatorClassName);
|
|
317
|
-
var totalRecords = getTotalRecords();
|
|
318
|
-
return /*#__PURE__*/React.createElement(Paginator, {
|
|
319
|
-
first: first,
|
|
320
|
-
rows: rows,
|
|
321
|
-
pageLinkSize: props.pageLinkSize,
|
|
322
|
-
className: className,
|
|
323
|
-
onPageChange: onPageChange,
|
|
324
|
-
template: props.paginatorTemplate,
|
|
325
|
-
totalRecords: totalRecords,
|
|
326
|
-
rowsPerPageOptions: props.rowsPerPageOptions,
|
|
327
|
-
currentPageReportTemplate: props.currentPageReportTemplate,
|
|
328
|
-
leftContent: props.paginatorLeft,
|
|
329
|
-
rightContent: props.paginatorRight,
|
|
330
|
-
alwaysShow: props.alwaysShowPaginator,
|
|
331
|
-
dropdownAppendTo: props.paginatorDropdownAppendTo,
|
|
332
|
-
ptm: ptm('paginator'),
|
|
333
|
-
unstyled: props.unstyled,
|
|
334
|
-
__parentMetadata: {
|
|
335
|
-
parent: metaData
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
};
|
|
339
|
-
var onPageChange = function onPageChange(event) {
|
|
340
|
-
if (props.onPage) {
|
|
341
|
-
props.onPage(event);
|
|
342
|
-
} else {
|
|
343
|
-
setFirstState(event.first);
|
|
344
|
-
setRowsState(event.rows);
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
var sort = function sort() {
|
|
348
|
-
if (props.value) {
|
|
349
|
-
// performance optimization to prevent resolving field data in each loop
|
|
350
|
-
var lookupMap = new Map();
|
|
351
|
-
var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact.locale);
|
|
352
|
-
var value = _toConsumableArray(props.value);
|
|
353
|
-
var _iterator = _createForOfIteratorHelper(value),
|
|
354
|
-
_step;
|
|
355
|
-
try {
|
|
356
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
357
|
-
var item = _step.value;
|
|
358
|
-
lookupMap.set(item, ObjectUtils.resolveFieldData(item, props.sortField));
|
|
359
|
-
}
|
|
360
|
-
} catch (err) {
|
|
361
|
-
_iterator.e(err);
|
|
362
|
-
} finally {
|
|
363
|
-
_iterator.f();
|
|
364
|
-
}
|
|
365
|
-
value.sort(function (data1, data2) {
|
|
366
|
-
var value1 = lookupMap.get(data1);
|
|
367
|
-
var value2 = lookupMap.get(data2);
|
|
368
|
-
return ObjectUtils.sort(value1, value2, props.sortOrder, comparator, context && context.nullSortOrder || PrimeReact.nullSortOrder);
|
|
369
|
-
});
|
|
370
|
-
return value;
|
|
371
|
-
}
|
|
372
|
-
return null;
|
|
373
|
-
};
|
|
374
|
-
var createLoader = function createLoader() {
|
|
375
|
-
if (props.loading) {
|
|
376
|
-
var loadingIconProps = mergeProps({
|
|
377
|
-
className: cx('loadingIcon')
|
|
378
|
-
}, ptm('loadingIcon'));
|
|
379
|
-
var icon = props.loadingIcon || /*#__PURE__*/React.createElement(SpinnerIcon, _extends({}, loadingIconProps, {
|
|
380
|
-
spin: true
|
|
381
|
-
}));
|
|
382
|
-
var loadingIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, loadingIconProps), {
|
|
383
|
-
props: props
|
|
384
|
-
});
|
|
385
|
-
var loadingOverlayProps = mergeProps({
|
|
386
|
-
className: cx('loadingOverlay')
|
|
387
|
-
}, ptm('loadingOverlay'));
|
|
388
|
-
return /*#__PURE__*/React.createElement("div", loadingOverlayProps, loadingIcon);
|
|
389
|
-
}
|
|
390
|
-
return null;
|
|
391
|
-
};
|
|
392
|
-
var createTopPaginator = function createTopPaginator() {
|
|
393
|
-
if (props.paginator && (props.paginatorPosition !== 'bottom' || props.paginatorPosition === 'both')) {
|
|
394
|
-
return createPaginator('top');
|
|
395
|
-
}
|
|
396
|
-
return null;
|
|
397
|
-
};
|
|
398
|
-
var createBottomPaginator = function createBottomPaginator() {
|
|
399
|
-
if (props.paginator && (props.paginatorPosition !== 'top' || props.paginatorPosition === 'both')) {
|
|
400
|
-
return createPaginator('bottom');
|
|
401
|
-
}
|
|
402
|
-
return null;
|
|
403
|
-
};
|
|
404
|
-
var createEmptyMessage = function createEmptyMessage() {
|
|
405
|
-
if (!props.loading) {
|
|
406
|
-
var _content = props.emptyMessage || localeOption('emptyMessage');
|
|
407
|
-
var emptyMessageProps = mergeProps({
|
|
408
|
-
className: cx('emptyMessage')
|
|
409
|
-
}, ptm('emptyMessage'));
|
|
410
|
-
return /*#__PURE__*/React.createElement("div", emptyMessageProps, _content);
|
|
411
|
-
}
|
|
412
|
-
return null;
|
|
413
|
-
};
|
|
414
|
-
var createHeader = function createHeader() {
|
|
415
|
-
if (props.header) {
|
|
416
|
-
var headerProps = mergeProps({
|
|
417
|
-
className: cx('header')
|
|
418
|
-
}, ptm('header'));
|
|
419
|
-
return /*#__PURE__*/React.createElement("div", headerProps, props.header);
|
|
420
|
-
}
|
|
421
|
-
return null;
|
|
422
|
-
};
|
|
423
|
-
var createFooter = function createFooter() {
|
|
424
|
-
if (props.footer) {
|
|
425
|
-
var footerProps = mergeProps({
|
|
426
|
-
className: cx('footer')
|
|
427
|
-
}, ptm('footer'));
|
|
428
|
-
return /*#__PURE__*/React.createElement("div", footerProps, props.footer);
|
|
429
|
-
}
|
|
430
|
-
return null;
|
|
431
|
-
};
|
|
432
|
-
var createItems = function createItems(value) {
|
|
433
|
-
if (ObjectUtils.isNotEmpty(value)) {
|
|
434
|
-
if (props.paginator) {
|
|
435
|
-
var currentFirst = props.lazy ? 0 : first;
|
|
436
|
-
var totalRecords = getTotalRecords();
|
|
437
|
-
var last = Math.min(rows + currentFirst, totalRecords);
|
|
438
|
-
var items = [];
|
|
439
|
-
for (var i = currentFirst; i < last; i++) {
|
|
440
|
-
var val = value[i];
|
|
441
|
-
val && items.push( /*#__PURE__*/React.createElement(DataViewItem, {
|
|
442
|
-
key: getItemRenderKey(value) || i,
|
|
443
|
-
template: props.itemTemplate,
|
|
444
|
-
layout: props.layout,
|
|
445
|
-
item: val
|
|
446
|
-
}));
|
|
447
|
-
}
|
|
448
|
-
return items;
|
|
449
|
-
}
|
|
450
|
-
return value.map(function (item, index) {
|
|
451
|
-
return /*#__PURE__*/React.createElement(DataViewItem, {
|
|
452
|
-
key: getItemRenderKey(item) || index,
|
|
453
|
-
template: props.itemTemplate,
|
|
454
|
-
layout: props.layout,
|
|
455
|
-
item: item
|
|
456
|
-
});
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
return createEmptyMessage();
|
|
460
|
-
};
|
|
461
|
-
var createContent = function createContent(value) {
|
|
462
|
-
var items = createItems(value);
|
|
463
|
-
var gridProps = mergeProps({
|
|
464
|
-
className: cx('grid')
|
|
465
|
-
}, ptm('grid'));
|
|
466
|
-
var contentProps = mergeProps({
|
|
467
|
-
className: cx('content')
|
|
468
|
-
}, ptm('content'));
|
|
469
|
-
return /*#__PURE__*/React.createElement("div", contentProps, /*#__PURE__*/React.createElement("div", gridProps, items));
|
|
470
|
-
};
|
|
471
|
-
var processData = function processData() {
|
|
472
|
-
var data = props.value;
|
|
473
|
-
if (ObjectUtils.isNotEmpty(data) && props.sortField) {
|
|
474
|
-
data = sort();
|
|
475
|
-
}
|
|
476
|
-
return data;
|
|
477
|
-
};
|
|
478
|
-
React.useImperativeHandle(ref, function () {
|
|
479
|
-
return {
|
|
480
|
-
props: props,
|
|
481
|
-
getElement: function getElement() {
|
|
482
|
-
return elementRef.current;
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
});
|
|
486
|
-
var data = processData();
|
|
487
|
-
var loader = createLoader();
|
|
488
|
-
var topPaginator = createTopPaginator();
|
|
489
|
-
var bottomPaginator = createBottomPaginator();
|
|
490
|
-
var header = createHeader();
|
|
491
|
-
var footer = createFooter();
|
|
492
|
-
var content = createContent(data);
|
|
493
|
-
var rootProps = mergeProps({
|
|
494
|
-
id: props.id,
|
|
495
|
-
ref: elementRef,
|
|
496
|
-
style: props.style,
|
|
497
|
-
className: classNames(props.className, cx('root'))
|
|
498
|
-
}, DataViewBase.getOtherProps(props), ptm('root'));
|
|
499
|
-
return /*#__PURE__*/React.createElement("div", rootProps, loader, header, topPaginator, content, bottomPaginator, footer);
|
|
500
|
-
}));
|
|
501
|
-
DataViewLayoutOptions.displayName = 'DataViewLayoutOptions';
|
|
502
|
-
DataViewItem.displayName = 'DataViewItem';
|
|
503
|
-
DataView.displayName = 'DataView';
|
|
504
|
-
|
|
505
|
-
export { DataView, DataViewItem, DataViewLayoutOptions };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as t from"react";import{useEventListener as r,useMountEffect as e}from"primereact/hooks";import{ComponentBase as n}from"primereact/componentbase";import{mergeProps as o}from"primereact/utils";import{PrimeReactContext as i}from"primereact/api";function a(t){if(Array.isArray(t))return t}function u(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,u=[],l=!0,c=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=i.call(e)).done)&&(u.push(n.value),u.length!==r);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}function l(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function c(t,r){if(t){if("string"==typeof t)return l(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?l(t,r):void 0}}function f(){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 m(t,r){return a(t)||u(t,r)||c(t,r)||f()}var p=n.extend({defaultProps:{__TYPE:"DeferredContent",onload:null,children:void 0}}),s=t.forwardRef((function(n,a){var u=t.useContext(i),l=p.getProps(n,u),c=m(t.useState(!1),2),f=c[0],s=c[1],d=t.useRef(null),y=m(r({target:"window",type:"scroll",listener:function(){b()&&(w(),h())}}),2),v=y[0],h=y[1],g=p.setMetaData({props:l,state:{loaded:f}}).ptm,b=function(){if(f)return!1;var t=d.current.getBoundingClientRect();return document.documentElement.clientHeight>=t.top},w=function(t){s(!0),l.onLoad&&l.onLoad(t)};t.useImperativeHandle(a,(function(){return{props:l,getElement:function(){return d.current}}})),e((function(){f||(b()?w():v())}));var A=o({ref:d},p.getOtherProps(l),g("root"));return t.createElement("div",A,f&&l.children)}));s.displayName="DeferredContent";export{s as DeferredContent};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useEventListener, useMountEffect } from 'primereact/hooks';
|
|
4
|
-
import { ComponentBase } from 'primereact/componentbase';
|
|
5
|
-
import { mergeProps } from 'primereact/utils';
|
|
6
|
-
import { PrimeReactContext } from 'primereact/api';
|
|
7
|
-
|
|
8
|
-
function _arrayWithHoles(arr) {
|
|
9
|
-
if (Array.isArray(arr)) return arr;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function _iterableToArrayLimit(r, l) {
|
|
13
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
14
|
-
if (null != t) {
|
|
15
|
-
var e,
|
|
16
|
-
n,
|
|
17
|
-
i,
|
|
18
|
-
u,
|
|
19
|
-
a = [],
|
|
20
|
-
f = !0,
|
|
21
|
-
o = !1;
|
|
22
|
-
try {
|
|
23
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
24
|
-
if (Object(t) !== t) return;
|
|
25
|
-
f = !1;
|
|
26
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
27
|
-
} catch (r) {
|
|
28
|
-
o = !0, n = r;
|
|
29
|
-
} finally {
|
|
30
|
-
try {
|
|
31
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
32
|
-
} finally {
|
|
33
|
-
if (o) throw n;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return a;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function _arrayLikeToArray(arr, len) {
|
|
41
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
42
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
43
|
-
return arr2;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
47
|
-
if (!o) return;
|
|
48
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
49
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
50
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
51
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
52
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function _nonIterableRest() {
|
|
56
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function _slicedToArray(arr, i) {
|
|
60
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
var DeferredContentBase = ComponentBase.extend({
|
|
64
|
-
defaultProps: {
|
|
65
|
-
__TYPE: 'DeferredContent',
|
|
66
|
-
onload: null,
|
|
67
|
-
children: undefined
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
var DeferredContent = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
72
|
-
var context = React.useContext(PrimeReactContext);
|
|
73
|
-
var props = DeferredContentBase.getProps(inProps, context);
|
|
74
|
-
var _React$useState = React.useState(false),
|
|
75
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
76
|
-
loadedState = _React$useState2[0],
|
|
77
|
-
setLoadedState = _React$useState2[1];
|
|
78
|
-
var elementRef = React.useRef(null);
|
|
79
|
-
var _useEventListener = useEventListener({
|
|
80
|
-
target: 'window',
|
|
81
|
-
type: 'scroll',
|
|
82
|
-
listener: function listener() {
|
|
83
|
-
if (shouldLoad()) {
|
|
84
|
-
load();
|
|
85
|
-
unbindScrollListener();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}),
|
|
89
|
-
_useEventListener2 = _slicedToArray(_useEventListener, 2),
|
|
90
|
-
bindScrollListener = _useEventListener2[0],
|
|
91
|
-
unbindScrollListener = _useEventListener2[1];
|
|
92
|
-
var _DeferredContentBase$ = DeferredContentBase.setMetaData({
|
|
93
|
-
props: props,
|
|
94
|
-
state: {
|
|
95
|
-
loaded: loadedState
|
|
96
|
-
}
|
|
97
|
-
}),
|
|
98
|
-
ptm = _DeferredContentBase$.ptm;
|
|
99
|
-
var shouldLoad = function shouldLoad() {
|
|
100
|
-
if (loadedState) {
|
|
101
|
-
return false;
|
|
102
|
-
} else {
|
|
103
|
-
var rect = elementRef.current.getBoundingClientRect();
|
|
104
|
-
var winHeight = document.documentElement.clientHeight;
|
|
105
|
-
return winHeight >= rect.top;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
var load = function load(event) {
|
|
109
|
-
setLoadedState(true);
|
|
110
|
-
props.onLoad && props.onLoad(event);
|
|
111
|
-
};
|
|
112
|
-
React.useImperativeHandle(ref, function () {
|
|
113
|
-
return {
|
|
114
|
-
props: props,
|
|
115
|
-
getElement: function getElement() {
|
|
116
|
-
return elementRef.current;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
});
|
|
120
|
-
useMountEffect(function () {
|
|
121
|
-
if (!loadedState) {
|
|
122
|
-
shouldLoad() ? load() : bindScrollListener();
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
var rootProps = mergeProps({
|
|
126
|
-
ref: elementRef
|
|
127
|
-
}, DeferredContentBase.getOtherProps(props), ptm('root'));
|
|
128
|
-
return /*#__PURE__*/React.createElement("div", rootProps, loadedState && props.children);
|
|
129
|
-
});
|
|
130
|
-
DeferredContent.displayName = 'DeferredContent';
|
|
131
|
-
|
|
132
|
-
export { DeferredContent };
|