component-controls routes utilities
npm install @component-controls/routes- Overview
- Installation
- HomePageInfo
- getSiteMap
- DocHomePagesPath
- getIndexPage
- RoutePath
- getHomePages
- getRoutes
- getUniquesByField
- DocPagesPath
- getPageTabs
- getDocPages
Route-related utility functions for component-controls
This package is usually installed as part of the @component-controls package, but you can also install it standalone:
``bash`
$ npm install @component-controls/routes --save-dev
interface
_defined in @component-controls/routes/core/routes/src/routes/index-page.ts_
properties
| Name | Type |
| -------------- | -------- |
| type | string |docId
| | string |storyId
| | string |path*
| | string |lastModified
| | string |
react function
_defined in @component-controls/routes/core/routes/src/sitemap/sitemap.ts_
parameters
| Name | Type | Description |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| store | Storeerror: stringconfig\title: stringlogo: string \| ReactNodeapppropTypes\: contextTypes\: defaultProps\: displayName\: description: stringcopyright: stringlanguage: stringauthor: stringimage: stringlinks: (DetailedHTMLProps<>)\[]seo: ReactChild \| ReactFragment \| ReactPortal \| boolean \| null \| undefinedpagesstring\[
]: themestring\[
]: anystorySort: function (a\: stringb\: stringnumber
) => toolbarleft\: right\: footerleft\: right\: sidebar: ActionItem\[]menu: StaticMenuItem\[]components: Record<string, unknown>analytics: anycomponent: string \| Record<string, unknown> \| ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controlsstring\[
]: ComponentControl<P>smartControlssmart\: include\: exclude\: decorators: StoryRenderFn\[]plugins: anycategory: stringrenderFn: function (props\story\: doc\: values\: options\: ) => anywebpack: Configuration \| WebpackConfigFnfinalWebpack: Configuration \| WebpackConfigFnpresets: RuleType\[]configPath: stringdistFolder: stringbundleName: stringstaticFolder: stringcssFileName: stringlogOptions: Partial<LogOptions>mode: "none" \| "development" \| "production"loadersat\: module\: ident\: loader\: options\: stories: string \| string\[]files: string \| string\[]siteRoot: stringignore: string\[]categories: DocType\[]siteMap: type \| booleansiteUrl: stringinstrument: anysearchindexingModule\: searchingModule\: fields\: emptySearchDocuments\: hitsPerPage\: options\: tokensfigmaAccessToken\: githubAccessToken\: docs\string\[
]: typestring\[
]: anytitle\: stringtype: DocTyperoute: stringdate: stringdateModified: stringstatus: "draft" \| "published"tags: string\[]keywords: string\[]description: string \| JSX.Elementimage: stringauthor: stringorder: numbermenu: stringtemplatebind\: description\: component\: subcomponents\: smartControls\: decorators\: plugins\: category\: source\: storyName\: id\: rawId\: doc\: storyFn\: loc\: subtitle\: dynamic\: dynamicId\: controls\: stories: string\[]source: stringfileName: stringpackage: stringtestFiles: string\[]testCoverage: string\[]testData: stringrenderFn: FrameworkRenderFndata: DocumentDatacomponentsLookupstring\[
]: stringMDXPage: anyisMDXComponent: booleanparameters: anycomponentat\: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn\[]plugins: anycategory: stringnavSidebar: booleancontextSidebar: booleanfullPage: booleanstories\string\[
]: typename\: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponentat\: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn\[]plugins: anycategory: stringcomponents\string\[
]: interfacename\: stringimportedName: "default" \| "namespace" \| stringfrom: stringrequest: stringfileName: stringpropsInfoFile: stringloc: CodeLocationpackage: stringsource: stringinfo: ComponentInfoexternalDependencies: ImportslocalDependencies: Importsjsx: JSXTreefileInfo: FileInfojest: JestTestspackages\string\[
]: interfacefileHash\: stringname: stringversion: stringdependencies: PackageDependenciesdevDependencies: PackageDependenciespeerDependencies: PackageDependenciesprivateNpm: booleanrepository\browse\: docs\: issues\: addObserver\: function (observer\: function (story: Storyvoid
) => void
) => removeObserver\: function (observer\: function (story: Storyvoid
) => void
) => updateStory\: function (story\name\: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponent: string \| Record<string, unknown> \| ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn\[]plugins: anycategory: string) => voidsearch: function (store\error\: config\: docs\: stories\: components\: packages\: addObserver\: removeObserver\: updateStory\: search\: ) => SearchResultitems\: SearchItem\[]searchFn\: function (search\: void
) => providerlogo\: url\: name\*: | Store of stories information in memory after the loader is applied |returns
| | string | |
interface
_defined in @component-controls/routes/core/routes/src/routes/docs-index-pages.ts_
properties
| Name | Type |
| -------------- | ----------------------------------------------------------------------- |
| type | "story" \| "blog" \| "page" \| "tags" \| "author" \| string |path*
| | string |docId
| | string |storyId
| | string |lastModified
| | string |docIndex
| | boolean |
function
_defined in @component-controls/routes/core/routes/src/routes/index-page.ts_
parameters
| Name | Type | Description |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| store | Storeerror: stringconfig\title: stringlogo: string \| ReactNodeapppropTypes\: contextTypes\: defaultProps\: displayName\: description: stringcopyright: stringlanguage: stringauthor: stringimage: stringlinks: (DetailedHTMLProps<>)\[]seo: ReactChild \| ReactFragment \| ReactPortal \| boolean \| null \| undefinedpagesstring\[
]: themestring\[
]: anystorySort: function (a\: stringb\: stringnumber
) => toolbarleft\: right\: footerleft\: right\: sidebar: ActionItem\[]menu: StaticMenuItem\[]components: Record<string, unknown>analytics: anycomponent: string \| Record<string, unknown> \| ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controlsstring\[
]: ComponentControl<P>smartControlssmart\: include\: exclude\: decorators: StoryRenderFn\[]plugins: anycategory: stringrenderFn: function (props\story\: doc\: values\: options\: ) => anywebpack: Configuration \| WebpackConfigFnfinalWebpack: Configuration \| WebpackConfigFnpresets: RuleType\[]configPath: stringdistFolder: stringbundleName: stringstaticFolder: stringcssFileName: stringlogOptions: Partial<LogOptions>mode: "none" \| "development" \| "production"loadersat\: module\: stories: string \| string\[]files: string \| string\[]siteRoot: stringignore: string\[]categories: DocType\[]siteMap: type \| booleansiteUrl: stringinstrument: anysearchindexingModule\: searchingModule\: fields\: emptySearchDocuments\: hitsPerPage\: options\: tokensfigmaAccessToken\: githubAccessToken\: docs\string\[
]: typestring\[
]: anytitle\: stringtype: DocTyperoute: stringdate: stringdateModified: stringstatus: "draft" \| "published"tags: string\[]keywords: string\[]description: string \| JSX.Elementimage: stringauthor: stringorder: numbermenu: stringtemplate: Example<Props>stories: string\[]source: stringfileName: stringpackage: stringtestFiles: string\[]testCoverage: string\[]testData: stringrenderFn: FrameworkRenderFndata: DocumentDatacomponentsLookupstring\[
]: stringMDXPage: anyisMDXComponent: booleanparameters: anycomponentat\: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn\[]plugins: anycategory: stringnavSidebar: booleancontextSidebar: booleanfullPage: booleanstories\string\[
]: typename\: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponentat\: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn\[]plugins: anycategory: stringcomponents\string\[
]: interfacename\: stringimportedName: "default" \| "namespace" \| stringfrom: stringrequest: stringfileName: stringpropsInfoFile: stringloc: CodeLocationpackage: stringsource: stringinfo: ComponentInfoexternalDependencies: ImportslocalDependencies: Importsjsx: JSXTreefileInfo: FileInfojest: JestTestspackages\string\[
]: interfacefileHash\: stringname: stringversion: stringdependencies: PackageDependenciesdevDependencies: PackageDependenciespeerDependencies: PackageDependenciesprivateNpm: booleanrepository\browse\: docs\: issues\: addObserver\: function (observer\: function (story: Storyvoid
) => void
) => removeObserver\: function (observer\: function (story: Storyvoid
) => void
) => updateStory\: function (story\name\: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponent: string \| Record<string, unknown> \| ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn\[]plugins: anycategory: string) => voidsearch: function (store\error\: config\: docs\: stories\: components\: packages\: addObserver\: removeObserver\: updateStory\: search\: ) => SearchResultitems\: SearchItem\[]searchFn\: function (search\: void
) => providerlogo\: url\: name\*: | Store of stories information in memory after the loader is applied |returns
| | HomePageInfo`