@selfcommunity/react-ui 0.10.1-alpha.6 → 0.10.2-alpha.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/lib/cjs/components/EventForm/EventAddress.js +1 -1
- package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +3 -2
- package/lib/cjs/utils/string.js +1 -1
- package/lib/esm/components/EventForm/EventAddress.js +1 -1
- package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +3 -2
- package/lib/esm/utils/string.js +1 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +7 -7
|
@@ -77,7 +77,7 @@ function EventAddress(inProps) {
|
|
|
77
77
|
setGeoLocation(newValue);
|
|
78
78
|
forwardGeolocationData({
|
|
79
79
|
location,
|
|
80
|
-
geolocation: place.formatted_address,
|
|
80
|
+
geolocation: newValue.description.split(',')[0] + '. ' + place.formatted_address,
|
|
81
81
|
lat: place.geometry.location.lat,
|
|
82
82
|
lng: place.geometry.location.lng
|
|
83
83
|
});
|
|
@@ -108,11 +108,12 @@ function SearchAutocomplete(inProps) {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
const optionLabel = (option) => {
|
|
111
|
+
var _a, _b, _c, _d;
|
|
111
112
|
switch (option.type) {
|
|
112
113
|
case types_1.SuggestionType.CATEGORY:
|
|
113
|
-
return option[option.type]
|
|
114
|
+
return `${((_a = option[option.type]) === null || _a === void 0 ? void 0 : _a.name_synonyms) || ''} ${((_b = option[option.type]) === null || _b === void 0 ? void 0 : _b.name) || ''}`.trim();
|
|
114
115
|
case types_1.SuggestionType.USER:
|
|
115
|
-
return option[option.type]
|
|
116
|
+
return `${((_c = option[option.type]) === null || _c === void 0 ? void 0 : _c.username) || ''} ${((_d = option[option.type]) === null || _d === void 0 ? void 0 : _d.real_name) || ''}`.trim();
|
|
116
117
|
default:
|
|
117
118
|
return option[option.type]['name'];
|
|
118
119
|
}
|
package/lib/cjs/utils/string.js
CHANGED
|
@@ -75,7 +75,7 @@ export default function EventAddress(inProps) {
|
|
|
75
75
|
setGeoLocation(newValue);
|
|
76
76
|
forwardGeolocationData({
|
|
77
77
|
location,
|
|
78
|
-
geolocation: place.formatted_address,
|
|
78
|
+
geolocation: newValue.description.split(',')[0] + '. ' + place.formatted_address,
|
|
79
79
|
lat: place.geometry.location.lat,
|
|
80
80
|
lng: place.geometry.location.lng
|
|
81
81
|
});
|
|
@@ -106,11 +106,12 @@ export default function SearchAutocomplete(inProps) {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
const optionLabel = (option) => {
|
|
109
|
+
var _a, _b, _c, _d;
|
|
109
110
|
switch (option.type) {
|
|
110
111
|
case SuggestionType.CATEGORY:
|
|
111
|
-
return option[option.type]
|
|
112
|
+
return `${((_a = option[option.type]) === null || _a === void 0 ? void 0 : _a.name_synonyms) || ''} ${((_b = option[option.type]) === null || _b === void 0 ? void 0 : _b.name) || ''}`.trim();
|
|
112
113
|
case SuggestionType.USER:
|
|
113
|
-
return option[option.type]
|
|
114
|
+
return `${((_c = option[option.type]) === null || _c === void 0 ? void 0 : _c.username) || ''} ${((_d = option[option.type]) === null || _d === void 0 ? void 0 : _d.real_name) || ''}`.trim();
|
|
114
115
|
default:
|
|
115
116
|
return option[option.type]['name'];
|
|
116
117
|
}
|
package/lib/esm/utils/string.js
CHANGED