"@types/react-dnd": "3.0.2",
"@types/react-dropzone": "4.2.2",
"@types/react-highlight-words": "0.12.0",
- "@types/redux-form": "7.4.5",
+ "@types/redux-form": "7.4.12",
"@types/reselect": "2.2.0",
"@types/shell-quote": "1.6.0",
"axios": "0.18.0",
"start": "react-scripts-ts start",
"build": "REACT_APP_BUILD_NUMBER=$BUILD_NUMBER REACT_APP_GIT_COMMIT=$GIT_COMMIT react-scripts-ts build",
"test": "CI=true react-scripts-ts test --env=jsdom",
+ "test:watch": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject",
"lint": "tslint src/** -t verbose",
"build-css": "node-sass-chokidar src/ -o src/",
import { dialogActions } from '../../dialog/dialog-actions';
import { getNodeValue } from "~/models/tree";
import { filterCollectionFilesBySelection } from './collection-panel-files-state';
-import { startSubmit, stopSubmit, reset, initialize } from 'redux-form';
+import { startSubmit, stopSubmit, reset, initialize, FormErrors } from 'redux-form';
import { getDialog } from "~/store/dialog/dialog-reducer";
import { getFileFullPath } from "~/services/collection-service/collection-service-files-response";
import { resourcesDataActions } from "~/store/resources-data/resources-data-actions";
dispatch(dialogActions.CLOSE_DIALOG({ id: RENAME_FILE_DIALOG }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'File name changed.', hideDuration: 2000 }));
} catch (e) {
- dispatch(stopSubmit(RENAME_FILE_DIALOG, { name: 'Could not rename the file' }));
+ const errors: FormErrors<RenameFileDialogData, string> = {
+ name: 'Could not rename the file'
+ };
+ dispatch(stopSubmit(RENAME_FILE_DIALOG, errors));
}
}
}
import { Dispatch } from "redux";
import { dialogActions } from "~/store/dialog/dialog-actions";
-import { initialize, startSubmit, stopSubmit } from 'redux-form';
+import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions';
import { RootState } from '~/store/store';
import { ServiceRepository } from '~/services/services';
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_COPY_FORM_NAME, { ownerUuid: 'A collection with the same name already exists in the target project.' }));
+ dispatch(stopSubmit(
+ COLLECTION_COPY_FORM_NAME,
+ { ownerUuid: 'A collection with the same name already exists in the target project.' } as FormErrors
+ ));
} else {
dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_COPY_FORM_NAME }));
throw new Error('Could not copy the collection.');
// SPDX-License-Identifier: AGPL-3.0
import { Dispatch } from "redux";
-import { reset, startSubmit, stopSubmit, initialize } from 'redux-form';
+import { reset, startSubmit, stopSubmit, initialize, FormErrors } from 'redux-form';
import { RootState } from '~/store/store';
import { dialogActions } from "~/store/dialog/dialog-actions";
import { ServiceRepository } from '~/services/services';
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_CREATE_FORM_NAME, { name: 'Collection with the same name already exists.' }));
+ dispatch(stopSubmit(COLLECTION_CREATE_FORM_NAME, { name: 'Collection with the same name already exists.' } as FormErrors));
}
dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_CREATE_FORM_NAME));
return;
import { Dispatch } from "redux";
import { dialogActions } from "~/store/dialog/dialog-actions";
-import { startSubmit, stopSubmit, initialize } from 'redux-form';
+import { startSubmit, stopSubmit, initialize, FormErrors } from 'redux-form';
import { ServiceRepository } from '~/services/services';
import { RootState } from '~/store/store';
import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_MOVE_FORM_NAME, { ownerUuid: 'A collection with the same name already exists in the target project.' }));
+ dispatch(stopSubmit(COLLECTION_MOVE_FORM_NAME, { ownerUuid: 'A collection with the same name already exists in the target project.' } as FormErrors));
} else {
dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_MOVE_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not move the collection.', hideDuration: 2000 }));
import { Dispatch } from 'redux';
import { RootState } from '~/store/store';
-import { initialize, startSubmit, stopSubmit } from 'redux-form';
+import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions';
import { dialogActions } from '~/store/dialog/dialog-actions';
import { ServiceRepository } from '~/services/services';
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_PARTIAL_COPY_FORM_NAME, { name: 'Collection with this name already exists.' }));
+ dispatch(stopSubmit(COLLECTION_PARTIAL_COPY_FORM_NAME, { name: 'Collection with this name already exists.' } as FormErrors));
} else if (error === CommonResourceServiceError.UNKNOWN) {
dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not create a copy of collection', hideDuration: 2000 }));
// SPDX-License-Identifier: AGPL-3.0
import { Dispatch } from "redux";
-import { initialize, startSubmit, stopSubmit } from 'redux-form';
+import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
import { RootState } from "~/store/store";
import { collectionPanelActions } from "~/store/collection-panel/collection-panel-action";
import { dialogActions } from "~/store/dialog/dialog-actions";
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_UPDATE_FORM_NAME, { name: 'Collection with the same name already exists.' }));
+ dispatch(stopSubmit(COLLECTION_UPDATE_FORM_NAME, { name: 'Collection with the same name already exists.' } as FormErrors));
}
dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_UPDATE_FORM_NAME));
return;
import { Dispatch } from "redux";
import { dialogActions } from "~/store/dialog/dialog-actions";
-import { startSubmit, stopSubmit, initialize } from 'redux-form';
+import { startSubmit, stopSubmit, initialize, FormErrors } from 'redux-form';
import { ServiceRepository } from '~/services/services';
import { RootState } from '~/store/store';
import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(PROCESS_MOVE_FORM_NAME, { ownerUuid: 'A process with the same name already exists in the target project.' }));
+ dispatch(stopSubmit(PROCESS_MOVE_FORM_NAME, { ownerUuid: 'A process with the same name already exists in the target project.' } as FormErrors));
} else if (error === CommonResourceServiceError.MODIFYING_CONTAINER_REQUEST_FINAL_STATE) {
- dispatch(stopSubmit(PROCESS_MOVE_FORM_NAME, { ownerUuid: 'You can move only draft processes.' }));
+ dispatch(stopSubmit(PROCESS_MOVE_FORM_NAME, { ownerUuid: 'You can move only draft processes.' } as FormErrors));
} else {
dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_MOVE_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not move the process.', hideDuration: 2000 }));
}
return;
}
- };
\ No newline at end of file
+ };
// SPDX-License-Identifier: AGPL-3.0
import { Dispatch } from "redux";
-import { initialize, startSubmit, stopSubmit } from 'redux-form';
+import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
import { RootState } from "~/store/store";
import { dialogActions } from "~/store/dialog/dialog-actions";
import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(PROCESS_UPDATE_FORM_NAME, { name: 'Process with the same name already exists.' }));
+ dispatch(stopSubmit(PROCESS_UPDATE_FORM_NAME, { name: 'Process with the same name already exists.' } as FormErrors));
} else if (error === CommonResourceServiceError.MODIFYING_CONTAINER_REQUEST_FINAL_STATE) {
- dispatch(stopSubmit(PROCESS_UPDATE_FORM_NAME, { name: 'You cannot modified in "Final" state.' }));
+ dispatch(stopSubmit(PROCESS_UPDATE_FORM_NAME, { name: 'You cannot modified in "Final" state.' } as FormErrors));
} else {
dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_UPDATE_FORM_NAME }));
dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not update the process.', hideDuration: 2000 }));
}
return;
}
- };
\ No newline at end of file
+ };
// SPDX-License-Identifier: AGPL-3.0
import { Dispatch } from "redux";
-import { reset, startSubmit, stopSubmit, initialize } from 'redux-form';
+import { reset, startSubmit, stopSubmit, initialize, FormErrors } from 'redux-form';
import { RootState } from '~/store/store';
import { dialogActions } from "~/store/dialog/dialog-actions";
import { getCommonResourceServiceError, CommonResourceServiceError } from '~/services/common-service/common-resource-service';
dispatch(initialize(PROJECT_CREATE_FORM_NAME, { userUuid }));
} else {
dispatch(initialize(PROJECT_CREATE_FORM_NAME, { ownerUuid }));
- }
+ }
dispatch(dialogActions.OPEN_DIALOG({ id: PROJECT_CREATE_FORM_NAME, data: {} }));
};
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(PROJECT_CREATE_FORM_NAME, { name: 'Project with the same name already exists.' }));
+ dispatch(stopSubmit(PROJECT_CREATE_FORM_NAME, { name: 'Project with the same name already exists.' } as FormErrors));
}
return undefined;
}
import { Dispatch } from "redux";
import { dialogActions } from "~/store/dialog/dialog-actions";
-import { startSubmit, stopSubmit, initialize } from 'redux-form';
+import { startSubmit, stopSubmit, initialize, FormErrors } from 'redux-form';
import { ServiceRepository } from '~/services/services';
import { RootState } from '~/store/store';
import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'A project with the same name already exists in the target project.' }));
+ dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'A project with the same name already exists in the target project.' } as FormErrors));
} else if (error === CommonResourceServiceError.OWNERSHIP_CYCLE) {
- dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'Cannot move a project into itself.' }));
+ dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'Cannot move a project into itself.' } as FormErrors));
} else {
dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_MOVE_FORM_NAME }));
throw new Error('Could not move the project.');
// SPDX-License-Identifier: AGPL-3.0
import { Dispatch } from "redux";
-import { initialize, startSubmit, stopSubmit } from 'redux-form';
+import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
import { RootState } from "~/store/store";
import { dialogActions } from "~/store/dialog/dialog-actions";
import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
} catch (e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(PROJECT_UPDATE_FORM_NAME, { name: 'Project with the same name already exists.' }));
+ dispatch(stopSubmit(PROJECT_UPDATE_FORM_NAME, { name: 'Project with the same name already exists.' } as FormErrors));
}
return ;
}
--- /dev/null
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { parseQuery } from "~/store/search-bar/search-bar-actions";
+
+describe('search-bar-actions', () => {
+ it('should correctly parse query #1', () => {
+ const q = 'val0 is:trashed val1';
+ const r = parseQuery(q);
+ expect(r.hasKeywords).toBeTruthy();
+ expect(r.values).toEqual(['val0', 'val1']);
+ expect(r.properties).toEqual({
+ is: 'trashed'
+ });
+ });
+
+ it('should correctly parse query #2 (value with keyword should be ignored)', () => {
+ const q = 'val0 is:from:trashed val1';
+ const r = parseQuery(q);
+ expect(r.hasKeywords).toBeTruthy();
+ expect(r.values).toEqual(['val0', 'val1']);
+ expect(r.properties).toEqual({
+ from: 'trashed'
+ });
+ });
+
+ it('should correctly parse query #3 (many keywords)', () => {
+ const q = 'val0 is:trashed val2 from:2017-04-01 val1';
+ const r = parseQuery(q);
+ expect(r.hasKeywords).toBeTruthy();
+ expect(r.values).toEqual(['val0', 'val2', 'val1']);
+ expect(r.properties).toEqual({
+ is: 'trashed',
+ from: '2017-04-01'
+ });
+ });
+
+ it('should correctly parse query #4 (no duplicated values)', () => {
+ const q = 'val0 is:trashed val2 val2 val0';
+ const r = parseQuery(q);
+ expect(r.hasKeywords).toBeTruthy();
+ expect(r.values).toEqual(['val0', 'val2']);
+ expect(r.properties).toEqual({
+ is: 'trashed'
+ });
+ });
+});
import { navigateToSearchResults, navigateTo } from '~/store/navigation/navigation-action';
import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
import { initialize } from 'redux-form';
-import { SearchBarAdvanceFormData, PropertyValues } from '~/models/search-bar';
+import { SearchBarAdvanceFormData, PropertyValues, ClusterObjectType } from '~/models/search-bar';
import { debounce } from 'debounce';
+import * as _ from "lodash";
export const searchBarActions = unionize({
SET_CURRENT_VIEW: ofType<string>(),
const currentView = getState().searchBar.currentView;
dispatch(searchBarActions.SET_SEARCH_VALUE(searchValue));
if (searchValue.length > 0) {
- dispatch<any>(searchGroups(searchValue, 5, {}));
+ dispatch<any>(searchGroups(searchValue, 5));
if (currentView === SearchView.BASIC) {
dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
dispatch(navigateToSearchResults);
dispatch(navigateToSearchResults);
};
+export const setSearchValueFromAdvancedData = (data: SearchBarAdvanceFormData, prevData: SearchBarAdvanceFormData) =>
+ (dispatch: Dispatch) => {
+ let value = '';
+ if (data.type) {
+ value += ` type:${data.type}`;
+ }
+ if (data.cluster) {
+ value += ` cluster:${data.cluster}`;
+ }
+ if (data.projectUuid) {
+ value += ` project:${data.projectUuid}`;
+ }
+ if (data.inTrash) {
+ value += ` is:trashed`;
+ }
+ if (data.dateFrom) {
+ value += ` from:${data.dateFrom}`;
+ }
+ if (data.dateTo) {
+ value += ` from:${data.dateTo}`;
+ }
+ value = value.substr(1) + data.searchQuery;
+ dispatch(searchBarActions.SET_SEARCH_VALUE(value));
+ };
+
const saveQuery = (data: SearchBarAdvanceFormData) =>
(dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
const savedQueries = services.searchService.getSavedQueries();
dispatch<any>(searchData(searchValue));
};
-const searchGroups = (searchValue: string, limit: number, {...props}) =>
+const searchGroups = (searchValue: string, limit: number) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const currentView = getState().searchBar.currentView;
if (searchValue || currentView === SearchView.ADVANCED) {
- const filters = getFilters('name', searchValue, props);
+ const filters = getFilters('name', searchValue);
const { items } = await services.groupsService.contents('', {
filters,
limit,
}
};
-export const getFilters = (filterName: string, searchValue: string, props: any): string => {
- const { resourceKind, dateTo, dateFrom } = props;
- return new FilterBuilder()
- .addIsA("uuid", buildUuidFilter(resourceKind))
- .addILike(filterName, searchValue, GroupContentsResourcePrefix.COLLECTION)
- .addILike(filterName, searchValue, GroupContentsResourcePrefix.PROCESS)
- .addILike(filterName, searchValue, GroupContentsResourcePrefix.PROJECT)
- .addLte('modified_at', buildDateFilter(dateTo))
- .addGte('modified_at', buildDateFilter(dateFrom))
+export const parseQuery: (searchValue: string) => { hasKeywords: boolean; values: string[]; properties: any } = (searchValue: string) => {
+ const keywords = [
+ 'type:',
+ 'cluster:',
+ 'project:',
+ 'is:',
+ 'from:',
+ 'to:'
+ ];
+
+ const hasKeywords = (search: string) => keywords.reduce((acc, keyword) => acc + search.indexOf(keyword) >= 0 ? 1 : 0, 0);
+ let keywordsCnt = 0;
+
+ const properties = {};
+
+ keywords.forEach(k => {
+ const p = searchValue.indexOf(k);
+ const l = searchValue.length;
+ if (p >= 0) {
+ keywordsCnt += 1;
+
+ let v = '';
+ let i = p + k.length;
+ while (i < l && searchValue[i] === ' ') {
+ ++i;
+ }
+ const vp = i;
+ while (i < l && searchValue[i] !== ' ') {
+ v += searchValue[i];
+ ++i;
+ }
+
+ if (hasKeywords(v)) {
+ searchValue = searchValue.substr(0, p) + searchValue.substr(vp);
+ } else {
+ if (v !== '') {
+ properties[k.substr(0, k.length - 1)] = v;
+ }
+ searchValue = searchValue.substr(0, p) + searchValue.substr(i);
+ }
+ }
+ });
+
+ const values = _.uniq(searchValue.split(' ').filter(v => v.length > 0));
+
+ return { hasKeywords: keywordsCnt > 0, values, properties };
+};
+
+export const getFilters = (filterName: string, searchValue: string): string => {
+ const filter = new FilterBuilder();
+
+ const pq = parseQuery(searchValue);
+
+ if (!pq.hasKeywords) {
+ filter
+ .addILike(filterName, searchValue, GroupContentsResourcePrefix.COLLECTION)
+ .addILike(filterName, searchValue, GroupContentsResourcePrefix.PROCESS)
+ .addILike(filterName, searchValue, GroupContentsResourcePrefix.PROJECT);
+ } else {
+
+ if (pq.properties.type) {
+ pq.values.forEach(v => {
+ let prefix = '';
+ switch (ResourceKind[pq.properties.type]) {
+ case ResourceKind.PROJECT:
+ prefix = GroupContentsResourcePrefix.PROJECT;
+ break;
+ case ResourceKind.COLLECTION:
+ prefix = GroupContentsResourcePrefix.COLLECTION;
+ break;
+ case ResourceKind.PROCESS:
+ prefix = GroupContentsResourcePrefix.PROCESS;
+ break;
+ }
+ if (prefix !== '') {
+ filter.addILike(filterName, v, prefix);
+ }
+ });
+ } else {
+ pq.values.forEach(v => {
+ filter
+ .addILike(filterName, v, GroupContentsResourcePrefix.COLLECTION)
+ .addILike(filterName, v, GroupContentsResourcePrefix.PROCESS)
+ .addILike(filterName, v, GroupContentsResourcePrefix.PROJECT);
+ });
+ }
+
+ if (pq.properties.is && pq.properties.is === 'trashed') {
+ }
+
+ if (pq.properties.project) {
+ filter.addEqual('owner_uuid', pq.properties.project, GroupContentsResourcePrefix.PROJECT);
+ }
+
+ if (pq.properties.from) {
+ filter.addGte('modified_at', buildDateFilter(pq.properties.from));
+ }
+
+ if (pq.properties.to) {
+ filter.addLte('modified_at', buildDateFilter(pq.properties.to));
+ }
+ // filter
+ // .addIsA("uuid", buildUuidFilter(resourceKind))
+ // .addILike(filterName, searchValue, GroupContentsResourcePrefix.COLLECTION)
+ // .addILike(filterName, searchValue, GroupContentsResourcePrefix.PROCESS)
+ // .addILike(filterName, searchValue, GroupContentsResourcePrefix.PROJECT)
+ // .addLte('modified_at', buildDateFilter(dateTo))
+ // .addGte('modified_at', buildDateFilter(dateFrom))
+ // .addEqual('groupClass', GroupClass.PROJECT, GroupContentsResourcePrefix.PROJECT)
+ }
+
+ return filter
.addEqual('groupClass', GroupClass.PROJECT, GroupContentsResourcePrefix.PROJECT)
.getFilters();
};
export const getParams = (dataExplorer: DataExplorer, searchValue: string) => ({
...dataExplorerToListParams(dataExplorer),
- filters: getFilters('name', searchValue, {}),
+ filters: getFilters('name', searchValue),
order: getOrder(dataExplorer)
});
import { reduxForm, InjectedFormProps, reset } from 'redux-form';
import { compose, Dispatch } from 'redux';
import { Paper, StyleRulesCallback, withStyles, WithStyles, Button, Grid, IconButton, CircularProgress } from '@material-ui/core';
-import { SEARCH_BAR_ADVANCE_FORM_NAME, searchAdvanceData } from '~/store/search-bar/search-bar-actions';
+import {
+ SEARCH_BAR_ADVANCE_FORM_NAME,
+ searchAdvanceData,
+ setSearchValueFromAdvancedData
+} from '~/store/search-bar/search-bar-actions';
import { ArvadosTheme } from '~/common/custom-theme';
import { CloseIcon } from '~/components/icon/icon';
import { SearchBarAdvanceFormData } from '~/models/search-bar';
onSubmit: (data: SearchBarAdvanceFormData, dispatch: Dispatch) => {
dispatch<any>(searchAdvanceData(data));
dispatch(reset(SEARCH_BAR_ADVANCE_FORM_NAME));
+ },
+ onChange: (data: SearchBarAdvanceFormData, dispatch: Dispatch, props: any, prevData: SearchBarAdvanceFormData) => {
+ dispatch<any>(setSearchValueFromAdvancedData(data, prevData));
}
}),
withStyles(styles))(
color: theme.palette.primary.main
},
label: {
- fontSize: '0.875rem',
+ fontSize: '0.775rem',
padding: `${theme.spacing.unit}px ${theme.spacing.unit}px `,
color: theme.palette.grey["900"],
- background: theme.palette.grey["200"]
+ background: 'white',
+ textAlign: 'right',
+ fontWeight: 'bold'
}
};
};
export const SearchBarBasicView = withStyles(styles)(
({ classes, onSetView, loadRecentQueries, deleteSavedQuery, savedQueries, onSearch, editSavedQuery, selectedItem }: SearchBarBasicViewProps) =>
<Paper className={classes.root}>
- <div className={classes.label}>Recent search queries</div>
+ <div className={classes.label}>{"Recent queries"}</div>
<SearchBarRecentQueries
onSearch={onSearch}
loadRecentQueries={loadRecentQueries}
selectedItem={selectedItem} />
- <div className={classes.label}>Saved search queries</div>
+ <div className={classes.label}>{"Saved queries"}</div>
<SearchBarSavedQueries
onSearch={onSearch}
savedQueries={savedQueries}
import * as React from 'react';
import { Grid, StyleRulesCallback, Divider, IconButton, Typography } from '@material-ui/core';
-import { Field, WrappedFieldProps, WrappedFieldArrayProps, FieldArray, FieldsProps } from 'redux-form';
+import {
+ Field,
+ WrappedFieldProps,
+ WrappedFieldArrayProps,
+ FieldArray,
+ FieldArrayFieldsProps
+} from 'redux-form';
import { PermissionSelect, formatPermissionLevel, parsePermissionLevel } from './permission-select';
import { WithStyles } from '@material-ui/core/styles';
import withStyles from '@material-ui/core/styles/withStyles';
}
});
const PermissionManagementRow = withStyles(permissionManagementRowStyles)(
- ({ field, index, fields, classes }: { field: string, index: number, fields: FieldsProps<{ email: string }> } & WithStyles<'root'>) =>
+ ({ field, index, fields, classes }: { field: string, index: number, fields: FieldArrayFieldsProps<{ email: string }> } & WithStyles<'root'>) =>
<>
<Divider />
<Grid container alignItems='center' spacing={8} wrap='nowrap' className={classes.root}>
"@types/react" "*"
redux "^3.6.0"
-"@types/redux-form@7.4.5":
- version "7.4.5"
- resolved "https://registry.yarnpkg.com/@types/redux-form/-/redux-form-7.4.5.tgz#fae0fa6cfbc613867093d1e0f6a84db17177305e"
- integrity sha512-PY74tuDamNhStB+87TQJXAKoa7uf5Ue/MJvnIrQowgjyRUo2Ky/THUfDec9U7IKRGzLnX7vWVTsoN1EvLnwAEQ==
+"@types/redux-form@7.4.12":
+ version "7.4.12"
+ resolved "https://registry.yarnpkg.com/@types/redux-form/-/redux-form-7.4.12.tgz#2afb0615e3b7417d460ab14a4802ede4a98f9c79"
+ integrity sha512-qHRkJcgdc5MntQHrkYCg5o6oySh+OdVKA90yELTdi9XlNvSGRxd6K230aTckVrwdUjdxtwZ31UqFgLoU5SiWYQ==
dependencies:
"@types/react" "*"
redux "^3.6.0 || ^4.0.0"