@selfcommunity/react-ui 0.10.1 → 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.
@@ -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]['name_synonyms'] || option[option.type]['name'];
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]['username'] && option[option.type]['real_name'];
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
  }
@@ -12,7 +12,7 @@ const formatEventLocationGeolocation = (geolocation, isTitle) => {
12
12
  if (!geolocation) {
13
13
  return null;
14
14
  }
15
- const parts = geolocation.split(',');
15
+ const parts = geolocation.split('.');
16
16
  if (isTitle) {
17
17
  return parts[0].trim();
18
18
  }
@@ -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]['name_synonyms'] || option[option.type]['name'];
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]['username'] && option[option.type]['real_name'];
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
  }
@@ -8,7 +8,7 @@ export const formatEventLocationGeolocation = (geolocation, isTitle) => {
8
8
  if (!geolocation) {
9
9
  return null;
10
10
  }
11
- const parts = geolocation.split(',');
11
+ const parts = geolocation.split('.');
12
12
  if (isTitle) {
13
13
  return parts[0].trim();
14
14
  }