21288: new api request if wf is not in top 100 list Arvados-DCO-1.1-Signed-off-by...
[arvados.git] / services / workbench2 / src / store / vocabulary / vocabulary-selectors.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { PropertiesState, getProperty } from 'store/properties/properties';
6 import { Vocabulary } from 'models/vocabulary';
7
8 export const VOCABULARY_PROPERTY_NAME = 'vocabulary';
9
10 export const DEFAULT_VOCABULARY: Vocabulary = {
11     strict_tags: false,
12     tags: {},
13 };
14
15 export const getVocabulary = (state: PropertiesState) =>
16     getProperty<Vocabulary>(VOCABULARY_PROPERTY_NAME)(state) || DEFAULT_VOCABULARY;