@ews-admin/global-design-system 1.33.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/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@ews-admin/global-design-system",
3
- "version": "1.33.0",
3
+ "version": "1.35.0",
4
4
  "description": "EWS Global Design System - Reusable components for EWS applications",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",
8
+ "sideEffects": [
9
+ "**/*.css"
10
+ ],
8
11
  "files": [
9
12
  "dist",
10
13
  "src",
@@ -29,6 +29,11 @@ interface SearchAutocompleteProps<T extends SearchableEntity> {
29
29
  * callers that do not pass it keep today's placeholder.
30
30
  */
31
31
  getMinCharactersHint?: (minSearchLength: number) => string | null;
32
+ /**
33
+ * MED-1690: message shown when the search returns nothing. Defaults to the English
34
+ * "No results found. Try a different search term.", so callers that do not pass it are unchanged.
35
+ */
36
+ noResultsText?: string;
32
37
  }
33
38
 
34
39
  export function SearchAutocomplete<T extends SearchableEntity>({
@@ -45,6 +50,7 @@ export function SearchAutocomplete<T extends SearchableEntity>({
45
50
  debounceTime = 300,
46
51
  error,
47
52
  getMinCharactersHint = (min) => `(min. ${min} characters)`,
53
+ noResultsText = "No results found. Try a different search term.",
48
54
  }: SearchAutocompleteProps<T>) {
49
55
  const [searchTerm, setSearchTerm] = useState("");
50
56
  const [entities, setEntities] = useState<T[]>([]);
@@ -309,7 +315,7 @@ export function SearchAutocomplete<T extends SearchableEntity>({
309
315
  <div className="absolute z-10 p-4 mt-1 w-full text-center text-gray-500 bg-white rounded-md shadow-lg">
310
316
  {debouncedSearchTerm.length < minSearchLength
311
317
  ? `Type at least ${minSearchLength} characters to search`
312
- : "No results found. Try a different search term."}
318
+ : noResultsText}
313
319
  </div>
314
320
  )}
315
321