@backstage/plugin-search-react 1.5.2-next.1 → 1.5.2-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @backstage/plugin-search-react
2
2
 
3
+ ## 1.5.2-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-components@0.12.6-next.2
9
+ - @backstage/core-plugin-api@1.5.1-next.1
10
+ - @backstage/theme@0.2.19-next.0
11
+ - @backstage/types@1.0.2
12
+ - @backstage/version-bridge@1.0.4-next.0
13
+ - @backstage/plugin-search-common@1.2.3-next.0
14
+
3
15
  ## 1.5.2-next.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -34,7 +34,7 @@ declare class MockSearchApi implements SearchApi {
34
34
  * @public
35
35
  * Extends props for any search result list item extension
36
36
  */
37
- declare type SearchResultListItemExtensionProps<Props extends {} = {}> = Props & PropsWithChildren<{
37
+ type SearchResultListItemExtensionProps<Props extends {} = {}> = Props & PropsWithChildren<{
38
38
  rank?: number;
39
39
  result?: SearchDocument;
40
40
  noTrack?: boolean;
@@ -43,7 +43,7 @@ declare type SearchResultListItemExtensionProps<Props extends {} = {}> = Props &
43
43
  * @public
44
44
  * Options for {@link createSearchResultListItemExtension}.
45
45
  */
46
- declare type SearchResultListItemExtensionOptions<Component extends (props: any) => JSX.Element | null> = {
46
+ type SearchResultListItemExtensionOptions<Component extends (props: any) => JSX.Element | null> = {
47
47
  /**
48
48
  * The extension name.
49
49
  */
@@ -73,7 +73,7 @@ declare const useSearchResultListItemExtensions: (children: ReactNode) => (resul
73
73
  * @public
74
74
  * Props for {@link SearchResultListItemExtensions}
75
75
  */
76
- declare type SearchResultListItemExtensionsProps = Omit<ListProps, 'results'> & {
76
+ type SearchResultListItemExtensionsProps = Omit<ListProps, 'results'> & {
77
77
  /**
78
78
  * Search result list.
79
79
  */
@@ -91,7 +91,7 @@ declare const SearchResultListItemExtensions: (props: SearchResultListItemExtens
91
91
  *
92
92
  * @public
93
93
  */
94
- declare type HighlightedSearchResultTextProps = {
94
+ type HighlightedSearchResultTextProps = {
95
95
  text: string;
96
96
  preTag: string;
97
97
  postTag: string;
@@ -106,7 +106,7 @@ declare const HighlightedSearchResultText: (props: HighlightedSearchResultTextPr
106
106
  *
107
107
  * @public
108
108
  */
109
- declare type SearchBarBaseProps = Omit<InputBaseProps, 'onChange'> & {
109
+ type SearchBarBaseProps = Omit<InputBaseProps, 'onChange'> & {
110
110
  debounceTime?: number;
111
111
  clearButton?: boolean;
112
112
  onClear?: () => void;
@@ -126,7 +126,7 @@ declare const SearchBarBase: ForwardRefExoticComponent<SearchBarBaseProps>;
126
126
  *
127
127
  * @public
128
128
  */
129
- declare type SearchBarProps = Partial<SearchBarBaseProps>;
129
+ type SearchBarProps = Partial<SearchBarBaseProps>;
130
130
  /**
131
131
  * Recommended search bar when you use the Search Provider or Search Context.
132
132
  *
@@ -139,7 +139,7 @@ declare const SearchBar: ForwardRefExoticComponent<SearchBarProps>;
139
139
  *
140
140
  * @public
141
141
  */
142
- declare type SearchAutocompleteProps<Option> = Omit<AutocompleteProps<Option, undefined, undefined, boolean>, 'renderInput' | 'disableClearable' | 'multiple'> & {
142
+ type SearchAutocompleteProps<Option> = Omit<AutocompleteProps<Option, undefined, undefined, boolean>, 'renderInput' | 'disableClearable' | 'multiple'> & {
143
143
  'data-testid'?: string;
144
144
  inputPlaceholder?: SearchBarProps['placeholder'];
145
145
  inputDebounceTime?: SearchBarProps['debounceTime'];
@@ -149,7 +149,7 @@ declare type SearchAutocompleteProps<Option> = Omit<AutocompleteProps<Option, un
149
149
  *
150
150
  * @public
151
151
  */
152
- declare type SearchAutocompleteComponent = <Option>(props: SearchAutocompleteProps<Option>) => JSX.Element;
152
+ type SearchAutocompleteComponent = <Option>(props: SearchAutocompleteProps<Option>) => JSX.Element;
153
153
  /**
154
154
  * Recommended search autocomplete when you use the Search Provider or Search Context.
155
155
  *
@@ -162,7 +162,7 @@ declare const SearchAutocomplete: SearchAutocompleteComponent;
162
162
  *
163
163
  * @public
164
164
  */
165
- declare type SearchAutocompleteDefaultOptionProps = {
165
+ type SearchAutocompleteDefaultOptionProps = {
166
166
  icon?: ReactNode;
167
167
  primaryText: ListItemTextProps['primary'];
168
168
  primaryTextTypographyProps?: ListItemTextProps['primaryTypographyProps'];
@@ -180,7 +180,7 @@ declare const SearchAutocompleteDefaultOption: (props: SearchAutocompleteDefault
180
180
  /**
181
181
  * @public
182
182
  */
183
- declare type SearchAutocompleteFilterProps = SearchFilterComponentProps & {
183
+ type SearchAutocompleteFilterProps = SearchFilterComponentProps & {
184
184
  filterSelectedOptions?: boolean;
185
185
  limitTags?: number;
186
186
  multiple?: boolean;
@@ -193,7 +193,7 @@ declare const AutocompleteFilter: (props: SearchAutocompleteFilterProps) => JSX.
193
193
  /**
194
194
  * @public
195
195
  */
196
- declare type SearchFilterComponentProps = {
196
+ type SearchFilterComponentProps = {
197
197
  className?: string;
198
198
  name: string;
199
199
  label?: string;
@@ -214,7 +214,7 @@ declare type SearchFilterComponentProps = {
214
214
  /**
215
215
  * @public
216
216
  */
217
- declare type SearchFilterWrapperProps = SearchFilterComponentProps & {
217
+ type SearchFilterWrapperProps = SearchFilterComponentProps & {
218
218
  component: (props: SearchFilterComponentProps) => ReactElement;
219
219
  debug?: boolean;
220
220
  };
@@ -247,7 +247,7 @@ declare const SearchFilter: {
247
247
  * A page limit option, this value must not be greater than 100.
248
248
  * @public
249
249
  */
250
- declare type SearchPaginationLimitOption<Current extends number = 101, Accumulator extends number[] = []> = Accumulator['length'] extends Current ? Accumulator[number] : SearchPaginationLimitOption<Current, [
250
+ type SearchPaginationLimitOption<Current extends number = 101, Accumulator extends number[] = []> = Accumulator['length'] extends Current ? Accumulator[number] : SearchPaginationLimitOption<Current, [
251
251
  ...Accumulator,
252
252
  Accumulator['length']
253
253
  ]>;
@@ -255,7 +255,7 @@ declare type SearchPaginationLimitOption<Current extends number = 101, Accumulat
255
255
  * A page limit text, this function is called with a "\{ from, to, page, count \}" object.
256
256
  * @public
257
257
  */
258
- declare type SearchPaginationLimitText = (params: {
258
+ type SearchPaginationLimitText = (params: {
259
259
  from: number;
260
260
  to: number;
261
261
  page: number;
@@ -265,7 +265,7 @@ declare type SearchPaginationLimitText = (params: {
265
265
  * Props for {@link SearchPaginationBase}.
266
266
  * @public
267
267
  */
268
- declare type SearchPaginationBaseProps = {
268
+ type SearchPaginationBaseProps = {
269
269
  /**
270
270
  * The component class name.
271
271
  */
@@ -325,7 +325,7 @@ declare const SearchPaginationBase: (props: SearchPaginationBaseProps) => JSX.El
325
325
  * Props for {@link SearchPagination}.
326
326
  * @public
327
327
  */
328
- declare type SearchPaginationProps = Omit<SearchPaginationBaseProps, 'pageLimit' | 'onPageLimitChange' | 'pageCursor' | 'onPageCursorChange' | 'hasNextPage'>;
328
+ type SearchPaginationProps = Omit<SearchPaginationBaseProps, 'pageLimit' | 'onPageLimitChange' | 'pageCursor' | 'onPageCursorChange' | 'hasNextPage'>;
329
329
  /**
330
330
  * A component for setting the search context page limit and cursor.
331
331
  * @param props - See {@link SearchPaginationProps}.
@@ -337,7 +337,7 @@ declare const SearchPagination: (props: SearchPaginationProps) => JSX.Element;
337
337
  * Props for {@link SearchResultContext}
338
338
  * @public
339
339
  */
340
- declare type SearchResultContextProps = {
340
+ type SearchResultContextProps = {
341
341
  /**
342
342
  * A child function that receives an asynchronous result set and returns a react element.
343
343
  */
@@ -368,7 +368,7 @@ declare const SearchResultContext: (props: SearchResultContextProps) => JSX.Elem
368
368
  * Props for {@link SearchResultApi}
369
369
  * @public
370
370
  */
371
- declare type SearchResultApiProps = SearchResultContextProps & {
371
+ type SearchResultApiProps = SearchResultContextProps & {
372
372
  query: Partial<SearchQuery>;
373
373
  };
374
374
  /**
@@ -396,7 +396,7 @@ declare const SearchResultApi: (props: SearchResultApiProps) => JSX.Element | nu
396
396
  * Props for {@link SearchResultState}
397
397
  * @public
398
398
  */
399
- declare type SearchResultStateProps = SearchResultContextProps & Partial<SearchResultApiProps>;
399
+ type SearchResultStateProps = SearchResultContextProps & Partial<SearchResultApiProps>;
400
400
  /**
401
401
  * Call a child render function passing a search state as an argument.
402
402
  * @remarks By default, results are taken from context, but when a "query" prop is set, results are requested from the search api.
@@ -440,7 +440,7 @@ declare const SearchResultState: (props: SearchResultStateProps) => JSX.Element;
440
440
  * Props for {@link SearchResult}
441
441
  * @public
442
442
  */
443
- declare type SearchResultProps = Pick<SearchResultStateProps, 'query'> & Omit<SearchResultListItemExtensionsProps, 'results' | 'children'> & {
443
+ type SearchResultProps = Pick<SearchResultStateProps, 'query'> & Omit<SearchResultListItemExtensionsProps, 'results' | 'children'> & {
444
444
  children?: ReactNode | ((resultSet: SearchResultSet) => JSX.Element);
445
445
  noResultsComponent?: JSX.Element;
446
446
  };
@@ -462,7 +462,7 @@ declare const SearchResult: (props: SearchResultProps) => JSX.Element;
462
462
  * Props for {@link SearchResultListLayout}
463
463
  * @public
464
464
  */
465
- declare type SearchResultListLayoutProps = ListProps & {
465
+ type SearchResultListLayoutProps = ListProps & {
466
466
  /**
467
467
  * If defined, will render a default error panel.
468
468
  */
@@ -498,7 +498,7 @@ declare const SearchResultListLayout: (props: SearchResultListLayoutProps) => JS
498
498
  * Props for {@link SearchResultList}.
499
499
  * @public
500
500
  */
501
- declare type SearchResultListProps = Pick<SearchResultStateProps, 'query'> & Omit<SearchResultListLayoutProps, 'loading' | 'error' | 'resultItems'>;
501
+ type SearchResultListProps = Pick<SearchResultStateProps, 'query'> & Omit<SearchResultListLayoutProps, 'loading' | 'error' | 'resultItems'>;
502
502
  /**
503
503
  * Given a query, search for results and render them as a list.
504
504
  * @param props - See {@link SearchResultListProps}.
@@ -510,7 +510,7 @@ declare const SearchResultList: (props: SearchResultListProps) => JSX.Element;
510
510
  * Props for {@link SearchResultGroupFilterFieldLayout}
511
511
  * @public
512
512
  */
513
- declare type SearchResultGroupFilterFieldLayoutProps = PropsWithChildren<{
513
+ type SearchResultGroupFilterFieldLayoutProps = PropsWithChildren<{
514
514
  label: string;
515
515
  value?: JsonValue;
516
516
  onDelete: () => void;
@@ -525,14 +525,14 @@ declare const SearchResultGroupFilterFieldLayout: (props: SearchResultGroupFilte
525
525
  * Common props for a result group filter field.
526
526
  * @public
527
527
  */
528
- declare type SearchResultGroupFilterFieldPropsWith<T> = T & SearchResultGroupFilterFieldLayoutProps & {
528
+ type SearchResultGroupFilterFieldPropsWith<T> = T & SearchResultGroupFilterFieldLayoutProps & {
529
529
  onChange: (value: JsonValue) => void;
530
530
  };
531
531
  /**
532
532
  * Props for {@link SearchResultGroupTextFilterField}.
533
533
  * @public
534
534
  */
535
- declare type SearchResultGroupTextFilterFieldProps = SearchResultGroupFilterFieldPropsWith<{}>;
535
+ type SearchResultGroupTextFilterFieldProps = SearchResultGroupFilterFieldPropsWith<{}>;
536
536
  /**
537
537
  * A text field that can be used as filter on search result groups.
538
538
  * @param props - See {@link SearchResultGroupTextFilterFieldProps}.
@@ -553,7 +553,7 @@ declare const SearchResultGroupTextFilterField: (props: SearchResultGroupTextFil
553
553
  * Props for {@link SearchResultGroupTextFilterField}.
554
554
  * @public
555
555
  */
556
- declare type SearchResultGroupSelectFilterFieldProps = SearchResultGroupFilterFieldPropsWith<{
556
+ type SearchResultGroupSelectFilterFieldProps = SearchResultGroupFilterFieldPropsWith<{
557
557
  children: ReactNode;
558
558
  }>;
559
559
  /**
@@ -579,7 +579,7 @@ declare const SearchResultGroupSelectFilterField: (props: SearchResultGroupSelec
579
579
  * Props for {@link SearchResultGroupLayout}
580
580
  * @public
581
581
  */
582
- declare type SearchResultGroupLayoutProps<FilterOption> = ListProps & {
582
+ type SearchResultGroupLayoutProps<FilterOption> = ListProps & {
583
583
  /**
584
584
  * If defined, will render a default error panel.
585
585
  */
@@ -652,7 +652,7 @@ declare function SearchResultGroupLayout<FilterOption>(props: SearchResultGroupL
652
652
  * Props for {@link SearchResultGroup}.
653
653
  * @public
654
654
  */
655
- declare type SearchResultGroupProps<FilterOption> = Pick<SearchResultStateProps, 'query'> & Omit<SearchResultGroupLayoutProps<FilterOption>, 'loading' | 'error' | 'resultItems' | 'filterFields'>;
655
+ type SearchResultGroupProps<FilterOption> = Pick<SearchResultStateProps, 'query'> & Omit<SearchResultGroupLayoutProps<FilterOption>, 'loading' | 'error' | 'resultItems' | 'filterFields'>;
656
656
  /**
657
657
  * Given a query, search for results and render them as a group.
658
658
  * @param props - See {@link SearchResultGroupProps}.
@@ -670,7 +670,7 @@ declare const SearchResultPager: () => JSX.Element;
670
670
  *
671
671
  * @public
672
672
  */
673
- declare type DefaultResultListItemProps = {
673
+ type DefaultResultListItemProps = {
674
674
  icon?: ReactNode;
675
675
  secondaryAction?: ReactNode;
676
676
  result?: SearchDocument;
@@ -688,7 +688,7 @@ declare const HigherOrderDefaultResultListItem: (props: DefaultResultListItemPro
688
688
  *
689
689
  * @public
690
690
  */
691
- declare type SearchContextValue = {
691
+ type SearchContextValue = {
692
692
  result: AsyncState<SearchResultSet>;
693
693
  setTerm: React.Dispatch<React.SetStateAction<string>>;
694
694
  setTypes: React.Dispatch<React.SetStateAction<string[]>>;
@@ -702,7 +702,7 @@ declare type SearchContextValue = {
702
702
  *
703
703
  * @public
704
704
  */
705
- declare type SearchContextState = {
705
+ type SearchContextState = {
706
706
  term: string;
707
707
  types: string[];
708
708
  filters: JsonObject;
@@ -726,7 +726,7 @@ declare const useSearchContextCheck: () => boolean;
726
726
  *
727
727
  * @public
728
728
  */
729
- declare type SearchContextProviderProps = PropsWithChildren<{
729
+ type SearchContextProviderProps = PropsWithChildren<{
730
730
  /**
731
731
  * State initialized by a local context.
732
732
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-search-react",
3
- "version": "1.5.2-next.1",
3
+ "version": "1.5.2-next.2",
4
4
  "main": "dist/index.esm.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -31,8 +31,8 @@
31
31
  "start": "backstage-cli package start"
32
32
  },
33
33
  "dependencies": {
34
- "@backstage/core-components": "^0.12.6-next.1",
35
- "@backstage/core-plugin-api": "^1.5.1-next.0",
34
+ "@backstage/core-components": "^0.12.6-next.2",
35
+ "@backstage/core-plugin-api": "^1.5.1-next.1",
36
36
  "@backstage/plugin-search-common": "^1.2.3-next.0",
37
37
  "@backstage/theme": "^0.2.19-next.0",
38
38
  "@backstage/types": "^1.0.2",
@@ -51,9 +51,9 @@
51
51
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@backstage/cli": "^0.22.6-next.1",
55
- "@backstage/core-app-api": "^1.7.0-next.1",
56
- "@backstage/test-utils": "^1.3.0-next.1",
54
+ "@backstage/cli": "^0.22.6-next.2",
55
+ "@backstage/core-app-api": "^1.7.0-next.2",
56
+ "@backstage/test-utils": "^1.3.0-next.2",
57
57
  "@testing-library/dom": "^8.0.0",
58
58
  "@testing-library/jest-dom": "^5.10.1",
59
59
  "@testing-library/react": "^12.1.3",