diff --git a/client/dist/js/main.js b/client/dist/js/main.js index 387ae01..363b31c 100644 --- a/client/dist/js/main.js +++ b/client/dist/js/main.js @@ -1 +1 @@ -webpackJsonp([0],{163:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=window.location;return""===e.address&&delete e.address,-1===e.radius&&delete e.radius,""===e.category&&delete e.category,{type:l.default.FETCH_LOCATIONS,payload:i.default.get(t.protocol+"//"+t.host+t.pathname+"/json",{params:e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetchLocations=a;var o=n(164),i=r(o),u=n(22),l=r(u)},181:function(e,t,n){"use strict";function r(e){return{type:i.default.MARKER_CLICK,payload:e}}function a(){return{type:i.default.MARKER_CLOSE}}Object.defineProperty(t,"__esModule",{value:!0}),t.openMarker=r,t.closeMarker=a;var o=n(22),i=function(e){return e&&e.__esModule?e:{default:e}}(o)},22:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={FETCH_LOCATIONS:"FETCH_LOCATIONS",FETCH_INFO_WINDOW:"FETCH_INFO_WINDOW",FETCH_LIST:"FETCH_LIST",SEARCH:"SEARCH",MARKER_CLICK:"MARKER_CLICK",MARKER_CLOSE:"MARKER_CLOSE",PAGE_CHANGE:"PAGE_CHANGE"};r.FETCH_LOCATIONS_LOADING=r.FETCH_LOCATIONS+"_LOADING",r.FETCH_LOCATIONS_SUCCESS=r.FETCH_LOCATIONS+"_SUCCESS",r.FETCH_LOCATIONS_ERROR=r.FETCH_LOCATIONS+"_ERROR",r.FETCH_INFO_WINDOW_LOADING=r.FETCH_INFO_WINDOW+"_LOADING",r.FETCH_INFO_WINDOW_SUCCESS=r.FETCH_INFO_WINDOW+"_SUCCESS",r.FETCH_INFO_WINDOW_ERROR=r.FETCH_INFO_WINDOW+"_ERROR",r.FETCH_LIST_LOADING=r.FETCH_LIST+"_LOADING",r.FETCH_LIST_SUCCESS=r.FETCH_LIST+"_SUCCESS",r.FETCH_LIST_ERROR=r.FETCH_LIST+"_ERROR",t.default=r},265:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(1),o=r(a),i=n(44),u=r(i),l=n(92),s=n(45),c=n(310),d=r(c),f=n(311),p=r(f),m=n(313),y=r(m),h=n(325),g=r(h),b=document.querySelector(".locator"),_=(0,l.createStore)(y.default,function(){return(0,l.compose)((0,l.applyMiddleware)((0,p.default)({promiseTypeSuffixes:["LOADING","SUCCESS","ERROR"]}),d.default),void 0!==window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__():function(e){return e})}());document.addEventListener("DOMContentLoaded",function(){u.default.render(o.default.createElement(s.Provider,{store:_},o.default.createElement(g.default,null)),b)})},313:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(92),o=n(314),i=r(o),u=n(320),l=r(u),s=n(321),c=r(s),d=n(323),f=r(d),p=n(324),m=r(p),y=(0,a.combineReducers)({search:i.default,map:l.default,settings:c.default,locations:f.default,list:m.default});t.default=y},314:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case u.default.SEARCH:return o({},e,{address:t.payload.address,radius:t.payload.radius,category:t.payload.category});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1];switch(t.type){case i.default.MARKER_CLICK:return a({},e,{current:t.payload.ID,showCurrent:!0,center:{Lat:t.payload.Lat,Lng:t.payload.Lng}});case i.default.MARKER_CLOSE:return a({},e,{showCurrent:!1,center:u.center});case i.default.SEARCH:return a({},e,{current:-1,showCurrent:!1});case i.default.FETCH_LOCATIONS_LOADING:return a({},e,{isLoading:!0});case i.default.FETCH_LOCATIONS_SUCCESS:var n=void 0!==t.payload&&void 0!==t.payload.data.center?t.payload.data.center:u.center;return a({},e,{isLoading:!1,center:n});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1];switch(t.type){case c.default.FETCH_INFO_WINDOW_SUCCESS:var n=t.payload.data,r=e.loadedSettings;return!0===e.loadedListTemplate&&(r=!0),i({},e,a(),{loadedSettings:r,loadedWindowTemplate:!0,infoWindowTemplate:l.default.compile(n)});case c.default.FETCH_LIST_SUCCESS:var o=t.payload.data,u=e.loadedSettings;return!0===e.loadedWindowTemplate&&(u=!0),i({},e,a(),{loadedSettings:u,loadedListTemplate:!0,listTemplate:l.default.compile(o)});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1];switch(t.type){case i.default.FETCH_LOCATIONS_SUCCESS:return a({},e,{locations:t.payload.data.locations});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1];switch(t.type){case u.default.PAGE_CHANGE:return o({},e,{page:t.payload});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return{type:o.default.SEARCH,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.search=r;var a=n(22),o=function(e){return e&&e.__esModule?e:{default:e}}(a)},356:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n-1?t:""}},{key:"render",value:function(){var e=this.props.radii;return void 0!==e&&0!==Object.keys(e).length?s.default.createElement("div",{className:"radius-dropdown form-group"},s.default.createElement("label",{htmlFor:"radius",className:"sr-only"},ss.i18n._t("Locator.RADIUS_FIELD","Radius")),s.default.createElement("select",{name:"radius",className:"form-control",defaultValue:this.defaultValue()},s.default.createElement("option",{value:""},ss.i18n._t("Locator.RADIUS_FIELD","Radius")),this.mappedRadii())):null}}]),t}(s.default.Component);f.propTypes={radius:d.default.number.isRequired,radii:d.default.oneOfType([d.default.object,d.default.array]).isRequired,unit:d.default.string.isRequired},t.default=f},357:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0,unit:u,websiteText:s,directionsText:d,emailText:l,onClick:e.handleLocationClick,template:f})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.locations,r=(t.current,t.page),a=t.defaultLimit;return c.default.createElement("div",{className:"loc-list",role:"list"},c.default.createElement("div",{className:"loc-list-container"},c.default.createElement(m.AutoSizer,null,function(t){var n=t.width,r=t.height;return c.default.createElement("div",{className:"loc-list-inner",style:{width:n,height:r}},e.renderList())})),c.default.createElement("div",{className:"list-pagination"},c.default.createElement(O.default,{page:r,count:n.length,defaultLimit:a,goToPage:this.handlePaginateClick})))}}]),t}(s.Component);C.propTypes={locations:f.default.array,current:f.default.number,search:f.default.string,unit:f.default.string.isRequired,dispatch:f.default.func.isRequired,template:f.default.func.isRequired,defaultLimit:f.default.number.isRequired,page:f.default.number.isRequired,unitText:f.default.string.isRequired,directionsText:f.default.string.isRequired,emailText:f.default.string.isRequired,websiteText:f.default.string.isRequired},C.defaultProps={locations:[],current:-1,search:""},t.default=(0,p.connect)(u)(C)},702:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tt&&(r=t,n=t-4,n=n<1?1:n),n<=1&&(n=1,r=Math.min(5,t)),Array(r-n+1).fill().map(function(e,t){return n+t})}},{key:"renderPageLinks",value:function(){var e=this.props,t=e.page,n=e.goToPage;return this.getPageNumbers().map(function(e){return t===e?s.default.createElement("li",{className:"page-item active",key:e},s.default.createElement("span",{className:"page-link"},e,s.default.createElement("span",{className:"sr-only"},"(",ss.i18n._t("Locator.CURRENT","Current"),")"))):s.default.createElement("li",{className:"page-item",key:e,onClick:function(){return n(e)}},s.default.createElement("a",{className:"page-link"},e))})}},{key:"render",value:function(){var e=this.props,t=(e.count,e.page),n=e.goToPage,r=t<=1?"page-item disabled":"page-item",a=t<=1?function(){}:function(){return n(t-1)},o=t>=this.getLastPage()?"page-item disabled":"page-item",i=t>=this.getLastPage()?function(){}:function(){return n(t+1)};return this.getPageNumbers().length>1?s.default.createElement("ul",{className:"pagination"},s.default.createElement(p.default,{text:String.fromCharCode(171),label:ss.i18n._t("Locator.PREVIOUS_PAGE","Previous"),classes:r,action:a}),this.renderPageLinks(),s.default.createElement(p.default,{text:String.fromCharCode(187),label:ss.i18n._t("Locator.NEXT_PAGE","Next"),classes:o,action:i})):null}}]),t}(l.Component);m.propTypes={page:d.default.number.isRequired,count:d.default.number.isRequired,defaultLimit:d.default.number.isRequired,goToPage:d.default.func.isRequired},t.default=m},704:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case u.default.SEARCH:return o({},e,{address:t.payload.address,radius:t.payload.radius,category:t.payload.category});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1];switch(t.type){case i.default.MARKER_CLICK:return a({},e,{current:t.payload.ID,showCurrent:!0,center:{Lat:t.payload.Lat,Lng:t.payload.Lng}});case i.default.MARKER_CLOSE:return a({},e,{showCurrent:!1,center:u.center});case i.default.SEARCH:return a({},e,{current:-1,showCurrent:!1});case i.default.FETCH_LOCATIONS_LOADING:return a({},e,{isLoading:!0});case i.default.FETCH_LOCATIONS_SUCCESS:var n=void 0!==t.payload&&void 0!==t.payload.data.center?t.payload.data.center:u.center;return a({},e,{isLoading:!1,center:n});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:f,t=e.loadedListTemplate,n=e.loadedWindowTemplate,r=e.loadedMapStyle;return!0===t&&!0===n&&!0===r}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments[1];switch(t.type){case d.default.FETCH_INFO_WINDOW_SUCCESS:var n=t.payload.data,r=o(u({},e,{loadedWindowTemplate:!0}));return u({},e,a(),{loadedSettings:r,loadedWindowTemplate:!0,infoWindowTemplate:s.default.compile(n)});case d.default.FETCH_LIST_SUCCESS:var i=t.payload.data,l=o(u({},e,{loadedListTemplate:!0}));return u({},e,a(),{loadedSettings:l,loadedListTemplate:!0,listTemplate:s.default.compile(i)});case d.default.FETCH_MAP_STYLE_SUCCESS:var c=t.payload.data,p=o(u({},e,{loadedMapStyle:!0}));return u({},e,a(),{loadedSettings:p,loadedMapStyle:!0,mapStyle:c});case d.default.FETCH_MAP_STYLE_ERROR:if(t.payload===d.default.FETCH_MAP_STYLE_ERROR){var m=o(u({},e,{loadedMapStyle:!0}));return u({},e,a(),{loadedSettings:m,loadedMapStyle:!0})}default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1];switch(t.type){case i.default.FETCH_LOCATIONS_SUCCESS:return a({},e,{locations:t.payload.data.locations});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1];switch(t.type){case u.default.PAGE_CHANGE:return o({},e,{page:t.payload});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return{type:o.default.SEARCH,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.search=r;var a=n(22),o=function(e){return e&&e.__esModule?e:{default:e}}(a)},354:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n-1?t:""}},{key:"render",value:function(){var e=this.props.radii;return void 0!==e&&0!==Object.keys(e).length?s.default.createElement("div",{className:"radius-dropdown form-group"},s.default.createElement("label",{htmlFor:"radius",className:"sr-only"},ss.i18n._t("Locator.RADIUS_FIELD","Radius")),s.default.createElement("select",{name:"radius",className:"form-control",defaultValue:this.defaultValue()},s.default.createElement("option",{value:""},ss.i18n._t("Locator.RADIUS_FIELD","Radius")),this.mappedRadii())):null}}]),t}(s.default.Component);f.propTypes={radius:d.default.number.isRequired,radii:d.default.oneOfType([d.default.object,d.default.array]).isRequired,unit:d.default.string.isRequired},t.default=f},355:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0,unit:u,websiteText:s,directionsText:d,emailText:l,onClick:e.handleLocationClick,template:f})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.locations,r=(t.current,t.page),a=t.defaultLimit;return c.default.createElement("div",{className:"loc-list",role:"list"},c.default.createElement("div",{className:"loc-list-container"},c.default.createElement(m.AutoSizer,null,function(t){var n=t.width,r=t.height;return c.default.createElement("div",{className:"loc-list-inner",style:{width:n,height:r}},e.renderList())})),c.default.createElement("div",{className:"list-pagination"},c.default.createElement(O.default,{page:r,count:n.length,defaultLimit:a,goToPage:this.handlePaginateClick})))}}]),t}(s.Component);C.propTypes={locations:f.default.array,current:f.default.number,search:f.default.string,unit:f.default.string.isRequired,dispatch:f.default.func.isRequired,template:f.default.func.isRequired,defaultLimit:f.default.number.isRequired,page:f.default.number.isRequired,unitText:f.default.string.isRequired,directionsText:f.default.string.isRequired,emailText:f.default.string.isRequired,websiteText:f.default.string.isRequired},C.defaultProps={locations:[],current:-1,search:""},t.default=(0,p.connect)(u)(C)},700:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tt&&(r=t,n=t-4,n=n<1?1:n),n<=1&&(n=1,r=Math.min(5,t)),Array(r-n+1).fill().map(function(e,t){return n+t})}},{key:"renderPageLinks",value:function(){var e=this.props,t=e.page,n=e.goToPage;return this.getPageNumbers().map(function(e){return t===e?s.default.createElement("li",{className:"page-item active",key:e},s.default.createElement("span",{className:"page-link"},e,s.default.createElement("span",{className:"sr-only"},"(",ss.i18n._t("Locator.CURRENT","Current"),")"))):s.default.createElement("li",{className:"page-item",key:e,onClick:function(){return n(e)}},s.default.createElement("a",{className:"page-link"},e))})}},{key:"render",value:function(){var e=this.props,t=(e.count,e.page),n=e.goToPage,r=t<=1?"page-item disabled":"page-item",a=t<=1?function(){}:function(){return n(t-1)},o=t>=this.getLastPage()?"page-item disabled":"page-item",i=t>=this.getLastPage()?function(){}:function(){return n(t+1)};return this.getPageNumbers().length>1?s.default.createElement("ul",{className:"pagination"},s.default.createElement(p.default,{text:String.fromCharCode(171),label:ss.i18n._t("Locator.PREVIOUS_PAGE","Previous"),classes:r,action:a}),this.renderPageLinks(),s.default.createElement(p.default,{text:String.fromCharCode(187),label:ss.i18n._t("Locator.NEXT_PAGE","Next"),classes:o,action:i})):null}}]),t}(l.Component);m.propTypes={page:d.default.number.isRequired,count:d.default.number.isRequired,defaultLimit:d.default.number.isRequired,goToPage:d.default.func.isRequired},t.default=m},702:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n f,\n );\n}\n\n// creates the redux store with reducers and middleware\nconst store = createStore(reducers, composedMiddleware());\n\n// defers rendering until after content is loaded (only needed for settings)\ndocument.addEventListener('DOMContentLoaded', () => {\n // renders the locator\n ReactDom.render(\n \n \n \n , container);\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/boot/index.jsx","import { combineReducers } from 'redux';\n\nimport search from 'reducers/searchReducer';\nimport map from 'reducers/mapReducer';\nimport settings from 'reducers/settingsReducer';\nimport locations from 'reducers/locationReducer';\nimport list from 'reducers/listReducer';\n\n/**\n * Combines the reducers.\n *\n * uses shorthand to set key/values\n * \"search\" is short for \"search: search\"\n *\n * @type {Reducer}\n */\nconst reducers = combineReducers({\n search,\n map,\n settings,\n locations,\n list,\n});\n\nexport default reducers;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/index.js","/* global window */\nimport ActionType from 'actions/ActionTypes';\nimport url from 'url';\n\nconst defaultState = Object.assign({\n address: '',\n radius: -1,\n category: '',\n}, url.parse(window.location.href, true).query);\n\ndelete defaultState.page;\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.SEARCH:\n return {\n ...state,\n address: action.payload.address,\n radius: action.payload.radius,\n category: action.payload.category,\n };\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/searchReducer.js","import ActionType from 'actions/ActionTypes';\n\nconst defaultState = {\n current: -1,\n showCurrent: false,\n isLoading: true,\n // center is invalid, can't be shown on map\n // see the Map component (Map.jsx)\n center: {\n Lat: 91.0,\n Lng: 181.0,\n },\n};\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.MARKER_CLICK:\n return {\n ...state,\n current: action.payload.ID,\n showCurrent: true,\n center: {\n Lat: action.payload.Lat,\n Lng: action.payload.Lng,\n },\n };\n\n case ActionType.MARKER_CLOSE:\n return {\n ...state,\n showCurrent: false,\n center: defaultState.center,\n };\n\n case ActionType.SEARCH:\n return {\n ...state,\n current: -1,\n showCurrent: false,\n };\n\n case ActionType.FETCH_LOCATIONS_LOADING:\n return {\n ...state,\n isLoading: true,\n };\n\n case ActionType.FETCH_LOCATIONS_SUCCESS: {\n const center = action.payload !== undefined && action.payload.data.center !== undefined ?\n action.payload.data.center :\n defaultState.center;\n return {\n ...state,\n isLoading: false,\n center,\n };\n }\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/mapReducer.js","/* global dynamic_locator, ss */\nimport handlebars from 'handlebars';\nimport ActionType from 'actions/ActionTypes';\n\nconst defaultState = {\n loadedSettings: false,\n loadedWindowTemplate: false,\n loadedListTemplate: false,\n\n infoWindowTemplate: null,\n listTemplate: null,\n\n unit: 'm',\n\n defaultCenter: {\n lat: 0,\n lng: 0,\n },\n autocomplete: false,\n defaultLimit: 20,\n\n // eslint-disable-next-line no-underscore-dangle\n emailText: ss.i18n._t('Locator.EMAIL_TEXT', 'Email'),\n // eslint-disable-next-line no-underscore-dangle\n websiteText: ss.i18n._t('Locator.WEBSITE_TEXT', 'Website'),\n // eslint-disable-next-line no-underscore-dangle\n directionsText: ss.i18n._t('Locator.DIRECTIONS_TEXT', 'Directions'),\n};\n\n// eslint-disable-next-line no-underscore-dangle\ndefaultState.unitText = ss.i18n._t(`Locator.UNIT.${defaultState.unit}`, 'mi');\n\n/**\n * Sets up settings\n * @return {{unit, clusters, limit, radii, categories}}\n */\nfunction settings() {\n return {\n unit: dynamic_locator.unit,\n clusters: dynamic_locator.clusters,\n limit: dynamic_locator.limit,\n radii: dynamic_locator.radii,\n categories: dynamic_locator.categories,\n defaultCenter: {\n lat: dynamic_locator.defaultCenter.lat,\n lng: dynamic_locator.defaultCenter.lng,\n },\n autocomplete: dynamic_locator.autocomplete,\n // defaultLimit: dynamic_locator.defaultLimit,\n };\n}\n\n/**\n * The reducer for creating a part in the store for things like radius and categories\n */\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.FETCH_INFO_WINDOW_SUCCESS: {\n const { data } = action.payload;\n let loaded = state.loadedSettings;\n if (state.loadedListTemplate === true) {\n loaded = true;\n }\n\n return {\n ...state,\n ...settings(),\n loadedSettings: loaded,\n loadedWindowTemplate: true,\n infoWindowTemplate: handlebars.compile(data),\n };\n }\n\n case ActionType.FETCH_LIST_SUCCESS: {\n const { data } = action.payload;\n let loaded = state.loadedSettings;\n if (state.loadedWindowTemplate === true) {\n loaded = true;\n }\n\n return {\n ...state,\n ...settings(),\n loadedSettings: loaded,\n loadedListTemplate: true,\n listTemplate: handlebars.compile(data),\n };\n }\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/settingsReducer.js","import ActionType from 'actions/ActionTypes';\n\nconst defaultState = {\n locations: [],\n};\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.FETCH_LOCATIONS_SUCCESS:\n return {\n ...state,\n locations: action.payload.data.locations,\n };\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/locationReducer.js","/* global window */\nimport ActionType from 'actions/ActionTypes';\nimport url from 'url';\n\nconst { page } = url.parse(window.location.href, true).query;\nconst defaultState = {\n page: Number.isNaN(Number(page)) ? 1 : Number(page),\n};\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.PAGE_CHANGE:\n return {\n ...state,\n page: action.payload,\n };\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/listReducer.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { fetchLocations } from 'actions/locationActions';\nimport { fetchInfoWindow, fetchList } from 'actions/settingsActions';\n\nimport Search from 'components/search/SearchBar';\nimport MapContainer from 'components/map/MapContainer';\nimport List from 'components/list/List';\nimport Loading from 'components/Loading';\n\n/**\n * The main locator component.\n */\nexport class Locator extends Component {\n /**\n * Called after the component mounts\n */\n componentDidMount() {\n const { dispatch } = this.props;\n dispatch(fetchInfoWindow());\n dispatch(fetchList());\n }\n\n /**\n * Should this component update\n * @param nextProps\n * @return {boolean}\n */\n shouldComponentUpdate(nextProps) {\n const { loadedSettings } = this.props;\n return (loadedSettings !== nextProps.loadedSettings);\n }\n\n /**\n * Called after the component updates\n * @param nextProps\n */\n componentDidUpdate(nextProps) {\n const { dispatch, unit, address, radius, category } = nextProps;\n dispatch(fetchLocations({\n unit,\n address,\n radius,\n category,\n }));\n }\n\n /**\n * Renders the component\n * @returns {XML}\n */\n render() {\n const { loadedSettings } = this.props;\n if (loadedSettings === false) {\n return null;\n }\n return (\n
\n \n \n \n \n
\n );\n }\n}\n\n/**\n * The prop types of the Locator component\n * @type {{data}}\n */\nLocator.propTypes = {\n loadedSettings: PropTypes.bool.isRequired,\n unit: PropTypes.string.isRequired,\n address: PropTypes.string.isRequired,\n radius: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n ]).isRequired,\n category: PropTypes.string.isRequired,\n dispatch: PropTypes.func.isRequired,\n};\n\n/**\n * Takes variables/functions from the state and assigns them to variables/functions in the components props.\n *\n * @param state\n * @returns {{loadedSettings}}\n */\nexport function mapStateToProps(state) {\n return {\n loadedSettings: state.settings.loadedSettings,\n\n unit: state.settings.unit,\n address: state.search.address,\n radius: state.search.radius,\n category: state.search.category,\n };\n}\n\n/**\n * The default export of the file.\n *\n * The component is connected to the redux state\n *\n * Whenever the state is changed the props change.\n */\nexport default connect(mapStateToProps)(Locator);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/Locator.jsx","/* global window, dynamic_locator */\nimport axios from 'axios';\n\nimport ActionType from 'actions/ActionTypes';\n\nexport function fetchInfoWindow() {\n const loc = window.location;\n const path = dynamic_locator.infoWindowTemplatePath;\n\n return {\n type: ActionType.FETCH_INFO_WINDOW,\n payload: axios.get(`${loc.protocol}//${loc.host}${path}`),\n };\n}\n\nexport function fetchList() {\n const loc = window.location;\n const path = dynamic_locator.listTemplatePath;\n\n return {\n type: ActionType.FETCH_LIST,\n payload: axios.get(`${loc.protocol}//${loc.host}${path}`),\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/settingsActions.js","/* global window, document */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport FontAwesomeIcon from '@fortawesome/react-fontawesome';\nimport { faSearch, faCheckCircle } from '@fortawesome/fontawesome-free-solid';\nimport PlacesAutocomplete from 'react-places-autocomplete';\n\nimport { fetchLocations } from 'actions/locationActions';\nimport { search } from 'actions/searchActions';\nimport { changePage } from 'actions/listActions';\nimport RadiusDropDown from 'components/search/RadiusDropDown';\nimport CategoryDropDown from 'components/search/CategoryDropDown';\n\nexport class SearchBar extends Component {\n /**\n * Turns a javascript object into url params.\n * Skips keys without values\n *\n * @param obj\n * @return {string}\n */\n static objToUrl(obj) {\n let vars = '';\n\n Object.keys(obj).forEach((key) => {\n const value = obj[key];\n\n // don't add it if its blank\n if (value !== undefined && value !== null && value !== '') {\n vars += `${key}=${value}&`;\n }\n });\n\n // replaces trailing spaces and '&' symbols then replaces spaces with +\n return vars.replace(/([&\\s]+$)/g, '').replace(/(\\s)/g, '+');\n }\n\n static getDropdownValue(name) {\n if (document.getElementsByName(name)[0] !== undefined) {\n return document.getElementsByName(name)[0].value;\n }\n return '';\n }\n\n /**\n * Used to create the SearchBar.\n * needed to allow use of this keyword in handler.\n * @param props\n */\n constructor(props) {\n super(props);\n\n this.state = {\n showFilter: false,\n };\n this.searchAddress = props.address;\n\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleFilter = this.handleFilter.bind(this);\n this.handleAddressChange = this.handleAddressChange.bind(this);\n }\n\n\n /**\n * 'Submits' form. Really just fires state change and changes the url.\n */\n handleSubmit(event) {\n if (typeof event === 'string' || event instanceof String) {\n this.searchAddress = event;\n document.getElementsByName('address')[0].value = event;\n } else {\n // stops the submit from reloading\n event.preventDefault();\n }\n\n const address = document.getElementsByName('address')[0].value;\n const radius = SearchBar.getDropdownValue('radius');\n const category = SearchBar.getDropdownValue('category');\n\n const params = {\n address,\n radius,\n category,\n };\n\n // selects dispatch and unit from this.props.\n // const dispatch = this.props.dispatch; const unit = this.props.unit;\n const { dispatch, unit } = this.props;\n\n // dispatches search (updates search values)\n dispatch(search({\n address,\n radius,\n category,\n }));\n\n // dispatches fetch locations (gets the locations)\n dispatch(fetchLocations({\n ...params,\n unit,\n }));\n\n dispatch(changePage(1));\n\n // changes the url for the window and adds it to the browser history(no redirect)\n const loc = window.location;\n const newurl = `${loc.protocol}//${loc.host}${loc.pathname}?${SearchBar.objToUrl(params)}`;\n window.history.pushState({\n path: newurl,\n }, '', newurl);\n }\n\n handleFilter(event) {\n this.setState({\n showFilter: !this.state.showFilter,\n });\n }\n\n handleAddressChange(searchAddress) {\n this.searchAddress = searchAddress;\n }\n\n /**\n * Gets the address input.\n * @return {*}\n */\n getAddressInput() {\n const {address, radii, center, autocomplete} = this.props;\n if (autocomplete === true) {\n const inputProps = {\n value: this.searchAddress,\n onChange: this.handleAddressChange,\n placeholder: ss.i18n._t('Locator.ADDRESS_FIELD', 'Address or zip code'),\n name: 'address',\n };\n const cssClasses = {\n root: 'form-control autocomplete-root',\n input: 'form-control',\n };\n const options = {\n location: new google.maps.LatLng(center.lat, center.lng),\n radius: Math.max(...radii),\n };\n return ();\n }\n return ();\n }\n\n /**\n * Renders the component.\n * @returns {XML}\n */\n render() {\n const {\n address, category, radii, categories, unit, autocomplete\n } = this.props;\n let { radius } = this.props;\n if (typeof radius === 'string') {\n radius = Number(radius);\n }\n\n const hasFilter = category !== '' || !(radius === '' || radius < 1);\n\n const filterIndicatorClass = hasFilter ? 'filter-icon' : 'filter-icon no-show';\n const filterClasses = this.state.showFilter ? 'filter open' : 'filter closed';\n\n return (\n
\n {/* not a fieldset because no flexbox */}\n
\n
\n
\n \n {this.getAddressInput()}\n \n \n \n {ss.i18n._t('Locator.SEARCH_BUTTON', 'Search')}\n \n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n );\n }\n}\n\nSearchBar.propTypes = {\n address: PropTypes.string.isRequired,\n radius: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n ]).isRequired,\n category: PropTypes.string.isRequired,\n\n // eslint-disable-next-line react/forbid-prop-types\n radii: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n categories: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n unit: PropTypes.string.isRequired,\n autocomplete: PropTypes.bool.isRequired,\n center: PropTypes.shape({\n lat: PropTypes.number.isRequired,\n lng: PropTypes.number.isRequired,\n }).isRequired,\n dispatch: PropTypes.func.isRequired,\n};\n\n/**\n * Takes variables/functions from the state and assigns them to variables/functions in the components props.\n *\n * @param state\n * @returns {{address, radius}}\n */\nexport function mapStateToProps(state) {\n return {\n // the defaults - for when it gets loaded from the url\n address: state.search.address,\n radius: state.search.radius,\n category: state.search.category,\n\n // the options\n radii: state.settings.radii,\n categories: state.settings.categories,\n\n // other\n unit: state.settings.unit,\n autocomplete: state.settings.autocomplete,\n center: state.settings.defaultCenter,\n };\n}\n\nexport default connect(mapStateToProps)(SearchBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/search/SearchBar.jsx","import ActionType from 'actions/ActionTypes';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function search(inputs = {}) {\n return {\n type: ActionType.SEARCH,\n payload: inputs,\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/searchActions.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass RadiusDropDown extends React.Component {\n /**\n * Maps the radii into options for the drop down.\n * @returns {Array}\n */\n mappedRadii() {\n const { radii, unit } = this.props;\n\n return Object.keys(radii).map(key => (\n \n {radii[key]} {unit}\n \n ));\n }\n\n /**\n * Gets the default value for the dropdown\n * @return {*}\n */\n defaultValue() {\n const { radius, radii } = this.props;\n\n // if the radius exists in the dropdown\n const values = Object.keys(radii).map(key => radii[key]);\n if (values.indexOf(radius) > -1) {\n return radius;\n }\n return '';\n }\n\n /**\n * Outputs the radius drop down.\n * @returns {*}\n */\n render() {\n const { radii } = this.props;\n if (radii !== undefined && Object.keys(radii).length !== 0) {\n return (\n
\n \n \n \n {this.mappedRadii()}\n \n
\n );\n }\n return null;\n }\n}\n\nRadiusDropDown.propTypes = {\n radius: PropTypes.number.isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n radii: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n unit: PropTypes.string.isRequired,\n};\n\nexport default RadiusDropDown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/search/RadiusDropDown.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass CategoryDropDown extends Component {\n /**\n * Maps the radii into options for the drop down.\n * @returns {Array}\n */\n mappedCategories() {\n const { categories } = this.props;\n\n return categories.map(category => (\n \n {category.Name}\n \n ));\n }\n\n /**\n * Gets the default value for the dropdown\n * @return {*}\n */\n defaultValue() {\n const { category, categories } = this.props;\n // if the category exists in the dropdown\n if (categories.filter(\n cat => cat.ID === Number(category),\n ).length) {\n return category.toString();\n }\n return '';\n }\n\n /**\n * Outputs the radius drop down.\n * @returns {*}\n */\n render() {\n const { categories } = this.props;\n if (categories !== undefined && Object.keys(categories).length !== 0) {\n return (\n
\n \n \n \n {this.mappedCategories()}\n \n
\n );\n }\n return null;\n }\n}\n\nCategoryDropDown.propTypes = {\n category: PropTypes.string.isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n categories: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n};\n\nexport default CategoryDropDown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/search/CategoryDropDown.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Parser as HtmlToReactParser } from 'html-to-react';\nimport scrollToElement from 'animated-scroll-to';\n\nimport { openMarker, closeMarker } from 'actions/mapActions';\nimport { changePage } from 'actions/listActions';\nimport Map from 'components/map/Map';\n\n/**\n * The MapArea component.\n * Renders the map.\n */\nexport class MapContainer extends Component {\n /**\n * Used to create the Map.\n * needed to allow use of this keyword in handler.\n * @param props\n */\n constructor(props) {\n super(props);\n this.handleMarkerClick = this.handleMarkerClick.bind(this);\n this.handleMarkerClose = this.handleMarkerClose.bind(this);\n }\n\n /**\n * Generates an array of marker objects to use on the map\n */\n getMarkers() {\n const { locations, template, emailText, websiteText } = this.props;\n const markers = [];\n\n const htmlToReactParser = new HtmlToReactParser();\n\n let i;\n // eslint-disable-next-line no-plusplus\n for (i = 0; i < locations.length; i++) {\n const location = locations[i];\n const { Lat, Lng } = location;\n const loc = {\n ...location,\n EmailText: emailText,\n WebsiteText: websiteText,\n }\n markers[markers.length] = {\n position: {\n lat: Number(Lat),\n lng: Number(Lng),\n },\n key: location.ID,\n defaultAnimation: 2,\n infoContent: (\n
\n {htmlToReactParser.parse(template(loc))}\n
\n ),\n };\n }\n return markers;\n }\n\n /**\n * Fires and event for clicking a marker\n * @param target The marker that was clicked\n */\n handleMarkerClick(target) {\n const { dispatch, locations, defaultLimit } = this.props;\n const location = locations.find(loc => loc.ID === target.key);\n dispatch(openMarker(location));\n\n // change the page\n const index = locations.findIndex(l => l.ID === target.key) + 1;\n const page = Math.ceil(index / defaultLimit);\n\n dispatch(changePage(page));\n\n // scroll to location in list\n const element = document.getElementById(`loc-${target.key}`);\n if (element !== null) {\n const scrollContainer = document.getElementsByClassName('loc-list-inner')[0];\n scrollToElement(element, {\n element: scrollContainer,\n minDuration: 500,\n maxDuration: 750,\n cancelOnUserAction: false,\n });\n }\n }\n\n /**\n * Fires event for closing a marker info box\n * @param target The marker that had its info box closed\n */\n handleMarkerClose() {\n const { dispatch } = this.props;\n dispatch(closeMarker());\n }\n\n render() {\n const { current, showCurrent, clusters, center, defaultCenter } = this.props;\n return (\n
\n \n }\n mapElement={\n
\n }\n markers={this.getMarkers()}\n onMarkerClick={this.handleMarkerClick}\n onMarkerClose={this.handleMarkerClose}\n current={current}\n showCurrent={showCurrent}\n clusters={clusters}\n center={center}\n defaultCenter={defaultCenter}\n />\n
\n );\n }\n}\n\n/**\n * Defines the prop types\n * @type {{locations: *}}\n */\nMapContainer.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n locations: PropTypes.array,\n dispatch: PropTypes.func.isRequired,\n current: PropTypes.number.isRequired,\n showCurrent: PropTypes.bool.isRequired,\n clusters: PropTypes.bool.isRequired,\n template: PropTypes.func.isRequired,\n center: PropTypes.shape({\n Lat: PropTypes.number.isRequired,\n Lng: PropTypes.number.isRequired,\n }).isRequired,\n defaultCenter: PropTypes.shape({\n lat: PropTypes.number.isRequired,\n lng: PropTypes.number.isRequired,\n }).isRequired,\n};\n\n/**\n * Defines the default values of the props\n * @type {{locations: {edges: Array}}}\n */\nMapContainer.defaultProps = {\n locations: [],\n};\n\n/**\n * Maps that state to props\n * @param state\n * @returns {{current}}\n */\nexport function mapStateToProps(state) {\n return {\n current: state.map.current,\n showCurrent: state.map.showCurrent,\n clusters: state.settings.clusters,\n template: state.settings.infoWindowTemplate,\n locations: state.locations.locations,\n center: state.map.center,\n defaultCenter: state.settings.defaultCenter,\n\n defaultLimit: state.settings.defaultLimit,\n emailText: state.settings.emailText,\n websiteText: state.settings.websiteText,\n };\n}\n\nexport default connect(mapStateToProps)(MapContainer);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/map/MapContainer.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withGoogleMap, GoogleMap, Marker, InfoWindow } from 'react-google-maps';\nimport MarkerClusterer from 'react-google-maps/lib/components/addons/MarkerClusterer';\n\n/**\n * Renders every marker\n *\n * @param props\n * @return {Array}\n */\nexport function markers(props) {\n return props.markers.map(marker => (\n props.onMarkerClick(marker)}\n >\n {props.current === marker.key && props.showCurrent && (\n props.onMarkerClose()}>\n
{marker.infoContent}
\n
\n )}\n \n ));\n}\n\n/**\n * Renders the map, with all the markers\n *\n * @param props\n * @return {XML}\n * @constructor\n */\nexport function Map(props) {\n // we don't want a center if it is invalid\n const opts = {};\n if (props.center.Lat !== 91 && props.center.Lng !== 181) {\n opts.center = {\n lat: props.center.Lat,\n lng: props.center.Lng,\n }\n }\n return (\n \n {props.clusters === true ? \n {markers(props)}\n :\n markers(props)}\n \n );\n}\n\nMap.propTypes = {\n clusters: PropTypes.bool.isRequired,\n center: PropTypes.shape({\n Lat: PropTypes.number.isRequired,\n Lng: PropTypes.number.isRequired,\n }).isRequired,\n defaultCenter: PropTypes.shape({\n lat: PropTypes.number.isRequired,\n lng: PropTypes.number.isRequired,\n }).isRequired,\n};\n\nexport default withGoogleMap(Map);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/map/Map.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { AutoSizer } from 'react-virtualized';\nimport scrollToElement from 'animated-scroll-to';\n\nimport { openMarker } from 'actions/mapActions';\nimport { changePage } from 'actions/listActions';\nimport Location from 'components/list/Location';\nimport Pagination from 'components/list/Pagination';\n\n/**\n * The List component.\n * Renders the location list.\n */\nexport class List extends Component {\n /**\n * Used to create the Map.\n * needed to allow use of this keyword in handler.\n * @param props\n */\n constructor(props) {\n super(props);\n // bind actions/handlers\n this.handleLocationClick = this.handleLocationClick.bind(this);\n this.handlePaginateClick = this.handlePaginateClick.bind(this);\n }\n\n /**\n * Handles a list item click\n * @param target\n */\n handleLocationClick(target) {\n const { dispatch, locations } = this.props;\n const location = locations.find(loc => loc.ID === target);\n dispatch(openMarker(location));\n\n // scroll to location in list\n const element = document.getElementById(`loc-${target}`);\n if (element !== null) {\n const scrollContainer = document.getElementsByClassName('loc-list-inner')[0];\n scrollToElement(element, {\n element: scrollContainer,\n minDuration: 500,\n maxDuration: 750,\n cancelOnUserAction: false,\n });\n }\n }\n\n /**\n * Handles a pagination item click\n * @param page\n */\n handlePaginateClick(page) {\n const { dispatch } = this.props;\n dispatch(changePage(page));\n }\n\n /**\n * Renders the list\n */\n renderList() {\n const {\n page,\n defaultLimit,\n locations,\n current,\n search,\n unit,\n unitText,\n emailText,\n websiteText,\n directionsText,\n template\n } = this.props;\n const realPage = page - 1 ? page - 1 : 0;\n // in case we want to implement a flexible limit\n const lim = defaultLimit;\n\n return locations.slice(realPage * lim, page * lim).map((location, index) => {\n return 0}\n unit={unitText}\n websiteText={websiteText}\n directionsText={directionsText}\n emailText={emailText}\n onClick={this.handleLocationClick}\n template={template}\n />\n });\n }\n\n /**\n * Renders the component\n * @returns {XML}\n */\n render() {\n const { locations, current, page, defaultLimit } = this.props;\n return (\n
\n
\n \n {({ width, height }) =>\n
\n {this.renderList()}\n
\n }\n
\n
\n
\n \n
\n
\n );\n }\n}\n\n/**\n * Defines the prop types\n * @type {{locations: *}}\n */\nList.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n locations: PropTypes.array,\n current: PropTypes.number,\n search: PropTypes.string,\n unit: PropTypes.string.isRequired,\n dispatch: PropTypes.func.isRequired,\n template: PropTypes.func.isRequired,\n defaultLimit: PropTypes.number.isRequired,\n page: PropTypes.number.isRequired,\n unitText: PropTypes.string.isRequired,\n directionsText: PropTypes.string.isRequired,\n emailText: PropTypes.string.isRequired,\n websiteText: PropTypes.string.isRequired,\n};\n\n/**\n * Defines the default values of the props\n * @type {{locations: {edges: Array}}}\n */\nList.defaultProps = {\n locations: [],\n current: -1,\n search: '',\n};\n\n/**\n * Maps that state to props\n * @param state\n * @returns {{current}}\n */\nexport function mapStateToProps(state) {\n return {\n current: state.map.current,\n search: state.search.address,\n unit: state.settings.unit,\n unitText: state.settings.unitText,\n directionsText: state.settings.directionsText,\n emailText: state.settings.emailText,\n websiteText: state.settings.websiteText,\n template: state.settings.listTemplate,\n locations: state.locations.locations,\n defaultLimit: state.settings.defaultLimit,\n page: state.list.page,\n };\n}\n\n\n/**\n * export the Map Component\n */\nexport default connect(mapStateToProps)(List);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/List.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Parser as HtmlToReactParser } from 'html-to-react';\n\n/**\n * The Location component.\n * Used in the location list.\n */\nclass Location extends Component {\n /**\n * Replaces any trailing '+' and whitespace and any spaces left with '+'\n *\n * @param address\n * @returns String\n */\n static cleanAddress(address) {\n if (address) {\n if (typeof address === 'string') {\n return address.replace(/([+\\s]+$)/g, '').replace(/(\\s)/g, '+');\n }\n }\n return '';\n }\n\n /**\n * Rounds the distance\n *\n * @return Boolean | String\n */\n getDistance() {\n const { location } = this.props;\n const distance = location.Distance;\n\n if (distance === -1) {\n return false;\n }\n\n return distance.toFixed(2);\n }\n\n /**\n * Gets the daddr string for google maps directions\n * @returns {string}\n */\n getDaddr() {\n const { location } = this.props;\n let daddr = '';\n\n if (location.Address) {\n daddr += `${location.Address}+`;\n }\n\n if (location.Address2) {\n daddr += `${location.Address2}+`;\n }\n\n if (location.City) {\n daddr += `${location.City}+`;\n }\n\n if (location.State) {\n daddr += `${location.State}+`;\n }\n\n if (location.PostalCode) {\n daddr += location.PostalCode;\n }\n\n return Location.cleanAddress(daddr);\n }\n\n /**\n * Gets the class for the rendered component\n * @return {string}\n */\n getClassName() {\n const {\n index, current,\n } = this.props;\n let className = 'list-location';\n // if it should be focused\n if (current) {\n className += ' focus';\n }\n // if it is even (needed because the list acts odd with :nth-child)\n if (index % 2 === 0) {\n className += ' even';\n }\n // if it is first (needed because the list acts odd with :nth-child)\n if (index === 0) {\n className += ' first';\n }\n return className;\n }\n\n /**\n * renders the component\n * @returns {XML}\n */\n render() {\n const {\n location, index, search, template, unit, directionsText, emailText, websiteText, onClick,\n } = this.props;\n const htmlToReactParser = new HtmlToReactParser();\n\n const loc = {\n ...location,\n Distance: this.getDistance(),\n DirectionsLink: `http://maps.google.com/maps?saddr=${Location.cleanAddress(search)}&daddr=${this.getDaddr()}`,\n DirectionsText: directionsText,\n EmailText: emailText,\n WebsiteText: websiteText,\n Unit: unit,\n Number: index + 1,\n };\n\n const id = `loc-${location.ID}`;\n const className = this.getClassName();\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events\n onClick(location.ID)}\n role=\"listitem\"\n >\n {htmlToReactParser.parse(template(loc))}\n
\n );\n }\n}\n\n/**\n * defines the prop types\n * @type {{location, index: *}}\n */\nLocation.propTypes = {\n location: PropTypes.shape({\n Title: PropTypes.string,\n Address: PropTypes.string,\n Address2: PropTypes.string,\n City: PropTypes.string,\n State: PropTypes.string,\n PostalCode: PropTypes.string,\n Website: PropTypes.string,\n Phone: PropTypes.string,\n Email: PropTypes.string,\n Distance: PropTypes.number,\n }).isRequired,\n index: PropTypes.number.isRequired,\n current: PropTypes.bool.isRequired,\n search: PropTypes.bool.isRequired,\n unit: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n template: PropTypes.func.isRequired,\n};\n\n/**\n * Exports the Location components\n */\nexport default Location;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/Location.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport PaginationEnd from 'components/list/PaginationEnd';\n\n/**\n * The Pagination component.\n * Renders the pagination for the location list.\n */\nclass Pagination extends Component {\n /**\n * Gets the last possible page. If there are 13 items with a page limit of 5 there will be 3 pages.\n * @return {number}\n */\n getLastPage() {\n const { count, defaultLimit } = this.props;\n const lim = defaultLimit;\n\n return Math.ceil(count / defaultLimit);\n }\n\n /**\n * Gets all the page numbers that should be shown\n * @return {number[]}\n */\n getPageNumbers() {\n const { page } = this.props;\n const lastPage = this.getLastPage();\n const range = 2;\n\n let rangeStart = page - range;\n let rangeEnd = page + range;\n\n if (rangeEnd > lastPage) {\n rangeEnd = lastPage;\n rangeStart = lastPage - range * 2;\n rangeStart = rangeStart < 1 ? 1 : rangeStart;\n }\n\n if (rangeStart <= 1) {\n rangeStart = 1;\n rangeEnd = Math.min(range * 2 + 1, lastPage);\n }\n\n // from https://stackoverflow.com/a/33457557\n return Array(rangeEnd - rangeStart + 1).fill().map((_, index) => rangeStart + index);\n }\n\n /**\n * Renders the page links\n */\n renderPageLinks() {\n const { page, goToPage } = this.props;\n const numbers = this.getPageNumbers();\n\n return numbers.map((num) => {\n if (page === num) {\n return (\n
  • \n \n {num}\n ({ss.i18n._t('Locator.CURRENT', 'Current')})\n \n
  • \n );\n } else {\n return (\n
  • goToPage(num)}>\n {num}\n
  • \n );\n }\n });\n }\n\n /**\n * Renders the Pagination component\n * @return {*}\n */\n render() {\n const { count, page, goToPage } = this.props;\n const previousClasses = page <= 1 ? \"page-item disabled\" : \"page-item\";\n const previousAction = page <= 1 ? () => {} : () => goToPage(page - 1);\n\n const nextClasses = page >= this.getLastPage() ? \"page-item disabled\" : \"page-item\";\n const nextAction = page >= this.getLastPage() ? () => {} : () => goToPage(page + 1);\n\n\n if (this.getPageNumbers().length > 1) {\n return (\n
      \n \n {this.renderPageLinks()}\n \n
    \n );\n }\n return null;\n }\n}\n\nPagination.propTypes = {\n page: PropTypes.number.isRequired,\n count: PropTypes.number.isRequired,\n defaultLimit: PropTypes.number.isRequired,\n goToPage: PropTypes.func.isRequired,\n};\n\nexport default Pagination;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/Pagination.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * The Pagination component.\n * Renders the pagination for the location list.\n */\nclass PaginationEnd extends Component {\n render() {\n const { text, label, classes, action } = this.props;\n return (\n
  • \n \n {text}\n {label}\n \n
  • \n );\n }\n}\n\nPaginationEnd.propTypes = {\n text: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n classes: PropTypes.string.isRequired,\n action: PropTypes.func.isRequired,\n}\n\nexport default PaginationEnd;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/PaginationEnd.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\n// exported for tests\nexport class Loading extends Component {\n render() {\n const { isLoading } = this.props;\n if (isLoading) {\n return (\n
    \n
    \n
    \n Loading\n
    \n
    \n );\n }\n return (\n
    \n );\n }\n}\n\nLoading.propTypes = {\n isLoading: PropTypes.bool.isRequired,\n};\n\nexport function mapStateToProps(state) {\n return {\n isLoading: state.map.isLoading,\n };\n}\n\nexport default connect(mapStateToProps)(Loading);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/Loading.jsx","import ActionType from 'actions/ActionTypes';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function changePage(page) {\n return {\n type: ActionType.PAGE_CHANGE,\n payload: page,\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/listActions.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./client/src/js/actions/locationActions.js","webpack:///./client/src/js/actions/mapActions.js","webpack:///./client/src/js/actions/ActionTypes.js","webpack:///./client/src/js/boot/index.jsx","webpack:///./client/src/js/reducers/index.js","webpack:///./client/src/js/reducers/searchReducer.js","webpack:///./client/src/js/reducers/mapReducer.js","webpack:///./client/src/js/reducers/settingsReducer.js","webpack:///./client/src/js/reducers/locationReducer.js","webpack:///./client/src/js/reducers/listReducer.js","webpack:///./client/src/js/components/Locator.jsx","webpack:///./client/src/js/actions/settingsActions.js","webpack:///./client/src/js/components/search/SearchBar.jsx","webpack:///./client/src/js/actions/searchActions.js","webpack:///./client/src/js/components/search/RadiusDropDown.jsx","webpack:///./client/src/js/components/search/CategoryDropDown.jsx","webpack:///./client/src/js/components/map/MapContainer.jsx","webpack:///./client/src/js/components/map/Map.jsx","webpack:///./client/src/js/components/list/List.jsx","webpack:///./client/src/js/components/list/Location.jsx","webpack:///./client/src/js/components/list/Pagination.jsx","webpack:///./client/src/js/components/list/PaginationEnd.jsx","webpack:///./client/src/js/components/Loading.jsx","webpack:///./client/src/js/actions/listActions.js"],"names":["fetchLocations","params","loc","window","location","address","radius","category","type","FETCH_LOCATIONS","payload","get","protocol","host","pathname","openMarker","closeMarker","target","MARKER_CLICK","MARKER_CLOSE","ActionTypes","FETCH_INFO_WINDOW","FETCH_LIST","FETCH_MAP_STYLE","SEARCH","PAGE_CHANGE","FETCH_LOCATIONS_LOADING","FETCH_LOCATIONS_SUCCESS","FETCH_LOCATIONS_ERROR","FETCH_INFO_WINDOW_LOADING","FETCH_INFO_WINDOW_SUCCESS","FETCH_INFO_WINDOW_ERROR","FETCH_LIST_LOADING","FETCH_LIST_SUCCESS","FETCH_LIST_ERROR","FETCH_MAP_STYLE_LOADING","FETCH_MAP_STYLE_","FETCH_MAP_STYLE_SUCCESS","FETCH_MAP_STYLE_ERROR","container","document","querySelector","composedMiddleware","promiseTypeSuffixes","__REDUX_DEVTOOLS_EXTENSION__","f","store","addEventListener","render","reducers","search","map","settings","locations","list","reducer","defaultState","Object","assign","parse","href","query","page","state","action","current","showCurrent","isLoading","center","Lat","Lng","ID","undefined","data","loadedSettings","loadedWindowTemplate","loadedListTemplate","loadedMapStyle","infoWindowTemplate","listTemplate","mapStyle","markerImagePath","unit","defaultCenter","lat","lng","autocomplete","defaultLimit","emailText","ss","i18n","_t","websiteText","directionsText","unitText","dynamic_locator","clusters","limit","radii","categories","didSettingsLoad","loaded","compile","Number","isNaN","mapStateToProps","Locator","dispatch","props","nextProps","propTypes","bool","isRequired","string","oneOfType","number","func","fetchInfoWindow","fetchList","fetchMapStyle","path","infoWindowTemplatePath","listTemplatePath","mapStylePath","SearchBar","obj","vars","keys","forEach","key","value","replace","name","getElementsByName","showFilter","searchAddress","handleSubmit","bind","handleFilter","handleAddressChange","event","String","preventDefault","getDropdownValue","newurl","objToUrl","history","pushState","setState","inputProps","onChange","placeholder","cssClasses","root","input","options","google","maps","LatLng","Math","max","hasFilter","filterIndicatorClass","filterClasses","getAddressInput","object","array","shape","inputs","RadiusDropDown","values","indexOf","length","defaultValue","mappedRadii","Component","CategoryDropDown","Name","filter","cat","toString","mappedCategories","MapContainer","handleMarkerClick","handleMarkerClose","template","markers","htmlToReactParser","i","EmailText","WebsiteText","position","defaultAnimation","defaultIcon","infoContent","find","index","findIndex","l","ceil","element","getElementById","scrollContainer","getElementsByClassName","minDuration","maxDuration","cancelOnUserAction","height","getMarkers","defaultProps","Map","marker","onMarkerClick","onMarkerClose","opts","defaultOptions","styles","List","handleLocationClick","handlePaginateClick","realPage","lim","slice","width","renderList","Location","distance","Distance","toFixed","daddr","Address","Address2","City","State","PostalCode","cleanAddress","className","onClick","getDistance","DirectionsLink","getDaddr","DirectionsText","Unit","id","getClassName","Title","Website","Phone","Email","Pagination","count","lastPage","getLastPage","range","rangeStart","rangeEnd","min","Array","fill","_","goToPage","numbers","getPageNumbers","num","previousClasses","previousAction","nextClasses","nextAction","fromCharCode","renderPageLinks","PaginationEnd","text","label","classes","Loading","changePage"],"mappings":";;;;;;;;;;;QAOgBA,c,GAAAA,c;;AALhB;;;;AAEA;;;;;;AAGO,SAASA,cAAT,CAAwBC,MAAxB,EAAgC;AACrC,MAAMC,MAAMC,OAAOC,QAAnB;;AAGA,MAAIH,OAAOI,OAAP,KAAmB,EAAvB,EAA2B;AACzB,WAAOJ,OAAOI,OAAd;AACD;;AAED,MAAIJ,OAAOK,MAAP,KAAkB,CAAC,CAAvB,EAA0B;AACxB,WAAOL,OAAOK,MAAd;AACD;;AAED,MAAIL,OAAOM,QAAP,KAAoB,EAAxB,EAA4B;AAC1B,WAAON,OAAOM,QAAd;AACD;;AAED,SAAO;AACLC,UAAM,sBAAWC,eADZ;AAELC,aAAS,gBAAMC,GAAN,CACJT,IAAIU,QADA,UACaV,IAAIW,IADjB,GACwBX,IAAIY,QAD5B,YAEP;AAEEb;AAFF,KAFO;AAFJ,GAAP;AAUD,C;;;;;;;;;;;;;QC/Bec,U,GAAAA,U;QAOAC,W,GAAAA,W;;AAThB;;;;;;AAEO,SAASD,UAAT,CAAoBE,MAApB,EAA4B;AACjC,SAAO;AACLT,UAAM,sBAAWU,YADZ;AAELR,aAASO;AAFJ,GAAP;AAID;;AAEM,SAASD,WAAT,GAAuB;AAC5B,SAAO;AACLR,UAAM,sBAAWW;AADZ,GAAP;AAGD,C;;;;;;;;;;;;;;ACTD,IAAMC,cAAc;AAElBX,mBAAiB,iBAFC;;AAKlBY,qBAAmB,mBALD;AAMlBC,cAAY,YANM;AAOlBC,mBAAiB,iBAPC;;AAUlBC,UAAQ,QAVU;;AAal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K,WAAS,oBAAUhK,MAAV,CAAiBD,UAHF;AAIxBhD,UAAQ,oBAAUoD,IAAV,CAAeJ;AAJC,CAA1B;;kBAOe8J,a;;;;;;;;;;;;;;;;;QCACrK,e,GAAAA,e;;AA5BhB;;;;AACA;;;;AACA;;;;;;;;;;IAGayK,O,WAAAA,O;;;;;;;;;;;6BACF;AAAA,UACC/M,SADD,GACe,KAAKyC,KADpB,CACCzC,SADD;;AAEP,UAAIA,SAAJ,EAAe;AACb,eACE;AAAA;AAAA,YAAK,WAAU,cAAf;AACE;AAAA;AAAA,cAAK,WAAU,iBAAf;AACE,mDAAK,WAAU,SAAf,GADF;AAEE;AAAA;AAAA;AAAA;AAAA;AAFF;AADF,SADF;AAQD;AACD,aACE,uCAAK,WAAU,SAAf,GADF;AAGD;;;;;;AAGH+M,QAAQpK,SAAR,GAAoB;AAClB3C,aAAW,oBAAU4C,IAAV,CAAeC;AADR,CAApB;;AAIO,SAASP,eAAT,CAAyB1C,KAAzB,EAAgC;AACrC,SAAO;AACLI,eAAWJ,MAAMZ,GAAN,CAAUgB;AADhB,GAAP;AAGD;;kBAEc,yBAAQsC,eAAR,EAAyByK,OAAzB,C;;;;;;;;;;;;;QC/BCC,U,GAAAA,U;;AAHhB;;;;;;AAGO,SAASA,UAAT,CAAoBrN,IAApB,EAA0B;AAC/B,SAAO;AACLtD,UAAM,sBAAWiB,WADZ;AAELf,aAASoD;AAFJ,GAAP;AAID,C","file":"client/dist/js/main.js","sourcesContent":["/* global window */\n/* eslint no-param-reassign: [\"error\", { \"props\": false }] */\nimport axios from 'axios';\n\nimport ActionType from 'actions/ActionTypes';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function fetchLocations(params) {\n const loc = window.location;\n\n // removed unused query variables\n if (params.address === '') {\n delete params.address;\n }\n\n if (params.radius === -1) {\n delete params.radius;\n }\n\n if (params.category === '') {\n delete params.category;\n }\n\n return {\n type: ActionType.FETCH_LOCATIONS,\n payload: axios.get(\n `${loc.protocol}//${loc.host}${loc.pathname}/json`,\n {\n // same as \"params: params\"\n params,\n },\n ),\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/locationActions.js","import ActionType from 'actions/ActionTypes';\n\nexport function openMarker(target) {\n return {\n type: ActionType.MARKER_CLICK,\n payload: target,\n };\n}\n\nexport function closeMarker() {\n return {\n type: ActionType.MARKER_CLOSE,\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/mapActions.js","/**\n * List of action types.\n * Could just be strings, but I feel better when referencing a constant that doesn't change without erroring.\n */\nconst ActionTypes = {\n // location fetching\n FETCH_LOCATIONS: 'FETCH_LOCATIONS',\n\n // settings fetching\n FETCH_INFO_WINDOW: 'FETCH_INFO_WINDOW',\n FETCH_LIST: 'FETCH_LIST',\n FETCH_MAP_STYLE: 'FETCH_MAP_STYLE',\n\n // Search action\n SEARCH: 'SEARCH',\n\n // Marker actions\n MARKER_CLICK: 'MARKER_CLICK',\n MARKER_CLOSE: 'MARKER_CLOSE',\n\n PAGE_CHANGE: 'PAGE_CHANGE',\n};\n\n// uses the base FETCH_LOCATIONS to construct resulting actions (can't do this in the actual const)\nActionTypes.FETCH_LOCATIONS_LOADING = `${ActionTypes.FETCH_LOCATIONS}_LOADING`;\nActionTypes.FETCH_LOCATIONS_SUCCESS = `${ActionTypes.FETCH_LOCATIONS}_SUCCESS`;\nActionTypes.FETCH_LOCATIONS_ERROR = `${ActionTypes.FETCH_LOCATIONS}_ERROR`;\n\n// uses the base FETCH_INFO_WINDOW to construct resulting actions (can't do this in the actual const)\nActionTypes.FETCH_INFO_WINDOW_LOADING = `${ActionTypes.FETCH_INFO_WINDOW}_LOADING`;\nActionTypes.FETCH_INFO_WINDOW_SUCCESS = `${ActionTypes.FETCH_INFO_WINDOW}_SUCCESS`;\nActionTypes.FETCH_INFO_WINDOW_ERROR = `${ActionTypes.FETCH_INFO_WINDOW}_ERROR`;\n\n// uses the base FETCH_LIST to construct resulting actions (can't do this in the actual const)\nActionTypes.FETCH_LIST_LOADING = `${ActionTypes.FETCH_LIST}_LOADING`;\nActionTypes.FETCH_LIST_SUCCESS = `${ActionTypes.FETCH_LIST}_SUCCESS`;\nActionTypes.FETCH_LIST_ERROR = `${ActionTypes.FETCH_LIST}_ERROR`;\n\n// uses the base FETCH_MAP_STYLE to construct resulting actions (can't do this in the actual const)\nActionTypes.FETCH_MAP_STYLE_LOADING = `${ActionTypes.FETCH_MAP_STYLE_}_LOADING`;\nActionTypes.FETCH_MAP_STYLE_SUCCESS = `${ActionTypes.FETCH_MAP_STYLE}_SUCCESS`;\nActionTypes.FETCH_MAP_STYLE_ERROR = `${ActionTypes.FETCH_MAP_STYLE}_ERROR`;\n\nexport default ActionTypes;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/ActionTypes.js","/* global window, document */\nimport React from 'react';\nimport ReactDom from 'react-dom';\n\nimport {\n createStore,\n applyMiddleware,\n compose,\n} from 'redux';\nimport { Provider } from 'react-redux';\n\nimport thunk from 'redux-thunk';\nimport promise from 'redux-promise-middleware';\n\nimport reducers from 'reducers';\nimport Locator from 'components/Locator';\n\n// only the first container is used, can change to querySelectorAll() for multiple instances\nconst container = document.querySelector('.locator');\n\n/**\n * Writes deeply nested function transformations without the rightward drift of the code.\n * [redux compose]{@link http://redux.js.org/docs/api/compose.html}\n * @returns {Function}\n */\nfunction composedMiddleware() {\n return compose(\n applyMiddleware(promise({\n // new suffixes\n promiseTypeSuffixes: ['LOADING', 'SUCCESS', 'ERROR'],\n }), thunk),\n // eslint-disable-next-line no-underscore-dangle\n (typeof window.__REDUX_DEVTOOLS_EXTENSION__ !== 'undefined') ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f,\n );\n}\n\n// creates the redux store with reducers and middleware\nconst store = createStore(reducers, composedMiddleware());\n\n// defers rendering until after content is loaded (only needed for settings)\ndocument.addEventListener('DOMContentLoaded', () => {\n // renders the locator\n ReactDom.render(\n \n \n \n , container);\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/boot/index.jsx","import { combineReducers } from 'redux';\n\nimport search from 'reducers/searchReducer';\nimport map from 'reducers/mapReducer';\nimport settings from 'reducers/settingsReducer';\nimport locations from 'reducers/locationReducer';\nimport list from 'reducers/listReducer';\n\n/**\n * Combines the reducers.\n *\n * uses shorthand to set key/values\n * \"search\" is short for \"search: search\"\n *\n * @type {Reducer}\n */\nconst reducers = combineReducers({\n search,\n map,\n settings,\n locations,\n list,\n});\n\nexport default reducers;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/index.js","/* global window */\nimport ActionType from 'actions/ActionTypes';\nimport url from 'url';\n\nconst defaultState = Object.assign({\n address: '',\n radius: -1,\n category: '',\n}, url.parse(window.location.href, true).query);\n\ndelete defaultState.page;\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.SEARCH:\n return {\n ...state,\n address: action.payload.address,\n radius: action.payload.radius,\n category: action.payload.category,\n };\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/searchReducer.js","import ActionType from 'actions/ActionTypes';\n\nconst defaultState = {\n current: -1,\n showCurrent: false,\n isLoading: true,\n // center is invalid, can't be shown on map\n // see the Map component (Map.jsx)\n center: {\n Lat: 91.0,\n Lng: 181.0,\n },\n};\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.MARKER_CLICK:\n return {\n ...state,\n current: action.payload.ID,\n showCurrent: true,\n center: {\n Lat: action.payload.Lat,\n Lng: action.payload.Lng,\n },\n };\n\n case ActionType.MARKER_CLOSE:\n return {\n ...state,\n showCurrent: false,\n center: defaultState.center,\n };\n\n case ActionType.SEARCH:\n return {\n ...state,\n current: -1,\n showCurrent: false,\n };\n\n case ActionType.FETCH_LOCATIONS_LOADING:\n return {\n ...state,\n isLoading: true,\n };\n\n case ActionType.FETCH_LOCATIONS_SUCCESS: {\n const center = action.payload !== undefined && action.payload.data.center !== undefined ?\n action.payload.data.center :\n defaultState.center;\n return {\n ...state,\n isLoading: false,\n center,\n };\n }\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/mapReducer.js","/* global dynamic_locator, ss */\nimport handlebars from 'handlebars';\nimport ActionType from 'actions/ActionTypes';\n\nconst defaultState = {\n loadedSettings: false,\n loadedWindowTemplate: false,\n loadedListTemplate: false,\n loadedMapStyle: false,\n\n infoWindowTemplate: null,\n listTemplate: null,\n mapStyle: null,\n markerImagePath: false,\n\n unit: 'm',\n\n defaultCenter: {\n lat: 0,\n lng: 0,\n },\n autocomplete: false,\n defaultLimit: 20,\n\n // eslint-disable-next-line no-underscore-dangle\n emailText: ss.i18n._t('Locator.EMAIL_TEXT', 'Email'),\n // eslint-disable-next-line no-underscore-dangle\n websiteText: ss.i18n._t('Locator.WEBSITE_TEXT', 'Website'),\n // eslint-disable-next-line no-underscore-dangle\n directionsText: ss.i18n._t('Locator.DIRECTIONS_TEXT', 'Directions'),\n};\n\n// eslint-disable-next-line no-underscore-dangle\ndefaultState.unitText = ss.i18n._t(`Locator.UNIT.${defaultState.unit}`, 'mi');\n\n/**\n * Sets up settings\n * @return {{unit, clusters, limit, radii, categories}}\n */\nfunction settings() {\n return {\n unit: dynamic_locator.unit,\n clusters: dynamic_locator.clusters,\n limit: dynamic_locator.limit,\n radii: dynamic_locator.radii,\n categories: dynamic_locator.categories,\n defaultCenter: {\n lat: dynamic_locator.defaultCenter.lat,\n lng: dynamic_locator.defaultCenter.lng,\n },\n autocomplete: dynamic_locator.autocomplete,\n markerImagePath: dynamic_locator.markerImagePath,\n // defaultLimit: dynamic_locator.defaultLimit,\n };\n}\n\nfunction didSettingsLoad(state = defaultState) {\n const { loadedListTemplate, loadedWindowTemplate, loadedMapStyle } = state;\n return loadedListTemplate === true &&\n loadedWindowTemplate === true &&\n loadedMapStyle === true;\n}\n\n/**\n * The reducer for creating a part in the store for things like radius and categories\n */\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.FETCH_INFO_WINDOW_SUCCESS: {\n const { data } = action.payload;\n const loaded = didSettingsLoad({\n ...state,\n loadedWindowTemplate: true,\n });\n\n return {\n ...state,\n ...settings(),\n loadedSettings: loaded,\n loadedWindowTemplate: true,\n infoWindowTemplate: handlebars.compile(data),\n };\n }\n\n case ActionType.FETCH_LIST_SUCCESS: {\n const { data } = action.payload;\n const loaded = didSettingsLoad({\n ...state,\n loadedListTemplate: true,\n });\n\n return {\n ...state,\n ...settings(),\n loadedSettings: loaded,\n loadedListTemplate: true,\n listTemplate: handlebars.compile(data),\n };\n }\n\n case ActionType.FETCH_MAP_STYLE_SUCCESS: {\n const { data } = action.payload;\n const loaded = didSettingsLoad({\n ...state,\n loadedMapStyle: true,\n });\n\n return {\n ...state,\n ...settings(),\n loadedSettings: loaded,\n loadedMapStyle: true,\n mapStyle: data,\n };\n }\n\n case ActionType.FETCH_MAP_STYLE_ERROR: {\n if (action.payload === ActionType.FETCH_MAP_STYLE_ERROR) {\n const loaded = didSettingsLoad({\n ...state,\n loadedMapStyle: true,\n });\n\n return {\n ...state,\n ...settings(),\n loadedSettings: loaded,\n loadedMapStyle: true,\n };\n }\n }\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/settingsReducer.js","import ActionType from 'actions/ActionTypes';\n\nconst defaultState = {\n locations: [],\n};\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.FETCH_LOCATIONS_SUCCESS:\n return {\n ...state,\n locations: action.payload.data.locations,\n };\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/locationReducer.js","/* global window */\nimport ActionType from 'actions/ActionTypes';\nimport url from 'url';\n\nconst { page } = url.parse(window.location.href, true).query;\nconst defaultState = {\n page: Number.isNaN(Number(page)) ? 1 : Number(page),\n};\n\nexport default function reducer(state = defaultState, action) {\n switch (action.type) {\n case ActionType.PAGE_CHANGE:\n return {\n ...state,\n page: action.payload,\n };\n\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/reducers/listReducer.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { fetchLocations } from 'actions/locationActions';\nimport { fetchInfoWindow, fetchList, fetchMapStyle } from 'actions/settingsActions';\n\nimport Search from 'components/search/SearchBar';\nimport MapContainer from 'components/map/MapContainer';\nimport List from 'components/list/List';\nimport Loading from 'components/Loading';\n\n/**\n * The main locator component.\n */\nexport class Locator extends Component {\n /**\n * Called after the component mounts\n */\n componentDidMount() {\n const { dispatch } = this.props;\n dispatch(fetchInfoWindow());\n dispatch(fetchList());\n dispatch(fetchMapStyle());\n }\n\n /**\n * Should this component update\n * @param nextProps\n * @return {boolean}\n */\n shouldComponentUpdate(nextProps) {\n const { loadedSettings } = this.props;\n return (loadedSettings !== nextProps.loadedSettings);\n }\n\n /**\n * Called after the component updates\n * @param nextProps\n */\n componentDidUpdate(nextProps) {\n const { dispatch, unit, address, radius, category } = nextProps;\n dispatch(fetchLocations({\n unit,\n address,\n radius,\n category,\n }));\n }\n\n /**\n * Renders the component\n * @returns {XML}\n */\n render() {\n const { loadedSettings } = this.props;\n if (loadedSettings === false) {\n return null;\n }\n return (\n
    \n \n \n \n \n
    \n );\n }\n}\n\n/**\n * The prop types of the Locator component\n * @type {{data}}\n */\nLocator.propTypes = {\n loadedSettings: PropTypes.bool.isRequired,\n unit: PropTypes.string.isRequired,\n address: PropTypes.string.isRequired,\n radius: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n ]).isRequired,\n category: PropTypes.string.isRequired,\n dispatch: PropTypes.func.isRequired,\n};\n\n/**\n * Takes variables/functions from the state and assigns them to variables/functions in the components props.\n *\n * @param state\n * @returns {{loadedSettings}}\n */\nexport function mapStateToProps(state) {\n return {\n loadedSettings: state.settings.loadedSettings,\n\n unit: state.settings.unit,\n address: state.search.address,\n radius: state.search.radius,\n category: state.search.category,\n };\n}\n\n/**\n * The default export of the file.\n *\n * The component is connected to the redux state\n *\n * Whenever the state is changed the props change.\n */\nexport default connect(mapStateToProps)(Locator);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/Locator.jsx","/* global window, dynamic_locator */\nimport axios from 'axios';\n\nimport ActionType from 'actions/ActionTypes';\n\nexport function fetchInfoWindow() {\n const loc = window.location;\n const path = dynamic_locator.infoWindowTemplatePath;\n\n return {\n type: ActionType.FETCH_INFO_WINDOW,\n payload: axios.get(`${loc.protocol}//${loc.host}${path}`),\n };\n}\n\nexport function fetchList() {\n const loc = window.location;\n const path = dynamic_locator.listTemplatePath;\n\n return {\n type: ActionType.FETCH_LIST,\n payload: axios.get(`${loc.protocol}//${loc.host}${path}`),\n };\n}\n\nexport function fetchMapStyle() {\n const loc = window.location;\n const path = dynamic_locator.mapStylePath;\n\n // so we don't try to fetch the home page of the site\n if (path === '') {\n return {\n type: ActionType.FETCH_MAP_STYLE_ERROR,\n payload: ActionType.FETCH_MAP_STYLE_ERROR,\n };\n }\n\n return {\n type: ActionType.FETCH_MAP_STYLE,\n payload: axios.get(`${loc.protocol}//${loc.host}/${path}`),\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/settingsActions.js","/* global window, document */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport FontAwesomeIcon from '@fortawesome/react-fontawesome';\nimport { faSearch, faCheckCircle } from '@fortawesome/fontawesome-free-solid';\nimport PlacesAutocomplete from 'react-places-autocomplete';\n\nimport { fetchLocations } from 'actions/locationActions';\nimport { search } from 'actions/searchActions';\nimport { changePage } from 'actions/listActions';\nimport RadiusDropDown from 'components/search/RadiusDropDown';\nimport CategoryDropDown from 'components/search/CategoryDropDown';\n\nexport class SearchBar extends Component {\n /**\n * Turns a javascript object into url params.\n * Skips keys without values\n *\n * @param obj\n * @return {string}\n */\n static objToUrl(obj) {\n let vars = '';\n\n Object.keys(obj).forEach((key) => {\n const value = obj[key];\n\n // don't add it if its blank\n if (value !== undefined && value !== null && value !== '') {\n vars += `${key}=${value}&`;\n }\n });\n\n // replaces trailing spaces and '&' symbols then replaces spaces with +\n return vars.replace(/([&\\s]+$)/g, '').replace(/(\\s)/g, '+');\n }\n\n static getDropdownValue(name) {\n if (document.getElementsByName(name)[0] !== undefined) {\n return document.getElementsByName(name)[0].value;\n }\n return '';\n }\n\n /**\n * Used to create the SearchBar.\n * needed to allow use of this keyword in handler.\n * @param props\n */\n constructor(props) {\n super(props);\n\n this.state = {\n showFilter: false,\n };\n this.searchAddress = props.address;\n\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleFilter = this.handleFilter.bind(this);\n this.handleAddressChange = this.handleAddressChange.bind(this);\n }\n\n\n /**\n * 'Submits' form. Really just fires state change and changes the url.\n */\n handleSubmit(event) {\n if (typeof event === 'string' || event instanceof String) {\n this.searchAddress = event;\n document.getElementsByName('address')[0].value = event;\n } else {\n // stops the submit from reloading\n event.preventDefault();\n }\n\n const address = document.getElementsByName('address')[0].value;\n const radius = SearchBar.getDropdownValue('radius');\n const category = SearchBar.getDropdownValue('category');\n\n const params = {\n address,\n radius,\n category,\n };\n\n // selects dispatch and unit from this.props.\n // const dispatch = this.props.dispatch; const unit = this.props.unit;\n const { dispatch, unit } = this.props;\n\n // dispatches search (updates search values)\n dispatch(search({\n address,\n radius,\n category,\n }));\n\n // dispatches fetch locations (gets the locations)\n dispatch(fetchLocations({\n ...params,\n unit,\n }));\n\n dispatch(changePage(1));\n\n // changes the url for the window and adds it to the browser history(no redirect)\n const loc = window.location;\n const newurl = `${loc.protocol}//${loc.host}${loc.pathname}?${SearchBar.objToUrl(params)}`;\n window.history.pushState({\n path: newurl,\n }, '', newurl);\n }\n\n handleFilter(event) {\n this.setState({\n showFilter: !this.state.showFilter,\n });\n }\n\n handleAddressChange(searchAddress) {\n this.searchAddress = searchAddress;\n }\n\n /**\n * Gets the address input.\n * @return {*}\n */\n getAddressInput() {\n const {address, radii, center, autocomplete} = this.props;\n if (autocomplete === true) {\n const inputProps = {\n value: this.searchAddress,\n onChange: this.handleAddressChange,\n placeholder: ss.i18n._t('Locator.ADDRESS_FIELD', 'Address or zip code'),\n name: 'address',\n };\n const cssClasses = {\n root: 'form-control autocomplete-root',\n input: 'form-control',\n };\n const options = {\n location: new google.maps.LatLng(center.lat, center.lng),\n radius: Math.max(...radii),\n };\n return ();\n }\n return ();\n }\n\n /**\n * Renders the component.\n * @returns {XML}\n */\n render() {\n const {\n address, category, radii, categories, unit, autocomplete\n } = this.props;\n let { radius } = this.props;\n if (typeof radius === 'string') {\n radius = Number(radius);\n }\n\n const hasFilter = category !== '' || !(radius === '' || radius < 1);\n\n const filterIndicatorClass = hasFilter ? 'filter-icon' : 'filter-icon no-show';\n const filterClasses = this.state.showFilter ? 'filter open' : 'filter closed';\n\n return (\n
    \n {/* not a fieldset because no flexbox */}\n
    \n
    \n
    \n \n {this.getAddressInput()}\n \n \n \n {ss.i18n._t('Locator.SEARCH_BUTTON', 'Search')}\n \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n );\n }\n}\n\nSearchBar.propTypes = {\n address: PropTypes.string.isRequired,\n radius: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n ]).isRequired,\n category: PropTypes.string.isRequired,\n\n // eslint-disable-next-line react/forbid-prop-types\n radii: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n categories: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n unit: PropTypes.string.isRequired,\n autocomplete: PropTypes.bool.isRequired,\n center: PropTypes.shape({\n lat: PropTypes.number.isRequired,\n lng: PropTypes.number.isRequired,\n }).isRequired,\n dispatch: PropTypes.func.isRequired,\n};\n\n/**\n * Takes variables/functions from the state and assigns them to variables/functions in the components props.\n *\n * @param state\n * @returns {{address, radius}}\n */\nexport function mapStateToProps(state) {\n return {\n // the defaults - for when it gets loaded from the url\n address: state.search.address,\n radius: state.search.radius,\n category: state.search.category,\n\n // the options\n radii: state.settings.radii,\n categories: state.settings.categories,\n\n // other\n unit: state.settings.unit,\n autocomplete: state.settings.autocomplete,\n center: state.settings.defaultCenter,\n };\n}\n\nexport default connect(mapStateToProps)(SearchBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/search/SearchBar.jsx","import ActionType from 'actions/ActionTypes';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function search(inputs = {}) {\n return {\n type: ActionType.SEARCH,\n payload: inputs,\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/searchActions.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass RadiusDropDown extends React.Component {\n /**\n * Maps the radii into options for the drop down.\n * @returns {Array}\n */\n mappedRadii() {\n const { radii, unit } = this.props;\n\n return Object.keys(radii).map(key => (\n \n {radii[key]} {unit}\n \n ));\n }\n\n /**\n * Gets the default value for the dropdown\n * @return {*}\n */\n defaultValue() {\n const { radius, radii } = this.props;\n\n // if the radius exists in the dropdown\n const values = Object.keys(radii).map(key => radii[key]);\n if (values.indexOf(radius) > -1) {\n return radius;\n }\n return '';\n }\n\n /**\n * Outputs the radius drop down.\n * @returns {*}\n */\n render() {\n const { radii } = this.props;\n if (radii !== undefined && Object.keys(radii).length !== 0) {\n return (\n
    \n \n \n \n {this.mappedRadii()}\n \n
    \n );\n }\n return null;\n }\n}\n\nRadiusDropDown.propTypes = {\n radius: PropTypes.number.isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n radii: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n unit: PropTypes.string.isRequired,\n};\n\nexport default RadiusDropDown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/search/RadiusDropDown.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass CategoryDropDown extends Component {\n /**\n * Maps the radii into options for the drop down.\n * @returns {Array}\n */\n mappedCategories() {\n const { categories } = this.props;\n\n return categories.map(category => (\n \n {category.Name}\n \n ));\n }\n\n /**\n * Gets the default value for the dropdown\n * @return {*}\n */\n defaultValue() {\n const { category, categories } = this.props;\n // if the category exists in the dropdown\n if (categories.filter(\n cat => cat.ID === Number(category),\n ).length) {\n return category.toString();\n }\n return '';\n }\n\n /**\n * Outputs the radius drop down.\n * @returns {*}\n */\n render() {\n const { categories } = this.props;\n if (categories !== undefined && Object.keys(categories).length !== 0) {\n return (\n
    \n \n \n \n {this.mappedCategories()}\n \n
    \n );\n }\n return null;\n }\n}\n\nCategoryDropDown.propTypes = {\n category: PropTypes.string.isRequired,\n // eslint-disable-next-line react/forbid-prop-types\n categories: PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.array,\n ]).isRequired,\n};\n\nexport default CategoryDropDown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/search/CategoryDropDown.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Parser as HtmlToReactParser } from 'html-to-react';\nimport scrollToElement from 'animated-scroll-to';\n\nimport { openMarker, closeMarker } from 'actions/mapActions';\nimport { changePage } from 'actions/listActions';\nimport Map from 'components/map/Map';\n\n/**\n * The MapArea component.\n * Renders the map.\n */\nexport class MapContainer extends Component {\n /**\n * Used to create the Map.\n * needed to allow use of this keyword in handler.\n * @param props\n */\n constructor(props) {\n super(props);\n this.handleMarkerClick = this.handleMarkerClick.bind(this);\n this.handleMarkerClose = this.handleMarkerClose.bind(this);\n }\n\n /**\n * Generates an array of marker objects to use on the map\n */\n getMarkers() {\n const { locations, template, emailText, websiteText, markerImagePath } = this.props;\n const markers = [];\n\n const htmlToReactParser = new HtmlToReactParser();\n\n let i;\n // eslint-disable-next-line no-plusplus\n for (i = 0; i < locations.length; i++) {\n const location = locations[i];\n const { Lat, Lng } = location;\n const loc = {\n ...location,\n EmailText: emailText,\n WebsiteText: websiteText,\n }\n markers[markers.length] = {\n position: {\n lat: Number(Lat),\n lng: Number(Lng),\n },\n key: location.ID,\n defaultAnimation: 2,\n defaultIcon: markerImagePath,\n infoContent: (\n
    \n {htmlToReactParser.parse(template(loc))}\n
    \n ),\n };\n }\n return markers;\n }\n\n /**\n * Fires and event for clicking a marker\n * @param target The marker that was clicked\n */\n handleMarkerClick(target) {\n const { dispatch, locations, defaultLimit } = this.props;\n const location = locations.find(loc => loc.ID === target.key);\n dispatch(openMarker(location));\n\n // change the page\n const index = locations.findIndex(l => l.ID === target.key) + 1;\n const page = Math.ceil(index / defaultLimit);\n\n dispatch(changePage(page));\n\n // scroll to location in list\n const element = document.getElementById(`loc-${target.key}`);\n if (element !== null) {\n const scrollContainer = document.getElementsByClassName('loc-list-inner')[0];\n scrollToElement(element, {\n element: scrollContainer,\n minDuration: 500,\n maxDuration: 750,\n cancelOnUserAction: false,\n });\n }\n }\n\n /**\n * Fires event for closing a marker info box\n * @param target The marker that had its info box closed\n */\n handleMarkerClose() {\n const { dispatch } = this.props;\n dispatch(closeMarker());\n }\n\n render() {\n const { current, showCurrent, clusters, center, defaultCenter, mapStyle } = this.props;\n return (\n
    \n \n }\n mapElement={\n
    \n }\n mapStyle={mapStyle}\n markers={this.getMarkers()}\n onMarkerClick={this.handleMarkerClick}\n onMarkerClose={this.handleMarkerClose}\n current={current}\n showCurrent={showCurrent}\n clusters={clusters}\n center={center}\n defaultCenter={defaultCenter}\n />\n
    \n );\n }\n}\n\n/**\n * Defines the prop types\n * @type {{locations: shim, dispatch: *, current: *, showCurrent: *, clusters: *, template: *, mapStyle: shim, center: (shim|*), defaultCenter: (shim|*)}}\n */\nMapContainer.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n locations: PropTypes.array,\n dispatch: PropTypes.func.isRequired,\n current: PropTypes.number.isRequired,\n showCurrent: PropTypes.bool.isRequired,\n clusters: PropTypes.bool.isRequired,\n template: PropTypes.func.isRequired,\n mapStyle: PropTypes.oneOfType([\n () => {return null;},\n PropTypes.object,\n ]),\n markerImagePath: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n ]).isRequired,\n center: PropTypes.shape({\n Lat: PropTypes.number.isRequired,\n Lng: PropTypes.number.isRequired,\n }).isRequired,\n defaultCenter: PropTypes.shape({\n lat: PropTypes.number.isRequired,\n lng: PropTypes.number.isRequired,\n }).isRequired,\n};\n\n/**\n * Defines the default values of the props\n * @type {{locations: Array, mapStyle: null}}\n */\nMapContainer.defaultProps = {\n locations: [],\n mapStyle: null,\n};\n\n/**\n * Maps that state to props\n * @param state\n * @returns {{current}}\n */\nexport function mapStateToProps(state) {\n return {\n current: state.map.current,\n showCurrent: state.map.showCurrent,\n clusters: state.settings.clusters,\n template: state.settings.infoWindowTemplate,\n mapStyle: state.settings.mapStyle,\n markerImagePath: state.settings.markerImagePath,\n locations: state.locations.locations,\n center: state.map.center,\n defaultCenter: state.settings.defaultCenter,\n\n defaultLimit: state.settings.defaultLimit,\n emailText: state.settings.emailText,\n websiteText: state.settings.websiteText,\n };\n}\n\nexport default connect(mapStateToProps)(MapContainer);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/map/MapContainer.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withGoogleMap, GoogleMap, Marker, InfoWindow } from 'react-google-maps';\nimport MarkerClusterer from 'react-google-maps/lib/components/addons/MarkerClusterer';\n\n/**\n * Renders every marker\n *\n * @param props\n * @return {Array}\n */\nexport function markers(props) {\n return props.markers.map(marker => (\n props.onMarkerClick(marker)}\n >\n {props.current === marker.key && props.showCurrent && (\n props.onMarkerClose()}>\n
    {marker.infoContent}
    \n
    \n )}\n \n ));\n}\n\n/**\n * Renders the map, with all the markers\n *\n * @param props\n * @return {XML}\n * @constructor\n */\nexport function Map(props) {\n // we don't want a center if it is invalid\n const opts = {};\n if (props.center.Lat !== 91 && props.center.Lng !== 181) {\n opts.center = {\n lat: props.center.Lat,\n lng: props.center.Lng,\n }\n }\n\n const defaultOptions = {};\n if (props.mapStyle !== null) {\n defaultOptions.styles = props.mapStyle;\n }\n\n return (\n \n {props.clusters === true ? \n {markers(props)}\n :\n markers(props)}\n \n );\n}\n\n/**\n *\n * @type {{clusters: *, mapStyle: shim, center: (shim|*), defaultCenter: (shim|*)}}\n */\nMap.propTypes = {\n clusters: PropTypes.bool.isRequired,\n mapStyle: PropTypes.oneOfType([\n () => {return null;},\n PropTypes.object\n ]),\n center: PropTypes.shape({\n Lat: PropTypes.number.isRequired,\n Lng: PropTypes.number.isRequired,\n }).isRequired,\n defaultCenter: PropTypes.shape({\n lat: PropTypes.number.isRequired,\n lng: PropTypes.number.isRequired,\n }).isRequired,\n};\n\n/**\n * Defines the default values of the props\n * @type {{mapStyle: null}}\n */\nMap.defaultProps = {\n mapStyle: null,\n};\n\nexport default withGoogleMap(Map);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/map/Map.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { AutoSizer } from 'react-virtualized';\nimport scrollToElement from 'animated-scroll-to';\n\nimport { openMarker } from 'actions/mapActions';\nimport { changePage } from 'actions/listActions';\nimport Location from 'components/list/Location';\nimport Pagination from 'components/list/Pagination';\n\n/**\n * The List component.\n * Renders the location list.\n */\nexport class List extends Component {\n /**\n * Used to create the Map.\n * needed to allow use of this keyword in handler.\n * @param props\n */\n constructor(props) {\n super(props);\n // bind actions/handlers\n this.handleLocationClick = this.handleLocationClick.bind(this);\n this.handlePaginateClick = this.handlePaginateClick.bind(this);\n }\n\n /**\n * Handles a list item click\n * @param target\n */\n handleLocationClick(target) {\n const { dispatch, locations } = this.props;\n const location = locations.find(loc => loc.ID === target);\n dispatch(openMarker(location));\n\n // scroll to location in list\n const element = document.getElementById(`loc-${target}`);\n if (element !== null) {\n const scrollContainer = document.getElementsByClassName('loc-list-inner')[0];\n scrollToElement(element, {\n element: scrollContainer,\n minDuration: 500,\n maxDuration: 750,\n cancelOnUserAction: false,\n });\n }\n }\n\n /**\n * Handles a pagination item click\n * @param page\n */\n handlePaginateClick(page) {\n const { dispatch } = this.props;\n dispatch(changePage(page));\n }\n\n /**\n * Renders the list\n */\n renderList() {\n const {\n page,\n defaultLimit,\n locations,\n current,\n search,\n unit,\n unitText,\n emailText,\n websiteText,\n directionsText,\n template\n } = this.props;\n const realPage = page - 1 ? page - 1 : 0;\n // in case we want to implement a flexible limit\n const lim = defaultLimit;\n\n return locations.slice(realPage * lim, page * lim).map((location, index) => {\n return 0}\n unit={unitText}\n websiteText={websiteText}\n directionsText={directionsText}\n emailText={emailText}\n onClick={this.handleLocationClick}\n template={template}\n />\n });\n }\n\n /**\n * Renders the component\n * @returns {XML}\n */\n render() {\n const { locations, current, page, defaultLimit } = this.props;\n return (\n
    \n
    \n \n {({ width, height }) =>\n
    \n {this.renderList()}\n
    \n }\n
    \n
    \n
    \n \n
    \n
    \n );\n }\n}\n\n/**\n * Defines the prop types\n * @type {{locations: *}}\n */\nList.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n locations: PropTypes.array,\n current: PropTypes.number,\n search: PropTypes.string,\n unit: PropTypes.string.isRequired,\n dispatch: PropTypes.func.isRequired,\n template: PropTypes.func.isRequired,\n defaultLimit: PropTypes.number.isRequired,\n page: PropTypes.number.isRequired,\n unitText: PropTypes.string.isRequired,\n directionsText: PropTypes.string.isRequired,\n emailText: PropTypes.string.isRequired,\n websiteText: PropTypes.string.isRequired,\n};\n\n/**\n * Defines the default values of the props\n * @type {{locations: {edges: Array}}}\n */\nList.defaultProps = {\n locations: [],\n current: -1,\n search: '',\n};\n\n/**\n * Maps that state to props\n * @param state\n * @returns {{current}}\n */\nexport function mapStateToProps(state) {\n return {\n current: state.map.current,\n search: state.search.address,\n unit: state.settings.unit,\n unitText: state.settings.unitText,\n directionsText: state.settings.directionsText,\n emailText: state.settings.emailText,\n websiteText: state.settings.websiteText,\n template: state.settings.listTemplate,\n locations: state.locations.locations,\n defaultLimit: state.settings.defaultLimit,\n page: state.list.page,\n };\n}\n\n\n/**\n * export the Map Component\n */\nexport default connect(mapStateToProps)(List);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/List.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Parser as HtmlToReactParser } from 'html-to-react';\n\n/**\n * The Location component.\n * Used in the location list.\n */\nclass Location extends Component {\n /**\n * Replaces any trailing '+' and whitespace and any spaces left with '+'\n *\n * @param address\n * @returns String\n */\n static cleanAddress(address) {\n if (address) {\n if (typeof address === 'string') {\n return address.replace(/([+\\s]+$)/g, '').replace(/(\\s)/g, '+');\n }\n }\n return '';\n }\n\n /**\n * Rounds the distance\n *\n * @return Boolean | String\n */\n getDistance() {\n const { location } = this.props;\n const distance = location.Distance;\n\n if (distance === -1) {\n return false;\n }\n\n return distance.toFixed(2);\n }\n\n /**\n * Gets the daddr string for google maps directions\n * @returns {string}\n */\n getDaddr() {\n const { location } = this.props;\n let daddr = '';\n\n if (location.Address) {\n daddr += `${location.Address}+`;\n }\n\n if (location.Address2) {\n daddr += `${location.Address2}+`;\n }\n\n if (location.City) {\n daddr += `${location.City}+`;\n }\n\n if (location.State) {\n daddr += `${location.State}+`;\n }\n\n if (location.PostalCode) {\n daddr += location.PostalCode;\n }\n\n return Location.cleanAddress(daddr);\n }\n\n /**\n * Gets the class for the rendered component\n * @return {string}\n */\n getClassName() {\n const {\n index, current,\n } = this.props;\n let className = 'list-location';\n // if it should be focused\n if (current) {\n className += ' focus';\n }\n // if it is even (needed because the list acts odd with :nth-child)\n if (index % 2 === 0) {\n className += ' even';\n }\n // if it is first (needed because the list acts odd with :nth-child)\n if (index === 0) {\n className += ' first';\n }\n return className;\n }\n\n /**\n * renders the component\n * @returns {XML}\n */\n render() {\n const {\n location, index, search, template, unit, directionsText, emailText, websiteText, onClick,\n } = this.props;\n const htmlToReactParser = new HtmlToReactParser();\n\n const loc = {\n ...location,\n Distance: this.getDistance(),\n DirectionsLink: `http://maps.google.com/maps?saddr=${Location.cleanAddress(search)}&daddr=${this.getDaddr()}`,\n DirectionsText: directionsText,\n EmailText: emailText,\n WebsiteText: websiteText,\n Unit: unit,\n Number: index + 1,\n };\n\n const id = `loc-${location.ID}`;\n const className = this.getClassName();\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events\n onClick(location.ID)}\n role=\"listitem\"\n >\n {htmlToReactParser.parse(template(loc))}\n
    \n );\n }\n}\n\n/**\n * defines the prop types\n * @type {{location, index: *}}\n */\nLocation.propTypes = {\n location: PropTypes.shape({\n Title: PropTypes.string,\n Address: PropTypes.string,\n Address2: PropTypes.string,\n City: PropTypes.string,\n State: PropTypes.string,\n PostalCode: PropTypes.string,\n Website: PropTypes.string,\n Phone: PropTypes.string,\n Email: PropTypes.string,\n Distance: PropTypes.number,\n }).isRequired,\n index: PropTypes.number.isRequired,\n current: PropTypes.bool.isRequired,\n search: PropTypes.bool.isRequired,\n unit: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n template: PropTypes.func.isRequired,\n};\n\n/**\n * Exports the Location components\n */\nexport default Location;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/Location.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport PaginationEnd from 'components/list/PaginationEnd';\n\n/**\n * The Pagination component.\n * Renders the pagination for the location list.\n */\nclass Pagination extends Component {\n /**\n * Gets the last possible page. If there are 13 items with a page limit of 5 there will be 3 pages.\n * @return {number}\n */\n getLastPage() {\n const { count, defaultLimit } = this.props;\n const lim = defaultLimit;\n\n return Math.ceil(count / defaultLimit);\n }\n\n /**\n * Gets all the page numbers that should be shown\n * @return {number[]}\n */\n getPageNumbers() {\n const { page } = this.props;\n const lastPage = this.getLastPage();\n const range = 2;\n\n let rangeStart = page - range;\n let rangeEnd = page + range;\n\n if (rangeEnd > lastPage) {\n rangeEnd = lastPage;\n rangeStart = lastPage - range * 2;\n rangeStart = rangeStart < 1 ? 1 : rangeStart;\n }\n\n if (rangeStart <= 1) {\n rangeStart = 1;\n rangeEnd = Math.min(range * 2 + 1, lastPage);\n }\n\n // from https://stackoverflow.com/a/33457557\n return Array(rangeEnd - rangeStart + 1).fill().map((_, index) => rangeStart + index);\n }\n\n /**\n * Renders the page links\n */\n renderPageLinks() {\n const { page, goToPage } = this.props;\n const numbers = this.getPageNumbers();\n\n return numbers.map((num) => {\n if (page === num) {\n return (\n
  • \n \n {num}\n ({ss.i18n._t('Locator.CURRENT', 'Current')})\n \n
  • \n );\n } else {\n return (\n
  • goToPage(num)}>\n {num}\n
  • \n );\n }\n });\n }\n\n /**\n * Renders the Pagination component\n * @return {*}\n */\n render() {\n const { count, page, goToPage } = this.props;\n const previousClasses = page <= 1 ? \"page-item disabled\" : \"page-item\";\n const previousAction = page <= 1 ? () => {} : () => goToPage(page - 1);\n\n const nextClasses = page >= this.getLastPage() ? \"page-item disabled\" : \"page-item\";\n const nextAction = page >= this.getLastPage() ? () => {} : () => goToPage(page + 1);\n\n\n if (this.getPageNumbers().length > 1) {\n return (\n
      \n \n {this.renderPageLinks()}\n \n
    \n );\n }\n return null;\n }\n}\n\nPagination.propTypes = {\n page: PropTypes.number.isRequired,\n count: PropTypes.number.isRequired,\n defaultLimit: PropTypes.number.isRequired,\n goToPage: PropTypes.func.isRequired,\n};\n\nexport default Pagination;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/Pagination.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * The Pagination component.\n * Renders the pagination for the location list.\n */\nclass PaginationEnd extends Component {\n render() {\n const { text, label, classes, action } = this.props;\n return (\n
  • \n \n {text}\n {label}\n \n
  • \n );\n }\n}\n\nPaginationEnd.propTypes = {\n text: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n classes: PropTypes.string.isRequired,\n action: PropTypes.func.isRequired,\n}\n\nexport default PaginationEnd;\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/list/PaginationEnd.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\n// exported for tests\nexport class Loading extends Component {\n render() {\n const { isLoading } = this.props;\n if (isLoading) {\n return (\n
    \n
    \n
    \n Loading\n
    \n
    \n );\n }\n return (\n
    \n );\n }\n}\n\nLoading.propTypes = {\n isLoading: PropTypes.bool.isRequired,\n};\n\nexport function mapStateToProps(state) {\n return {\n isLoading: state.map.isLoading,\n };\n}\n\nexport default connect(mapStateToProps)(Loading);\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/components/Loading.jsx","import ActionType from 'actions/ActionTypes';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function changePage(page) {\n return {\n type: ActionType.PAGE_CHANGE,\n payload: page,\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/js/actions/listActions.js"],"sourceRoot":""} \ No newline at end of file diff --git a/client/dist/js/map.js b/client/dist/js/map.js index e4db669..6bbe722 100644 --- a/client/dist/js/map.js +++ b/client/dist/js/map.js @@ -1 +1 @@ -webpackJsonp([1],{706:function(n,c){}},[706]); \ No newline at end of file +webpackJsonp([1],{704:function(n,c){}},[704]); \ No newline at end of file diff --git a/client/dist/js/map.js.map b/client/dist/js/map.js.map index 45b8e67..0e5fd04 100644 --- a/client/dist/js/map.js.map +++ b/client/dist/js/map.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./client/src/scss/main.scss?b7b9"],"names":[],"mappings":";;;;;AAAA,yC","file":"client/dist/js/map.js","sourcesContent":["// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/src/scss/main.scss\n// module id = 712\n// module chunks = 1"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./client/src/scss/main.scss?b7b9"],"names":[],"mappings":";;;;;AAAA,yC","file":"client/dist/js/map.js","sourcesContent":["// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/src/scss/main.scss\n// module id = 710\n// module chunks = 1"],"sourceRoot":""} \ No newline at end of file diff --git a/client/dist/js/vendor.js b/client/dist/js/vendor.js index d013a7f..3698392 100644 --- a/client/dist/js/vendor.js +++ b/client/dist/js/vendor.js @@ -1,14 +1,14 @@ -!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,i,a){for(var c,s,l,u=0,f=[];u=t?e.call():i.id=Object(r.b)(o)},i={id:Object(r.b)(o)};return i}},function(e,t,n){},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){function n(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}e.exports=n},function(e,t,n){var r=n(102);e.exports=function(e){return Object(r(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(116),o=n(456),i=n(121),a=n(77),c=r(function(e,t,n){var r=1;if(n.length){var s=a(n,i(c));r|=32}return o(e,r,t,n,s)});c.placeholder={},e.exports=c},function(e,t,n){function r(e){if(!i(e))return!1;var t=o(e);return t==c||t==s||t==a||t==l}var o=n(60),i=n(38),a="[object AsyncFunction]",c="[object Function]",s="[object GeneratorFunction]",l="[object Proxy]";e.exports=r},function(e,t,n){var r=n(18),o=r.Symbol;e.exports=o},function(e,t,n){function r(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=o(e.prototype),r=e.apply(n,t);return i(r)?r:n}}var o=n(118),i=n(38);e.exports=r},function(e,t){function n(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&e=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){c.headers[e]={}}),o.forEach(["post","put","patch"],function(e){c.headers[e]=o.merge(a)}),e.exports=c}).call(t,n(329))},,function(e,t,n){function r(e,t,n){return function(){if(0===arguments.length)return n();var r=Array.prototype.slice.call(arguments,0),a=r.pop();if(!o(a)){for(var c=0;c0?r:n)(e)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(47),o=n(421),i=n(111),a=n(103)("IE_PROTO"),c=function(){},s=function(){var e,t=n(185)("iframe"),r=i.length;for(t.style.display="none",n(424).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("