-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add reference doc for SSR (#3612)
- Loading branch information
Showing
49 changed files
with
809 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
# Headless React Utils for SSR | ||
|
||
**:warning: Alpha release** | ||
This is an alpha release with several features yet to be implemented (e.g., analytics, [synchronizing search parameters with the URL](https://docs.coveo.com/en/headless/latest/usage/synchronize-search-parameters-with-the-url/), etc). | ||
|
||
`@coveo/headless-react/ssr` provides react utilities for Server side rendering with headless controllers. | ||
`@coveo/headless-react/ssr` provides React utilities for server-side rendering with headless controllers. | ||
|
||
- Refer to [samples/headless-ssr](https://github.com/coveo/ui-kit/tree/master/packages/samples/headless-ssr/) for examples. | ||
- All exports from `@coveo/headless/ssr` are also available from under `@coveo/headless-react/ssr` as convenience. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./base.json", | ||
"mainEntryPointFilePath": "<projectFolder>/dist/definitions/ssr.index.d.ts", | ||
"docModel": { | ||
"enabled": true, | ||
"apiJsonFilePath": "<projectFolder>/temp/ssr-search.api.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
import {ActionLoaderConfiguration} from '../src/headless-export-resolvers/action-loader-resolver'; | ||
import {ControllerConfiguration} from '../src/headless-export-resolvers/controller-resolver'; | ||
import {EngineConfiguration} from '../src/headless-export-resolvers/engine-resolver'; | ||
|
||
const controllers: ControllerConfiguration[] = [ | ||
{ | ||
initializer: 'defineFacet', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineContext', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineDictionaryFieldContext', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineBreadcrumbManager', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineDidYouMean', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineFacetManager', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineAutomaticFacetGenerator', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineCategoryFacet', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineDateFacet', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineDateFilter', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineNumericFacet', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineNumericFilter', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineCategoryFieldSuggestions', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineFieldSuggestions', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineFoldedResultList', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineHistoryManager', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineInstantResults', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'definePager', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineQueryError', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineQuerySummary', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineQuickview', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineRecentQueriesList', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineRelevanceInspector', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineResultList', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineResultsPerPage', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineSearchBox', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineSearchParameterManager', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineSearchStatus', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineSmartSnippet', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineSmartSnippetQuestionsList', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineSort', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineStandaloneSearchBox', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineStaticFilter', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineTab', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineNotifyTrigger', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineExecuteTrigger', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineQueryTrigger', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineRedirectionTrigger', | ||
samplePaths: {}, | ||
}, | ||
{ | ||
initializer: 'defineRecentResultsList', | ||
samplePaths: {}, | ||
}, | ||
]; | ||
|
||
const actionLoaders: ActionLoaderConfiguration[] = []; | ||
|
||
const engine: EngineConfiguration = { | ||
initializer: 'defineSearchEngine', | ||
}; | ||
|
||
export const ssrSearchUseCase = {controllers, actionLoaders, engine}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.