refs #master Merge branch 'origin/master' into 14364-searchbar-arrow-navigation
authorDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 30 Oct 2018 12:45:23 +0000 (13:45 +0100)
committerDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 30 Oct 2018 12:45:23 +0000 (13:45 +0100)
# Conflicts:
# src/store/search-bar/search-bar-actions.ts

Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos@contractors.roche.com>

1  2 
src/store/search-bar/search-bar-actions.ts
src/store/search-results-panel/search-results-middleware-service.ts

index 088c92575f65d6942f91b108663c4137e07daaf4,aea75303bf06b8bbd1ea280717e991488032fe23..eb4239de7a9b69109e68e149bc589f12b2ec49cb
@@@ -26,13 -26,8 +26,13 @@@ export const searchBarActions = unioniz
      SET_SEARCH_RESULTS: ofType<GroupContentsResource[]>(),
      SET_SEARCH_VALUE: ofType<string>(),
      SET_SAVED_QUERIES: ofType<SearchBarAdvanceFormData[]>(),
 -    UPDATE_SAVED_QUERY: ofType<SearchBarAdvanceFormData[]>()
 -});
 +    SET_RECENT_QUERIES: ofType<string[]>(),
 +    UPDATE_SAVED_QUERY: ofType<SearchBarAdvanceFormData[]>(),
 +    SET_SELECTED_ITEM: ofType<string>(),
 +    MOVE_UP: ofType<{}>(),
 +    MOVE_DOWN: ofType<{}>(),
 +    SELECT_FIRST_ITEM: ofType<{}>()
- });
++}); 
  
  export type SearchBarActions = UnionOf<typeof searchBarActions>;
  
@@@ -57,16 -51,16 +57,16 @@@ export const loadRecentQueries = () =
      };
  
  export const searchData = (searchValue: string) =>
 -    async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
 +    async (dispatch: Dispatch, getState: () => RootState) => {
          const currentView = getState().searchBar.currentView;
          dispatch(searchBarActions.SET_SEARCH_VALUE(searchValue));
 -        dispatch(searchBarActions.SET_SEARCH_RESULTS([]));
 -        dispatch<any>(searchGroups(searchValue, 5, {}));
 -        if (currentView === SearchView.BASIC) {
 -            dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
 -            dispatch(navigateToSearchResults);
 +        if (searchValue.length > 0) {
-             dispatch<any>(searchGroups(searchValue));
++            dispatch<any>(searchGroups(searchValue, 5, {}));
 +            if (currentView === SearchView.BASIC) {
 +                dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
 +                dispatch(navigateToSearchResults);
 +            }
          }
 -
      };
  
  export const searchAdvanceData = (data: SearchBarAdvanceFormData) =>
@@@ -205,8 -210,12 +208,12 @@@ const buildUuidFilter = (type?: Resourc
      return type ? [type] : [ResourceKind.PROJECT, ResourceKind.COLLECTION, ResourceKind.PROCESS];
  };
  
+ const buildDateFilter = (date?: string): string => {
+     return date ? date : '';
+ };
  export const initAdvanceFormProjectsTree = () =>
 -    (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
 +    (dispatch: Dispatch) => {
          dispatch<any>(initUserProject(SEARCH_BAR_ADVANCE_FORM_PICKER_ID));
      };