()
| 43 | }; |
| 44 | |
| 45 | function writeSelectionToInput() { |
| 46 | const currentValue = $('[name="q"]').val() as string; |
| 47 | const parsedCurrentValue = parser.parse(currentValue, parserOptions) as SearchParserResult; |
| 48 | const q = parser.stringify({ |
| 49 | ...parsedCurrentValue, |
| 50 | ...keywords.reduce((acc, keyword) => ({ ...acc, [keyword]: selectedTags[keyword] }), {}), |
| 51 | text: parsedCurrentValue.text, |
| 52 | }, parserOptions); |
| 53 | $('[name="q"]').val(q); |
| 54 | } |
| 55 | |
| 56 | function updateSelection() { |
| 57 | selectedTags.category = _.uniq(selectedTags.category); |
no test coverage detected