mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Upgrade Search UI and fix all type errors (#135737)
* Update Search UI dependencies * Fix type errors after the upgrade * Fix documents search being broken after recent backend changes * Ignore TS error caused by bug in Search UI View passed to Paging component should accept any additional props (for example for data- or area- attributes). * Fix test - we don't expect snippet for number field
This commit is contained in:
parent
6a738e3175
commit
54a32d3e1c
28 changed files with 201 additions and 280 deletions
|
@ -112,10 +112,10 @@
|
|||
"@elastic/filesaver": "1.1.2",
|
||||
"@elastic/node-crypto": "1.2.1",
|
||||
"@elastic/numeral": "^2.5.1",
|
||||
"@elastic/react-search-ui": "^1.6.0",
|
||||
"@elastic/react-search-ui": "^1.14.0",
|
||||
"@elastic/request-crypto": "2.0.1",
|
||||
"@elastic/safer-lodash-set": "link:bazel-bin/packages/elastic-safer-lodash-set",
|
||||
"@elastic/search-ui-app-search-connector": "^1.6.0",
|
||||
"@elastic/search-ui-app-search-connector": "^1.14.0",
|
||||
"@emotion/cache": "^11.7.1",
|
||||
"@emotion/css": "^11.9.0",
|
||||
"@emotion/react": "^11.9.0",
|
||||
|
|
|
@ -10,13 +10,13 @@ import React from 'react';
|
|||
import { useValues, useActions } from 'kea';
|
||||
|
||||
import { EuiLoadingContent, EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
||||
import { LeafIcon } from '../../../../../shared/icons';
|
||||
|
||||
import { DataPanel } from '../../../data_panel';
|
||||
import { Result } from '../../../result/types';
|
||||
|
||||
import { PROMOTE_DOCUMENT_ACTION, HIDE_DOCUMENT_ACTION } from '../../constants';
|
||||
import { CurationLogic } from '../curation_logic';
|
||||
|
@ -47,7 +47,7 @@ export const OrganicDocuments: React.FC = () => {
|
|||
>
|
||||
{hasDocuments ? (
|
||||
<EuiFlexGroup direction="column" gutterSize="s">
|
||||
{documents.map((document: Result, index) => (
|
||||
{documents.map((document: SearchResult, index) => (
|
||||
<EuiFlexItem key={index}>
|
||||
<CurationResult
|
||||
result={document}
|
||||
|
|
|
@ -10,14 +10,16 @@ import { DraggableProvidedDragHandleProps } from 'react-beautiful-dnd';
|
|||
|
||||
import { useValues } from 'kea';
|
||||
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { EngineLogic } from '../../../engine';
|
||||
import { Result } from '../../../result';
|
||||
import { Result as ResultType, ResultAction } from '../../../result/types';
|
||||
import { ResultAction } from '../../../result/types';
|
||||
|
||||
interface Props {
|
||||
actions: ResultAction[];
|
||||
dragHandleProps?: DraggableProvidedDragHandleProps;
|
||||
result: ResultType;
|
||||
result: SearchResult;
|
||||
index?: number;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Result, ResultMeta } from '../../../result/types';
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { ResultMeta } from '../../../result/types';
|
||||
import { CurationResult } from '../../types';
|
||||
|
||||
/**
|
||||
|
@ -26,8 +28,8 @@ const mergeMetas = (partialMeta: ResultMeta, secondPartialMeta: ResultMeta): Res
|
|||
};
|
||||
};
|
||||
|
||||
export const convertToResultFormat = (document: CurationResult): Result => {
|
||||
const result = {} as Result;
|
||||
export const convertToResultFormat = (document: CurationResult): SearchResult => {
|
||||
const result = {} as SearchResult;
|
||||
|
||||
// Convert `key: 'value'` into `key: { raw: 'value' }`
|
||||
Object.entries(document).forEach(([key, value]) => {
|
||||
|
@ -49,7 +51,7 @@ export const convertToResultFormat = (document: CurationResult): Result => {
|
|||
return result;
|
||||
};
|
||||
|
||||
export const convertIdToMeta = (id: string): Result['_meta'] => {
|
||||
export const convertIdToMeta = (id: string): SearchResult['_meta'] => {
|
||||
const splitId = id.split('|');
|
||||
const isMetaEngine = splitId.length > 1;
|
||||
|
||||
|
@ -58,7 +60,7 @@ export const convertIdToMeta = (id: string): Result['_meta'] => {
|
|||
engine: splitId[0],
|
||||
id: splitId[1],
|
||||
}
|
||||
: ({ id } as Result['_meta']);
|
||||
: ({ id } as SearchResult['_meta']);
|
||||
// Note: We're casting this as _meta even though `engine` is missing,
|
||||
// since for source engines the engine shouldn't matter / be displayed,
|
||||
// but if needed we could likely populate this from EngineLogic.values
|
||||
|
|
|
@ -5,8 +5,10 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { Meta } from '../../../../../common/types';
|
||||
import { Result, ResultMeta } from '../result/types';
|
||||
import { ResultMeta } from '../result/types';
|
||||
|
||||
export interface CurationSuggestion {
|
||||
query: string;
|
||||
|
@ -32,7 +34,7 @@ export interface Curation {
|
|||
queries: string[];
|
||||
promoted: CurationResult[];
|
||||
hidden: CurationResult[];
|
||||
organic?: Result[]; // this field is missing if there are 0 results
|
||||
organic?: SearchResult[]; // this field is missing if there are 0 results
|
||||
suggestion?: CurationSuggestion;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,17 +17,18 @@ import {
|
|||
EuiText,
|
||||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { EngineLogic } from '../../../engine';
|
||||
|
||||
import { Result } from '../../../result';
|
||||
import { Result as ResultType } from '../../../result/types';
|
||||
import './curation_result_panel.scss';
|
||||
|
||||
interface Props {
|
||||
variant: 'current' | 'promoted' | 'suggested' | 'hidden';
|
||||
results: ResultType[];
|
||||
results: SearchResult[];
|
||||
}
|
||||
|
||||
export const CurationResultPanel: React.FC<Props> = ({ variant, results }) => {
|
||||
|
|
|
@ -19,6 +19,8 @@ import {
|
|||
EuiSpacer,
|
||||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { LeafIcon } from '../../../../../shared/icons';
|
||||
|
@ -26,7 +28,6 @@ import { useDecodedParams } from '../../../../utils/encode_path_params';
|
|||
import { EngineLogic } from '../../../engine';
|
||||
import { AppSearchPageTemplate } from '../../../layout';
|
||||
import { Result } from '../../../result';
|
||||
import { Result as ResultType } from '../../../result/types';
|
||||
import { convertToResultFormat } from '../../curation/results';
|
||||
import { getCurationsBreadcrumbs } from '../../utils';
|
||||
|
||||
|
@ -149,7 +150,7 @@ export const CurationSuggestion: React.FC = () => {
|
|||
gutterSize="s"
|
||||
data-test-subj="currentOrganicResults"
|
||||
>
|
||||
{currentOrganicResults.map((result: ResultType, index) => (
|
||||
{currentOrganicResults.map((result: SearchResult, index) => (
|
||||
<EuiFlexItem grow={false} key={result.id.raw}>
|
||||
<Result
|
||||
result={result}
|
||||
|
@ -169,7 +170,7 @@ export const CurationSuggestion: React.FC = () => {
|
|||
gutterSize="s"
|
||||
data-test-subj="proposedOrganicResults"
|
||||
>
|
||||
{proposedOrganicResults.map((result: ResultType, index) => (
|
||||
{proposedOrganicResults.map((result: SearchResult, index) => (
|
||||
<EuiFlexItem grow={false} key={result.id.raw}>
|
||||
<Result
|
||||
result={result}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { APIConnector } from '@elastic/search-ui';
|
||||
|
||||
import { SchemaType } from '../../../../shared/schema/types';
|
||||
|
||||
import { buildSearchUIConfig } from './build_search_ui_config';
|
||||
|
@ -21,7 +23,7 @@ describe('buildSearchUIConfig', () => {
|
|||
sortFields: [],
|
||||
};
|
||||
|
||||
const config = buildSearchUIConfig(connector, schema, fields);
|
||||
const config = buildSearchUIConfig(connector as APIConnector, schema, fields);
|
||||
expect(config).toEqual({
|
||||
alwaysSearchOnInitialLoad: true,
|
||||
apiConnector: connector,
|
||||
|
@ -44,10 +46,6 @@ describe('buildSearchUIConfig', () => {
|
|||
result_fields: {
|
||||
bar: {
|
||||
raw: {},
|
||||
snippet: {
|
||||
fallback: true,
|
||||
size: 300,
|
||||
},
|
||||
},
|
||||
foo: {
|
||||
raw: {},
|
||||
|
|
|
@ -5,23 +5,28 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { APIConnector, SortDirection } from '@elastic/search-ui';
|
||||
|
||||
import { Schema } from '../../../../shared/schema/types';
|
||||
|
||||
import { Fields } from './types';
|
||||
|
||||
export const buildSearchUIConfig = (
|
||||
apiConnector: object,
|
||||
apiConnector: APIConnector,
|
||||
schema: Schema,
|
||||
fields: Fields,
|
||||
initialState = { sortDirection: 'desc', sortField: 'id' }
|
||||
initialState = { sortDirection: 'desc' as SortDirection, sortField: 'id' }
|
||||
) => {
|
||||
const facets = fields.filterFields.reduce(
|
||||
(facetsConfig, fieldName) => ({
|
||||
const facets = fields.filterFields.reduce((facetsConfig, fieldName) => {
|
||||
// Geolocation fields do not support value facets https://www.elastic.co/guide/en/app-search/current/facets.html
|
||||
if (schema[fieldName] === 'geolocation') {
|
||||
return facetsConfig;
|
||||
}
|
||||
return {
|
||||
...facetsConfig,
|
||||
[fieldName]: { type: 'value', size: 30 },
|
||||
}),
|
||||
{}
|
||||
);
|
||||
};
|
||||
}, {});
|
||||
|
||||
return {
|
||||
alwaysSearchOnInitialLoad: true,
|
||||
|
@ -32,13 +37,20 @@ export const buildSearchUIConfig = (
|
|||
disjunctiveFacets: fields.filterFields,
|
||||
facets,
|
||||
result_fields: Object.keys(schema).reduce((acc: { [key: string]: object }, key: string) => {
|
||||
acc[key] = {
|
||||
snippet: {
|
||||
size: 300,
|
||||
fallback: true,
|
||||
},
|
||||
raw: {},
|
||||
};
|
||||
if (schema[key] === 'text') {
|
||||
// Only text fields support snippets
|
||||
acc[key] = {
|
||||
snippet: {
|
||||
size: 300,
|
||||
fallback: true,
|
||||
},
|
||||
raw: {},
|
||||
};
|
||||
} else {
|
||||
acc[key] = {
|
||||
raw: {},
|
||||
};
|
||||
}
|
||||
return acc;
|
||||
}, {}),
|
||||
},
|
||||
|
|
|
@ -9,8 +9,8 @@ const mockAction = jest.fn();
|
|||
|
||||
let mockSubcription: (state: object) => void;
|
||||
const mockDriver = {
|
||||
state: { foo: 'foo' },
|
||||
actions: { bar: mockAction },
|
||||
state: { searchTerm: 'foo' },
|
||||
actions: { setSearchTerm: mockAction },
|
||||
subscribeToStateChanges: jest.fn().mockImplementation((fn) => {
|
||||
mockSubcription = fn;
|
||||
}),
|
||||
|
@ -34,8 +34,8 @@ import { useSearchContextState, useSearchContextActions } from './hooks';
|
|||
describe('hooks', () => {
|
||||
describe('useSearchContextState', () => {
|
||||
const TestComponent = () => {
|
||||
const { foo } = useSearchContextState();
|
||||
return <div>{foo}</div>;
|
||||
const { searchTerm } = useSearchContextState();
|
||||
return <div>{searchTerm}</div>;
|
||||
};
|
||||
|
||||
let wrapper: ReactWrapper;
|
||||
|
@ -49,7 +49,7 @@ describe('hooks', () => {
|
|||
|
||||
it('subscribes to state changes', () => {
|
||||
act(() => {
|
||||
mockSubcription({ foo: 'bar' });
|
||||
mockSubcription({ searchTerm: 'bar' });
|
||||
});
|
||||
|
||||
expect(wrapper.text()).toEqual('bar');
|
||||
|
@ -65,8 +65,8 @@ describe('hooks', () => {
|
|||
describe('useSearchContextActions', () => {
|
||||
it('exposes actions', () => {
|
||||
const TestComponent = () => {
|
||||
const { bar } = useSearchContextActions();
|
||||
bar();
|
||||
const { setSearchTerm } = useSearchContextActions();
|
||||
setSearchTerm('bar');
|
||||
return null;
|
||||
};
|
||||
|
||||
|
|
|
@ -7,19 +7,20 @@
|
|||
|
||||
import { useContext, useEffect, useState } from 'react';
|
||||
|
||||
// @ts-expect-error types are not available for this package yet
|
||||
import { SearchContext } from '@elastic/react-search-ui';
|
||||
import type { SearchState } from '@elastic/search-ui';
|
||||
|
||||
export const useSearchContextState = () => {
|
||||
const { driver } = useContext(SearchContext);
|
||||
const [state, setState] = useState(driver.state);
|
||||
|
||||
useEffect(() => {
|
||||
driver.subscribeToStateChanges((newState: object) => {
|
||||
const subscription = (newState: SearchState) => {
|
||||
setState(newState);
|
||||
});
|
||||
};
|
||||
driver.subscribeToStateChanges(subscription);
|
||||
return () => {
|
||||
driver.unsubscribeToStateChanges();
|
||||
driver.unsubscribeToStateChanges(subscription);
|
||||
};
|
||||
}, [state]);
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import React from 'react';
|
|||
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
// @ts-expect-error types are not available for this package yet
|
||||
import { Paging, ResultsPerPage } from '@elastic/react-search-ui';
|
||||
|
||||
import { Pagination } from './pagination';
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import React from 'react';
|
||||
|
||||
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||
// @ts-expect-error types are not available for this package yet
|
||||
import { Paging, ResultsPerPage } from '@elastic/react-search-ui';
|
||||
|
||||
import { PagingView, ResultsPerPageView } from './views';
|
||||
|
@ -20,6 +19,7 @@ export const Pagination: React.FC<{ 'aria-label': string }> = ({ 'aria-label': a
|
|||
className="documentsSearchExperience__pagingInfo"
|
||||
>
|
||||
<EuiFlexItem>
|
||||
{/* @ts-ignore */}
|
||||
<Paging view={PagingView} aria-label={ariaLabel} />
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
|
|
|
@ -12,7 +12,6 @@ import React from 'react';
|
|||
|
||||
import { shallow, ShallowWrapper } from 'enzyme';
|
||||
|
||||
// @ts-expect-error types are not available for this package yet
|
||||
import { SearchProvider, Facet } from '@elastic/react-search-ui';
|
||||
|
||||
jest.mock('../../../../shared/use_local_storage', () => ({
|
||||
|
|
|
@ -10,9 +10,8 @@ import React, { useState } from 'react';
|
|||
import { useValues } from 'kea';
|
||||
|
||||
import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
|
||||
// @ts-expect-error types are not available for this package yet;
|
||||
import { SearchProvider, SearchBox, Sorting, Facet } from '@elastic/react-search-ui';
|
||||
// @ts-expect-error types are not available for this package yet
|
||||
import type { SortDirection } from '@elastic/search-ui';
|
||||
import AppSearchAPIConnector from '@elastic/search-ui-app-search-connector';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
|
@ -88,15 +87,15 @@ export const SearchExperience: React.FC = () => {
|
|||
const connector = new AppSearchAPIConnector({
|
||||
cacheResponses: false,
|
||||
endpointBase,
|
||||
engineName: engine.name,
|
||||
engineName: engine.name as string,
|
||||
additionalHeaders: {
|
||||
'kbn-xsrf': true,
|
||||
},
|
||||
});
|
||||
} as ConstructorParameters<typeof AppSearchAPIConnector>[0]);
|
||||
|
||||
const initialState = {
|
||||
sortField: sortOptions[0].value,
|
||||
sortDirection: 'desc',
|
||||
sortDirection: 'desc' as SortDirection,
|
||||
};
|
||||
|
||||
const searchProviderConfig = buildSearchUIConfig(
|
||||
|
|
|
@ -12,7 +12,6 @@ import React from 'react';
|
|||
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
// @ts-expect-error types are not available for this package yet
|
||||
import { Results } from '@elastic/react-search-ui';
|
||||
|
||||
import { Loading } from '../../../../shared/loading';
|
||||
|
|
|
@ -10,13 +10,13 @@ import React from 'react';
|
|||
import { useValues } from 'kea';
|
||||
|
||||
import { EuiFlexGroup, EuiSpacer, EuiEmptyPrompt } from '@elastic/eui';
|
||||
// @ts-expect-error types are not available for this package yet
|
||||
|
||||
import { Results } from '@elastic/react-search-ui';
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { Loading } from '../../../../shared/loading';
|
||||
import { EngineLogic } from '../../engine';
|
||||
import { Result } from '../../result/types';
|
||||
|
||||
import { useSearchContextState } from './hooks';
|
||||
import { Pagination } from './pagination';
|
||||
|
@ -43,7 +43,7 @@ export const SearchExperienceContent: React.FC = () => {
|
|||
<EuiSpacer />
|
||||
<Results
|
||||
titleField="id"
|
||||
resultView={({ result }: { result: Result }) => {
|
||||
resultView={({ result }: { result: SearchResult }) => {
|
||||
return (
|
||||
<ResultView
|
||||
result={result}
|
||||
|
|
|
@ -9,6 +9,8 @@ import React from 'react';
|
|||
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import type { FacetValue } from '@elastic/search-ui';
|
||||
|
||||
import { MultiCheckboxFacetsView } from './multi_checkbox_facets_view';
|
||||
|
||||
describe('MultiCheckboxFacetsView', () => {
|
||||
|
@ -23,7 +25,7 @@ describe('MultiCheckboxFacetsView', () => {
|
|||
value: 'value2',
|
||||
selected: false,
|
||||
},
|
||||
],
|
||||
] as FacetValue[],
|
||||
showMore: true,
|
||||
onMoreClick: jest.fn(),
|
||||
onRemove: jest.fn(),
|
||||
|
@ -65,7 +67,7 @@ describe('MultiCheckboxFacetsView', () => {
|
|||
value: 'value2',
|
||||
selected: true,
|
||||
},
|
||||
],
|
||||
] as FacetValue[],
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
@ -87,7 +89,7 @@ describe('MultiCheckboxFacetsView', () => {
|
|||
value: '',
|
||||
selected: false,
|
||||
},
|
||||
],
|
||||
] as FacetValue[],
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -14,20 +14,16 @@ import {
|
|||
EuiButtonEmpty,
|
||||
EuiSpacer,
|
||||
} from '@elastic/eui';
|
||||
import type { FieldValue, FacetValue } from '@elastic/search-ui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
interface Option {
|
||||
value: string;
|
||||
selected: boolean;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
label: string;
|
||||
options: Option[];
|
||||
options: FacetValue[];
|
||||
showMore: boolean;
|
||||
onMoreClick(): void;
|
||||
onRemove(id: string): void;
|
||||
onSelect(id: string): void;
|
||||
onRemove(value: FieldValue): void;
|
||||
onSelect(value: FieldValue): void;
|
||||
}
|
||||
|
||||
const getIndexFromId = (id: string) => parseInt(id.split('_')[1], 10);
|
||||
|
@ -42,7 +38,7 @@ export const MultiCheckboxFacetsView: React.FC<Props> = ({
|
|||
}) => {
|
||||
const getId = htmlIdGenerator();
|
||||
|
||||
const optionToCheckBoxGroupOption = (option: Option, index: number) => ({
|
||||
const optionToCheckBoxGroupOption = (option: FacetValue, index: number) => ({
|
||||
id: getId(String(index)),
|
||||
label:
|
||||
option.value ||
|
||||
|
@ -56,7 +52,7 @@ export const MultiCheckboxFacetsView: React.FC<Props> = ({
|
|||
|
||||
const optionToSelectedMapReducer = (
|
||||
selectedMap: { [name: string]: boolean },
|
||||
option: Option,
|
||||
option: FacetValue,
|
||||
index: number
|
||||
) => {
|
||||
if (option.selected) {
|
||||
|
@ -72,10 +68,10 @@ export const MultiCheckboxFacetsView: React.FC<Props> = ({
|
|||
const index = getIndexFromId(checkboxId);
|
||||
const option = options[index];
|
||||
if (option.selected) {
|
||||
onRemove(option.value);
|
||||
onRemove(option.value as FieldValue);
|
||||
return;
|
||||
}
|
||||
onSelect(option.value);
|
||||
onSelect(option.value as FieldValue);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -10,14 +10,14 @@ import React from 'react';
|
|||
import { EuiPagination } from '@elastic/eui';
|
||||
|
||||
interface Props {
|
||||
current: number;
|
||||
current?: number;
|
||||
totalPages: number;
|
||||
onChange(pageNumber: number): void;
|
||||
'aria-label': string;
|
||||
}
|
||||
|
||||
export const PagingView: React.FC<Props> = ({
|
||||
current,
|
||||
current = 1,
|
||||
onChange,
|
||||
totalPages,
|
||||
'aria-label': ariaLabel,
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { Schema } from '../../../../../shared/schema/types';
|
||||
import { Result } from '../../../result/result';
|
||||
import { Result as ResultType } from '../../../result/types';
|
||||
|
||||
export interface Props {
|
||||
result: ResultType;
|
||||
result: SearchResult;
|
||||
schemaForTypeHighlights?: Schema;
|
||||
isMetaEngine: boolean;
|
||||
}
|
||||
|
|
|
@ -16,12 +16,12 @@ const wrapResultsPerPageOptionForEuiSelect: (option: number) => EuiSelectOption
|
|||
});
|
||||
|
||||
interface Props {
|
||||
options: number[];
|
||||
value: number;
|
||||
options?: number[];
|
||||
value?: number;
|
||||
onChange(value: number): void;
|
||||
}
|
||||
|
||||
export const ResultsPerPageView: React.FC<Props> = ({ onChange, options, value }) => {
|
||||
export const ResultsPerPageView: React.FC<Props> = ({ onChange, options = [], value = 20 }) => {
|
||||
// If we don't have the value in options, unset it
|
||||
const selectedValue = value && !options.includes(value) ? undefined : value;
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
import { kea, MakeLogicType } from 'kea';
|
||||
import { omit, cloneDeep, isEmpty } from 'lodash';
|
||||
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import {
|
||||
flashSuccessToast,
|
||||
flashAPIErrors,
|
||||
|
@ -17,7 +19,6 @@ import { HttpLogic } from '../../../shared/http';
|
|||
import { Schema, SchemaConflicts } from '../../../shared/schema/types';
|
||||
|
||||
import { EngineLogic } from '../engine';
|
||||
import { Result } from '../result/types';
|
||||
|
||||
import {
|
||||
UPDATE_SUCCESS_MESSAGE,
|
||||
|
@ -47,7 +48,7 @@ interface RelevanceTuningActions {
|
|||
setSearchSettings(searchSettings: SearchSettings): { searchSettings: SearchSettings };
|
||||
setFilterValue(value: string): string;
|
||||
setSearchQuery(value: string): string;
|
||||
setSearchResults(searchResults: Result[]): Result[];
|
||||
setSearchResults(searchResults: SearchResult[]): SearchResult[];
|
||||
setResultsLoading(resultsLoading: boolean): boolean;
|
||||
clearSearchResults(): void;
|
||||
resetSearchSettingsState(): void;
|
||||
|
@ -104,7 +105,7 @@ interface RelevanceTuningValues {
|
|||
query: string;
|
||||
unsavedChanges: boolean;
|
||||
dataLoading: boolean;
|
||||
searchResults: Result[] | null;
|
||||
searchResults: SearchResult[] | null;
|
||||
resultsLoading: boolean;
|
||||
}
|
||||
|
||||
|
@ -278,7 +279,7 @@ export const RelevanceTuningLogic = kea<
|
|||
const filteredBoosts = removeEmptyValueBoosts(boosts);
|
||||
|
||||
try {
|
||||
const response = await http.post<{ results: Result[] }>(url, {
|
||||
const response = await http.post<{ results: SearchResult[] }>(url, {
|
||||
query: {
|
||||
query,
|
||||
},
|
||||
|
|
|
@ -12,6 +12,7 @@ import './result.scss';
|
|||
|
||||
import { EuiPanel, EuiIcon } from '@elastic/eui';
|
||||
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { KibanaLogic } from '../../../shared/kibana';
|
||||
|
@ -23,10 +24,10 @@ import { flattenDocument } from '../../utils/results';
|
|||
|
||||
import { ResultField } from './result_field';
|
||||
import { ResultHeader } from './result_header';
|
||||
import { FieldValue, Result as ResultType, ResultAction } from './types';
|
||||
import { FieldValue, ResultAction } from './types';
|
||||
|
||||
interface Props {
|
||||
result: ResultType;
|
||||
result: SearchResult;
|
||||
isMetaEngine: boolean;
|
||||
showScore?: boolean;
|
||||
resultPosition?: number;
|
||||
|
|
|
@ -25,18 +25,6 @@ export interface ResultMeta {
|
|||
clicks?: number;
|
||||
}
|
||||
|
||||
// A search result item
|
||||
export type Result = {
|
||||
id: {
|
||||
raw: string;
|
||||
};
|
||||
_meta: ResultMeta;
|
||||
} & {
|
||||
// this should be a FieldType object, but there's no good way to do that in TS: https://github.com/microsoft/TypeScript/issues/17867
|
||||
// You'll need to cast it to FieldValue whenever you use it.
|
||||
[key: string]: object;
|
||||
};
|
||||
|
||||
export interface ResultAction {
|
||||
onClick(): void;
|
||||
title: string;
|
||||
|
|
|
@ -7,23 +7,23 @@
|
|||
|
||||
import { kea, MakeLogicType } from 'kea';
|
||||
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { flashAPIErrors } from '../../../shared/flash_messages';
|
||||
|
||||
import { HttpLogic } from '../../../shared/http';
|
||||
import { flattenDocument } from '../../utils/results';
|
||||
import { EngineLogic } from '../engine';
|
||||
|
||||
import { Result } from '../result/types';
|
||||
|
||||
interface SearchValues {
|
||||
searchDataLoading: boolean;
|
||||
searchQuery: string;
|
||||
searchResults: Result[];
|
||||
searchResults: SearchResult[];
|
||||
}
|
||||
|
||||
interface SearchActions {
|
||||
search(query: string): { query: string };
|
||||
onSearch({ results }: { results: Result[] }): { results: Result[] };
|
||||
onSearch({ results }: { results: SearchResult[] }): { results: SearchResult[] };
|
||||
}
|
||||
|
||||
export const SearchLogic = kea<MakeLogicType<SearchValues, SearchActions>>({
|
||||
|
@ -50,7 +50,7 @@ export const SearchLogic = kea<MakeLogicType<SearchValues, SearchActions>>({
|
|||
searchResults: [
|
||||
[],
|
||||
{
|
||||
onSearch: (_, { results }) => results.map((res) => flattenDocument(res) as Result),
|
||||
onSearch: (_, { results }) => results.map((res) => flattenDocument(res) as SearchResult),
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
@ -62,7 +62,7 @@ export const SearchLogic = kea<MakeLogicType<SearchValues, SearchActions>>({
|
|||
const { engineName } = EngineLogic.values;
|
||||
|
||||
try {
|
||||
const response = await http.post<{ results: Result[] }>(
|
||||
const response = await http.post<{ results: SearchResult[] }>(
|
||||
`/internal/app_search/engines/${engineName}/search`,
|
||||
{ query: { query } }
|
||||
);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { Result } from '../../components/result/types';
|
||||
import type { SearchResult } from '@elastic/search-ui';
|
||||
|
||||
import { flattenDocument, flattenDocumentField } from '.';
|
||||
|
||||
|
@ -42,13 +42,13 @@ describe('flattenDocumentField', () => {
|
|||
|
||||
describe('flattenDocument', () => {
|
||||
it('flattens all fields without raw key', () => {
|
||||
const result: Result = {
|
||||
const result: SearchResult = {
|
||||
id: { raw: '123' },
|
||||
_meta: { engine: 'Test', id: '1' },
|
||||
title: { raw: 'Getty Museum' },
|
||||
address: { city: { raw: 'Los Angeles' }, state: { raw: 'California' } },
|
||||
};
|
||||
const expected: Result = {
|
||||
const expected: SearchResult = {
|
||||
id: { raw: '123' },
|
||||
_meta: { engine: 'Test', id: '1' },
|
||||
title: { raw: 'Getty Museum' },
|
||||
|
|
259
yarn.lock
259
yarn.lock
|
@ -1422,10 +1422,10 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@elastic/app-search-javascript@^7.13.1":
|
||||
version "7.13.1"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/app-search-javascript/-/app-search-javascript-7.13.1.tgz#07d84daa27e856ad14f3f840683288eab06577f4"
|
||||
integrity sha512-ShzZtGWykLQ0+wXzfk6lJztv68fRcGa8rsLDxJLH/O/2CGY+PJDnj8Qu5lJPmsAPZlZgaB8u7l26YGVPOoaqSA==
|
||||
"@elastic/app-search-javascript@^8.1.2":
|
||||
version "8.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/app-search-javascript/-/app-search-javascript-8.1.2.tgz#8b60d74deab05b6e8603078c013d75cbd41c2f80"
|
||||
integrity sha512-o3S3GrwaKhZWedLDrPpyHwAhidovTqG0oEz0+f1Hk4mDLmnlViPBIJhg12KuCuM0MYFUavKDHoqARlsbW8z6Kw==
|
||||
dependencies:
|
||||
object-hash "^1.3.0"
|
||||
|
||||
|
@ -1595,22 +1595,23 @@
|
|||
resolved "https://registry.yarnpkg.com/@elastic/numeral/-/numeral-2.5.1.tgz#96acf39c3d599950646ef8ccfd24a3f057cf4932"
|
||||
integrity sha512-Tby6TKjixRFY+atVNeYUdGr9m0iaOq8230KTwn8BbUhkh7LwozfgKq0U98HRX7n63ZL62szl+cDKTYzh5WPCFQ==
|
||||
|
||||
"@elastic/react-search-ui-views@1.6.0":
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/react-search-ui-views/-/react-search-ui-views-1.6.0.tgz#7211d47c29ef0636c853721491b9905ac7ae58da"
|
||||
integrity sha512-VADJ18p8HoSPtxKEWFODzId08j0ahyHmHjXv1vP6O/PvtA+ECvi0gDSh/WgdRF792G0e+4d2Dke8LIhxaEvE+w==
|
||||
"@elastic/react-search-ui-views@1.14.0":
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/react-search-ui-views/-/react-search-ui-views-1.14.0.tgz#59e58f5c5f8769995baa0b5606da67e47535ea8b"
|
||||
integrity sha512-zvW7Dzbf5thNTK1rTKrbsk8bCFK4d4YVtA0VjMSM0Y52CH6zVQrOqEsV/ilcIiHyvR7uFiiLHsFX6Yk3bHdrBw==
|
||||
dependencies:
|
||||
"@elastic/search-ui" "1.14.0"
|
||||
downshift "^3.2.10"
|
||||
rc-pagination "^1.20.1"
|
||||
react-select "^2.4.4"
|
||||
react-select "^5.0.0"
|
||||
|
||||
"@elastic/react-search-ui@^1.6.0":
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/react-search-ui/-/react-search-ui-1.6.0.tgz#8d547d5e1f0a8eebe94798b29966f51643aa886f"
|
||||
integrity sha512-bwSKuCQTQiBWr6QufQtZZGu6rcVYfoiUnyZbwZMS6ojedd5XY7FtMcE+QnR6/IIo0M2IUrxD74XtVNqkUhoCRg==
|
||||
"@elastic/react-search-ui@^1.14.0":
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/react-search-ui/-/react-search-ui-1.14.0.tgz#cac7f6bba7cf84bf8c4e8d8deb14a443286c3dfc"
|
||||
integrity sha512-vwOOpUjL/Y+o/53rt8VeBcjw7rPfg7eZMmSezjw3jYy17eC7mTIHTQf6knbyVO30R1KXl7LyAuyfQLS+ifX2zg==
|
||||
dependencies:
|
||||
"@elastic/react-search-ui-views" "1.6.0"
|
||||
"@elastic/search-ui" "1.6.0"
|
||||
"@elastic/react-search-ui-views" "1.14.0"
|
||||
"@elastic/search-ui" "1.14.0"
|
||||
|
||||
"@elastic/request-crypto@2.0.1":
|
||||
version "2.0.1"
|
||||
|
@ -1625,17 +1626,18 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@elastic/search-ui-app-search-connector@^1.6.0":
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/search-ui-app-search-connector/-/search-ui-app-search-connector-1.6.0.tgz#faf1c4a384285648ef7b5ef9cd0e65de0341d2b0"
|
||||
integrity sha512-6oNvqzo4nuutmCM0zEzYrV6VwG8j0ML43SkaG6UrFzLUd6DeWUVGNN+SLNAlfQDWBUjc2m5EGvgdk/0GOWDZeA==
|
||||
"@elastic/search-ui-app-search-connector@^1.14.0":
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/search-ui-app-search-connector/-/search-ui-app-search-connector-1.14.0.tgz#5ecd1157394b08f4281b890746450945413d582c"
|
||||
integrity sha512-VwfbADt+PybgT+l2oK5gfW4WWHsf6al/5uk7qsYXtLneuckcjslUKzjlP5gHqAnV0/UKRXsYjjfb4WRDeo+iAw==
|
||||
dependencies:
|
||||
"@elastic/app-search-javascript" "^7.13.1"
|
||||
"@elastic/app-search-javascript" "^8.1.2"
|
||||
"@elastic/search-ui" "1.14.0"
|
||||
|
||||
"@elastic/search-ui@1.6.0":
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/search-ui/-/search-ui-1.6.0.tgz#8b2286cacff44735be96605b2929ca9b469c78de"
|
||||
integrity sha512-i7htjET9uE4xngyzS8kX3DkSD5XNcr+3FS0Jjx3xRpKVc/dFst4bJyiSeRrQcq+2oBb4mEJJOCFaIrLZg3mdSA==
|
||||
"@elastic/search-ui@1.14.0":
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/search-ui/-/search-ui-1.14.0.tgz#e5bb2854ffa2571294769ee435d69bda56dc414b"
|
||||
integrity sha512-6Q+KrE5AhHs20rvWATxv3LKe1u/6t8c/pRV0tJXfsxenFer6d33PSEqPm7uV/paTha+5K8JlayWapwsRRWrVGQ==
|
||||
dependencies:
|
||||
date-fns "^1.30.1"
|
||||
deep-equal "^1.0.1"
|
||||
|
@ -1708,18 +1710,6 @@
|
|||
"@emotion/babel-plugin" "^11.2.0"
|
||||
"@emotion/babel-plugin-jsx-pragmatic" "^0.1.5"
|
||||
|
||||
"@emotion/babel-utils@^0.6.4":
|
||||
version "0.6.10"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/babel-utils/-/babel-utils-0.6.10.tgz#83dbf3dfa933fae9fc566e54fbb45f14674c6ccc"
|
||||
integrity sha512-/fnkM/LTEp3jKe++T0KyTszVGWNKPNOUJfjNKLO17BzQ6QPxgbg3whayom1Qr2oLFH3V92tDymU+dT5q676uow==
|
||||
dependencies:
|
||||
"@emotion/hash" "^0.6.6"
|
||||
"@emotion/memoize" "^0.6.6"
|
||||
"@emotion/serialize" "^0.9.1"
|
||||
convert-source-map "^1.5.1"
|
||||
find-root "^1.1.0"
|
||||
source-map "^0.7.2"
|
||||
|
||||
"@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9":
|
||||
version "10.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0"
|
||||
|
@ -1730,6 +1720,17 @@
|
|||
"@emotion/utils" "0.11.3"
|
||||
"@emotion/weak-memoize" "0.2.5"
|
||||
|
||||
"@emotion/cache@^11.4.0", "@emotion/cache@^11.9.3":
|
||||
version "11.9.3"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.9.3.tgz#96638449f6929fd18062cfe04d79b29b44c0d6cb"
|
||||
integrity sha512-0dgkI/JKlCXa+lEXviaMtGBL0ynpx4osh7rjOXE71q9bIF8G+XhJgvi+wDu0B0IdCVx37BffiwXlN9I3UuzFvg==
|
||||
dependencies:
|
||||
"@emotion/memoize" "^0.7.4"
|
||||
"@emotion/sheet" "^1.1.1"
|
||||
"@emotion/utils" "^1.0.0"
|
||||
"@emotion/weak-memoize" "^0.2.5"
|
||||
stylis "4.0.13"
|
||||
|
||||
"@emotion/cache@^11.7.1":
|
||||
version "11.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.7.1.tgz#08d080e396a42e0037848214e8aa7bf879065539"
|
||||
|
@ -1786,11 +1787,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413"
|
||||
integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==
|
||||
|
||||
"@emotion/hash@^0.6.2", "@emotion/hash@^0.6.6":
|
||||
version "0.6.6"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.6.tgz#62266c5f0eac6941fece302abad69f2ee7e25e44"
|
||||
integrity sha512-ojhgxzUHZ7am3D2jHkMzPpsBAiB005GF5YU4ea+8DNPybMk01JJUM9V9YRlF/GE95tcOm8DxQvWA2jq19bGalQ==
|
||||
|
||||
"@emotion/is-prop-valid@0.8.8", "@emotion/is-prop-valid@^0.8.6", "@emotion/is-prop-valid@^0.8.8":
|
||||
version "0.8.8"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a"
|
||||
|
@ -1814,16 +1810,24 @@
|
|||
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb"
|
||||
integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==
|
||||
|
||||
"@emotion/memoize@^0.6.1", "@emotion/memoize@^0.6.6":
|
||||
version "0.6.6"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b"
|
||||
integrity sha512-h4t4jFjtm1YV7UirAFuSuFGyLa+NNxjdkq6DpFLANNQY5rHueFZHVY+8Cu1HYVP6DrheB0kv4m5xPjo7eKT7yQ==
|
||||
|
||||
"@emotion/memoize@^0.7.4", "@emotion/memoize@^0.7.5":
|
||||
version "0.7.5"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50"
|
||||
integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==
|
||||
|
||||
"@emotion/react@^11.8.1":
|
||||
version "11.9.3"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.9.3.tgz#f4f4f34444f6654a2e550f5dab4f2d360c101df9"
|
||||
integrity sha512-g9Q1GcTOlzOEjqwuLF/Zd9LC+4FljjPjDfxSM7KmEakm+hsHXk+bYZ2q+/hTJzr0OUNkujo72pXLQvXj6H+GJQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.13.10"
|
||||
"@emotion/babel-plugin" "^11.7.1"
|
||||
"@emotion/cache" "^11.9.3"
|
||||
"@emotion/serialize" "^1.0.4"
|
||||
"@emotion/utils" "^1.1.0"
|
||||
"@emotion/weak-memoize" "^0.2.5"
|
||||
hoist-non-react-statics "^3.3.1"
|
||||
|
||||
"@emotion/react@^11.9.0":
|
||||
version "11.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.9.0.tgz#b6d42b1db3bd7511e7a7c4151dc8bc82e14593b8"
|
||||
|
@ -1848,16 +1852,6 @@
|
|||
"@emotion/utils" "0.11.3"
|
||||
csstype "^2.5.7"
|
||||
|
||||
"@emotion/serialize@^0.9.1":
|
||||
version "0.9.1"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.9.1.tgz#a494982a6920730dba6303eb018220a2b629c145"
|
||||
integrity sha512-zTuAFtyPvCctHBEL8KZ5lJuwBanGSutFEncqLn/m9T1a6a93smBStK+bZzcNPgj4QS8Rkw9VTwJGhRIUVO8zsQ==
|
||||
dependencies:
|
||||
"@emotion/hash" "^0.6.6"
|
||||
"@emotion/memoize" "^0.6.6"
|
||||
"@emotion/unitless" "^0.6.7"
|
||||
"@emotion/utils" "^0.8.2"
|
||||
|
||||
"@emotion/serialize@^1.0.2", "@emotion/serialize@^1.0.3":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.3.tgz#99e2060c26c6292469fb30db41f4690e1c8fea63"
|
||||
|
@ -1869,6 +1863,17 @@
|
|||
"@emotion/utils" "^1.0.0"
|
||||
csstype "^3.0.2"
|
||||
|
||||
"@emotion/serialize@^1.0.4":
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.4.tgz#ff31fd11bb07999611199c2229e152faadc21a3c"
|
||||
integrity sha512-1JHamSpH8PIfFwAMryO2bNka+y8+KA5yga5Ocf2d7ZEiJjb7xlLW7aknBGZqJLajuLOvJ+72vN+IBSwPlXD1Pg==
|
||||
dependencies:
|
||||
"@emotion/hash" "^0.8.0"
|
||||
"@emotion/memoize" "^0.7.4"
|
||||
"@emotion/unitless" "^0.7.5"
|
||||
"@emotion/utils" "^1.0.0"
|
||||
csstype "^3.0.2"
|
||||
|
||||
"@emotion/sheet@0.9.4":
|
||||
version "0.9.4"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5"
|
||||
|
@ -1879,6 +1884,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.1.0.tgz#56d99c41f0a1cda2726a05aa6a20afd4c63e58d2"
|
||||
integrity sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==
|
||||
|
||||
"@emotion/sheet@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.1.1.tgz#015756e2a9a3c7c5f11d8ec22966a8dbfbfac787"
|
||||
integrity sha512-J3YPccVRMiTZxYAY0IOq3kd+hUP8idY8Kz6B/Cyo+JuXq52Ek+zbPbSQUrVQp95aJ+lsAW7DPL1P2Z+U1jGkKA==
|
||||
|
||||
"@emotion/styled-base@^10.0.27":
|
||||
version "10.0.31"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/styled-base/-/styled-base-10.0.31.tgz#940957ee0aa15c6974adc7d494ff19765a2f742a"
|
||||
|
@ -1902,31 +1912,16 @@
|
|||
resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04"
|
||||
integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==
|
||||
|
||||
"@emotion/stylis@^0.7.0":
|
||||
version "0.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.7.1.tgz#50f63225e712d99e2b2b39c19c70fff023793ca5"
|
||||
integrity sha512-/SLmSIkN13M//53TtNxgxo57mcJk/UJIDFRKwOiLIBEyBHEcipgR6hNMQ/59Sl4VjCJ0Z/3zeAZyvnSLPG/1HQ==
|
||||
|
||||
"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4", "@emotion/unitless@^0.7.5":
|
||||
version "0.7.5"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed"
|
||||
integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==
|
||||
|
||||
"@emotion/unitless@^0.6.2", "@emotion/unitless@^0.6.7":
|
||||
version "0.6.7"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.7.tgz#53e9f1892f725b194d5e6a1684a7b394df592397"
|
||||
integrity sha512-Arj1hncvEVqQ2p7Ega08uHLr1JuRYBuO5cIvcA+WWEQ5+VmkOE3ZXzl04NbQxeQpWX78G7u6MqxKuNX3wvYZxg==
|
||||
|
||||
"@emotion/utils@0.11.3":
|
||||
version "0.11.3"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924"
|
||||
integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw==
|
||||
|
||||
"@emotion/utils@^0.8.2":
|
||||
version "0.8.2"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.2.tgz#576ff7fb1230185b619a75d258cbc98f0867a8dc"
|
||||
integrity sha512-rLu3wcBWH4P5q1CGoSSH/i9hrXs7SlbRLkoq9IGuoPYNGQvDJ3pt/wmOM+XgYjIDRMVIdkUWt0RsfzF50JfnCw==
|
||||
|
||||
"@emotion/utils@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.0.0.tgz#abe06a83160b10570816c913990245813a2fd6af"
|
||||
|
@ -7601,6 +7596,13 @@
|
|||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-transition-group@^4.4.0":
|
||||
version "4.4.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.5.tgz#aae20dcf773c5aa275d5b9f7cdbca638abc5e416"
|
||||
integrity sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-virtualized-auto-sizer@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.1.tgz#b3187dae1dfc4c15880c9cfc5b45f2719ea6ebd4"
|
||||
|
@ -9524,24 +9526,6 @@ babel-plugin-emotion@^10.0.27:
|
|||
find-root "^1.1.0"
|
||||
source-map "^0.5.7"
|
||||
|
||||
babel-plugin-emotion@^9.2.11:
|
||||
version "9.2.11"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.11.tgz#319c005a9ee1d15bb447f59fe504c35fd5807728"
|
||||
integrity sha512-dgCImifnOPPSeXod2znAmgc64NhaaOjGEHROR/M+lmStb3841yK1sgaDYAYMnlvWNz8GnpwIPN0VmNpbWYZ+VQ==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.0.0"
|
||||
"@emotion/babel-utils" "^0.6.4"
|
||||
"@emotion/hash" "^0.6.2"
|
||||
"@emotion/memoize" "^0.6.1"
|
||||
"@emotion/stylis" "^0.7.0"
|
||||
babel-plugin-macros "^2.0.0"
|
||||
babel-plugin-syntax-jsx "^6.18.0"
|
||||
convert-source-map "^1.5.0"
|
||||
find-root "^1.1.0"
|
||||
mkdirp "^0.5.1"
|
||||
source-map "^0.5.7"
|
||||
touch "^2.0.1"
|
||||
|
||||
babel-plugin-extract-import-names@1.6.22:
|
||||
version "1.6.22"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz#de5f9a28eb12f3eb2578bf74472204e66d1a13dc"
|
||||
|
@ -11749,19 +11733,6 @@ create-ecdh@^4.0.0:
|
|||
bn.js "^4.1.0"
|
||||
elliptic "^6.0.0"
|
||||
|
||||
create-emotion@^9.2.12:
|
||||
version "9.2.12"
|
||||
resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.2.12.tgz#0fc8e7f92c4f8bb924b0fef6781f66b1d07cb26f"
|
||||
integrity sha512-P57uOF9NL2y98Xrbl2OuiDQUZ30GVmASsv5fbsjF4Hlraip2kyAvMm+2PoYUvFFw03Fhgtxk3RqZSm2/qHL9hA==
|
||||
dependencies:
|
||||
"@emotion/hash" "^0.6.2"
|
||||
"@emotion/memoize" "^0.6.1"
|
||||
"@emotion/stylis" "^0.7.0"
|
||||
"@emotion/unitless" "^0.6.2"
|
||||
csstype "^2.5.2"
|
||||
stylis "^3.5.0"
|
||||
stylis-rule-sheet "^0.0.10"
|
||||
|
||||
create-hash@^1.1.0, create-hash@^1.1.2:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd"
|
||||
|
@ -12146,11 +12117,6 @@ csstype@^2.2.0, csstype@^2.5.5, csstype@^2.5.7, csstype@^2.6.7:
|
|||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.7.tgz#20b0024c20b6718f4eda3853a1f5a1cce7f5e4a5"
|
||||
integrity sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ==
|
||||
|
||||
csstype@^2.5.2:
|
||||
version "2.6.14"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.14.tgz#004822a4050345b55ad4dcc00be1d9cf2f4296de"
|
||||
integrity sha512-2mSc+VEpGPblzAxyeR+vZhJKgYg0Og0nnRi7pmRXFYYxSfnOnW8A5wwQb4n4cE2nIOzqKOAzLCaEX6aBmNEv8A==
|
||||
|
||||
csstype@^3.0.2:
|
||||
version "3.0.7"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.7.tgz#2a5fb75e1015e84dd15692f71e89a1450290950b"
|
||||
|
@ -13303,13 +13269,6 @@ dom-converter@~0.2:
|
|||
dependencies:
|
||||
utila "~0.4"
|
||||
|
||||
dom-helpers@^3.4.0:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8"
|
||||
integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.1.2"
|
||||
|
||||
dom-helpers@^5.0.0, dom-helpers@^5.0.1:
|
||||
version "5.1.4"
|
||||
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.1.4.tgz#4609680ab5c79a45f2531441f1949b79d6587f4b"
|
||||
|
@ -13726,14 +13685,6 @@ emotion-theming@^10.0.27:
|
|||
"@emotion/weak-memoize" "0.2.5"
|
||||
hoist-non-react-statics "^3.3.0"
|
||||
|
||||
emotion@^9.1.2:
|
||||
version "9.2.12"
|
||||
resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.12.tgz#53925aaa005614e65c6e43db8243c843574d1ea9"
|
||||
integrity sha512-hcx7jppaI8VoXxIWEhxpDW7I+B4kq9RNzQLmsrF6LY8BGKqe2N+gFAQr0EfuFucFlPs2A9HM4+xNj4NeqEWIOQ==
|
||||
dependencies:
|
||||
babel-plugin-emotion "^9.2.11"
|
||||
create-emotion "^9.2.12"
|
||||
|
||||
enabled@2.0.x:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2"
|
||||
|
@ -24030,7 +23981,7 @@ raf-schd@^4.0.0, raf-schd@^4.0.2:
|
|||
resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.2.tgz#bd44c708188f2e84c810bf55fcea9231bcaed8a0"
|
||||
integrity sha512-VhlMZmGy6A6hrkJWHLNTGl5gtgMUm+xfGza6wbwnE914yeQ5Ybm18vgM734RZhMgfw4tacUrWseGZlpUrrakEQ==
|
||||
|
||||
raf@^3.1.0, raf@^3.4.0, raf@^3.4.1:
|
||||
raf@^3.1.0, raf@^3.4.1:
|
||||
version "3.4.1"
|
||||
resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"
|
||||
integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==
|
||||
|
@ -24352,13 +24303,6 @@ react-hook-form@^7.30.0:
|
|||
resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.30.0.tgz#c9e2fd54d3627e43bd94bf38ef549df2e80c1371"
|
||||
integrity sha512-DzjiM6o2vtDGNMB9I4yCqW8J21P314SboNG1O0obROkbg7KVS0I7bMtwSdKyapnCPjHgnxc3L7E5PEdISeEUcQ==
|
||||
|
||||
react-input-autosize@^2.2.1:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2"
|
||||
integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw==
|
||||
dependencies:
|
||||
prop-types "^15.5.8"
|
||||
|
||||
react-input-autosize@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-3.0.0.tgz#6b5898c790d4478d69420b55441fcc31d5c50a85"
|
||||
|
@ -24620,19 +24564,6 @@ react-router@6.3.0, react-router@^6.0.0:
|
|||
dependencies:
|
||||
history "^5.2.0"
|
||||
|
||||
react-select@^2.4.4:
|
||||
version "2.4.4"
|
||||
resolved "https://registry.yarnpkg.com/react-select/-/react-select-2.4.4.tgz#ba72468ef1060c7d46fbb862b0748f96491f1f73"
|
||||
integrity sha512-C4QPLgy9h42J/KkdrpVxNmkY6p4lb49fsrbDk/hRcZpX7JvZPNb6mGj+c5SzyEtBv1DmQ9oPH4NmhAFvCrg8Jw==
|
||||
dependencies:
|
||||
classnames "^2.2.5"
|
||||
emotion "^9.1.2"
|
||||
memoize-one "^5.0.0"
|
||||
prop-types "^15.6.0"
|
||||
raf "^3.4.0"
|
||||
react-input-autosize "^2.2.1"
|
||||
react-transition-group "^2.2.1"
|
||||
|
||||
react-select@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.2.0.tgz#de9284700196f5f9b5277c5d850a9ce85f5c72fe"
|
||||
|
@ -24647,6 +24578,19 @@ react-select@^3.2.0:
|
|||
react-input-autosize "^3.0.0"
|
||||
react-transition-group "^4.3.0"
|
||||
|
||||
react-select@^5.0.0:
|
||||
version "5.3.2"
|
||||
resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.3.2.tgz#ecee0d5c59ed4acb7f567f7de3c75a488d93dacb"
|
||||
integrity sha512-W6Irh7U6Ha7p5uQQ2ZnemoCQ8mcfgOtHfw3wuMzG6FAu0P+CYicgofSLOq97BhjMx8jS+h+wwWdCBeVVZ9VqlQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.0"
|
||||
"@emotion/cache" "^11.4.0"
|
||||
"@emotion/react" "^11.8.1"
|
||||
"@types/react-transition-group" "^4.4.0"
|
||||
memoize-one "^5.0.0"
|
||||
prop-types "^15.6.0"
|
||||
react-transition-group "^4.3.0"
|
||||
|
||||
react-shortcuts@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/react-shortcuts/-/react-shortcuts-2.0.1.tgz#6de302244ce33ac9f9273dbeec540a8f81808f91"
|
||||
|
@ -24733,16 +24677,6 @@ react-tiny-virtual-list@^2.2.0:
|
|||
dependencies:
|
||||
prop-types "^15.5.7"
|
||||
|
||||
react-transition-group@^2.2.1:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d"
|
||||
integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==
|
||||
dependencies:
|
||||
dom-helpers "^3.4.0"
|
||||
loose-envify "^1.4.0"
|
||||
prop-types "^15.6.2"
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
|
||||
react-transition-group@^4.3.0:
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9"
|
||||
|
@ -26791,7 +26725,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
|
|||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
source-map@^0.7.2, source-map@^0.7.3:
|
||||
source-map@^0.7.3:
|
||||
version "0.7.3"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
|
||||
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
|
||||
|
@ -27601,11 +27535,6 @@ stylelint@13.8.0:
|
|||
v8-compile-cache "^2.2.0"
|
||||
write-file-atomic "^3.0.3"
|
||||
|
||||
stylis-rule-sheet@^0.0.10:
|
||||
version "0.0.10"
|
||||
resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430"
|
||||
integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==
|
||||
|
||||
stylis@3.5.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.0.tgz#016fa239663d77f868fef5b67cf201c4b7c701e1"
|
||||
|
@ -27616,11 +27545,6 @@ stylis@4.0.13:
|
|||
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.0.13.tgz#f5db332e376d13cc84ecfe5dace9a2a51d954c91"
|
||||
integrity sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==
|
||||
|
||||
stylis@^3.5.0:
|
||||
version "3.5.4"
|
||||
resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe"
|
||||
integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==
|
||||
|
||||
subarg@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
|
||||
|
@ -28310,13 +28234,6 @@ totalist@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df"
|
||||
integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==
|
||||
|
||||
touch@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/touch/-/touch-2.0.2.tgz#ca0b2a3ae3211246a61b16ba9e6cbf1596287164"
|
||||
integrity sha512-qjNtvsFXTRq7IuMLweVgFxmEuQ6gLbRs2jQxL80TtZ31dEKWYIxRXquij6w6VimyDek5hD3PytljHmEtAs2u0A==
|
||||
dependencies:
|
||||
nopt "~1.0.10"
|
||||
|
||||
touch@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue