@widergy/mobile-ui 1.34.0 → 1.35.0
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.35.0](https://github.com/widergy/mobile-ui/compare/v1.34.0...v1.35.0) (2025-01-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* added util for generating Flow Id's ([5db21ef](https://github.com/widergy/mobile-ui/commit/5db21ef0002558c272641928ea80e94c6ee85ce0))
|
|
7
|
+
|
|
1
8
|
# [1.34.0](https://github.com/widergy/mobile-ui/compare/v1.33.4...v1.34.0) (2025-01-27)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -59,6 +59,27 @@ export const store = createStore(
|
|
|
59
59
|
);
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
## `analyticsUtils.generateFlowId`
|
|
63
|
+
|
|
64
|
+
Generates a `flowId` that can be used to track a user's flow through the app (To either identify the session or the user's device).
|
|
65
|
+
|
|
66
|
+
### Type: `:string()`
|
|
67
|
+
|
|
68
|
+
### Params
|
|
69
|
+
|
|
70
|
+
No params required.
|
|
71
|
+
|
|
72
|
+
#### Example
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
import { generateFlowId } from '@widergy/mobile-ui';
|
|
76
|
+
|
|
77
|
+
const handleSessionTimeout = () => {
|
|
78
|
+
const flowId = generateFlowId();
|
|
79
|
+
dispatch({ type: 'SET_SESSION_FLOW_ID', payload: { flowId } });
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
62
83
|
## `analyticsUtils.tracker`
|
|
63
84
|
|
|
64
85
|
Implemented inside the `middleware` returned by `analyticsUtils.createAnalyticsMiddleware`. Can be used individually to track events outside of redux.
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* */
|
|
6
6
|
|
|
7
7
|
import { isEmpty, merge } from 'lodash';
|
|
8
|
+
import uuid from 'react-native-uuid';
|
|
8
9
|
|
|
9
10
|
const LOG_EVENT = 'LOG_EVENT';
|
|
10
11
|
const SET_CURRENT_SCREEN = 'SET_CURRENT_SCREEN';
|
|
@@ -146,8 +147,13 @@ export const intercomUpdateUser = intercomInstance => userProperties => {
|
|
|
146
147
|
if (intercomInstance) intercomInstance.updateUser(userProperties);
|
|
147
148
|
};
|
|
148
149
|
|
|
150
|
+
export const generateFlowId = () => {
|
|
151
|
+
return uuid.v4();
|
|
152
|
+
};
|
|
153
|
+
|
|
149
154
|
export default {
|
|
150
155
|
createAnalyticsMiddleware,
|
|
156
|
+
generateFlowId,
|
|
151
157
|
intercomSingleEvent,
|
|
152
158
|
intercomUpdateUser,
|
|
153
159
|
mixpanelEventsFlush,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@widergy/mobile-ui",
|
|
3
3
|
"description": "Widergy Mobile Components",
|
|
4
4
|
"author": "widergy",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.35.0",
|
|
6
6
|
"repository": "https://github.com/widergy/mobile-ui.git",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"files": [
|
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
"react-native-linear-gradient": "^2.8.3",
|
|
49
49
|
"react-native-markdown-display": "^7.0.0-alpha.2",
|
|
50
50
|
"react-native-modal": "^13.0.1",
|
|
51
|
-
"react-native-pager-view": "^6.2.
|
|
51
|
+
"react-native-pager-view": "^6.2.0",
|
|
52
52
|
"react-native-safe-area-context": "^4.5.0",
|
|
53
|
-
"react-native-svg": "^13.
|
|
53
|
+
"react-native-svg": "^13.0.0",
|
|
54
|
+
"react-native-uuid": "^2.0.3"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@babel/cli": "^7.22.10",
|