zulip/web/shared/src
N-Shar-ma b6a04aaa83 typeahead: Add option for word order not mattering for query matching.
Uptil now, the `query_matches_string_in_order` function would respect
the order of words in the query string when matching a source string.
This meant that for query "two one", the source string "one two three"
would not be matched.

For more flexibility, a new function, `query_matches_string_in_any_order`,
has been added., which returns true if each word in the query string matches
the prefix of a distinct word in the source string, else it returns false.

The algorithm for computing this is quadratic in terms of the source word
count so can be a little expensive, but it is only currently used for
searching topics in Recent Conversations, where the strings' length is
limited by the max stream / topic name length allowed, so this should be
performant enough for this use case.
2024-03-22 15:20:40 -07:00
..
fenced_code.ts shared: Avoid replaceAll again. 2023-05-25 22:39:12 -07:00
internal_url.js.flow web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
internal_url.ts ts: Convert internal_url.js to TypeScript. 2023-05-30 10:45:01 -07:00
poll_data.js.flow web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
poll_data.ts poll_data: Define outbound data types for each message type. 2023-10-23 09:33:47 -07:00
resolved_topic.js.flow web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
resolved_topic.ts ts: Convert resolved_topic.js to TypeScript. 2023-05-01 10:55:36 -07:00
typeahead.js.flow web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
typeahead.ts typeahead: Add option for word order not mattering for query matching. 2024-03-22 15:20:40 -07:00
typing_status.js.flow typing_status: Use TypeScript unions for 'Recipient' type. 2024-02-07 09:12:49 -08:00
typing_status.ts typing_status: Add an extra notification_event_type to Recipients. 2024-02-12 10:51:12 -08:00