@backstage/plugin-search-react 1.8.8-next.0 → 1.8.8-next.1

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/alpha/blueprints/SearchResultListItemBlueprint.esm.js +7 -6
  3. package/dist/alpha/blueprints/SearchResultListItemBlueprint.esm.js.map +1 -1
  4. package/dist/components/DefaultResultListItem/DefaultResultListItem.esm.js +42 -38
  5. package/dist/components/DefaultResultListItem/DefaultResultListItem.esm.js.map +1 -1
  6. package/dist/components/HighlightedSearchResultText/HighlightedSearchResultText.esm.js +5 -4
  7. package/dist/components/HighlightedSearchResultText/HighlightedSearchResultText.esm.js.map +1 -1
  8. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js +7 -6
  9. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -1
  10. package/dist/components/SearchAutocomplete/SearchAutocompleteDefaultOption.esm.js +14 -11
  11. package/dist/components/SearchAutocomplete/SearchAutocompleteDefaultOption.esm.js.map +1 -1
  12. package/dist/components/SearchBar/SearchBar.esm.js +23 -22
  13. package/dist/components/SearchBar/SearchBar.esm.js.map +1 -1
  14. package/dist/components/SearchFilter/SearchFilter.Autocomplete.esm.js +5 -4
  15. package/dist/components/SearchFilter/SearchFilter.Autocomplete.esm.js.map +1 -1
  16. package/dist/components/SearchFilter/SearchFilter.esm.js +45 -42
  17. package/dist/components/SearchFilter/SearchFilter.esm.js.map +1 -1
  18. package/dist/components/SearchPagination/SearchPagination.esm.js +4 -3
  19. package/dist/components/SearchPagination/SearchPagination.esm.js.map +1 -1
  20. package/dist/components/SearchResult/SearchResult.esm.js +12 -12
  21. package/dist/components/SearchResult/SearchResult.esm.js.map +1 -1
  22. package/dist/components/SearchResultGroup/SearchResultGroup.esm.js +99 -79
  23. package/dist/components/SearchResultGroup/SearchResultGroup.esm.js.map +1 -1
  24. package/dist/components/SearchResultList/SearchResultList.esm.js +22 -22
  25. package/dist/components/SearchResultList/SearchResultList.esm.js.map +1 -1
  26. package/dist/components/SearchResultPager/SearchResultPager.esm.js +24 -21
  27. package/dist/components/SearchResultPager/SearchResultPager.esm.js.map +1 -1
  28. package/dist/context/SearchContext.esm.js +7 -6
  29. package/dist/context/SearchContext.esm.js.map +1 -1
  30. package/dist/extensions.esm.js +23 -22
  31. package/dist/extensions.esm.js.map +1 -1
  32. package/dist/index.d.ts +39 -37
  33. package/package.json +13 -13
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
2
2
  import { Extension } from '@backstage/core-plugin-api';
3
3
  import { SearchQuery, SearchResultSet, SearchDocument, SearchResult as SearchResult$1, ResultHighlight } from '@backstage/plugin-search-common';
4
- import React, { PropsWithChildren, ReactNode, ReactElement } from 'react';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import * as react from 'react';
6
+ import { PropsWithChildren, ReactNode, ReactElement, Dispatch, SetStateAction, DispatchWithoutAction } from 'react';
5
7
  import { ListProps } from '@material-ui/core/List';
6
8
  import { ListItemProps } from '@material-ui/core/ListItem';
7
9
  import { TextFieldProps } from '@material-ui/core/TextField';
@@ -71,7 +73,7 @@ declare const createSearchResultListItemExtension: <Component extends (props: an
71
73
  * @public
72
74
  * Returns a function that renders a result using extensions.
73
75
  */
74
- declare const useSearchResultListItemExtensions: (children: ReactNode) => (result: SearchResult$1, key?: number) => React.JSX.Element;
76
+ declare const useSearchResultListItemExtensions: (children: ReactNode) => (result: SearchResult$1, key?: number) => react_jsx_runtime.JSX.Element;
75
77
  /**
76
78
  * @public
77
79
  * Props for {@link SearchResultListItemExtensions}
@@ -87,7 +89,7 @@ type SearchResultListItemExtensionsProps = Omit<ListProps, 'results'> & {
87
89
  * Render results using search extensions.
88
90
  * @param props - see {@link SearchResultListItemExtensionsProps}
89
91
  */
90
- declare const SearchResultListItemExtensions: (props: SearchResultListItemExtensionsProps) => React.JSX.Element;
92
+ declare const SearchResultListItemExtensions: (props: SearchResultListItemExtensionsProps) => react_jsx_runtime.JSX.Element;
91
93
 
92
94
  /** @public */
93
95
  type HighlightedSearchResultTextClassKey = 'highlight';
@@ -104,7 +106,7 @@ type HighlightedSearchResultTextProps = {
104
106
  /**
105
107
  * @public
106
108
  */
107
- declare const HighlightedSearchResultText: (props: HighlightedSearchResultTextProps) => React.JSX.Element;
109
+ declare const HighlightedSearchResultText: (props: HighlightedSearchResultTextProps) => react_jsx_runtime.JSX.Element;
108
110
 
109
111
  /**
110
112
  * Props for {@link SearchBarBase}.
@@ -117,7 +119,7 @@ type SearchBarBaseProps = Omit<TextFieldProps, 'onChange'> & {
117
119
  onClear?: () => void;
118
120
  onSubmit?: () => void;
119
121
  onChange: (value: string) => void;
120
- endAdornment?: React.ReactNode;
122
+ endAdornment?: ReactNode;
121
123
  };
122
124
  /**
123
125
  * All search boxes exported by the search plugin are based on the <SearchBarBase />,
@@ -126,7 +128,7 @@ type SearchBarBaseProps = Omit<TextFieldProps, 'onChange'> & {
126
128
  *
127
129
  * @public
128
130
  */
129
- declare const SearchBarBase: React.ForwardRefExoticComponent<Omit<SearchBarBaseProps, "ref"> & React.RefAttributes<unknown>>;
131
+ declare const SearchBarBase: react.ForwardRefExoticComponent<Omit<SearchBarBaseProps, "ref"> & react.RefAttributes<unknown>>;
130
132
  /**
131
133
  * Props for {@link SearchBar}.
132
134
  *
@@ -138,7 +140,7 @@ type SearchBarProps = Partial<SearchBarBaseProps>;
138
140
  *
139
141
  * @public
140
142
  */
141
- declare const SearchBar: React.ForwardRefExoticComponent<Omit<Partial<SearchBarBaseProps>, "ref"> & React.RefAttributes<unknown>>;
143
+ declare const SearchBar: react.ForwardRefExoticComponent<Omit<Partial<SearchBarBaseProps>, "ref"> & react.RefAttributes<unknown>>;
142
144
 
143
145
  /**
144
146
  * Props for {@link SearchAutocomplete}.
@@ -181,7 +183,7 @@ type SearchAutocompleteDefaultOptionProps = {
181
183
  *
182
184
  * @public
183
185
  */
184
- declare const SearchAutocompleteDefaultOption: (props: SearchAutocompleteDefaultOptionProps) => React.JSX.Element;
186
+ declare const SearchAutocompleteDefaultOption: (props: SearchAutocompleteDefaultOptionProps) => react_jsx_runtime.JSX.Element;
185
187
 
186
188
  /**
187
189
  * @public
@@ -194,7 +196,7 @@ type SearchAutocompleteFilterProps = SearchFilterComponentProps & {
194
196
  /**
195
197
  * @public
196
198
  */
197
- declare const AutocompleteFilter: (props: SearchAutocompleteFilterProps) => React.JSX.Element;
199
+ declare const AutocompleteFilter: (props: SearchAutocompleteFilterProps) => react_jsx_runtime.JSX.Element;
198
200
 
199
201
  /**
200
202
  * @public
@@ -227,18 +229,18 @@ type SearchFilterWrapperProps = SearchFilterComponentProps & {
227
229
  /**
228
230
  * @public
229
231
  */
230
- declare const CheckboxFilter: (props: SearchFilterComponentProps) => React.JSX.Element;
232
+ declare const CheckboxFilter: (props: SearchFilterComponentProps) => react_jsx_runtime.JSX.Element;
231
233
  /**
232
234
  * @public
233
235
  */
234
- declare const SelectFilter: (props: SearchFilterComponentProps) => React.JSX.Element;
236
+ declare const SelectFilter: (props: SearchFilterComponentProps) => react_jsx_runtime.JSX.Element;
235
237
  /**
236
238
  * @public
237
239
  */
238
240
  declare const SearchFilter: {
239
- (props: SearchFilterWrapperProps): React.JSX.Element;
240
- Checkbox(props: Omit<SearchFilterWrapperProps, "component"> & SearchFilterComponentProps): React.JSX.Element;
241
- Select(props: Omit<SearchFilterWrapperProps, "component"> & SearchFilterComponentProps): React.JSX.Element;
241
+ (props: SearchFilterWrapperProps): react_jsx_runtime.JSX.Element;
242
+ Checkbox(props: Omit<SearchFilterWrapperProps, "component"> & SearchFilterComponentProps): react_jsx_runtime.JSX.Element;
243
+ Select(props: Omit<SearchFilterWrapperProps, "component"> & SearchFilterComponentProps): react_jsx_runtime.JSX.Element;
242
244
  /**
243
245
  * A control surface for a given filter field name, rendered as an autocomplete
244
246
  * textfield. A hard-coded list of values may be provided, or an async function
@@ -246,7 +248,7 @@ declare const SearchFilter: {
246
248
  *
247
249
  * @public
248
250
  */
249
- Autocomplete(props: SearchAutocompleteFilterProps): React.JSX.Element;
251
+ Autocomplete(props: SearchAutocompleteFilterProps): react_jsx_runtime.JSX.Element;
250
252
  };
251
253
 
252
254
  /**
@@ -326,7 +328,7 @@ type SearchPaginationBaseProps = {
326
328
  * @param props - See {@link SearchPaginationBaseProps}.
327
329
  * @public
328
330
  */
329
- declare const SearchPaginationBase: (props: SearchPaginationBaseProps) => React.JSX.Element;
331
+ declare const SearchPaginationBase: (props: SearchPaginationBaseProps) => react_jsx_runtime.JSX.Element;
330
332
  /**
331
333
  * Props for {@link SearchPagination}.
332
334
  * @public
@@ -337,7 +339,7 @@ type SearchPaginationProps = Omit<SearchPaginationBaseProps, 'pageLimit' | 'onLi
337
339
  * @param props - See {@link SearchPaginationProps}.
338
340
  * @public
339
341
  */
340
- declare const SearchPagination: (props: SearchPaginationProps) => React.JSX.Element;
342
+ declare const SearchPagination: (props: SearchPaginationProps) => react_jsx_runtime.JSX.Element;
341
343
 
342
344
  /**
343
345
  * Props for {@link SearchResultContext}
@@ -441,7 +443,7 @@ type SearchResultStateProps = SearchResultContextProps & Partial<SearchResultApi
441
443
  * ```
442
444
  * @public
443
445
  */
444
- declare const SearchResultState: (props: SearchResultStateProps) => React.JSX.Element;
446
+ declare const SearchResultState: (props: SearchResultStateProps) => react_jsx_runtime.JSX.Element;
445
447
  /**
446
448
  * Props for {@link SearchResult}
447
449
  * @public
@@ -456,13 +458,13 @@ type SearchResultProps = Pick<SearchResultStateProps, 'query'> & Omit<SearchResu
456
458
  * @param props - see {@link SearchResultProps}.
457
459
  * @public
458
460
  */
459
- declare const SearchResultComponent: (props: SearchResultProps) => React.JSX.Element;
461
+ declare const SearchResultComponent: (props: SearchResultProps) => react_jsx_runtime.JSX.Element;
460
462
  /**
461
463
  * A component returning the search result from a parent search context or api.
462
464
  * @param props - see {@link SearchResultProps}.
463
465
  * @public
464
466
  */
465
- declare const SearchResult: (props: SearchResultProps) => React.JSX.Element;
467
+ declare const SearchResult: (props: SearchResultProps) => react_jsx_runtime.JSX.Element;
466
468
 
467
469
  /**
468
470
  * Props for {@link SearchResultListLayout}
@@ -499,7 +501,7 @@ type SearchResultListLayoutProps = ListProps & {
499
501
  * @param props - See {@link SearchResultListLayoutProps}.
500
502
  * @public
501
503
  */
502
- declare const SearchResultListLayout: (props: SearchResultListLayoutProps) => React.JSX.Element;
504
+ declare const SearchResultListLayout: (props: SearchResultListLayoutProps) => react_jsx_runtime.JSX.Element;
503
505
  /**
504
506
  * Props for {@link SearchResultList}.
505
507
  * @public
@@ -510,7 +512,7 @@ type SearchResultListProps = Pick<SearchResultStateProps, 'query'> & Omit<Search
510
512
  * @param props - See {@link SearchResultListProps}.
511
513
  * @public
512
514
  */
513
- declare const SearchResultList: (props: SearchResultListProps) => React.JSX.Element;
515
+ declare const SearchResultList: (props: SearchResultListProps) => react_jsx_runtime.JSX.Element;
514
516
 
515
517
  /**
516
518
  * Props for {@link SearchResultGroupFilterFieldLayout}
@@ -526,7 +528,7 @@ type SearchResultGroupFilterFieldLayoutProps = PropsWithChildren<{
526
528
  * @param props - See {@link SearchResultGroupFilterFieldLayoutProps}.
527
529
  * @public
528
530
  */
529
- declare const SearchResultGroupFilterFieldLayout: (props: SearchResultGroupFilterFieldLayoutProps) => React.JSX.Element;
531
+ declare const SearchResultGroupFilterFieldLayout: (props: SearchResultGroupFilterFieldLayoutProps) => react_jsx_runtime.JSX.Element;
530
532
  /**
531
533
  * Common props for a result group filter field.
532
534
  * @public
@@ -554,7 +556,7 @@ type SearchResultGroupTextFilterFieldProps = SearchResultGroupFilterFieldPropsWi
554
556
  * ```
555
557
  * @public
556
558
  */
557
- declare const SearchResultGroupTextFilterField: (props: SearchResultGroupTextFilterFieldProps) => React.JSX.Element;
559
+ declare const SearchResultGroupTextFilterField: (props: SearchResultGroupTextFilterFieldProps) => react_jsx_runtime.JSX.Element;
558
560
  /**
559
561
  * Props for {@link SearchResultGroupTextFilterField}.
560
562
  * @public
@@ -580,7 +582,7 @@ type SearchResultGroupSelectFilterFieldProps = SearchResultGroupFilterFieldProps
580
582
  * ```
581
583
  * @public
582
584
  */
583
- declare const SearchResultGroupSelectFilterField: (props: SearchResultGroupSelectFilterFieldProps) => React.JSX.Element;
585
+ declare const SearchResultGroupSelectFilterField: (props: SearchResultGroupSelectFilterFieldProps) => react_jsx_runtime.JSX.Element;
584
586
  /**
585
587
  * Props for {@link SearchResultGroupLayout}
586
588
  * @public
@@ -653,7 +655,7 @@ type SearchResultGroupLayoutProps<FilterOption> = ListProps & {
653
655
  * @param props - See {@link SearchResultGroupLayoutProps}.
654
656
  * @public
655
657
  */
656
- declare function SearchResultGroupLayout<FilterOption>(props: SearchResultGroupLayoutProps<FilterOption>): React.JSX.Element;
658
+ declare function SearchResultGroupLayout<FilterOption>(props: SearchResultGroupLayoutProps<FilterOption>): react_jsx_runtime.JSX.Element;
657
659
  /**
658
660
  * Props for {@link SearchResultGroup}.
659
661
  * @public
@@ -664,12 +666,12 @@ type SearchResultGroupProps<FilterOption> = Pick<SearchResultStateProps, 'query'
664
666
  * @param props - See {@link SearchResultGroupProps}.
665
667
  * @public
666
668
  */
667
- declare function SearchResultGroup<FilterOption>(props: SearchResultGroupProps<FilterOption>): React.JSX.Element;
669
+ declare function SearchResultGroup<FilterOption>(props: SearchResultGroupProps<FilterOption>): react_jsx_runtime.JSX.Element;
668
670
 
669
671
  /**
670
672
  * @public
671
673
  */
672
- declare const SearchResultPager: () => React.JSX.Element;
674
+ declare const SearchResultPager: () => react_jsx_runtime.JSX.Element;
673
675
 
674
676
  /**
675
677
  * Props for {@link DefaultResultListItem}
@@ -688,7 +690,7 @@ type DefaultResultListItemProps = {
688
690
  /**
689
691
  * @public
690
692
  */
691
- declare const HigherOrderDefaultResultListItem: (props: DefaultResultListItemProps) => React.JSX.Element;
693
+ declare const HigherOrderDefaultResultListItem: (props: DefaultResultListItemProps) => react_jsx_runtime.JSX.Element;
692
694
 
693
695
  /**
694
696
  *
@@ -696,13 +698,13 @@ declare const HigherOrderDefaultResultListItem: (props: DefaultResultListItemPro
696
698
  */
697
699
  type SearchContextValue = {
698
700
  result: AsyncState<SearchResultSet>;
699
- setTerm: React.Dispatch<React.SetStateAction<string>>;
700
- setTypes: React.Dispatch<React.SetStateAction<string[]>>;
701
- setFilters: React.Dispatch<React.SetStateAction<JsonObject>>;
702
- setPageLimit: React.Dispatch<React.SetStateAction<number | undefined>>;
703
- setPageCursor: React.Dispatch<React.SetStateAction<string | undefined>>;
704
- fetchNextPage?: React.DispatchWithoutAction;
705
- fetchPreviousPage?: React.DispatchWithoutAction;
701
+ setTerm: Dispatch<SetStateAction<string>>;
702
+ setTypes: Dispatch<SetStateAction<string[]>>;
703
+ setFilters: Dispatch<SetStateAction<JsonObject>>;
704
+ setPageLimit: Dispatch<SetStateAction<number | undefined>>;
705
+ setPageCursor: Dispatch<SetStateAction<string | undefined>>;
706
+ fetchNextPage?: DispatchWithoutAction;
707
+ fetchPreviousPage?: DispatchWithoutAction;
706
708
  } & SearchContextState;
707
709
  /**
708
710
  *
@@ -756,6 +758,6 @@ type SearchContextProviderProps = PropsWithChildren<{
756
758
  * @public
757
759
  * Search context provider which gives you access to shared state between search components
758
760
  */
759
- declare const SearchContextProvider: (props: SearchContextProviderProps) => React.JSX.Element;
761
+ declare const SearchContextProvider: (props: SearchContextProviderProps) => react_jsx_runtime.JSX.Element;
760
762
 
761
763
  export { AutocompleteFilter, CheckboxFilter, HigherOrderDefaultResultListItem as DefaultResultListItem, type DefaultResultListItemProps, HighlightedSearchResultText, type HighlightedSearchResultTextClassKey, type HighlightedSearchResultTextProps, MockSearchApi, type SearchApi, SearchAutocomplete, type SearchAutocompleteComponent, SearchAutocompleteDefaultOption, type SearchAutocompleteDefaultOptionProps, type SearchAutocompleteFilterProps, type SearchAutocompleteProps, SearchBar, SearchBarBase, type SearchBarBaseProps, type SearchBarProps, SearchContextProvider, type SearchContextProviderProps, type SearchContextState, type SearchContextValue, SearchFilter, type SearchFilterComponentProps, type SearchFilterWrapperProps, SearchPagination, SearchPaginationBase, type SearchPaginationBaseProps, type SearchPaginationLimitOption, type SearchPaginationLimitText, type SearchPaginationProps, SearchResult, SearchResultApi, type SearchResultApiProps, SearchResultComponent, SearchResultContext, type SearchResultContextProps, SearchResultGroup, SearchResultGroupFilterFieldLayout, type SearchResultGroupFilterFieldLayoutProps, type SearchResultGroupFilterFieldPropsWith, SearchResultGroupLayout, type SearchResultGroupLayoutProps, type SearchResultGroupProps, SearchResultGroupSelectFilterField, type SearchResultGroupSelectFilterFieldProps, SearchResultGroupTextFilterField, type SearchResultGroupTextFilterFieldProps, SearchResultList, type SearchResultListItemExtensionOptions, type SearchResultListItemExtensionProps, SearchResultListItemExtensions, type SearchResultListItemExtensionsProps, SearchResultListLayout, type SearchResultListLayoutProps, type SearchResultListProps, SearchResultPager, type SearchResultProps, SearchResultState, type SearchResultStateProps, SelectFilter, createSearchResultListItemExtension, searchApiRef, useSearch, useSearchContextCheck, useSearchResultListItemExtensions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-search-react",
3
- "version": "1.8.8-next.0",
3
+ "version": "1.8.8-next.1",
4
4
  "backstage": {
5
5
  "role": "web-library",
6
6
  "pluginId": "search",
@@ -43,11 +43,11 @@
43
43
  "types": "./dist/index.d.ts",
44
44
  "typesVersions": {
45
45
  "*": {
46
- "*": [
47
- "dist/index.d.ts"
48
- ],
49
46
  "alpha": [
50
47
  "dist/alpha.d.ts"
48
+ ],
49
+ "package.json": [
50
+ "package.json"
51
51
  ]
52
52
  }
53
53
  },
@@ -64,11 +64,11 @@
64
64
  "test": "backstage-cli package test"
65
65
  },
66
66
  "dependencies": {
67
- "@backstage/core-components": "0.17.1-next.0",
68
- "@backstage/core-plugin-api": "1.10.5",
69
- "@backstage/frontend-plugin-api": "0.10.1-next.0",
67
+ "@backstage/core-components": "0.17.1-next.1",
68
+ "@backstage/core-plugin-api": "1.10.6-next.0",
69
+ "@backstage/frontend-plugin-api": "0.10.1-next.1",
70
70
  "@backstage/plugin-search-common": "1.2.17",
71
- "@backstage/theme": "0.6.4",
71
+ "@backstage/theme": "0.6.5-next.0",
72
72
  "@backstage/types": "1.2.1",
73
73
  "@backstage/version-bridge": "1.0.11",
74
74
  "@material-ui/core": "^4.12.2",
@@ -80,11 +80,11 @@
80
80
  "uuid": "^11.0.2"
81
81
  },
82
82
  "devDependencies": {
83
- "@backstage/cli": "0.32.0-next.1",
84
- "@backstage/core-app-api": "1.16.0",
85
- "@backstage/frontend-app-api": "0.11.1-next.0",
86
- "@backstage/frontend-test-utils": "0.3.1-next.0",
87
- "@backstage/test-utils": "1.7.6",
83
+ "@backstage/cli": "0.32.0-next.2",
84
+ "@backstage/core-app-api": "1.16.1-next.0",
85
+ "@backstage/frontend-app-api": "0.11.1-next.1",
86
+ "@backstage/frontend-test-utils": "0.3.1-next.1",
87
+ "@backstage/test-utils": "1.7.7-next.0",
88
88
  "@testing-library/dom": "^10.0.0",
89
89
  "@testing-library/jest-dom": "^6.0.0",
90
90
  "@testing-library/react": "^16.0.0",