-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e522819
commit ca1dce7
Showing
107 changed files
with
2,549 additions
and
2,935 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
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
// @flow | ||
import React from "react"; | ||
import {NavigationList, NavigationListItem} from 'dcme-style'; | ||
import {NavigationList, NavigationListItem, Text} from 'dcme-style'; | ||
import Link from 'component/Link'; | ||
|
||
export default () => <NavigationList> | ||
<NavigationListItem><Link to="/api">Api</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/Parcel">Parcel</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/ParcelHoc">ParcelHoc</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/useParcelState">useParcelState</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/useParcelBuffer">useParcelBuffer</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/ParcelBoundary">ParcelBoundary</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/ParcelBoundaryHoc">ParcelBoundaryHoc</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/ParcelShape">ParcelShape</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/ChangeRequest">ChangeRequest</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/CancelActionMarker">CancelActionMarker</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/shape">shape</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/ParcelHoc">ParcelHoc</Link></NavigationListItem> | ||
<NavigationListItem>- <Link to="/api/ParcelBoundaryHoc">ParcelBoundaryHoc</Link></NavigationListItem> | ||
</NavigationList>; |
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,70 @@ | ||
// @flow | ||
|
||
import type {ComponentType} from 'react'; | ||
import type {LayoutElement} from 'dcme-style'; | ||
import type {Node} from 'react'; | ||
|
||
import filter from 'unmutable/lib/filter'; | ||
import map from 'unmutable/lib/map'; | ||
import toArray from 'unmutable/lib/toArray'; | ||
import pipeWith from 'unmutable/lib/util/pipeWith'; | ||
|
||
import React from 'react'; | ||
import {Box, Grid, GridItem, Layout, Terminal, Text} from 'dcme-style'; | ||
|
||
type Props = {}; | ||
|
||
type LayoutProps = { | ||
demo: LayoutElement, | ||
data: LayoutElement, | ||
}; | ||
|
||
const stringify = (value) => { | ||
let replacer = (key, value) => { | ||
// The following works because NaN is the only value in javascript which is not equal to itself. | ||
if(value !== value) { | ||
return 'NaN'; | ||
} | ||
return value; | ||
}; | ||
return `${JSON.stringify(value, replacer, 4)}`.replace(/"NaN"/g, "NaN"); | ||
}; | ||
|
||
class ExampleFrame extends Layout<Props> { | ||
static elements = ['demo', 'data']; | ||
|
||
static layout = ({demo, data}) => <Box modifier="paddingBottomKilo example"> | ||
<Box modifier="exampleInner"> | ||
<Grid> | ||
<GridItem modifier="6 padding"> | ||
{demo()} | ||
</GridItem> | ||
<GridItem modifier="6 padding"> | ||
{data()} | ||
</GridItem> | ||
</Grid> | ||
</Box> | ||
</Box>; | ||
|
||
demo = (): Node => { | ||
return this.props.children; | ||
}; | ||
|
||
data = (): Node => { | ||
return pipeWith( | ||
this.props.parcels, | ||
map((parcel, key) => <Box key={key}> | ||
<Text element="div" modifier="monospace">{key}</Text> | ||
<Terminal>{stringify(parcel.value)}</Terminal> | ||
</Box>), | ||
toArray() | ||
); | ||
}; | ||
}; | ||
|
||
export default (parcels: Object, children) => { | ||
return <ExampleFrame | ||
parcels={parcels} | ||
children={children} | ||
/>; | ||
}; |
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
27 changes: 13 additions & 14 deletions
27
packages/dataparcels-docs/src/docs/api/parcelBoundary/childRenderer.md
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
5 changes: 0 additions & 5 deletions
5
packages/dataparcels-docs/src/docs/api/parcelBoundary/debugBuffer.md
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
packages/dataparcels-docs/src/docs/api/parcelBoundary/debugParcel.md
This file was deleted.
Oops, something went wrong.
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
18 changes: 0 additions & 18 deletions
18
packages/dataparcels-docs/src/docs/api/parcelBoundary/onCancel.md
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/dataparcels-docs/src/docs/api/parcelBoundary/onRelease.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.