IMPROVEMENT: Map API loaded event

This commit is contained in:
Tony Air 2020-01-29 17:26:07 +07:00
parent 86d16e003a
commit 8e55640a12
11 changed files with 126 additions and 100 deletions

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/app.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/SilverShop.Page.CheckoutPageController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),r=o("./src/js/_events.js"),a=o.n(r),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js")),l=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();!function(e){var t="jsMapAPI",o=t,n=e("body"),i=s.a.MAP_DRIVER,r=window,c=function(){function s(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var l=new i;this.$el=e(r);var c=this.$el,u=c.data();u.center=[u.lng?u.lng:n.data("default-lng"),u.lat?u.lat:n.data("default-lat")],u["font-family"]=n.css("font-family"),console.log(t+": initializing "+l.getName()+"..."),this.map=l.init(c,u),c.on(a.a.MAPLOADED,(function(e){u.geojson?(console.log(t+": setting up geocode data"),l.addGeoJson(u)):u.address?(console.log(u.address),console.log(t+": setting up address marker"),l.geocode(u.address,(function(e){console.log(e)}))):u.lat&&u.lng&&(console.log(t+": setting up single lat/lng marker"),u.icon||(u.icon='<i class="fas fa-map-marker-alt"></i>'),l.addMarker([u.lng,u.lat],u)),console.log(t+": Map is loaded")})),c.data(o,this),c.addClass(t+"-active")}return l(s,[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],o),this.$el.removeClass(t+"-active")}}],[{key:"_jQueryInterface",value:function(){if(void 0!==r.localStorage)return this.each((function(){var t=e(this),n=t.data(o);n||(n=new s(this),t.data(o,n))}))}}]),s}();e.fn[t]=c._jQueryInterface,e.fn[t].Constructor=c,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,c._jQueryInterface},e(r).on(a.a.AJAX+" "+a.a.LOADED,(function(){e(".mapAPI-map-container").jsMapAPI()}))}(i.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),r=o("./src/js/_events.js"),a=o.n(r),s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var l={init:function(){return function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=o;return n.setMap(e.map),n.position=e.position,n.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',n.divClass=e.divClass,n.align=e.align,n.isDebugMode=e.debug,n.onClick=e.onClick,n.onMouseOver=e.onMouseOver,n.isBoolean=function(e){return"boolean"==typeof e},n.isNotUndefined=function(e){return void 0!==e},n.hasContent=function(e){return e.length>0},n.isString=function(e){return"string"==typeof e},n.isFunction=function(e){return"function"==typeof e},o}return function(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)}(t,google.maps.OverlayView),s(t,[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),o={y:void 0,x:void 0};switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth;break;case"left center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth;break;case"left bottom":o.y=0,o.x=e.div.offsetWidth;break;case"center top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth/2;break;case"center center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2;break;case"center bottom":o.y=0,o.x=e.div.offsetWidth/2;break;case"right top":o.y=e.div.offsetHeight,o.x=0;break;case"right center":o.y=e.div.offsetHeight/2,o.x=0;break;case"right bottom":o.y=0,o.x=0;break;default:o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2}e.div.style.top=t.y-o.y+"px",e.div.style.left=t.x-o.x+"px"}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}]),t}()}},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var u,p={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:(u=i.a,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return c(e,[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this,n=window;o.$el=e,o.config=t,o.markers=[],n["init"+o.getName()]=function(){o.googleApiLoaded()},u("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='+t.key+"&callback=init"+o.getName()+'"><\/script>')}},{key:"googleApiLoaded",value:function(){var e=this,t=e.$el,o=e.config,n=t.find(".mapAPI-map"),i=o.mapZoom?o.mapZoom:10,r=o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},s=o.style?o.style:null;console.log(e.getName()+": API is loaded"),e.MarkerUI=l.init(u),e.map=new google.maps.Map(n[0],{zoom:i,center:r,fullscreenControl:!0,styles:s}),e.default_zoom=i,n.addClass("mapboxgl-map"),e.popup=new e.MarkerUI({map:e.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">×</div><div class="html"></div></div>'}),e.geocoder=new google.maps.Geocoder,t.trigger(a.a.MAPLOADED)}},{key:"addMarker",value:function(e,t){var o=this,n={lat:e[1],lng:e[0]},i=new o.MarkerUI({position:n,map:o.map,html:'<div class="mapboxgl-marker"><div id="Marker'+t.id+'" data-id="'+t.id+'" class="marker">'+t.icon+"</div></div>",onClick:function(){var e=u("#Marker"+t.id);o.showPopup(n,t.content),e.trigger(a.a.MAPMARKERCLICK)}});return o.markers.push(i),i}},{key:"showPopup",value:function(e,t){var o=this,n=u(o.popup.getDiv());o.config.flyToMarker&&(o.map.setCenter(e),o.map.setZoom(18)),n.css({opacity:"0"}),n.removeClass("d-none"),o.popup.setPosition(e,["center","top"]),n.find(".mapboxgl-popup-content .html").html(t),n.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),o.hidePopup()})),n.css({"margin-left":"1rem",opacity:"1"})}},{key:"hidePopup",value:function(){u(this.popup.getDiv()).addClass("d-none"),this.restoreBounds(),this.$el.trigger(a.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Geocode was not successful for the following reason: "+n)}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Reverse Geocoding was not successful for the following reason: "+n)}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var i=n.id,r=n.geometry.coordinates,a=n.properties.content;t.addMarker(r,{id:i,content:a,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:r[1],lng:r[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}]),e}())};t.a=p},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",LOADED:"load",MAPLOADED:"map-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/SilverShop.Page.CheckoutPageController.js":function(e,t,o){"use strict";o.r(t);o("./src/js/_components/_ui.map.api.js")},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/SilverShop.Page.CheckoutPageController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),r=o("./src/js/_events.js"),a=o.n(r),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js")),l=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();!function(e){var t="jsMapAPI",o=t,n=e("body"),i=s.a.MAP_DRIVER,r=window,c=function(){function s(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var l=this,c=new i;l.$el=e(r);var u=l.$el,p=u.data();p.center=[p.lng?p.lng:n.data("default-lng"),p.lat?p.lat:n.data("default-lat")],p["font-family"]=n.css("font-family"),console.log(t+": initializing "+c.getName()+"..."),c.init(u,p),l.drv=c,u.on(a.a.MAPAPILOADED,(function(e){l.map=c.getMap(),p.geojson?(console.log(t+": setting up geocode data"),c.addGeoJson(p)):p.address?(console.log(p.address),console.log(t+": setting up address marker"),c.geocode(p.address,(function(e){console.log(e)}))):p.lat&&p.lng&&(console.log(t+": setting up single lat/lng marker"),p.icon||(p.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([p.lng,p.lat],p)),console.log(t+": Map is loaded")})),u.data(o,l),u.addClass(t+"-active"),u.trigger(a.a.MAPLOADED)}return l(s,[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],o),this.$el.removeClass(t+"-active")}}],[{key:"_jQueryInterface",value:function(){if(void 0!==r.localStorage)return this.each((function(){var t=e(this),n=t.data(o);n||(n=new s(this),t.data(o,n))}))}}]),s}();e.fn[t]=c._jQueryInterface,e.fn[t].Constructor=c,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,c._jQueryInterface},e(r).on(a.a.AJAX+" "+a.a.LOADED,(function(){e(".mapAPI-map-container").jsMapAPI()}))}(i.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),r=o("./src/js/_events.js"),a=o.n(r),s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var l={init:function(){return function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=o;return n.setMap(e.map),n.position=e.position,n.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',n.divClass=e.divClass,n.align=e.align,n.isDebugMode=e.debug,n.onClick=e.onClick,n.onMouseOver=e.onMouseOver,n.isBoolean=function(e){return"boolean"==typeof e},n.isNotUndefined=function(e){return void 0!==e},n.hasContent=function(e){return e.length>0},n.isString=function(e){return"string"==typeof e},n.isFunction=function(e){return"function"==typeof e},o}return function(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)}(t,google.maps.OverlayView),s(t,[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),o={y:void 0,x:void 0};switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth;break;case"left center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth;break;case"left bottom":o.y=0,o.x=e.div.offsetWidth;break;case"center top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth/2;break;case"center center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2;break;case"center bottom":o.y=0,o.x=e.div.offsetWidth/2;break;case"right top":o.y=e.div.offsetHeight,o.x=0;break;case"right center":o.y=e.div.offsetHeight/2,o.x=0;break;case"right bottom":o.y=0,o.x=0;break;default:o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2}e.div.style.top=t.y-o.y+"px",e.div.style.left=t.x-o.x+"px"}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}]),t}()}},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var u,p={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:(u=i.a,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return c(e,[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this,n=window;o.$el=e,o.config=t,o.markers=[],n["init"+o.getName()]=function(){o.googleApiLoaded()},u("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='+t.key+"&callback=init"+o.getName()+'"><\/script>')}},{key:"googleApiLoaded",value:function(){var e=this,t=e.$el,o=e.config,n=t.find(".mapAPI-map"),i=o.mapZoom?o.mapZoom:10,r=o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},s=o.style?o.style:null;console.log(e.getName()+": API is loaded"),e.MarkerUI=l.init(u),e.map=new google.maps.Map(n[0],{zoom:i,center:r,fullscreenControl:!0,styles:s}),e.default_zoom=i,n.addClass("mapboxgl-map"),e.popup=new e.MarkerUI({map:e.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">×</div><div class="html"></div></div>'}),e.geocoder=new google.maps.Geocoder,t.trigger(a.a.MAPAPILOADED)}},{key:"addMarker",value:function(e,t){var o=this,n={lat:e[1],lng:e[0]},i=new o.MarkerUI({position:n,map:o.map,html:'<div class="mapboxgl-marker"><div id="Marker'+t.id+'" data-id="'+t.id+'" class="marker">'+t.icon+"</div></div>",onClick:function(){var e=u("#Marker"+t.id);o.showPopup(n,t.content),e.trigger(a.a.MAPMARKERCLICK)}});return o.markers.push(i),i}},{key:"showPopup",value:function(e,t){var o=this,n=u(o.popup.getDiv());o.config.flyToMarker&&(o.map.setCenter(e),o.map.setZoom(18)),n.css({opacity:"0"}),n.removeClass("d-none"),o.popup.setPosition(e,["center","top"]),n.find(".mapboxgl-popup-content .html").html(t),n.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),o.hidePopup()})),n.css({"margin-left":"1rem",opacity:"1"})}},{key:"hidePopup",value:function(){u(this.popup.getDiv()).addClass("d-none"),this.restoreBounds(),this.$el.trigger(a.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Geocode was not successful for the following reason: "+n)}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Reverse Geocoding was not successful for the following reason: "+n)}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var i=n.id,r=n.geometry.coordinates,a=n.properties.content;t.addMarker(r,{id:i,content:a,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:r[1],lng:r[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}]),e}())};t.a=p},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",LOADED:"load",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/SilverShop.Page.CheckoutPageController.js":function(e,t,o){"use strict";o.r(t);o("./src/js/_components/_ui.map.api.js")},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
//# sourceMappingURL=app_SilverShop.Page.CheckoutPageController.js.map

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/SilverShop.Page.CheckoutPageController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","DATA_KEY","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","Drv","this","$el","config","data","css","console","log","getName","map","init","on","Events","MAPLOADED","e","addGeoJson","geocode","result","addMarker","addClass","ui","removeData","removeClass","localStorage","each","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","trigger","stopPropagation","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","divOffset","y","undefined","x","Array","isArray","join","offsetHeight","offsetWidth","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","find","zoom","center","lat","lng","MarkerUI","Map","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","setPosition","preventDefault","hidePopup","restoreBounds","MAPPOPUPCLOSE","addr","callback","results","status","error","latLng","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","SCROLL","RESIZE","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","jQuery"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,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AAA,QAAkByH,SAASI,SAAQ,SAAC1B,GAClC,IAAM2B,EAAK3B,EAAO2B,GACZ7B,EAAOE,EAAOuB,SAASC,YACvBpB,EAAUJ,EAAO4B,WAAWxB,QAElCtF,EAAGF,UAAUkF,EAAM,CACjB6B,KACAvB,UACA,KAAQJ,EAAO6B,KACf,YAAehI,EAAA,cAGjBwH,EAAOS,OAAO,CACZxC,IAAKQ,EAAK,GACVP,IAAKO,EAAK,QAIdhF,EAAGX,IAAI4H,UAAUV,EAAQ,CACvBW,QAAS,KAGXlH,EAAGmH,eAAiBZ,EACpBvG,EAAG4E,aAAe5E,EAAGX,IAAI+H,YA/ME,+BAoN3B,OADWvI,KACDQ,MApNiB,iCAyN3B,OADWR,KACDgG,QAzNiB,sCA6N3B,IAAM7E,EAAKnB,KAEPmB,EAAGmH,eACLnH,EAAGX,IAAI4H,UAAUjH,EAAGmH,eAAgB,CAClCD,QAAS,MAGPlH,EAAGiE,QAAQ,IACbjE,EAAGX,IAAIoG,UAAUzF,EAAGiE,QAAQ,GAAGoD,eAGjCrH,EAAGsH,iBAxOsB,oCA6OhBzI,KAERQ,IAAIqG,QAFI7G,KAEO+F,kBA/OS,OCclBrG,O,oCChBftC,EAAOD,QAAU,CACf0E,KAAM,YACNC,OAAQ,OACRlB,UAAW,aACX2F,eAAgB,mBAChBW,cAAe,kBACfwB,OAAQ,SACRC,OAAQ,SACRC,kBAAmB,oBACnBC,cAAe,gBACfC,iBAAkB,cAClBC,kBAAmB,oBACnBC,mBAAoB,qBACpBC,yBAA0B,2BAC1BC,kBAAmB,oBACnBC,uBAAwB,yBACxBC,sBAAuB,gBACvBC,wBAAyB,kBACzBC,uBAAwB,iBACxBC,YAAa,0B,wFCvBf,iD,2ECAAnM,EAAOD,QAAUqM","file":"js/app_SilverShop.Page.CheckoutPageController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/SilverShop.Page.CheckoutPageController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n (config['lng'] ? config['lng'] : $BODY.data('default-lng')),\n (config['lat'] ? config['lat'] : $BODY.data('default-lat')),\n ];\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n ui.map = Drv.init($el, config);\n\n $el.on(Events.MAPLOADED, (e) => {\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n console.log(`${NAME}: Map is loaded`);\n });\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html =\n (options.html ?\n options.html :\n '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>'\n );\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;'\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n\n // Calculate position of div\n var positionInPixels = ui.getProjection().fromLatLngToDivPixel(\n new google.maps.LatLng(ui.position)\n );\n\n // Align HTML overlay relative to original position\n var divOffset = {\n y: undefined,\n x: undefined,\n };\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'center top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'right top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = 0;\n break;\n case 'right center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = 0;\n break;\n case 'right bottom':\n divOffset.y = 0;\n divOffset.x = 0;\n break;\n default:\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - divOffset.y }px`;\n ui.div.style.left = `${positionInPixels.x - divOffset.x }px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n}\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(`<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${config['key']}&callback=init${ui.getName()}\"></script>`);\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = (config['mapZoom'] ? config['mapZoom'] : 10);\n const center = (config['center'] ? {\n lat: config['center'][1],\n lng: config['center'][0],\n } : {\n lat: 0,\n lng: 0,\n });\n const style = (config['style'] ? config['style'] : null);\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n 'fullscreenControl': true,\n 'styles': style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n\n ui.popup = new ui.MarkerUI({\n 'map': ui.map,\n 'align': ['center', 'top'],\n 'divClass': 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n 'html': '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n\n $el.trigger(Events.MAPLOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n\n const marker = new ui.MarkerUI({\n 'position': pos,\n 'map': ui.map,\n 'html': `<div class=\"mapboxgl-marker\"><div id=\"Marker${ config['id'] }\" data-id=\"${ config['id'] }\" class=\"marker\">${ config['icon'] }</div></div>`,\n 'onClick': () => {\n const $el = $(`#Marker${ config['id'] }`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n ui.map.setZoom(18);\n }\n\n $popup.css({\n 'opacity': '0',\n });\n $popup.removeClass('d-none');\n\n ui.popup.setPosition(pos, ['center', 'top']);\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n $popup.css({\n 'margin-left': '1rem',\n 'opacity': '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n ui.restoreBounds();\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode({\n 'address': addr,\n }, (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(`${ui.getName()}: Geocode was not successful for the following reason: ${status}`);\n }\n });\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode({\n 'location': latlng,\n }, (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(`${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`);\n }\n });\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n 'icon': marker.icon,\n 'flyToMarker': config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n LOADED: 'load',\n MAPLOADED: 'map-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport '../_components/_ui.map.api';\n","module.exports = jQuery;"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/SilverShop.Page.CheckoutPageController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","DATA_KEY","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","ui","this","Drv","$el","config","data","css","console","log","getName","init","drv","on","Events","MAPAPILOADED","e","map","getMap","addGeoJson","geocode","result","addMarker","addClass","trigger","MAPLOADED","removeData","removeClass","localStorage","each","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","stopPropagation","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","divOffset","y","undefined","x","Array","isArray","join","offsetHeight","offsetWidth","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","find","zoom","center","lat","lng","MarkerUI","Map","fullscreenControl","styles","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","opacity","setPosition","preventDefault","hidePopup","restoreBounds","MAPPOPUPCLOSE","addr","callback","address","results","status","error","latLng","location","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","flyToMarker","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","SCROLL","RESIZE","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_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,YAAa,0B,wFCxBf,iD,2ECAA5M,EAAOD,QAAU8M","file":"js/app_SilverShop.Page.CheckoutPageController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/SilverShop.Page.CheckoutPageController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n config['lng'] ? config['lng'] : $BODY.data('default-lng'),\n config['lat'] ? config['lat'] : $BODY.data('default-lat'),\n ];\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n Drv.init($el, config);\n ui.drv = Drv;\n\n $el.on(Events.MAPAPILOADED, (e) => {\n ui.map = Drv.getMap();\n\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n console.log(`${NAME}: Map is loaded`);\n });\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n\n $el.trigger(Events.MAPLOADED);\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html =\n (options.html ?\n options.html :\n '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>'\n );\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;'\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n\n // Calculate position of div\n var positionInPixels = ui.getProjection().fromLatLngToDivPixel(\n new google.maps.LatLng(ui.position)\n );\n\n // Align HTML overlay relative to original position\n var divOffset = {\n y: undefined,\n x: undefined,\n };\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'center top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'right top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = 0;\n break;\n case 'right center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = 0;\n break;\n case 'right bottom':\n divOffset.y = 0;\n divOffset.x = 0;\n break;\n default:\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - divOffset.y }px`;\n ui.div.style.left = `${positionInPixels.x - divOffset.x }px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n}\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(\n `<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${\n config['key']\n }&callback=init${ui.getName()}\"></script>`,\n );\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = config['mapZoom'] ? config['mapZoom'] : 10;\n const center = config['center']\n ? {\n lat: config['center'][1],\n lng: config['center'][0],\n }\n : {\n lat: 0,\n lng: 0,\n };\n const style = config['style'] ? config['style'] : null;\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n fullscreenControl: true,\n styles: style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n ui.popup = new ui.MarkerUI({\n map: ui.map,\n align: ['center', 'top'],\n divClass: 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n html:\n '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n $el.trigger(Events.MAPAPILOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n const marker = new ui.MarkerUI({\n position: pos,\n map: ui.map,\n html: `<div class=\"mapboxgl-marker\"><div id=\"Marker${config['id']}\" data-id=\"${config['id']}\" class=\"marker\">${config['icon']}</div></div>`,\n onClick: () => {\n const $el = $(`#Marker${config['id']}`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n ui.map.setZoom(18);\n }\n\n $popup.css({\n opacity: '0',\n });\n $popup.removeClass('d-none');\n\n ui.popup.setPosition(pos, ['center', 'top']);\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n $popup.css({\n 'margin-left': '1rem',\n opacity: '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n ui.restoreBounds();\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n address: addr,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Geocode was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n location: latlng,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n icon: marker.icon,\n flyToMarker: config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n LOADED: 'load',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport '../_components/_ui.map.api';\n","module.exports = jQuery;"],"sourceRoot":""}

View File

@ -1,2 +1,2 @@
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/Site.Controllers.MapElementController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js")),l=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();!function(e){var t="jsMapAPI",o=t,n=e("body"),i=s.a.MAP_DRIVER,a=window,c=function(){function s(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var l=new i;this.$el=e(a);var c=this.$el,u=c.data();u.center=[u.lng?u.lng:n.data("default-lng"),u.lat?u.lat:n.data("default-lat")],u["font-family"]=n.css("font-family"),console.log(t+": initializing "+l.getName()+"..."),this.map=l.init(c,u),c.on(r.a.MAPLOADED,(function(e){u.geojson?(console.log(t+": setting up geocode data"),l.addGeoJson(u)):u.address?(console.log(u.address),console.log(t+": setting up address marker"),l.geocode(u.address,(function(e){console.log(e)}))):u.lat&&u.lng&&(console.log(t+": setting up single lat/lng marker"),u.icon||(u.icon='<i class="fas fa-map-marker-alt"></i>'),l.addMarker([u.lng,u.lat],u)),console.log(t+": Map is loaded")})),c.data(o,this),c.addClass(t+"-active")}return l(s,[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],o),this.$el.removeClass(t+"-active")}}],[{key:"_jQueryInterface",value:function(){if(void 0!==a.localStorage)return this.each((function(){var t=e(this),n=t.data(o);n||(n=new s(this),t.data(o,n))}))}}]),s}();e.fn[t]=c._jQueryInterface,e.fn[t].Constructor=c,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,c._jQueryInterface},e(a).on(r.a.AJAX+" "+r.a.LOADED,(function(){e(".mapAPI-map-container").jsMapAPI()}))}(i.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var l={init:function(){return function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=o;return n.setMap(e.map),n.position=e.position,n.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',n.divClass=e.divClass,n.align=e.align,n.isDebugMode=e.debug,n.onClick=e.onClick,n.onMouseOver=e.onMouseOver,n.isBoolean=function(e){return"boolean"==typeof e},n.isNotUndefined=function(e){return void 0!==e},n.hasContent=function(e){return e.length>0},n.isString=function(e){return"string"==typeof e},n.isFunction=function(e){return"function"==typeof e},o}return function(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)}(t,google.maps.OverlayView),s(t,[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),o={y:void 0,x:void 0};switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth;break;case"left center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth;break;case"left bottom":o.y=0,o.x=e.div.offsetWidth;break;case"center top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth/2;break;case"center center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2;break;case"center bottom":o.y=0,o.x=e.div.offsetWidth/2;break;case"right top":o.y=e.div.offsetHeight,o.x=0;break;case"right center":o.y=e.div.offsetHeight/2,o.x=0;break;case"right bottom":o.y=0,o.x=0;break;default:o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2}e.div.style.top=t.y-o.y+"px",e.div.style.left=t.x-o.x+"px"}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}]),t}()}},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var u,f={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:(u=i.a,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return c(e,[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this,n=window;o.$el=e,o.config=t,o.markers=[],n["init"+o.getName()]=function(){o.googleApiLoaded()},u("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='+t.key+"&callback=init"+o.getName()+'"><\/script>')}},{key:"googleApiLoaded",value:function(){var e=this,t=e.$el,o=e.config,n=t.find(".mapAPI-map"),i=o.mapZoom?o.mapZoom:10,a=o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},s=o.style?o.style:null;console.log(e.getName()+": API is loaded"),e.MarkerUI=l.init(u),e.map=new google.maps.Map(n[0],{zoom:i,center:a,fullscreenControl:!0,styles:s}),e.default_zoom=i,n.addClass("mapboxgl-map"),e.popup=new e.MarkerUI({map:e.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">×</div><div class="html"></div></div>'}),e.geocoder=new google.maps.Geocoder,t.trigger(r.a.MAPLOADED)}},{key:"addMarker",value:function(e,t){var o=this,n={lat:e[1],lng:e[0]},i=new o.MarkerUI({position:n,map:o.map,html:'<div class="mapboxgl-marker"><div id="Marker'+t.id+'" data-id="'+t.id+'" class="marker">'+t.icon+"</div></div>",onClick:function(){var e=u("#Marker"+t.id);o.showPopup(n,t.content),e.trigger(r.a.MAPMARKERCLICK)}});return o.markers.push(i),i}},{key:"showPopup",value:function(e,t){var o=this,n=u(o.popup.getDiv());o.config.flyToMarker&&(o.map.setCenter(e),o.map.setZoom(18)),n.css({opacity:"0"}),n.removeClass("d-none"),o.popup.setPosition(e,["center","top"]),n.find(".mapboxgl-popup-content .html").html(t),n.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),o.hidePopup()})),n.css({"margin-left":"1rem",opacity:"1"})}},{key:"hidePopup",value:function(){u(this.popup.getDiv()).addClass("d-none"),this.restoreBounds(),this.$el.trigger(r.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Geocode was not successful for the following reason: "+n)}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Reverse Geocoding was not successful for the following reason: "+n)}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var i=n.id,a=n.geometry.coordinates,r=n.properties.content;t.addMarker(a,{id:i,content:r,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:a[1],lng:a[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}]),e}())};t.a=f},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",LOADED:"load",MAPLOADED:"map-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/Site.Controllers.MapElementController.js":function(e,t,o){"use strict";o.r(t);var n=o("jquery"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=(o("./src/js/_components/_ui.map.api.js"),function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}());var l=function(e){var t=window,o=(document,e("body")),n=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return s(t,null,[{key:"init",value:function(){this.dispose(),console.log("Initializing: LocationUI")}},{key:"initMap",value:function(){e(".mapAPI-map-container").find(".marker").on(""+r.a.MAPMARKERCLICK,(function(t){var n=e(t.currentTarget).data("id");o.find(".locations .location").removeClass("active"),o.find('.locations .location[data-id="'+n+'"]').addClass("active")})),o.find(".locations .location").on("click",(function(t){var n=e(t.currentTarget).data("id");o.find("#Marker"+n).click()})),e(".mapAPI-map-container").on(r.a.MAPPOPUPCLOSE,(function(e){o.find(".locations .location").removeClass("active")}))}},{key:"dispose",value:function(){console.log("Destroying: LocationUI")}}]),t}();return e(t).on(r.a.AJAX+" "+r.a.LOADED,(function(){n.init()})),e(t).on(r.a.MAPLOADED,(function(){n.initMap()})),n}(i.a);t.default=l},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/Site.Controllers.MapElementController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js")),l=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();!function(e){var t="jsMapAPI",o=t,n=e("body"),i=s.a.MAP_DRIVER,a=window,c=function(){function s(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var l=this,c=new i;l.$el=e(a);var u=l.$el,f=u.data();f.center=[f.lng?f.lng:n.data("default-lng"),f.lat?f.lat:n.data("default-lat")],f["font-family"]=n.css("font-family"),console.log(t+": initializing "+c.getName()+"..."),c.init(u,f),l.drv=c,u.on(r.a.MAPAPILOADED,(function(e){l.map=c.getMap(),f.geojson?(console.log(t+": setting up geocode data"),c.addGeoJson(f)):f.address?(console.log(f.address),console.log(t+": setting up address marker"),c.geocode(f.address,(function(e){console.log(e)}))):f.lat&&f.lng&&(console.log(t+": setting up single lat/lng marker"),f.icon||(f.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([f.lng,f.lat],f)),console.log(t+": Map is loaded")})),u.data(o,l),u.addClass(t+"-active"),u.trigger(r.a.MAPLOADED)}return l(s,[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],o),this.$el.removeClass(t+"-active")}}],[{key:"_jQueryInterface",value:function(){if(void 0!==a.localStorage)return this.each((function(){var t=e(this),n=t.data(o);n||(n=new s(this),t.data(o,n))}))}}]),s}();e.fn[t]=c._jQueryInterface,e.fn[t].Constructor=c,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,c._jQueryInterface},e(a).on(r.a.AJAX+" "+r.a.LOADED,(function(){e(".mapAPI-map-container").jsMapAPI()}))}(i.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var l={init:function(){return function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=o;return n.setMap(e.map),n.position=e.position,n.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',n.divClass=e.divClass,n.align=e.align,n.isDebugMode=e.debug,n.onClick=e.onClick,n.onMouseOver=e.onMouseOver,n.isBoolean=function(e){return"boolean"==typeof e},n.isNotUndefined=function(e){return void 0!==e},n.hasContent=function(e){return e.length>0},n.isString=function(e){return"string"==typeof e},n.isFunction=function(e){return"function"==typeof e},o}return function(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)}(t,google.maps.OverlayView),s(t,[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),o={y:void 0,x:void 0};switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth;break;case"left center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth;break;case"left bottom":o.y=0,o.x=e.div.offsetWidth;break;case"center top":o.y=e.div.offsetHeight,o.x=e.div.offsetWidth/2;break;case"center center":o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2;break;case"center bottom":o.y=0,o.x=e.div.offsetWidth/2;break;case"right top":o.y=e.div.offsetHeight,o.x=0;break;case"right center":o.y=e.div.offsetHeight/2,o.x=0;break;case"right bottom":o.y=0,o.x=0;break;default:o.y=e.div.offsetHeight/2,o.x=e.div.offsetWidth/2}e.div.style.top=t.y-o.y+"px",e.div.style.left=t.x-o.x+"px"}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}]),t}()}},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var u,f={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:(u=i.a,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return c(e,[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this,n=window;o.$el=e,o.config=t,o.markers=[],n["init"+o.getName()]=function(){o.googleApiLoaded()},u("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='+t.key+"&callback=init"+o.getName()+'"><\/script>')}},{key:"googleApiLoaded",value:function(){var e=this,t=e.$el,o=e.config,n=t.find(".mapAPI-map"),i=o.mapZoom?o.mapZoom:10,a=o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},s=o.style?o.style:null;console.log(e.getName()+": API is loaded"),e.MarkerUI=l.init(u),e.map=new google.maps.Map(n[0],{zoom:i,center:a,fullscreenControl:!0,styles:s}),e.default_zoom=i,n.addClass("mapboxgl-map"),e.popup=new e.MarkerUI({map:e.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">×</div><div class="html"></div></div>'}),e.geocoder=new google.maps.Geocoder,t.trigger(r.a.MAPAPILOADED)}},{key:"addMarker",value:function(e,t){var o=this,n={lat:e[1],lng:e[0]},i=new o.MarkerUI({position:n,map:o.map,html:'<div class="mapboxgl-marker"><div id="Marker'+t.id+'" data-id="'+t.id+'" class="marker">'+t.icon+"</div></div>",onClick:function(){var e=u("#Marker"+t.id);o.showPopup(n,t.content),e.trigger(r.a.MAPMARKERCLICK)}});return o.markers.push(i),i}},{key:"showPopup",value:function(e,t){var o=this,n=u(o.popup.getDiv());o.config.flyToMarker&&(o.map.setCenter(e),o.map.setZoom(18)),n.css({opacity:"0"}),n.removeClass("d-none"),o.popup.setPosition(e,["center","top"]),n.find(".mapboxgl-popup-content .html").html(t),n.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),o.hidePopup()})),n.css({"margin-left":"1rem",opacity:"1"})}},{key:"hidePopup",value:function(){u(this.popup.getDiv()).addClass("d-none"),this.restoreBounds(),this.$el.trigger(r.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Geocode was not successful for the following reason: "+n)}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"==typeof t&&t(e),e;console.error(o.getName()+": Reverse Geocoding was not successful for the following reason: "+n)}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var i=n.id,a=n.geometry.coordinates,r=n.properties.content;t.addMarker(a,{id:i,content:r,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:a[1],lng:a[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}]),e}())};t.a=f},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",LOADED:"load",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/Site.Controllers.MapElementController.js":function(e,t,o){"use strict";o.r(t);var n=o("jquery"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=(o("./src/js/_components/_ui.map.api.js"),function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}());var l=function(e){var t=window,o=(document,e("body")),n=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return s(t,null,[{key:"init",value:function(){this.dispose(),console.log("Initializing: LocationUI")}},{key:"initMap",value:function(){e(".mapAPI-map-container").find(".marker").on(""+r.a.MAPMARKERCLICK,(function(t){var n=e(t.currentTarget).data("id");o.find(".locations .location").removeClass("active"),o.find('.locations .location[data-id="'+n+'"]').addClass("active")})),o.find(".locations .location").on("click",(function(t){var n=e(t.currentTarget).data("id");o.find("#Marker"+n).click()})),e(".mapAPI-map-container").on(r.a.MAPPOPUPCLOSE,(function(e){o.find(".locations .location").removeClass("active")}))}},{key:"dispose",value:function(){console.log("Destroying: LocationUI")}}]),t}();return e(t).on(r.a.AJAX+" "+r.a.LOADED,(function(){n.init()})),e(t).on(r.a.MAPLOADED,(function(){n.initMap()})),n}(i.a);t.default=l},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
//# sourceMappingURL=app_Site.Controllers.MapElementController.js.map

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/Site.Controllers.MapElementController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","DATA_KEY","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","Drv","this","$el","config","data","css","console","log","getName","map","init","on","Events","MAPLOADED","e","addGeoJson","geocode","result","addMarker","addClass","ui","removeData","removeClass","localStorage","each","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","trigger","stopPropagation","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","divOffset","y","undefined","x","Array","isArray","join","offsetHeight","offsetWidth","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","find","zoom","center","lat","lng","MarkerUI","Map","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","setPosition","preventDefault","hidePopup","restoreBounds","MAPPOPUPCLOSE","addr","callback","results","status","error","latLng","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","SCROLL","RESIZE","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_ST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YAAa,0B,uFCvBf,sE,GAAA,yC,oPAQA,IAAMC,EAAc,SAACnK,GAEnB,IAAMM,EAAIC,OAEJ6J,GADInG,SACIjE,EAAE,SAGVmK,EAPmB,yB,4FAAA,uDAWrBxJ,KAAK0J,UACLrJ,QAAQC,IAAR,8BAZqB,gCAgBrBjB,EAAE,yBAAyBmG,KAAK,WAAW9E,GAA3C,GAAiDC,IAAO4F,gBAAkB,SAAC1F,GACzE,IACMmH,EADM3I,EAAEwB,EAAE8I,eACDxJ,KAAK,MAEpBsJ,EAAMjE,KAAK,wBAAwBnE,YAAY,UAC/CoI,EAAMjE,KAAN,iCAA8CwC,EAA9C,MAAwD9G,SAAS,aAGnEuI,EAAMjE,KAAK,wBAAwB9E,GAAG,SAAS,SAACG,GAC9C,IACMmH,EADM3I,EAAEwB,EAAE8I,eACDxJ,KAAK,MAEpBsJ,EAAMjE,KAAN,UAAqBwC,GAAM4B,WAG7BvK,EAAE,yBAAyBqB,GAAGC,IAAOuG,eAAe,SAACrG,GACnD4I,EAAMjE,KAAK,wBAAwBnE,YAAY,eAhC5B,gCAqCrBhB,QAAQC,IAAR,8BArCqB,KAiDzB,OARAjB,EAAEM,GAAGe,GAAMC,IAAOkB,KAAlB,IAA0BlB,IAAOmB,QAAU,WACzC0H,EAAW/I,UAGbpB,EAAEM,GAAGe,GAAGC,IAAOC,WAAW,WACxB4I,EAAWK,aAGNL,EAjDW,CAmDjBnK,KAEYmK,a,2EC7DfpM,EAAOD,QAAU2M","file":"js/app_Site.Controllers.MapElementController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/Site.Controllers.MapElementController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n (config['lng'] ? config['lng'] : $BODY.data('default-lng')),\n (config['lat'] ? config['lat'] : $BODY.data('default-lat')),\n ];\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n ui.map = Drv.init($el, config);\n\n $el.on(Events.MAPLOADED, (e) => {\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n console.log(`${NAME}: Map is loaded`);\n });\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html =\n (options.html ?\n options.html :\n '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>'\n );\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;'\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n\n // Calculate position of div\n var positionInPixels = ui.getProjection().fromLatLngToDivPixel(\n new google.maps.LatLng(ui.position)\n );\n\n // Align HTML overlay relative to original position\n var divOffset = {\n y: undefined,\n x: undefined,\n };\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'center top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'right top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = 0;\n break;\n case 'right center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = 0;\n break;\n case 'right bottom':\n divOffset.y = 0;\n divOffset.x = 0;\n break;\n default:\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - divOffset.y }px`;\n ui.div.style.left = `${positionInPixels.x - divOffset.x }px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n}\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(`<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${config['key']}&callback=init${ui.getName()}\"></script>`);\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = (config['mapZoom'] ? config['mapZoom'] : 10);\n const center = (config['center'] ? {\n lat: config['center'][1],\n lng: config['center'][0],\n } : {\n lat: 0,\n lng: 0,\n });\n const style = (config['style'] ? config['style'] : null);\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n 'fullscreenControl': true,\n 'styles': style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n\n ui.popup = new ui.MarkerUI({\n 'map': ui.map,\n 'align': ['center', 'top'],\n 'divClass': 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n 'html': '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n\n $el.trigger(Events.MAPLOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n\n const marker = new ui.MarkerUI({\n 'position': pos,\n 'map': ui.map,\n 'html': `<div class=\"mapboxgl-marker\"><div id=\"Marker${ config['id'] }\" data-id=\"${ config['id'] }\" class=\"marker\">${ config['icon'] }</div></div>`,\n 'onClick': () => {\n const $el = $(`#Marker${ config['id'] }`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n ui.map.setZoom(18);\n }\n\n $popup.css({\n 'opacity': '0',\n });\n $popup.removeClass('d-none');\n\n ui.popup.setPosition(pos, ['center', 'top']);\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n $popup.css({\n 'margin-left': '1rem',\n 'opacity': '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n ui.restoreBounds();\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode({\n 'address': addr,\n }, (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(`${ui.getName()}: Geocode was not successful for the following reason: ${status}`);\n }\n });\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode({\n 'location': latlng,\n }, (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(`${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`);\n }\n });\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n 'icon': marker.icon,\n 'flyToMarker': config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n LOADED: 'load',\n MAPLOADED: 'map-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\n// Mapbox API\nimport '../_components/_ui.map.api';\n\nconst LocationUI = (($) => {\n // Constants\n const W = window;\n const D = document;\n const $Body = $('body');\n\n const NAME = 'LocationUI';\n class LocationUI {\n // Static methods\n\n static init() {\n this.dispose();\n console.log(`Initializing: ${NAME}`);\n }\n\n static initMap() {\n $('.mapAPI-map-container').find('.marker').on(`${Events.MAPMARKERCLICK}`, (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find('.locations .location').removeClass('active');\n $Body.find(`.locations .location[data-id=\"${ id }\"]`).addClass('active');\n });\n\n $Body.find('.locations .location').on('click', (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find(`#Marker${id}`).click();\n });\n\n $('.mapAPI-map-container').on(Events.MAPPOPUPCLOSE, (e) => {\n $Body.find('.locations .location').removeClass('active');\n });\n }\n\n static dispose() {\n console.log(`Destroying: ${NAME}`);\n }\n }\n\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n LocationUI.init();\n });\n\n $(W).on(Events.MAPLOADED, () => {\n LocationUI.initMap();\n });\n\n return LocationUI;\n\n})($);\n\nexport default LocationUI;\n","module.exports = jQuery;"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/Site.Controllers.MapElementController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","DATA_KEY","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","ui","this","Drv","$el","config","data","css","console","log","getName","init","drv","on","Events","MAPAPILOADED","e","map","getMap","addGeoJson","geocode","result","addMarker","addClass","trigger","MAPLOADED","removeData","removeClass","localStorage","each","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","stopPropagation","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","divOffset","y","undefined","x","Array","isArray","join","offsetHeight","offsetWidth","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","find","zoom","center","lat","lng","MarkerUI","Map","fullscreenControl","styles","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","opacity","setPosition","preventDefault","hidePopup","restoreBounds","MAPPOPUPCLOSE","addr","callback","address","results","status","error","latLng","location","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","flyToMarker","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","SCROLL","RESIZE","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","LocationUI","$Body","dispose","currentTarget","click","initMap","jQuery"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBs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,YAAY,eAhC5B,gCAqCrBnB,QAAQC,IAAR,8BArCqB,KAiDzB,OARAlB,EAAEM,GAAGgB,GAAMC,IAAOqB,KAAlB,IAA0BrB,IAAOsB,QAAU,WACzC+H,EAAWxJ,UAGbpB,EAAEM,GAAGgB,GAAGC,IAAOW,WAAW,WACxB0I,EAAWK,aAGNL,EAjDW,CAmDjB5K,KAEY4K,a,2EC7Df7M,EAAOD,QAAUoN","file":"js/app_Site.Controllers.MapElementController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/Site.Controllers.MapElementController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n config['lng'] ? config['lng'] : $BODY.data('default-lng'),\n config['lat'] ? config['lat'] : $BODY.data('default-lat'),\n ];\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n Drv.init($el, config);\n ui.drv = Drv;\n\n $el.on(Events.MAPAPILOADED, (e) => {\n ui.map = Drv.getMap();\n\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n console.log(`${NAME}: Map is loaded`);\n });\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n\n $el.trigger(Events.MAPLOADED);\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html =\n (options.html ?\n options.html :\n '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>'\n );\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;'\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n\n // Calculate position of div\n var positionInPixels = ui.getProjection().fromLatLngToDivPixel(\n new google.maps.LatLng(ui.position)\n );\n\n // Align HTML overlay relative to original position\n var divOffset = {\n y: undefined,\n x: undefined,\n };\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'left bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth;\n break;\n case 'center top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'center bottom':\n divOffset.y = 0;\n divOffset.x = ui.div.offsetWidth / 2;\n break;\n case 'right top':\n divOffset.y = ui.div.offsetHeight;\n divOffset.x = 0;\n break;\n case 'right center':\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = 0;\n break;\n case 'right bottom':\n divOffset.y = 0;\n divOffset.x = 0;\n break;\n default:\n divOffset.y = ui.div.offsetHeight / 2;\n divOffset.x = ui.div.offsetWidth / 2;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - divOffset.y }px`;\n ui.div.style.left = `${positionInPixels.x - divOffset.x }px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n}\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(\n `<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${\n config['key']\n }&callback=init${ui.getName()}\"></script>`,\n );\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = config['mapZoom'] ? config['mapZoom'] : 10;\n const center = config['center']\n ? {\n lat: config['center'][1],\n lng: config['center'][0],\n }\n : {\n lat: 0,\n lng: 0,\n };\n const style = config['style'] ? config['style'] : null;\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n fullscreenControl: true,\n styles: style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n ui.popup = new ui.MarkerUI({\n map: ui.map,\n align: ['center', 'top'],\n divClass: 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n html:\n '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n $el.trigger(Events.MAPAPILOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n const marker = new ui.MarkerUI({\n position: pos,\n map: ui.map,\n html: `<div class=\"mapboxgl-marker\"><div id=\"Marker${config['id']}\" data-id=\"${config['id']}\" class=\"marker\">${config['icon']}</div></div>`,\n onClick: () => {\n const $el = $(`#Marker${config['id']}`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n ui.map.setZoom(18);\n }\n\n $popup.css({\n opacity: '0',\n });\n $popup.removeClass('d-none');\n\n ui.popup.setPosition(pos, ['center', 'top']);\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n $popup.css({\n 'margin-left': '1rem',\n opacity: '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n ui.restoreBounds();\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n address: addr,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Geocode was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n location: latlng,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n icon: marker.icon,\n flyToMarker: config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n LOADED: 'load',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\n// Mapbox API\nimport '../_components/_ui.map.api';\n\nconst LocationUI = (($) => {\n // Constants\n const W = window;\n const D = document;\n const $Body = $('body');\n\n const NAME = 'LocationUI';\n class LocationUI {\n // Static methods\n\n static init() {\n this.dispose();\n console.log(`Initializing: ${NAME}`);\n }\n\n static initMap() {\n $('.mapAPI-map-container').find('.marker').on(`${Events.MAPMARKERCLICK}`, (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find('.locations .location').removeClass('active');\n $Body.find(`.locations .location[data-id=\"${ id }\"]`).addClass('active');\n });\n\n $Body.find('.locations .location').on('click', (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find(`#Marker${id}`).click();\n });\n\n $('.mapAPI-map-container').on(Events.MAPPOPUPCLOSE, (e) => {\n $Body.find('.locations .location').removeClass('active');\n });\n }\n\n static dispose() {\n console.log(`Destroying: ${NAME}`);\n }\n }\n\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n LocationUI.init();\n });\n\n $(W).on(Events.MAPLOADED, () => {\n LocationUI.initMap();\n });\n\n return LocationUI;\n\n})($);\n\nexport default LocationUI;\n","module.exports = jQuery;"],"sourceRoot":""}

View File

@ -1,6 +1,6 @@
{
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
"version": "1.6.1",
"version": "1.6.2",
"author": "Tony Air <tony@twma.pro>",
"license": "MIT",
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",

View File

@ -8,7 +8,6 @@ import '../../scss/_components/_ui.map.scss';
import CONSTS from 'js/_consts';
const MapAPI = (($) => {
// Constants
const NAME = 'jsMapAPI';
const DATA_KEY = NAME;
@ -29,16 +28,19 @@ const MapAPI = (($) => {
const config = $el.data();
config['center'] = [
(config['lng'] ? config['lng'] : $BODY.data('default-lng')),
(config['lat'] ? config['lat'] : $BODY.data('default-lat')),
config['lng'] ? config['lng'] : $BODY.data('default-lng'),
config['lat'] ? config['lat'] : $BODY.data('default-lat'),
];
config['font-family'] = $BODY.css('font-family');
console.log(`${NAME}: initializing ${Drv.getName()}...`);
ui.map = Drv.init($el, config);
Drv.init($el, config);
ui.drv = Drv;
$el.on(Events.MAPAPILOADED, (e) => {
ui.map = Drv.getMap();
$el.on(Events.MAPLOADED, (e) => {
if (config['geojson']) {
console.log(`${NAME}: setting up geocode data`);
Drv.addGeoJson(config);
@ -63,6 +65,8 @@ const MapAPI = (($) => {
$el.data(DATA_KEY, ui);
$el.addClass(`${NAME}-active`);
$el.trigger(Events.MAPLOADED);
}
// Public methods

View File

@ -6,7 +6,6 @@ import MarkerUI from './_map.google.marker';
const GoogleMapsDriver = (($) => {
class GoogleMapsDriver {
getName() {
return 'GoogleMapsDriver';
}
@ -23,7 +22,11 @@ const GoogleMapsDriver = (($) => {
ui.googleApiLoaded();
};
$('body').append(`<script async defer src="https://maps.googleapis.com/maps/api/js?key=${config['key']}&callback=init${ui.getName()}"></script>`);
$('body').append(
`<script async defer src="https://maps.googleapis.com/maps/api/js?key=${
config['key']
}&callback=init${ui.getName()}"></script>`,
);
}
googleApiLoaded() {
@ -33,15 +36,17 @@ const GoogleMapsDriver = (($) => {
const config = ui.config;
const $mapDiv = $el.find('.mapAPI-map');
const zoom = (config['mapZoom'] ? config['mapZoom'] : 10);
const center = (config['center'] ? {
lat: config['center'][1],
lng: config['center'][0],
} : {
lat: 0,
lng: 0,
});
const style = (config['style'] ? config['style'] : null);
const zoom = config['mapZoom'] ? config['mapZoom'] : 10;
const center = config['center']
? {
lat: config['center'][1],
lng: config['center'][0],
}
: {
lat: 0,
lng: 0,
};
const style = config['style'] ? config['style'] : null;
console.log(`${ui.getName()}: API is loaded`);
// init fontawesome icons
@ -50,20 +55,20 @@ const GoogleMapsDriver = (($) => {
ui.map = new google.maps.Map($mapDiv[0], {
zoom,
center,
'fullscreenControl': true,
'styles': style,
fullscreenControl: true,
styles: style,
});
ui.default_zoom = zoom;
$mapDiv.addClass('mapboxgl-map');
ui.popup = new ui.MarkerUI({
'map': ui.map,
'align': ['center', 'top'],
'divClass': 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',
'html': '<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content">' +
map: ui.map,
align: ['center', 'top'],
divClass: 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',
html:
'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content">' +
'<div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">×</div>' +
'<div class="html"></div>' +
'</div>',
@ -71,8 +76,7 @@ const GoogleMapsDriver = (($) => {
ui.geocoder = new google.maps.Geocoder();
$el.trigger(Events.MAPLOADED);
$el.trigger(Events.MAPAPILOADED);
}
addMarker(crds, config) {
@ -83,13 +87,12 @@ const GoogleMapsDriver = (($) => {
lng: crds[0],
};
const marker = new ui.MarkerUI({
'position': pos,
'map': ui.map,
'html': `<div class="mapboxgl-marker"><div id="Marker${ config['id'] }" data-id="${ config['id'] }" class="marker">${ config['icon'] }</div></div>`,
'onClick': () => {
const $el = $(`#Marker${ config['id'] }`);
position: pos,
map: ui.map,
html: `<div class="mapboxgl-marker"><div id="Marker${config['id']}" data-id="${config['id']}" class="marker">${config['icon']}</div></div>`,
onClick: () => {
const $el = $(`#Marker${config['id']}`);
ui.showPopup(pos, config['content']);
$el.trigger(Events.MAPMARKERCLICK);
@ -98,7 +101,6 @@ const GoogleMapsDriver = (($) => {
ui.markers.push(marker);
return marker;
}
@ -112,7 +114,7 @@ const GoogleMapsDriver = (($) => {
}
$popup.css({
'opacity': '0',
opacity: '0',
});
$popup.removeClass('d-none');
@ -126,7 +128,7 @@ const GoogleMapsDriver = (($) => {
$popup.css({
'margin-left': '1rem',
'opacity': '1',
opacity: '1',
});
}
@ -143,41 +145,51 @@ const GoogleMapsDriver = (($) => {
geocode(addr, callback) {
const ui = this;
ui.geocoder.geocode({
'address': addr,
}, (results, status) => {
if (status === 'OK') {
//results[0].geometry.location;
ui.geocoder.geocode(
{
address: addr,
},
(results, status) => {
if (status === 'OK') {
//results[0].geometry.location;
if (typeof callback === 'function') {
callback(results);
if (typeof callback === 'function') {
callback(results);
}
return results;
} else {
console.error(
`${ui.getName()}: Geocode was not successful for the following reason: ${status}`,
);
}
return results;
} else {
console.error(`${ui.getName()}: Geocode was not successful for the following reason: ${status}`);
}
});
},
);
}
reverseGeocode(latLng, callback) {
const ui = this;
ui.geocoder.geocode({
'location': latlng,
}, (results, status) => {
if (status === 'OK') {
//results[0].formatted_address;
ui.geocoder.geocode(
{
location: latlng,
},
(results, status) => {
if (status === 'OK') {
//results[0].formatted_address;
if (typeof callback === 'function') {
callback(results);
if (typeof callback === 'function') {
callback(results);
}
return results;
} else {
console.error(
`${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`,
);
}
return results;
} else {
console.error(`${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`);
}
});
},
);
}
addGeoJson(config) {
@ -196,8 +208,8 @@ const GoogleMapsDriver = (($) => {
ui.addMarker(crds, {
id,
content,
'icon': marker.icon,
'flyToMarker': config['flyToMarker'],
icon: marker.icon,
flyToMarker: config['flyToMarker'],
});
bounds.extend({

View File

@ -7,7 +7,6 @@ import Events from '../../_events';
const MapBoxDriver = (($) => {
class MapBoxDriver {
getName() {
return 'MapBoxDriver';
}
@ -18,34 +17,44 @@ const MapBoxDriver = (($) => {
mapBoxGL.accessToken = config['key'];
ui.map = new mapBoxGL.Map({
'container': $el.find('.mapAPI-map')[0],
'center': (config['center'] ? config['center'] : [0, 0]),
container: $el.find('.mapAPI-map')[0],
center: config['center'] ? config['center'] : [0, 0],
//hash: true,
'style': (config['style'] ? config['style'] : 'mapbox://styles/mapbox/streets-v9'),
'localIdeographFontFamily': config['font-family'],
'zoom': (config['mapZoom'] ? config['mapZoom'] : 10),
'attributionControl': false,
'antialias': true,
'accessToken': config['key'],
style: config['style']
? config['style']
: 'mapbox://styles/mapbox/streets-v9',
localIdeographFontFamily: config['font-family'],
zoom: config['mapZoom'] ? config['mapZoom'] : 10,
attributionControl: false,
antialias: true,
accessToken: config['key'],
})
.addControl(new mapBoxGL.AttributionControl({
compact: true,
}))
.addControl(
new mapBoxGL.AttributionControl({
compact: true,
}),
)
.addControl(new mapBoxGL.NavigationControl(), 'top-right')
.addControl(new mapBoxGL.GeolocateControl({
positionOptions: {
enableHighAccuracy: true,
},
trackUserLocation: true,
}), 'bottom-right')
.addControl(new mapBoxGL.ScaleControl({
maxWidth: 80,
unit: 'metric',
}), 'top-left')
.addControl(
new mapBoxGL.GeolocateControl({
positionOptions: {
enableHighAccuracy: true,
},
trackUserLocation: true,
}),
'bottom-right',
)
.addControl(
new mapBoxGL.ScaleControl({
maxWidth: 80,
unit: 'metric',
}),
'top-left',
)
.addControl(new mapBoxGL.FullscreenControl());
ui.map.on('load', (e) => {
$el.trigger(Events.MAPLOADED);
$el.trigger(Events.MAPAPILOADED);
});
ui.popup = new mapBoxGL.Popup({
@ -58,10 +67,13 @@ const MapBoxDriver = (($) => {
const ui = this;
// create a DOM el for the marker
const $el = $(`<div id="Marker${ config['id'] }" data-id="${ config['id'] }" class="marker">${ config['icon'] }</div>`);
const $el = $(
`<div id="Marker${config['id']}" data-id="${config['id']}" class="marker">${config['icon']}</div>`,
);
$el.on('click', (e) => {
ui.popup.setLngLat(crds)
ui.popup
.setLngLat(crds)
.setHTML(config['content'])
.addTo(ui.map);
@ -76,9 +88,7 @@ const MapBoxDriver = (($) => {
});
// add marker to map
const marker = new mapBoxGL.Marker($el[0])
.setLngLat(crds)
.addTo(ui.map);
const marker = new mapBoxGL.Marker($el[0]).setLngLat(crds).addTo(ui.map);
return marker;
}
@ -138,8 +148,8 @@ const MapBoxDriver = (($) => {
ui.addMarker(crds, {
id,
content,
'icon': marker.icon,
'flyToMarker': config['flyToMarker'],
icon: marker.icon,
flyToMarker: config['flyToMarker'],
});
bounds.extend(crds);
@ -158,7 +168,6 @@ const MapBoxDriver = (($) => {
$(e.currentTarget).trigger(Events.MAPPOPUPCLOSE);
});
}
getMap() {

View File

@ -6,6 +6,7 @@ module.exports = {
AJAX: 'ajax-load',
LOADED: 'load',
MAPLOADED: 'map-loaded',
MAPAPILOADED: 'map-api-loaded',
MAPMARKERCLICK: 'map-marker-click',
MAPPOPUPCLOSE: 'map-popup-close',
SCROLL: 'scroll',