@rio-cloud/uikit-mcp 1.0.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -39
- package/dist/doc-metadata.json +1872 -0
- package/dist/docs/components/accentBar.md +582 -0
- package/dist/docs/components/activity.md +330 -0
- package/dist/docs/components/animatedNumber.md +88 -0
- package/dist/docs/components/animatedTextReveal.md +381 -0
- package/dist/docs/components/animations.md +459 -0
- package/dist/docs/components/appHeader.md +737 -0
- package/dist/docs/components/appLayout.md +2033 -0
- package/dist/docs/components/appNavigationBar.md +274 -0
- package/dist/docs/components/areaCharts.md +828 -0
- package/dist/docs/components/aspectRatioPlaceholder.md +106 -0
- package/dist/docs/components/assetTree.md +3132 -0
- package/dist/docs/components/autosuggests.md +1177 -0
- package/dist/docs/components/avatar.md +206 -0
- package/dist/docs/components/banner.md +668 -0
- package/dist/docs/components/barCharts.md +2765 -0
- package/dist/docs/components/barList.md +517 -0
- package/dist/docs/components/basicMap.md +167 -0
- package/dist/docs/components/bottomSheet.md +721 -0
- package/dist/docs/components/button.md +775 -0
- package/dist/docs/components/buttonToolbar.md +134 -0
- package/dist/docs/components/calendarStripe.md +533 -0
- package/dist/docs/components/card.md +86 -0
- package/dist/docs/components/carousel.md +128 -0
- package/dist/docs/components/chartColors.md +716 -0
- package/dist/docs/components/chartsGettingStarted.md +28 -0
- package/dist/docs/components/chat.md +935 -0
- package/dist/docs/components/checkbox.md +996 -0
- package/dist/docs/components/clearableInput.md +806 -0
- package/dist/docs/components/collapse.md +189 -0
- package/dist/docs/components/composedCharts.md +424 -0
- package/dist/docs/components/contentLoader.md +674 -0
- package/dist/docs/components/dataTabs.md +1251 -0
- package/dist/docs/components/datepickers.md +2543 -0
- package/dist/docs/components/dialogs.md +2244 -0
- package/dist/docs/components/divider.md +219 -0
- package/dist/docs/components/dropdowns.md +17538 -0
- package/dist/docs/components/editableContent.md +1127 -0
- package/dist/docs/components/expander.md +970 -0
- package/dist/docs/components/fade.md +836 -0
- package/dist/docs/components/fadeExpander.md +180 -0
- package/dist/docs/components/fadeUp.md +396 -0
- package/dist/docs/components/feedback.md +758 -0
- package/dist/docs/components/filePickers.md +370 -0
- package/dist/docs/components/formLabel.md +251 -0
- package/dist/docs/components/fullscreenMap.md +10 -0
- package/dist/docs/components/groupedItemList.md +1001 -0
- package/dist/docs/components/iconList.md +306 -0
- package/dist/docs/components/imagePreloader.md +167 -0
- package/dist/docs/components/labeledElement.md +115 -0
- package/dist/docs/components/licensePlate.md +412 -0
- package/dist/docs/components/lineCharts.md +2014 -0
- package/dist/docs/components/listMenu.md +392 -0
- package/dist/docs/components/loadMore.md +219 -0
- package/dist/docs/components/mainNavigation.md +129 -0
- package/dist/docs/components/mapCircle.md +93 -0
- package/dist/docs/components/mapCluster.md +337 -0
- package/dist/docs/components/mapContext.md +284 -0
- package/dist/docs/components/mapDraggableMarker.md +150 -0
- package/dist/docs/components/mapGettingStarted.md +39 -0
- package/dist/docs/components/mapInfoBubble.md +135 -0
- package/dist/docs/components/mapLayerGroup.md +94 -0
- package/dist/docs/components/mapMarker.md +1814 -0
- package/dist/docs/components/mapPolygon.md +959 -0
- package/dist/docs/components/mapRoute.md +3816 -0
- package/dist/docs/components/mapRouteGenerator.md +6 -0
- package/dist/docs/components/mapSettings.md +1040 -0
- package/dist/docs/components/mapUtils.md +132 -0
- package/dist/docs/components/multiselects.md +1921 -0
- package/dist/docs/components/noData.md +210 -0
- package/dist/docs/components/notifications.md +314 -0
- package/dist/docs/components/numbercontrol.md +706 -0
- package/dist/docs/components/onboarding.md +297 -0
- package/dist/docs/components/page.md +241 -0
- package/dist/docs/components/pager.md +133 -0
- package/dist/docs/components/pieCharts.md +1284 -0
- package/dist/docs/components/popover.md +222 -0
- package/dist/docs/components/position.md +50 -0
- package/dist/docs/components/radialBarCharts.md +3663 -0
- package/dist/docs/components/radiobutton.md +1271 -0
- package/dist/docs/components/releaseNotes.md +135 -0
- package/dist/docs/components/resizer.md +162 -0
- package/dist/docs/components/responsiveColumnStripe.md +435 -0
- package/dist/docs/components/responsiveVideo.md +71 -0
- package/dist/docs/components/rioglyph.md +331 -0
- package/dist/docs/components/rules.md +965 -0
- package/dist/docs/components/saveableInput.md +1721 -0
- package/dist/docs/components/selects.md +1993 -0
- package/dist/docs/components/sidebar.md +332 -0
- package/dist/docs/components/sliders.md +376 -0
- package/dist/docs/components/smoothScrollbars.md +1180 -0
- package/dist/docs/components/spinners.md +506 -0
- package/dist/docs/components/states.md +1176 -0
- package/dist/docs/components/statsWidgets.md +636 -0
- package/dist/docs/components/statusBar.md +644 -0
- package/dist/docs/components/stepButton.md +61 -0
- package/dist/docs/components/steppedProgressBars.md +1064 -0
- package/dist/docs/components/subNavigation.md +470 -0
- package/dist/docs/components/supportMarker.md +115 -0
- package/dist/docs/components/svgImage.md +248 -0
- package/dist/docs/components/switch.md +554 -0
- package/dist/docs/components/tables.md +8 -0
- package/dist/docs/components/tagManager.md +476 -0
- package/dist/docs/components/tags.md +785 -0
- package/dist/docs/components/teaser.md +925 -0
- package/dist/docs/components/timeline.md +514 -0
- package/dist/docs/components/timepicker.md +262 -0
- package/dist/docs/components/toggleButton.md +178 -0
- package/dist/docs/components/tooltip.md +454 -0
- package/dist/docs/components/virtualList.md +486 -0
- package/dist/docs/foundations.md +20901 -0
- package/dist/docs/start/changelog.md +714 -0
- package/dist/docs/start/goodtoknow.md +14 -0
- package/dist/docs/start/guidelines/color-combinations.md +678 -0
- package/dist/docs/start/guidelines/custom-css.md +42 -0
- package/dist/docs/start/guidelines/custom-rioglyph.md +35 -0
- package/dist/docs/start/guidelines/formatting.md +587 -0
- package/dist/docs/start/guidelines/iframe.md +323 -0
- package/dist/docs/start/guidelines/obfuscate-data.md +30 -0
- package/dist/docs/start/guidelines/print-css.md +36 -0
- package/dist/docs/start/guidelines/spinner.md +710 -0
- package/dist/docs/start/guidelines/supported-browsers.md +10 -0
- package/dist/docs/start/guidelines/writing.md +635 -0
- package/dist/docs/start/howto.md +187 -0
- package/dist/docs/start/intro.md +43 -0
- package/dist/docs/start/responsiveness.md +98 -0
- package/dist/docs/templates/common-table.md +1111 -0
- package/dist/docs/templates/detail-views.md +942 -0
- package/dist/docs/templates/expandable-details.md +228 -0
- package/dist/docs/templates/feature-cards.md +549 -0
- package/dist/docs/templates/form-summary.md +199 -0
- package/dist/docs/templates/form-toggle.md +367 -0
- package/dist/docs/templates/list-blocks.md +1021 -0
- package/dist/docs/templates/loading-progress.md +109 -0
- package/dist/docs/templates/options-panel.md +152 -0
- package/dist/docs/templates/panel-variants.md +164 -0
- package/dist/docs/templates/progress-cards.md +607 -0
- package/dist/docs/templates/progress-success.md +142 -0
- package/dist/docs/templates/settings-form.md +434 -0
- package/dist/docs/templates/stats-blocks.md +1381 -0
- package/dist/docs/templates/table-panel.md +184 -0
- package/dist/docs/templates/table-row-animation.md +317 -0
- package/dist/docs/templates/usage-cards.md +227 -0
- package/dist/docs/utilities/deviceUtils.md +123 -0
- package/dist/docs/utilities/featureToggles.md +90 -0
- package/dist/docs/utilities/fuelTypeUtils.md +186 -0
- package/dist/docs/utilities/routeUtils.md +138 -0
- package/dist/docs/utilities/useAfterMount.md +66 -0
- package/dist/docs/utilities/useAutoAnimate.md +193 -0
- package/dist/docs/utilities/useAverage.md +95 -0
- package/dist/docs/utilities/useClickOutside.md +61 -0
- package/dist/docs/utilities/useClipboard.md +93 -0
- package/dist/docs/utilities/useCount.md +178 -0
- package/dist/docs/utilities/useDarkMode.md +49 -0
- package/dist/docs/utilities/useDebugInfo.md +126 -0
- package/dist/docs/utilities/useEffectOnce.md +58 -0
- package/dist/docs/utilities/useElapsedTime.md +58 -0
- package/dist/docs/utilities/useElementSize.md +71 -0
- package/dist/docs/utilities/useEsc.md +58 -0
- package/dist/docs/utilities/useEvent.md +64 -0
- package/dist/docs/utilities/useFocusTrap.md +85 -0
- package/dist/docs/utilities/useFullscreen.md +198 -0
- package/dist/docs/utilities/useHover.md +55 -0
- package/dist/docs/utilities/useIncomingPostMessages.md +237 -0
- package/dist/docs/utilities/useInterval.md +85 -0
- package/dist/docs/utilities/useIsFocusWithin.md +114 -0
- package/dist/docs/utilities/useKey.md +151 -0
- package/dist/docs/utilities/useLocalStorage.md +91 -0
- package/dist/docs/utilities/useLocationSuggestions.md +114 -0
- package/dist/docs/utilities/useMax.md +62 -0
- package/dist/docs/utilities/useMin.md +78 -0
- package/dist/docs/utilities/useMutationObserver.md +113 -0
- package/dist/docs/utilities/useOnScreen.md +138 -0
- package/dist/docs/utilities/useOnlineStatus.md +49 -0
- package/dist/docs/utilities/usePostMessage.md +117 -0
- package/dist/docs/utilities/usePostMessageSender.md +257 -0
- package/dist/docs/utilities/usePrevious.md +101 -0
- package/dist/docs/utilities/useResizeObserver.md +151 -0
- package/dist/docs/utilities/useScrollPosition.md +252 -0
- package/dist/docs/utilities/useSearch.md +228 -0
- package/dist/docs/utilities/useSorting.md +389 -0
- package/dist/docs/utilities/useStateWithValidation.md +83 -0
- package/dist/docs/utilities/useSum.md +155 -0
- package/dist/docs/utilities/useTableExport.md +404 -0
- package/dist/docs/utilities/useTableSelection.md +1120 -0
- package/dist/docs/utilities/useTimeout.md +55 -0
- package/dist/docs/utilities/useToggle.md +115 -0
- package/dist/docs/utilities/useWindowResize.md +70 -0
- package/dist/index.mjs +271 -0
- package/dist/search-synonyms.json +134 -0
- package/dist/version.json +4 -0
- package/package.json +23 -19
- package/bin/uikit-mcp.mjs +0 -23
- package/data/pages/Components/components/accentbar.json +0 -207
- package/data/pages/Components/components/activity.json +0 -87
- package/data/pages/Components/components/animatednumber.json +0 -99
- package/data/pages/Components/components/animations.json +0 -87
- package/data/pages/Components/components/appheader.json +0 -291
- package/data/pages/Components/components/applayout.json +0 -1198
- package/data/pages/Components/components/appnavigationbar.json +0 -327
- package/data/pages/Components/components/areacharts.json +0 -563
- package/data/pages/Components/components/aspectratioplaceholder.json +0 -75
- package/data/pages/Components/components/assettree.json +0 -3080
- package/data/pages/Components/components/autosuggests.json +0 -710
- package/data/pages/Components/components/avatar.json +0 -157
- package/data/pages/Components/components/banner.json +0 -599
- package/data/pages/Components/components/barcharts.json +0 -1507
- package/data/pages/Components/components/barlist.json +0 -223
- package/data/pages/Components/components/basicmap.json +0 -68
- package/data/pages/Components/components/bottomsheet.json +0 -601
- package/data/pages/Components/components/button.json +0 -583
- package/data/pages/Components/components/buttontoolbar.json +0 -63
- package/data/pages/Components/components/calendarstripe.json +0 -235
- package/data/pages/Components/components/card.json +0 -69
- package/data/pages/Components/components/carousel.json +0 -39
- package/data/pages/Components/components/chartcolors.json +0 -34
- package/data/pages/Components/components/chartsgettingstarted.json +0 -32
- package/data/pages/Components/components/chat.json +0 -39
- package/data/pages/Components/components/checkbox.json +0 -847
- package/data/pages/Components/components/clearableinput.json +0 -789
- package/data/pages/Components/components/collapse.json +0 -175
- package/data/pages/Components/components/composedcharts.json +0 -159
- package/data/pages/Components/components/contentloader.json +0 -233
- package/data/pages/Components/components/datatabs.json +0 -680
- package/data/pages/Components/components/datepickers.json +0 -287
- package/data/pages/Components/components/dialogs.json +0 -1492
- package/data/pages/Components/components/divider.json +0 -93
- package/data/pages/Components/components/dropdowns.json +0 -936
- package/data/pages/Components/components/editablecontent.json +0 -1117
- package/data/pages/Components/components/expander.json +0 -377
- package/data/pages/Components/components/fade.json +0 -403
- package/data/pages/Components/components/fadeexpander.json +0 -75
- package/data/pages/Components/components/fadeup.json +0 -127
- package/data/pages/Components/components/feedback.json +0 -269
- package/data/pages/Components/components/filepickers.json +0 -269
- package/data/pages/Components/components/formlabel.json +0 -115
- package/data/pages/Components/components/fullscreenmap.json +0 -22
- package/data/pages/Components/components/groupeditemlist.json +0 -323
- package/data/pages/Components/components/iconlist.json +0 -45
- package/data/pages/Components/components/imagepreloader.json +0 -81
- package/data/pages/Components/components/labeledelement.json +0 -75
- package/data/pages/Components/components/licenseplate.json +0 -69
- package/data/pages/Components/components/linecharts.json +0 -987
- package/data/pages/Components/components/listmenu.json +0 -313
- package/data/pages/Components/components/loadmore.json +0 -175
- package/data/pages/Components/components/mainnavigation.json +0 -39
- package/data/pages/Components/components/mapcircle.json +0 -34
- package/data/pages/Components/components/mapcluster.json +0 -51
- package/data/pages/Components/components/mapcontext.json +0 -105
- package/data/pages/Components/components/mapdraggablemarker.json +0 -34
- package/data/pages/Components/components/mapgettingstarted.json +0 -27
- package/data/pages/Components/components/mapgroup.json +0 -1198
- package/data/pages/Components/components/mapinfobubble.json +0 -34
- package/data/pages/Components/components/maplayergroup.json +0 -34
- package/data/pages/Components/components/mapmarker.json +0 -700
- package/data/pages/Components/components/mappolygon.json +0 -45
- package/data/pages/Components/components/maproute.json +0 -623
- package/data/pages/Components/components/maproutegenerator.json +0 -16
- package/data/pages/Components/components/mapsettings.json +0 -51
- package/data/pages/Components/components/maputils.json +0 -34
- package/data/pages/Components/components/multiselects.json +0 -1451
- package/data/pages/Components/components/nodata.json +0 -139
- package/data/pages/Components/components/notifications.json +0 -65
- package/data/pages/Components/components/numbercontrol.json +0 -301
- package/data/pages/Components/components/onboarding.json +0 -302
- package/data/pages/Components/components/page.json +0 -197
- package/data/pages/Components/components/pager.json +0 -93
- package/data/pages/Components/components/piecharts.json +0 -731
- package/data/pages/Components/components/popover.json +0 -251
- package/data/pages/Components/components/position.json +0 -69
- package/data/pages/Components/components/radialbarcharts.json +0 -1304
- package/data/pages/Components/components/radiobutton.json +0 -1105
- package/data/pages/Components/components/releasenotes.json +0 -44
- package/data/pages/Components/components/resizer.json +0 -93
- package/data/pages/Components/components/responsivecolumnstripe.json +0 -123
- package/data/pages/Components/components/responsivevideo.json +0 -75
- package/data/pages/Components/components/rioglyph.json +0 -93
- package/data/pages/Components/components/rules.json +0 -410
- package/data/pages/Components/components/saveableinput.json +0 -703
- package/data/pages/Components/components/selects.json +0 -701
- package/data/pages/Components/components/sidebar.json +0 -243
- package/data/pages/Components/components/sliders.json +0 -235
- package/data/pages/Components/components/smoothscrollbars.json +0 -335
- package/data/pages/Components/components/spinners.json +0 -343
- package/data/pages/Components/components/states.json +0 -1705
- package/data/pages/Components/components/statswidgets.json +0 -314
- package/data/pages/Components/components/statusbar.json +0 -177
- package/data/pages/Components/components/stepbutton.json +0 -57
- package/data/pages/Components/components/steppedprogressbars.json +0 -417
- package/data/pages/Components/components/subnavigation.json +0 -107
- package/data/pages/Components/components/supportmarker.json +0 -45
- package/data/pages/Components/components/svgimage.json +0 -81
- package/data/pages/Components/components/switch.json +0 -111
- package/data/pages/Components/components/tables.json +0 -144
- package/data/pages/Components/components/tagmanager.json +0 -86
- package/data/pages/Components/components/tags.json +0 -146
- package/data/pages/Components/components/teaser.json +0 -188
- package/data/pages/Components/components/timeline.json +0 -45
- package/data/pages/Components/components/timepicker.json +0 -163
- package/data/pages/Components/components/togglebutton.json +0 -247
- package/data/pages/Components/components/tooltip.json +0 -270
- package/data/pages/Components/components/virtuallist.json +0 -175
- package/data/pages/Foundations/foundations.json +0 -2475
- package/data/pages/Getting-started/start/changelog.json +0 -22
- package/data/pages/Getting-started/start/goodtoknow.json +0 -32
- package/data/pages/Getting-started/start/guidelines/color-combinations.json +0 -58
- package/data/pages/Getting-started/start/guidelines/custom-css.json +0 -27
- package/data/pages/Getting-started/start/guidelines/custom-rioglyph.json +0 -22
- package/data/pages/Getting-started/start/guidelines/formatting.json +0 -97
- package/data/pages/Getting-started/start/guidelines/iframe.json +0 -93
- package/data/pages/Getting-started/start/guidelines/obfuscate-data.json +0 -22
- package/data/pages/Getting-started/start/guidelines/print-css.json +0 -37
- package/data/pages/Getting-started/start/guidelines/spinner.json +0 -144
- package/data/pages/Getting-started/start/guidelines/supported-browsers.json +0 -22
- package/data/pages/Getting-started/start/guidelines/writing.json +0 -242
- package/data/pages/Getting-started/start/howto.json +0 -72
- package/data/pages/Getting-started/start/intro.json +0 -37
- package/data/pages/Getting-started/start/responsiveness.json +0 -52
- package/data/pages/Templates/templates/common-table.json +0 -39
- package/data/pages/Templates/templates/detail-views.json +0 -71
- package/data/pages/Templates/templates/expandable-details.json +0 -39
- package/data/pages/Templates/templates/feature-cards.json +0 -103
- package/data/pages/Templates/templates/form-summary.json +0 -39
- package/data/pages/Templates/templates/form-toggle.json +0 -39
- package/data/pages/Templates/templates/list-blocks.json +0 -119
- package/data/pages/Templates/templates/loading-progress.json +0 -39
- package/data/pages/Templates/templates/options-panel.json +0 -39
- package/data/pages/Templates/templates/panel-variants.json +0 -39
- package/data/pages/Templates/templates/progress-cards.json +0 -71
- package/data/pages/Templates/templates/progress-success.json +0 -39
- package/data/pages/Templates/templates/settings-form.json +0 -39
- package/data/pages/Templates/templates/stats-blocks.json +0 -135
- package/data/pages/Templates/templates/table-panel.json +0 -39
- package/data/pages/Templates/templates/table-row-animation.json +0 -39
- package/data/pages/Templates/templates/usage-cards.json +0 -39
- package/data/pages/Utilities/utilities/deviceutils.json +0 -39
- package/data/pages/Utilities/utilities/featuretoggles.json +0 -42
- package/data/pages/Utilities/utilities/fueltypeutils.json +0 -118
- package/data/pages/Utilities/utilities/routeutils.json +0 -34
- package/data/pages/Utilities/utilities/useaftermount.json +0 -63
- package/data/pages/Utilities/utilities/useaverage.json +0 -86
- package/data/pages/Utilities/utilities/useclickoutside.json +0 -69
- package/data/pages/Utilities/utilities/useclipboard.json +0 -57
- package/data/pages/Utilities/utilities/usecount.json +0 -92
- package/data/pages/Utilities/utilities/usedarkmode.json +0 -50
- package/data/pages/Utilities/utilities/usedebuginfo.json +0 -63
- package/data/pages/Utilities/utilities/useeffectonce.json +0 -57
- package/data/pages/Utilities/utilities/useelapsedtime.json +0 -57
- package/data/pages/Utilities/utilities/useelementsize.json +0 -63
- package/data/pages/Utilities/utilities/useesc.json +0 -57
- package/data/pages/Utilities/utilities/useevent.json +0 -75
- package/data/pages/Utilities/utilities/usefocustrap.json +0 -57
- package/data/pages/Utilities/utilities/usefullscreen.json +0 -197
- package/data/pages/Utilities/utilities/usehover.json +0 -57
- package/data/pages/Utilities/utilities/useinterval.json +0 -63
- package/data/pages/Utilities/utilities/useisfocuswithin.json +0 -75
- package/data/pages/Utilities/utilities/usekey.json +0 -75
- package/data/pages/Utilities/utilities/uselocalstorage.json +0 -69
- package/data/pages/Utilities/utilities/uselocationsuggestions.json +0 -110
- package/data/pages/Utilities/utilities/usemax.json +0 -86
- package/data/pages/Utilities/utilities/usemin.json +0 -86
- package/data/pages/Utilities/utilities/usemutationobserver.json +0 -69
- package/data/pages/Utilities/utilities/useonlinestatus.json +0 -39
- package/data/pages/Utilities/utilities/useonscreen.json +0 -63
- package/data/pages/Utilities/utilities/usepostmessage.json +0 -80
- package/data/pages/Utilities/utilities/useprevious.json +0 -63
- package/data/pages/Utilities/utilities/useresizeobserver.json +0 -65
- package/data/pages/Utilities/utilities/usescrollposition.json +0 -103
- package/data/pages/Utilities/utilities/usesearch.json +0 -197
- package/data/pages/Utilities/utilities/usesorting.json +0 -139
- package/data/pages/Utilities/utilities/usestatewithvalidation.json +0 -69
- package/data/pages/Utilities/utilities/usesum.json +0 -86
- package/data/pages/Utilities/utilities/usetableexport.json +0 -87
- package/data/pages/Utilities/utilities/usetableselection.json +0 -311
- package/data/pages/Utilities/utilities/usetimeout.json +0 -63
- package/data/pages/Utilities/utilities/usetoggle.json +0 -75
- package/data/pages/Utilities/utilities/usewindowresize.json +0 -63
- package/data/version.json +0 -4
- package/docs/content-schema.md +0 -147
- package/docs/navigation-inventory.json +0 -1310
- package/docs/search-synonyms.json +0 -43
- package/server/index.mjs +0 -268
- package/server/lib/load-docs.mjs +0 -48
- package/server/lib/normalise-doc.mjs +0 -220
- package/server/lib/render-markdown.mjs +0 -82
- package/server/lib/search-index.mjs +0 -49
- package/server/lib/types.js +0 -99
|
@@ -0,0 +1,1001 @@
|
|
|
1
|
+
# GroupedItemList
|
|
2
|
+
|
|
3
|
+
*Category:* Components
|
|
4
|
+
*Section:* Content
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#components/groupedItemList
|
|
6
|
+
*Captured:* 2025-12-12T14:20:44.081Z
|
|
7
|
+
|
|
8
|
+
## GroupedItemList
|
|
9
|
+
|
|
10
|
+
### Example: Grouped by name (default)
|
|
11
|
+
|
|
12
|
+
Grouped by name (default)
|
|
13
|
+
A
|
|
14
|
+
|
|
15
|
+
Aaron
|
|
16
|
+
bar2
|
|
17
|
+
|
|
18
|
+
Alice
|
|
19
|
+
bar1
|
|
20
|
+
|
|
21
|
+
Amelia
|
|
22
|
+
bar3
|
|
23
|
+
|
|
24
|
+
B
|
|
25
|
+
|
|
26
|
+
Barbara
|
|
27
|
+
bar5
|
|
28
|
+
|
|
29
|
+
Bob
|
|
30
|
+
bar4
|
|
31
|
+
|
|
32
|
+
C
|
|
33
|
+
|
|
34
|
+
Carl
|
|
35
|
+
bar7
|
|
36
|
+
|
|
37
|
+
Catherine
|
|
38
|
+
bar8
|
|
39
|
+
|
|
40
|
+
Charlie
|
|
41
|
+
bar6
|
|
42
|
+
|
|
43
|
+
D
|
|
44
|
+
|
|
45
|
+
Daniel
|
|
46
|
+
bar10
|
|
47
|
+
|
|
48
|
+
David
|
|
49
|
+
bar9
|
|
50
|
+
|
|
51
|
+
Diana
|
|
52
|
+
bar11
|
|
53
|
+
|
|
54
|
+
E
|
|
55
|
+
|
|
56
|
+
Edward
|
|
57
|
+
bar12
|
|
58
|
+
|
|
59
|
+
Eleanor
|
|
60
|
+
bar14
|
|
61
|
+
|
|
62
|
+
Eve
|
|
63
|
+
bar13
|
|
64
|
+
|
|
65
|
+
F
|
|
66
|
+
|
|
67
|
+
Fred
|
|
68
|
+
bar15
|
|
69
|
+
|
|
70
|
+
#### Summary
|
|
71
|
+
|
|
72
|
+
Grouped by name (default)
|
|
73
|
+
A
|
|
74
|
+
|
|
75
|
+
Aaron
|
|
76
|
+
bar2
|
|
77
|
+
|
|
78
|
+
Alice
|
|
79
|
+
bar1
|
|
80
|
+
|
|
81
|
+
Amelia
|
|
82
|
+
bar3
|
|
83
|
+
|
|
84
|
+
B
|
|
85
|
+
|
|
86
|
+
Barbara
|
|
87
|
+
bar5
|
|
88
|
+
|
|
89
|
+
Bob
|
|
90
|
+
bar4
|
|
91
|
+
|
|
92
|
+
C
|
|
93
|
+
|
|
94
|
+
Carl
|
|
95
|
+
bar7
|
|
96
|
+
|
|
97
|
+
Catherine
|
|
98
|
+
bar8
|
|
99
|
+
|
|
100
|
+
Charlie
|
|
101
|
+
bar6
|
|
102
|
+
|
|
103
|
+
D
|
|
104
|
+
|
|
105
|
+
Daniel
|
|
106
|
+
bar10
|
|
107
|
+
|
|
108
|
+
David
|
|
109
|
+
bar9
|
|
110
|
+
|
|
111
|
+
Diana
|
|
112
|
+
bar11
|
|
113
|
+
|
|
114
|
+
E
|
|
115
|
+
|
|
116
|
+
Edward
|
|
117
|
+
bar12
|
|
118
|
+
|
|
119
|
+
Eleanor
|
|
120
|
+
bar14
|
|
121
|
+
|
|
122
|
+
Eve
|
|
123
|
+
bar13
|
|
124
|
+
|
|
125
|
+
F
|
|
126
|
+
|
|
127
|
+
Fred
|
|
128
|
+
bar15
|
|
129
|
+
|
|
130
|
+
#### React (tsx)
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
import GroupedItemList from '@rio-cloud/rio-uikit/GroupedItemList';
|
|
134
|
+
|
|
135
|
+
type CustomItem = {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
foo: string;
|
|
139
|
+
creationDate: string;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const items: CustomItem[] = [
|
|
143
|
+
{ id: '1', name: 'Alice', foo: 'bar1', creationDate: '2024-09-01' },
|
|
144
|
+
{ id: '2', name: 'Aaron', foo: 'bar2', creationDate: '2024-09-01' },
|
|
145
|
+
{ id: '3', name: 'Amelia', foo: 'bar3', creationDate: '2024-09-01' },
|
|
146
|
+
{ id: '4', name: 'Bob', foo: 'bar4', creationDate: '2024-09-02' },
|
|
147
|
+
{ id: '5', name: 'Barbara', foo: 'bar5', creationDate: '2024-09-02' },
|
|
148
|
+
{ id: '6', name: 'Charlie', foo: 'bar6', creationDate: '2024-09-03' },
|
|
149
|
+
{ id: '7', name: 'Carl', foo: 'bar7', creationDate: '2024-09-03' },
|
|
150
|
+
{ id: '8', name: 'Catherine', foo: 'bar8', creationDate: '2024-09-03' },
|
|
151
|
+
{ id: '9', name: 'David', foo: 'bar9', creationDate: '2024-09-04' },
|
|
152
|
+
{ id: '10', name: 'Daniel', foo: 'bar10', creationDate: '2024-09-04' },
|
|
153
|
+
{ id: '11', name: 'Diana', foo: 'bar11', creationDate: '2024-09-05' },
|
|
154
|
+
{ id: '12', name: 'Edward', foo: 'bar12', creationDate: '2024-09-05' },
|
|
155
|
+
{ id: '13', name: 'Eve', foo: 'bar13', creationDate: '2024-09-06' },
|
|
156
|
+
{ id: '14', name: 'Eleanor', foo: 'bar14', creationDate: '2024-09-06' },
|
|
157
|
+
{ id: '15', name: 'Fred', foo: 'bar15', creationDate: '2024-09-07' },
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
export default () => {
|
|
161
|
+
// Custom render function for group dividers
|
|
162
|
+
const renderCustomDivider = (groupKey: string) => (
|
|
163
|
+
<div className='text-color-dark text-medium margin-bottom-10 margin-top-25 text-size-16'>{groupKey}</div>
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
// Custom render function for list items (rendered as <li> when using <ul>)
|
|
167
|
+
const renderCustomItem = (item: CustomItem) => (
|
|
168
|
+
<li
|
|
169
|
+
key={item.id}
|
|
170
|
+
className={`list-group-item display-flex gap-15 padding-y-15 ${item.id === '6' ? 'list-group-item-warning' : ''}`}
|
|
171
|
+
>
|
|
172
|
+
<div className='rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40'>
|
|
173
|
+
<span className='rioglyph rioglyph-user text-size-20 text-color-darker' />
|
|
174
|
+
</div>
|
|
175
|
+
<div>
|
|
176
|
+
<div className='text-bold'>{item.name}</div>
|
|
177
|
+
<div>{item.foo}</div>
|
|
178
|
+
</div>
|
|
179
|
+
</li>
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
return (
|
|
183
|
+
<div>
|
|
184
|
+
<h4>Grouped by name (default)</h4>
|
|
185
|
+
<GroupedItemList
|
|
186
|
+
items={items}
|
|
187
|
+
renderDivider={renderCustomDivider}
|
|
188
|
+
renderItem={renderCustomItem}
|
|
189
|
+
listElement='ul' // Render the list as unordered list
|
|
190
|
+
listElementClassName='list-group border rounded shadow-default'
|
|
191
|
+
/>
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
194
|
+
};
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### HTML (html)
|
|
198
|
+
|
|
199
|
+
```html
|
|
200
|
+
<div>
|
|
201
|
+
<h4>Grouped by name (default)</h4>
|
|
202
|
+
<div class="grouped-item-list ">
|
|
203
|
+
<div class="group-divider ">
|
|
204
|
+
<div class="text-color-dark text-medium margin-bottom-10 margin-top-25 text-size-16">A</div>
|
|
205
|
+
</div>
|
|
206
|
+
<ul class="list-group border rounded shadow-default">
|
|
207
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
208
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
209
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
210
|
+
</span>
|
|
211
|
+
</div>
|
|
212
|
+
<div>
|
|
213
|
+
<div class="text-bold">Aaron</div>
|
|
214
|
+
<div>bar2</div>
|
|
215
|
+
</div>
|
|
216
|
+
</li>
|
|
217
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
218
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
219
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
220
|
+
</span>
|
|
221
|
+
</div>
|
|
222
|
+
<div>
|
|
223
|
+
<div class="text-bold">Alice</div>
|
|
224
|
+
<div>bar1</div>
|
|
225
|
+
</div>
|
|
226
|
+
</li>
|
|
227
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
228
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
229
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
230
|
+
</span>
|
|
231
|
+
</div>
|
|
232
|
+
<div>
|
|
233
|
+
<div class="text-bold">Amelia</div>
|
|
234
|
+
<div>bar3</div>
|
|
235
|
+
</div>
|
|
236
|
+
</li>
|
|
237
|
+
</ul>
|
|
238
|
+
<div class="group-divider ">
|
|
239
|
+
<div class="text-color-dark text-medium margin-bottom-10 margin-top-25 text-size-16">B</div>
|
|
240
|
+
</div>
|
|
241
|
+
<ul class="list-group border rounded shadow-default">
|
|
242
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
243
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
244
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
245
|
+
</span>
|
|
246
|
+
</div>
|
|
247
|
+
<div>
|
|
248
|
+
<div class="text-bold">Barbara</div>
|
|
249
|
+
<div>bar5</div>
|
|
250
|
+
</div>
|
|
251
|
+
</li>
|
|
252
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
253
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
254
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
255
|
+
</span>
|
|
256
|
+
</div>
|
|
257
|
+
<div>
|
|
258
|
+
<div class="text-bold">Bob</div>
|
|
259
|
+
<div>bar4</div>
|
|
260
|
+
</div>
|
|
261
|
+
</li>
|
|
262
|
+
</ul>
|
|
263
|
+
<div class="group-divider ">
|
|
264
|
+
<div class="text-color-dark text-medium margin-bottom-10 margin-top-25 text-size-16">C</div>
|
|
265
|
+
</div>
|
|
266
|
+
<ul class="list-group border rounded shadow-default">
|
|
267
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
268
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
269
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
270
|
+
</span>
|
|
271
|
+
</div>
|
|
272
|
+
<div>
|
|
273
|
+
<div class="text-bold">Carl</div>
|
|
274
|
+
<div>bar7</div>
|
|
275
|
+
</div>
|
|
276
|
+
</li>
|
|
277
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
278
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
279
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
280
|
+
</span>
|
|
281
|
+
</div>
|
|
282
|
+
<div>
|
|
283
|
+
<div class="text-bold">Catherine</div>
|
|
284
|
+
<div>bar8</div>
|
|
285
|
+
</div>
|
|
286
|
+
</li>
|
|
287
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 list-group-item-warning">
|
|
288
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
289
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
290
|
+
</span>
|
|
291
|
+
</div>
|
|
292
|
+
<div>
|
|
293
|
+
<div class="text-bold">Charlie</div>
|
|
294
|
+
<div>bar6</div>
|
|
295
|
+
</div>
|
|
296
|
+
</li>
|
|
297
|
+
</ul>
|
|
298
|
+
<div class="group-divider ">
|
|
299
|
+
<div class="text-color-dark text-medium margin-bottom-10 margin-top-25 text-size-16">D</div>
|
|
300
|
+
</div>
|
|
301
|
+
<ul class="list-group border rounded shadow-default">
|
|
302
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
303
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
304
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
305
|
+
</span>
|
|
306
|
+
</div>
|
|
307
|
+
<div>
|
|
308
|
+
<div class="text-bold">Daniel</div>
|
|
309
|
+
<div>bar10</div>
|
|
310
|
+
</div>
|
|
311
|
+
</li>
|
|
312
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
313
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
314
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
315
|
+
</span>
|
|
316
|
+
</div>
|
|
317
|
+
<div>
|
|
318
|
+
<div class="text-bold">David</div>
|
|
319
|
+
<div>bar9</div>
|
|
320
|
+
</div>
|
|
321
|
+
</li>
|
|
322
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
323
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
324
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
325
|
+
</span>
|
|
326
|
+
</div>
|
|
327
|
+
<div>
|
|
328
|
+
<div class="text-bold">Diana</div>
|
|
329
|
+
<div>bar11</div>
|
|
330
|
+
</div>
|
|
331
|
+
</li>
|
|
332
|
+
</ul>
|
|
333
|
+
<div class="group-divider ">
|
|
334
|
+
<div class="text-color-dark text-medium margin-bottom-10 margin-top-25 text-size-16">E</div>
|
|
335
|
+
</div>
|
|
336
|
+
<ul class="list-group border rounded shadow-default">
|
|
337
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
338
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
339
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
340
|
+
</span>
|
|
341
|
+
</div>
|
|
342
|
+
<div>
|
|
343
|
+
<div class="text-bold">Edward</div>
|
|
344
|
+
<div>bar12</div>
|
|
345
|
+
</div>
|
|
346
|
+
</li>
|
|
347
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
348
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
349
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
350
|
+
</span>
|
|
351
|
+
</div>
|
|
352
|
+
<div>
|
|
353
|
+
<div class="text-bold">Eleanor</div>
|
|
354
|
+
<div>bar14</div>
|
|
355
|
+
</div>
|
|
356
|
+
</li>
|
|
357
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
358
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
359
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
360
|
+
</span>
|
|
361
|
+
</div>
|
|
362
|
+
<div>
|
|
363
|
+
<div class="text-bold">Eve</div>
|
|
364
|
+
<div>bar13</div>
|
|
365
|
+
</div>
|
|
366
|
+
</li>
|
|
367
|
+
</ul>
|
|
368
|
+
<div class="group-divider ">
|
|
369
|
+
<div class="text-color-dark text-medium margin-bottom-10 margin-top-25 text-size-16">F</div>
|
|
370
|
+
</div>
|
|
371
|
+
<ul class="list-group border rounded shadow-default">
|
|
372
|
+
<li class="list-group-item display-flex gap-15 padding-y-15 ">
|
|
373
|
+
<div class="rounded-circle aspect-ratio-1 display-grid place-items-center border max-width-40 width-40">
|
|
374
|
+
<span class="rioglyph rioglyph-user text-size-20 text-color-darker">
|
|
375
|
+
</span>
|
|
376
|
+
</div>
|
|
377
|
+
<div>
|
|
378
|
+
<div class="text-bold">Fred</div>
|
|
379
|
+
<div>bar15</div>
|
|
380
|
+
</div>
|
|
381
|
+
</li>
|
|
382
|
+
</ul>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
#### Props
|
|
388
|
+
|
|
389
|
+
| Name | Type | Default | Description |
|
|
390
|
+
| --- | --- | --- | --- |
|
|
391
|
+
| items | Array | — | The list of items to be grouped and rendered. By default, the component assumes an item object containing an "id" and "name" property plus some other attributes. |
|
|
392
|
+
| groupBy | String / Function | — | The property of the items to group by, either as a string (e.g., "name") or a custom grouping function. If not provided, it defaults to grouping by "name". |
|
|
393
|
+
| groupSortOrder | String | asc | Defines the sort order for groups. Accepts "asc" for ascending or "desc" for descending order. |
|
|
394
|
+
| itemSortOrder | String | asc | Defines the sort order for items within each group. Accepts "asc" for ascending or "desc" for descending order. |
|
|
395
|
+
| groupSortFunction | Function | — | Optional sorting function for the groups. It takes an array of groups and returns them in the desired order. |
|
|
396
|
+
| itemSortFunction | Function | — | Optional sorting function for items within each group. It takes an array of items and returns them in the desired order. |
|
|
397
|
+
| renderDivider | Function | — | Custom render function for the group divider. Receives the group key as a parameter and should return a React node to render as the divider. |
|
|
398
|
+
| renderItem | Function | — | Custom render function for individual list items. Receives an item as a parameter and should return a React node representing the item. |
|
|
399
|
+
| listElement | "div" \| "ul" | div | Specifies the HTML element to use for the list inside each group. Defaults to "div", but "ul" can be used if rendering list items as `<li>` elements. |
|
|
400
|
+
| listElementClassName | String | — | Optional class name for the list element inside each group (applies to the `div` or `ul` wrapping the items). |
|
|
401
|
+
| dividerElementClassName | String | — | Optional class name for the divider element in each group (applies to the `div` wrapping each group divider). |
|
|
402
|
+
| className | String | — | Optional class name for the outer wrapper element (applies to the outer `div` wrapping the entire component). |
|
|
403
|
+
|
|
404
|
+
### Example: Grouped by date
|
|
405
|
+
|
|
406
|
+
Grouped by date
|
|
407
|
+
Switch group sort orderSwitch item sort order
|
|
408
|
+
2024-09-07
|
|
409
|
+
|
|
410
|
+
Parcel O
|
|
411
|
+
(Pending)
|
|
412
|
+
|
|
413
|
+
2024-09-06
|
|
414
|
+
|
|
415
|
+
Truck N
|
|
416
|
+
(Delivered)
|
|
417
|
+
|
|
418
|
+
Truck M
|
|
419
|
+
(In Transit)
|
|
420
|
+
|
|
421
|
+
2024-09-05
|
|
422
|
+
|
|
423
|
+
Freight L
|
|
424
|
+
(Pending)
|
|
425
|
+
|
|
426
|
+
Freight K
|
|
427
|
+
(Delivered)
|
|
428
|
+
|
|
429
|
+
2024-09-04
|
|
430
|
+
|
|
431
|
+
Pallet J
|
|
432
|
+
(In Transit)
|
|
433
|
+
|
|
434
|
+
Pallet I
|
|
435
|
+
(Pending)
|
|
436
|
+
|
|
437
|
+
2024-09-03
|
|
438
|
+
|
|
439
|
+
Container H
|
|
440
|
+
(Delivered)
|
|
441
|
+
|
|
442
|
+
Container G
|
|
443
|
+
(In Transit)
|
|
444
|
+
|
|
445
|
+
Container F
|
|
446
|
+
(Pending)
|
|
447
|
+
|
|
448
|
+
2024-09-02
|
|
449
|
+
|
|
450
|
+
Package E
|
|
451
|
+
(Delivered)
|
|
452
|
+
|
|
453
|
+
Package D
|
|
454
|
+
(In Transit)
|
|
455
|
+
|
|
456
|
+
2024-09-01
|
|
457
|
+
|
|
458
|
+
Shipment C
|
|
459
|
+
(Pending)
|
|
460
|
+
|
|
461
|
+
Shipment B
|
|
462
|
+
(Delivered)
|
|
463
|
+
|
|
464
|
+
Shipment A
|
|
465
|
+
(In Transit)
|
|
466
|
+
|
|
467
|
+
#### Summary
|
|
468
|
+
|
|
469
|
+
Grouped by date
|
|
470
|
+
Switch group sort orderSwitch item sort order
|
|
471
|
+
2024-09-07
|
|
472
|
+
|
|
473
|
+
Parcel O
|
|
474
|
+
(Pending)
|
|
475
|
+
|
|
476
|
+
2024-09-06
|
|
477
|
+
|
|
478
|
+
Truck N
|
|
479
|
+
(Delivered)
|
|
480
|
+
|
|
481
|
+
Truck M
|
|
482
|
+
(In Transit)
|
|
483
|
+
|
|
484
|
+
2024-09-05
|
|
485
|
+
|
|
486
|
+
Freight L
|
|
487
|
+
(Pending)
|
|
488
|
+
|
|
489
|
+
Freight K
|
|
490
|
+
(Delivered)
|
|
491
|
+
|
|
492
|
+
2024-09-04
|
|
493
|
+
|
|
494
|
+
Pallet J
|
|
495
|
+
(In Transit)
|
|
496
|
+
|
|
497
|
+
Pallet I
|
|
498
|
+
(Pending)
|
|
499
|
+
|
|
500
|
+
2024-09-03
|
|
501
|
+
|
|
502
|
+
Container H
|
|
503
|
+
(Delivered)
|
|
504
|
+
|
|
505
|
+
Container G
|
|
506
|
+
(In Transit)
|
|
507
|
+
|
|
508
|
+
Container F
|
|
509
|
+
(Pending)
|
|
510
|
+
|
|
511
|
+
2024-09-02
|
|
512
|
+
|
|
513
|
+
Package E
|
|
514
|
+
(Delivered)
|
|
515
|
+
|
|
516
|
+
Package D
|
|
517
|
+
(In Transit)
|
|
518
|
+
|
|
519
|
+
2024-09-01
|
|
520
|
+
|
|
521
|
+
Shipment C
|
|
522
|
+
(Pending)
|
|
523
|
+
|
|
524
|
+
Shipment B
|
|
525
|
+
(Delivered)
|
|
526
|
+
|
|
527
|
+
Shipment A
|
|
528
|
+
(In Transit)
|
|
529
|
+
|
|
530
|
+
#### React (tsx)
|
|
531
|
+
|
|
532
|
+
```tsx
|
|
533
|
+
import { useState } from 'react';
|
|
534
|
+
|
|
535
|
+
import GroupedItemList, { type Group } from '@rio-cloud/rio-uikit/GroupedItemList';
|
|
536
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
537
|
+
import { naturalSortByProperty, sortByProperty } from '@rio-cloud/rio-uikit/SortUtils';
|
|
538
|
+
|
|
539
|
+
type LogisticItem = {
|
|
540
|
+
id: string;
|
|
541
|
+
name: string;
|
|
542
|
+
status: string;
|
|
543
|
+
deliveryDate: string;
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
const logisticItems: LogisticItem[] = [
|
|
547
|
+
{ id: '1', name: 'Shipment A', status: 'In Transit', deliveryDate: '2024-09-01' },
|
|
548
|
+
{ id: '2', name: 'Shipment B', status: 'Delivered', deliveryDate: '2024-09-01' },
|
|
549
|
+
{ id: '3', name: 'Shipment C', status: 'Pending', deliveryDate: '2024-09-01' },
|
|
550
|
+
{ id: '4', name: 'Package D', status: 'In Transit', deliveryDate: '2024-09-02' },
|
|
551
|
+
{ id: '5', name: 'Package E', status: 'Delivered', deliveryDate: '2024-09-02' },
|
|
552
|
+
{ id: '6', name: 'Container F', status: 'Pending', deliveryDate: '2024-09-03' },
|
|
553
|
+
{ id: '7', name: 'Container G', status: 'In Transit', deliveryDate: '2024-09-03' },
|
|
554
|
+
{ id: '8', name: 'Container H', status: 'Delivered', deliveryDate: '2024-09-03' },
|
|
555
|
+
{ id: '9', name: 'Pallet I', status: 'Pending', deliveryDate: '2024-09-04' },
|
|
556
|
+
{ id: '10', name: 'Pallet J', status: 'In Transit', deliveryDate: '2024-09-04' },
|
|
557
|
+
{ id: '11', name: 'Freight K', status: 'Delivered', deliveryDate: '2024-09-05' },
|
|
558
|
+
{ id: '12', name: 'Freight L', status: 'Pending', deliveryDate: '2024-09-05' },
|
|
559
|
+
{ id: '13', name: 'Truck M', status: 'In Transit', deliveryDate: '2024-09-06' },
|
|
560
|
+
{ id: '14', name: 'Truck N', status: 'Delivered', deliveryDate: '2024-09-06' },
|
|
561
|
+
{ id: '15', name: 'Parcel O', status: 'Pending', deliveryDate: '2024-09-07' },
|
|
562
|
+
];
|
|
563
|
+
|
|
564
|
+
export default () => {
|
|
565
|
+
const [sortOrder, setSortOrder] = useState<'asc' | 'desc'>('desc');
|
|
566
|
+
const [itemSortOrder, setItemSortOrder] = useState<'asc' | 'desc'>('desc');
|
|
567
|
+
|
|
568
|
+
const handleChangeSortOrder = () => {
|
|
569
|
+
setSortOrder(prevOrder => (prevOrder === 'asc' ? 'desc' : 'asc'));
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
const handleChangeItemSortOrder = () => {
|
|
573
|
+
setItemSortOrder(prevOrder => (prevOrder === 'asc' ? 'desc' : 'asc'));
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
// Custom render function for group dividers
|
|
577
|
+
const renderCustomDivider = (groupKey: string) => (
|
|
578
|
+
<div className='text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16'>{groupKey}</div>
|
|
579
|
+
);
|
|
580
|
+
|
|
581
|
+
// Custom render function for list items (rendered as <li> when using <ul>)
|
|
582
|
+
const renderSimpleCustomItem = (item: LogisticItem) => (
|
|
583
|
+
<div key={item.id} className='padding-10 border border-bottom-only display-flex gap-5'>
|
|
584
|
+
<div>{item.name}</div>
|
|
585
|
+
<div className='text-light'>({item.status})</div>
|
|
586
|
+
</div>
|
|
587
|
+
);
|
|
588
|
+
|
|
589
|
+
// Sorting function for groups by deliveryDate
|
|
590
|
+
const groupSortFunction = (groups: Group[]) => {
|
|
591
|
+
return naturalSortByProperty(groups, 'groupKey', sortOrder);
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
// Sorting function for items within each group
|
|
595
|
+
const itemSortFunction = (items: LogisticItem[]) => {
|
|
596
|
+
return sortByProperty(items, 'name', itemSortOrder);
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
return (
|
|
600
|
+
<div>
|
|
601
|
+
<h4>Grouped by date</h4>
|
|
602
|
+
<div className='btn-toolbar'>
|
|
603
|
+
<Button onClick={handleChangeSortOrder}>Switch group sort order</Button>
|
|
604
|
+
<Button onClick={handleChangeItemSortOrder}>Switch item sort order</Button>
|
|
605
|
+
</div>
|
|
606
|
+
<GroupedItemList
|
|
607
|
+
items={logisticItems}
|
|
608
|
+
groupBy={(item: LogisticItem) => item.deliveryDate}
|
|
609
|
+
groupSortOrder={sortOrder}
|
|
610
|
+
groupSortFunction={groupSortFunction}
|
|
611
|
+
itemSortFunction={itemSortFunction}
|
|
612
|
+
renderDivider={renderCustomDivider}
|
|
613
|
+
renderItem={renderSimpleCustomItem}
|
|
614
|
+
/>
|
|
615
|
+
</div>
|
|
616
|
+
);
|
|
617
|
+
};
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
#### HTML (html)
|
|
621
|
+
|
|
622
|
+
```html
|
|
623
|
+
<div>
|
|
624
|
+
<h4>Grouped by date</h4>
|
|
625
|
+
<div class="btn-toolbar">
|
|
626
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">Switch group sort order</button>
|
|
627
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">Switch item sort order</button>
|
|
628
|
+
</div>
|
|
629
|
+
<div class="grouped-item-list ">
|
|
630
|
+
<div class="group-divider ">
|
|
631
|
+
<div class="text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16">2024-09-07</div>
|
|
632
|
+
</div>
|
|
633
|
+
<div>
|
|
634
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
635
|
+
<div>Parcel O</div>
|
|
636
|
+
<div class="text-light">(Pending)</div>
|
|
637
|
+
</div>
|
|
638
|
+
</div>
|
|
639
|
+
<div class="group-divider ">
|
|
640
|
+
<div class="text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16">2024-09-06</div>
|
|
641
|
+
</div>
|
|
642
|
+
<div>
|
|
643
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
644
|
+
<div>Truck N</div>
|
|
645
|
+
<div class="text-light">(Delivered)</div>
|
|
646
|
+
</div>
|
|
647
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
648
|
+
<div>Truck M</div>
|
|
649
|
+
<div class="text-light">(In Transit)</div>
|
|
650
|
+
</div>
|
|
651
|
+
</div>
|
|
652
|
+
<div class="group-divider ">
|
|
653
|
+
<div class="text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16">2024-09-05</div>
|
|
654
|
+
</div>
|
|
655
|
+
<div>
|
|
656
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
657
|
+
<div>Freight L</div>
|
|
658
|
+
<div class="text-light">(Pending)</div>
|
|
659
|
+
</div>
|
|
660
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
661
|
+
<div>Freight K</div>
|
|
662
|
+
<div class="text-light">(Delivered)</div>
|
|
663
|
+
</div>
|
|
664
|
+
</div>
|
|
665
|
+
<div class="group-divider ">
|
|
666
|
+
<div class="text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16">2024-09-04</div>
|
|
667
|
+
</div>
|
|
668
|
+
<div>
|
|
669
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
670
|
+
<div>Pallet J</div>
|
|
671
|
+
<div class="text-light">(In Transit)</div>
|
|
672
|
+
</div>
|
|
673
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
674
|
+
<div>Pallet I</div>
|
|
675
|
+
<div class="text-light">(Pending)</div>
|
|
676
|
+
</div>
|
|
677
|
+
</div>
|
|
678
|
+
<div class="group-divider ">
|
|
679
|
+
<div class="text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16">2024-09-03</div>
|
|
680
|
+
</div>
|
|
681
|
+
<div>
|
|
682
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
683
|
+
<div>Container H</div>
|
|
684
|
+
<div class="text-light">(Delivered)</div>
|
|
685
|
+
</div>
|
|
686
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
687
|
+
<div>Container G</div>
|
|
688
|
+
<div class="text-light">(In Transit)</div>
|
|
689
|
+
</div>
|
|
690
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
691
|
+
<div>Container F</div>
|
|
692
|
+
<div class="text-light">(Pending)</div>
|
|
693
|
+
</div>
|
|
694
|
+
</div>
|
|
695
|
+
<div class="group-divider ">
|
|
696
|
+
<div class="text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16">2024-09-02</div>
|
|
697
|
+
</div>
|
|
698
|
+
<div>
|
|
699
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
700
|
+
<div>Package E</div>
|
|
701
|
+
<div class="text-light">(Delivered)</div>
|
|
702
|
+
</div>
|
|
703
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
704
|
+
<div>Package D</div>
|
|
705
|
+
<div class="text-light">(In Transit)</div>
|
|
706
|
+
</div>
|
|
707
|
+
</div>
|
|
708
|
+
<div class="group-divider ">
|
|
709
|
+
<div class="text-color-darker text-medium margin-bottom-5 margin-top-50 text-size-16">2024-09-01</div>
|
|
710
|
+
</div>
|
|
711
|
+
<div>
|
|
712
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
713
|
+
<div>Shipment C</div>
|
|
714
|
+
<div class="text-light">(Pending)</div>
|
|
715
|
+
</div>
|
|
716
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
717
|
+
<div>Shipment B</div>
|
|
718
|
+
<div class="text-light">(Delivered)</div>
|
|
719
|
+
</div>
|
|
720
|
+
<div class="padding-10 border border-bottom-only display-flex gap-5">
|
|
721
|
+
<div>Shipment A</div>
|
|
722
|
+
<div class="text-light">(In Transit)</div>
|
|
723
|
+
</div>
|
|
724
|
+
</div>
|
|
725
|
+
</div>
|
|
726
|
+
</div>
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
#### Props
|
|
730
|
+
|
|
731
|
+
| Name | Type | Default | Description |
|
|
732
|
+
| --- | --- | --- | --- |
|
|
733
|
+
| items | Array | — | The list of items to be grouped and rendered. By default, the component assumes an item object containing an "id" and "name" property plus some other attributes. |
|
|
734
|
+
| groupBy | String / Function | — | The property of the items to group by, either as a string (e.g., "name") or a custom grouping function. If not provided, it defaults to grouping by "name". |
|
|
735
|
+
| groupSortOrder | String | asc | Defines the sort order for groups. Accepts "asc" for ascending or "desc" for descending order. |
|
|
736
|
+
| itemSortOrder | String | asc | Defines the sort order for items within each group. Accepts "asc" for ascending or "desc" for descending order. |
|
|
737
|
+
| groupSortFunction | Function | — | Optional sorting function for the groups. It takes an array of groups and returns them in the desired order. |
|
|
738
|
+
| itemSortFunction | Function | — | Optional sorting function for items within each group. It takes an array of items and returns them in the desired order. |
|
|
739
|
+
| renderDivider | Function | — | Custom render function for the group divider. Receives the group key as a parameter and should return a React node to render as the divider. |
|
|
740
|
+
| renderItem | Function | — | Custom render function for individual list items. Receives an item as a parameter and should return a React node representing the item. |
|
|
741
|
+
| listElement | "div" \| "ul" | div | Specifies the HTML element to use for the list inside each group. Defaults to "div", but "ul" can be used if rendering list items as `<li>` elements. |
|
|
742
|
+
| listElementClassName | String | — | Optional class name for the list element inside each group (applies to the `div` or `ul` wrapping the items). |
|
|
743
|
+
| dividerElementClassName | String | — | Optional class name for the divider element in each group (applies to the `div` wrapping each group divider). |
|
|
744
|
+
| className | String | — | Optional class name for the outer wrapper element (applies to the outer `div` wrapping the entire component). |
|
|
745
|
+
|
|
746
|
+
### Example: Example 3
|
|
747
|
+
|
|
748
|
+
Grouped by custom key with basic styling
|
|
749
|
+
|
|
750
|
+
A
|
|
751
|
+
Air Freight: The transportation of goods via air
|
|
752
|
+
Air Waybill (AWB): A document for air shipments detailing the goods and their destination
|
|
753
|
+
|
|
754
|
+
B
|
|
755
|
+
Bill of Lading (B/L): A contract between the shipper and the carrier for ocean transport
|
|
756
|
+
Bulk Cargo: Unpackaged goods shipped in large quantities, like grains or coal
|
|
757
|
+
|
|
758
|
+
C
|
|
759
|
+
Cargo: Goods transported by a vehicle such as a ship, truck, or aircraft
|
|
760
|
+
Carrier: A company that transports goods via road, rail, sea, or air
|
|
761
|
+
Consignee: The person or company receiving the shipment
|
|
762
|
+
Customs: Government agency responsible for regulating shipments entering a country
|
|
763
|
+
|
|
764
|
+
D
|
|
765
|
+
Dangerous Goods: Items that require special handling due to safety concerns, like chemicals
|
|
766
|
+
Demurrage: A charge for delaying the return of a container beyond the allowed time
|
|
767
|
+
|
|
768
|
+
F
|
|
769
|
+
Freight Forwarder: A company that organizes shipments on behalf of shippers
|
|
770
|
+
Full Container Load (FCL): A shipment that fills an entire container
|
|
771
|
+
|
|
772
|
+
L
|
|
773
|
+
Logistics: The management of the flow of goods between the point of origin and consumption
|
|
774
|
+
LTL (Less than Truckload): A shipment that doesn’t require a full truckload
|
|
775
|
+
|
|
776
|
+
V
|
|
777
|
+
Vessel: A large ship used to transport goods across seas and oceans
|
|
778
|
+
|
|
779
|
+
#### Summary
|
|
780
|
+
|
|
781
|
+
Grouped by custom key with basic styling
|
|
782
|
+
|
|
783
|
+
A
|
|
784
|
+
Air Freight: The transportation of goods via air
|
|
785
|
+
Air Waybill (AWB): A document for air shipments detailing the goods and their destination
|
|
786
|
+
|
|
787
|
+
B
|
|
788
|
+
Bill of Lading (B/L): A contract between the shipper and the carrier for ocean transport
|
|
789
|
+
Bulk Cargo: Unpackaged goods shipped in large quantities, like grains or coal
|
|
790
|
+
|
|
791
|
+
C
|
|
792
|
+
Cargo: Goods transported by a vehicle such as a ship, truck, or aircraft
|
|
793
|
+
Carrier: A company that transports goods via road, rail, sea, or air
|
|
794
|
+
Consignee: The person or company receiving the shipment
|
|
795
|
+
Customs: Government agency responsible for regulating shipments entering a country
|
|
796
|
+
|
|
797
|
+
D
|
|
798
|
+
Dangerous Goods: Items that require special handling due to safety concerns, like chemicals
|
|
799
|
+
Demurrage: A charge for delaying the return of a container beyond the allowed time
|
|
800
|
+
|
|
801
|
+
F
|
|
802
|
+
Freight Forwarder: A company that organizes shipments on behalf of shippers
|
|
803
|
+
Full Container Load (FCL): A shipment that fills an entire container
|
|
804
|
+
|
|
805
|
+
L
|
|
806
|
+
Logistics: The management of the flow of goods between the point of origin and consumption
|
|
807
|
+
LTL (Less than Truckload): A shipment that doesn’t require a full truckload
|
|
808
|
+
|
|
809
|
+
V
|
|
810
|
+
Vessel: A large ship used to transport goods across seas and oceans
|
|
811
|
+
|
|
812
|
+
#### React (tsx)
|
|
813
|
+
|
|
814
|
+
```tsx
|
|
815
|
+
import Divider from '@rio-cloud/rio-uikit/Divider';
|
|
816
|
+
import GroupedItemList from '@rio-cloud/rio-uikit/GroupedItemList';
|
|
817
|
+
|
|
818
|
+
type Item = {
|
|
819
|
+
id: string;
|
|
820
|
+
term: string;
|
|
821
|
+
explanation: string;
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
const items = [
|
|
825
|
+
{ id: '1', term: 'Air Freight', explanation: 'The transportation of goods via air' },
|
|
826
|
+
{
|
|
827
|
+
id: '2',
|
|
828
|
+
term: 'Air Waybill (AWB)',
|
|
829
|
+
explanation: 'A document for air shipments detailing the goods and their destination',
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
id: '3',
|
|
833
|
+
term: 'Bill of Lading (B/L)',
|
|
834
|
+
explanation: 'A contract between the shipper and the carrier for ocean transport',
|
|
835
|
+
},
|
|
836
|
+
{ id: '4', term: 'Bulk Cargo', explanation: 'Unpackaged goods shipped in large quantities, like grains or coal' },
|
|
837
|
+
{ id: '5', term: 'Cargo', explanation: 'Goods transported by a vehicle such as a ship, truck, or aircraft' },
|
|
838
|
+
{ id: '6', term: 'Carrier', explanation: 'A company that transports goods via road, rail, sea, or air' },
|
|
839
|
+
{ id: '7', term: 'Consignee', explanation: 'The person or company receiving the shipment' },
|
|
840
|
+
{
|
|
841
|
+
id: '8',
|
|
842
|
+
term: 'Customs',
|
|
843
|
+
explanation: 'Government agency responsible for regulating shipments entering a country',
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
id: '9',
|
|
847
|
+
term: 'Demurrage',
|
|
848
|
+
explanation: 'A charge for delaying the return of a container beyond the allowed time',
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
id: '10',
|
|
852
|
+
term: 'Dangerous Goods',
|
|
853
|
+
explanation: 'Items that require special handling due to safety concerns, like chemicals',
|
|
854
|
+
},
|
|
855
|
+
{ id: '11', term: 'Freight Forwarder', explanation: 'A company that organizes shipments on behalf of shippers' },
|
|
856
|
+
{ id: '12', term: 'Full Container Load (FCL)', explanation: 'A shipment that fills an entire container' },
|
|
857
|
+
{ id: '13', term: 'LTL (Less than Truckload)', explanation: 'A shipment that doesn’t require a full truckload' },
|
|
858
|
+
{
|
|
859
|
+
id: '14',
|
|
860
|
+
term: 'Logistics',
|
|
861
|
+
explanation: 'The management of the flow of goods between the point of origin and consumption',
|
|
862
|
+
},
|
|
863
|
+
{ id: '15', term: 'Vessel', explanation: 'A large ship used to transport goods across seas and oceans' },
|
|
864
|
+
];
|
|
865
|
+
|
|
866
|
+
export default () => {
|
|
867
|
+
// Custom render function for list items (rendered as <li> when using <ul>)
|
|
868
|
+
const renderCustomItem = (item: Item) => (
|
|
869
|
+
<li key={item.id}>
|
|
870
|
+
<span className='text-bold'>{item.term}: </span>
|
|
871
|
+
<span>{item.explanation}</span>
|
|
872
|
+
</li>
|
|
873
|
+
);
|
|
874
|
+
|
|
875
|
+
return (
|
|
876
|
+
<div>
|
|
877
|
+
<h5>Grouped by custom key with basic styling</h5>
|
|
878
|
+
<Divider />
|
|
879
|
+
<GroupedItemList
|
|
880
|
+
items={items}
|
|
881
|
+
groupBy='term'
|
|
882
|
+
renderItem={renderCustomItem}
|
|
883
|
+
listElement='ul'
|
|
884
|
+
listElementClassName='margin-bottom-20'
|
|
885
|
+
/>
|
|
886
|
+
</div>
|
|
887
|
+
);
|
|
888
|
+
};
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
#### HTML (html)
|
|
892
|
+
|
|
893
|
+
```html
|
|
894
|
+
<div>
|
|
895
|
+
<h5>Grouped by custom key with basic styling</h5>
|
|
896
|
+
<div class="Divider position-relative width-100pct" style="padding-top: 15px; padding-bottom: 15px;">
|
|
897
|
+
<div class="divider-line bg-light" style="width: 100%; height: 1px;">
|
|
898
|
+
</div>
|
|
899
|
+
</div>
|
|
900
|
+
<div class="grouped-item-list ">
|
|
901
|
+
<div class="group-divider ">A</div>
|
|
902
|
+
<ul class="margin-bottom-20">
|
|
903
|
+
<li>
|
|
904
|
+
<span class="text-bold">Air Freight: </span>
|
|
905
|
+
<span>The transportation of goods via air</span>
|
|
906
|
+
</li>
|
|
907
|
+
<li>
|
|
908
|
+
<span class="text-bold">Air Waybill (AWB): </span>
|
|
909
|
+
<span>A document for air shipments detailing the goods and their destination</span>
|
|
910
|
+
</li>
|
|
911
|
+
</ul>
|
|
912
|
+
<div class="group-divider ">B</div>
|
|
913
|
+
<ul class="margin-bottom-20">
|
|
914
|
+
<li>
|
|
915
|
+
<span class="text-bold">Bill of Lading (B/L): </span>
|
|
916
|
+
<span>A contract between the shipper and the carrier for ocean transport</span>
|
|
917
|
+
</li>
|
|
918
|
+
<li>
|
|
919
|
+
<span class="text-bold">Bulk Cargo: </span>
|
|
920
|
+
<span>Unpackaged goods shipped in large quantities, like grains or coal</span>
|
|
921
|
+
</li>
|
|
922
|
+
</ul>
|
|
923
|
+
<div class="group-divider ">C</div>
|
|
924
|
+
<ul class="margin-bottom-20">
|
|
925
|
+
<li>
|
|
926
|
+
<span class="text-bold">Cargo: </span>
|
|
927
|
+
<span>Goods transported by a vehicle such as a ship, truck, or aircraft</span>
|
|
928
|
+
</li>
|
|
929
|
+
<li>
|
|
930
|
+
<span class="text-bold">Carrier: </span>
|
|
931
|
+
<span>A company that transports goods via road, rail, sea, or air</span>
|
|
932
|
+
</li>
|
|
933
|
+
<li>
|
|
934
|
+
<span class="text-bold">Consignee: </span>
|
|
935
|
+
<span>The person or company receiving the shipment</span>
|
|
936
|
+
</li>
|
|
937
|
+
<li>
|
|
938
|
+
<span class="text-bold">Customs: </span>
|
|
939
|
+
<span>Government agency responsible for regulating shipments entering a country</span>
|
|
940
|
+
</li>
|
|
941
|
+
</ul>
|
|
942
|
+
<div class="group-divider ">D</div>
|
|
943
|
+
<ul class="margin-bottom-20">
|
|
944
|
+
<li>
|
|
945
|
+
<span class="text-bold">Dangerous Goods: </span>
|
|
946
|
+
<span>Items that require special handling due to safety concerns, like chemicals</span>
|
|
947
|
+
</li>
|
|
948
|
+
<li>
|
|
949
|
+
<span class="text-bold">Demurrage: </span>
|
|
950
|
+
<span>A charge for delaying the return of a container beyond the allowed time</span>
|
|
951
|
+
</li>
|
|
952
|
+
</ul>
|
|
953
|
+
<div class="group-divider ">F</div>
|
|
954
|
+
<ul class="margin-bottom-20">
|
|
955
|
+
<li>
|
|
956
|
+
<span class="text-bold">Freight Forwarder: </span>
|
|
957
|
+
<span>A company that organizes shipments on behalf of shippers</span>
|
|
958
|
+
</li>
|
|
959
|
+
<li>
|
|
960
|
+
<span class="text-bold">Full Container Load (FCL): </span>
|
|
961
|
+
<span>A shipment that fills an entire container</span>
|
|
962
|
+
</li>
|
|
963
|
+
</ul>
|
|
964
|
+
<div class="group-divider ">L</div>
|
|
965
|
+
<ul class="margin-bottom-20">
|
|
966
|
+
<li>
|
|
967
|
+
<span class="text-bold">Logistics: </span>
|
|
968
|
+
<span>The management of the flow of goods between the point of origin and consumption</span>
|
|
969
|
+
</li>
|
|
970
|
+
<li>
|
|
971
|
+
<span class="text-bold">LTL (Less than Truckload): </span>
|
|
972
|
+
<span>A shipment that doesn’t require a full truckload</span>
|
|
973
|
+
</li>
|
|
974
|
+
</ul>
|
|
975
|
+
<div class="group-divider ">V</div>
|
|
976
|
+
<ul class="margin-bottom-20">
|
|
977
|
+
<li>
|
|
978
|
+
<span class="text-bold">Vessel: </span>
|
|
979
|
+
<span>A large ship used to transport goods across seas and oceans</span>
|
|
980
|
+
</li>
|
|
981
|
+
</ul>
|
|
982
|
+
</div>
|
|
983
|
+
</div>
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
#### Props
|
|
987
|
+
|
|
988
|
+
| Name | Type | Default | Description |
|
|
989
|
+
| --- | --- | --- | --- |
|
|
990
|
+
| items | Array | — | The list of items to be grouped and rendered. By default, the component assumes an item object containing an "id" and "name" property plus some other attributes. |
|
|
991
|
+
| groupBy | String / Function | — | The property of the items to group by, either as a string (e.g., "name") or a custom grouping function. If not provided, it defaults to grouping by "name". |
|
|
992
|
+
| groupSortOrder | String | asc | Defines the sort order for groups. Accepts "asc" for ascending or "desc" for descending order. |
|
|
993
|
+
| itemSortOrder | String | asc | Defines the sort order for items within each group. Accepts "asc" for ascending or "desc" for descending order. |
|
|
994
|
+
| groupSortFunction | Function | — | Optional sorting function for the groups. It takes an array of groups and returns them in the desired order. |
|
|
995
|
+
| itemSortFunction | Function | — | Optional sorting function for items within each group. It takes an array of items and returns them in the desired order. |
|
|
996
|
+
| renderDivider | Function | — | Custom render function for the group divider. Receives the group key as a parameter and should return a React node to render as the divider. |
|
|
997
|
+
| renderItem | Function | — | Custom render function for individual list items. Receives an item as a parameter and should return a React node representing the item. |
|
|
998
|
+
| listElement | "div" \| "ul" | div | Specifies the HTML element to use for the list inside each group. Defaults to "div", but "ul" can be used if rendering list items as `<li>` elements. |
|
|
999
|
+
| listElementClassName | String | — | Optional class name for the list element inside each group (applies to the `div` or `ul` wrapping the items). |
|
|
1000
|
+
| dividerElementClassName | String | — | Optional class name for the divider element in each group (applies to the `div` wrapping each group divider). |
|
|
1001
|
+
| className | String | — | Optional class name for the outer wrapper element (applies to the outer `div` wrapping the entire component). |
|