@rio-cloud/uikit-mcp 1.1.9 → 1.1.10
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/dist/doc-metadata.json +325 -85
- package/dist/docs/components/accentBar.md +110 -116
- package/dist/docs/components/activity.md +1 -1
- package/dist/docs/components/analyticsAnalysisOverlay.md +628 -0
- package/dist/docs/components/animatedNumber.md +2 -2
- package/dist/docs/components/animatedTextReveal.md +53 -55
- package/dist/docs/components/animations.md +22 -22
- package/dist/docs/components/appHeader.md +27 -38
- package/dist/docs/components/appLayout.md +38 -42
- package/dist/docs/components/appNavigationBar.md +1 -1
- package/dist/docs/components/areaCharts.md +57 -63
- package/dist/docs/components/aspectRatioPlaceholder.md +1 -1
- package/dist/docs/components/assetTree.md +200 -167
- package/dist/docs/components/autosuggests.md +1 -1
- package/dist/docs/components/avatar.md +1 -1
- package/dist/docs/components/banner.md +2 -2
- package/dist/docs/components/barCharts.md +531 -417
- package/dist/docs/components/barList.md +9 -9
- package/dist/docs/components/basicMap.md +60 -39
- package/dist/docs/components/bottomSheet.md +2 -2
- package/dist/docs/components/button.md +8 -2
- package/dist/docs/components/buttonToolbar.md +1 -1
- package/dist/docs/components/calendarStripe.md +57 -65
- package/dist/docs/components/card.md +1 -1
- package/dist/docs/components/carousel.md +1 -1
- package/dist/docs/components/chartColors.md +1 -3
- package/dist/docs/components/chartsGettingStarted.md +1 -3
- package/dist/docs/components/chat.md +2 -2
- package/dist/docs/components/checkbox.md +15 -12
- package/dist/docs/components/circularProgress.md +8 -8
- package/dist/docs/components/clearableInput.md +1 -1
- package/dist/docs/components/collapse.md +2 -4
- package/dist/docs/components/composedCharts.md +63 -53
- package/dist/docs/components/contentLoader.md +1 -1
- package/dist/docs/components/dataTabs.md +33 -33
- package/dist/docs/components/datepickers.md +693 -687
- package/dist/docs/components/dayPicker.md +5574 -0
- package/dist/docs/components/dayPickerCalendar.md +5269 -0
- package/dist/docs/components/dialogs.md +17 -19
- package/dist/docs/components/divider.md +1 -1
- package/dist/docs/components/dropdowns.md +3252 -3276
- package/dist/docs/components/editableContent.md +91 -91
- package/dist/docs/components/expander.md +4 -1
- package/dist/docs/components/fade.md +1 -1
- package/dist/docs/components/fadeExpander.md +1 -1
- package/dist/docs/components/fadeUp.md +32 -36
- package/dist/docs/components/feedback.md +1 -1
- package/dist/docs/components/filePickers.md +1 -1
- package/dist/docs/components/formLabel.md +29 -31
- package/dist/docs/components/groupedItemList.md +3 -7
- package/dist/docs/components/htmlTable.md +5074 -0
- package/dist/docs/components/iconList.md +4 -4
- package/dist/docs/components/imagePreloader.md +1 -1
- package/dist/docs/components/labeledElement.md +1 -1
- package/dist/docs/components/licensePlate.md +1 -1
- package/dist/docs/components/lineCharts.md +172 -172
- package/dist/docs/components/listMenu.md +15 -12
- package/dist/docs/components/loadMore.md +4 -2
- package/dist/docs/components/mainNavigation.md +1 -1
- package/dist/docs/components/mapCircle.md +10 -1
- package/dist/docs/components/mapCluster.md +23 -1
- package/dist/docs/components/mapContext.md +12 -4
- package/dist/docs/components/mapDraggableMarker.md +12 -1
- package/dist/docs/components/mapGettingStarted.md +1 -1
- package/dist/docs/components/mapInfoBubble.md +129 -2
- package/dist/docs/components/mapLayerGroup.md +10 -1
- package/dist/docs/components/mapMarker.md +10 -3
- package/dist/docs/components/mapPolygon.md +288 -85
- package/dist/docs/components/mapRoute.md +262 -172
- package/dist/docs/components/mapRouteGenerator.md +1 -1
- package/dist/docs/components/mapSettings.md +23 -1
- package/dist/docs/components/mapUtils.md +1 -1
- package/dist/docs/components/multiselects.md +211 -18
- package/dist/docs/components/noData.md +1 -1
- package/dist/docs/components/notifications.md +2 -2
- package/dist/docs/components/numbercontrol.md +15 -15
- package/dist/docs/components/onboarding.md +1 -1
- package/dist/docs/components/page.md +1 -1
- package/dist/docs/components/pager.md +1 -1
- package/dist/docs/components/pieCharts.md +237 -213
- package/dist/docs/components/popover.md +1 -1
- package/dist/docs/components/position.md +1 -1
- package/dist/docs/components/radialBarCharts.md +446 -400
- package/dist/docs/components/radioCardGroup.md +1 -1
- package/dist/docs/components/radiobutton.md +96 -98
- package/dist/docs/components/releaseNotes.md +1 -1
- package/dist/docs/components/resizer.md +1 -3
- package/dist/docs/components/responsiveColumnStripe.md +1 -3
- package/dist/docs/components/responsiveVideo.md +1 -1
- package/dist/docs/components/rioglyph.md +1 -1
- package/dist/docs/components/rules.md +41 -47
- package/dist/docs/components/saveableInput.md +252 -252
- package/dist/docs/components/selects.md +165 -111
- package/dist/docs/components/sidebar.md +1 -1
- package/dist/docs/components/sliders.md +1 -1
- package/dist/docs/components/smoothScrollbars.md +19 -15
- package/dist/docs/components/spinners.md +1 -1
- package/dist/docs/components/states.md +1 -1
- package/dist/docs/components/statsWidgets.md +1 -1
- package/dist/docs/components/statusBar.md +1 -1
- package/dist/docs/components/stepButton.md +1 -1
- package/dist/docs/components/steppedProgressBars.md +9 -11
- package/dist/docs/components/subNavigation.md +1 -1
- package/dist/docs/components/supportMarker.md +1 -1
- package/dist/docs/components/svgImage.md +1 -1
- package/dist/docs/components/switch.md +3 -1
- package/dist/docs/components/table.md +19584 -0
- package/dist/docs/components/tableControls.md +982 -0
- package/dist/docs/components/tagManager.md +1 -1
- package/dist/docs/components/tags.md +1 -1
- package/dist/docs/components/teaser.md +1 -3
- package/dist/docs/components/textTruncateMiddle.md +1 -1
- package/dist/docs/components/timeline.md +1 -1
- package/dist/docs/components/timepicker.md +1 -1
- package/dist/docs/components/toggleButton.md +3 -1
- package/dist/docs/components/tooltip.md +4 -2
- package/dist/docs/components/tracker.md +1 -1
- package/dist/docs/components/virtualList.md +56 -56
- package/dist/docs/foundations.md +640 -3122
- package/dist/docs/start/changelog.md +53 -3
- package/dist/docs/start/goodtoknow.md +2 -4
- package/dist/docs/start/guidelines/color-combinations.md +1 -1
- 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 -3
- package/dist/docs/start/guidelines/iframe.md +17 -19
- package/dist/docs/start/guidelines/obfuscate-data.md +2 -4
- package/dist/docs/start/guidelines/print-css.md +1 -1
- package/dist/docs/start/guidelines/spinner.md +1 -1
- 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 +12 -20
- package/dist/docs/start/intro.md +1 -1
- package/dist/docs/start/responsiveness.md +1 -3
- package/dist/docs/templates/ai-assistant.md +311 -0
- package/dist/docs/templates/common-table.md +814 -0
- package/dist/docs/templates/detail-views.md +846 -0
- package/dist/docs/templates/expandable-details.md +214 -0
- package/dist/docs/templates/feature-cards.md +479 -0
- package/dist/docs/templates/form-summary.md +179 -0
- package/dist/docs/templates/form-toggle.md +329 -0
- package/dist/docs/templates/list-blocks.md +872 -0
- package/dist/docs/templates/loading-progress.md +100 -0
- package/dist/docs/templates/options-panel.md +132 -0
- package/dist/docs/templates/panel-variants.md +137 -0
- package/dist/docs/templates/progress-cards.md +541 -0
- package/dist/docs/templates/progress-success.md +125 -0
- package/dist/docs/templates/settings-form.md +401 -0
- package/dist/docs/templates/stats-blocks.md +1245 -0
- package/dist/docs/templates/table-panel.md +310 -0
- package/dist/docs/templates/usage-cards.md +199 -0
- package/dist/docs/utilities/classNames.md +1 -1
- package/dist/docs/utilities/deviceUtils.md +2 -2
- package/dist/docs/utilities/featureToggles.md +1 -1
- package/dist/docs/utilities/fuelTypeUtils.md +27 -29
- package/dist/docs/utilities/getTrackingAttributes.md +277 -0
- package/dist/docs/utilities/routeUtils.md +2 -2
- package/dist/docs/utilities/useAfterMount.md +1 -1
- package/dist/docs/utilities/useAutoAnimate.md +1 -1
- package/dist/docs/utilities/useAverage.md +1 -1
- package/dist/docs/utilities/useClickOutside.md +1 -1
- package/dist/docs/utilities/useClipboard.md +2 -2
- package/dist/docs/utilities/useCookies.md +1 -1
- package/dist/docs/utilities/useCount.md +1 -1
- package/dist/docs/utilities/useDarkMode.md +5 -4
- package/dist/docs/utilities/useDebugInfo.md +3 -3
- package/dist/docs/utilities/useDraggableElement.md +281 -0
- package/dist/docs/utilities/useEffectOnce.md +1 -1
- package/dist/docs/utilities/useElapsedTime.md +1 -1
- package/dist/docs/utilities/useElementSize.md +1 -1
- package/dist/docs/utilities/useEsc.md +1 -1
- package/dist/docs/utilities/useEvent.md +1 -1
- package/dist/docs/utilities/useFocusTrap.md +1 -1
- package/dist/docs/utilities/useFullscreen.md +1 -1
- package/dist/docs/utilities/useHover.md +1 -1
- package/dist/docs/utilities/useIncomingPostMessages.md +1 -1
- package/dist/docs/utilities/useInterval.md +1 -1
- package/dist/docs/utilities/useIsFocusWithin.md +1 -1
- package/dist/docs/utilities/useKey.md +8 -10
- package/dist/docs/utilities/useLocalStorage.md +1 -1
- package/dist/docs/utilities/useLocationSuggestions.md +1 -1
- package/dist/docs/utilities/useMax.md +1 -1
- package/dist/docs/utilities/useMin.md +1 -1
- package/dist/docs/utilities/useMutationObserver.md +1 -1
- package/dist/docs/utilities/useOnScreen.md +1 -1
- package/dist/docs/utilities/useOnlineStatus.md +1 -1
- package/dist/docs/utilities/usePostMessage.md +2 -2
- package/dist/docs/utilities/usePostMessageSender.md +1 -1
- package/dist/docs/utilities/usePrevious.md +2 -4
- package/dist/docs/utilities/useResizeObserver.md +35 -15
- package/dist/docs/utilities/useRioCookieConsent.md +1 -1
- package/dist/docs/utilities/useScrollPosition.md +3 -6
- package/dist/docs/utilities/useSearch.md +1 -3
- package/dist/docs/utilities/useSearchHighlight.md +1 -1
- package/dist/docs/utilities/useSorting.md +370 -239
- package/dist/docs/utilities/useStateWithValidation.md +1 -1
- package/dist/docs/utilities/useSum.md +1 -1
- package/dist/docs/utilities/useTableExport.md +364 -288
- package/dist/docs/utilities/useTableSelection.md +88 -92
- package/dist/docs/utilities/useTimeout.md +1 -1
- package/dist/docs/utilities/useToggle.md +1 -1
- package/dist/docs/utilities/useUrlState.md +1 -1
- package/dist/docs/utilities/useWindowResize.md +1 -1
- package/dist/index.mjs +1 -1
- package/dist/search-synonyms.json +2 -2
- package/dist/version.json +2 -2
- package/package.json +2 -2
- package/dist/docs/components/tables.md +0 -8
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Google Analytics Utils
|
|
2
|
+
|
|
3
|
+
*Category:* Utilities
|
|
4
|
+
*Section:* Helper
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/utilities/getTrackingAttributes
|
|
6
|
+
*Captured:* 2026-04-20T12:55:49.976Z
|
|
7
|
+
|
|
8
|
+
Utility helpers for Google Analytics integration, including attribute generation and push helpers.
|
|
9
|
+
|
|
10
|
+
## Google Analytics Utils
|
|
11
|
+
|
|
12
|
+
Use these helpers to create consistent tracking attributes, push events intowindow.dataLayer, and wrap business logic with tracking in one call.
|
|
13
|
+
|
|
14
|
+
> Important: getTrackingAttributes is the preferred and required way to add GA tracking attributes to UI elements in this project. AnalyticsAnalysisOverlay only works when elements use thedata-track-ga-event-* attributes.
|
|
15
|
+
|
|
16
|
+
## Available helpers
|
|
17
|
+
|
|
18
|
+
## Tracking attributesRecommended
|
|
19
|
+
|
|
20
|
+
**TRACKING_TRIGGER**
|
|
21
|
+
|
|
22
|
+
TRACKING_TRIGGER defines the allowed values for trigger ingetTrackingAttributes.
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
type TRACKING_TRIGGER = 'click' | 'visibility';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Hover is intentionally not part of TRACKING_TRIGGER. If you need to track hover interactions, send the event programmatically with gaPush or executeAndTrackfrom the relevant UI callback.
|
|
29
|
+
|
|
30
|
+
**TRACKING_ACTIONS and TRACKING_LABELS**
|
|
31
|
+
|
|
32
|
+
These exports are optional app-level maps that consuming applications can fill with shared action and label values. They are configuration points, not required runtime state.
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
TRACKING_ACTIONS.dialogClose = 'dialog clicked';
|
|
36
|
+
TRACKING_LABELS.dialogClose = 'Dialog closed via close button';
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Example: getTrackingAttributes()
|
|
40
|
+
|
|
41
|
+
getTrackingAttributes()
|
|
42
|
+
click visibility Disable value Tracked button {
|
|
43
|
+
"data-track-ga-event-trigger": "click",
|
|
44
|
+
"data-track-ga-event-category": "uikit demo",
|
|
45
|
+
"data-track-ga-event-action": "button click",
|
|
46
|
+
"data-track-ga-event-label": "utility_getTrackingAttributes_demo",
|
|
47
|
+
"data-track-ga-event-value": "1"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#### React (tsx)
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import { useMemo, useState } from 'react';
|
|
54
|
+
|
|
55
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
56
|
+
import { getTrackingAttributes, type TRACKING_TRIGGER } from '@rio-cloud/rio-uikit/googleAnalyticsUtils';
|
|
57
|
+
|
|
58
|
+
const triggerOptions: TRACKING_TRIGGER[] = ['click', 'visibility'];
|
|
59
|
+
|
|
60
|
+
const GoogleAnalyticsUtilsExample = () => {
|
|
61
|
+
const [trigger, setTrigger] = useState<TRACKING_TRIGGER>('click');
|
|
62
|
+
const [includeValue, setIncludeValue] = useState(true);
|
|
63
|
+
|
|
64
|
+
const trackingAttributes = useMemo(
|
|
65
|
+
() =>
|
|
66
|
+
getTrackingAttributes({
|
|
67
|
+
trigger,
|
|
68
|
+
category: 'uikit demo',
|
|
69
|
+
action: `button ${trigger}`,
|
|
70
|
+
label: 'utility_getTrackingAttributes_demo',
|
|
71
|
+
value: includeValue ? '1' : undefined,
|
|
72
|
+
}),
|
|
73
|
+
[includeValue, trigger]
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div className='bg-white border rounded padding-15'>
|
|
78
|
+
<h4 className='margin-top-0'>getTrackingAttributes()</h4>
|
|
79
|
+
<div className='display-flex gap-10 margin-bottom-15'>
|
|
80
|
+
{triggerOptions.map(option => (
|
|
81
|
+
<Button
|
|
82
|
+
key={option}
|
|
83
|
+
bsSize='xs'
|
|
84
|
+
bsStyle='default'
|
|
85
|
+
className={option === trigger ? 'active' : ''}
|
|
86
|
+
onClick={() => setTrigger(option)}
|
|
87
|
+
>
|
|
88
|
+
{option}
|
|
89
|
+
</Button>
|
|
90
|
+
))}
|
|
91
|
+
<Button bsSize='xs' bsStyle='default' onClick={() => setIncludeValue(previousValue => !previousValue)}>
|
|
92
|
+
{includeValue ? 'Disable value' : 'Enable value'}
|
|
93
|
+
</Button>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<Button bsStyle='primary' {...trackingAttributes}>
|
|
97
|
+
Tracked button
|
|
98
|
+
</Button>
|
|
99
|
+
|
|
100
|
+
<pre className='margin-top-15 bg-white border rounded padding-10 text-size-12'>
|
|
101
|
+
{JSON.stringify(trackingAttributes, null, 2)}
|
|
102
|
+
</pre>
|
|
103
|
+
</div>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export default GoogleAnalyticsUtilsExample;
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### HTML (html)
|
|
111
|
+
|
|
112
|
+
```html
|
|
113
|
+
<div class="bg-white border rounded padding-15">
|
|
114
|
+
<h4 class="margin-top-0">getTrackingAttributes()</h4>
|
|
115
|
+
<div class="display-flex gap-10 margin-bottom-15">
|
|
116
|
+
<button type="button" class="btn btn-default btn-xs btn-component active" tabindex="0">click</button>
|
|
117
|
+
<button type="button" class="btn btn-default btn-xs btn-component" tabindex="0">visibility</button>
|
|
118
|
+
<button type="button" class="btn btn-default btn-xs btn-component" tabindex="0">Disable value</button>
|
|
119
|
+
</div>
|
|
120
|
+
<button type="button" data-track-ga-event-trigger="click" data-track-ga-event-category="uikit demo" data-track-ga-event-action="button click" data-track-ga-event-label="utility_getTrackingAttributes_demo" data-track-ga-event-value="1" class="btn btn-primary btn-component" tabindex="0">Tracked button</button>
|
|
121
|
+
<pre class="margin-top-15 bg-white border rounded padding-10 text-size-12">{
|
|
122
|
+
"data-track-ga-event-trigger": "click",
|
|
123
|
+
"data-track-ga-event-category": "uikit demo",
|
|
124
|
+
"data-track-ga-event-action": "button click",
|
|
125
|
+
"data-track-ga-event-label": "utility_getTrackingAttributes_demo",
|
|
126
|
+
"data-track-ga-event-value": "1"
|
|
127
|
+
}</pre>
|
|
128
|
+
</div>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Imperative tracking
|
|
132
|
+
|
|
133
|
+
### Example: gaPush() and executeAndTrack()
|
|
134
|
+
|
|
135
|
+
gaPush() and executeAndTrack()
|
|
136
|
+
Use gaPush for direct imperative tracking, including hover interactions. Use executeAndTrack when the event should always be emitted together with a function call.
|
|
137
|
+
click visibility hover Disable value
|
|
138
|
+
Push event with gaPush executeAndTrack counter: 0 Clear dataLayer
|
|
139
|
+
[]
|
|
140
|
+
|
|
141
|
+
#### React (tsx)
|
|
142
|
+
|
|
143
|
+
```tsx
|
|
144
|
+
import { useMemo, useState } from 'react';
|
|
145
|
+
|
|
146
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
147
|
+
import { executeAndTrack, gaPush } from '@rio-cloud/rio-uikit/googleAnalyticsUtils';
|
|
148
|
+
|
|
149
|
+
type GaPushInteraction = 'click' | 'visibility' | 'hover';
|
|
150
|
+
|
|
151
|
+
const interactionOptions: GaPushInteraction[] = ['click', 'visibility', 'hover'];
|
|
152
|
+
|
|
153
|
+
const getDataLayer = () => {
|
|
154
|
+
if (typeof window === 'undefined') {
|
|
155
|
+
return [] as unknown[];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (!Array.isArray(window.dataLayer)) {
|
|
159
|
+
window.dataLayer = [];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return window.dataLayer;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const GoogleAnalyticsUtilsGaPushExample = () => {
|
|
166
|
+
const [interaction, setInteraction] = useState<GaPushInteraction>('click');
|
|
167
|
+
const [includeValue, setIncludeValue] = useState(true);
|
|
168
|
+
const [dataLayerSnapshot, setDataLayerSnapshot] = useState<unknown[]>(() => [...getDataLayer()]);
|
|
169
|
+
const [trackedCounter, setTrackedCounter] = useState(0);
|
|
170
|
+
|
|
171
|
+
const refreshDataLayer = () => {
|
|
172
|
+
setDataLayerSnapshot([...getDataLayer()]);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const trackedIncrement = useMemo(
|
|
176
|
+
() =>
|
|
177
|
+
executeAndTrack((value: number) => value + 1, {
|
|
178
|
+
category: 'uikit demo',
|
|
179
|
+
action: 'button click',
|
|
180
|
+
label: 'utility_executeAndTrack_demo',
|
|
181
|
+
value: 1,
|
|
182
|
+
}),
|
|
183
|
+
[]
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
const handleGaPush = () => {
|
|
187
|
+
gaPush({
|
|
188
|
+
category: 'uikit demo',
|
|
189
|
+
action: `manual ${interaction}`,
|
|
190
|
+
label: 'utility_gaPush_demo',
|
|
191
|
+
value: includeValue ? 1 : undefined,
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
refreshDataLayer();
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const handleExecuteAndTrack = () => {
|
|
198
|
+
const nextValue = trackedIncrement(trackedCounter);
|
|
199
|
+
setTrackedCounter(nextValue);
|
|
200
|
+
refreshDataLayer();
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const handleClearDataLayer = () => {
|
|
204
|
+
if (typeof window !== 'undefined') {
|
|
205
|
+
window.dataLayer = [];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
refreshDataLayer();
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
<div className='bg-white border rounded padding-15'>
|
|
213
|
+
<h4 className='margin-top-0'>gaPush() and executeAndTrack()</h4>
|
|
214
|
+
<p className='margin-bottom-15'>
|
|
215
|
+
Use <code>gaPush</code> for direct imperative tracking, including hover interactions. Use
|
|
216
|
+
<code>executeAndTrack</code> when the event should always be emitted together with a function call.
|
|
217
|
+
</p>
|
|
218
|
+
|
|
219
|
+
<div className='display-flex gap-10 margin-bottom-15'>
|
|
220
|
+
{interactionOptions.map(option => (
|
|
221
|
+
<Button
|
|
222
|
+
key={option}
|
|
223
|
+
bsSize='xs'
|
|
224
|
+
bsStyle='default'
|
|
225
|
+
className={option === interaction ? 'active' : ''}
|
|
226
|
+
onClick={() => setInteraction(option)}
|
|
227
|
+
>
|
|
228
|
+
{option}
|
|
229
|
+
</Button>
|
|
230
|
+
))}
|
|
231
|
+
<Button bsSize='xs' bsStyle='default' onClick={() => setIncludeValue(previousValue => !previousValue)}>
|
|
232
|
+
{includeValue ? 'Disable value' : 'Enable value'}
|
|
233
|
+
</Button>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<div className='display-flex gap-10 margin-bottom-15'>
|
|
237
|
+
<Button bsStyle='default' onClick={handleGaPush}>
|
|
238
|
+
Push event with gaPush
|
|
239
|
+
</Button>
|
|
240
|
+
<Button bsStyle='default' onClick={handleExecuteAndTrack}>
|
|
241
|
+
executeAndTrack counter: {trackedCounter}
|
|
242
|
+
</Button>
|
|
243
|
+
<Button bsStyle='muted' onClick={handleClearDataLayer}>
|
|
244
|
+
Clear dataLayer
|
|
245
|
+
</Button>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<pre className='bg-white border rounded padding-10 margin-bottom-0 text-size-12'>
|
|
249
|
+
{JSON.stringify(dataLayerSnapshot, null, 2)}
|
|
250
|
+
</pre>
|
|
251
|
+
</div>
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export default GoogleAnalyticsUtilsGaPushExample;
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### HTML (html)
|
|
259
|
+
|
|
260
|
+
```html
|
|
261
|
+
<div class="bg-white border rounded padding-15">
|
|
262
|
+
<h4 class="margin-top-0">gaPush() and executeAndTrack()</h4>
|
|
263
|
+
<p class="margin-bottom-15">Use <code>gaPush</code> for direct imperative tracking, including hover interactions. Use<code>executeAndTrack</code> when the event should always be emitted together with a function call.</p>
|
|
264
|
+
<div class="display-flex gap-10 margin-bottom-15">
|
|
265
|
+
<button type="button" class="btn btn-default btn-xs btn-component active" tabindex="0">click</button>
|
|
266
|
+
<button type="button" class="btn btn-default btn-xs btn-component" tabindex="0">visibility</button>
|
|
267
|
+
<button type="button" class="btn btn-default btn-xs btn-component" tabindex="0">hover</button>
|
|
268
|
+
<button type="button" class="btn btn-default btn-xs btn-component" tabindex="0">Disable value</button>
|
|
269
|
+
</div>
|
|
270
|
+
<div class="display-flex gap-10 margin-bottom-15">
|
|
271
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">Push event with gaPush</button>
|
|
272
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">executeAndTrack counter: 0</button>
|
|
273
|
+
<button type="button" class="btn btn-muted btn-component" tabindex="0">Clear dataLayer</button>
|
|
274
|
+
</div>
|
|
275
|
+
<pre class="bg-white border rounded padding-10 margin-bottom-0 text-size-12">[]</pre>
|
|
276
|
+
</div>
|
|
277
|
+
```
|
|
@@ -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-04-20T12:55:48.564Z
|
|
7
7
|
|
|
8
8
|
Utility helpers for parsing and serializing URL state. These are low-level building blocks for service-specific mapping.
|
|
9
9
|
|
|
@@ -86,7 +86,7 @@ type mapRouteProps = { sortBy : string ; sortDir : SortDirectionType ; columns :
|
|
|
86
86
|
* For reactive state sync, use the `useUrlState` hook instead.
|
|
87
87
|
*
|
|
88
88
|
* @example
|
|
89
|
-
* const url = makeRoute({ sortBy: 'name', sortDir: '
|
|
89
|
+
* const url = makeRoute({ sortBy: 'name', sortDir: 'asc', columns });
|
|
90
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
91
|
params . set ( 'sort' , serializedSort ) ; } } const mappedColumns = mapColumnsSettingsToStrings ( columns ) ; const serializedColumns = serializeValue ( mappedColumns , 'array' ) ; if ( serializedColumns ) {
|
|
92
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-04-20T12:55:50.203Z
|
|
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
|
|
|
@@ -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-04-20T12:55:52.817Z
|
|
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
|
|
|
@@ -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-04-20T12:56:05.114Z
|
|
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
|
|
|
@@ -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-04-20T12:55:53.014Z
|
|
7
7
|
|
|
8
8
|
The useClickOutside hook allows to easily detect events outside a referenced element.
|
|
9
9
|
|
|
@@ -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-04-20T12:55:58.502Z
|
|
7
7
|
|
|
8
8
|
The useClipboard hook allows to easily copy something to the browsers clipboard.
|
|
9
9
|
|
|
@@ -71,7 +71,7 @@ export default () => {
|
|
|
71
71
|
<span>Random UUID</span>
|
|
72
72
|
</label>
|
|
73
73
|
<div class="input-group">
|
|
74
|
-
<input id="random-uuid" class="form-control" type="text" value="
|
|
74
|
+
<input id="random-uuid" class="form-control" type="text" value="d002291b-7767-46e3-84f1-1fae4388f99c">
|
|
75
75
|
<div class="input-group-addon">
|
|
76
76
|
<button type="button" class="btn btn-muted btn-sm btn-icon-only btn-component position-absolute top-1 right-1" tabindex="0">
|
|
77
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-04-20T12:55:59.614Z
|
|
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
|
|
|
@@ -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-04-20T12:56:05.038Z
|
|
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
|
|
|
@@ -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-04-20T12:55:59.717Z
|
|
7
7
|
|
|
8
8
|
The useDarkMode hook enables you to listen for the color scheme change and react accordingly.
|
|
9
9
|
|
|
@@ -39,7 +39,8 @@ export default () => {
|
|
|
39
39
|
</div>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
#### Props
|
|
42
|
+
#### Props (json)
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
```json
|
|
45
|
+
isDarkMode
|
|
46
|
+
```
|
|
@@ -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-04-20T12:56:02.519Z
|
|
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
|
|
|
@@ -18,7 +18,7 @@ Debug Info: {
|
|
|
18
18
|
"renderCount": 1,
|
|
19
19
|
"changedProps": {},
|
|
20
20
|
"timeSinceLastRender": 0,
|
|
21
|
-
"lastRenderTimestamp":
|
|
21
|
+
"lastRenderTimestamp": 1776689761830
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
Toggle Increment
|
|
@@ -93,7 +93,7 @@ export default () => {
|
|
|
93
93
|
"renderCount": 1,
|
|
94
94
|
"changedProps": {},
|
|
95
95
|
"timeSinceLastRender": 0,
|
|
96
|
-
"lastRenderTimestamp":
|
|
96
|
+
"lastRenderTimestamp": 1776689761830
|
|
97
97
|
}</pre>
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|