@widergy/mobile-ui 1.26.2 → 1.26.4
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,17 @@
|
|
|
1
|
+
## [1.26.4](https://github.com/widergy/mobile-ui/compare/v1.26.3...v1.26.4) (2024-10-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* utselect options update ([#362](https://github.com/widergy/mobile-ui/issues/362)) ([e6ccae1](https://github.com/widergy/mobile-ui/commit/e6ccae11b2e78183d426ef42af09bf2636a83fc0))
|
|
7
|
+
|
|
8
|
+
## [1.26.3](https://github.com/widergy/mobile-ui/compare/v1.26.2...v1.26.3) (2024-09-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* mixpanel utility id ([#364](https://github.com/widergy/mobile-ui/issues/364)) ([bf59559](https://github.com/widergy/mobile-ui/commit/bf59559b108f847dc010b5a5c180610cecb3f3b7))
|
|
14
|
+
|
|
1
15
|
## [1.26.2](https://github.com/widergy/mobile-ui/compare/v1.26.1...v1.26.2) (2024-09-30)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -38,6 +38,8 @@ const UTSelect = ({
|
|
|
38
38
|
suffix,
|
|
39
39
|
title,
|
|
40
40
|
value,
|
|
41
|
+
onChangeSearchTerm,
|
|
42
|
+
disableFilterOptions,
|
|
41
43
|
withAutoReset
|
|
42
44
|
}) => {
|
|
43
45
|
const [bottomSheetVisible, setBottomSheetVisible] = useState(false);
|
|
@@ -47,6 +49,15 @@ const UTSelect = ({
|
|
|
47
49
|
|
|
48
50
|
const validationData = useMemo(() => error && formatErrorToValidation(error), [error]);
|
|
49
51
|
|
|
52
|
+
const handleOnChangeSearchTerm = newSearchTerm => {
|
|
53
|
+
onChangeSearchTerm?.(newSearchTerm);
|
|
54
|
+
setSearchTerm(newSearchTerm);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
setSortedOptions(options);
|
|
59
|
+
}, [options]);
|
|
60
|
+
|
|
50
61
|
const sortOptions = useCallback(() => {
|
|
51
62
|
const selectedOptionsList = [];
|
|
52
63
|
const unselectedOptionsList = [];
|
|
@@ -99,8 +110,11 @@ const UTSelect = ({
|
|
|
99
110
|
}, [value, options, multiple]);
|
|
100
111
|
|
|
101
112
|
const filteredOptions = useMemo(
|
|
102
|
-
() =>
|
|
103
|
-
|
|
113
|
+
() =>
|
|
114
|
+
disableFilterOptions
|
|
115
|
+
? sortedOptions
|
|
116
|
+
: sortedOptions.filter(option => option.label.toLowerCase().includes(searchTerm.toLowerCase())),
|
|
117
|
+
[sortedOptions, searchTerm, disableFilterOptions]
|
|
104
118
|
);
|
|
105
119
|
|
|
106
120
|
const clearAction = {
|
|
@@ -165,7 +179,7 @@ const UTSelect = ({
|
|
|
165
179
|
>
|
|
166
180
|
<View style={styles.bottomSheetBodyContainer}>
|
|
167
181
|
<UTSearchField
|
|
168
|
-
onChange={
|
|
182
|
+
onChange={handleOnChangeSearchTerm}
|
|
169
183
|
placeholder={searchPlaceholder}
|
|
170
184
|
value={searchTerm}
|
|
171
185
|
variant="gray"
|
|
@@ -67,13 +67,13 @@ export const multiTracking = trackerArgumentsArray =>
|
|
|
67
67
|
createAnalyticsMiddleware(trackerArguments.eventsMapper, trackerArguments.analytics)
|
|
68
68
|
);
|
|
69
69
|
|
|
70
|
-
export const mixpanelUserIdentify = mixpanelInstance => userProfileProperties => {
|
|
71
|
-
const { id, externalId = '' } = userProfileProperties;
|
|
70
|
+
export const mixpanelUserIdentify = mixpanelInstance => (userProfileProperties, utilityId) => {
|
|
71
|
+
const { id, externalId = '', email } = userProfileProperties;
|
|
72
72
|
if (mixpanelInstance) {
|
|
73
|
-
mixpanelInstance.identify(`${id}${externalId}`);
|
|
73
|
+
mixpanelInstance.identify(`${utilityId}${id}${externalId}`);
|
|
74
74
|
mixpanelInstance.getPeople().set({
|
|
75
|
-
$name: `${id}${externalId}`,
|
|
76
|
-
$email: null,
|
|
75
|
+
$name: `${utilityId}${id}${externalId}`,
|
|
76
|
+
$email: email ?? null,
|
|
77
77
|
...userProfileProperties
|
|
78
78
|
});
|
|
79
79
|
}
|
package/package.json
CHANGED