@backstage/plugin-search-react 1.8.0-next.2 → 1.8.0
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,28 @@
|
|
|
1
1
|
# @backstage/plugin-search-react
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9d66d8c: Make use of the `useApp` hook to retrieve the specified search icon in the SearchBar
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- fec8b57: Updated exports to use the new type parameters for extensions and extension blueprints.
|
|
12
|
+
- f26ff99: Slight type tweak to match newer React versions better
|
|
13
|
+
- dbbd93e: Internal update to match recent React types
|
|
14
|
+
- 836127c: Updated dependency `@testing-library/react` to `^16.0.0`.
|
|
15
|
+
- 5446061: The `/alpha` export no longer export extension creators for the new frontend system, existing usage should be switched to use the equivalent extension blueprint instead. For more information see the [new frontend system 1.30 migration documentation](https://backstage.io/docs/frontend-system/architecture/migrations#130).
|
|
16
|
+
- a159180: Added missing items to `overridableComponents`
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @backstage/core-components@0.15.0
|
|
19
|
+
- @backstage/frontend-plugin-api@0.8.0
|
|
20
|
+
- @backstage/core-plugin-api@1.9.4
|
|
21
|
+
- @backstage/theme@0.5.7
|
|
22
|
+
- @backstage/version-bridge@1.0.9
|
|
23
|
+
- @backstage/types@1.1.1
|
|
24
|
+
- @backstage/plugin-search-common@1.2.14
|
|
25
|
+
|
|
3
26
|
## 1.8.0-next.2
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/alpha/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HighlightedSearchResultText.esm.js","sources":["../../../src/components/HighlightedSearchResultText/HighlightedSearchResultText.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useMemo } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n () => ({\n highlight: {},\n }),\n { name: 'BackstageHighlightedSearchResultText' },\n);\n\n/**\n * Props for {@link HighlightedSearchResultText}.\n *\n * @public\n */\nexport type HighlightedSearchResultTextProps = {\n text: string;\n preTag: string;\n postTag: string;\n};\n\n/**\n * @public\n */\nexport const HighlightedSearchResultText = (\n props: HighlightedSearchResultTextProps,\n) => {\n const { text, preTag, postTag } = props;\n\n const classes = useStyles();\n const terms = useMemo(\n () => text.split(new RegExp(`(${preTag}.+?${postTag})`)),\n [postTag, preTag, text],\n );\n\n return (\n <>\n {terms.map((t, idx) =>\n t.includes(preTag) ? (\n <mark className={classes.highlight} key={idx}>\n {t.replace(new RegExp(`${preTag}|${postTag}`, 'g'), '')}\n </mark>\n ) : (\n t\n ),\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"HighlightedSearchResultText.esm.js","sources":["../../../src/components/HighlightedSearchResultText/HighlightedSearchResultText.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useMemo } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\n/** @public */\nexport type HighlightedSearchResultTextClassKey = 'highlight';\n\nconst useStyles = makeStyles(\n () => ({\n highlight: {},\n }),\n { name: 'BackstageHighlightedSearchResultText' },\n);\n\n/**\n * Props for {@link HighlightedSearchResultText}.\n *\n * @public\n */\nexport type HighlightedSearchResultTextProps = {\n text: string;\n preTag: string;\n postTag: string;\n};\n\n/**\n * @public\n */\nexport const HighlightedSearchResultText = (\n props: HighlightedSearchResultTextProps,\n) => {\n const { text, preTag, postTag } = props;\n\n const classes = useStyles();\n const terms = useMemo(\n () => text.split(new RegExp(`(${preTag}.+?${postTag})`)),\n [postTag, preTag, text],\n );\n\n return (\n <>\n {terms.map((t, idx) =>\n t.includes(preTag) ? (\n <mark className={classes.highlight} key={idx}>\n {t.replace(new RegExp(`${preTag}|${postTag}`, 'g'), '')}\n </mark>\n ) : (\n t\n ),\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;AAsBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,OAAO;AAAA,IACL,WAAW,EAAC;AAAA,GACd,CAAA;AAAA,EACA,EAAE,MAAM,sCAAuC,EAAA;AACjD,CAAA,CAAA;AAgBa,MAAA,2BAAA,GAA8B,CACzC,KACG,KAAA;AACH,EAAA,MAAM,EAAE,IAAA,EAAM,MAAQ,EAAA,OAAA,EAAY,GAAA,KAAA,CAAA;AAElC,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,MAAM,IAAK,CAAA,KAAA,CAAM,IAAI,MAAA,CAAO,IAAI,MAAM,CAAA,GAAA,EAAM,OAAO,CAAA,CAAA,CAAG,CAAC,CAAA;AAAA,IACvD,CAAC,OAAS,EAAA,MAAA,EAAQ,IAAI,CAAA;AAAA,GACxB,CAAA;AAEA,EAAA,iEAEK,KAAM,CAAA,GAAA;AAAA,IAAI,CAAC,CAAG,EAAA,GAAA,KACb,CAAE,CAAA,QAAA,CAAS,MAAM,CAAA,mBACd,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAK,SAAW,EAAA,OAAA,CAAQ,SAAW,EAAA,GAAA,EAAK,GACtC,EAAA,EAAA,CAAA,CAAE,OAAQ,CAAA,IAAI,MAAO,CAAA,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,OAAO,CAAA,CAAA,EAAI,GAAG,CAAA,EAAG,EAAE,CACxD,CAEA,GAAA,CAAA;AAAA,GAGN,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,8 @@ type SearchResultListItemExtensionsProps = Omit<ListProps, 'results'> & {
|
|
|
90
90
|
*/
|
|
91
91
|
declare const SearchResultListItemExtensions: (props: SearchResultListItemExtensionsProps) => React.JSX.Element;
|
|
92
92
|
|
|
93
|
+
/** @public */
|
|
94
|
+
type HighlightedSearchResultTextClassKey = 'highlight';
|
|
93
95
|
/**
|
|
94
96
|
* Props for {@link HighlightedSearchResultText}.
|
|
95
97
|
*
|
|
@@ -757,4 +759,4 @@ type SearchContextProviderProps = PropsWithChildren<{
|
|
|
757
759
|
*/
|
|
758
760
|
declare const SearchContextProvider: (props: SearchContextProviderProps) => React.JSX.Element;
|
|
759
761
|
|
|
760
|
-
export { AutocompleteFilter, CheckboxFilter, HigherOrderDefaultResultListItem as DefaultResultListItem, type DefaultResultListItemProps, HighlightedSearchResultText, 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 };
|
|
762
|
+
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.0
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library",
|
|
6
6
|
"pluginId": "search",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"test": "backstage-cli package test"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@backstage/core-components": "^0.
|
|
59
|
-
"@backstage/core-plugin-api": "^1.9.4
|
|
60
|
-
"@backstage/frontend-plugin-api": "^0.8.0
|
|
58
|
+
"@backstage/core-components": "^0.15.0",
|
|
59
|
+
"@backstage/core-plugin-api": "^1.9.4",
|
|
60
|
+
"@backstage/frontend-plugin-api": "^0.8.0",
|
|
61
61
|
"@backstage/plugin-search-common": "^1.2.14",
|
|
62
|
-
"@backstage/theme": "^0.5.7
|
|
62
|
+
"@backstage/theme": "^0.5.7",
|
|
63
63
|
"@backstage/types": "^1.1.1",
|
|
64
|
-
"@backstage/version-bridge": "^1.0.9
|
|
64
|
+
"@backstage/version-bridge": "^1.0.9",
|
|
65
65
|
"@material-ui/core": "^4.12.2",
|
|
66
66
|
"@material-ui/icons": "^4.9.1",
|
|
67
67
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"react-use": "^17.3.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@backstage/cli": "^0.27.1
|
|
75
|
-
"@backstage/core-app-api": "^1.
|
|
76
|
-
"@backstage/frontend-app-api": "^0.9.0
|
|
77
|
-
"@backstage/frontend-test-utils": "^0.2.0
|
|
78
|
-
"@backstage/test-utils": "^1.6.0
|
|
74
|
+
"@backstage/cli": "^0.27.1",
|
|
75
|
+
"@backstage/core-app-api": "^1.15.0",
|
|
76
|
+
"@backstage/frontend-app-api": "^0.9.0",
|
|
77
|
+
"@backstage/frontend-test-utils": "^0.2.0",
|
|
78
|
+
"@backstage/test-utils": "^1.6.0",
|
|
79
79
|
"@testing-library/dom": "^10.0.0",
|
|
80
80
|
"@testing-library/jest-dom": "^6.0.0",
|
|
81
81
|
"@testing-library/react": "^16.0.0",
|