view src/app/query-mode.ts @ 55:308c96f734c8 ng2-table

first steps to importing state from URL.
author casties
date Mon, 27 Mar 2017 14:17:55 +0200
parents b65a031c4967
children
line wrap: on
line source

export interface QueryMode {
    id: string;
    label: string;
}

export function getQueryModeById(id: string) {
    return QUERY_MODES.find((elem) => elem.id === id);
}

export var QUERY_MODES: QueryMode[] = [
    {id: 'type_is', label:'Object type is'},
    {id: 'att_contains', label: 'Attribute (contains)'},
    {id: 'att_contains_norm', label: 'Attribute (contains normalized)'},
    {id: 'att_num_range', label: 'Attribute (number range)'},    
    {id: 'relation_is', label: 'Relation type is'},
    {id: 'id_is', label: 'Object ID is'}
];

export var FIRST_QUERY_MODES: QueryMode[] = [
    {id: 'type_is', label:'Object type is'},
    {id: 'id_is', label: 'Object ID is'}
];