Input string to parse (case-insensitive, whitespace-flexible)
Corresponding WorkType constant, or WORK_TYPES.UNSUPPORTED if not found
This function attempts to match the input string in multiple ways:
The matching is case-insensitive and handles various whitespace formats.
// From constant name (case-insensitive)
WorkType.fromString('ARTICLE');
// Returns: 'journal-article'
WorkType.fromString('conference paper');
// Returns: 'conference-paper'
// From actual type value
WorkType.fromString('journal-article');
// Returns: 'journal-article'
// Unknown types
WorkType.fromString('unknown-type');
// Returns: 'unsupported'
// Flexible whitespace handling
WorkType.fromString(' JOURNAL ARTICLE ');
// Returns: 'journal-article'
Parses a string into a valid WorkType constant.