@ews-admin/global-design-system 1.32.0 → 1.34.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@ews-admin/global-design-system",
3
- "version": "1.32.0",
3
+ "version": "1.34.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",
@@ -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
 
@@ -1,7 +1,7 @@
1
1
  import { useCallback, useEffect, useRef, useState } from "react";
2
2
 
3
3
  export interface UseIdleLockOptions {
4
- /** Inactivity delay before locking. Default 3 minutes. */
4
+ /** Inactivity delay before locking. Default 15 minutes. */
5
5
  timeoutMs?: number;
6
6
  /** Called each time the screen becomes locked (idle, `lock()` or another tab). */
7
7
  onLock?: () => void;
@@ -17,7 +17,7 @@ export interface UseIdleLockResult {
17
17
  unlock: () => void;
18
18
  }
19
19
 
20
- const DEFAULT_TIMEOUT_MS = 180_000;
20
+ const DEFAULT_TIMEOUT_MS = 900_000;
21
21
  const DEFAULT_STORAGE_KEY = "ews-idle-lock";
22
22
  const ACTIVITY_WRITE_INTERVAL_MS = 5_000;
23
23
  const ACTIVITY_EVENTS = [