@rio-cloud/uikit-mcp 1.1.7 → 1.1.9
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 +24 -18
- package/dist/doc-metadata.json +125 -295
- package/dist/docs/components/accentBar.md +16 -69
- package/dist/docs/components/activity.md +7 -44
- package/dist/docs/components/animatedNumber.md +3 -11
- package/dist/docs/components/animatedTextReveal.md +6 -34
- package/dist/docs/components/animations.md +21 -54
- package/dist/docs/components/appHeader.md +11 -30
- package/dist/docs/components/appLayout.md +40 -193
- package/dist/docs/components/appNavigationBar.md +1 -24
- package/dist/docs/components/areaCharts.md +7 -22
- package/dist/docs/components/aspectRatioPlaceholder.md +1 -9
- package/dist/docs/components/assetTree.md +241 -280
- package/dist/docs/components/autosuggests.md +3 -102
- package/dist/docs/components/avatar.md +1 -16
- package/dist/docs/components/banner.md +4 -37
- package/dist/docs/components/barCharts.md +20 -75
- package/dist/docs/components/barList.md +10 -78
- package/dist/docs/components/basicMap.md +1 -67
- package/dist/docs/components/bottomSheet.md +2 -28
- package/dist/docs/components/button.md +12 -65
- package/dist/docs/components/buttonToolbar.md +5 -19
- package/dist/docs/components/calendarStripe.md +50 -100
- package/dist/docs/components/card.md +1 -9
- package/dist/docs/components/carousel.md +1 -14
- package/dist/docs/components/chartColors.md +1 -156
- package/dist/docs/components/chartsGettingStarted.md +1 -1
- package/dist/docs/components/chat.md +2 -81
- package/dist/docs/components/checkbox.md +11 -72
- package/dist/docs/components/circularProgress.md +8 -49
- package/dist/docs/components/clearableInput.md +3 -62
- package/dist/docs/components/collapse.md +2 -15
- package/dist/docs/components/composedCharts.md +16 -26
- package/dist/docs/components/contentLoader.md +7 -25
- package/dist/docs/components/dataTabs.md +16 -104
- package/dist/docs/components/datepickers.md +710 -962
- package/dist/docs/components/dialogs.md +5 -67
- package/dist/docs/components/divider.md +1 -33
- package/dist/docs/components/dropdowns.md +3424 -5567
- package/dist/docs/components/editableContent.md +4 -82
- package/dist/docs/components/expander.md +15 -88
- package/dist/docs/components/fade.md +4 -61
- package/dist/docs/components/fadeExpander.md +1 -7
- package/dist/docs/components/fadeUp.md +2 -76
- package/dist/docs/components/feedback.md +9 -68
- package/dist/docs/components/filePickers.md +4 -18
- package/dist/docs/components/formLabel.md +7 -27
- package/dist/docs/components/groupedItemList.md +2 -158
- package/dist/docs/components/iconList.md +7 -64
- package/dist/docs/components/imagePreloader.md +1 -9
- package/dist/docs/components/labeledElement.md +3 -18
- package/dist/docs/components/licensePlate.md +1 -43
- package/dist/docs/components/lineCharts.md +8 -39
- package/dist/docs/components/listMenu.md +2 -34
- package/dist/docs/components/loadMore.md +5 -24
- package/dist/docs/components/mainNavigation.md +1 -9
- package/dist/docs/components/mapCircle.md +1 -23
- package/dist/docs/components/mapCluster.md +2 -54
- package/dist/docs/components/mapContext.md +1 -23
- package/dist/docs/components/mapDraggableMarker.md +2 -28
- package/dist/docs/components/mapGettingStarted.md +2 -2
- package/dist/docs/components/mapInfoBubble.md +1 -27
- package/dist/docs/components/mapLayerGroup.md +1 -23
- package/dist/docs/components/mapMarker.md +1 -99
- package/dist/docs/components/mapPolygon.md +2 -116
- package/dist/docs/components/mapRoute.md +6 -1465
- package/dist/docs/components/mapRouteGenerator.md +1 -1
- package/dist/docs/components/mapSettings.md +11 -128
- package/dist/docs/components/mapUtils.md +10 -113
- package/dist/docs/components/multiselects.md +14 -163
- package/dist/docs/components/noData.md +8 -22
- package/dist/docs/components/notifications.md +3 -19
- package/dist/docs/components/numbercontrol.md +3 -47
- package/dist/docs/components/onboarding.md +3 -15
- package/dist/docs/components/page.md +1 -33
- package/dist/docs/components/pager.md +1 -17
- package/dist/docs/components/pieCharts.md +40 -71
- package/dist/docs/components/popover.md +1 -12
- package/dist/docs/components/position.md +2 -6
- package/dist/docs/components/radialBarCharts.md +32 -116
- package/dist/docs/components/radioCardGroup.md +6 -48
- package/dist/docs/components/radiobutton.md +6 -75
- package/dist/docs/components/releaseNotes.md +3 -21
- package/dist/docs/components/resizer.md +1 -7
- package/dist/docs/components/responsiveColumnStripe.md +9 -49
- package/dist/docs/components/responsiveVideo.md +1 -7
- package/dist/docs/components/rioglyph.md +1 -17
- package/dist/docs/components/rules.md +7 -70
- package/dist/docs/components/saveableInput.md +267 -401
- package/dist/docs/components/selects.md +27 -1164
- package/dist/docs/components/sidebar.md +6 -17
- package/dist/docs/components/sliders.md +1 -27
- package/dist/docs/components/smoothScrollbars.md +1 -73
- package/dist/docs/components/spinners.md +6 -51
- package/dist/docs/components/states.md +6 -92
- package/dist/docs/components/statsWidgets.md +1 -76
- package/dist/docs/components/statusBar.md +1 -57
- package/dist/docs/components/stepButton.md +2 -7
- package/dist/docs/components/steppedProgressBars.md +5 -62
- package/dist/docs/components/subNavigation.md +1 -31
- package/dist/docs/components/supportMarker.md +2 -14
- package/dist/docs/components/svgImage.md +1 -5
- package/dist/docs/components/switch.md +2 -33
- package/dist/docs/components/tables.md +1 -1
- package/dist/docs/components/tagManager.md +1 -41
- package/dist/docs/components/tags.md +1 -138
- package/dist/docs/components/teaser.md +2 -122
- package/dist/docs/components/textTruncateMiddle.md +2 -9
- package/dist/docs/components/timeline.md +1 -99
- package/dist/docs/components/timepicker.md +4 -79
- package/dist/docs/components/toggleButton.md +2 -15
- package/dist/docs/components/tooltip.md +9 -30
- package/dist/docs/components/tracker.md +2 -19
- package/dist/docs/components/virtualList.md +61 -130
- package/dist/docs/foundations.md +749 -4069
- package/dist/docs/start/changelog.md +5 -1
- package/dist/docs/start/goodtoknow.md +1 -1
- package/dist/docs/start/guidelines/color-combinations.md +149 -483
- package/dist/docs/start/guidelines/custom-css.md +1 -1
- package/dist/docs/start/guidelines/custom-rioglyph.md +1 -1
- package/dist/docs/start/guidelines/formatting.md +1 -1
- package/dist/docs/start/guidelines/iframe.md +4 -16
- package/dist/docs/start/guidelines/obfuscate-data.md +1 -1
- package/dist/docs/start/guidelines/print-css.md +1 -1
- package/dist/docs/start/guidelines/spinner.md +13 -67
- package/dist/docs/start/guidelines/state-in-url.md +1 -1
- package/dist/docs/start/guidelines/supported-browsers.md +1 -1
- package/dist/docs/start/guidelines/writing.md +1 -1
- package/dist/docs/start/howto.md +11 -11
- package/dist/docs/start/intro.md +1 -1
- package/dist/docs/start/responsiveness.md +1 -1
- package/dist/docs/utilities/classNames.md +3 -18
- package/dist/docs/utilities/deviceUtils.md +7 -13
- package/dist/docs/utilities/featureToggles.md +1 -1
- package/dist/docs/utilities/fuelTypeUtils.md +2 -12
- package/dist/docs/utilities/routeUtils.md +25 -343
- package/dist/docs/utilities/useAfterMount.md +1 -6
- package/dist/docs/utilities/useAutoAnimate.md +2 -15
- package/dist/docs/utilities/useAverage.md +1 -6
- package/dist/docs/utilities/useClickOutside.md +1 -5
- package/dist/docs/utilities/useClipboard.md +2 -6
- package/dist/docs/utilities/useCookies.md +2 -10
- package/dist/docs/utilities/useCount.md +7 -16
- package/dist/docs/utilities/useDarkMode.md +2 -6
- package/dist/docs/utilities/useDebugInfo.md +6 -20
- package/dist/docs/utilities/useEffectOnce.md +1 -6
- package/dist/docs/utilities/useElapsedTime.md +2 -6
- package/dist/docs/utilities/useElementSize.md +1 -7
- package/dist/docs/utilities/useEsc.md +1 -5
- package/dist/docs/utilities/useEvent.md +1 -5
- package/dist/docs/utilities/useFocusTrap.md +1 -5
- package/dist/docs/utilities/useFullscreen.md +2 -15
- package/dist/docs/utilities/useHover.md +1 -5
- package/dist/docs/utilities/useIncomingPostMessages.md +2 -18
- package/dist/docs/utilities/useInterval.md +2 -8
- package/dist/docs/utilities/useIsFocusWithin.md +1 -10
- package/dist/docs/utilities/useKey.md +1 -15
- package/dist/docs/utilities/useLocalStorage.md +2 -11
- package/dist/docs/utilities/useLocationSuggestions.md +1 -5
- package/dist/docs/utilities/useMax.md +1 -5
- package/dist/docs/utilities/useMin.md +1 -5
- package/dist/docs/utilities/useMutationObserver.md +3 -11
- package/dist/docs/utilities/useOnScreen.md +1 -8
- package/dist/docs/utilities/useOnlineStatus.md +1 -5
- package/dist/docs/utilities/usePostMessage.md +3 -9
- package/dist/docs/utilities/usePostMessageSender.md +3 -13
- package/dist/docs/utilities/usePrevious.md +1 -5
- package/dist/docs/utilities/useResizeObserver.md +3 -11
- package/dist/docs/utilities/useRioCookieConsent.md +1 -5
- package/dist/docs/utilities/useScrollPosition.md +3 -59
- package/dist/docs/utilities/useSearch.md +2 -16
- package/dist/docs/utilities/useSearchHighlight.md +13 -78
- package/dist/docs/utilities/useSorting.md +18 -43
- package/dist/docs/utilities/useStateWithValidation.md +1 -5
- package/dist/docs/utilities/useSum.md +1 -9
- package/dist/docs/utilities/useTableExport.md +42 -59
- package/dist/docs/utilities/useTableSelection.md +74 -119
- package/dist/docs/utilities/useTimeout.md +2 -6
- package/dist/docs/utilities/useToggle.md +4 -14
- package/dist/docs/utilities/useUrlState.md +2 -27
- package/dist/docs/utilities/useWindowResize.md +1 -5
- package/dist/index.mjs +46 -16
- package/dist/version.json +2 -2
- package/package.json +15 -9
- package/dist/docs/templates/common-table.md +0 -1112
- package/dist/docs/templates/detail-views.md +0 -942
- package/dist/docs/templates/expandable-details.md +0 -228
- package/dist/docs/templates/feature-cards.md +0 -549
- package/dist/docs/templates/form-summary.md +0 -199
- package/dist/docs/templates/form-toggle.md +0 -367
- package/dist/docs/templates/list-blocks.md +0 -1021
- package/dist/docs/templates/loading-progress.md +0 -109
- package/dist/docs/templates/options-panel.md +0 -152
- package/dist/docs/templates/panel-variants.md +0 -164
- package/dist/docs/templates/progress-cards.md +0 -607
- package/dist/docs/templates/progress-success.md +0 -142
- package/dist/docs/templates/settings-form.md +0 -434
- package/dist/docs/templates/stats-blocks.md +0 -1381
- package/dist/docs/templates/table-panel.md +0 -184
- package/dist/docs/templates/table-row-animation.md +0 -317
- package/dist/docs/templates/usage-cards.md +0 -227
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* Helper
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/routeUtils
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:32.343Z
|
|
7
7
|
|
|
8
8
|
Utility helpers for parsing and serializing URL state. These are low-level building blocks for service-specific mapping.
|
|
9
9
|
|
|
@@ -23,127 +23,12 @@ Example for manual parse/stringify helpers in a service file.
|
|
|
23
23
|
|
|
24
24
|
### Example: Example 1
|
|
25
25
|
|
|
26
|
-
import { deserializeValue, serializeValue } from '@rio-cloud/rio-uikit/routeUtils';
|
|
26
|
+
import { deserializeValue , serializeValue } from '@rio-cloud/rio-uikit/routeUtils' ; // Adapt to your configuration const BASE_PATH = 'my-service' ; const VIEW_OPTIONS = [ 'list' , 'grid' ] as const ;
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
const BASE_PATH = 'my-service';
|
|
30
|
-
const VIEW_OPTIONS = ['list', 'grid'] as const;
|
|
28
|
+
type ViewType = ( typeof VIEW_OPTIONS ) [ number ] ; const DEFAULT_VIEW : ViewType = 'list' ; const DEFAULT_TAB_ID = 1 ;
|
|
31
29
|
|
|
32
|
-
type
|
|
33
|
-
|
|
34
|
-
const DEFAULT_TAB_ID = 1;
|
|
35
|
-
|
|
36
|
-
type RouterLike = { location?: Location };
|
|
37
|
-
type RouteState = {
|
|
38
|
-
query: string;
|
|
39
|
-
view: ViewType;
|
|
40
|
-
tabId: number;
|
|
41
|
-
tags: string[];
|
|
42
|
-
showArchived: boolean;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const isViewType = (value: string): value is ViewType => (VIEW_OPTIONS as readonly string[]).includes(value);
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Reads URL state from a router-like object.
|
|
49
|
-
* Useful when you want a lightweight parser without a hook.
|
|
50
|
-
*
|
|
51
|
-
* Note: Optional service helper when you only need a one-off parse.
|
|
52
|
-
* For reactive state sync, use the `useUrlState` hook instead.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* const state = parseRoute({ location: window.location });
|
|
56
|
-
*/
|
|
57
|
-
export const parseRoute = (router: RouterLike): RouteState => {
|
|
58
|
-
const location = (router?.location ?? {}) as Location;
|
|
59
|
-
const params = new URLSearchParams(location.search || '');
|
|
60
|
-
|
|
61
|
-
const parsedView = deserializeValue(params.get('view'), 'string');
|
|
62
|
-
const parsedTabId = deserializeValue(params.get('tabId'), 'number');
|
|
63
|
-
const parsedTags = deserializeValue(params.get('tags'), 'array');
|
|
64
|
-
const parsedArchived = deserializeValue(params.get('archived'), 'boolean');
|
|
65
|
-
|
|
66
|
-
return {
|
|
67
|
-
query: deserializeValue(params.get('q'), 'string') ?? '',
|
|
68
|
-
view: parsedView && isViewType(parsedView) ? parsedView : DEFAULT_VIEW,
|
|
69
|
-
tabId: parsedTabId ?? DEFAULT_TAB_ID,
|
|
70
|
-
tags: parsedTags ?? [],
|
|
71
|
-
showArchived: parsedArchived ?? false,
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Builds a deep-link URL for a given state.
|
|
77
|
-
* Useful for linking to a screen with preselected filters.
|
|
78
|
-
*
|
|
79
|
-
* Note: Optional service helper when you only need to build a link.
|
|
80
|
-
* For reactive state sync, use the `useUrlState` hook instead.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* const url = makeRoute({ query: 'rio', view: 'list', tabId: 2, tags: ['banana'], showArchived: false });
|
|
84
|
-
*/
|
|
85
|
-
export const makeRoute = (state: RouteState) => {
|
|
86
|
-
const params = new URLSearchParams();
|
|
87
|
-
|
|
88
|
-
const query = serializeValue(state.query, 'string');
|
|
89
|
-
if (query) {
|
|
90
|
-
params.set('q', query);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (state.view !== DEFAULT_VIEW) {
|
|
94
|
-
const view = serializeValue(state.view, 'string');
|
|
95
|
-
if (view) {
|
|
96
|
-
params.set('view', view);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (state.tabId !== DEFAULT_TAB_ID) {
|
|
101
|
-
const tabId = serializeValue(state.tabId, 'number');
|
|
102
|
-
if (tabId) {
|
|
103
|
-
params.set('tabId', tabId);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const tags = serializeValue(state.tags, 'array');
|
|
108
|
-
if (tags) {
|
|
109
|
-
params.set('tags', tags);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (state.showArchived) {
|
|
113
|
-
const archived = serializeValue(state.showArchived, 'boolean');
|
|
114
|
-
if (archived) {
|
|
115
|
-
params.set('archived', archived);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const queryString = params.toString();
|
|
120
|
-
return `${BASE_PATH}/${queryString ? `?${queryString}` : ''}`;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
#### Summary
|
|
124
|
-
|
|
125
|
-
import { deserializeValue, serializeValue } from '@rio-cloud/rio-uikit/routeUtils';
|
|
126
|
-
|
|
127
|
-
// Adapt to your configuration
|
|
128
|
-
const BASE_PATH = 'my-service';
|
|
129
|
-
const VIEW_OPTIONS = ['list', 'grid'] as const;
|
|
130
|
-
|
|
131
|
-
type ViewType = (typeof VIEW_OPTIONS)[number];
|
|
132
|
-
const DEFAULT_VIEW: ViewType = 'list';
|
|
133
|
-
const DEFAULT_TAB_ID = 1;
|
|
134
|
-
|
|
135
|
-
type RouterLike = { location?: Location };
|
|
136
|
-
type RouteState = {
|
|
137
|
-
query: string;
|
|
138
|
-
view: ViewType;
|
|
139
|
-
tabId: number;
|
|
140
|
-
tags: string[];
|
|
141
|
-
showArchived: boolean;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
const isViewType = (value: string): value is ViewType => (VIEW_OPTIONS as readonly string[]).includes(value);
|
|
145
|
-
|
|
146
|
-
/**
|
|
30
|
+
type RouterLike = { location ? : Location } ;
|
|
31
|
+
type RouteState = { query : string ; view : ViewType ; tabId : number ; tags : string [ ] ; showArchived : boolean ; } ; const isViewType = ( value : string ) : value is ViewType => ( VIEW_OPTIONS as readonly string [ ] ) . includes ( value ) ; /**
|
|
147
32
|
* Reads URL state from a router-like object.
|
|
148
33
|
* Useful when you want a lightweight parser without a hook.
|
|
149
34
|
*
|
|
@@ -152,26 +37,7 @@ const isViewType = (value: string): value is ViewType => (VIEW_OPTIONS as readon
|
|
|
152
37
|
*
|
|
153
38
|
* @example
|
|
154
39
|
* const state = parseRoute({ location: window.location });
|
|
155
|
-
*/
|
|
156
|
-
export const parseRoute = (router: RouterLike): RouteState => {
|
|
157
|
-
const location = (router?.location ?? {}) as Location;
|
|
158
|
-
const params = new URLSearchParams(location.search || '');
|
|
159
|
-
|
|
160
|
-
const parsedView = deserializeValue(params.get('view'), 'string');
|
|
161
|
-
const parsedTabId = deserializeValue(params.get('tabId'), 'number');
|
|
162
|
-
const parsedTags = deserializeValue(params.get('tags'), 'array');
|
|
163
|
-
const parsedArchived = deserializeValue(params.get('archived'), 'boolean');
|
|
164
|
-
|
|
165
|
-
return {
|
|
166
|
-
query: deserializeValue(params.get('q'), 'string') ?? '',
|
|
167
|
-
view: parsedView && isViewType(parsedView) ? parsedView : DEFAULT_VIEW,
|
|
168
|
-
tabId: parsedTabId ?? DEFAULT_TAB_ID,
|
|
169
|
-
tags: parsedTags ?? [],
|
|
170
|
-
showArchived: parsedArchived ?? false,
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
/**
|
|
40
|
+
*/ export const parseRoute = ( router : RouterLike ) : RouteState => { const location = ( router ?. location ?? { } ) as Location ; const params = new URLSearchParams ( location . search || '' ) ; const parsedView = deserializeValue ( params . get ( 'view' ) , 'string' ) ; const parsedTabId = deserializeValue ( params . get ( 'tabId' ) , 'number' ) ; const parsedTags = deserializeValue ( params . get ( 'tags' ) , 'array' ) ; const parsedArchived = deserializeValue ( params . get ( 'archived' ) , 'boolean' ) ; return { query : deserializeValue ( params . get ( 'q' ) , 'string' ) ?? '' , view : parsedView && isViewType ( parsedView ) ? parsedView : DEFAULT_VIEW , tabId : parsedTabId ?? DEFAULT_TAB_ID , tags : parsedTags ?? [ ] , showArchived : parsedArchived ?? false , } ; } ; /**
|
|
175
41
|
* Builds a deep-link URL for a given state.
|
|
176
42
|
* Useful for linking to a screen with preselected filters.
|
|
177
43
|
*
|
|
@@ -180,44 +46,12 @@ showArchived: parsedArchived ?? false,
|
|
|
180
46
|
*
|
|
181
47
|
* @example
|
|
182
48
|
* const url = makeRoute({ query: 'rio', view: 'list', tabId: 2, tags: ['banana'], showArchived: false });
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
params.set('q', query);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (state.view !== DEFAULT_VIEW) {
|
|
193
|
-
const view = serializeValue(state.view, 'string');
|
|
194
|
-
if (view) {
|
|
195
|
-
params.set('view', view);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
if (state.tabId !== DEFAULT_TAB_ID) {
|
|
200
|
-
const tabId = serializeValue(state.tabId, 'number');
|
|
201
|
-
if (tabId) {
|
|
202
|
-
params.set('tabId', tabId);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const tags = serializeValue(state.tags, 'array');
|
|
207
|
-
if (tags) {
|
|
208
|
-
params.set('tags', tags);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (state.showArchived) {
|
|
212
|
-
const archived = serializeValue(state.showArchived, 'boolean');
|
|
213
|
-
if (archived) {
|
|
214
|
-
params.set('archived', archived);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const queryString = params.toString();
|
|
219
|
-
return `${BASE_PATH}/${queryString ? `?${queryString}` : ''}`;
|
|
220
|
-
};
|
|
49
|
+
*/ export const makeRoute = ( state : RouteState ) => { const params = new URLSearchParams ( ) ; const query = serializeValue ( state . query , 'string' ) ; if ( query ) {
|
|
50
|
+
params . set ( 'q' , query ) ; } if ( state . view !== DEFAULT_VIEW ) { const view = serializeValue ( state . view , 'string' ) ; if ( view ) {
|
|
51
|
+
params . set ( 'view' , view ) ; } } if ( state . tabId !== DEFAULT_TAB_ID ) { const tabId = serializeValue ( state . tabId , 'number' ) ; if ( tabId ) {
|
|
52
|
+
params . set ( 'tabId' , tabId ) ; } } const tags = serializeValue ( state . tags , 'array' ) ; if ( tags ) {
|
|
53
|
+
params . set ( 'tags' , tags ) ; } if ( state . showArchived ) { const archived = serializeValue ( state . showArchived , 'boolean' ) ; if ( archived ) {
|
|
54
|
+
params . set ( 'archived' , archived ) ; } } const queryString = params . toString ( ) ; return ` ${ BASE_PATH } / ${ queryString ? ` ? ${ queryString } ` : '' } ` ; } ;
|
|
221
55
|
|
|
222
56
|
## TableSettingsDialog state
|
|
223
57
|
|
|
@@ -228,124 +62,13 @@ Example: http://my-url/#demoService/table?sort=userNickName&columns=itemId,userI
|
|
|
228
62
|
### Example: Example 2
|
|
229
63
|
|
|
230
64
|
import {
|
|
231
|
-
deserializeValue,
|
|
232
|
-
mapColumnsSettingsToStrings,
|
|
233
|
-
parseColumnsSettingsStrings,
|
|
234
|
-
parseSorting,
|
|
235
|
-
serializeSorting,
|
|
236
|
-
serializeValue,
|
|
237
|
-
}
|
|
238
|
-
import type { SortDirectionType } from '@rio-cloud/rio-uikit/SortUtils';
|
|
239
|
-
import type { TableColumnsSettings } from '@rio-cloud/rio-uikit/TableSettingsDialog';
|
|
240
|
-
|
|
241
|
-
// TableSettingsDialog state example.
|
|
242
|
-
// Adapt to your configuration
|
|
243
|
-
const BASE_PATH = 'my-service';
|
|
244
|
-
const defaultColumnsDetails: Record<string, { width: number; defaultWidth?: number }> = {
|
|
245
|
-
name: {
|
|
246
|
-
width: 250,
|
|
247
|
-
defaultWidth: 250,
|
|
248
|
-
},
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
// Sample code for parsing the route just for illustration how to use the utils functions
|
|
252
|
-
// Feel free to modify this to your needs.
|
|
253
|
-
// Note: the "parseRoute" and "makeRoute" functions may contain more props which are left out in this demo
|
|
254
|
-
type RouterLike = { location?: Location };
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Reads table settings state from a router-like object.
|
|
258
|
-
*
|
|
259
|
-
* Note: Optional service helper when you only need a one-off parse.
|
|
260
|
-
* For reactive state sync, use the `useUrlState` hook instead.
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* const state = parseRoute({ location: window.location });
|
|
264
|
-
*/
|
|
265
|
-
export const parseRoute = (router: RouterLike) => {
|
|
266
|
-
const location = (router?.location ?? {}) as Location;
|
|
267
|
-
const params = new URLSearchParams(location.search || '');
|
|
268
|
-
|
|
269
|
-
const sortValue = deserializeValue(params.get('sort'), 'string');
|
|
270
|
-
const sorting = sortValue ? parseSorting(sortValue) : undefined;
|
|
271
|
-
|
|
272
|
-
const columnsList = deserializeValue(params.get('columns'), 'array');
|
|
273
|
-
const columns = columnsList ? parseColumnsSettingsStrings(columnsList, defaultColumnsDetails) : undefined;
|
|
274
|
-
|
|
275
|
-
return {
|
|
276
|
-
sortBy: sorting?.sortBy,
|
|
277
|
-
sortDir: sorting?.sortDir,
|
|
278
|
-
columns,
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
type mapRouteProps = {
|
|
283
|
-
sortBy: string;
|
|
284
|
-
sortDir: SortDirectionType;
|
|
285
|
-
columns: TableColumnsSettings;
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Builds a deep-link URL for a given table settings state.
|
|
290
|
-
*
|
|
291
|
-
* Note: Optional service helper when you only need to build a link.
|
|
292
|
-
* For reactive state sync, use the `useUrlState` hook instead.
|
|
293
|
-
*
|
|
294
|
-
* @example
|
|
295
|
-
* const url = makeRoute({ sortBy: 'name', sortDir: 'ASCENDING', columns });
|
|
296
|
-
*/
|
|
297
|
-
export const makeRoute = ({ sortBy, sortDir, columns }: mapRouteProps) => {
|
|
298
|
-
const params = new URLSearchParams();
|
|
299
|
-
|
|
300
|
-
if (sortBy) {
|
|
301
|
-
// Use serializeSorting for compact empty / - prefix behavior.
|
|
302
|
-
const serializedSort = serializeSorting({ sortBy, sortDir });
|
|
303
|
-
if (serializedSort) {
|
|
304
|
-
params.set('sort', serializedSort);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
const mappedColumns = mapColumnsSettingsToStrings(columns);
|
|
309
|
-
const serializedColumns = serializeValue(mappedColumns, 'array');
|
|
310
|
-
if (serializedColumns) {
|
|
311
|
-
params.set('columns', serializedColumns);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
const queryString = params.toString();
|
|
315
|
-
const searchFragment = queryString ? `?${queryString}` : '';
|
|
316
|
-
|
|
317
|
-
return `${BASE_PATH}/${searchFragment}`;
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
#### Summary
|
|
321
|
-
|
|
322
|
-
import {
|
|
323
|
-
deserializeValue,
|
|
324
|
-
mapColumnsSettingsToStrings,
|
|
325
|
-
parseColumnsSettingsStrings,
|
|
326
|
-
parseSorting,
|
|
327
|
-
serializeSorting,
|
|
328
|
-
serializeValue,
|
|
329
|
-
} from '@rio-cloud/rio-uikit/routeUtils';
|
|
330
|
-
import type { SortDirectionType } from '@rio-cloud/rio-uikit/SortUtils';
|
|
331
|
-
import type { TableColumnsSettings } from '@rio-cloud/rio-uikit/TableSettingsDialog';
|
|
332
|
-
|
|
333
|
-
// TableSettingsDialog state example.
|
|
334
|
-
// Adapt to your configuration
|
|
335
|
-
const BASE_PATH = 'my-service';
|
|
336
|
-
const defaultColumnsDetails: Record<string, { width: number; defaultWidth?: number }> = {
|
|
337
|
-
name: {
|
|
338
|
-
width: 250,
|
|
339
|
-
defaultWidth: 250,
|
|
340
|
-
},
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
// Sample code for parsing the route just for illustration how to use the utils functions
|
|
344
|
-
// Feel free to modify this to your needs.
|
|
345
|
-
// Note: the "parseRoute" and "makeRoute" functions may contain more props which are left out in this demo
|
|
346
|
-
type RouterLike = { location?: Location };
|
|
347
|
-
|
|
348
|
-
/**
|
|
65
|
+
deserializeValue ,
|
|
66
|
+
mapColumnsSettingsToStrings ,
|
|
67
|
+
parseColumnsSettingsStrings ,
|
|
68
|
+
parseSorting ,
|
|
69
|
+
serializeSorting ,
|
|
70
|
+
serializeValue , } from '@rio-cloud/rio-uikit/routeUtils' ; import type { SortDirectionType } from '@rio-cloud/rio-uikit/SortUtils' ; import type { TableColumnsSettings } from '@rio-cloud/rio-uikit/TableSettingsDialog' ; // TableSettingsDialog state example. // Adapt to your configuration const BASE_PATH = 'my-service' ; const defaultColumnsDetails : Record < string , { width : number ; defaultWidth ? : number } > = { name : { width : 250 , defaultWidth : 250 , } , } ; // Sample code for parsing the route just for illustration how to use the utils functions // Feel free to modify this to your needs. // Note: the "parseRoute" and "makeRoute" functions may contain more props which are left out in this demo
|
|
71
|
+
type RouterLike = { location ? : Location } ; /**
|
|
349
72
|
* Reads table settings state from a router-like object.
|
|
350
73
|
*
|
|
351
74
|
* Note: Optional service helper when you only need a one-off parse.
|
|
@@ -353,31 +76,10 @@ type RouterLike = { location?: Location };
|
|
|
353
76
|
*
|
|
354
77
|
* @example
|
|
355
78
|
* const state = parseRoute({ location: window.location });
|
|
356
|
-
*/
|
|
357
|
-
|
|
358
|
-
const location = (router?.location ?? {}) as Location;
|
|
359
|
-
const params = new URLSearchParams(location.search || '');
|
|
360
|
-
|
|
361
|
-
const sortValue = deserializeValue(params.get('sort'), 'string');
|
|
362
|
-
const sorting = sortValue ? parseSorting(sortValue) : undefined;
|
|
363
|
-
|
|
364
|
-
const columnsList = deserializeValue(params.get('columns'), 'array');
|
|
365
|
-
const columns = columnsList ? parseColumnsSettingsStrings(columnsList, defaultColumnsDetails) : undefined;
|
|
366
|
-
|
|
367
|
-
return {
|
|
368
|
-
sortBy: sorting?.sortBy,
|
|
369
|
-
sortDir: sorting?.sortDir,
|
|
370
|
-
columns,
|
|
371
|
-
};
|
|
372
|
-
};
|
|
79
|
+
*/ export const parseRoute = ( router : RouterLike ) => { const location = ( router ?. location ?? { } ) as Location ; const params = new URLSearchParams ( location . search || '' ) ; const sortValue = deserializeValue ( params . get ( 'sort' ) , 'string' ) ; const sorting = sortValue ? parseSorting ( sortValue ) : undefined ; const columnsList = deserializeValue ( params . get ( 'columns' ) , 'array' ) ; const columns = columnsList ? parseColumnsSettingsStrings ( columnsList , defaultColumnsDetails ) : undefined ; return { sortBy : sorting ?. sortBy , sortDir : sorting ?. sortDir ,
|
|
80
|
+
columns , } ; } ;
|
|
373
81
|
|
|
374
|
-
type mapRouteProps = {
|
|
375
|
-
sortBy: string;
|
|
376
|
-
sortDir: SortDirectionType;
|
|
377
|
-
columns: TableColumnsSettings;
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
/**
|
|
82
|
+
type mapRouteProps = { sortBy : string ; sortDir : SortDirectionType ; columns : TableColumnsSettings ; } ; /**
|
|
381
83
|
* Builds a deep-link URL for a given table settings state.
|
|
382
84
|
*
|
|
383
85
|
* Note: Optional service helper when you only need to build a link.
|
|
@@ -385,26 +87,6 @@ columns: TableColumnsSettings;
|
|
|
385
87
|
*
|
|
386
88
|
* @example
|
|
387
89
|
* const url = makeRoute({ sortBy: 'name', sortDir: 'ASCENDING', columns });
|
|
388
|
-
*/
|
|
389
|
-
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
if (sortBy) {
|
|
393
|
-
// Use serializeSorting for compact empty / - prefix behavior.
|
|
394
|
-
const serializedSort = serializeSorting({ sortBy, sortDir });
|
|
395
|
-
if (serializedSort) {
|
|
396
|
-
params.set('sort', serializedSort);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
const mappedColumns = mapColumnsSettingsToStrings(columns);
|
|
401
|
-
const serializedColumns = serializeValue(mappedColumns, 'array');
|
|
402
|
-
if (serializedColumns) {
|
|
403
|
-
params.set('columns', serializedColumns);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
const queryString = params.toString();
|
|
407
|
-
const searchFragment = queryString ? `?${queryString}` : '';
|
|
408
|
-
|
|
409
|
-
return `${BASE_PATH}/${searchFragment}`;
|
|
410
|
-
};
|
|
90
|
+
*/ export const makeRoute = ( { sortBy , sortDir , columns } : mapRouteProps ) => { const params = new URLSearchParams ( ) ; if ( sortBy ) { // Use serializeSorting for compact empty / - prefix behavior. const serializedSort = serializeSorting ( { sortBy , sortDir } ) ; if ( serializedSort ) {
|
|
91
|
+
params . set ( 'sort' , serializedSort ) ; } } const mappedColumns = mapColumnsSettingsToStrings ( columns ) ; const serializedColumns = serializeValue ( mappedColumns , 'array' ) ; if ( serializedColumns ) {
|
|
92
|
+
params . set ( 'columns' , serializedColumns ) ; } const queryString = params . toString ( ) ; const searchFragment = queryString ? ` ? ${ queryString } ` : '' ; return ` ${ BASE_PATH } / ${ searchFragment } ` ; } ;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* Lifecycle & execution hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useAfterMount
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:34.448Z
|
|
7
7
|
|
|
8
8
|
The useAfterMount hook allows to use a side effect after the component has been mounted and rendered. The effect will not be triggered on mount and only when the dependencies change.
|
|
9
9
|
|
|
@@ -14,11 +14,6 @@ The useAfterMount hook allows to use a side effect after the component has been
|
|
|
14
14
|
Count: 0
|
|
15
15
|
Increment
|
|
16
16
|
|
|
17
|
-
#### Summary
|
|
18
|
-
|
|
19
|
-
Count: 0
|
|
20
|
-
Increment
|
|
21
|
-
|
|
22
17
|
#### React (tsx)
|
|
23
18
|
|
|
24
19
|
```tsx
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* DOM behavior hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useAutoAnimate
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:37.681Z
|
|
7
7
|
|
|
8
8
|
The useAutoAnimate hook is a thin re-export of the @formkit/auto-animate utility to quickly add enter/leave animations to a container. This page shows a simple example; for full configuration options, check the official documentation.
|
|
9
9
|
|
|
@@ -11,20 +11,7 @@ The useAutoAnimate hook is a thin re-export of the @formkit/auto-animate utility
|
|
|
11
11
|
|
|
12
12
|
### Example: Ready for pickup
|
|
13
13
|
|
|
14
|
-
Add
|
|
15
|
-
|
|
16
|
-
Shipment #1001
|
|
17
|
-
Ready for pickup
|
|
18
|
-
|
|
19
|
-
Shipment #1002
|
|
20
|
-
In transit
|
|
21
|
-
|
|
22
|
-
Shipment #1003
|
|
23
|
-
Delivered
|
|
24
|
-
|
|
25
|
-
#### Summary
|
|
26
|
-
|
|
27
|
-
Add shipmentChange layoutDisable animation
|
|
14
|
+
Add shipment Change layout Disable animation
|
|
28
15
|
|
|
29
16
|
Shipment #1001
|
|
30
17
|
Ready for pickup
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* Data aggregation hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useAverage
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:55.332Z
|
|
7
7
|
|
|
8
8
|
Calculates the arithmetic mean of numeric values extracted from a list of objects using a dot-separated path. Supports localized number formats through optional locale configuration.
|
|
9
9
|
|
|
@@ -14,11 +14,6 @@ Calculates the arithmetic mean of numeric values extracted from a list of object
|
|
|
14
14
|
Average weight deliveries 1: 982,69 kg
|
|
15
15
|
Average weight deliveries 2: 982,69 kg
|
|
16
16
|
|
|
17
|
-
#### Summary
|
|
18
|
-
|
|
19
|
-
Average weight deliveries 1: 982,69 kg
|
|
20
|
-
Average weight deliveries 2: 982,69 kg
|
|
21
|
-
|
|
22
17
|
#### React (tsx)
|
|
23
18
|
|
|
24
19
|
```tsx
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* DOM behavior hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useClickOutside
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:38.063Z
|
|
7
7
|
|
|
8
8
|
The useClickOutside hook allows to easily detect events outside a referenced element.
|
|
9
9
|
|
|
@@ -13,10 +13,6 @@ The useClickOutside hook allows to easily detect events outside a referenced ele
|
|
|
13
13
|
|
|
14
14
|
Click outside the box
|
|
15
15
|
|
|
16
|
-
#### Summary
|
|
17
|
-
|
|
18
|
-
Click outside the box
|
|
19
|
-
|
|
20
16
|
#### React (tsx)
|
|
21
17
|
|
|
22
18
|
```tsx
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* Browser & device hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useClipboard
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:45.450Z
|
|
7
7
|
|
|
8
8
|
The useClipboard hook allows to easily copy something to the browsers clipboard.
|
|
9
9
|
|
|
@@ -13,10 +13,6 @@ The useClipboard hook allows to easily copy something to the browsers clipboard.
|
|
|
13
13
|
|
|
14
14
|
Random UUID
|
|
15
15
|
|
|
16
|
-
#### Summary
|
|
17
|
-
|
|
18
|
-
Random UUID
|
|
19
|
-
|
|
20
16
|
#### React (tsx)
|
|
21
17
|
|
|
22
18
|
```tsx
|
|
@@ -75,7 +71,7 @@ export default () => {
|
|
|
75
71
|
<span>Random UUID</span>
|
|
76
72
|
</label>
|
|
77
73
|
<div class="input-group">
|
|
78
|
-
<input id="random-uuid" class="form-control" type="text" value="
|
|
74
|
+
<input id="random-uuid" class="form-control" type="text" value="789340f8-0a4f-4b14-a203-8cd08f761b5e">
|
|
79
75
|
<div class="input-group-addon">
|
|
80
76
|
<button type="button" class="btn btn-muted btn-sm btn-icon-only btn-component position-absolute top-1 right-1" tabindex="0">
|
|
81
77
|
<span class="rioglyph rioglyph-duplicate">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* Browser & device hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useCookies
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:47.226Z
|
|
7
7
|
|
|
8
8
|
The useCookies hook allows you to set cookies, delete cookies and check whether a cookie exists in the browser.
|
|
9
9
|
|
|
@@ -15,15 +15,7 @@ Cookie Name
|
|
|
15
15
|
|
|
16
16
|
Cookie Value
|
|
17
17
|
|
|
18
|
-
Set
|
|
19
|
-
|
|
20
|
-
#### Summary
|
|
21
|
-
|
|
22
|
-
Cookie Name
|
|
23
|
-
|
|
24
|
-
Cookie Value
|
|
25
|
-
|
|
26
|
-
Set CookieCheck CookieDelete Cookie
|
|
18
|
+
Set Cookie Check Cookie Delete Cookie
|
|
27
19
|
|
|
28
20
|
#### React (tsx)
|
|
29
21
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* Data aggregation hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useCount
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:55.383Z
|
|
7
7
|
|
|
8
8
|
useCount is a utility hook for counting how many objects in a list contain a specific value or match a custom condition at a given property path. It supports exact value matching (e.g. true, 0, 'PENDING') or predicate-based logic using a match function. By default, all values that are not null or undefined are counted.
|
|
9
9
|
|
|
@@ -11,21 +11,12 @@ useCount is a utility hook for counting how many objects in a list contain a spe
|
|
|
11
11
|
|
|
12
12
|
### Example: Example 1
|
|
13
13
|
|
|
14
|
-
Deliveries marked as delivered:3
|
|
15
|
-
Deliveries marked as not delivered:2
|
|
16
|
-
Deliveries with status "PENDING":2
|
|
17
|
-
Deliveries with quantity 0:2
|
|
18
|
-
Deliveries with a written note:2
|
|
19
|
-
Deliveries with at least one item:3
|
|
20
|
-
|
|
21
|
-
#### Summary
|
|
22
|
-
|
|
23
|
-
Deliveries marked as delivered:3
|
|
24
|
-
Deliveries marked as not delivered:2
|
|
25
|
-
Deliveries with status "PENDING":2
|
|
26
|
-
Deliveries with quantity 0:2
|
|
27
|
-
Deliveries with a written note:2
|
|
28
|
-
Deliveries with at least one item:3
|
|
14
|
+
Deliveries marked as delivered: 3
|
|
15
|
+
Deliveries marked as not delivered: 2
|
|
16
|
+
Deliveries with status "PENDING": 2
|
|
17
|
+
Deliveries with quantity 0: 2
|
|
18
|
+
Deliveries with a written note: 2
|
|
19
|
+
Deliveries with at least one item: 3
|
|
29
20
|
|
|
30
21
|
#### React (tsx)
|
|
31
22
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* Browser & device hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useDarkMode
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:47.248Z
|
|
7
7
|
|
|
8
8
|
The useDarkMode hook enables you to listen for the color scheme change and react accordingly.
|
|
9
9
|
|
|
@@ -11,11 +11,7 @@ The useDarkMode hook enables you to listen for the color scheme change and react
|
|
|
11
11
|
|
|
12
12
|
### Example: Example 1
|
|
13
13
|
|
|
14
|
-
isDarkMode:false
|
|
15
|
-
|
|
16
|
-
#### Summary
|
|
17
|
-
|
|
18
|
-
isDarkMode:false
|
|
14
|
+
isDarkMode: false
|
|
19
15
|
|
|
20
16
|
#### React (tsx)
|
|
21
17
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*Category:* Utilities
|
|
4
4
|
*Section:* UI state & input hooks
|
|
5
5
|
*Source:* https://uikit.developers.rio.cloud/#/utilities/useDebugInfo
|
|
6
|
-
*Captured:* 2026-
|
|
6
|
+
*Captured:* 2026-03-06T10:41:51.188Z
|
|
7
7
|
|
|
8
8
|
The useDebugInfo hook allows to return detailed information about render count, render time and changed component props and also to print these information to the console.
|
|
9
9
|
|
|
@@ -11,31 +11,17 @@ The useDebugInfo hook allows to return detailed information about render count,
|
|
|
11
11
|
|
|
12
12
|
### Example: Example 1
|
|
13
13
|
|
|
14
|
-
Component props:isToggled: false
|
|
14
|
+
Component props: isToggled: false
|
|
15
15
|
count: 0
|
|
16
16
|
|
|
17
|
-
Debug Info:{
|
|
17
|
+
Debug Info: {
|
|
18
18
|
"renderCount": 1,
|
|
19
19
|
"changedProps": {},
|
|
20
20
|
"timeSinceLastRender": 0,
|
|
21
|
-
"lastRenderTimestamp":
|
|
21
|
+
"lastRenderTimestamp": 1772793710502
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
#### Summary
|
|
27
|
-
|
|
28
|
-
Component props:isToggled: false
|
|
29
|
-
count: 0
|
|
30
|
-
|
|
31
|
-
Debug Info:{
|
|
32
|
-
"renderCount": 1,
|
|
33
|
-
"changedProps": {},
|
|
34
|
-
"timeSinceLastRender": 0,
|
|
35
|
-
"lastRenderTimestamp": 1771861796836
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
ToggleIncrement
|
|
24
|
+
Toggle Increment
|
|
39
25
|
|
|
40
26
|
#### React (tsx)
|
|
41
27
|
|
|
@@ -107,7 +93,7 @@ export default () => {
|
|
|
107
93
|
"renderCount": 1,
|
|
108
94
|
"changedProps": {},
|
|
109
95
|
"timeSinceLastRender": 0,
|
|
110
|
-
"lastRenderTimestamp":
|
|
96
|
+
"lastRenderTimestamp": 1772793710502
|
|
111
97
|
}</pre>
|
|
112
98
|
</div>
|
|
113
99
|
</div>
|