From b9098d3446bbc46cd378f31e5fc8598eff7d8432 Mon Sep 17 00:00:00 2001 From: Robert Katzki Date: Wed, 29 Jul 2015 00:49:41 +0200 Subject: [PATCH] chore(release): version 1.4.2 --- CHANGELOG.md | 11 ++++-- dist/react-geosuggest.js | 67 +++++++++++++++++------------------- dist/react-geosuggest.min.js | 2 +- package.json | 2 +- 4 files changed, 43 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61342a1d..5530d5ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### 1.4.2 (2015-07-29) + + +#### Bug Fixes + +* **build:** fix build for npm ([6475372](https://github.com/ubilabs/react-geosuggest/commit/6475372a468f19f075a20af012f8f85404172893)) + + + ### 1.4.1 (2015-07-21) @@ -19,5 +28,3 @@ * **input:** * add new param className ([c1c990ec](https://github.com/ubilabs/react-geosuggest/commit/c1c990ec80e5210322d7d68b805d44a73196ca4e), closes [#8](https://github.com/ubilabs/react-geosuggest/issues/8)) * add initial value param ([f97d8eba](https://github.com/ubilabs/react-geosuggest/commit/f97d8eba377ed789c1bbc21cfc4de94e85ef2760), closes [#13](https://github.com/ubilabs/react-geosuggest/issues/13)) - - diff --git a/dist/react-geosuggest.js b/dist/react-geosuggest.js index 59ff56e1..b677bced 100644 --- a/dist/react-geosuggest.js +++ b/dist/react-geosuggest.js @@ -4,7 +4,7 @@ 'use strict'; var React = require('react'), - GeosuggestItem = require('./GeosuggestItem.jsx'); // eslint-disable-line + GeosuggestItem = require('./GeosuggestItem'); // eslint-disable-line var Geosuggest = React.createClass({ displayName: 'Geosuggest', @@ -235,26 +235,25 @@ var Geosuggest = React.createClass({ * @return {Function} The React element to render */ render: function render() { - return ( // eslint-disable-line no-extra-parens + return // eslint-disable-line no-extra-parens + React.createElement( + 'div', + { className: 'geosuggest ' + this.props.className, + onClick: this.onClick }, + React.createElement('input', { + className: "geosuggest__input", + ref: "geosuggestInput", + type: "text", + value: this.state.userInput, + placeholder: this.props.placeholder, + onKeyDown: this.onInputKeyDown, + onChange: this.onInputChange, + onFocus: this.showSuggests, + onBlur: this.hideSuggests }), React.createElement( - 'div', - { className: 'geosuggest ' + this.props.className, - onClick: this.onClick }, - React.createElement('input', { - className: 'geosuggest__input', - ref: 'geosuggestInput', - type: 'text', - value: this.state.userInput, - placeholder: this.props.placeholder, - onKeyDown: this.onInputKeyDown, - onChange: this.onInputChange, - onFocus: this.showSuggests, - onBlur: this.hideSuggests }), - React.createElement( - 'ul', - { className: this.getSuggestsClasses() }, - this.getSuggestItems() - ) + 'ul', + { className: this.getSuggestsClasses() }, + this.getSuggestItems() ) ); }, @@ -267,13 +266,12 @@ var Geosuggest = React.createClass({ return this.state.suggests.map((function (suggest) { var isActive = this.state.activeSuggest && suggest.placeId === this.state.activeSuggest.placeId; - return ( // eslint-disable-line no-extra-parens - React.createElement(GeosuggestItem, { - key: suggest.placeId, - suggest: suggest, - isActive: isActive, - onSuggestSelect: this.selectSuggest }) - ); + return // eslint-disable-line no-extra-parens + React.createElement(GeosuggestItem, { + key: suggest.placeId, + suggest: suggest, + isActive: isActive, + onSuggestSelect: this.selectSuggest }); }).bind(this)); }, @@ -292,7 +290,7 @@ var Geosuggest = React.createClass({ module.exports = Geosuggest; -},{"./GeosuggestItem.jsx":2,"react":undefined}],2:[function(require,module,exports){ +},{"./GeosuggestItem":2,"react":undefined}],2:[function(require,module,exports){ 'use strict'; var React = require('react'); @@ -328,13 +326,12 @@ var GeosuggestItem = React.createClass({ * @return {Function} The React element to render */ render: function render() { - return ( // eslint-disable-line no-extra-parens - React.createElement( - 'li', - { className: this.getSuggestClasses(), - onClick: this.onClick }, - this.props.suggest.label - ) + return // eslint-disable-line no-extra-parens + React.createElement( + 'li', + { className: this.getSuggestClasses(), + onClick: this.onClick }, + this.props.suggest.label ); }, diff --git a/dist/react-geosuggest.min.js b/dist/react-geosuggest.min.js index 7cd95bf9..7e2318b9 100644 --- a/dist/react-geosuggest.min.js +++ b/dist/react-geosuggest.min.js @@ -1 +1 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Geosuggest=e()}}(function(){return function e(t,s,i){function n(u,o){if(!s[u]){if(!t[u]){var a="function"==typeof require&&require;if(!o&&a)return a(u,!0);if(g)return g(u,!0);var r=new Error("Cannot find module '"+u+"'");throw r.code="MODULE_NOT_FOUND",r}var c=s[u]={exports:{}};t[u][0].call(c.exports,function(e){var s=t[u][1][e];return n(s?s:e)},c,c.exports,e,t,s,i)}return s[u].exports}for(var g="function"==typeof require&&require,u=0;u=g;g++)this.state.suggests[g]===this.state.activeSuggest&&(n=s?g+1:g-1);this.state.activeSuggest||(n=s?0:t),n>=0&&t>=n&&(i=this.state.suggests[n]),this.setState({activeSuggest:i})},selectSuggest:function(e){return e||(e={label:this.state.userInput}),this.setState({isSuggestsHidden:!0,userInput:e.label}),e.location?void this.props.onSuggestSelect(e):void this.geocodeSuggest(e)},geocodeSuggest:function(e){this.state.geocoder.geocode({address:e.label},function(t,s){if(s===this.props.googleMaps.GeocoderStatus.OK){var i=t[0],n=i.geometry.location;e.gmaps=i,e.location={lat:n.lat(),lng:n.lng()},this.props.onSuggestSelect(e)}}.bind(this))},render:function(){return s.createElement("div",{className:"geosuggest "+this.props.className,onClick:this.onClick},s.createElement("input",{className:"geosuggest__input",ref:"geosuggestInput",type:"text",value:this.state.userInput,placeholder:this.props.placeholder,onKeyDown:this.onInputKeyDown,onChange:this.onInputChange,onFocus:this.showSuggests,onBlur:this.hideSuggests}),s.createElement("ul",{className:this.getSuggestsClasses()},this.getSuggestItems()))},getSuggestItems:function(){return this.state.suggests.map(function(e){var t=this.state.activeSuggest&&e.placeId===this.state.activeSuggest.placeId;return s.createElement(i,{key:e.placeId,suggest:e,isActive:t,onSuggestSelect:this.selectSuggest})}.bind(this))},getSuggestsClasses:function(){var e="geosuggest__suggests";return e+=this.state.isSuggestsHidden?" geosuggest__suggests--hidden":""}});t.exports=n},{"./GeosuggestItem.jsx":2,react:void 0}],2:[function(e,t){"use strict";var s=e("react"),i=s.createClass({displayName:"GeosuggestItem",getDefaultProps:function(){return{isActive:!1,suggest:{label:""},onSuggestSelect:function(){}}},onClick:function(e){e.preventDefault(),this.props.onSuggestSelect(this.props.suggest)},render:function(){return s.createElement("li",{className:this.getSuggestClasses(),onClick:this.onClick},this.props.suggest.label)},getSuggestClasses:function(){var e="geosuggest-item";return e+=this.props.isActive?" geosuggest-item--active":""}});t.exports=i},{react:void 0}]},{},[1])(1)}); \ No newline at end of file +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Geosuggest=e()}}(function(){return function e(t,s,i){function n(o,g){if(!s[o]){if(!t[o]){var a="function"==typeof require&&require;if(!g&&a)return a(o,!0);if(u)return u(o,!0);var r=new Error("Cannot find module '"+o+"'");throw r.code="MODULE_NOT_FOUND",r}var c=s[o]={exports:{}};t[o][0].call(c.exports,function(e){var s=t[o][1][e];return n(s?s:e)},c,c.exports,e,t,s,i)}return s[o].exports}for(var u="function"==typeof require&&require,o=0;o=u;u++)this.state.suggests[u]===this.state.activeSuggest&&(n=s?u+1:u-1);this.state.activeSuggest||(n=s?0:t),n>=0&&t>=n&&(i=this.state.suggests[n]),this.setState({activeSuggest:i})},selectSuggest:function(e){return e||(e={label:this.state.userInput}),this.setState({isSuggestsHidden:!0,userInput:e.label}),e.location?void this.props.onSuggestSelect(e):void this.geocodeSuggest(e)},geocodeSuggest:function(e){this.state.geocoder.geocode({address:e.label},function(t,s){if(s===this.props.googleMaps.GeocoderStatus.OK){var i=t[0],n=i.geometry.location;e.gmaps=i,e.location={lat:n.lat(),lng:n.lng()},this.props.onSuggestSelect(e)}}.bind(this))},render:function(){},getSuggestItems:function(){return this.state.suggests.map(function(e){this.state.activeSuggest&&e.placeId===this.state.activeSuggest.placeId}.bind(this))},getSuggestsClasses:function(){var e="geosuggest__suggests";return e+=this.state.isSuggestsHidden?" geosuggest__suggests--hidden":""}}));t.exports=i},{"./GeosuggestItem":2,react:void 0}],2:[function(e,t){"use strict";var s=e("react"),i=s.createClass({displayName:"GeosuggestItem",getDefaultProps:function(){return{isActive:!1,suggest:{label:""},onSuggestSelect:function(){}}},onClick:function(e){e.preventDefault(),this.props.onSuggestSelect(this.props.suggest)},render:function(){},getSuggestClasses:function(){var e="geosuggest-item";return e+=this.props.isActive?" geosuggest-item--active":""}});t.exports=i},{react:void 0}]},{},[1])(1)}); \ No newline at end of file diff --git a/package.json b/package.json index 863196b7..6f0d5505 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-geosuggest", - "version": "1.4.1", + "version": "1.4.2", "description": "A React autosuggest for the Google Maps Places API.", "main": "module/Geosuggest.js", "author": "Robert Katzki ",