Skip to content

Commit

Permalink
Fix reactivemap story and upgrade reactivebase
Browse files Browse the repository at this point in the history
  • Loading branch information
metagrover committed Jul 21, 2017
1 parent ff7d1dd commit 044e06d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 18 deletions.
34 changes: 32 additions & 2 deletions app/stories/ReactiveMap.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React, { Component } from "react";
import {
ReactiveBase,
ReactiveMap,
DataSearch,
SingleList,
AppbaseSensorHelper as helper
} from "../app.js";

Expand Down Expand Up @@ -55,16 +57,44 @@ export default class ReactiveMapDefault extends Component {
autoCenter
searchAsMoveComponent
MapStylesComponent
title="Reactive Maps"
showPopoverOn="click"
historicPin={historyPin}
onPopoverTrigger={this.onPopoverTrigger}
defaultZoom={13}
defaultCenter={{ lat: 37.74, lon: -122.45 }}
react={{
and: ["CitySensor", "VenueSensor"]
}}
{...this.props}
/>
</div>
<div className="col s6 col-xs-6">
<div>
<DataSearch
appbaseField={this.props.mapping.venue}
componentId="VenueSensor"
placeholder="Search Venue"
/>
</div>
<div>
<SingleList
componentId="CitySensor"
appbaseField={this.props.mapping.city}
showCount
size={10}
title="Input Filter"
placeholder="Search City"
/>
</div>
</div>
</div>
</ReactiveBase>
);
}
}

ReactiveMapDefault.defaultProps = {
mapping: {
venue: "venue_name_ngrams",
city: "group.group_city.raw"
}
};
21 changes: 10 additions & 11 deletions app/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import withReadme from "storybook-readme/with-readme";
import GeoDistanceSliderReadme from "@appbaseio/reactivemaps-manual/docs/v1.0.0/map-components/GeoDistanceSlider.md";
import GeoDistanceDropdownReadme from "@appbaseio/reactivemaps-manual/docs/v1.0.0/map-components/GeoDistanceDropdown.md";
import PlacesSearchReadme from "@appbaseio/reactivemaps-manual/docs/v1.0.0/map-components/PlacesSearch.md";
import ReactiveMapReadme from "@appbaseio/reactivemaps-manual/docs/v1.0.0/map-components/ReactiveMap.md";

import SingleListReadme from "@appbaseio/reactivemaps-manual/docs/v1.0.0/components/SingleList.md";
import MultiListReadme from "@appbaseio/reactivemaps-manual/docs/v1.0.0/components/MultiList.md";
Expand Down Expand Up @@ -201,27 +200,27 @@ storiesOf("PlacesSearch", module)

storiesOf("ReactiveMap", module)
.addDecorator(withKnobs)
.add("Basic", withReadme(removeFirstLine(ReactiveMapReadme, 3), () => (
.add("Basic", () => (
<ReactiveMapDefault />
)))
.add("With Title", withReadme(removeFirstLine(ReactiveMapReadme, 3), () => (
))
.add("With Title", () => (
<ReactiveMapDefault
title="Reactive Maps"
/>
)))
.add("With Popover onClick", withReadme(removeFirstLine(ReactiveMapReadme, 3), () => (
))
.add("With Popover onClick", () => (
<ReactiveMapDefault
title="Reactive Maps"
showPopoverOn="click"
/>
)))
.add("With Popover onMouseOver", withReadme(removeFirstLine(ReactiveMapReadme), () => (
))
.add("With Popover onMouseOver", () => (
<ReactiveMapDefault
title="Reactive Maps"
showPopoverOn="mouseover"
/>
)))
.add("Playground", withReadme(removeFirstLine(ReactiveMapReadme), () => (
))
.add("Playground", () => (
<ReactiveMapDefault
title={text("title", "Reactive maps")}
showPopoverOn={select("showPopoverOn", { click: "click", mouseover: "mouseover" }, "click")}
Expand All @@ -245,7 +244,7 @@ storiesOf("ReactiveMap", module)
defaultMarkerImage={text("defaultMarkerImage", "https://cdn.rawgit.com/appbaseio/reactivemaps/6500c73a/dist/images/historic-pin.png")}
streamMarkerImage={text("streamMarkerImage", "https://cdn.rawgit.com/appbaseio/reactivemaps/6500c73a/dist/images/stream-pin.png")}
/>
)));
));

storiesOf("SingleList", module)
.addDecorator(withKnobs)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint": "esw app --color --watch",
"webpack-server": "webpack-dev-server --hot --inline --progress --colors --port 8012",
"start": "concurrently \"npm run webpack-server\" \"gulp watch\" ",
"storybook": "start-storybook -p 9009 -s public",
"storybook": "start-storybook -p 9009",
"build": "gulp && babel app --out-dir lib",
"build:umd": "NODE_ENV=production webpack --config webpack.config.umd.js",
"build:examples": "NODE_ENV=production webpack -p --progress --colors",
Expand All @@ -25,7 +25,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@appbaseio/reactivebase": "1.0.0-beta01",
"@appbaseio/reactivebase": "1.0.0-beta03",
"axios": "^0.15.2",
"google-map-react": "^0.14.5",
"google-maps": "^3.2.1",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# yarn lockfile v1


"@appbaseio/[email protected]beta01":
version "1.0.0-beta01"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivebase/-/reactivebase-1.0.0-beta01.tgz#7687bbb606c684629d9d58a1523bf950e7fca49b"
"@appbaseio/[email protected]beta03":
version "1.0.0-beta03"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivebase/-/reactivebase-1.0.0-beta03.tgz#b4ab036cbc11c39252a2c27432e66f878fe78db4"
dependencies:
appbase-js "^0.11.0"
classnames "^2.2.5"
Expand Down

0 comments on commit 044e06d

Please sign in to comment.