@backstage/plugin-search-react 0.0.0-nightly-20220413023505

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 ADDED
@@ -0,0 +1,26 @@
1
+ # @backstage/plugin-search-react
2
+
3
+ ## 0.0.0-nightly-20220413023505
4
+
5
+ ### Minor Changes
6
+
7
+ - ab230a433f: New search package to hold things the search plugin itself and other frontend plugins (e.g. techdocs, home) depend on.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @backstage/core-app-api@0.0.0-nightly-20220413023505
13
+ - @backstage/core-plugin-api@0.0.0-nightly-20220413023505
14
+ - @backstage/plugin-search-common@0.0.0-nightly-20220413023505
15
+
16
+ ## 0.1.0-next.0
17
+
18
+ ### Minor Changes
19
+
20
+ - ab230a433f: New search package to hold things the search plugin itself and other frontend plugins (e.g. techdocs, home) depend on.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+ - @backstage/core-app-api@1.0.1-next.1
26
+ - @backstage/core-plugin-api@1.0.1-next.0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Backstage Search
2
+
3
+ A search plugin library which holds functionality the [search plugin](/plugins/search/README.md) itself and other frontend plugins (e.g. [techdocs](/plugins/techdocs/README.md), [home](/plugins/home/README.md)) depend on.
@@ -0,0 +1,64 @@
1
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
2
+ import { SearchQuery, SearchResultSet } from '@backstage/plugin-search-common';
3
+ import { JsonObject } from '@backstage/types';
4
+ import React, { ComponentProps, PropsWithChildren } from 'react';
5
+ import { AsyncState } from 'react-use/lib/useAsync';
6
+
7
+ /**
8
+ * @public
9
+ */
10
+ declare const searchApiRef: _backstage_core_plugin_api.ApiRef<SearchApi>;
11
+ /**
12
+ * @public
13
+ */
14
+ interface SearchApi {
15
+ query(query: SearchQuery): Promise<SearchResultSet>;
16
+ }
17
+
18
+ declare type SearchContextValue = {
19
+ result: AsyncState<SearchResultSet>;
20
+ setTerm: React.Dispatch<React.SetStateAction<string>>;
21
+ setTypes: React.Dispatch<React.SetStateAction<string[]>>;
22
+ setFilters: React.Dispatch<React.SetStateAction<JsonObject>>;
23
+ setPageCursor: React.Dispatch<React.SetStateAction<string | undefined>>;
24
+ fetchNextPage?: React.DispatchWithoutAction;
25
+ fetchPreviousPage?: React.DispatchWithoutAction;
26
+ } & SearchContextState;
27
+ /**
28
+ *
29
+ * @public
30
+ */
31
+ declare type SearchContextState = {
32
+ term: string;
33
+ types: string[];
34
+ filters: JsonObject;
35
+ pageCursor?: string;
36
+ };
37
+ /**
38
+ * @public
39
+ */
40
+ declare const SearchContextProvider$1: ({ initialState, children, }: React.PropsWithChildren<{
41
+ initialState?: SearchContextState | undefined;
42
+ }>) => JSX.Element;
43
+ /**
44
+ * @public
45
+ */
46
+ declare const useSearch: () => SearchContextValue;
47
+
48
+ declare type QueryResultProps = {
49
+ mockedResults?: SearchResultSet;
50
+ };
51
+ /**
52
+ * Utility context provider only for use in Storybook stories. You should use
53
+ * the real `<SearchContextProvider>` exported by `@backstage/plugin-search-react` in
54
+ * your app instead of this! In some cases (like the search page) it may
55
+ * already be provided on your behalf.
56
+ */
57
+ declare const SearchContextProvider: (props: ComponentProps<typeof SearchContextProvider$1> & QueryResultProps) => JSX.Element;
58
+ /**
59
+ * Utility api provider only for use in Storybook stories.
60
+ *
61
+ */
62
+ declare function SearchApiProvider(props: PropsWithChildren<QueryResultProps>): JSX.Element;
63
+
64
+ export { SearchApi, SearchApiProvider as SearchApiProviderForStorybook, SearchContextProvider$1 as SearchContextProvider, SearchContextProvider as SearchContextProviderForStorybook, SearchContextState, searchApiRef, useSearch };
@@ -0,0 +1,97 @@
1
+ import { createApiRef, useApi, AnalyticsContext } from '@backstage/core-plugin-api';
2
+ import React, { createContext, useState, useCallback, useEffect, useContext } from 'react';
3
+ import useAsync from 'react-use/lib/useAsync';
4
+ import usePrevious from 'react-use/lib/usePrevious';
5
+ import { ApiProvider } from '@backstage/core-app-api';
6
+ import { TestApiRegistry } from '@backstage/test-utils';
7
+
8
+ const searchApiRef = createApiRef({
9
+ id: "plugin.search.queryservice"
10
+ });
11
+
12
+ const SearchContext = createContext(void 0);
13
+ const searchInitialState = {
14
+ term: "",
15
+ pageCursor: void 0,
16
+ filters: {},
17
+ types: []
18
+ };
19
+ const SearchContextProvider$1 = ({
20
+ initialState = searchInitialState,
21
+ children
22
+ }) => {
23
+ var _a, _b, _c, _d;
24
+ const searchApi = useApi(searchApiRef);
25
+ const [pageCursor, setPageCursor] = useState(initialState.pageCursor);
26
+ const [filters, setFilters] = useState(initialState.filters);
27
+ const [term, setTerm] = useState(initialState.term);
28
+ const [types, setTypes] = useState(initialState.types);
29
+ const prevTerm = usePrevious(term);
30
+ const result = useAsync(() => searchApi.query({
31
+ term,
32
+ filters,
33
+ pageCursor,
34
+ types
35
+ }), [term, filters, types, pageCursor]);
36
+ const hasNextPage = !result.loading && !result.error && ((_a = result.value) == null ? void 0 : _a.nextPageCursor);
37
+ const hasPreviousPage = !result.loading && !result.error && ((_b = result.value) == null ? void 0 : _b.previousPageCursor);
38
+ const fetchNextPage = useCallback(() => {
39
+ var _a2;
40
+ setPageCursor((_a2 = result.value) == null ? void 0 : _a2.nextPageCursor);
41
+ }, [(_c = result.value) == null ? void 0 : _c.nextPageCursor]);
42
+ const fetchPreviousPage = useCallback(() => {
43
+ var _a2;
44
+ setPageCursor((_a2 = result.value) == null ? void 0 : _a2.previousPageCursor);
45
+ }, [(_d = result.value) == null ? void 0 : _d.previousPageCursor]);
46
+ useEffect(() => {
47
+ if (term && prevTerm && term !== prevTerm) {
48
+ setPageCursor(void 0);
49
+ }
50
+ }, [term, prevTerm, initialState.pageCursor]);
51
+ const value = {
52
+ result,
53
+ filters,
54
+ setFilters,
55
+ term,
56
+ setTerm,
57
+ types,
58
+ setTypes,
59
+ pageCursor,
60
+ setPageCursor,
61
+ fetchNextPage: hasNextPage ? fetchNextPage : void 0,
62
+ fetchPreviousPage: hasPreviousPage ? fetchPreviousPage : void 0
63
+ };
64
+ return /* @__PURE__ */ React.createElement(AnalyticsContext, {
65
+ attributes: { searchTypes: types.sort().join(",") }
66
+ }, /* @__PURE__ */ React.createElement(SearchContext.Provider, {
67
+ value,
68
+ children
69
+ }));
70
+ };
71
+ const useSearch = () => {
72
+ const context = useContext(SearchContext);
73
+ if (context === void 0) {
74
+ throw new Error("useSearch must be used within a SearchContextProvider");
75
+ }
76
+ return context;
77
+ };
78
+
79
+ const SearchContextProvider = (props) => {
80
+ return /* @__PURE__ */ React.createElement(SearchApiProvider, {
81
+ ...props
82
+ }, /* @__PURE__ */ React.createElement(SearchContextProvider$1, {
83
+ children: props.children
84
+ }));
85
+ };
86
+ function SearchApiProvider(props) {
87
+ const { mockedResults, children } = props;
88
+ const query = () => Promise.resolve(mockedResults || {});
89
+ const apiRegistry = TestApiRegistry.from([searchApiRef, { query }]);
90
+ return /* @__PURE__ */ React.createElement(ApiProvider, {
91
+ apis: apiRegistry,
92
+ children
93
+ });
94
+ }
95
+
96
+ export { SearchApiProvider as SearchApiProviderForStorybook, SearchContextProvider$1 as SearchContextProvider, SearchContextProvider as SearchContextProviderForStorybook, searchApiRef, useSearch };
97
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/api.ts","../src/context/SearchContext.tsx","../src/context/SearchContextForStorybook.stories.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 { SearchQuery, SearchResultSet } from '@backstage/plugin-search-common';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/**\n * @public\n */\nexport const searchApiRef = createApiRef<SearchApi>({\n id: 'plugin.search.queryservice',\n});\n\n/**\n * @public\n */\nexport interface SearchApi {\n query(query: SearchQuery): Promise<SearchResultSet>;\n}\n","/*\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 { JsonObject } from '@backstage/types';\nimport { useApi, AnalyticsContext } from '@backstage/core-plugin-api';\nimport { SearchResultSet } from '@backstage/plugin-search-common';\nimport React, {\n createContext,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport useAsync, { AsyncState } from 'react-use/lib/useAsync';\nimport usePrevious from 'react-use/lib/usePrevious';\nimport { searchApiRef } from '../api';\n\ntype SearchContextValue = {\n result: AsyncState<SearchResultSet>;\n setTerm: React.Dispatch<React.SetStateAction<string>>;\n setTypes: React.Dispatch<React.SetStateAction<string[]>>;\n setFilters: React.Dispatch<React.SetStateAction<JsonObject>>;\n setPageCursor: React.Dispatch<React.SetStateAction<string | undefined>>;\n fetchNextPage?: React.DispatchWithoutAction;\n fetchPreviousPage?: React.DispatchWithoutAction;\n} & SearchContextState;\n\n/**\n *\n * @public\n */\nexport type SearchContextState = {\n term: string;\n types: string[];\n filters: JsonObject;\n pageCursor?: string;\n};\n\n/**\n * @public\n */\nexport const SearchContext = createContext<SearchContextValue | undefined>(\n undefined,\n);\n\n/**\n * The initial state of `SearchContextProvider`.\n *\n */\nconst searchInitialState: SearchContextState = {\n term: '',\n pageCursor: undefined,\n filters: {},\n types: [],\n};\n\n/**\n * @public\n */\nexport const SearchContextProvider = ({\n initialState = searchInitialState,\n children,\n}: PropsWithChildren<{ initialState?: SearchContextState }>) => {\n const searchApi = useApi(searchApiRef);\n const [pageCursor, setPageCursor] = useState<string | undefined>(\n initialState.pageCursor,\n );\n const [filters, setFilters] = useState<JsonObject>(initialState.filters);\n const [term, setTerm] = useState<string>(initialState.term);\n const [types, setTypes] = useState<string[]>(initialState.types);\n\n const prevTerm = usePrevious(term);\n\n const result = useAsync(\n () =>\n searchApi.query({\n term,\n filters,\n pageCursor,\n types,\n }),\n [term, filters, types, pageCursor],\n );\n\n const hasNextPage =\n !result.loading && !result.error && result.value?.nextPageCursor;\n const hasPreviousPage =\n !result.loading && !result.error && result.value?.previousPageCursor;\n const fetchNextPage = useCallback(() => {\n setPageCursor(result.value?.nextPageCursor);\n }, [result.value?.nextPageCursor]);\n const fetchPreviousPage = useCallback(() => {\n setPageCursor(result.value?.previousPageCursor);\n }, [result.value?.previousPageCursor]);\n\n useEffect(() => {\n // Any time a term is reset, we want to start from page 0.\n if (term && prevTerm && term !== prevTerm) {\n setPageCursor(undefined);\n }\n }, [term, prevTerm, initialState.pageCursor]);\n\n const value: SearchContextValue = {\n result,\n filters,\n setFilters,\n term,\n setTerm,\n types,\n setTypes,\n pageCursor,\n setPageCursor,\n fetchNextPage: hasNextPage ? fetchNextPage : undefined,\n fetchPreviousPage: hasPreviousPage ? fetchPreviousPage : undefined,\n };\n\n return (\n <AnalyticsContext attributes={{ searchTypes: types.sort().join(',') }}>\n <SearchContext.Provider value={value} children={children} />\n </AnalyticsContext>\n );\n};\n\n/**\n * @public\n */\nexport const useSearch = () => {\n const context = useContext(SearchContext);\n if (context === undefined) {\n throw new Error('useSearch must be used within a SearchContextProvider');\n }\n return context;\n};\n","/*\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 */\nimport { ApiProvider } from '@backstage/core-app-api';\nimport { SearchResultSet } from '@backstage/plugin-search-common';\nimport { TestApiRegistry } from '@backstage/test-utils';\nimport React, { ComponentProps, PropsWithChildren } from 'react';\nimport { searchApiRef } from '../api';\nimport { SearchContextProvider as RealSearchContextProvider } from './SearchContext';\n\ntype QueryResultProps = {\n mockedResults?: SearchResultSet;\n};\n\n/**\n * Utility context provider only for use in Storybook stories. You should use\n * the real `<SearchContextProvider>` exported by `@backstage/plugin-search-react` in\n * your app instead of this! In some cases (like the search page) it may\n * already be provided on your behalf.\n */\nexport const SearchContextProvider = (\n props: ComponentProps<typeof RealSearchContextProvider> & QueryResultProps,\n) => {\n return (\n <SearchApiProvider {...props}>\n <RealSearchContextProvider children={props.children} />\n </SearchApiProvider>\n );\n};\n\n/**\n * Utility api provider only for use in Storybook stories.\n *\n */\nexport function SearchApiProvider(props: PropsWithChildren<QueryResultProps>) {\n const { mockedResults, children } = props;\n const query: any = () => Promise.resolve(mockedResults || {});\n const apiRegistry = TestApiRegistry.from([searchApiRef, { query }]);\n return <ApiProvider apis={apiRegistry} children={children} />;\n}\n"],"names":["SearchContextProvider","RealSearchContextProvider"],"mappings":";;;;;;;AACY,MAAC,YAAY,GAAG,YAAY,CAAC;AACzC,EAAE,EAAE,EAAE,4BAA4B;AAClC,CAAC;;ACQM,MAAM,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACnD,MAAM,kBAAkB,GAAG;AAC3B,EAAE,IAAI,EAAE,EAAE;AACV,EAAE,UAAU,EAAE,KAAK,CAAC;AACpB,EAAE,OAAO,EAAE,EAAE;AACb,EAAE,KAAK,EAAE,EAAE;AACX,CAAC,CAAC;AACU,MAACA,uBAAqB,GAAG,CAAC;AACtC,EAAE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WAAW,EAAE;AAC1D,IAAI,IAAI,EAAE,WAAW;AACrB,IAAI,QAAQ;AACZ,GAAG,CAAC,CAAC;AACL;;;;"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@backstage/plugin-search-react",
3
+ "version": "0.0.0-nightly-20220413023505",
4
+ "main": "dist/index.esm.js",
5
+ "types": "dist/index.d.ts",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "main": "dist/index.esm.js",
10
+ "types": "dist/index.d.ts"
11
+ },
12
+ "backstage": {
13
+ "role": "web-library"
14
+ },
15
+ "homepage": "https://backstage.io",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/backstage/backstage",
19
+ "directory": "plugins/search-react"
20
+ },
21
+ "keywords": [
22
+ "backstage"
23
+ ],
24
+ "scripts": {
25
+ "build": "backstage-cli package build",
26
+ "lint": "backstage-cli package lint",
27
+ "test": "backstage-cli package test",
28
+ "prepack": "backstage-cli package prepack",
29
+ "postpack": "backstage-cli package postpack",
30
+ "clean": "backstage-cli package clean",
31
+ "start": "backstage-cli package start"
32
+ },
33
+ "dependencies": {
34
+ "@backstage/plugin-search-common": "^0.0.0-nightly-20220413023505",
35
+ "@backstage/core-plugin-api": "^0.0.0-nightly-20220413023505",
36
+ "@backstage/core-app-api": "^0.0.0-nightly-20220413023505",
37
+ "react-use": "^17.3.2",
38
+ "@backstage/types": "^1.0.0"
39
+ },
40
+ "peerDependencies": {
41
+ "@types/react": "^16.13.1 || ^17.0.0",
42
+ "react": "^16.13.1 || ^17.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@backstage/test-utils": "^0.0.0-nightly-20220413023505",
46
+ "@testing-library/react": "^12.1.3",
47
+ "@testing-library/react-hooks": "^7.0.2",
48
+ "@testing-library/jest-dom": "^5.10.1"
49
+ },
50
+ "files": [
51
+ "dist"
52
+ ]
53
+ }