Skip to content

Commit

Permalink
feat: pagination app component
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 15, 2020
1 parent 09d8d08 commit 597dcc0
Show file tree
Hide file tree
Showing 12 changed files with 266 additions and 63 deletions.
37 changes: 19 additions & 18 deletions core/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- [getConfigurationArg](#getconfigurationarg)
- [loadConfiguration](#loadconfiguration)
- [BuildConfiguration](#buildconfiguration)
- [WebpackCOnfig](#webpackconfig)
- [PageType](#pagetype)
- [WebpackConfig](#webpackconfig)
- [PageConfiguration](#pageconfiguration)
- [WebpackConfigFn](#webpackconfigfn)

Expand Down Expand Up @@ -114,31 +114,32 @@ _defined in [@component-controls/config/src/index.ts](https://github.com/ccontro
global configuration used at build time
stored in a file named main.js/main.ts

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L46)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L45)_



### properties

| Name | Type | Description |
| -------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `finalWebpack` | [WebpackCOnfig](#webpackconfig) | |
| `categories` | [PageType](#pagetype)\[] | page types that are considred as categories fields as well |
| `finalWebpack` | [WebpackConfig](#webpackconfig) | |
| `pages` | Record<[PageType](#pagetype), Pick<[PageConfiguration](#pageconfiguration), 'basePath'>> | base url path for API documentation pages. Default is "docs/" |
| `stories` | string\[] | wild card search string for the stories internally using \`glob\` for the search: https://www.npmjs.com/package/glob example: "./stories/ |
| `webpack` | [WebpackCOnfig](#webpackconfig) | custom webpack fonfigurations setup. One or the other will be used |

## WebpackCOnfig

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L40)_

[WebpackConfiguration](#webpackconfiguration) \| [WebpackConfigFn](#webpackconfigfn)
| `webpack` | [WebpackConfig](#webpackconfig) | custom webpack fonfigurations setup. One or the other will be used |

## PageType

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L4)_

'story' | 'blog' | 'page' | 'tags' | 'author'

## WebpackConfig

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L39)_

[WebpackConfiguration](#webpackconfiguration) \| [WebpackConfigFn](#webpackconfigfn)

## PageConfiguration

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L6)_
Expand All @@ -147,17 +148,17 @@ _defined in [@component-controls/specification/src/configuration.ts](https://git

### properties

| Name | Type | Description |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------- |
| `basePath` | string | base url path for the page |
| `fullPage` | boolean | whether to take a fullpage theme option |
| `hasHomePage` | boolean | if true, will create a home page with a top-level menu by default, only story and blogs have home pages |
| `label` | string | label - used for menu labels |
| `sidebars` | boolean | whether to add navigation sidebars to the page |
| Name | Type | Description |
| ---------- | ------- | ---------------------------------------------- |
| `basePath` | string | base url path for the page |
| `fullPage` | boolean | whether to take a fullpage theme option |
| `label` | string | label - used for menu labels |
| `sidebars` | boolean | whether to add navigation sidebars to the page |
| `topMenu` | boolean | whether to add to the top navigation menu |

## WebpackConfigFn

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L36)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L35)_

**function** (`config`\*: [WebpackConfiguration](#webpackconfiguration), `options`: any): [WebpackConfiguration](#webpackconfiguration);

Expand Down
82 changes: 54 additions & 28 deletions core/specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,22 @@
- [StoryRenderFn](#storyrenderfn)
- [BuildConfiguration](#buildconfiguration)
- [PageConfiguration](#pageconfiguration)
- [RunConfiguration](#runconfiguration)
- [RunOnlyConfiguration](#runonlyconfiguration)
- [PageType](#pagetype)
- [PagesConfiguration](#pagesconfiguration)
- [WebpackCOnfig](#webpackconfig)
- [RunConfiguration](#runconfiguration)
- [WebpackConfig](#webpackconfig)
- [WebpackConfigFn](#webpackconfigfn)
- [defaultBuildConfig](#defaultbuildconfig)
- [defaultRunConfig](#defaultrunconfig)
- [StoryRenderFn](#storyrenderfn-1)
- [PageType](#pagetype-1)
- [RunConfiguration](#runconfiguration-1)
- [StoryArguments](#storyarguments-1)
- [ComponentControl](#componentcontrol-1)
- [TypeValue](#typevalue-1)
- [PackageDependency](#packagedependency-1)
- [WebpackCOnfig](#webpackconfig-1)
- [WebpackConfig](#webpackconfig-1)
- [PagesConfiguration](#pagesconfiguration-1)
- [WebpackConfigFn](#webpackconfigfn-1)
- [PageType](#pagetype-2)
Expand Down Expand Up @@ -917,18 +919,19 @@ _defined in [@component-controls/specification/src/utility.ts](https://github.co
global configuration used at build time
stored in a file named main.js/main.ts

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L46)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L45)_



### properties

| Name | Type | Description |
| -------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `finalWebpack` | [WebpackCOnfig](#webpackconfig) | |
| `categories` | [PageType](#pagetype)\[] | page types that are considred as categories fields as well |
| `finalWebpack` | [WebpackConfig](#webpackconfig) | |
| `pages` | Record<[PageType](#pagetype), Pick<[PageConfiguration](#pageconfiguration), 'basePath'>> | base url path for API documentation pages. Default is "docs/" |
| `stories` | string\[] | wild card search string for the stories internally using \`glob\` for the search: https://www.npmjs.com/package/glob example: "./stories/ |
| `webpack` | [WebpackCOnfig](#webpackconfig) | custom webpack fonfigurations setup. One or the other will be used |
| `webpack` | [WebpackConfig](#webpackconfig) | custom webpack fonfigurations setup. One or the other will be used |

## PageConfiguration

Expand All @@ -938,20 +941,20 @@ _defined in [@component-controls/specification/src/configuration.ts](https://git

### properties

| Name | Type | Description |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------- |
| `basePath` | string | base url path for the page |
| `fullPage` | boolean | whether to take a fullpage theme option |
| `hasHomePage` | boolean | if true, will create a home page with a top-level menu by default, only story and blogs have home pages |
| `label` | string | label - used for menu labels |
| `sidebars` | boolean | whether to add navigation sidebars to the page |
| Name | Type | Description |
| ---------- | ------- | ---------------------------------------------- |
| `basePath` | string | base url path for the page |
| `fullPage` | boolean | whether to take a fullpage theme option |
| `label` | string | label - used for menu labels |
| `sidebars` | boolean | whether to add navigation sidebars to the page |
| `topMenu` | boolean | whether to add to the top navigation menu |

## RunConfiguration
## RunOnlyConfiguration

global configuration used at build time
stored in a file named main.js/main.ts

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L69)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L72)_



Expand Down Expand Up @@ -980,7 +983,7 @@ _defined in [@component-controls/specification/src/configuration.ts](https://git

## PagesConfiguration

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L34)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L33)_

Record<

Expand All @@ -992,15 +995,26 @@ Record<

>
## WebpackCOnfig
## RunConfiguration

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L133)_

### properties

| Name | Type | Description |
| ---------------------- | ----------------------------------------------------------- | ----------- |
| `RunOnlyConfiguration` | [RunOnlyConfiguration](#runonlyconfiguration) | |
| `Omit` | Omit<[BuildConfiguration](#buildconfiguration), 'pages'> | |

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L40)_
## WebpackConfig

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L39)_

[WebpackConfiguration](#webpackconfiguration) \| [WebpackConfigFn](#webpackconfigfn)

## WebpackConfigFn

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L36)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L35)_

**function** (`config`\*: [WebpackConfiguration](#webpackconfiguration), `options`: any): [WebpackConfiguration](#webpackconfiguration);

Expand All @@ -1014,19 +1028,20 @@ _defined in [@component-controls/specification/src/configuration.ts](https://git

## defaultBuildConfig

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L163)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L169)_



### properties

| Name | Type | Description |
| -------- | ------ | ----------- |
| `pages*` | object | |
| Name | Type | Description |
| ------------- | --------------------- | ----------- |
| `categories*` | 'tags' \| 'author'\[] | |
| `pages*` | object | |

## defaultRunConfig

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L130)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L136)_



Expand Down Expand Up @@ -1065,6 +1080,17 @@ _defined in [@component-controls/specification/src/configuration.ts](https://git

'story' | 'blog' | 'page' | 'tags' | 'author'

## RunConfiguration

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L133)_

### properties

| Name | Type | Description |
| ---------------------- | ----------------------------------------------------------- | ----------- |
| `RunOnlyConfiguration` | [RunOnlyConfiguration](#runonlyconfiguration) | |
| `Omit` | Omit<[BuildConfiguration](#buildconfiguration), 'pages'> | |

## StoryArguments

list of story arguments. Each argument can be a deconstructed argument of itself
Expand Down Expand Up @@ -1100,15 +1126,15 @@ _defined in [@component-controls/specification/src/utility.ts](https://github.co

string

## WebpackCOnfig
## WebpackConfig

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L40)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L39)_

[WebpackConfiguration](#webpackconfiguration) \| [WebpackConfigFn](#webpackconfigfn)

## PagesConfiguration

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L34)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L33)_

Record<

Expand All @@ -1122,7 +1148,7 @@ Record<
## WebpackConfigFn

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L36)_
_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L35)_

**function** (`config`\*: [WebpackConfiguration](#webpackconfiguration), `options`: any): [WebpackConfiguration](#webpackconfiguration);

Expand Down
6 changes: 3 additions & 3 deletions core/specification/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type WebpackConfigFn = (
config: WebpackConfiguration,
options?: any,
) => WebpackConfiguration;
type WebpackCOnfig = WebpackConfiguration | WebpackConfigFn;
type WebpackConfig = WebpackConfiguration | WebpackConfigFn;

/**
* global configuration used at build time
Expand All @@ -61,8 +61,8 @@ export interface BuildConfiguration {
/**
* custom webpack fonfigurations setup. One or the other will be used
*/
webpack?: WebpackCOnfig;
finalWebpack?: WebpackCOnfig;
webpack?: WebpackConfig;
finalWebpack?: WebpackConfig;
}

/**
Expand Down
Loading

0 comments on commit 597dcc0

Please sign in to comment.