@widergy/mobile-ui 1.21.1 → 1.22.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.22.0](https://github.com/widergy/mobile-ui/compare/v1.21.1...v1.22.0) (2024-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * adds intercom related functions ([#351](https://github.com/widergy/mobile-ui/issues/351)) ([b85946f](https://github.com/widergy/mobile-ui/commit/b85946f2a3d1bfc8d255ed988aea9f5b3999ca31))
7
+
1
8
  ## [1.21.1](https://github.com/widergy/mobile-ui/compare/v1.21.0...v1.21.1) (2024-08-29)
2
9
 
3
10
 
@@ -123,8 +123,19 @@ export const singleEventMultitracking = (trackers, eventDefinitions) => (name, e
123
123
  });
124
124
  };
125
125
 
126
+ export const intercomSingleEvent = trackEventFunction => eventData => {
127
+ const { name, ...eventMetadata } = eventData;
128
+ if (trackEventFunction) trackEventFunction(name, eventMetadata);
129
+ };
130
+
131
+ export const intercomUpdateUser = updaterFunction => userProperties => {
132
+ updaterFunction(userProperties);
133
+ };
134
+
126
135
  export default {
127
136
  createAnalyticsMiddleware,
137
+ intercomSingleEvent,
138
+ intercomUpdateUser,
128
139
  mixpanelEventsFlush,
129
140
  mixpanelPeopleSet,
130
141
  mixpanelSuperPropertiesRegister,
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.21.1",
5
+ "version": "1.22.0",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [