@rio-cloud/uikit-mcp 1.1.4 → 1.1.6
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 -0
- package/dist/doc-metadata.json +188 -88
- package/dist/docs/components/accentBar.md +35 -3
- package/dist/docs/components/activity.md +14 -3
- package/dist/docs/components/animatedNumber.md +17 -4
- package/dist/docs/components/animatedTextReveal.md +54 -8
- package/dist/docs/components/animations.md +33 -33
- package/dist/docs/components/appHeader.md +65 -9
- package/dist/docs/components/appLayout.md +566 -61
- package/dist/docs/components/appNavigationBar.md +55 -3
- package/dist/docs/components/areaCharts.md +14 -14
- package/dist/docs/components/aspectRatioPlaceholder.md +11 -3
- package/dist/docs/components/assetTree.md +1174 -328
- package/dist/docs/components/autosuggests.md +2 -2
- package/dist/docs/components/avatar.md +25 -3
- package/dist/docs/components/banner.md +3 -3
- package/dist/docs/components/barCharts.md +38 -38
- package/dist/docs/components/barList.md +22 -10
- package/dist/docs/components/basicMap.md +2 -2
- package/dist/docs/components/bottomSheet.md +100 -3
- package/dist/docs/components/button.md +549 -36
- package/dist/docs/components/buttonToolbar.md +10 -3
- package/dist/docs/components/calendarStripe.md +127 -85
- package/dist/docs/components/card.md +11 -3
- package/dist/docs/components/carousel.md +2 -2
- package/dist/docs/components/chartColors.md +2 -2
- package/dist/docs/components/chartsGettingStarted.md +2 -2
- package/dist/docs/components/chat.md +3 -3
- package/dist/docs/components/checkbox.md +67 -45
- package/dist/docs/components/circularProgress.md +465 -0
- package/dist/docs/components/clearableInput.md +18 -18
- package/dist/docs/components/collapse.md +28 -4
- package/dist/docs/components/composedCharts.md +20 -20
- package/dist/docs/components/contentLoader.md +126 -105
- package/dist/docs/components/dataTabs.md +191 -11
- package/dist/docs/components/datepickers.md +735 -723
- package/dist/docs/components/dialogs.md +362 -2
- package/dist/docs/components/divider.md +15 -3
- package/dist/docs/components/dropdowns.md +4548 -4355
- package/dist/docs/components/editableContent.md +187 -3
- package/dist/docs/components/expander.md +52 -5
- package/dist/docs/components/fade.md +42 -7
- package/dist/docs/components/fadeExpander.md +13 -4
- package/dist/docs/components/fadeUp.md +22 -4
- package/dist/docs/components/feedback.md +44 -3
- package/dist/docs/components/filePickers.md +45 -3
- package/dist/docs/components/formLabel.md +20 -5
- package/dist/docs/components/groupedItemList.md +54 -3
- package/dist/docs/components/iconList.md +5 -5
- package/dist/docs/components/imagePreloader.md +7 -3
- package/dist/docs/components/labeledElement.md +13 -3
- package/dist/docs/components/licensePlate.md +11 -3
- package/dist/docs/components/lineCharts.md +10 -10
- package/dist/docs/components/listMenu.md +78 -8
- package/dist/docs/components/loadMore.md +29 -3
- package/dist/docs/components/mainNavigation.md +5 -5
- package/dist/docs/components/mapCircle.md +2 -2
- package/dist/docs/components/mapCluster.md +2 -2
- package/dist/docs/components/mapContext.md +2 -2
- package/dist/docs/components/mapDraggableMarker.md +2 -2
- package/dist/docs/components/mapGettingStarted.md +2 -2
- package/dist/docs/components/mapInfoBubble.md +2 -2
- package/dist/docs/components/mapLayerGroup.md +2 -2
- package/dist/docs/components/mapMarker.md +2 -2
- package/dist/docs/components/mapPolygon.md +2 -2
- package/dist/docs/components/mapRoute.md +2 -2
- package/dist/docs/components/mapRouteGenerator.md +2 -2
- package/dist/docs/components/mapSettings.md +9 -9
- package/dist/docs/components/mapUtils.md +2 -2
- package/dist/docs/components/multiselects.md +2 -2
- package/dist/docs/components/noData.md +23 -3
- package/dist/docs/components/notifications.md +2 -2
- package/dist/docs/components/numbercontrol.md +54 -5
- package/dist/docs/components/onboarding.md +26 -2
- package/dist/docs/components/page.md +33 -3
- package/dist/docs/components/pager.md +15 -3
- package/dist/docs/components/pieCharts.md +89 -78
- package/dist/docs/components/popover.md +40 -2
- package/dist/docs/components/position.md +11 -3
- package/dist/docs/components/radialBarCharts.md +2054 -2012
- package/dist/docs/components/radioCardGroup.md +487 -0
- package/dist/docs/components/radiobutton.md +138 -10
- package/dist/docs/components/releaseNotes.md +19 -2
- package/dist/docs/components/resizer.md +14 -3
- package/dist/docs/components/responsiveColumnStripe.md +20 -3
- package/dist/docs/components/responsiveVideo.md +12 -3
- package/dist/docs/components/rioglyph.md +13 -3
- package/dist/docs/components/rules.md +95 -5
- package/dist/docs/components/saveableInput.md +400 -276
- package/dist/docs/components/selects.md +2 -2
- package/dist/docs/components/sidebar.md +39 -3
- package/dist/docs/components/sliders.md +38 -3
- package/dist/docs/components/smoothScrollbars.md +93 -3
- package/dist/docs/components/spinners.md +51 -3
- package/dist/docs/components/states.md +217 -2
- package/dist/docs/components/statsWidgets.md +123 -3
- package/dist/docs/components/statusBar.md +29 -3
- package/dist/docs/components/stepButton.md +9 -3
- package/dist/docs/components/steppedProgressBars.md +67 -3
- package/dist/docs/components/subNavigation.md +24 -17
- package/dist/docs/components/supportMarker.md +2 -2
- package/dist/docs/components/svgImage.md +13 -3
- package/dist/docs/components/switch.md +218 -82
- package/dist/docs/components/tables.md +2 -2
- package/dist/docs/components/tagManager.md +56 -2
- package/dist/docs/components/tags.md +33 -3
- package/dist/docs/components/teaser.md +30 -3
- package/dist/docs/components/textTruncateMiddle.md +151 -0
- package/dist/docs/components/timeline.md +2 -2
- package/dist/docs/components/timepicker.md +687 -63
- package/dist/docs/components/toggleButton.md +96 -10
- package/dist/docs/components/tooltip.md +30 -21
- package/dist/docs/components/tracker.md +631 -0
- package/dist/docs/components/virtualList.md +107 -84
- package/dist/docs/foundations.md +647 -275
- package/dist/docs/start/changelog.md +2 -738
- package/dist/docs/start/goodtoknow.md +2 -2
- package/dist/docs/start/guidelines/color-combinations.md +2 -2
- package/dist/docs/start/guidelines/custom-css.md +2 -2
- package/dist/docs/start/guidelines/custom-rioglyph.md +2 -2
- package/dist/docs/start/guidelines/formatting.md +2 -2
- package/dist/docs/start/guidelines/iframe.md +2 -2
- package/dist/docs/start/guidelines/obfuscate-data.md +2 -2
- package/dist/docs/start/guidelines/print-css.md +2 -2
- package/dist/docs/start/guidelines/spinner.md +82 -82
- package/dist/docs/start/guidelines/state-in-url.md +263 -0
- package/dist/docs/start/guidelines/supported-browsers.md +2 -2
- package/dist/docs/start/guidelines/writing.md +2 -2
- package/dist/docs/start/howto.md +10 -10
- package/dist/docs/start/intro.md +2 -2
- package/dist/docs/start/responsiveness.md +2 -2
- package/dist/docs/templates/common-table.md +15 -14
- package/dist/docs/templates/detail-views.md +3 -3
- package/dist/docs/templates/expandable-details.md +2 -2
- package/dist/docs/templates/feature-cards.md +56 -56
- package/dist/docs/templates/form-summary.md +23 -23
- package/dist/docs/templates/form-toggle.md +2 -2
- package/dist/docs/templates/list-blocks.md +204 -204
- package/dist/docs/templates/loading-progress.md +2 -2
- package/dist/docs/templates/options-panel.md +2 -2
- package/dist/docs/templates/panel-variants.md +2 -2
- package/dist/docs/templates/progress-cards.md +2 -2
- package/dist/docs/templates/progress-success.md +2 -2
- package/dist/docs/templates/settings-form.md +24 -24
- package/dist/docs/templates/stats-blocks.md +18 -18
- package/dist/docs/templates/table-panel.md +2 -2
- package/dist/docs/templates/table-row-animation.md +2 -2
- package/dist/docs/templates/usage-cards.md +2 -2
- package/dist/docs/utilities/classNames.md +191 -0
- package/dist/docs/utilities/deviceUtils.md +2 -2
- package/dist/docs/utilities/featureToggles.md +2 -2
- package/dist/docs/utilities/fuelTypeUtils.md +2 -2
- package/dist/docs/utilities/routeUtils.md +326 -90
- package/dist/docs/utilities/useAfterMount.md +2 -2
- package/dist/docs/utilities/useAutoAnimate.md +2 -2
- package/dist/docs/utilities/useAverage.md +2 -2
- package/dist/docs/utilities/useClickOutside.md +2 -2
- package/dist/docs/utilities/useClipboard.md +3 -3
- package/dist/docs/utilities/useCookies.md +188 -0
- package/dist/docs/utilities/useCount.md +2 -2
- package/dist/docs/utilities/useDarkMode.md +2 -2
- package/dist/docs/utilities/useDebugInfo.md +5 -5
- package/dist/docs/utilities/useEffectOnce.md +2 -2
- package/dist/docs/utilities/useElapsedTime.md +2 -2
- package/dist/docs/utilities/useElementSize.md +2 -2
- package/dist/docs/utilities/useEsc.md +2 -2
- package/dist/docs/utilities/useEvent.md +2 -2
- package/dist/docs/utilities/useFocusTrap.md +2 -2
- package/dist/docs/utilities/useFullscreen.md +2 -2
- package/dist/docs/utilities/useHover.md +2 -2
- package/dist/docs/utilities/useIncomingPostMessages.md +2 -2
- package/dist/docs/utilities/useInterval.md +2 -2
- package/dist/docs/utilities/useIsFocusWithin.md +2 -2
- package/dist/docs/utilities/useKey.md +2 -2
- package/dist/docs/utilities/useLocalStorage.md +2 -2
- package/dist/docs/utilities/useLocationSuggestions.md +2 -2
- package/dist/docs/utilities/useMax.md +2 -2
- package/dist/docs/utilities/useMin.md +2 -2
- package/dist/docs/utilities/useMutationObserver.md +2 -2
- package/dist/docs/utilities/useOnScreen.md +2 -2
- package/dist/docs/utilities/useOnlineStatus.md +2 -2
- package/dist/docs/utilities/usePostMessage.md +3 -3
- package/dist/docs/utilities/usePostMessageSender.md +2 -2
- package/dist/docs/utilities/usePrevious.md +2 -2
- package/dist/docs/utilities/useResizeObserver.md +2 -2
- package/dist/docs/utilities/useRioCookieConsent.md +90 -0
- package/dist/docs/utilities/useScrollPosition.md +2 -2
- package/dist/docs/utilities/useSearch.md +2 -2
- package/dist/docs/utilities/useSearchHighlight.md +815 -0
- package/dist/docs/utilities/useSorting.md +2 -2
- package/dist/docs/utilities/useStateWithValidation.md +2 -2
- package/dist/docs/utilities/useSum.md +2 -2
- package/dist/docs/utilities/useTableExport.md +53 -53
- package/dist/docs/utilities/useTableSelection.md +90 -90
- package/dist/docs/utilities/useTimeout.md +2 -2
- package/dist/docs/utilities/useToggle.md +3 -3
- package/dist/docs/utilities/useUrlState.md +418 -0
- package/dist/docs/utilities/useWindowResize.md +2 -2
- package/dist/index.mjs +8 -8
- package/dist/version.json +2 -2
- package/package.json +9 -9
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
*Category:* Components
|
|
4
4
|
*Section:* Selection
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud
|
|
6
|
-
*Captured:* 2026-
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/assetTree
|
|
6
|
+
*Captured:* 2026-02-23T13:41:57.613Z
|
|
7
7
|
|
|
8
8
|
## AssetTree
|
|
9
9
|
|
|
@@ -11,36 +11,36 @@
|
|
|
11
11
|
|
|
12
12
|
Filter
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
5670
|
|
15
15
|
4
|
|
16
16
|
|
|
17
|
-
Group - Aaron
|
|
17
|
+
Group - Aaron Shanahan - 47639
|
|
18
18
|
|
|
19
|
-
Group -
|
|
19
|
+
Group - Abdiel Reynolds - 902710
|
|
20
20
|
|
|
21
|
-
Group -
|
|
21
|
+
Group - Abigale Halvorson-Spinka - 310410
|
|
22
22
|
|
|
23
|
-
Group -
|
|
23
|
+
Group - Abner Considine - 36217
|
|
24
24
|
|
|
25
|
-
Group -
|
|
25
|
+
Group - Abraham Huel - 668719
|
|
26
26
|
|
|
27
|
-
Group -
|
|
27
|
+
Group - Abraham Wintheiser - 24628
|
|
28
28
|
|
|
29
|
-
Group -
|
|
29
|
+
Group - Adalberto Hackett - 112014
|
|
30
30
|
|
|
31
|
-
Group -
|
|
31
|
+
Group - Afton Bins - 97177
|
|
32
32
|
|
|
33
|
-
Group -
|
|
33
|
+
Group - Agnes Botsford - 737111
|
|
34
34
|
|
|
35
|
-
Group -
|
|
35
|
+
Group - Agnes Padberg - 21789
|
|
36
36
|
|
|
37
|
-
Group -
|
|
37
|
+
Group - Al Wuckert DVM - 880713
|
|
38
38
|
|
|
39
|
-
Group -
|
|
39
|
+
Group - Alexanne Carroll - 934910
|
|
40
40
|
|
|
41
|
-
Group -
|
|
41
|
+
Group - Alfonso Ankunding - 245010
|
|
42
42
|
|
|
43
|
-
Group -
|
|
43
|
+
Group - Alice Casper - 956411
|
|
44
44
|
|
|
45
45
|
200
|
|
46
46
|
|
|
@@ -68,36 +68,36 @@ Asset type filter:
|
|
|
68
68
|
|
|
69
69
|
Filter
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
5670
|
|
72
72
|
4
|
|
73
73
|
|
|
74
|
-
Group - Aaron
|
|
74
|
+
Group - Aaron Shanahan - 47639
|
|
75
75
|
|
|
76
|
-
Group -
|
|
76
|
+
Group - Abdiel Reynolds - 902710
|
|
77
77
|
|
|
78
|
-
Group -
|
|
78
|
+
Group - Abigale Halvorson-Spinka - 310410
|
|
79
79
|
|
|
80
|
-
Group -
|
|
80
|
+
Group - Abner Considine - 36217
|
|
81
81
|
|
|
82
|
-
Group -
|
|
82
|
+
Group - Abraham Huel - 668719
|
|
83
83
|
|
|
84
|
-
Group -
|
|
84
|
+
Group - Abraham Wintheiser - 24628
|
|
85
85
|
|
|
86
|
-
Group -
|
|
86
|
+
Group - Adalberto Hackett - 112014
|
|
87
87
|
|
|
88
|
-
Group -
|
|
88
|
+
Group - Afton Bins - 97177
|
|
89
89
|
|
|
90
|
-
Group -
|
|
90
|
+
Group - Agnes Botsford - 737111
|
|
91
91
|
|
|
92
|
-
Group -
|
|
92
|
+
Group - Agnes Padberg - 21789
|
|
93
93
|
|
|
94
|
-
Group -
|
|
94
|
+
Group - Al Wuckert DVM - 880713
|
|
95
95
|
|
|
96
|
-
Group -
|
|
96
|
+
Group - Alexanne Carroll - 934910
|
|
97
97
|
|
|
98
|
-
Group -
|
|
98
|
+
Group - Alfonso Ankunding - 245010
|
|
99
99
|
|
|
100
|
-
Group -
|
|
100
|
+
Group - Alice Casper - 956411
|
|
101
101
|
|
|
102
102
|
200
|
|
103
103
|
|
|
@@ -466,35 +466,173 @@ const AssetTreeExample = () => {
|
|
|
466
466
|
export default AssetTreeExample;
|
|
467
467
|
```
|
|
468
468
|
|
|
469
|
+
#### Props: AssetTree
|
|
470
|
+
|
|
471
|
+
### AssetTree
|
|
472
|
+
|
|
473
|
+
| Name | Type | Default | Description |
|
|
474
|
+
| --- | --- | --- | --- |
|
|
475
|
+
| fly | boolean | false | Defines if the component will overlap the body content. |
|
|
476
|
+
| resizable | boolean | true | Defines whether or not the sidebar is resizable. |
|
|
477
|
+
| bordered | boolean | false | Defines whether the component has a border or not. |
|
|
478
|
+
| width | number | 350 | Defines the width of the component. The value is set as inline style. Note: when component is resizable it will take the provided width in px only and convert it to number in case. |
|
|
479
|
+
| minWidth | number | 100 | Defines the minimum width of the component in px that will take effect when resizing. |
|
|
480
|
+
| maxWidth | number | 0 | Defines the maximum width of the component in px that will take effect when resizing. |
|
|
481
|
+
| height | number | — | Defines the height of the component in px. |
|
|
482
|
+
| isOpen | boolean | true | Defines whether the component is open or not. |
|
|
483
|
+
| onToggleTree | (isOpen: boolean) => void | () => {} | Callback for when the tree visibility is toggled. |
|
|
484
|
+
| currentCategoryId | string | — | The id of the category which is currently active and shall be shown. |
|
|
485
|
+
| onCategoryChange | (selectedCategoryId: string) => void | () => {} | Callback for handling change of category. |
|
|
486
|
+
| onResizeEnd | VoidFunction | () => {} | Callback for when the resize is done. |
|
|
487
|
+
| useOffscreen | boolean | false | Defines whether the tree components are rendered offscreen and kept mounted in the DOM. |
|
|
488
|
+
| className | string | — | Additional classes added on the wrapper element. |
|
|
489
|
+
|
|
490
|
+
#### Props: TreeCategory
|
|
491
|
+
|
|
492
|
+
### TreeCategory
|
|
493
|
+
|
|
494
|
+
| Name | Type | Default | Description |
|
|
495
|
+
| --- | --- | --- | --- |
|
|
496
|
+
| id | string | — | A unique identifier for that category. |
|
|
497
|
+
| icon | string | — | The rioglyph icon name for that category. |
|
|
498
|
+
| label | string \| React.ReactNode | — | The optional label for the category which will be shown in a tooltip. |
|
|
499
|
+
| hasSelection | boolean | — | Defines whether or not a selection indicator should be shown. |
|
|
500
|
+
|
|
501
|
+
#### Props: Tree
|
|
502
|
+
|
|
503
|
+
### Tree
|
|
504
|
+
|
|
505
|
+
| Name | Type | Default | Description |
|
|
506
|
+
| --- | --- | --- | --- |
|
|
507
|
+
| groups | TreeGroup[] | [] | The list of groups of the items. If no groups are provided all items are rendered as flat list. |
|
|
508
|
+
| └id | string | — | A unique identifier of a group. |
|
|
509
|
+
| └name | string \| React.ReactNode | — | The name of a group. |
|
|
510
|
+
| └position | 'last' | — | Can be set to "last" to enforce the last position in the tree. |
|
|
511
|
+
| └disabled | boolean | — | Disallows the selection of the group itself. |
|
|
512
|
+
| └icon | string | — | The rioglyph icon name for a group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
513
|
+
| └expandedIcon | string | — | The rioglyph icon name for a expanded group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
514
|
+
| └className | string | — | Additional classes added to the group element. |
|
|
515
|
+
| items | TreeItem[] | [] | The list of items. |
|
|
516
|
+
| └id | string | — | A unique identifier of an item. |
|
|
517
|
+
| └name | string \| TreeItemName | — | The name of an item. Either it is a plain string or an object composed of: firstName and lastName where lastName is mandatory. |
|
|
518
|
+
| └info | string \| React.ReactNode | — | The subline of an item. This can e used to show additional information for that item. |
|
|
519
|
+
| └type | string | — | The primary type of the item. This is also used as the fallback icon name and refers to the name of the respective rioglyph icon (excluding the rioglyph- prefix). |
|
|
520
|
+
| └icon | string \| null | — | Optional icon override for the item. If set to a string (e.g. 'truck'), this icon will be used explicitly. If set to undefined, the type property will be used as the fallback icon. If set to null, no icon will be rendered, even if type is defined. This allows full control over the icon behavior while maintaining backward compatibility with type-based icons. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
521
|
+
| └subType | string | — | Optional sub-type of the item. This refers to the name of an additional rioglyph icon (excluding the rioglyph- prefix), typically used to render a secondary icon next to the primary one (Note: for fuel types better use the pairIcon prop). |
|
|
522
|
+
| └pairIcon | string \| null \| undefined | — | Optional pair icon override for the subType. If set to a string (e.g. 'fuel-gas'), this icon will be used explicitly. If set to undefined, the subType property will be used as the fallback icon. If set to null, no icon will be rendered, even if subType is defined. This allows full control over the icon behavior while maintaining backward compatibility with subType-based icons. |
|
|
523
|
+
| └groupIds | string[] | [] | List of group ids the items is associated with. |
|
|
524
|
+
| └className | string | — | Additional classes added to the item element. |
|
|
525
|
+
| selectedGroups | string[] | [] | List of selected group ids. |
|
|
526
|
+
| selectedItems | string[] | [] | List of selected item ids. |
|
|
527
|
+
| onSelectionChange | ({ items, groups }: SelectionChangeResponse) => void | — | Merged Callback for item and group selection changes. It responds with a selection object that contains the selected itemIds and groupIds: { items: [], groups: [] } |
|
|
528
|
+
| hasMultiselect | boolean | true | Defines the selection behavior of the tree. |
|
|
529
|
+
| showRadioButtons | boolean | false | Defines if the single selection should also show radios. |
|
|
530
|
+
| hideSearch | boolean | false | Defines whether or not the built-in Search is shown. |
|
|
531
|
+
| searchPlaceholder | string | — | The text used as placeholder for the search input. |
|
|
532
|
+
| onSearchChange | (value: string) => void | — | Callback for when the search value changes. |
|
|
533
|
+
| search | React.ReactNode | — | Used to define custom search component which replaces the built-in search. |
|
|
534
|
+
| summary | React.ReactNode | — | Used to define custom asset type counter component which replaces the built-in summary. |
|
|
535
|
+
| hideSummary | boolean | false | Defines whether a summary is shown. |
|
|
536
|
+
| onTypeFilterChange | (currentTypes: string[]) => void | — | Callback triggered when the built-in asset type filter changes. This is only available when the default summary is used. |
|
|
537
|
+
| hideTreeHead | boolean | false | Defines whether the entire area below the search field is shown or not. Note: Disabling the tree head will hide the select all checkbox and the tree options as well as the tree summary. |
|
|
538
|
+
| treeHeaderContent | React.ReactElement | — | Additional custom content that is rendered at the top of the tree component. This can be used for nav pills. |
|
|
539
|
+
| scrollHeight | number | — | Defines the max-height of the scrollable list. |
|
|
540
|
+
| expandedGroups | string[] | — | List of group ids which are expanded. |
|
|
541
|
+
| onExpandGroupsChange | (newExpandedGroups: string[]) => void | — | Callback function triggered when a group expands or collapses. |
|
|
542
|
+
| showEmptyGroups | boolean | true | Defines whether empty groups are shown or not. |
|
|
543
|
+
| treeOptions | React.ReactNode[] | — | Component to offer customization options for the tree. |
|
|
544
|
+
| treeOptionsTooltip | React.ReactNode | — | Tooltip content for the tree options dropdown. |
|
|
545
|
+
| disableAnimation | boolean | false | Disables animation when filtering or using search |
|
|
546
|
+
| virtualizeThreshold | number | 50 | The number of items (including groups and children) used for virtualizing the tree. |
|
|
547
|
+
| overscan | number | 5 | The number of items rendered beyond the visible area of a virtualized tree. |
|
|
548
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
549
|
+
|
|
550
|
+
#### Props: TreeSearch
|
|
551
|
+
|
|
552
|
+
### TreeSearch
|
|
553
|
+
|
|
554
|
+
| Name | Type | Default | Description |
|
|
555
|
+
| --- | --- | --- | --- |
|
|
556
|
+
| value | string | — | The search value to be shown and used for the search. |
|
|
557
|
+
| onChange | (newValue: string, event: React.ChangeEvent \| React.MouseEvent) => void | () => {} | Callback for when the search value changes. |
|
|
558
|
+
| placeholder | string | — | The placeholder text used for the input field. |
|
|
559
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
560
|
+
|
|
561
|
+
#### Props: TreeSummary
|
|
562
|
+
|
|
563
|
+
### TreeSummary
|
|
564
|
+
|
|
565
|
+
| Name | Type | Default | Description |
|
|
566
|
+
| --- | --- | --- | --- |
|
|
567
|
+
| assetCounts | TreeSummaryCounts | — | The object containing various asset type counter. |
|
|
568
|
+
| └truck | number | — | The amount of trucks |
|
|
569
|
+
| └trailer | number | — | The amount of trailers |
|
|
570
|
+
| └bus | number | — | The amount of buses |
|
|
571
|
+
| └van | number | — | The amount of vans |
|
|
572
|
+
| └car | number | — | The amount of cars |
|
|
573
|
+
| └driver | number | — | The amount of drivers |
|
|
574
|
+
| gridCols | number | 4 | The number of grid columns used for the built-in TreeSummaryRow. |
|
|
575
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
576
|
+
|
|
577
|
+
#### Props: TreeSummaryRow
|
|
578
|
+
|
|
579
|
+
### TreeSummaryRow
|
|
580
|
+
|
|
581
|
+
| Name | Type | Default | Description |
|
|
582
|
+
| --- | --- | --- | --- |
|
|
583
|
+
| gridCols | number | 4 | Defined the number of grid columns for a single row. Note, when the amount of children exceed the columns it will wrap around to a new line. |
|
|
584
|
+
|
|
585
|
+
#### Props: TypeCounter
|
|
586
|
+
|
|
587
|
+
### TypeCounter
|
|
588
|
+
|
|
589
|
+
| Name | Type | Default | Description |
|
|
590
|
+
| --- | --- | --- | --- |
|
|
591
|
+
| type | string | — | The item type for that counter. This will be used as a return value for the onClick callback. |
|
|
592
|
+
| icon | string | — | The icon name. Note, when using the built-in generic type counter, the icon name will the same as the item type. So make sure there is a corresponding icon for the defined type. |
|
|
593
|
+
| isActive | boolean | — | Sets the active styling if active |
|
|
594
|
+
| hasFilter | boolean | false | Should be set when there is a type filter set in the tree to style the counter accordingly. |
|
|
595
|
+
| enableActivity | boolean | false | Allows for interactivity. Use this prop when you allow clicking on the counter. |
|
|
596
|
+
| hideOnZero | boolean | false | Defines if the counter is rendered at all when the value is not defined ot 0. |
|
|
597
|
+
| onClick | (type: string) => void | — | Callback function when the counter is clicked. It returns the type value. Make sure the "type" prop is defined to receive the value in the callback. |
|
|
598
|
+
| value | string \| React.ReactNode \| number | — | A custom value to be shown in the counter. |
|
|
599
|
+
|
|
600
|
+
#### Props: TreeOption
|
|
601
|
+
|
|
602
|
+
### TreeOption
|
|
603
|
+
|
|
604
|
+
| Name | Type | Default | Description |
|
|
605
|
+
| --- | --- | --- | --- |
|
|
606
|
+
| isChecked | boolean | false | Defines whether the option is set. |
|
|
607
|
+
| onChange | (event: React.MouseEvent<HTMLDivElement>) => void | — | Callback triggered when option is selected. |
|
|
608
|
+
| label | string \| React.ReactNode | — | The label for the option. |
|
|
609
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
610
|
+
|
|
469
611
|
## AssetTree with single select
|
|
470
612
|
|
|
471
613
|
### Example: Example 2
|
|
472
614
|
|
|
473
|
-
6
|
|
474
|
-
11
|
|
475
615
|
7
|
|
476
|
-
|
|
616
|
+
10
|
|
617
|
+
8
|
|
618
|
+
5
|
|
477
619
|
|
|
478
|
-
My Empty
|
|
620
|
+
My Empty Group4
|
|
479
621
|
|
|
480
|
-
Truck Group
|
|
622
|
+
Truck Group East1
|
|
481
623
|
|
|
482
|
-
Truck Group
|
|
483
|
-
N18-
|
|
484
|
-
N18-
|
|
485
|
-
N18-
|
|
486
|
-
N18-
|
|
487
|
-
N18-
|
|
488
|
-
N18-G489 / M-AN 1011
|
|
489
|
-
N18-G728 / M-AN 1019
|
|
490
|
-
N18-G796 / M-AN 1022
|
|
491
|
-
N18-G815 / M-AN 1016
|
|
624
|
+
Truck Group North5
|
|
625
|
+
N18-G229 / M-AN 1019
|
|
626
|
+
N18-G262 / M-AN 1005
|
|
627
|
+
N18-G401 / M-AN 1001
|
|
628
|
+
N18-G797 / M-AN 1024
|
|
629
|
+
N18-G976 / M-AN 1004
|
|
492
630
|
|
|
493
|
-
Truck Group
|
|
631
|
+
Truck Group South3
|
|
494
632
|
|
|
495
|
-
Truck Group
|
|
633
|
+
Truck Group West12
|
|
496
634
|
|
|
497
|
-
All my unassigned
|
|
635
|
+
All my unassigned Trucks5
|
|
498
636
|
|
|
499
637
|
Current category:
|
|
500
638
|
assets
|
|
@@ -507,31 +645,27 @@ Truck Group North
|
|
|
507
645
|
|
|
508
646
|
#### Summary
|
|
509
647
|
|
|
510
|
-
6
|
|
511
|
-
11
|
|
512
648
|
7
|
|
513
|
-
|
|
649
|
+
10
|
|
650
|
+
8
|
|
651
|
+
5
|
|
514
652
|
|
|
515
|
-
My Empty
|
|
653
|
+
My Empty Group4
|
|
516
654
|
|
|
517
|
-
Truck Group
|
|
655
|
+
Truck Group East1
|
|
518
656
|
|
|
519
|
-
Truck Group
|
|
520
|
-
N18-
|
|
521
|
-
N18-
|
|
522
|
-
N18-
|
|
523
|
-
N18-
|
|
524
|
-
N18-
|
|
525
|
-
N18-G489 / M-AN 1011
|
|
526
|
-
N18-G728 / M-AN 1019
|
|
527
|
-
N18-G796 / M-AN 1022
|
|
528
|
-
N18-G815 / M-AN 1016
|
|
657
|
+
Truck Group North5
|
|
658
|
+
N18-G229 / M-AN 1019
|
|
659
|
+
N18-G262 / M-AN 1005
|
|
660
|
+
N18-G401 / M-AN 1001
|
|
661
|
+
N18-G797 / M-AN 1024
|
|
662
|
+
N18-G976 / M-AN 1004
|
|
529
663
|
|
|
530
|
-
Truck Group
|
|
664
|
+
Truck Group South3
|
|
531
665
|
|
|
532
|
-
Truck Group
|
|
666
|
+
Truck Group West12
|
|
533
667
|
|
|
534
|
-
All my unassigned
|
|
668
|
+
All my unassigned Trucks5
|
|
535
669
|
|
|
536
670
|
Current category:
|
|
537
671
|
assets
|
|
@@ -730,22 +864,22 @@ export default AssetTreeSingleSelectExample;
|
|
|
730
864
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
731
865
|
<span class="rioglyph rioglyph-trailer text-size-16 margin-right-2">
|
|
732
866
|
</span>
|
|
733
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
867
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">7</span>
|
|
734
868
|
</div>
|
|
735
869
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
736
870
|
<span class="rioglyph rioglyph-van text-size-16 margin-right-2">
|
|
737
871
|
</span>
|
|
738
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
872
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">10</span>
|
|
739
873
|
</div>
|
|
740
874
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
741
875
|
<span class="rioglyph rioglyph-truck text-size-16 margin-right-2">
|
|
742
876
|
</span>
|
|
743
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
877
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">8</span>
|
|
744
878
|
</div>
|
|
745
879
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
746
880
|
<span class="rioglyph rioglyph-bus text-size-16 margin-right-2">
|
|
747
881
|
</span>
|
|
748
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
882
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">5</span>
|
|
749
883
|
</div>
|
|
750
884
|
</div>
|
|
751
885
|
</div>
|
|
@@ -758,7 +892,7 @@ export default AssetTreeSingleSelectExample;
|
|
|
758
892
|
<span class="TreeLabelNameText">
|
|
759
893
|
<span class="TreeLabelNameTextHeadline">My Empty Group</span>
|
|
760
894
|
</span>
|
|
761
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
895
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">4</span>
|
|
762
896
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
763
897
|
</span>
|
|
764
898
|
</span>
|
|
@@ -770,7 +904,7 @@ export default AssetTreeSingleSelectExample;
|
|
|
770
904
|
<span class="TreeLabelNameText">
|
|
771
905
|
<span class="TreeLabelNameTextHeadline">Truck Group East</span>
|
|
772
906
|
</span>
|
|
773
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
907
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">1</span>
|
|
774
908
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
775
909
|
</span>
|
|
776
910
|
</span>
|
|
@@ -782,26 +916,17 @@ export default AssetTreeSingleSelectExample;
|
|
|
782
916
|
<span class="TreeLabelNameText">
|
|
783
917
|
<span class="TreeLabelNameTextHeadline">Truck Group North</span>
|
|
784
918
|
</span>
|
|
785
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
919
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">5</span>
|
|
786
920
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
787
921
|
</span>
|
|
788
922
|
</span>
|
|
789
923
|
</div>
|
|
790
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
791
|
-
<span class="TreeLabel TreeLabelName">
|
|
792
|
-
<span class="rioglyph rioglyph-trailer">
|
|
793
|
-
</span>
|
|
794
|
-
<span class="TreeLabelNameText">
|
|
795
|
-
<span class="TreeLabelNameTextHeadline">N18-G262 / M-AN 1028</span>
|
|
796
|
-
</span>
|
|
797
|
-
</span>
|
|
798
|
-
</div>
|
|
799
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9718">
|
|
924
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9719">
|
|
800
925
|
<span class="TreeLabel TreeLabelName">
|
|
801
926
|
<span class="rioglyph rioglyph-van">
|
|
802
927
|
</span>
|
|
803
928
|
<span class="TreeLabelNameText">
|
|
804
|
-
<span class="TreeLabelNameTextHeadline">N18-
|
|
929
|
+
<span class="TreeLabelNameTextHeadline">N18-G229 / M-AN 1019</span>
|
|
805
930
|
</span>
|
|
806
931
|
</span>
|
|
807
932
|
</div>
|
|
@@ -810,61 +935,34 @@ export default AssetTreeSingleSelectExample;
|
|
|
810
935
|
<span class="rioglyph rioglyph-truck">
|
|
811
936
|
</span>
|
|
812
937
|
<span class="TreeLabelNameText">
|
|
813
|
-
<span class="TreeLabelNameTextHeadline">N18-
|
|
814
|
-
</span>
|
|
815
|
-
</span>
|
|
816
|
-
</div>
|
|
817
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9726">
|
|
818
|
-
<span class="TreeLabel TreeLabelName">
|
|
819
|
-
<span class="rioglyph rioglyph-van">
|
|
820
|
-
</span>
|
|
821
|
-
<span class="TreeLabelNameText">
|
|
822
|
-
<span class="TreeLabelNameTextHeadline">N18-G458 / M-AN 1026</span>
|
|
823
|
-
</span>
|
|
824
|
-
</span>
|
|
825
|
-
</div>
|
|
826
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9713">
|
|
827
|
-
<span class="TreeLabel TreeLabelName">
|
|
828
|
-
<span class="rioglyph rioglyph-truck">
|
|
829
|
-
</span>
|
|
830
|
-
<span class="TreeLabelNameText">
|
|
831
|
-
<span class="TreeLabelNameTextHeadline">N18-G467 / M-AN 1013</span>
|
|
938
|
+
<span class="TreeLabelNameTextHeadline">N18-G262 / M-AN 1005</span>
|
|
832
939
|
</span>
|
|
833
940
|
</span>
|
|
834
941
|
</div>
|
|
835
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
836
|
-
<span class="TreeLabel TreeLabelName">
|
|
837
|
-
<span class="rioglyph rioglyph-van">
|
|
838
|
-
</span>
|
|
839
|
-
<span class="TreeLabelNameText">
|
|
840
|
-
<span class="TreeLabelNameTextHeadline">N18-G489 / M-AN 1011</span>
|
|
841
|
-
</span>
|
|
842
|
-
</span>
|
|
843
|
-
</div>
|
|
844
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9719">
|
|
942
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d971">
|
|
845
943
|
<span class="TreeLabel TreeLabelName">
|
|
846
944
|
<span class="rioglyph rioglyph-van">
|
|
847
945
|
</span>
|
|
848
946
|
<span class="TreeLabelNameText">
|
|
849
|
-
<span class="TreeLabelNameTextHeadline">N18-
|
|
947
|
+
<span class="TreeLabelNameTextHeadline">N18-G401 / M-AN 1001</span>
|
|
850
948
|
</span>
|
|
851
949
|
</span>
|
|
852
950
|
</div>
|
|
853
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
951
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9724">
|
|
854
952
|
<span class="TreeLabel TreeLabelName">
|
|
855
953
|
<span class="rioglyph rioglyph-bus">
|
|
856
954
|
</span>
|
|
857
955
|
<span class="TreeLabelNameText">
|
|
858
|
-
<span class="TreeLabelNameTextHeadline">N18-
|
|
956
|
+
<span class="TreeLabelNameTextHeadline">N18-G797 / M-AN 1024</span>
|
|
859
957
|
</span>
|
|
860
958
|
</span>
|
|
861
959
|
</div>
|
|
862
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
960
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d974">
|
|
863
961
|
<span class="TreeLabel TreeLabelName">
|
|
864
|
-
<span class="rioglyph rioglyph-
|
|
962
|
+
<span class="rioglyph rioglyph-van">
|
|
865
963
|
</span>
|
|
866
964
|
<span class="TreeLabelNameText">
|
|
867
|
-
<span class="TreeLabelNameTextHeadline">N18-
|
|
965
|
+
<span class="TreeLabelNameTextHeadline">N18-G976 / M-AN 1004</span>
|
|
868
966
|
</span>
|
|
869
967
|
</span>
|
|
870
968
|
</div>
|
|
@@ -875,7 +973,7 @@ export default AssetTreeSingleSelectExample;
|
|
|
875
973
|
<span class="TreeLabelNameText">
|
|
876
974
|
<span class="TreeLabelNameTextHeadline">Truck Group South</span>
|
|
877
975
|
</span>
|
|
878
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
976
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">3</span>
|
|
879
977
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
880
978
|
</span>
|
|
881
979
|
</span>
|
|
@@ -887,7 +985,7 @@ export default AssetTreeSingleSelectExample;
|
|
|
887
985
|
<span class="TreeLabelNameText">
|
|
888
986
|
<span class="TreeLabelNameTextHeadline">Truck Group West</span>
|
|
889
987
|
</span>
|
|
890
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
988
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">12</span>
|
|
891
989
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
892
990
|
</span>
|
|
893
991
|
</span>
|
|
@@ -899,7 +997,7 @@ export default AssetTreeSingleSelectExample;
|
|
|
899
997
|
<span class="TreeLabelNameText">
|
|
900
998
|
<span class="TreeLabelNameTextHeadline">All my unassigned Trucks</span>
|
|
901
999
|
</span>
|
|
902
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
1000
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">5</span>
|
|
903
1001
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
904
1002
|
</span>
|
|
905
1003
|
</span>
|
|
@@ -940,33 +1038,177 @@ export default AssetTreeSingleSelectExample;
|
|
|
940
1038
|
</div>
|
|
941
1039
|
```
|
|
942
1040
|
|
|
1041
|
+
#### Props: AssetTree
|
|
1042
|
+
|
|
1043
|
+
### AssetTree
|
|
1044
|
+
|
|
1045
|
+
| Name | Type | Default | Description |
|
|
1046
|
+
| --- | --- | --- | --- |
|
|
1047
|
+
| fly | boolean | false | Defines if the component will overlap the body content. |
|
|
1048
|
+
| resizable | boolean | true | Defines whether or not the sidebar is resizable. |
|
|
1049
|
+
| bordered | boolean | false | Defines whether the component has a border or not. |
|
|
1050
|
+
| width | number | 350 | Defines the width of the component. The value is set as inline style. Note: when component is resizable it will take the provided width in px only and convert it to number in case. |
|
|
1051
|
+
| minWidth | number | 100 | Defines the minimum width of the component in px that will take effect when resizing. |
|
|
1052
|
+
| maxWidth | number | 0 | Defines the maximum width of the component in px that will take effect when resizing. |
|
|
1053
|
+
| height | number | — | Defines the height of the component in px. |
|
|
1054
|
+
| isOpen | boolean | true | Defines whether the component is open or not. |
|
|
1055
|
+
| onToggleTree | (isOpen: boolean) => void | () => {} | Callback for when the tree visibility is toggled. |
|
|
1056
|
+
| currentCategoryId | string | — | The id of the category which is currently active and shall be shown. |
|
|
1057
|
+
| onCategoryChange | (selectedCategoryId: string) => void | () => {} | Callback for handling change of category. |
|
|
1058
|
+
| onResizeEnd | VoidFunction | () => {} | Callback for when the resize is done. |
|
|
1059
|
+
| useOffscreen | boolean | false | Defines whether the tree components are rendered offscreen and kept mounted in the DOM. |
|
|
1060
|
+
| className | string | — | Additional classes added on the wrapper element. |
|
|
1061
|
+
|
|
1062
|
+
#### Props: TreeCategory
|
|
1063
|
+
|
|
1064
|
+
### TreeCategory
|
|
1065
|
+
|
|
1066
|
+
| Name | Type | Default | Description |
|
|
1067
|
+
| --- | --- | --- | --- |
|
|
1068
|
+
| id | string | — | A unique identifier for that category. |
|
|
1069
|
+
| icon | string | — | The rioglyph icon name for that category. |
|
|
1070
|
+
| label | string \| React.ReactNode | — | The optional label for the category which will be shown in a tooltip. |
|
|
1071
|
+
| hasSelection | boolean | — | Defines whether or not a selection indicator should be shown. |
|
|
1072
|
+
|
|
1073
|
+
#### Props: Tree
|
|
1074
|
+
|
|
1075
|
+
### Tree
|
|
1076
|
+
|
|
1077
|
+
| Name | Type | Default | Description |
|
|
1078
|
+
| --- | --- | --- | --- |
|
|
1079
|
+
| groups | TreeGroup[] | [] | The list of groups of the items. If no groups are provided all items are rendered as flat list. |
|
|
1080
|
+
| └id | string | — | A unique identifier of a group. |
|
|
1081
|
+
| └name | string \| React.ReactNode | — | The name of a group. |
|
|
1082
|
+
| └position | 'last' | — | Can be set to "last" to enforce the last position in the tree. |
|
|
1083
|
+
| └disabled | boolean | — | Disallows the selection of the group itself. |
|
|
1084
|
+
| └icon | string | — | The rioglyph icon name for a group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
1085
|
+
| └expandedIcon | string | — | The rioglyph icon name for a expanded group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
1086
|
+
| └className | string | — | Additional classes added to the group element. |
|
|
1087
|
+
| items | TreeItem[] | [] | The list of items. |
|
|
1088
|
+
| └id | string | — | A unique identifier of an item. |
|
|
1089
|
+
| └name | string \| TreeItemName | — | The name of an item. Either it is a plain string or an object composed of: firstName and lastName where lastName is mandatory. |
|
|
1090
|
+
| └info | string \| React.ReactNode | — | The subline of an item. This can e used to show additional information for that item. |
|
|
1091
|
+
| └type | string | — | The primary type of the item. This is also used as the fallback icon name and refers to the name of the respective rioglyph icon (excluding the rioglyph- prefix). |
|
|
1092
|
+
| └icon | string \| null | — | Optional icon override for the item. If set to a string (e.g. 'truck'), this icon will be used explicitly. If set to undefined, the type property will be used as the fallback icon. If set to null, no icon will be rendered, even if type is defined. This allows full control over the icon behavior while maintaining backward compatibility with type-based icons. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
1093
|
+
| └subType | string | — | Optional sub-type of the item. This refers to the name of an additional rioglyph icon (excluding the rioglyph- prefix), typically used to render a secondary icon next to the primary one (Note: for fuel types better use the pairIcon prop). |
|
|
1094
|
+
| └pairIcon | string \| null \| undefined | — | Optional pair icon override for the subType. If set to a string (e.g. 'fuel-gas'), this icon will be used explicitly. If set to undefined, the subType property will be used as the fallback icon. If set to null, no icon will be rendered, even if subType is defined. This allows full control over the icon behavior while maintaining backward compatibility with subType-based icons. |
|
|
1095
|
+
| └groupIds | string[] | [] | List of group ids the items is associated with. |
|
|
1096
|
+
| └className | string | — | Additional classes added to the item element. |
|
|
1097
|
+
| selectedGroups | string[] | [] | List of selected group ids. |
|
|
1098
|
+
| selectedItems | string[] | [] | List of selected item ids. |
|
|
1099
|
+
| onSelectionChange | ({ items, groups }: SelectionChangeResponse) => void | — | Merged Callback for item and group selection changes. It responds with a selection object that contains the selected itemIds and groupIds: { items: [], groups: [] } |
|
|
1100
|
+
| hasMultiselect | boolean | true | Defines the selection behavior of the tree. |
|
|
1101
|
+
| showRadioButtons | boolean | false | Defines if the single selection should also show radios. |
|
|
1102
|
+
| hideSearch | boolean | false | Defines whether or not the built-in Search is shown. |
|
|
1103
|
+
| searchPlaceholder | string | — | The text used as placeholder for the search input. |
|
|
1104
|
+
| onSearchChange | (value: string) => void | — | Callback for when the search value changes. |
|
|
1105
|
+
| search | React.ReactNode | — | Used to define custom search component which replaces the built-in search. |
|
|
1106
|
+
| summary | React.ReactNode | — | Used to define custom asset type counter component which replaces the built-in summary. |
|
|
1107
|
+
| hideSummary | boolean | false | Defines whether a summary is shown. |
|
|
1108
|
+
| onTypeFilterChange | (currentTypes: string[]) => void | — | Callback triggered when the built-in asset type filter changes. This is only available when the default summary is used. |
|
|
1109
|
+
| hideTreeHead | boolean | false | Defines whether the entire area below the search field is shown or not. Note: Disabling the tree head will hide the select all checkbox and the tree options as well as the tree summary. |
|
|
1110
|
+
| treeHeaderContent | React.ReactElement | — | Additional custom content that is rendered at the top of the tree component. This can be used for nav pills. |
|
|
1111
|
+
| scrollHeight | number | — | Defines the max-height of the scrollable list. |
|
|
1112
|
+
| expandedGroups | string[] | — | List of group ids which are expanded. |
|
|
1113
|
+
| onExpandGroupsChange | (newExpandedGroups: string[]) => void | — | Callback function triggered when a group expands or collapses. |
|
|
1114
|
+
| showEmptyGroups | boolean | true | Defines whether empty groups are shown or not. |
|
|
1115
|
+
| treeOptions | React.ReactNode[] | — | Component to offer customization options for the tree. |
|
|
1116
|
+
| treeOptionsTooltip | React.ReactNode | — | Tooltip content for the tree options dropdown. |
|
|
1117
|
+
| disableAnimation | boolean | false | Disables animation when filtering or using search |
|
|
1118
|
+
| virtualizeThreshold | number | 50 | The number of items (including groups and children) used for virtualizing the tree. |
|
|
1119
|
+
| overscan | number | 5 | The number of items rendered beyond the visible area of a virtualized tree. |
|
|
1120
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
1121
|
+
|
|
1122
|
+
#### Props: TreeSearch
|
|
1123
|
+
|
|
1124
|
+
### TreeSearch
|
|
1125
|
+
|
|
1126
|
+
| Name | Type | Default | Description |
|
|
1127
|
+
| --- | --- | --- | --- |
|
|
1128
|
+
| value | string | — | The search value to be shown and used for the search. |
|
|
1129
|
+
| onChange | (newValue: string, event: React.ChangeEvent \| React.MouseEvent) => void | () => {} | Callback for when the search value changes. |
|
|
1130
|
+
| placeholder | string | — | The placeholder text used for the input field. |
|
|
1131
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
1132
|
+
|
|
1133
|
+
#### Props: TreeSummary
|
|
1134
|
+
|
|
1135
|
+
### TreeSummary
|
|
1136
|
+
|
|
1137
|
+
| Name | Type | Default | Description |
|
|
1138
|
+
| --- | --- | --- | --- |
|
|
1139
|
+
| assetCounts | TreeSummaryCounts | — | The object containing various asset type counter. |
|
|
1140
|
+
| └truck | number | — | The amount of trucks |
|
|
1141
|
+
| └trailer | number | — | The amount of trailers |
|
|
1142
|
+
| └bus | number | — | The amount of buses |
|
|
1143
|
+
| └van | number | — | The amount of vans |
|
|
1144
|
+
| └car | number | — | The amount of cars |
|
|
1145
|
+
| └driver | number | — | The amount of drivers |
|
|
1146
|
+
| gridCols | number | 4 | The number of grid columns used for the built-in TreeSummaryRow. |
|
|
1147
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
1148
|
+
|
|
1149
|
+
#### Props: TreeSummaryRow
|
|
1150
|
+
|
|
1151
|
+
### TreeSummaryRow
|
|
1152
|
+
|
|
1153
|
+
| Name | Type | Default | Description |
|
|
1154
|
+
| --- | --- | --- | --- |
|
|
1155
|
+
| gridCols | number | 4 | Defined the number of grid columns for a single row. Note, when the amount of children exceed the columns it will wrap around to a new line. |
|
|
1156
|
+
|
|
1157
|
+
#### Props: TypeCounter
|
|
1158
|
+
|
|
1159
|
+
### TypeCounter
|
|
1160
|
+
|
|
1161
|
+
| Name | Type | Default | Description |
|
|
1162
|
+
| --- | --- | --- | --- |
|
|
1163
|
+
| type | string | — | The item type for that counter. This will be used as a return value for the onClick callback. |
|
|
1164
|
+
| icon | string | — | The icon name. Note, when using the built-in generic type counter, the icon name will the same as the item type. So make sure there is a corresponding icon for the defined type. |
|
|
1165
|
+
| isActive | boolean | — | Sets the active styling if active |
|
|
1166
|
+
| hasFilter | boolean | false | Should be set when there is a type filter set in the tree to style the counter accordingly. |
|
|
1167
|
+
| enableActivity | boolean | false | Allows for interactivity. Use this prop when you allow clicking on the counter. |
|
|
1168
|
+
| hideOnZero | boolean | false | Defines if the counter is rendered at all when the value is not defined ot 0. |
|
|
1169
|
+
| onClick | (type: string) => void | — | Callback function when the counter is clicked. It returns the type value. Make sure the "type" prop is defined to receive the value in the callback. |
|
|
1170
|
+
| value | string \| React.ReactNode \| number | — | A custom value to be shown in the counter. |
|
|
1171
|
+
|
|
1172
|
+
#### Props: TreeOption
|
|
1173
|
+
|
|
1174
|
+
### TreeOption
|
|
1175
|
+
|
|
1176
|
+
| Name | Type | Default | Description |
|
|
1177
|
+
| --- | --- | --- | --- |
|
|
1178
|
+
| isChecked | boolean | false | Defines whether the option is set. |
|
|
1179
|
+
| onChange | (event: React.MouseEvent<HTMLDivElement>) => void | — | Callback triggered when option is selected. |
|
|
1180
|
+
| label | string \| React.ReactNode | — | The label for the option. |
|
|
1181
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
1182
|
+
|
|
943
1183
|
## AssetTree with multiple asset filter in summary
|
|
944
1184
|
|
|
945
1185
|
### Example: Example 3
|
|
946
1186
|
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
1187
|
+
3
|
|
1188
|
+
3
|
|
1189
|
+
7
|
|
950
1190
|
7
|
|
951
1191
|
|
|
952
|
-
|
|
1192
|
+
5
|
|
953
1193
|
5
|
|
954
1194
|
2
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
Mixed Vehicles9
|
|
959
|
-
Vehicle-2340Debug: cng
|
|
960
|
-
Vehicle-3222Debug: electric
|
|
961
|
-
Vehicle-3383Debug: heavy_fuel_oil
|
|
962
|
-
Vehicle-3519Debug: lpg
|
|
963
|
-
Vehicle-3837Debug: gas
|
|
964
|
-
Vehicle-4670Debug: dual_fuel_diesel_cng
|
|
965
|
-
Vehicle-6233Debug: cng
|
|
966
|
-
Vehicle-7297Debug: electric
|
|
967
|
-
Vehicle-8794Debug: dual_fuel_diesel_cng
|
|
1195
|
+
4
|
|
1196
|
+
4
|
|
968
1197
|
|
|
969
|
-
|
|
1198
|
+
Mixed Vehicles11
|
|
1199
|
+
Vehicle-1411Debug: lpg
|
|
1200
|
+
Vehicle-3190Debug: diesel
|
|
1201
|
+
Vehicle-3484Debug: heavy_fuel_oil
|
|
1202
|
+
Vehicle-3817Debug: lpg
|
|
1203
|
+
Vehicle-4527Debug: dual_fuel_diesel_cng
|
|
1204
|
+
Vehicle-4730Debug: dual_fuel_diesel_cng
|
|
1205
|
+
Vehicle-4965Debug: hydrogen
|
|
1206
|
+
Vehicle-5906Debug: dual_fuel_diesel_cng
|
|
1207
|
+
Vehicle-6102Debug: cng
|
|
1208
|
+
Vehicle-7127Debug: cng
|
|
1209
|
+
Vehicle-7953Debug: electric
|
|
1210
|
+
|
|
1211
|
+
Ungrouped9
|
|
970
1212
|
|
|
971
1213
|
Selected groups:
|
|
972
1214
|
|
|
@@ -977,29 +1219,31 @@ Mixed Vehicles
|
|
|
977
1219
|
|
|
978
1220
|
#### Summary
|
|
979
1221
|
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1222
|
+
3
|
|
1223
|
+
3
|
|
1224
|
+
7
|
|
983
1225
|
7
|
|
984
1226
|
|
|
985
|
-
|
|
1227
|
+
5
|
|
986
1228
|
5
|
|
987
1229
|
2
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
Mixed Vehicles9
|
|
992
|
-
Vehicle-2340Debug: cng
|
|
993
|
-
Vehicle-3222Debug: electric
|
|
994
|
-
Vehicle-3383Debug: heavy_fuel_oil
|
|
995
|
-
Vehicle-3519Debug: lpg
|
|
996
|
-
Vehicle-3837Debug: gas
|
|
997
|
-
Vehicle-4670Debug: dual_fuel_diesel_cng
|
|
998
|
-
Vehicle-6233Debug: cng
|
|
999
|
-
Vehicle-7297Debug: electric
|
|
1000
|
-
Vehicle-8794Debug: dual_fuel_diesel_cng
|
|
1230
|
+
4
|
|
1231
|
+
4
|
|
1001
1232
|
|
|
1002
|
-
|
|
1233
|
+
Mixed Vehicles11
|
|
1234
|
+
Vehicle-1411Debug: lpg
|
|
1235
|
+
Vehicle-3190Debug: diesel
|
|
1236
|
+
Vehicle-3484Debug: heavy_fuel_oil
|
|
1237
|
+
Vehicle-3817Debug: lpg
|
|
1238
|
+
Vehicle-4527Debug: dual_fuel_diesel_cng
|
|
1239
|
+
Vehicle-4730Debug: dual_fuel_diesel_cng
|
|
1240
|
+
Vehicle-4965Debug: hydrogen
|
|
1241
|
+
Vehicle-5906Debug: dual_fuel_diesel_cng
|
|
1242
|
+
Vehicle-6102Debug: cng
|
|
1243
|
+
Vehicle-7127Debug: cng
|
|
1244
|
+
Vehicle-7953Debug: electric
|
|
1245
|
+
|
|
1246
|
+
Ungrouped9
|
|
1003
1247
|
|
|
1004
1248
|
Selected groups:
|
|
1005
1249
|
|
|
@@ -1334,17 +1578,17 @@ export default AssetTreeExample;
|
|
|
1334
1578
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1335
1579
|
<span class="rioglyph rioglyph-truck-baseline text-size-16 margin-right-2">
|
|
1336
1580
|
</span>
|
|
1337
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
1581
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">3</span>
|
|
1338
1582
|
</div>
|
|
1339
1583
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1340
1584
|
<span class="rioglyph rioglyph-bus-baseline text-size-16 margin-right-2">
|
|
1341
1585
|
</span>
|
|
1342
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
1586
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">3</span>
|
|
1343
1587
|
</div>
|
|
1344
1588
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1345
1589
|
<span class="rioglyph rioglyph-van-baseline text-size-16 margin-right-2">
|
|
1346
1590
|
</span>
|
|
1347
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
1591
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">7</span>
|
|
1348
1592
|
</div>
|
|
1349
1593
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1350
1594
|
<span class="rioglyph rioglyph-car-baseline text-size-16 margin-right-2">
|
|
@@ -1356,7 +1600,7 @@ export default AssetTreeExample;
|
|
|
1356
1600
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1357
1601
|
<span class="rioglyph rioglyph-fuel-liquid text-size-16 margin-right-2">
|
|
1358
1602
|
</span>
|
|
1359
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
1603
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">5</span>
|
|
1360
1604
|
</div>
|
|
1361
1605
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1362
1606
|
<span class="rioglyph rioglyph-fuel-gas text-size-16 margin-right-2">
|
|
@@ -1371,19 +1615,19 @@ export default AssetTreeExample;
|
|
|
1371
1615
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1372
1616
|
<span class="rioglyph rioglyph-fuel-hydrogen text-size-16 margin-right-2">
|
|
1373
1617
|
</span>
|
|
1374
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
1618
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">4</span>
|
|
1375
1619
|
</div>
|
|
1376
1620
|
<div class="TypeCounter display-flex align-items-center user-select-none margin-right-2 cursor-pointer">
|
|
1377
1621
|
<span class="rioglyph rioglyph-fuel-mix text-size-16 margin-right-2">
|
|
1378
1622
|
</span>
|
|
1379
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">
|
|
1623
|
+
<span class="TreeLabelCount label label-condensed label-muted label-filled">4</span>
|
|
1380
1624
|
</div>
|
|
1381
1625
|
</div>
|
|
1382
1626
|
</div>
|
|
1383
1627
|
</div>
|
|
1384
1628
|
<div>
|
|
1385
1629
|
<div class="dropdown btn-group TreeHeaderOptions height-20">
|
|
1386
|
-
<button type="button" id="
|
|
1630
|
+
<button type="button" id="yqw22j3rtv" class="btn btn-default btn-sm btn-icon-only btn-component dropdown-toggle hover-bg-white border-none text-color-gray hover-text-color-dark" tabindex="0">
|
|
1387
1631
|
<span class="rioglyph rioglyph-option-vertical" aria-hidden="true">
|
|
1388
1632
|
</span>
|
|
1389
1633
|
</button>
|
|
@@ -1403,12 +1647,12 @@ export default AssetTreeExample;
|
|
|
1403
1647
|
<span class="TreeLabelNameText">
|
|
1404
1648
|
<span class="TreeLabelNameTextHeadline">Mixed Vehicles</span>
|
|
1405
1649
|
</span>
|
|
1406
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
1650
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">11</span>
|
|
1407
1651
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
1408
1652
|
</span>
|
|
1409
1653
|
</span>
|
|
1410
1654
|
</div>
|
|
1411
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1655
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d974">
|
|
1412
1656
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1413
1657
|
<input type="checkbox" class="TreeCheckbox">
|
|
1414
1658
|
<span class="checkbox-text">
|
|
@@ -1416,20 +1660,20 @@ export default AssetTreeExample;
|
|
|
1416
1660
|
</label>
|
|
1417
1661
|
<span class="TreeLabel TreeLabelName">
|
|
1418
1662
|
<span class="rioglyph-icon-pair">
|
|
1419
|
-
<span class="rioglyph rioglyph-
|
|
1663
|
+
<span class="rioglyph rioglyph-car">
|
|
1420
1664
|
</span>
|
|
1421
1665
|
<span class="rioglyph rioglyph-fuel-gas">
|
|
1422
1666
|
</span>
|
|
1423
1667
|
</span>
|
|
1424
1668
|
<span class="TreeLabelNameText">
|
|
1425
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1669
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-1411</span>
|
|
1426
1670
|
<span class="TreeLabelNameTextSubline">
|
|
1427
|
-
<span>Debug:
|
|
1671
|
+
<span>Debug: lpg</span>
|
|
1428
1672
|
</span>
|
|
1429
1673
|
</span>
|
|
1430
1674
|
</span>
|
|
1431
1675
|
</div>
|
|
1432
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1676
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9712">
|
|
1433
1677
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1434
1678
|
<input type="checkbox" class="TreeCheckbox">
|
|
1435
1679
|
<span class="checkbox-text">
|
|
@@ -1437,20 +1681,20 @@ export default AssetTreeExample;
|
|
|
1437
1681
|
</label>
|
|
1438
1682
|
<span class="TreeLabel TreeLabelName">
|
|
1439
1683
|
<span class="rioglyph-icon-pair">
|
|
1440
|
-
<span class="rioglyph rioglyph-
|
|
1684
|
+
<span class="rioglyph rioglyph-bus">
|
|
1441
1685
|
</span>
|
|
1442
|
-
<span class="rioglyph rioglyph-fuel-
|
|
1686
|
+
<span class="rioglyph rioglyph-fuel-liquid">
|
|
1443
1687
|
</span>
|
|
1444
1688
|
</span>
|
|
1445
1689
|
<span class="TreeLabelNameText">
|
|
1446
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1690
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-3190</span>
|
|
1447
1691
|
<span class="TreeLabelNameTextSubline">
|
|
1448
|
-
<span>Debug:
|
|
1692
|
+
<span>Debug: diesel</span>
|
|
1449
1693
|
</span>
|
|
1450
1694
|
</span>
|
|
1451
1695
|
</span>
|
|
1452
1696
|
</div>
|
|
1453
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1697
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d979">
|
|
1454
1698
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1455
1699
|
<input type="checkbox" class="TreeCheckbox">
|
|
1456
1700
|
<span class="checkbox-text">
|
|
@@ -1458,20 +1702,20 @@ export default AssetTreeExample;
|
|
|
1458
1702
|
</label>
|
|
1459
1703
|
<span class="TreeLabel TreeLabelName">
|
|
1460
1704
|
<span class="rioglyph-icon-pair">
|
|
1461
|
-
<span class="rioglyph rioglyph-
|
|
1705
|
+
<span class="rioglyph rioglyph-car">
|
|
1462
1706
|
</span>
|
|
1463
1707
|
<span class="rioglyph rioglyph-fuel-liquid">
|
|
1464
1708
|
</span>
|
|
1465
1709
|
</span>
|
|
1466
1710
|
<span class="TreeLabelNameText">
|
|
1467
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1711
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-3484</span>
|
|
1468
1712
|
<span class="TreeLabelNameTextSubline">
|
|
1469
1713
|
<span>Debug: heavy_fuel_oil</span>
|
|
1470
1714
|
</span>
|
|
1471
1715
|
</span>
|
|
1472
1716
|
</span>
|
|
1473
1717
|
</div>
|
|
1474
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1718
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d973">
|
|
1475
1719
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1476
1720
|
<input type="checkbox" class="TreeCheckbox">
|
|
1477
1721
|
<span class="checkbox-text">
|
|
@@ -1479,20 +1723,20 @@ export default AssetTreeExample;
|
|
|
1479
1723
|
</label>
|
|
1480
1724
|
<span class="TreeLabel TreeLabelName">
|
|
1481
1725
|
<span class="rioglyph-icon-pair">
|
|
1482
|
-
<span class="rioglyph rioglyph-
|
|
1726
|
+
<span class="rioglyph rioglyph-car">
|
|
1483
1727
|
</span>
|
|
1484
1728
|
<span class="rioglyph rioglyph-fuel-gas">
|
|
1485
1729
|
</span>
|
|
1486
1730
|
</span>
|
|
1487
1731
|
<span class="TreeLabelNameText">
|
|
1488
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1732
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-3817</span>
|
|
1489
1733
|
<span class="TreeLabelNameTextSubline">
|
|
1490
1734
|
<span>Debug: lpg</span>
|
|
1491
1735
|
</span>
|
|
1492
1736
|
</span>
|
|
1493
1737
|
</span>
|
|
1494
1738
|
</div>
|
|
1495
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1739
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9719">
|
|
1496
1740
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1497
1741
|
<input type="checkbox" class="TreeCheckbox">
|
|
1498
1742
|
<span class="checkbox-text">
|
|
@@ -1500,20 +1744,20 @@ export default AssetTreeExample;
|
|
|
1500
1744
|
</label>
|
|
1501
1745
|
<span class="TreeLabel TreeLabelName">
|
|
1502
1746
|
<span class="rioglyph-icon-pair">
|
|
1503
|
-
<span class="rioglyph rioglyph-
|
|
1747
|
+
<span class="rioglyph rioglyph-van">
|
|
1504
1748
|
</span>
|
|
1505
|
-
<span class="rioglyph rioglyph-fuel-
|
|
1749
|
+
<span class="rioglyph rioglyph-fuel-mix">
|
|
1506
1750
|
</span>
|
|
1507
1751
|
</span>
|
|
1508
1752
|
<span class="TreeLabelNameText">
|
|
1509
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1753
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-4527</span>
|
|
1510
1754
|
<span class="TreeLabelNameTextSubline">
|
|
1511
|
-
<span>Debug:
|
|
1755
|
+
<span>Debug: dual_fuel_diesel_cng</span>
|
|
1512
1756
|
</span>
|
|
1513
1757
|
</span>
|
|
1514
1758
|
</span>
|
|
1515
1759
|
</div>
|
|
1516
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1760
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d975">
|
|
1517
1761
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1518
1762
|
<input type="checkbox" class="TreeCheckbox">
|
|
1519
1763
|
<span class="checkbox-text">
|
|
@@ -1521,20 +1765,62 @@ export default AssetTreeExample;
|
|
|
1521
1765
|
</label>
|
|
1522
1766
|
<span class="TreeLabel TreeLabelName">
|
|
1523
1767
|
<span class="rioglyph-icon-pair">
|
|
1524
|
-
<span class="rioglyph rioglyph-
|
|
1768
|
+
<span class="rioglyph rioglyph-car">
|
|
1769
|
+
</span>
|
|
1770
|
+
<span class="rioglyph rioglyph-fuel-mix">
|
|
1771
|
+
</span>
|
|
1772
|
+
</span>
|
|
1773
|
+
<span class="TreeLabelNameText">
|
|
1774
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-4730</span>
|
|
1775
|
+
<span class="TreeLabelNameTextSubline">
|
|
1776
|
+
<span>Debug: dual_fuel_diesel_cng</span>
|
|
1777
|
+
</span>
|
|
1778
|
+
</span>
|
|
1779
|
+
</span>
|
|
1780
|
+
</div>
|
|
1781
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d972">
|
|
1782
|
+
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1783
|
+
<input type="checkbox" class="TreeCheckbox">
|
|
1784
|
+
<span class="checkbox-text">
|
|
1785
|
+
</span>
|
|
1786
|
+
</label>
|
|
1787
|
+
<span class="TreeLabel TreeLabelName">
|
|
1788
|
+
<span class="rioglyph-icon-pair">
|
|
1789
|
+
<span class="rioglyph rioglyph-van">
|
|
1790
|
+
</span>
|
|
1791
|
+
<span class="rioglyph rioglyph-fuel-hydrogen">
|
|
1792
|
+
</span>
|
|
1793
|
+
</span>
|
|
1794
|
+
<span class="TreeLabelNameText">
|
|
1795
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-4965</span>
|
|
1796
|
+
<span class="TreeLabelNameTextSubline">
|
|
1797
|
+
<span>Debug: hydrogen</span>
|
|
1798
|
+
</span>
|
|
1799
|
+
</span>
|
|
1800
|
+
</span>
|
|
1801
|
+
</div>
|
|
1802
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d970">
|
|
1803
|
+
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1804
|
+
<input type="checkbox" class="TreeCheckbox">
|
|
1805
|
+
<span class="checkbox-text">
|
|
1806
|
+
</span>
|
|
1807
|
+
</label>
|
|
1808
|
+
<span class="TreeLabel TreeLabelName">
|
|
1809
|
+
<span class="rioglyph-icon-pair">
|
|
1810
|
+
<span class="rioglyph rioglyph-van">
|
|
1525
1811
|
</span>
|
|
1526
1812
|
<span class="rioglyph rioglyph-fuel-mix">
|
|
1527
1813
|
</span>
|
|
1528
1814
|
</span>
|
|
1529
1815
|
<span class="TreeLabelNameText">
|
|
1530
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1816
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-5906</span>
|
|
1531
1817
|
<span class="TreeLabelNameTextSubline">
|
|
1532
1818
|
<span>Debug: dual_fuel_diesel_cng</span>
|
|
1533
1819
|
</span>
|
|
1534
1820
|
</span>
|
|
1535
1821
|
</span>
|
|
1536
1822
|
</div>
|
|
1537
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1823
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9718">
|
|
1538
1824
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1539
1825
|
<input type="checkbox" class="TreeCheckbox">
|
|
1540
1826
|
<span class="checkbox-text">
|
|
@@ -1548,14 +1834,14 @@ export default AssetTreeExample;
|
|
|
1548
1834
|
</span>
|
|
1549
1835
|
</span>
|
|
1550
1836
|
<span class="TreeLabelNameText">
|
|
1551
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1837
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-6102</span>
|
|
1552
1838
|
<span class="TreeLabelNameTextSubline">
|
|
1553
1839
|
<span>Debug: cng</span>
|
|
1554
1840
|
</span>
|
|
1555
1841
|
</span>
|
|
1556
1842
|
</span>
|
|
1557
1843
|
</div>
|
|
1558
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1844
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d971">
|
|
1559
1845
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1560
1846
|
<input type="checkbox" class="TreeCheckbox">
|
|
1561
1847
|
<span class="checkbox-text">
|
|
@@ -1563,20 +1849,20 @@ export default AssetTreeExample;
|
|
|
1563
1849
|
</label>
|
|
1564
1850
|
<span class="TreeLabel TreeLabelName">
|
|
1565
1851
|
<span class="rioglyph-icon-pair">
|
|
1566
|
-
<span class="rioglyph rioglyph-
|
|
1852
|
+
<span class="rioglyph rioglyph-van">
|
|
1567
1853
|
</span>
|
|
1568
|
-
<span class="rioglyph rioglyph-fuel-
|
|
1854
|
+
<span class="rioglyph rioglyph-fuel-gas">
|
|
1569
1855
|
</span>
|
|
1570
1856
|
</span>
|
|
1571
1857
|
<span class="TreeLabelNameText">
|
|
1572
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1858
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-7127</span>
|
|
1573
1859
|
<span class="TreeLabelNameTextSubline">
|
|
1574
|
-
<span>Debug:
|
|
1860
|
+
<span>Debug: cng</span>
|
|
1575
1861
|
</span>
|
|
1576
1862
|
</span>
|
|
1577
1863
|
</span>
|
|
1578
1864
|
</div>
|
|
1579
|
-
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-
|
|
1865
|
+
<div class="TreeLeaf form-group margin-bottom-0" data-key="010191ac-d06d-4567-b13a-7b7fd85d9710">
|
|
1580
1866
|
<label class="checkbox TreeCheckbox" tabindex="0">
|
|
1581
1867
|
<input type="checkbox" class="TreeCheckbox">
|
|
1582
1868
|
<span class="checkbox-text">
|
|
@@ -1584,15 +1870,15 @@ export default AssetTreeExample;
|
|
|
1584
1870
|
</label>
|
|
1585
1871
|
<span class="TreeLabel TreeLabelName">
|
|
1586
1872
|
<span class="rioglyph-icon-pair">
|
|
1587
|
-
<span class="rioglyph rioglyph-
|
|
1873
|
+
<span class="rioglyph rioglyph-truck">
|
|
1588
1874
|
</span>
|
|
1589
|
-
<span class="rioglyph rioglyph-fuel-
|
|
1875
|
+
<span class="rioglyph rioglyph-fuel-electric">
|
|
1590
1876
|
</span>
|
|
1591
1877
|
</span>
|
|
1592
1878
|
<span class="TreeLabelNameText">
|
|
1593
|
-
<span class="TreeLabelNameTextHeadline">Vehicle-
|
|
1879
|
+
<span class="TreeLabelNameTextHeadline">Vehicle-7953</span>
|
|
1594
1880
|
<span class="TreeLabelNameTextSubline">
|
|
1595
|
-
<span>Debug:
|
|
1881
|
+
<span>Debug: electric</span>
|
|
1596
1882
|
</span>
|
|
1597
1883
|
</span>
|
|
1598
1884
|
</span>
|
|
@@ -1609,7 +1895,7 @@ export default AssetTreeExample;
|
|
|
1609
1895
|
<span class="TreeLabelNameText">
|
|
1610
1896
|
<span class="TreeLabelNameTextHeadline">Ungrouped</span>
|
|
1611
1897
|
</span>
|
|
1612
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
1898
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">9</span>
|
|
1613
1899
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
1614
1900
|
</span>
|
|
1615
1901
|
</span>
|
|
@@ -1648,6 +1934,148 @@ export default AssetTreeExample;
|
|
|
1648
1934
|
</div>
|
|
1649
1935
|
```
|
|
1650
1936
|
|
|
1937
|
+
#### Props: AssetTree
|
|
1938
|
+
|
|
1939
|
+
### AssetTree
|
|
1940
|
+
|
|
1941
|
+
| Name | Type | Default | Description |
|
|
1942
|
+
| --- | --- | --- | --- |
|
|
1943
|
+
| fly | boolean | false | Defines if the component will overlap the body content. |
|
|
1944
|
+
| resizable | boolean | true | Defines whether or not the sidebar is resizable. |
|
|
1945
|
+
| bordered | boolean | false | Defines whether the component has a border or not. |
|
|
1946
|
+
| width | number | 350 | Defines the width of the component. The value is set as inline style. Note: when component is resizable it will take the provided width in px only and convert it to number in case. |
|
|
1947
|
+
| minWidth | number | 100 | Defines the minimum width of the component in px that will take effect when resizing. |
|
|
1948
|
+
| maxWidth | number | 0 | Defines the maximum width of the component in px that will take effect when resizing. |
|
|
1949
|
+
| height | number | — | Defines the height of the component in px. |
|
|
1950
|
+
| isOpen | boolean | true | Defines whether the component is open or not. |
|
|
1951
|
+
| onToggleTree | (isOpen: boolean) => void | () => {} | Callback for when the tree visibility is toggled. |
|
|
1952
|
+
| currentCategoryId | string | — | The id of the category which is currently active and shall be shown. |
|
|
1953
|
+
| onCategoryChange | (selectedCategoryId: string) => void | () => {} | Callback for handling change of category. |
|
|
1954
|
+
| onResizeEnd | VoidFunction | () => {} | Callback for when the resize is done. |
|
|
1955
|
+
| useOffscreen | boolean | false | Defines whether the tree components are rendered offscreen and kept mounted in the DOM. |
|
|
1956
|
+
| className | string | — | Additional classes added on the wrapper element. |
|
|
1957
|
+
|
|
1958
|
+
#### Props: TreeCategory
|
|
1959
|
+
|
|
1960
|
+
### TreeCategory
|
|
1961
|
+
|
|
1962
|
+
| Name | Type | Default | Description |
|
|
1963
|
+
| --- | --- | --- | --- |
|
|
1964
|
+
| id | string | — | A unique identifier for that category. |
|
|
1965
|
+
| icon | string | — | The rioglyph icon name for that category. |
|
|
1966
|
+
| label | string \| React.ReactNode | — | The optional label for the category which will be shown in a tooltip. |
|
|
1967
|
+
| hasSelection | boolean | — | Defines whether or not a selection indicator should be shown. |
|
|
1968
|
+
|
|
1969
|
+
#### Props: Tree
|
|
1970
|
+
|
|
1971
|
+
### Tree
|
|
1972
|
+
|
|
1973
|
+
| Name | Type | Default | Description |
|
|
1974
|
+
| --- | --- | --- | --- |
|
|
1975
|
+
| groups | TreeGroup[] | [] | The list of groups of the items. If no groups are provided all items are rendered as flat list. |
|
|
1976
|
+
| └id | string | — | A unique identifier of a group. |
|
|
1977
|
+
| └name | string \| React.ReactNode | — | The name of a group. |
|
|
1978
|
+
| └position | 'last' | — | Can be set to "last" to enforce the last position in the tree. |
|
|
1979
|
+
| └disabled | boolean | — | Disallows the selection of the group itself. |
|
|
1980
|
+
| └icon | string | — | The rioglyph icon name for a group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
1981
|
+
| └expandedIcon | string | — | The rioglyph icon name for a expanded group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
1982
|
+
| └className | string | — | Additional classes added to the group element. |
|
|
1983
|
+
| items | TreeItem[] | [] | The list of items. |
|
|
1984
|
+
| └id | string | — | A unique identifier of an item. |
|
|
1985
|
+
| └name | string \| TreeItemName | — | The name of an item. Either it is a plain string or an object composed of: firstName and lastName where lastName is mandatory. |
|
|
1986
|
+
| └info | string \| React.ReactNode | — | The subline of an item. This can e used to show additional information for that item. |
|
|
1987
|
+
| └type | string | — | The primary type of the item. This is also used as the fallback icon name and refers to the name of the respective rioglyph icon (excluding the rioglyph- prefix). |
|
|
1988
|
+
| └icon | string \| null | — | Optional icon override for the item. If set to a string (e.g. 'truck'), this icon will be used explicitly. If set to undefined, the type property will be used as the fallback icon. If set to null, no icon will be rendered, even if type is defined. This allows full control over the icon behavior while maintaining backward compatibility with type-based icons. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
1989
|
+
| └subType | string | — | Optional sub-type of the item. This refers to the name of an additional rioglyph icon (excluding the rioglyph- prefix), typically used to render a secondary icon next to the primary one (Note: for fuel types better use the pairIcon prop). |
|
|
1990
|
+
| └pairIcon | string \| null \| undefined | — | Optional pair icon override for the subType. If set to a string (e.g. 'fuel-gas'), this icon will be used explicitly. If set to undefined, the subType property will be used as the fallback icon. If set to null, no icon will be rendered, even if subType is defined. This allows full control over the icon behavior while maintaining backward compatibility with subType-based icons. |
|
|
1991
|
+
| └groupIds | string[] | [] | List of group ids the items is associated with. |
|
|
1992
|
+
| └className | string | — | Additional classes added to the item element. |
|
|
1993
|
+
| selectedGroups | string[] | [] | List of selected group ids. |
|
|
1994
|
+
| selectedItems | string[] | [] | List of selected item ids. |
|
|
1995
|
+
| onSelectionChange | ({ items, groups }: SelectionChangeResponse) => void | — | Merged Callback for item and group selection changes. It responds with a selection object that contains the selected itemIds and groupIds: { items: [], groups: [] } |
|
|
1996
|
+
| hasMultiselect | boolean | true | Defines the selection behavior of the tree. |
|
|
1997
|
+
| showRadioButtons | boolean | false | Defines if the single selection should also show radios. |
|
|
1998
|
+
| hideSearch | boolean | false | Defines whether or not the built-in Search is shown. |
|
|
1999
|
+
| searchPlaceholder | string | — | The text used as placeholder for the search input. |
|
|
2000
|
+
| onSearchChange | (value: string) => void | — | Callback for when the search value changes. |
|
|
2001
|
+
| search | React.ReactNode | — | Used to define custom search component which replaces the built-in search. |
|
|
2002
|
+
| summary | React.ReactNode | — | Used to define custom asset type counter component which replaces the built-in summary. |
|
|
2003
|
+
| hideSummary | boolean | false | Defines whether a summary is shown. |
|
|
2004
|
+
| onTypeFilterChange | (currentTypes: string[]) => void | — | Callback triggered when the built-in asset type filter changes. This is only available when the default summary is used. |
|
|
2005
|
+
| hideTreeHead | boolean | false | Defines whether the entire area below the search field is shown or not. Note: Disabling the tree head will hide the select all checkbox and the tree options as well as the tree summary. |
|
|
2006
|
+
| treeHeaderContent | React.ReactElement | — | Additional custom content that is rendered at the top of the tree component. This can be used for nav pills. |
|
|
2007
|
+
| scrollHeight | number | — | Defines the max-height of the scrollable list. |
|
|
2008
|
+
| expandedGroups | string[] | — | List of group ids which are expanded. |
|
|
2009
|
+
| onExpandGroupsChange | (newExpandedGroups: string[]) => void | — | Callback function triggered when a group expands or collapses. |
|
|
2010
|
+
| showEmptyGroups | boolean | true | Defines whether empty groups are shown or not. |
|
|
2011
|
+
| treeOptions | React.ReactNode[] | — | Component to offer customization options for the tree. |
|
|
2012
|
+
| treeOptionsTooltip | React.ReactNode | — | Tooltip content for the tree options dropdown. |
|
|
2013
|
+
| disableAnimation | boolean | false | Disables animation when filtering or using search |
|
|
2014
|
+
| virtualizeThreshold | number | 50 | The number of items (including groups and children) used for virtualizing the tree. |
|
|
2015
|
+
| overscan | number | 5 | The number of items rendered beyond the visible area of a virtualized tree. |
|
|
2016
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2017
|
+
|
|
2018
|
+
#### Props: TreeSearch
|
|
2019
|
+
|
|
2020
|
+
### TreeSearch
|
|
2021
|
+
|
|
2022
|
+
| Name | Type | Default | Description |
|
|
2023
|
+
| --- | --- | --- | --- |
|
|
2024
|
+
| value | string | — | The search value to be shown and used for the search. |
|
|
2025
|
+
| onChange | (newValue: string, event: React.ChangeEvent \| React.MouseEvent) => void | () => {} | Callback for when the search value changes. |
|
|
2026
|
+
| placeholder | string | — | The placeholder text used for the input field. |
|
|
2027
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2028
|
+
|
|
2029
|
+
#### Props: TreeSummary
|
|
2030
|
+
|
|
2031
|
+
### TreeSummary
|
|
2032
|
+
|
|
2033
|
+
| Name | Type | Default | Description |
|
|
2034
|
+
| --- | --- | --- | --- |
|
|
2035
|
+
| assetCounts | TreeSummaryCounts | — | The object containing various asset type counter. |
|
|
2036
|
+
| └truck | number | — | The amount of trucks |
|
|
2037
|
+
| └trailer | number | — | The amount of trailers |
|
|
2038
|
+
| └bus | number | — | The amount of buses |
|
|
2039
|
+
| └van | number | — | The amount of vans |
|
|
2040
|
+
| └car | number | — | The amount of cars |
|
|
2041
|
+
| └driver | number | — | The amount of drivers |
|
|
2042
|
+
| gridCols | number | 4 | The number of grid columns used for the built-in TreeSummaryRow. |
|
|
2043
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2044
|
+
|
|
2045
|
+
#### Props: TreeSummaryRow
|
|
2046
|
+
|
|
2047
|
+
### TreeSummaryRow
|
|
2048
|
+
|
|
2049
|
+
| Name | Type | Default | Description |
|
|
2050
|
+
| --- | --- | --- | --- |
|
|
2051
|
+
| gridCols | number | 4 | Defined the number of grid columns for a single row. Note, when the amount of children exceed the columns it will wrap around to a new line. |
|
|
2052
|
+
|
|
2053
|
+
#### Props: TypeCounter
|
|
2054
|
+
|
|
2055
|
+
### TypeCounter
|
|
2056
|
+
|
|
2057
|
+
| Name | Type | Default | Description |
|
|
2058
|
+
| --- | --- | --- | --- |
|
|
2059
|
+
| type | string | — | The item type for that counter. This will be used as a return value for the onClick callback. |
|
|
2060
|
+
| icon | string | — | The icon name. Note, when using the built-in generic type counter, the icon name will the same as the item type. So make sure there is a corresponding icon for the defined type. |
|
|
2061
|
+
| isActive | boolean | — | Sets the active styling if active |
|
|
2062
|
+
| hasFilter | boolean | false | Should be set when there is a type filter set in the tree to style the counter accordingly. |
|
|
2063
|
+
| enableActivity | boolean | false | Allows for interactivity. Use this prop when you allow clicking on the counter. |
|
|
2064
|
+
| hideOnZero | boolean | false | Defines if the counter is rendered at all when the value is not defined ot 0. |
|
|
2065
|
+
| onClick | (type: string) => void | — | Callback function when the counter is clicked. It returns the type value. Make sure the "type" prop is defined to receive the value in the callback. |
|
|
2066
|
+
| value | string \| React.ReactNode \| number | — | A custom value to be shown in the counter. |
|
|
2067
|
+
|
|
2068
|
+
#### Props: TreeOption
|
|
2069
|
+
|
|
2070
|
+
### TreeOption
|
|
2071
|
+
|
|
2072
|
+
| Name | Type | Default | Description |
|
|
2073
|
+
| --- | --- | --- | --- |
|
|
2074
|
+
| isChecked | boolean | false | Defines whether the option is set. |
|
|
2075
|
+
| onChange | (event: React.MouseEvent<HTMLDivElement>) => void | — | Callback triggered when option is selected. |
|
|
2076
|
+
| label | string \| React.ReactNode | — | The label for the option. |
|
|
2077
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2078
|
+
|
|
1651
2079
|
## AssetTree with custom summary
|
|
1652
2080
|
|
|
1653
2081
|
### Example: Some small dummy text at the bottom to showcase that you can put something here
|
|
@@ -1913,31 +2341,165 @@ export default AssetTreeWithCustomSummaryExample;
|
|
|
1913
2341
|
</div>
|
|
1914
2342
|
```
|
|
1915
2343
|
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
###
|
|
2344
|
+
#### Props: AssetTree
|
|
2345
|
+
|
|
2346
|
+
### AssetTree
|
|
2347
|
+
|
|
2348
|
+
| Name | Type | Default | Description |
|
|
2349
|
+
| --- | --- | --- | --- |
|
|
2350
|
+
| fly | boolean | false | Defines if the component will overlap the body content. |
|
|
2351
|
+
| resizable | boolean | true | Defines whether or not the sidebar is resizable. |
|
|
2352
|
+
| bordered | boolean | false | Defines whether the component has a border or not. |
|
|
2353
|
+
| width | number | 350 | Defines the width of the component. The value is set as inline style. Note: when component is resizable it will take the provided width in px only and convert it to number in case. |
|
|
2354
|
+
| minWidth | number | 100 | Defines the minimum width of the component in px that will take effect when resizing. |
|
|
2355
|
+
| maxWidth | number | 0 | Defines the maximum width of the component in px that will take effect when resizing. |
|
|
2356
|
+
| height | number | — | Defines the height of the component in px. |
|
|
2357
|
+
| isOpen | boolean | true | Defines whether the component is open or not. |
|
|
2358
|
+
| onToggleTree | (isOpen: boolean) => void | () => {} | Callback for when the tree visibility is toggled. |
|
|
2359
|
+
| currentCategoryId | string | — | The id of the category which is currently active and shall be shown. |
|
|
2360
|
+
| onCategoryChange | (selectedCategoryId: string) => void | () => {} | Callback for handling change of category. |
|
|
2361
|
+
| onResizeEnd | VoidFunction | () => {} | Callback for when the resize is done. |
|
|
2362
|
+
| useOffscreen | boolean | false | Defines whether the tree components are rendered offscreen and kept mounted in the DOM. |
|
|
2363
|
+
| className | string | — | Additional classes added on the wrapper element. |
|
|
2364
|
+
|
|
2365
|
+
#### Props: TreeCategory
|
|
2366
|
+
|
|
2367
|
+
### TreeCategory
|
|
2368
|
+
|
|
2369
|
+
| Name | Type | Default | Description |
|
|
2370
|
+
| --- | --- | --- | --- |
|
|
2371
|
+
| id | string | — | A unique identifier for that category. |
|
|
2372
|
+
| icon | string | — | The rioglyph icon name for that category. |
|
|
2373
|
+
| label | string \| React.ReactNode | — | The optional label for the category which will be shown in a tooltip. |
|
|
2374
|
+
| hasSelection | boolean | — | Defines whether or not a selection indicator should be shown. |
|
|
2375
|
+
|
|
2376
|
+
#### Props: Tree
|
|
2377
|
+
|
|
2378
|
+
### Tree
|
|
2379
|
+
|
|
2380
|
+
| Name | Type | Default | Description |
|
|
2381
|
+
| --- | --- | --- | --- |
|
|
2382
|
+
| groups | TreeGroup[] | [] | The list of groups of the items. If no groups are provided all items are rendered as flat list. |
|
|
2383
|
+
| └id | string | — | A unique identifier of a group. |
|
|
2384
|
+
| └name | string \| React.ReactNode | — | The name of a group. |
|
|
2385
|
+
| └position | 'last' | — | Can be set to "last" to enforce the last position in the tree. |
|
|
2386
|
+
| └disabled | boolean | — | Disallows the selection of the group itself. |
|
|
2387
|
+
| └icon | string | — | The rioglyph icon name for a group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
2388
|
+
| └expandedIcon | string | — | The rioglyph icon name for a expanded group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
2389
|
+
| └className | string | — | Additional classes added to the group element. |
|
|
2390
|
+
| items | TreeItem[] | [] | The list of items. |
|
|
2391
|
+
| └id | string | — | A unique identifier of an item. |
|
|
2392
|
+
| └name | string \| TreeItemName | — | The name of an item. Either it is a plain string or an object composed of: firstName and lastName where lastName is mandatory. |
|
|
2393
|
+
| └info | string \| React.ReactNode | — | The subline of an item. This can e used to show additional information for that item. |
|
|
2394
|
+
| └type | string | — | The primary type of the item. This is also used as the fallback icon name and refers to the name of the respective rioglyph icon (excluding the rioglyph- prefix). |
|
|
2395
|
+
| └icon | string \| null | — | Optional icon override for the item. If set to a string (e.g. 'truck'), this icon will be used explicitly. If set to undefined, the type property will be used as the fallback icon. If set to null, no icon will be rendered, even if type is defined. This allows full control over the icon behavior while maintaining backward compatibility with type-based icons. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
2396
|
+
| └subType | string | — | Optional sub-type of the item. This refers to the name of an additional rioglyph icon (excluding the rioglyph- prefix), typically used to render a secondary icon next to the primary one (Note: for fuel types better use the pairIcon prop). |
|
|
2397
|
+
| └pairIcon | string \| null \| undefined | — | Optional pair icon override for the subType. If set to a string (e.g. 'fuel-gas'), this icon will be used explicitly. If set to undefined, the subType property will be used as the fallback icon. If set to null, no icon will be rendered, even if subType is defined. This allows full control over the icon behavior while maintaining backward compatibility with subType-based icons. |
|
|
2398
|
+
| └groupIds | string[] | [] | List of group ids the items is associated with. |
|
|
2399
|
+
| └className | string | — | Additional classes added to the item element. |
|
|
2400
|
+
| selectedGroups | string[] | [] | List of selected group ids. |
|
|
2401
|
+
| selectedItems | string[] | [] | List of selected item ids. |
|
|
2402
|
+
| onSelectionChange | ({ items, groups }: SelectionChangeResponse) => void | — | Merged Callback for item and group selection changes. It responds with a selection object that contains the selected itemIds and groupIds: { items: [], groups: [] } |
|
|
2403
|
+
| hasMultiselect | boolean | true | Defines the selection behavior of the tree. |
|
|
2404
|
+
| showRadioButtons | boolean | false | Defines if the single selection should also show radios. |
|
|
2405
|
+
| hideSearch | boolean | false | Defines whether or not the built-in Search is shown. |
|
|
2406
|
+
| searchPlaceholder | string | — | The text used as placeholder for the search input. |
|
|
2407
|
+
| onSearchChange | (value: string) => void | — | Callback for when the search value changes. |
|
|
2408
|
+
| search | React.ReactNode | — | Used to define custom search component which replaces the built-in search. |
|
|
2409
|
+
| summary | React.ReactNode | — | Used to define custom asset type counter component which replaces the built-in summary. |
|
|
2410
|
+
| hideSummary | boolean | false | Defines whether a summary is shown. |
|
|
2411
|
+
| onTypeFilterChange | (currentTypes: string[]) => void | — | Callback triggered when the built-in asset type filter changes. This is only available when the default summary is used. |
|
|
2412
|
+
| hideTreeHead | boolean | false | Defines whether the entire area below the search field is shown or not. Note: Disabling the tree head will hide the select all checkbox and the tree options as well as the tree summary. |
|
|
2413
|
+
| treeHeaderContent | React.ReactElement | — | Additional custom content that is rendered at the top of the tree component. This can be used for nav pills. |
|
|
2414
|
+
| scrollHeight | number | — | Defines the max-height of the scrollable list. |
|
|
2415
|
+
| expandedGroups | string[] | — | List of group ids which are expanded. |
|
|
2416
|
+
| onExpandGroupsChange | (newExpandedGroups: string[]) => void | — | Callback function triggered when a group expands or collapses. |
|
|
2417
|
+
| showEmptyGroups | boolean | true | Defines whether empty groups are shown or not. |
|
|
2418
|
+
| treeOptions | React.ReactNode[] | — | Component to offer customization options for the tree. |
|
|
2419
|
+
| treeOptionsTooltip | React.ReactNode | — | Tooltip content for the tree options dropdown. |
|
|
2420
|
+
| disableAnimation | boolean | false | Disables animation when filtering or using search |
|
|
2421
|
+
| virtualizeThreshold | number | 50 | The number of items (including groups and children) used for virtualizing the tree. |
|
|
2422
|
+
| overscan | number | 5 | The number of items rendered beyond the visible area of a virtualized tree. |
|
|
2423
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2424
|
+
|
|
2425
|
+
#### Props: TreeSearch
|
|
2426
|
+
|
|
2427
|
+
### TreeSearch
|
|
2428
|
+
|
|
2429
|
+
| Name | Type | Default | Description |
|
|
2430
|
+
| --- | --- | --- | --- |
|
|
2431
|
+
| value | string | — | The search value to be shown and used for the search. |
|
|
2432
|
+
| onChange | (newValue: string, event: React.ChangeEvent \| React.MouseEvent) => void | () => {} | Callback for when the search value changes. |
|
|
2433
|
+
| placeholder | string | — | The placeholder text used for the input field. |
|
|
2434
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2435
|
+
|
|
2436
|
+
#### Props: TreeSummary
|
|
2437
|
+
|
|
2438
|
+
### TreeSummary
|
|
2439
|
+
|
|
2440
|
+
| Name | Type | Default | Description |
|
|
2441
|
+
| --- | --- | --- | --- |
|
|
2442
|
+
| assetCounts | TreeSummaryCounts | — | The object containing various asset type counter. |
|
|
2443
|
+
| └truck | number | — | The amount of trucks |
|
|
2444
|
+
| └trailer | number | — | The amount of trailers |
|
|
2445
|
+
| └bus | number | — | The amount of buses |
|
|
2446
|
+
| └van | number | — | The amount of vans |
|
|
2447
|
+
| └car | number | — | The amount of cars |
|
|
2448
|
+
| └driver | number | — | The amount of drivers |
|
|
2449
|
+
| gridCols | number | 4 | The number of grid columns used for the built-in TreeSummaryRow. |
|
|
2450
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2451
|
+
|
|
2452
|
+
#### Props: TreeSummaryRow
|
|
2453
|
+
|
|
2454
|
+
### TreeSummaryRow
|
|
2455
|
+
|
|
2456
|
+
| Name | Type | Default | Description |
|
|
2457
|
+
| --- | --- | --- | --- |
|
|
2458
|
+
| gridCols | number | 4 | Defined the number of grid columns for a single row. Note, when the amount of children exceed the columns it will wrap around to a new line. |
|
|
2459
|
+
|
|
2460
|
+
#### Props: TypeCounter
|
|
2461
|
+
|
|
2462
|
+
### TypeCounter
|
|
2463
|
+
|
|
2464
|
+
| Name | Type | Default | Description |
|
|
2465
|
+
| --- | --- | --- | --- |
|
|
2466
|
+
| type | string | — | The item type for that counter. This will be used as a return value for the onClick callback. |
|
|
2467
|
+
| icon | string | — | The icon name. Note, when using the built-in generic type counter, the icon name will the same as the item type. So make sure there is a corresponding icon for the defined type. |
|
|
2468
|
+
| isActive | boolean | — | Sets the active styling if active |
|
|
2469
|
+
| hasFilter | boolean | false | Should be set when there is a type filter set in the tree to style the counter accordingly. |
|
|
2470
|
+
| enableActivity | boolean | false | Allows for interactivity. Use this prop when you allow clicking on the counter. |
|
|
2471
|
+
| hideOnZero | boolean | false | Defines if the counter is rendered at all when the value is not defined ot 0. |
|
|
2472
|
+
| onClick | (type: string) => void | — | Callback function when the counter is clicked. It returns the type value. Make sure the "type" prop is defined to receive the value in the callback. |
|
|
2473
|
+
| value | string \| React.ReactNode \| number | — | A custom value to be shown in the counter. |
|
|
2474
|
+
|
|
2475
|
+
#### Props: TreeOption
|
|
2476
|
+
|
|
2477
|
+
### TreeOption
|
|
2478
|
+
|
|
2479
|
+
| Name | Type | Default | Description |
|
|
2480
|
+
| --- | --- | --- | --- |
|
|
2481
|
+
| isChecked | boolean | false | Defines whether the option is set. |
|
|
2482
|
+
| onChange | (event: React.MouseEvent<HTMLDivElement>) => void | — | Callback triggered when option is selected. |
|
|
2483
|
+
| label | string \| React.ReactNode | — | The label for the option. |
|
|
2484
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
1919
2485
|
|
|
1920
|
-
Tree with
|
|
2486
|
+
## Tree with custom icons
|
|
1921
2487
|
|
|
1922
|
-
|
|
2488
|
+
### Example: Example 5
|
|
1923
2489
|
|
|
1924
|
-
Group
|
|
2490
|
+
Group 017
|
|
1925
2491
|
|
|
1926
|
-
Group
|
|
2492
|
+
Group 027
|
|
1927
2493
|
|
|
1928
|
-
Group
|
|
2494
|
+
Group 036
|
|
1929
2495
|
|
|
1930
2496
|
#### Summary
|
|
1931
2497
|
|
|
1932
|
-
|
|
2498
|
+
Group 017
|
|
1933
2499
|
|
|
1934
|
-
|
|
2500
|
+
Group 027
|
|
1935
2501
|
|
|
1936
|
-
Group
|
|
1937
|
-
|
|
1938
|
-
Group 028
|
|
1939
|
-
|
|
1940
|
-
Group 033
|
|
2502
|
+
Group 036
|
|
1941
2503
|
|
|
1942
2504
|
#### React (tsx)
|
|
1943
2505
|
|
|
@@ -1947,7 +2509,6 @@ import { random } from 'es-toolkit/compat';
|
|
|
1947
2509
|
import { faker } from '@faker-js/faker';
|
|
1948
2510
|
|
|
1949
2511
|
import Tree, { type TreeItem, type TreeGroup, type SelectionChangeResponse } from '@rio-cloud/rio-uikit/Tree';
|
|
1950
|
-
import LabeledElement from '@rio-cloud/rio-uikit/LabeledElement';
|
|
1951
2512
|
|
|
1952
2513
|
const groups: TreeGroup[] = [
|
|
1953
2514
|
{
|
|
@@ -1987,21 +2548,20 @@ export default () => {
|
|
|
1987
2548
|
|
|
1988
2549
|
return (
|
|
1989
2550
|
<div className='display-flex flex-wrap gap-25 overflow-auto'>
|
|
1990
|
-
<
|
|
1991
|
-
<
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
</LabeledElement>
|
|
2551
|
+
<div className='width-500 border border-color-lighter border-bottom-none'>
|
|
2552
|
+
<Tree
|
|
2553
|
+
groups={groups}
|
|
2554
|
+
items={treeItems}
|
|
2555
|
+
expandedGroups={expandedGroups}
|
|
2556
|
+
onExpandGroupsChange={handleExpandGroups}
|
|
2557
|
+
selectedItems={selectedItemIds}
|
|
2558
|
+
onSelectionChange={handleSelection}
|
|
2559
|
+
searchPlaceholder='Find items'
|
|
2560
|
+
scrollHeight={300}
|
|
2561
|
+
hasMultiselect={false}
|
|
2562
|
+
hideTreeHead
|
|
2563
|
+
/>
|
|
2564
|
+
</div>
|
|
2005
2565
|
</div>
|
|
2006
2566
|
);
|
|
2007
2567
|
};
|
|
@@ -2011,85 +2571,69 @@ export default () => {
|
|
|
2011
2571
|
|
|
2012
2572
|
```html
|
|
2013
2573
|
<div class="display-flex flex-wrap gap-25 overflow-auto">
|
|
2014
|
-
<div class="
|
|
2015
|
-
<div class="
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
<span class="input-group-addon">
|
|
2022
|
-
<span class="rioglyph rioglyph-search" aria-hidden="true">
|
|
2023
|
-
</span>
|
|
2574
|
+
<div class="width-500 border border-color-lighter border-bottom-none">
|
|
2575
|
+
<div class="Tree">
|
|
2576
|
+
<div class="TreeHeader">
|
|
2577
|
+
<div class="TreeSearch">
|
|
2578
|
+
<div class="input-group flex-1-0">
|
|
2579
|
+
<span class="input-group-addon">
|
|
2580
|
+
<span class="rioglyph rioglyph-search" aria-hidden="true">
|
|
2024
2581
|
</span>
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2582
|
+
</span>
|
|
2583
|
+
<div class="ClearableInput input-group">
|
|
2584
|
+
<input placeholder="Find items" class="form-control" type="text" tabindex="0" value="">
|
|
2585
|
+
<span class="clearButton hide">
|
|
2586
|
+
<span class="clearButtonIcon rioglyph rioglyph-remove-sign">
|
|
2030
2587
|
</span>
|
|
2031
|
-
</
|
|
2588
|
+
</span>
|
|
2032
2589
|
</div>
|
|
2033
2590
|
</div>
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
<span class="TreeLabelCount label label-condensed label-muted label-filled">20</span>
|
|
2043
|
-
</div>
|
|
2591
|
+
</div>
|
|
2592
|
+
</div>
|
|
2593
|
+
<div class="TreeRoot user-select-none overflow-auto" style="max-height: 300px; position: relative;">
|
|
2594
|
+
<div class="TreeNodeContainer user-select-none overflow-hidden" data-id="1">
|
|
2595
|
+
<div class="TreeNode from-group" data-key="1">
|
|
2596
|
+
<span class="TreeLabel TreeLabelName">
|
|
2597
|
+
<div class="display-grid place-items-center margin-right-5" style="width: 18px; height: 18px;">
|
|
2598
|
+
<img src="https://cdn.rio.cloud/images/uikit/react_logo.svg" style="max-width: 100%; max-height: 100%;">
|
|
2044
2599
|
</div>
|
|
2045
|
-
|
|
2600
|
+
<span class="TreeLabelNameText">
|
|
2601
|
+
<span class="TreeLabelNameTextHeadline">Group 01</span>
|
|
2602
|
+
</span>
|
|
2603
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">7</span>
|
|
2604
|
+
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2605
|
+
</span>
|
|
2606
|
+
</span>
|
|
2046
2607
|
</div>
|
|
2047
2608
|
</div>
|
|
2048
|
-
<div class="
|
|
2049
|
-
<div class="
|
|
2050
|
-
<
|
|
2051
|
-
<
|
|
2052
|
-
<
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
<span class="
|
|
2056
|
-
<span class="TreeLabelNameTextHeadline">Group 01</span>
|
|
2057
|
-
</span>
|
|
2058
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">9</span>
|
|
2059
|
-
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2060
|
-
</span>
|
|
2609
|
+
<div class="TreeNodeContainer user-select-none overflow-hidden" data-id="2">
|
|
2610
|
+
<div class="TreeNode from-group" data-key="2">
|
|
2611
|
+
<span class="TreeLabel TreeLabelName">
|
|
2612
|
+
<div class="display-grid place-items-center margin-right-5" style="width: 18px; height: 18px;">
|
|
2613
|
+
<img src="https://cdn.rio.cloud/images/uikit/react_logo.svg" style="max-width: 100%; max-height: 100%;">
|
|
2614
|
+
</div>
|
|
2615
|
+
<span class="TreeLabelNameText">
|
|
2616
|
+
<span class="TreeLabelNameTextHeadline">Group 02</span>
|
|
2061
2617
|
</span>
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
<div class="TreeNodeContainer user-select-none overflow-hidden" data-id="2">
|
|
2065
|
-
<div class="TreeNode from-group" data-key="2">
|
|
2066
|
-
<span class="TreeLabel TreeLabelName">
|
|
2067
|
-
<div class="display-grid place-items-center margin-right-5" style="width: 18px; height: 18px;">
|
|
2068
|
-
<img src="https://cdn.rio.cloud/images/uikit/react_logo.svg" style="max-width: 100%; max-height: 100%;">
|
|
2069
|
-
</div>
|
|
2070
|
-
<span class="TreeLabelNameText">
|
|
2071
|
-
<span class="TreeLabelNameTextHeadline">Group 02</span>
|
|
2072
|
-
</span>
|
|
2073
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">8</span>
|
|
2074
|
-
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2075
|
-
</span>
|
|
2618
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">7</span>
|
|
2619
|
+
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2076
2620
|
</span>
|
|
2077
|
-
</
|
|
2621
|
+
</span>
|
|
2078
2622
|
</div>
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
</span>
|
|
2088
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">3</span>
|
|
2089
|
-
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2090
|
-
</span>
|
|
2623
|
+
</div>
|
|
2624
|
+
<div class="TreeNodeContainer user-select-none overflow-hidden" data-id="3">
|
|
2625
|
+
<div class="TreeNode from-group" data-key="3">
|
|
2626
|
+
<span class="TreeLabel TreeLabelName">
|
|
2627
|
+
<div class="display-grid place-items-center margin-right-5" style="width: 18px; height: 18px;">
|
|
2628
|
+
<img src="https://cdn.rio.cloud/svg/common/ico_rio_colored.svg" style="max-width: 100%; max-height: 100%;">
|
|
2629
|
+
</div>
|
|
2630
|
+
<span class="TreeLabelNameText">
|
|
2631
|
+
<span class="TreeLabelNameTextHeadline">Group 03</span>
|
|
2091
2632
|
</span>
|
|
2092
|
-
|
|
2633
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">6</span>
|
|
2634
|
+
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2635
|
+
</span>
|
|
2636
|
+
</span>
|
|
2093
2637
|
</div>
|
|
2094
2638
|
</div>
|
|
2095
2639
|
</div>
|
|
@@ -2098,6 +2642,148 @@ export default () => {
|
|
|
2098
2642
|
</div>
|
|
2099
2643
|
```
|
|
2100
2644
|
|
|
2645
|
+
#### Props: AssetTree
|
|
2646
|
+
|
|
2647
|
+
### AssetTree
|
|
2648
|
+
|
|
2649
|
+
| Name | Type | Default | Description |
|
|
2650
|
+
| --- | --- | --- | --- |
|
|
2651
|
+
| fly | boolean | false | Defines if the component will overlap the body content. |
|
|
2652
|
+
| resizable | boolean | true | Defines whether or not the sidebar is resizable. |
|
|
2653
|
+
| bordered | boolean | false | Defines whether the component has a border or not. |
|
|
2654
|
+
| width | number | 350 | Defines the width of the component. The value is set as inline style. Note: when component is resizable it will take the provided width in px only and convert it to number in case. |
|
|
2655
|
+
| minWidth | number | 100 | Defines the minimum width of the component in px that will take effect when resizing. |
|
|
2656
|
+
| maxWidth | number | 0 | Defines the maximum width of the component in px that will take effect when resizing. |
|
|
2657
|
+
| height | number | — | Defines the height of the component in px. |
|
|
2658
|
+
| isOpen | boolean | true | Defines whether the component is open or not. |
|
|
2659
|
+
| onToggleTree | (isOpen: boolean) => void | () => {} | Callback for when the tree visibility is toggled. |
|
|
2660
|
+
| currentCategoryId | string | — | The id of the category which is currently active and shall be shown. |
|
|
2661
|
+
| onCategoryChange | (selectedCategoryId: string) => void | () => {} | Callback for handling change of category. |
|
|
2662
|
+
| onResizeEnd | VoidFunction | () => {} | Callback for when the resize is done. |
|
|
2663
|
+
| useOffscreen | boolean | false | Defines whether the tree components are rendered offscreen and kept mounted in the DOM. |
|
|
2664
|
+
| className | string | — | Additional classes added on the wrapper element. |
|
|
2665
|
+
|
|
2666
|
+
#### Props: TreeCategory
|
|
2667
|
+
|
|
2668
|
+
### TreeCategory
|
|
2669
|
+
|
|
2670
|
+
| Name | Type | Default | Description |
|
|
2671
|
+
| --- | --- | --- | --- |
|
|
2672
|
+
| id | string | — | A unique identifier for that category. |
|
|
2673
|
+
| icon | string | — | The rioglyph icon name for that category. |
|
|
2674
|
+
| label | string \| React.ReactNode | — | The optional label for the category which will be shown in a tooltip. |
|
|
2675
|
+
| hasSelection | boolean | — | Defines whether or not a selection indicator should be shown. |
|
|
2676
|
+
|
|
2677
|
+
#### Props: Tree
|
|
2678
|
+
|
|
2679
|
+
### Tree
|
|
2680
|
+
|
|
2681
|
+
| Name | Type | Default | Description |
|
|
2682
|
+
| --- | --- | --- | --- |
|
|
2683
|
+
| groups | TreeGroup[] | [] | The list of groups of the items. If no groups are provided all items are rendered as flat list. |
|
|
2684
|
+
| └id | string | — | A unique identifier of a group. |
|
|
2685
|
+
| └name | string \| React.ReactNode | — | The name of a group. |
|
|
2686
|
+
| └position | 'last' | — | Can be set to "last" to enforce the last position in the tree. |
|
|
2687
|
+
| └disabled | boolean | — | Disallows the selection of the group itself. |
|
|
2688
|
+
| └icon | string | — | The rioglyph icon name for a group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
2689
|
+
| └expandedIcon | string | — | The rioglyph icon name for a expanded group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
2690
|
+
| └className | string | — | Additional classes added to the group element. |
|
|
2691
|
+
| items | TreeItem[] | [] | The list of items. |
|
|
2692
|
+
| └id | string | — | A unique identifier of an item. |
|
|
2693
|
+
| └name | string \| TreeItemName | — | The name of an item. Either it is a plain string or an object composed of: firstName and lastName where lastName is mandatory. |
|
|
2694
|
+
| └info | string \| React.ReactNode | — | The subline of an item. This can e used to show additional information for that item. |
|
|
2695
|
+
| └type | string | — | The primary type of the item. This is also used as the fallback icon name and refers to the name of the respective rioglyph icon (excluding the rioglyph- prefix). |
|
|
2696
|
+
| └icon | string \| null | — | Optional icon override for the item. If set to a string (e.g. 'truck'), this icon will be used explicitly. If set to undefined, the type property will be used as the fallback icon. If set to null, no icon will be rendered, even if type is defined. This allows full control over the icon behavior while maintaining backward compatibility with type-based icons. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
2697
|
+
| └subType | string | — | Optional sub-type of the item. This refers to the name of an additional rioglyph icon (excluding the rioglyph- prefix), typically used to render a secondary icon next to the primary one (Note: for fuel types better use the pairIcon prop). |
|
|
2698
|
+
| └pairIcon | string \| null \| undefined | — | Optional pair icon override for the subType. If set to a string (e.g. 'fuel-gas'), this icon will be used explicitly. If set to undefined, the subType property will be used as the fallback icon. If set to null, no icon will be rendered, even if subType is defined. This allows full control over the icon behavior while maintaining backward compatibility with subType-based icons. |
|
|
2699
|
+
| └groupIds | string[] | [] | List of group ids the items is associated with. |
|
|
2700
|
+
| └className | string | — | Additional classes added to the item element. |
|
|
2701
|
+
| selectedGroups | string[] | [] | List of selected group ids. |
|
|
2702
|
+
| selectedItems | string[] | [] | List of selected item ids. |
|
|
2703
|
+
| onSelectionChange | ({ items, groups }: SelectionChangeResponse) => void | — | Merged Callback for item and group selection changes. It responds with a selection object that contains the selected itemIds and groupIds: { items: [], groups: [] } |
|
|
2704
|
+
| hasMultiselect | boolean | true | Defines the selection behavior of the tree. |
|
|
2705
|
+
| showRadioButtons | boolean | false | Defines if the single selection should also show radios. |
|
|
2706
|
+
| hideSearch | boolean | false | Defines whether or not the built-in Search is shown. |
|
|
2707
|
+
| searchPlaceholder | string | — | The text used as placeholder for the search input. |
|
|
2708
|
+
| onSearchChange | (value: string) => void | — | Callback for when the search value changes. |
|
|
2709
|
+
| search | React.ReactNode | — | Used to define custom search component which replaces the built-in search. |
|
|
2710
|
+
| summary | React.ReactNode | — | Used to define custom asset type counter component which replaces the built-in summary. |
|
|
2711
|
+
| hideSummary | boolean | false | Defines whether a summary is shown. |
|
|
2712
|
+
| onTypeFilterChange | (currentTypes: string[]) => void | — | Callback triggered when the built-in asset type filter changes. This is only available when the default summary is used. |
|
|
2713
|
+
| hideTreeHead | boolean | false | Defines whether the entire area below the search field is shown or not. Note: Disabling the tree head will hide the select all checkbox and the tree options as well as the tree summary. |
|
|
2714
|
+
| treeHeaderContent | React.ReactElement | — | Additional custom content that is rendered at the top of the tree component. This can be used for nav pills. |
|
|
2715
|
+
| scrollHeight | number | — | Defines the max-height of the scrollable list. |
|
|
2716
|
+
| expandedGroups | string[] | — | List of group ids which are expanded. |
|
|
2717
|
+
| onExpandGroupsChange | (newExpandedGroups: string[]) => void | — | Callback function triggered when a group expands or collapses. |
|
|
2718
|
+
| showEmptyGroups | boolean | true | Defines whether empty groups are shown or not. |
|
|
2719
|
+
| treeOptions | React.ReactNode[] | — | Component to offer customization options for the tree. |
|
|
2720
|
+
| treeOptionsTooltip | React.ReactNode | — | Tooltip content for the tree options dropdown. |
|
|
2721
|
+
| disableAnimation | boolean | false | Disables animation when filtering or using search |
|
|
2722
|
+
| virtualizeThreshold | number | 50 | The number of items (including groups and children) used for virtualizing the tree. |
|
|
2723
|
+
| overscan | number | 5 | The number of items rendered beyond the visible area of a virtualized tree. |
|
|
2724
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2725
|
+
|
|
2726
|
+
#### Props: TreeSearch
|
|
2727
|
+
|
|
2728
|
+
### TreeSearch
|
|
2729
|
+
|
|
2730
|
+
| Name | Type | Default | Description |
|
|
2731
|
+
| --- | --- | --- | --- |
|
|
2732
|
+
| value | string | — | The search value to be shown and used for the search. |
|
|
2733
|
+
| onChange | (newValue: string, event: React.ChangeEvent \| React.MouseEvent) => void | () => {} | Callback for when the search value changes. |
|
|
2734
|
+
| placeholder | string | — | The placeholder text used for the input field. |
|
|
2735
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2736
|
+
|
|
2737
|
+
#### Props: TreeSummary
|
|
2738
|
+
|
|
2739
|
+
### TreeSummary
|
|
2740
|
+
|
|
2741
|
+
| Name | Type | Default | Description |
|
|
2742
|
+
| --- | --- | --- | --- |
|
|
2743
|
+
| assetCounts | TreeSummaryCounts | — | The object containing various asset type counter. |
|
|
2744
|
+
| └truck | number | — | The amount of trucks |
|
|
2745
|
+
| └trailer | number | — | The amount of trailers |
|
|
2746
|
+
| └bus | number | — | The amount of buses |
|
|
2747
|
+
| └van | number | — | The amount of vans |
|
|
2748
|
+
| └car | number | — | The amount of cars |
|
|
2749
|
+
| └driver | number | — | The amount of drivers |
|
|
2750
|
+
| gridCols | number | 4 | The number of grid columns used for the built-in TreeSummaryRow. |
|
|
2751
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2752
|
+
|
|
2753
|
+
#### Props: TreeSummaryRow
|
|
2754
|
+
|
|
2755
|
+
### TreeSummaryRow
|
|
2756
|
+
|
|
2757
|
+
| Name | Type | Default | Description |
|
|
2758
|
+
| --- | --- | --- | --- |
|
|
2759
|
+
| gridCols | number | 4 | Defined the number of grid columns for a single row. Note, when the amount of children exceed the columns it will wrap around to a new line. |
|
|
2760
|
+
|
|
2761
|
+
#### Props: TypeCounter
|
|
2762
|
+
|
|
2763
|
+
### TypeCounter
|
|
2764
|
+
|
|
2765
|
+
| Name | Type | Default | Description |
|
|
2766
|
+
| --- | --- | --- | --- |
|
|
2767
|
+
| type | string | — | The item type for that counter. This will be used as a return value for the onClick callback. |
|
|
2768
|
+
| icon | string | — | The icon name. Note, when using the built-in generic type counter, the icon name will the same as the item type. So make sure there is a corresponding icon for the defined type. |
|
|
2769
|
+
| isActive | boolean | — | Sets the active styling if active |
|
|
2770
|
+
| hasFilter | boolean | false | Should be set when there is a type filter set in the tree to style the counter accordingly. |
|
|
2771
|
+
| enableActivity | boolean | false | Allows for interactivity. Use this prop when you allow clicking on the counter. |
|
|
2772
|
+
| hideOnZero | boolean | false | Defines if the counter is rendered at all when the value is not defined ot 0. |
|
|
2773
|
+
| onClick | (type: string) => void | — | Callback function when the counter is clicked. It returns the type value. Make sure the "type" prop is defined to receive the value in the callback. |
|
|
2774
|
+
| value | string \| React.ReactNode \| number | — | A custom value to be shown in the counter. |
|
|
2775
|
+
|
|
2776
|
+
#### Props: TreeOption
|
|
2777
|
+
|
|
2778
|
+
### TreeOption
|
|
2779
|
+
|
|
2780
|
+
| Name | Type | Default | Description |
|
|
2781
|
+
| --- | --- | --- | --- |
|
|
2782
|
+
| isChecked | boolean | false | Defines whether the option is set. |
|
|
2783
|
+
| onChange | (event: React.MouseEvent<HTMLDivElement>) => void | — | Callback triggered when option is selected. |
|
|
2784
|
+
| label | string \| React.ReactNode | — | The label for the option. |
|
|
2785
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
2786
|
+
|
|
2101
2787
|
## Tree
|
|
2102
2788
|
|
|
2103
2789
|
### Example: Tree with header and search
|
|
@@ -2106,13 +2792,13 @@ Tree with header and search
|
|
|
2106
2792
|
|
|
2107
2793
|
20
|
|
2108
2794
|
|
|
2109
|
-
Folder
|
|
2795
|
+
Folder 017
|
|
2110
2796
|
|
|
2111
|
-
Folder
|
|
2797
|
+
Folder 027
|
|
2112
2798
|
|
|
2113
|
-
Folder
|
|
2799
|
+
Folder 033
|
|
2114
2800
|
|
|
2115
|
-
Folder
|
|
2801
|
+
Folder 043
|
|
2116
2802
|
|
|
2117
2803
|
Selected items:
|
|
2118
2804
|
|
|
@@ -2124,13 +2810,13 @@ Tree with header and search
|
|
|
2124
2810
|
|
|
2125
2811
|
20
|
|
2126
2812
|
|
|
2127
|
-
Folder
|
|
2813
|
+
Folder 017
|
|
2128
2814
|
|
|
2129
|
-
Folder
|
|
2815
|
+
Folder 027
|
|
2130
2816
|
|
|
2131
|
-
Folder
|
|
2817
|
+
Folder 033
|
|
2132
2818
|
|
|
2133
|
-
Folder
|
|
2819
|
+
Folder 043
|
|
2134
2820
|
|
|
2135
2821
|
Selected items:
|
|
2136
2822
|
|
|
@@ -2275,7 +2961,7 @@ export default TreeOnlyExample;
|
|
|
2275
2961
|
<span class="TreeLabelNameText">
|
|
2276
2962
|
<span class="TreeLabelNameTextHeadline">Folder 01</span>
|
|
2277
2963
|
</span>
|
|
2278
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
2964
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">7</span>
|
|
2279
2965
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2280
2966
|
</span>
|
|
2281
2967
|
</span>
|
|
@@ -2289,7 +2975,7 @@ export default TreeOnlyExample;
|
|
|
2289
2975
|
<span class="TreeLabelNameText">
|
|
2290
2976
|
<span class="TreeLabelNameTextHeadline">Folder 02</span>
|
|
2291
2977
|
</span>
|
|
2292
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
2978
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">7</span>
|
|
2293
2979
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2294
2980
|
</span>
|
|
2295
2981
|
</span>
|
|
@@ -2303,7 +2989,7 @@ export default TreeOnlyExample;
|
|
|
2303
2989
|
<span class="TreeLabelNameText">
|
|
2304
2990
|
<span class="TreeLabelNameTextHeadline">Folder 03</span>
|
|
2305
2991
|
</span>
|
|
2306
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
2992
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">3</span>
|
|
2307
2993
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2308
2994
|
</span>
|
|
2309
2995
|
</span>
|
|
@@ -2317,7 +3003,7 @@ export default TreeOnlyExample;
|
|
|
2317
3003
|
<span class="TreeLabelNameText">
|
|
2318
3004
|
<span class="TreeLabelNameTextHeadline">Folder 04</span>
|
|
2319
3005
|
</span>
|
|
2320
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
3006
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">3</span>
|
|
2321
3007
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2322
3008
|
</span>
|
|
2323
3009
|
</span>
|
|
@@ -2338,17 +3024,66 @@ export default TreeOnlyExample;
|
|
|
2338
3024
|
</div>
|
|
2339
3025
|
```
|
|
2340
3026
|
|
|
3027
|
+
#### Props: Tree
|
|
3028
|
+
|
|
3029
|
+
### Tree
|
|
3030
|
+
|
|
3031
|
+
| Name | Type | Default | Description |
|
|
3032
|
+
| --- | --- | --- | --- |
|
|
3033
|
+
| groups | TreeGroup[] | [] | The list of groups of the items. If no groups are provided all items are rendered as flat list. |
|
|
3034
|
+
| └id | string | — | A unique identifier of a group. |
|
|
3035
|
+
| └name | string \| React.ReactNode | — | The name of a group. |
|
|
3036
|
+
| └position | 'last' | — | Can be set to "last" to enforce the last position in the tree. |
|
|
3037
|
+
| └disabled | boolean | — | Disallows the selection of the group itself. |
|
|
3038
|
+
| └icon | string | — | The rioglyph icon name for a group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
3039
|
+
| └expandedIcon | string | — | The rioglyph icon name for a expanded group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
3040
|
+
| └className | string | — | Additional classes added to the group element. |
|
|
3041
|
+
| items | TreeItem[] | [] | The list of items. |
|
|
3042
|
+
| └id | string | — | A unique identifier of an item. |
|
|
3043
|
+
| └name | string \| TreeItemName | — | The name of an item. Either it is a plain string or an object composed of: firstName and lastName where lastName is mandatory. |
|
|
3044
|
+
| └info | string \| React.ReactNode | — | The subline of an item. This can e used to show additional information for that item. |
|
|
3045
|
+
| └type | string | — | The primary type of the item. This is also used as the fallback icon name and refers to the name of the respective rioglyph icon (excluding the rioglyph- prefix). |
|
|
3046
|
+
| └icon | string \| null | — | Optional icon override for the item. If set to a string (e.g. 'truck'), this icon will be used explicitly. If set to undefined, the type property will be used as the fallback icon. If set to null, no icon will be rendered, even if type is defined. This allows full control over the icon behavior while maintaining backward compatibility with type-based icons. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
3047
|
+
| └subType | string | — | Optional sub-type of the item. This refers to the name of an additional rioglyph icon (excluding the rioglyph- prefix), typically used to render a secondary icon next to the primary one (Note: for fuel types better use the pairIcon prop). |
|
|
3048
|
+
| └pairIcon | string \| null \| undefined | — | Optional pair icon override for the subType. If set to a string (e.g. 'fuel-gas'), this icon will be used explicitly. If set to undefined, the subType property will be used as the fallback icon. If set to null, no icon will be rendered, even if subType is defined. This allows full control over the icon behavior while maintaining backward compatibility with subType-based icons. |
|
|
3049
|
+
| └groupIds | string[] | [] | List of group ids the items is associated with. |
|
|
3050
|
+
| └className | string | — | Additional classes added to the item element. |
|
|
3051
|
+
| selectedGroups | string[] | [] | List of selected group ids. |
|
|
3052
|
+
| selectedItems | string[] | [] | List of selected item ids. |
|
|
3053
|
+
| onSelectionChange | ({ items, groups }: SelectionChangeResponse) => void | — | Merged Callback for item and group selection changes. It responds with a selection object that contains the selected itemIds and groupIds: { items: [], groups: [] } |
|
|
3054
|
+
| hasMultiselect | boolean | true | Defines the selection behavior of the tree. |
|
|
3055
|
+
| showRadioButtons | boolean | false | Defines if the single selection should also show radios. |
|
|
3056
|
+
| hideSearch | boolean | false | Defines whether or not the built-in Search is shown. |
|
|
3057
|
+
| searchPlaceholder | string | — | The text used as placeholder for the search input. |
|
|
3058
|
+
| onSearchChange | (value: string) => void | — | Callback for when the search value changes. |
|
|
3059
|
+
| search | React.ReactNode | — | Used to define custom search component which replaces the built-in search. |
|
|
3060
|
+
| summary | React.ReactNode | — | Used to define custom asset type counter component which replaces the built-in summary. |
|
|
3061
|
+
| hideSummary | boolean | false | Defines whether a summary is shown. |
|
|
3062
|
+
| onTypeFilterChange | (currentTypes: string[]) => void | — | Callback triggered when the built-in asset type filter changes. This is only available when the default summary is used. |
|
|
3063
|
+
| hideTreeHead | boolean | false | Defines whether the entire area below the search field is shown or not. Note: Disabling the tree head will hide the select all checkbox and the tree options as well as the tree summary. |
|
|
3064
|
+
| treeHeaderContent | React.ReactElement | — | Additional custom content that is rendered at the top of the tree component. This can be used for nav pills. |
|
|
3065
|
+
| scrollHeight | number | — | Defines the max-height of the scrollable list. |
|
|
3066
|
+
| expandedGroups | string[] | — | List of group ids which are expanded. |
|
|
3067
|
+
| onExpandGroupsChange | (newExpandedGroups: string[]) => void | — | Callback function triggered when a group expands or collapses. |
|
|
3068
|
+
| showEmptyGroups | boolean | true | Defines whether empty groups are shown or not. |
|
|
3069
|
+
| treeOptions | React.ReactNode[] | — | Component to offer customization options for the tree. |
|
|
3070
|
+
| treeOptionsTooltip | React.ReactNode | — | Tooltip content for the tree options dropdown. |
|
|
3071
|
+
| disableAnimation | boolean | false | Disables animation when filtering or using search |
|
|
3072
|
+
| virtualizeThreshold | number | 50 | The number of items (including groups and children) used for virtualizing the tree. |
|
|
3073
|
+
| overscan | number | 5 | The number of items rendered beyond the visible area of a virtualized tree. |
|
|
3074
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
3075
|
+
|
|
2341
3076
|
### Example: Tree without header and search
|
|
2342
3077
|
|
|
2343
3078
|
Tree without header and search
|
|
2344
3079
|
|
|
2345
|
-
Folder
|
|
3080
|
+
Folder 019
|
|
2346
3081
|
|
|
2347
|
-
Folder
|
|
3082
|
+
Folder 023
|
|
2348
3083
|
|
|
2349
|
-
Folder
|
|
3084
|
+
Folder 032
|
|
2350
3085
|
|
|
2351
|
-
Folder
|
|
3086
|
+
Folder 046
|
|
2352
3087
|
|
|
2353
3088
|
Selected items:
|
|
2354
3089
|
|
|
@@ -2358,13 +3093,13 @@ Expanded folders:
|
|
|
2358
3093
|
|
|
2359
3094
|
Tree without header and search
|
|
2360
3095
|
|
|
2361
|
-
Folder
|
|
3096
|
+
Folder 019
|
|
2362
3097
|
|
|
2363
|
-
Folder
|
|
3098
|
+
Folder 023
|
|
2364
3099
|
|
|
2365
|
-
Folder
|
|
3100
|
+
Folder 032
|
|
2366
3101
|
|
|
2367
|
-
Folder
|
|
3102
|
+
Folder 046
|
|
2368
3103
|
|
|
2369
3104
|
Selected items:
|
|
2370
3105
|
|
|
@@ -2485,7 +3220,7 @@ export default TreeOnlyExample;
|
|
|
2485
3220
|
<span class="TreeLabelNameText">
|
|
2486
3221
|
<span class="TreeLabelNameTextHeadline">Folder 01</span>
|
|
2487
3222
|
</span>
|
|
2488
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
3223
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">9</span>
|
|
2489
3224
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2490
3225
|
</span>
|
|
2491
3226
|
</span>
|
|
@@ -2499,7 +3234,7 @@ export default TreeOnlyExample;
|
|
|
2499
3234
|
<span class="TreeLabelNameText">
|
|
2500
3235
|
<span class="TreeLabelNameTextHeadline">Folder 02</span>
|
|
2501
3236
|
</span>
|
|
2502
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
3237
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">3</span>
|
|
2503
3238
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2504
3239
|
</span>
|
|
2505
3240
|
</span>
|
|
@@ -2513,7 +3248,7 @@ export default TreeOnlyExample;
|
|
|
2513
3248
|
<span class="TreeLabelNameText">
|
|
2514
3249
|
<span class="TreeLabelNameTextHeadline">Folder 03</span>
|
|
2515
3250
|
</span>
|
|
2516
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
3251
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">2</span>
|
|
2517
3252
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2518
3253
|
</span>
|
|
2519
3254
|
</span>
|
|
@@ -2527,7 +3262,7 @@ export default TreeOnlyExample;
|
|
|
2527
3262
|
<span class="TreeLabelNameText">
|
|
2528
3263
|
<span class="TreeLabelNameTextHeadline">Folder 04</span>
|
|
2529
3264
|
</span>
|
|
2530
|
-
<span class="TreeLabelCount label label-muted label-filled label-condensed">
|
|
3265
|
+
<span class="TreeLabelCount label label-muted label-filled label-condensed">6</span>
|
|
2531
3266
|
<span class="TreeLabelExpander rioglyph rioglyph-chevron-down ">
|
|
2532
3267
|
</span>
|
|
2533
3268
|
</span>
|
|
@@ -2548,6 +3283,55 @@ export default TreeOnlyExample;
|
|
|
2548
3283
|
</div>
|
|
2549
3284
|
```
|
|
2550
3285
|
|
|
3286
|
+
#### Props: Tree
|
|
3287
|
+
|
|
3288
|
+
### Tree
|
|
3289
|
+
|
|
3290
|
+
| Name | Type | Default | Description |
|
|
3291
|
+
| --- | --- | --- | --- |
|
|
3292
|
+
| groups | TreeGroup[] | [] | The list of groups of the items. If no groups are provided all items are rendered as flat list. |
|
|
3293
|
+
| └id | string | — | A unique identifier of a group. |
|
|
3294
|
+
| └name | string \| React.ReactNode | — | The name of a group. |
|
|
3295
|
+
| └position | 'last' | — | Can be set to "last" to enforce the last position in the tree. |
|
|
3296
|
+
| └disabled | boolean | — | Disallows the selection of the group itself. |
|
|
3297
|
+
| └icon | string | — | The rioglyph icon name for a group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
3298
|
+
| └expandedIcon | string | — | The rioglyph icon name for a expanded group. The prefix rioglyph- can be omitted. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
3299
|
+
| └className | string | — | Additional classes added to the group element. |
|
|
3300
|
+
| items | TreeItem[] | [] | The list of items. |
|
|
3301
|
+
| └id | string | — | A unique identifier of an item. |
|
|
3302
|
+
| └name | string \| TreeItemName | — | The name of an item. Either it is a plain string or an object composed of: firstName and lastName where lastName is mandatory. |
|
|
3303
|
+
| └info | string \| React.ReactNode | — | The subline of an item. This can e used to show additional information for that item. |
|
|
3304
|
+
| └type | string | — | The primary type of the item. This is also used as the fallback icon name and refers to the name of the respective rioglyph icon (excluding the rioglyph- prefix). |
|
|
3305
|
+
| └icon | string \| null | — | Optional icon override for the item. If set to a string (e.g. 'truck'), this icon will be used explicitly. If set to undefined, the type property will be used as the fallback icon. If set to null, no icon will be rendered, even if type is defined. This allows full control over the icon behavior while maintaining backward compatibility with type-based icons. For custom icons and logos, provide an image URL with one of these extensions: .png, .webp, .jpg, .jpeg, .svg. In this case, an img tag is rendered instead of the rioglyph. |
|
|
3306
|
+
| └subType | string | — | Optional sub-type of the item. This refers to the name of an additional rioglyph icon (excluding the rioglyph- prefix), typically used to render a secondary icon next to the primary one (Note: for fuel types better use the pairIcon prop). |
|
|
3307
|
+
| └pairIcon | string \| null \| undefined | — | Optional pair icon override for the subType. If set to a string (e.g. 'fuel-gas'), this icon will be used explicitly. If set to undefined, the subType property will be used as the fallback icon. If set to null, no icon will be rendered, even if subType is defined. This allows full control over the icon behavior while maintaining backward compatibility with subType-based icons. |
|
|
3308
|
+
| └groupIds | string[] | [] | List of group ids the items is associated with. |
|
|
3309
|
+
| └className | string | — | Additional classes added to the item element. |
|
|
3310
|
+
| selectedGroups | string[] | [] | List of selected group ids. |
|
|
3311
|
+
| selectedItems | string[] | [] | List of selected item ids. |
|
|
3312
|
+
| onSelectionChange | ({ items, groups }: SelectionChangeResponse) => void | — | Merged Callback for item and group selection changes. It responds with a selection object that contains the selected itemIds and groupIds: { items: [], groups: [] } |
|
|
3313
|
+
| hasMultiselect | boolean | true | Defines the selection behavior of the tree. |
|
|
3314
|
+
| showRadioButtons | boolean | false | Defines if the single selection should also show radios. |
|
|
3315
|
+
| hideSearch | boolean | false | Defines whether or not the built-in Search is shown. |
|
|
3316
|
+
| searchPlaceholder | string | — | The text used as placeholder for the search input. |
|
|
3317
|
+
| onSearchChange | (value: string) => void | — | Callback for when the search value changes. |
|
|
3318
|
+
| search | React.ReactNode | — | Used to define custom search component which replaces the built-in search. |
|
|
3319
|
+
| summary | React.ReactNode | — | Used to define custom asset type counter component which replaces the built-in summary. |
|
|
3320
|
+
| hideSummary | boolean | false | Defines whether a summary is shown. |
|
|
3321
|
+
| onTypeFilterChange | (currentTypes: string[]) => void | — | Callback triggered when the built-in asset type filter changes. This is only available when the default summary is used. |
|
|
3322
|
+
| hideTreeHead | boolean | false | Defines whether the entire area below the search field is shown or not. Note: Disabling the tree head will hide the select all checkbox and the tree options as well as the tree summary. |
|
|
3323
|
+
| treeHeaderContent | React.ReactElement | — | Additional custom content that is rendered at the top of the tree component. This can be used for nav pills. |
|
|
3324
|
+
| scrollHeight | number | — | Defines the max-height of the scrollable list. |
|
|
3325
|
+
| expandedGroups | string[] | — | List of group ids which are expanded. |
|
|
3326
|
+
| onExpandGroupsChange | (newExpandedGroups: string[]) => void | — | Callback function triggered when a group expands or collapses. |
|
|
3327
|
+
| showEmptyGroups | boolean | true | Defines whether empty groups are shown or not. |
|
|
3328
|
+
| treeOptions | React.ReactNode[] | — | Component to offer customization options for the tree. |
|
|
3329
|
+
| treeOptionsTooltip | React.ReactNode | — | Tooltip content for the tree options dropdown. |
|
|
3330
|
+
| disableAnimation | boolean | false | Disables animation when filtering or using search |
|
|
3331
|
+
| virtualizeThreshold | number | 50 | The number of items (including groups and children) used for virtualizing the tree. |
|
|
3332
|
+
| overscan | number | 5 | The number of items rendered beyond the visible area of a virtualized tree. |
|
|
3333
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
3334
|
+
|
|
2551
3335
|
## TreeSummary with assetCounts
|
|
2552
3336
|
|
|
2553
3337
|
### Example: Example 8
|
|
@@ -2618,6 +3402,37 @@ export default TreeSummaryExample;
|
|
|
2618
3402
|
</div>
|
|
2619
3403
|
```
|
|
2620
3404
|
|
|
3405
|
+
#### Props: TreeSummary
|
|
3406
|
+
|
|
3407
|
+
### TreeSummary
|
|
3408
|
+
|
|
3409
|
+
| Name | Type | Default | Description |
|
|
3410
|
+
| --- | --- | --- | --- |
|
|
3411
|
+
| assetCounts | TreeSummaryCounts | — | The object containing various asset type counter. |
|
|
3412
|
+
| └truck | number | — | The amount of trucks |
|
|
3413
|
+
| └trailer | number | — | The amount of trailers |
|
|
3414
|
+
| └bus | number | — | The amount of buses |
|
|
3415
|
+
| └van | number | — | The amount of vans |
|
|
3416
|
+
| └car | number | — | The amount of cars |
|
|
3417
|
+
| └driver | number | — | The amount of drivers |
|
|
3418
|
+
| gridCols | number | 4 | The number of grid columns used for the built-in TreeSummaryRow. |
|
|
3419
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
3420
|
+
|
|
3421
|
+
#### Props: TypeCounter
|
|
3422
|
+
|
|
3423
|
+
### TypeCounter
|
|
3424
|
+
|
|
3425
|
+
| Name | Type | Default | Description |
|
|
3426
|
+
| --- | --- | --- | --- |
|
|
3427
|
+
| type | string | — | The item type for that counter. This will be used as a return value for the onClick callback. |
|
|
3428
|
+
| icon | string | — | The icon name. Note, when using the built-in generic type counter, the icon name will the same as the item type. So make sure there is a corresponding icon for the defined type. |
|
|
3429
|
+
| isActive | boolean | — | Sets the active styling if active |
|
|
3430
|
+
| hasFilter | boolean | false | Should be set when there is a type filter set in the tree to style the counter accordingly. |
|
|
3431
|
+
| enableActivity | boolean | false | Allows for interactivity. Use this prop when you allow clicking on the counter. |
|
|
3432
|
+
| hideOnZero | boolean | false | Defines if the counter is rendered at all when the value is not defined ot 0. |
|
|
3433
|
+
| onClick | (type: string) => void | — | Callback function when the counter is clicked. It returns the type value. Make sure the "type" prop is defined to receive the value in the callback. |
|
|
3434
|
+
| value | string \| React.ReactNode \| number | — | A custom value to be shown in the counter. |
|
|
3435
|
+
|
|
2621
3436
|
## TreeSummary with TypeCounter
|
|
2622
3437
|
|
|
2623
3438
|
### Example: Example 9
|
|
@@ -2661,4 +3476,35 @@ export default TreeSummaryCustomExample;
|
|
|
2661
3476
|
<span class="TreeLabelCount label label-condensed label-muted label-filled">15</span>
|
|
2662
3477
|
</div>
|
|
2663
3478
|
</div>
|
|
2664
|
-
```
|
|
3479
|
+
```
|
|
3480
|
+
|
|
3481
|
+
#### Props: TreeSummary
|
|
3482
|
+
|
|
3483
|
+
### TreeSummary
|
|
3484
|
+
|
|
3485
|
+
| Name | Type | Default | Description |
|
|
3486
|
+
| --- | --- | --- | --- |
|
|
3487
|
+
| assetCounts | TreeSummaryCounts | — | The object containing various asset type counter. |
|
|
3488
|
+
| └truck | number | — | The amount of trucks |
|
|
3489
|
+
| └trailer | number | — | The amount of trailers |
|
|
3490
|
+
| └bus | number | — | The amount of buses |
|
|
3491
|
+
| └van | number | — | The amount of vans |
|
|
3492
|
+
| └car | number | — | The amount of cars |
|
|
3493
|
+
| └driver | number | — | The amount of drivers |
|
|
3494
|
+
| gridCols | number | 4 | The number of grid columns used for the built-in TreeSummaryRow. |
|
|
3495
|
+
| className | string | — | Additional classes added to the wrapping element. |
|
|
3496
|
+
|
|
3497
|
+
#### Props: TypeCounter
|
|
3498
|
+
|
|
3499
|
+
### TypeCounter
|
|
3500
|
+
|
|
3501
|
+
| Name | Type | Default | Description |
|
|
3502
|
+
| --- | --- | --- | --- |
|
|
3503
|
+
| type | string | — | The item type for that counter. This will be used as a return value for the onClick callback. |
|
|
3504
|
+
| icon | string | — | The icon name. Note, when using the built-in generic type counter, the icon name will the same as the item type. So make sure there is a corresponding icon for the defined type. |
|
|
3505
|
+
| isActive | boolean | — | Sets the active styling if active |
|
|
3506
|
+
| hasFilter | boolean | false | Should be set when there is a type filter set in the tree to style the counter accordingly. |
|
|
3507
|
+
| enableActivity | boolean | false | Allows for interactivity. Use this prop when you allow clicking on the counter. |
|
|
3508
|
+
| hideOnZero | boolean | false | Defines if the counter is rendered at all when the value is not defined ot 0. |
|
|
3509
|
+
| onClick | (type: string) => void | — | Callback function when the counter is clicked. It returns the type value. Make sure the "type" prop is defined to receive the value in the callback. |
|
|
3510
|
+
| value | string \| React.ReactNode \| number | — | A custom value to be shown in the counter. |
|