From 9138d27293f059d6c36d7e685647657c2915fa6f Mon Sep 17 00:00:00 2001 From: "Robin C. Ladiges" Date: Thu, 21 Nov 2019 03:51:20 +0100 Subject: [PATCH] independent fork ; update dependencies --- .jshintrc | 4 + .npmignore | 5 + Gruntfile.js | 66 +- dist/leaflet-panel-layers.min.css | 7 +- dist/leaflet-panel-layers.min.js | 6 +- dist/leaflet-panel-layers.src.css | 182 ++-- dist/leaflet-panel-layers.src.js | 958 +++++++++++-------- package-lock.json | 1471 +++++++++++++++++++++++++++++ package.json | 24 +- 9 files changed, 2177 insertions(+), 546 deletions(-) create mode 100644 .jshintrc create mode 100644 .npmignore create mode 100644 package-lock.json diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..889b9cb --- /dev/null +++ b/.jshintrc @@ -0,0 +1,4 @@ +{ + "laxbreak": true, + "laxcomma": false +} diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..52f2a31 --- /dev/null +++ b/.npmignore @@ -0,0 +1,5 @@ +/examples/ +/src/ +/.jshintrc +/Gruntfile.js +/index.html diff --git a/Gruntfile.js b/Gruntfile.js index ac80394..4e57da7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,12 +2,15 @@ module.exports = function(grunt) { +grunt.util.linefeed = '\n'; + grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-watch'); +grunt.loadNpmTasks('grunt-banner'); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), @@ -32,56 +35,73 @@ grunt.initConfig({ }, clean: { dist: { - src: ['dist/*'] - } + src: ['dist/*'], + }, }, jshint: { options: { + jshintrc: true, globals: { console: true, module: true, }, }, - files: ['src/*.js'] + files: ['src/*.js'], }, concat: { //TODO cut out SearchMarker options: { - banner: '<%= meta.banner %>' + banner: '<%= meta.banner %>', }, dist: { files: { 'dist/leaflet-panel-layers.src.js': ['src/leaflet-panel-layers.js'], - 'dist/leaflet-panel-layers.src.css': ['src/leaflet-panel-layers.css'] - } - } + 'dist/leaflet-panel-layers.src.css': ['src/leaflet-panel-layers.css'], + }, + }, }, uglify: { - options: { - banner: '<%= meta.banner %>' - }, dist: { files: { - 'dist/leaflet-panel-layers.min.js': ['dist/leaflet-panel-layers.src.js'] - } - } + 'dist/leaflet-panel-layers.min.js': ['dist/leaflet-panel-layers.src.js'], + }, + }, }, cssmin: { combine: { files: { - 'dist/leaflet-panel-layers.min.css': ['src/leaflet-panel-layers.css'] - } - }, - options: { - banner: '<%= meta.banner %>' + 'dist/leaflet-panel-layers.min.css': ['src/leaflet-panel-layers.css'], + }, }, minify: { expand: true, cwd: 'dist/', files: { - 'dist/leaflet-panel-layers.min.css': ['src/leaflet-panel-layers.css'] - } - } + 'dist/leaflet-panel-layers.min.css': ['src/leaflet-panel-layers.css'], + }, + }, + }, + usebanner: { + options: { + position: 'top', + linebreak: false, + }, + css: { + options: { + banner: '<%= meta.banner %>', + }, + files: { + src: 'dist/leaflet-panel-layers.min.css', + }, + }, + js: { + options: { + banner: '<%= meta.banner %>', + }, + files: { + src: 'dist/leaflet-panel-layers.min.js', + }, + }, }, watch: { dist: { @@ -96,8 +116,10 @@ grunt.registerTask('default', [ 'clean', 'concat', 'cssmin', + 'usebanner:css', 'jshint', - 'uglify' + 'uglify', + 'usebanner:js', ]); }; diff --git a/dist/leaflet-panel-layers.min.css b/dist/leaflet-panel-layers.min.css index 2a99dff..e00725d 100644 --- a/dist/leaflet-panel-layers.min.css +++ b/dist/leaflet-panel-layers.min.css @@ -1,5 +1,5 @@ /** - * Leaflet Panel Layers v1.2.6 - 2019-08-11 + * Leaflet Panel Layers v1.2.7 - 2019-11-21 * * Copyright 2019 Stefano Cudini * stefano.cudini@gmail.com @@ -11,8 +11,7 @@ * http://labs.easyblog.it/maps/leaflet-panel-layers/ * * Source: - * git@github.com:stefanocudini/leaflet-panel-layers.git + * git+https://github.com/Istador/leaflet-panel-layers.git * */ - -.leaflet-panel-layers .leaflet-panel-layers-list{display:block}.leaflet-top.leaflet-right .leaflet-panel-layers:not(.compact){margin:0}.leaflet-panel-layers{width:30px;min-width:30px}.leaflet-panel-layers.expanded{width:auto;overflow-x:hidden;overflow-y:auto}.leaflet-panel-layers.expanded .leaflet-panel-layers-list{display:block}.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-grouplabel,.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-selector,.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-title>span{display:none}.leaflet-panel-layers-separator{clear:both}.leaflet-panel-layers-item .leaflet-panel-layers-title{display:block;white-space:nowrap;float:none;cursor:pointer}.leaflet-panel-layers-title .leaflet-panel-layers-selector{float:right}.leaflet-panel-layers-group{position:relative;width:auto;height:auto;clear:both;overflow:hidden}.leaflet-panel-layers-icon{text-align:center;float:left}.leaflet-panel-layers-group.collapsible:not(.expanded){height:20px}.leaflet-panel-layers-group.collapsible:not(.expanded) .leaflet-panel-layers-grouplabel{height:20px;overflow:hidden}.leaflet-panel-layers-group.collapsible:not(.expanded) .leaflet-panel-layers-item{display:none}.leaflet-panel-layers-group.collapsible .leaflet-panel-layers-grouplabel{display:block;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.leaflet-panel-layers-item{display:block;height:auto;clear:both;white-space:nowrap;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.leaflet-panel-layers-overlays .leaflet-panel-layers-item{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;width:auto;display:block}.leaflet-panel-layers-base .leaflet-panel-layers-selector{float:left}.leaflet-panel-layers-overlays .leaflet-panel-layers-selector{float:right}.leaflet-panel-layers.expanded .leaflet-panel-layers-overlays input{display:block}.leaflet-control-layers-selector{float:left}.leaflet-panel-layers{padding:4px;background:rgba(255,255,255,.5);box-shadow:-2px 0 8px rgba(0,0,0,.3)}.leaflet-panel-layers.expanded{padding:4px}.leaflet-panel-layers-selector{position:relative;top:1px;margin-top:2px}.leaflet-panel-layers-separator{height:8px;margin:12px 4px 0;border-top:1px solid rgba(0,0,0,.3)}.leaflet-panel-layers-item{min-height:20px}.leaflet-panel-layers-margin{height:25px}.leaflet-panel-layers-icon{line-height:20px;display:inline-block;height:20px;width:20px;background:#fff}.leaflet-panel-layers-group.collapsible .leaflet-panel-layers-icon:first-child{min-width:20px;font-size:16px;text-align:center;background:0 0}.leaflet-panel-layers-group{padding:2px 4px;margin-bottom:4px;border:1px solid rgba(0,0,0,.3);background:rgba(255,255,255,.6);border-radius:3px}.leaflet-panel-layers-overlays .leaflet-panel-layers-item{margin-bottom:4px;padding:2px;background:#fff;border:1px solid rgba(0,0,0,.3);border-radius:4px}.leaflet-panel-layers-overlays .leaflet-panel-layers-item:hover{border:1px solid #888;cursor:pointer} \ No newline at end of file +.leaflet-panel-layers .leaflet-panel-layers-list{display:block}.leaflet-panel-layers.expanded .leaflet-panel-layers-list{display:block}.leaflet-top.leaflet-right .leaflet-panel-layers:not(.compact){margin:0}.leaflet-panel-layers{width:30px;min-width:30px}.leaflet-panel-layers.expanded{width:auto;overflow-x:hidden;overflow-y:auto}.leaflet-panel-layers.expanded .leaflet-panel-layers-list{display:block}.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-grouplabel,.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-selector,.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-title>span{display:none}.leaflet-panel-layers-separator{clear:both}.leaflet-panel-layers-item .leaflet-panel-layers-title{display:block;white-space:nowrap;float:none;cursor:pointer}.leaflet-panel-layers-title .leaflet-panel-layers-selector{float:right}.leaflet-panel-layers-group{position:relative;width:auto;height:auto;clear:both;overflow:hidden}.leaflet-panel-layers-icon{text-align:center;float:left}.leaflet-panel-layers-group.collapsible:not(.expanded){height:20px}.leaflet-panel-layers-group.collapsible:not(.expanded) .leaflet-panel-layers-grouplabel{height:20px;overflow:hidden}.leaflet-panel-layers-group.collapsible:not(.expanded) .leaflet-panel-layers-item{display:none}.leaflet-panel-layers-group.collapsible .leaflet-panel-layers-grouplabel{display:block;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.leaflet-panel-layers-item{display:block;height:auto;clear:both;white-space:nowrap;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.leaflet-panel-layers-overlays .leaflet-panel-layers-item{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;width:auto;display:block}.leaflet-panel-layers-base .leaflet-panel-layers-selector{float:left}.leaflet-panel-layers-overlays .leaflet-panel-layers-selector{float:right}.leaflet-panel-layers.expanded .leaflet-panel-layers-overlays input{display:block}.leaflet-control-layers-selector{float:left}.leaflet-panel-layers{padding:4px;background:rgba(255,255,255,.5);box-shadow:-2px 0 8px rgba(0,0,0,.3)}.leaflet-panel-layers.expanded{padding:4px}.leaflet-panel-layers-selector{position:relative;top:1px;margin-top:2px}.leaflet-panel-layers-separator{height:8px;margin:12px 4px 0 4px;border-top:1px solid rgba(0,0,0,.3)}.leaflet-panel-layers-item{min-height:20px}.leaflet-panel-layers-margin{height:25px}.leaflet-panel-layers-icon{line-height:20px;display:inline-block;height:20px;width:20px;background:#fff}.leaflet-panel-layers-group.collapsible .leaflet-panel-layers-icon:first-child{min-width:20px;font-size:16px;text-align:center;background:0 0}.leaflet-panel-layers-group{padding:2px 4px;margin-bottom:4px;border:1px solid rgba(0,0,0,.3);background:rgba(255,255,255,.6);border-radius:3px}.leaflet-panel-layers-overlays .leaflet-panel-layers-item{margin-bottom:4px;padding:2px;background:#fff;border:1px solid rgba(0,0,0,.3);border-radius:4px}.leaflet-panel-layers-overlays .leaflet-panel-layers-item:hover{border:1px solid #888;cursor:pointer} \ No newline at end of file diff --git a/dist/leaflet-panel-layers.min.js b/dist/leaflet-panel-layers.min.js index 43faa30..742b857 100644 --- a/dist/leaflet-panel-layers.min.js +++ b/dist/leaflet-panel-layers.min.js @@ -1,5 +1,5 @@ /** - * Leaflet Panel Layers v1.2.6 - 2019-08-11 + * Leaflet Panel Layers v1.2.7 - 2019-11-21 * * Copyright 2019 Stefano Cudini * stefano.cudini@gmail.com @@ -11,7 +11,7 @@ * http://labs.easyblog.it/maps/leaflet-panel-layers/ * * Source: - * git@github.com:stefanocudini/leaflet-panel-layers.git + * git+https://github.com/Istador/leaflet-panel-layers.git * */ -!function(a){if("function"==typeof define&&define.amd)define(["leaflet"],a);else if("undefined"!=typeof module)module.exports=a(require("leaflet"));else{if("undefined"==typeof window.L)throw"Leaflet must be loaded first";a(window.L)}}(function(a){return a.Control.PanelLayers=a.Control.Layers.extend({includes:"1"===a.version[0]?a.Evented.prototype:a.Mixin.Events,options:{compact:!1,compactOffset:0,collapsed:!1,autoZIndex:!0,collapsibleGroups:!1,buildItem:null,title:"",className:"",position:"topright"},initialize:function(b,c,d){a.setOptions(this,d),this._layers=[],this._groups={},this._items={},this._layersActives=[],this._lastZIndex=0,this._handlingClick=!1,this.className="leaflet-panel-layers";var e,f,g;for(e in b)if(b[e].group&&b[e].layers){g=b[e].collapsed||!1;for(f in b[e].layers)this._addLayer(b[e].layers[f],!1,b[e].group,g)}else this._addLayer(b[e],!1);for(e in c)if(c[e].group&&c[e].layers){g=c[e].collapsed||!1;for(f in c[e].layers)this._addLayer(c[e].layers[f],!0,c[e].group,g)}else this._addLayer(c[e],!0)},onAdd:function(b){var c=this;for(var d in this._layersActives)b.addLayer(this._layersActives[d]);return a.Control.Layers.prototype.onAdd.call(this,b),this._map.on("resize",function(a){c._updateHeight(a.newSize.y)}),this._container},addBaseLayer:function(a,b,c){return a.name=b||a.name||"",this._addLayer(a,!1,c),this._update(),this},addOverlay:function(a,b,c){return a.name=b||a.name||"",this._addLayer(a,!0,c),this._update(),this},removeLayer:function(b){var c=b.hasOwnProperty("layer")?this._layerFromDef(b):b;return this._map.removeLayer(c),a.Control.Layers.prototype.removeLayer.call(this,c),this},clearLayers:function(){for(var a=0;ab;b++)c=e[b],d=this._getLayer(c.value),c.checked&&!this._map.hasLayer(d.layer)?(a.DomUtil.addClass(c.parentNode.parentNode,"active"),this._map.addLayer(d.layer)):!c.checked&&this._map.hasLayer(d.layer)&&(a.DomUtil.removeClass(c.parentNode.parentNode,"active"),this._map.removeLayer(d.layer));this._handlingClick=!1,this._refocusOnMap()},_initLayout:function(){var b=this._container=a.DomUtil.create("div",this.className);if(this.options.compact&&a.DomUtil.addClass(b,"compact"),b.setAttribute("aria-haspopup",!0),a.DomEvent.disableClickPropagation(b).disableScrollPropagation(b),this.options.className&&a.DomUtil.addClass(b,this.options.className),this._section=this._form=a.DomUtil.create("form",this.className+"-list"),this._updateHeight(),this.options.collapsed?(a.Browser.android?a.DomEvent.on(b,"click",this._expand,this):a.DomEvent.on(b,"mouseenter",this._expand,this).on(b,"mouseleave",this._collapse,this),this._map.on("click",this._collapse,this)):this._expand(),this._baseLayersList=a.DomUtil.create("div",this.className+"-base",this._form),this._separator=a.DomUtil.create("div",this.className+"-separator",this._form),this._overlaysList=a.DomUtil.create("div",this.className+"-overlays",this._form),this.options.title){var c=a.DomUtil.create("label",this.className+"-title");c.innerHTML=""+this.options.title+"",b.appendChild(c)}b.appendChild(this._form)},_updateHeight:function(a){a=a||this._map.getSize().y,this.options.compact?this._form.style.maxHeight=a-this.options.compactOffset+"px":this._form.style.height=a+"px"},_expand:function(){a.DomUtil.addClass(this._container,"expanded")},_collapse:function(){this._container.className=this._container.className.replace("expanded","")},_getPath:function(a,b){var c=b.split("."),d=c.pop(),e=c.length,f=c[0],g=1;if(e>0)for(;(a=a[f])&&e>g;)f=c[g++];return a?a[d]:void 0}}),a.control.panelLayers=function(b,c,d){return new a.Control.PanelLayers(b,c,d)},a.Control.PanelLayers}); \ No newline at end of file +!function(e){if("function"==typeof define&&define.amd)define(["leaflet"],e);else if("undefined"!=typeof module)module.exports=e(require("leaflet"));else{if(void 0===window.L)throw"Leaflet must be loaded first";e(window.L)}}(function(h){return h.Control.PanelLayers=h.Control.Layers.extend({includes:"1"===h.version[0]?h.Evented.prototype:h.Mixin.Events,options:{compact:!1,compactOffset:0,collapsed:!1,autoZIndex:!0,collapsibleGroups:!1,groupCheckboxes:!0,buildItem:null,title:"",className:"",position:"topright"},initialize:function(e,t,a){var i,s,r,n;for(i in h.setOptions(this,a),this._layers=[],this._groups={},this._items={},this._layersActives=[],this._lastZIndex=0,this._handlingClick=!1,this.className="leaflet-panel-layers",e)if((r=e[i]).group&&r.layers)for(s in n=r.collapsed||!1,r.layers)this._addLayer(r.layers[s],!1,r.group,n);else this._addLayer(e[i],!1);for(i in t)if((r=t[i]).group&&r.layers)for(s in n=r.collapsed||!1,r.layers)this._addLayer(r.layers[s],!0,r.group,n);else this._addLayer(r,!0)},onAdd:function(e){for(var t in this._layersActives)e.addLayer(this._layersActives[t]);return h.Control.Layers.prototype.onAdd.call(this,e),this._map.on("resize",function(e){this._updateHeight(e.newSize.y)},this),this._onInputClick(),this._container},addBaseLayer:function(e,t,a){return e.name=t||e.name||"",this._addLayer(e,!1,a),this._update(),this},addOverlay:function(e,t,a){return e.name=t||e.name||"",this._addLayer(e,!0,a),this._update(),this},removeLayer:function(e){var t=e.hasOwnProperty("layer")?this._layerFromDef(e):e;return this._map.removeLayer(t),h.Control.Layers.prototype.removeLayer.call(this,t),this},clearLayers:function(){for(var e in this._layers)this.removeLayer(this._layers[e])},_layerFromDef:function(e){for(var t in this._layers){var a=h.stamp(this._layers[t].layer);if(this._getLayer(a).name===e.name)return this._getLayer(a).layer}},_update:function(){this._groups={},this._items={},h.Control.Layers.prototype._update.call(this)},_getLayer:function(e){for(var t in this._layers){var a=this._layers[t];if(a&&a.id==e)return a}},_addLayer:function(e,t,a,i){if(!e.layer)throw new Error("layer not defined in item: "+(e.name||""));e.layer instanceof h.Class||!e.layer.type||!e.layer.args||(e.layer=this._getPath(h,e.layer.type).apply(h,e.layer.args)),e.hasOwnProperty("id")||(e.id=h.stamp(e.layer)),e.active&&this._layersActives.push(e.layer),this._layers.push(h.Util.extend(e,{collapsed:i,overlay:t,group:a})),this.options.autoZIndex&&e.layer&&e.layer.setZIndex&&(this._lastZIndex++,e.layer.setZIndex(this._lastZIndex))},_createItem:function(e){var t,a,i,s=this;t=h.DomUtil.create("div",this.className+"-item"+(e.active?" active":"")),i=this._map.hasLayer(e.layer),e.overlay?((a=h.DomUtil.create("input",this.className+"-selector")).type="checkbox",a.defaultChecked=i):a=this._createRadioElement("leaflet-base-layers",i,e),a.value=e.id,a.layerId=e.id,a.id=e.id,a._layer=e,h.DomEvent.on(a,"click",function(e){s._onInputClick(),s.fire(e.target.checked?"panel:selected":"panel:unselected",e.target._layer)},this);var r=h.DomUtil.create("label",this.className+"-title"),n=h.DomUtil.create("span");if(n.innerHTML=e.name||"",e.icon){var o=h.DomUtil.create("i",this.className+"-icon");"string"==typeof e.icon?o.innerHTML=e.icon||"":o.appendChild(e.icon),r.appendChild(o)}if(r.appendChild(a),r.appendChild(n),t.appendChild(r),this.options.buildItem){var l=this.options.buildItem.call(this,e);if("string"==typeof l){var c=h.DomUtil.create("div");c.innerHTML=l,t.appendChild(c.firstChild)}else t.appendChild(l)}return this._items[a.value]=t},_createRadioElement:function(e,t,a){var i=document.createElement("div");return i.innerHTML='",i.firstChild},_addItem:function(e){var t,a=e.overlay?this._overlaysList:this._baseLayersList;return e.group&&(e.group.hasOwnProperty("name")||(e.group={name:e.group}),this._groups[e.group.name]||(this._groups[e.group.name]=this._createGroup(e.group,!0===e.collapsed,e.overlay)),a.appendChild(this._groups[e.group.name]),a=this._groups[e.group.name]),t=this._createItem(e),a.appendChild(t),t},_createGroup:function(e,t,a){var i,s,r=h.DomUtil.create("div",this.className+"-group"),n=h.DomUtil.create("label",this.className+"-grouplabel",r);return this.options.collapsibleGroups&&(h.DomUtil.addClass(r,"collapsible"),!1===t&&h.DomUtil.addClass(r,"expanded"),(i=h.DomUtil.create("i",this.className+"-icon",n)).innerHTML=!0===t?" + ":" - ",h.DomEvent.on(n,"click",function(e){e.stopPropagation(),e.preventDefault(),h.DomUtil.hasClass(r,"expanded")?(h.DomUtil.removeClass(r,"expanded"),i.innerHTML=" + "):(h.DomUtil.addClass(r,"expanded"),i.innerHTML=" - "),this._updateHeight()},this)),h.DomUtil.create("span",this.className+"-title",n).innerHTML=e.name,a&&this.options.groupCheckboxes&&((s=h.DomUtil.create("input",this.className+"-selector",n)).type="checkbox",s.value="group",s.name=e.name,s.defaultChecked=!1,h.DomEvent.on(s,"click",this._onGroupClick,this)),r},_onGroupClick:function(e){var t,a,i=e.target,s=this._form.getElementsByClassName(this.className+"-selector"),r=s.length,n=[];e.stopPropagation();for(var o=0;o"+this.options.title+"",e.appendChild(t)}e.appendChild(this._form)},_updateHeight:function(e){e=e||this._map.getSize().y,this.options.compact?this._form.style.maxHeight=e-this.options.compactOffset+"px":this._form.style.height=e+"px"},_expand:function(){h.DomUtil.addClass(this._container,"expanded")},_collapse:function(){this._container.className=this._container.className.replace("expanded","")},_getPath:function(e,t){var a=t.split("."),i=a.pop(),s=a.length,r=a[0],n=1;if(0 span, .leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-selector, .leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-grouplabel { - display: none; + display: none; } .leaflet-panel-layers-separator { - clear: both; + clear: both; } .leaflet-panel-layers-item .leaflet-panel-layers-title { - display: block; - white-space: nowrap; - float: none; - cursor: pointer; + display: block; + white-space: nowrap; + float: none; + cursor: pointer; } .leaflet-panel-layers-title .leaflet-panel-layers-selector { - float: right; + float: right; } .leaflet-panel-layers-group { - position: relative; - width: auto; - height: auto; - clear: both; - overflow: hidden; + position: relative; + width: auto; + height: auto; + clear: both; + overflow: hidden; } .leaflet-panel-layers-icon { - text-align: center; - float: left; + text-align: center; + float: left; } .leaflet-panel-layers-group.collapsible:not(.expanded) { - height: 20px; + height: 20px; } .leaflet-panel-layers-group.collapsible:not(.expanded) .leaflet-panel-layers-grouplabel { - height: 20px; - overflow: hidden; + height: 20px; + overflow: hidden; } .leaflet-panel-layers-group.collapsible:not(.expanded) .leaflet-panel-layers-item { - display: none; + display: none; } .leaflet-panel-layers-group.collapsible .leaflet-panel-layers-grouplabel { - display: block; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + display: block; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .leaflet-panel-layers-item { - display: block; - height: auto; - clear: both; - white-space: nowrap; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + display: block; + height: auto; + clear: both; + white-space: nowrap; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .leaflet-panel-layers-overlays .leaflet-panel-layers-item { - white-space: pre-wrap; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - word-wrap: break-word; - width: auto; - display: block; + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; + width: auto; + display: block; } .leaflet-panel-layers-base .leaflet-panel-layers-selector { - float: left; + float: left; } .leaflet-panel-layers-overlays .leaflet-panel-layers-selector { - float: right; + float: right; } .leaflet-panel-layers.expanded .leaflet-panel-layers-overlays input { - display: block; + display: block; } .leaflet-control-layers-selector { - float: left; + float: left; } /* theming style */ .leaflet-panel-layers { - padding: 4px; - background: rgba(255,255,255,0.5); - box-shadow: -2px 0 8px rgba(0,0,0,0.3); + padding: 4px; + background: rgba(255,255,255,0.5); + box-shadow: -2px 0 8px rgba(0,0,0,0.3); } .leaflet-panel-layers.expanded { - padding: 4px; + padding: 4px; } .leaflet-panel-layers-selector { - position: relative; - top: 1px; - margin-top: 2px; + position: relative; + top: 1px; + margin-top: 2px; } .leaflet-panel-layers-separator { - height: 8px; - margin: 12px 4px 0 4px; - border-top:1px solid rgba(0,0,0,0.3); + height: 8px; + margin: 12px 4px 0 4px; + border-top:1px solid rgba(0,0,0,0.3); } .leaflet-panel-layers-item { - min-height: 20px; + min-height: 20px; } .leaflet-panel-layers-margin { - height: 25px; + height: 25px; } .leaflet-panel-layers-icon { - line-height: 20px; - display: inline-block; - height: 20px; - width: 20px; - background: #fff; + line-height: 20px; + display: inline-block; + height: 20px; + width: 20px; + background: #fff; } .leaflet-panel-layers-group.collapsible .leaflet-panel-layers-icon:first-child { - min-width: 20px; - font-size: 16px; - text-align: center; - background: none; + min-width: 20px; + font-size: 16px; + text-align: center; + background: none; } .leaflet-panel-layers-group { - padding: 2px 4px; - margin-bottom: 4px; - border: 1px solid rgba(0,0,0,0.3); - background: rgba(255,255,255,0.6); - border-radius: 3px; + padding: 2px 4px; + margin-bottom: 4px; + border: 1px solid rgba(0,0,0,0.3); + background: rgba(255,255,255,0.6); + border-radius: 3px; } .leaflet-panel-layers-overlays .leaflet-panel-layers-item { - margin-bottom: 4px; - padding: 2px; - background: #fff; - border: 1px solid rgba(0,0,0,0.3); - border-radius: 4px; + margin-bottom: 4px; + padding: 2px; + background: #fff; + border: 1px solid rgba(0,0,0,0.3); + border-radius: 4px; } .leaflet-panel-layers-overlays .leaflet-panel-layers-item:hover { - border: 1px solid #888; - cursor: pointer; + border: 1px solid #888; + cursor: pointer; } diff --git a/dist/leaflet-panel-layers.src.js b/dist/leaflet-panel-layers.src.js index 5211f8d..0ef03f0 100644 --- a/dist/leaflet-panel-layers.src.js +++ b/dist/leaflet-panel-layers.src.js @@ -1,5 +1,5 @@ /** - * Leaflet Panel Layers v1.2.6 - 2019-08-11 + * Leaflet Panel Layers v1.2.7 - 2019-11-21 * * Copyright 2019 Stefano Cudini * stefano.cudini@gmail.com @@ -11,446 +11,572 @@ * http://labs.easyblog.it/maps/leaflet-panel-layers/ * * Source: - * git@github.com:stefanocudini/leaflet-panel-layers.git + * git+https://github.com/Istador/leaflet-panel-layers.git * */ (function (factory) { if (typeof define === 'function' && define.amd) { - //AMD - define(['leaflet'], factory); + //AMD + define(['leaflet'], factory); } else if (typeof module !== 'undefined') { - // Node/CommonJS - module.exports = factory(require('leaflet')); + // Node/CommonJS + module.exports = factory(require('leaflet')); } else { - // Browser globals - if (typeof window.L === 'undefined') - throw 'Leaflet must be loaded first'; - factory(window.L); + // Browser globals + if (typeof window.L === 'undefined') + throw 'Leaflet must be loaded first'; + factory(window.L); } })(function (L) { L.Control.PanelLayers = L.Control.Layers.extend({ - includes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events, - - options: { - compact: false, - compactOffset: 0, - collapsed: false, - autoZIndex: true, - collapsibleGroups: false, - buildItem: null, //function that return row item html node(or html string) - title: '', //title of panel - className: '', //additional class name for panel - position: 'topright' - }, - - initialize: function (baseLayers, overlays, options) { - L.setOptions(this, options); - this._layers = []; - this._groups = {}; - this._items = {}; - this._layersActives = []; - this._lastZIndex = 0; - this._handlingClick = false; - - this.className = 'leaflet-panel-layers'; - - var i, n, isCollapsed; - - for (i in baseLayers) { - if (baseLayers[i].group && baseLayers[i].layers) { - isCollapsed = baseLayers[i].collapsed || false; - for (n in baseLayers[i].layers) - this._addLayer(baseLayers[i].layers[n], false, baseLayers[i].group, isCollapsed); - } - else - this._addLayer(baseLayers[i], false); - } - - for (i in overlays) { - if (overlays[i].group && overlays[i].layers) { - isCollapsed = overlays[i].collapsed || false; - for (n in overlays[i].layers) - this._addLayer(overlays[i].layers[n], true, overlays[i].group, isCollapsed); - } - else - this._addLayer(overlays[i], true); - } - }, - - onAdd: function (map) { - - var self = this; - - for (var i in this._layersActives) { - map.addLayer(this._layersActives[i]); - } - - L.Control.Layers.prototype.onAdd.call(this, map); - - this._map.on('resize', function(e) { - self._updateHeight(e.newSize.y); - }); - - return this._container; - }, - - //TODO addBaseLayerGroup - //TODO addOverlayGroup - - addBaseLayer: function (layer, name, group) { - layer.name = name || layer.name || ''; - this._addLayer(layer, false, group); - this._update(); - return this; - }, - - addOverlay: function (layer, name, group) { - layer.name = name || layer.name || ''; - this._addLayer(layer, true, group); - this._update(); - return this; - }, - - removeLayer: function (layerDef) { - var layer = layerDef.hasOwnProperty('layer') ? this._layerFromDef(layerDef) : layerDef; - - this._map.removeLayer(layer); - - L.Control.Layers.prototype.removeLayer.call(this, layer); - return this; - }, - - clearLayers: function () { - for (var i = 0; i < this._layers.length; i++) { - this.removeLayer(this._layers[i]); - } - }, - - _layerFromDef: function (layerDef) { - for (var i = 0; i < this._layers.length; i++) { - var id = L.stamp(this._layers[i].layer); - //TODO add more conditions to comparing definitions - if (this._getLayer(id).name === layerDef.name) - return this._getLayer(id).layer; - } - }, - - _update: function () { - this._groups = {}; - this._items = {}; - L.Control.Layers.prototype._update.call(this); - }, - - _getLayer: function (id) { - for (var i = 0; i < this._layers.length; i++) { - if (this._layers[i] && this._layers[i].id == id) { - return this._layers[i]; - } - } - }, - - _addLayer: function (layerDef, overlay, group, isCollapsed) { - - if(!layerDef.layer) - throw new Error('layer not defined in item: '+(layerDef.name||'')); - - if (!(layerDef.layer instanceof L.Class) && - (layerDef.layer.type && layerDef.layer.args)) { - layerDef.layer = this._getPath(L, layerDef.layer.type).apply(L, layerDef.layer.args); - } - - if(!layerDef.hasOwnProperty('id')) - layerDef.id = L.stamp(layerDef.layer); - - if(layerDef.active) - this._layersActives.push(layerDef.layer); - - this._layers.push(L.Util.extend(layerDef, { - collapsed: isCollapsed, - overlay: overlay, - group: group - })); - if (this.options.autoZIndex && layerDef.layer && layerDef.layer.setZIndex) { - this._lastZIndex++; - layerDef.layer.setZIndex(this._lastZIndex); - } + includes: (L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events), - }, - _createItem: function (obj) { - - var self = this; - - var item, input, checked; - - item = L.DomUtil.create('div', this.className + '-item' + (obj.active ? ' active' : '')); - - checked = this._map.hasLayer(obj.layer); - - if (obj.overlay) { - input = L.DomUtil.create('input', this.className + '-selector'); - input.type = 'checkbox'; - input.defaultChecked = checked; - //TODO name - } else - input = this._createRadioElement('leaflet-base-layers', checked, obj); + options: { + compact : false, + compactOffset : 0, + collapsed : false, + autoZIndex : true, + collapsibleGroups : false, + groupCheckboxes : true, + buildItem : null, //function that return row item html node(or html string) + title : '', //title of panel + className : '', //additional class name for panel + position : 'topright', + }, - input.value = obj.id; - input.layerId = obj.id; - input.id = obj.id; - input._layer = obj; - L.DomEvent.on(input, 'click', function (e) { + initialize: function (baseLayers, overlays, options) { + L.setOptions(this, options); + this._layers = []; + this._groups = {}; + this._items = {}; + this._layersActives = []; + this._lastZIndex = 0; + this._handlingClick = false; - self._onInputClick(); + this.className = 'leaflet-panel-layers'; - if (e.target.checked) { - self.fire('panel:selected', e.target._layer); - } else { - self.fire('panel:unselected', e.target._layer); - } + var i, n, lay, isCollapsed; - }, this); + for (i in baseLayers) { + lay = baseLayers[i]; + if (lay.group && lay.layers) { + isCollapsed = lay.collapsed || false; + for (n in lay.layers) { + this._addLayer(lay.layers[n], false, lay.group, isCollapsed); + } + } + else { + this._addLayer(baseLayers[i], false); + } + } + + for (i in overlays) { + lay = overlays[i]; + if (lay.group && lay.layers) { + isCollapsed = lay.collapsed || false; + for (n in lay.layers) { + this._addLayer(lay.layers[n], true, lay.group, isCollapsed); + } + } + else { + this._addLayer(lay, true); + } + } + }, + + + onAdd: function (map) { + for (var key in this._layersActives) { + map.addLayer(this._layersActives[key]); + } + + L.Control.Layers.prototype.onAdd.call(this, map); + + this._map.on('resize', function(e) { + this._updateHeight(e.newSize.y); + }, this); + + // update group checkboxes + this._onInputClick(); + + return this._container; + }, + + + //TODO addBaseLayerGroup + //TODO addOverlayGroup - var label = L.DomUtil.create('label', this.className + '-title'); - //TODO label.htmlFor = input.id; - var title = L.DomUtil.create('span'); - title.innerHTML = obj.name || ''; - if (obj.icon) { - var icon = L.DomUtil.create('i', this.className + '-icon'); + addBaseLayer: function (layer, name, group) { + layer.name = name || layer.name || ''; + this._addLayer(layer, false, group); + this._update(); + return this; + }, + + + addOverlay: function (layer, name, group) { + layer.name = name || layer.name || ''; + this._addLayer(layer, true, group); + this._update(); + return this; + }, + + + removeLayer: function (layerDef) { + var layer = (layerDef.hasOwnProperty('layer') ? this._layerFromDef(layerDef) : layerDef); + + this._map.removeLayer(layer); + + L.Control.Layers.prototype.removeLayer.call(this, layer); + return this; + }, + + + clearLayers: function () { + for (var key in this._layers) { + this.removeLayer(this._layers[key]); + } + }, + + + _layerFromDef: function (layerDef) { + for (var key in this._layers) { + var id = L.stamp(this._layers[key].layer); + //TODO add more conditions to comparing definitions + if (this._getLayer(id).name === layerDef.name) + return this._getLayer(id).layer; + } + }, + + + _update: function () { + this._groups = {}; + this._items = {}; + L.Control.Layers.prototype._update.call(this); + }, + + + _getLayer: function (id) { + for (var key in this._layers) { + var lay = this._layers[key]; + if (lay && lay.id == id) { + return lay; + } + } + }, + + _addLayer: function (layerDef, overlay, group, isCollapsed) { + if (!layerDef.layer) { + throw new Error('layer not defined in item: '+(layerDef.name||'')); + } + + if (!(layerDef.layer instanceof L.Class) && + (layerDef.layer.type && layerDef.layer.args) + ) { + layerDef.layer = this._getPath(L, layerDef.layer.type).apply(L, layerDef.layer.args); + } + + if (!layerDef.hasOwnProperty('id')) { + layerDef.id = L.stamp(layerDef.layer); + } + + if (layerDef.active) { + this._layersActives.push(layerDef.layer); + } + + this._layers.push(L.Util.extend(layerDef, { + collapsed: isCollapsed, + overlay: overlay, + group: group + })); + + if (this.options.autoZIndex && layerDef.layer && layerDef.layer.setZIndex) { + this._lastZIndex++; + layerDef.layer.setZIndex(this._lastZIndex); + } + }, + + + _createItem: function (obj) { + var self = this; + var item, input, checked; + + item = L.DomUtil.create('div', this.className + '-item' + (obj.active ? ' active' : '')); + + checked = this._map.hasLayer(obj.layer); + + if (obj.overlay) { + input = L.DomUtil.create('input', this.className + '-selector'); + input.type = 'checkbox'; + input.defaultChecked = checked; + //TODO name + } + else { + input = this._createRadioElement('leaflet-base-layers', checked, obj); + } + + input.value = obj.id; + input.layerId = obj.id; + input.id = obj.id; + input._layer = obj; + + L.DomEvent.on(input, 'click', function (e) { + self._onInputClick(); + self.fire((e.target.checked ? 'panel:selected' : 'panel:unselected'), e.target._layer); + }, this); + + var label = L.DomUtil.create('label', this.className + '-title'); + //TODO label.htmlFor = input.id; + var title = L.DomUtil.create('span'); + title.innerHTML = obj.name || ''; + + if (obj.icon) { + var icon = L.DomUtil.create('i', this.className + '-icon'); + + if (typeof obj.icon === 'string') { + icon.innerHTML = obj.icon || ''; + } + else { + icon.appendChild(obj.icon); + } + + label.appendChild(icon); + } + + label.appendChild(input); + label.appendChild(title); + item.appendChild(label); + + if (this.options.buildItem) { + var node = this.options.buildItem.call(this, obj); //custom node node or html string + if (typeof node === 'string') { + var tmp = L.DomUtil.create('div'); + tmp.innerHTML = node; + item.appendChild(tmp.firstChild); + } + else { + item.appendChild(node); + } + } + + this._items[input.value] = item; + + return item; + }, + + + // IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe) + _createRadioElement: function (name, checked, obj) { + var radioFragment = document.createElement('div'); + radioFragment.innerHTML = ( + '' + ); + return radioFragment.firstChild; + }, + + + _addItem: function (obj) { + var label; + var list = (obj.overlay ? this._overlaysList : this._baseLayersList); + + if (obj.group) { + if (!obj.group.hasOwnProperty('name')) { + obj.group = {name: obj.group}; + } + + if (!this._groups[obj.group.name]) { + this._groups[obj.group.name] = this._createGroup(obj.group, obj.collapsed === true, obj.overlay); + } + + list.appendChild(this._groups[obj.group.name]); + list = this._groups[obj.group.name]; + } + + label = this._createItem(obj); + + list.appendChild(label); + + return label; + }, + + + _createGroup: function (groupdata, isCollapsed, isOverlay) { + var groupdiv = L.DomUtil.create('div', this.className + '-group'); + var grouplabel = L.DomUtil.create('label', this.className + '-grouplabel', groupdiv); + var groupexp; // +/- + var grouptit; // name + var groupchb; // checkbox + + // collapsible group + if (this.options.collapsibleGroups) { + // classes + L.DomUtil.addClass(groupdiv, 'collapsible'); + if (isCollapsed === false) { + L.DomUtil.addClass(groupdiv, 'expanded'); + } + // +/- icon + groupexp = L.DomUtil.create('i', this.className + '-icon', grouplabel); + groupexp.innerHTML = (isCollapsed === true ? ' + ' : ' - '); + // click on group + L.DomEvent.on(grouplabel, 'click', function (e) { + // do not trigger the checkbox that we might have + e.stopPropagation(); + e.preventDefault(); + // collapse + if (L.DomUtil.hasClass(groupdiv, 'expanded')) { + L.DomUtil.removeClass(groupdiv, 'expanded'); + groupexp.innerHTML = ' + '; + } + // expand + else { + L.DomUtil.addClass(groupdiv, 'expanded'); + groupexp.innerHTML = ' - '; + } + // update the component's total height + this._updateHeight(); + }, this); + } + + // group name + grouptit = L.DomUtil.create('span', this.className + '-title', grouplabel); + grouptit.innerHTML = groupdata.name; + + // group with checkbox + if (isOverlay && this.options.groupCheckboxes) { + // create checkbox + groupchb = L.DomUtil.create('input', this.className + '-selector', grouplabel); + groupchb.type = 'checkbox'; + groupchb.value = 'group'; + groupchb.name = groupdata.name; + groupchb.defaultChecked = false; + // click on checkbox + L.DomEvent.on(groupchb, 'click', this._onGroupClick, this); + } + + return groupdiv; + }, + + + _onGroupClick: function (e) { + var input, obj; + var group = e.target; + var inputs = this._form.getElementsByClassName(this.className + '-selector'); + var inputsLen = inputs.length; + var changes = []; + + // do not trigger the label that could collapse/expand the group + e.stopPropagation(); + + // all layer checkboxes + for (var i = 0; i < inputsLen; i++) { + input = inputs[i]; + if (input.value == 'group') { continue; } + obj = this._getLayer(input.value); + if (obj.group && obj.group.name === group.name) { + // change checkbox values + if (input.checked !== group.checked) { + changes.push(input); + input.checked = group.checked; + } + } + } + + // do the updates to the layers + this._onInputClick(); + + // fire the event that the layers were (un)selected to leaflet + for (var j in changes) { + this.fire((group.checked ? 'panel:selected' : 'panel:unselected'), changes[j]._layer); + } + }, + + + _onInputClick: function () { + var input; + var obj; + var key; + var g; + var inputs = this._form.getElementsByClassName(this.className + '-selector'); + var inputsLen = inputs.length; + var groups = {}; + + // initialize groups + for (key in this._groups) { + groups[key] = { + input : null, + checked : 0, + total : 0, + }; + } + + this._handlingClick = true; + + // all layer checkboxes + for (var i = 0; i < inputsLen; i++) { + input = inputs[i]; + if (input.value == 'group') { + // remember group input + groups[input.name].input = input; + continue; + } + + obj = this._getLayer(input.value); + + // if the obj is part of a group, count up + if (obj.group) { + groups[obj.group.name].total++; + if (input.checked) { + groups[obj.group.name].checked++; + } + } + + // add the layer to the map + if (input.checked && !this._map.hasLayer(obj.layer)) { + L.DomUtil.addClass(input.parentNode.parentNode, 'active'); + this._map.addLayer(obj.layer); + } + // remove the layer from the map + else if (!input.checked && this._map.hasLayer(obj.layer)) { + L.DomUtil.removeClass(input.parentNode.parentNode, 'active'); + this._map.removeLayer(obj.layer); + } + } + + this._handlingClick = false; + + // update all groups that have checkboxes + for (key in groups) { + g = groups[key]; + if (! g.input) { continue; } + + // all + if (g.checked === g.total) { + g.input.indeterminate = false; + g.input.checked = true; + } + // none + else if (g.checked === 0) { + g.input.indeterminate = false; + g.input.checked = false; + } + // some + else { + g.input.indeterminate = true; + // determine whether the next click selects or deselects all by the amount + g.input.checked = (g.checked / g.total) >= 0.5; + } + } + + this._refocusOnMap(); + }, + + + _initLayout: function () { + var container = this._container = L.DomUtil.create('div', this.className); + + if (this.options.compact) { + L.DomUtil.addClass(container, 'compact'); + } + + //Makes this work on IE10 Touch devices by stopping it from firing a mouseout event when the touch is released + container.setAttribute('aria-haspopup', true); + + L.DomEvent + .disableClickPropagation(container) + .disableScrollPropagation(container); + + if (this.options.className) { + L.DomUtil.addClass(container, this.options.className); + } + + this._section = this._form = L.DomUtil.create('form', this.className + '-list'); + + this._updateHeight(); + + if (this.options.collapsed) { + if (L.Browser.android) { + L.DomEvent + .on(container, 'click', this._expand, this); + } + else { + L.DomEvent + .on(container, 'mouseenter', this._expand, this) + .on(container, 'mouseleave', this._collapse, this); + } + this._map.on('click', this._collapse, this); + } + else { + this._expand(); + } + + this._baseLayersList = L.DomUtil.create('div', this.className + '-base', this._form); + this._separator = L.DomUtil.create('div', this.className + '-separator', this._form); + this._overlaysList = L.DomUtil.create('div', this.className + '-overlays', this._form); + + /* maybe useless + if (!this.options.compact) + L.DomUtil.create('div', this.className + '-margin', this._form);*/ + + if (this.options.title) { + var titlabel = L.DomUtil.create('label', this.className + '-title'); + titlabel.innerHTML = '' + this.options.title + ''; + container.appendChild(titlabel); + } + + container.appendChild(this._form); + }, + + + _updateHeight: function (h) { + h = h || this._map.getSize().y; + + if (this.options.compact) { + this._form.style.maxHeight = (h - this.options.compactOffset) + 'px'; + } + else { + this._form.style.height = h + 'px'; + } + }, + + + _expand: function () { + L.DomUtil.addClass(this._container, 'expanded'); + }, + + + _collapse: function () { + this._container.className = this._container.className.replace('expanded', ''); + }, + + + _getPath: function (obj, prop) { + var parts = prop.split('.'); + var last = parts.pop(); + var len = parts.length; + var cur = parts[0]; + var i = 1; + + if (len > 0) { + while ((obj = obj[cur]) && i < len) { + cur = parts[i++]; + } + } - if (typeof obj.icon === 'string') - icon.innerHTML = obj.icon || ''; - else - icon.appendChild(obj.icon); - - label.appendChild(icon); - } - - label.appendChild(input); - label.appendChild(title); - item.appendChild(label); - - if (this.options.buildItem) { - var node = this.options.buildItem.call(this, obj); //custom node node or html string - if (typeof node === 'string') { - var tmp = L.DomUtil.create('div'); - tmp.innerHTML = node; - item.appendChild(tmp.firstChild); - } - else - item.appendChild(node); - } - - this._items[input.value] = item; - - return item; - }, - - // IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe) - _createRadioElement: function (name, checked, obj) { - - var radioHtml = ''; - container.appendChild(titlabel); - } - - container.appendChild(this._form); - }, - - _updateHeight: function (h) { - h = h || this._map.getSize().y; - - if (this.options.compact) - this._form.style.maxHeight = (h - this.options.compactOffset) + 'px'; - else - this._form.style.height = h + 'px'; - }, - - _expand: function () { - L.DomUtil.addClass(this._container, 'expanded'); - }, - - _collapse: function () { - this._container.className = this._container.className.replace('expanded', ''); - }, - - _getPath: function (obj, prop) { - var parts = prop.split('.'), - last = parts.pop(), - len = parts.length, - cur = parts[0], - i = 1; - - if (len > 0) - while ((obj = obj[cur]) && i < len) - cur = parts[i++]; - - if (obj) - return obj[last]; - } + if (obj) { return obj[last]; } + } }); L.control.panelLayers = function (baseLayers, overlays, options) { - return new L.Control.PanelLayers(baseLayers, overlays, options); + return new L.Control.PanelLayers(baseLayers, overlays, options); }; return L.Control.PanelLayers; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f02133a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1471 @@ +{ + "name": "@istador/leaflet-panel-layers", + "version": "1.2.7", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } + } + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "body": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "dev": true, + "requires": { + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "clean-css": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "^7.1.1" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "coffeescript": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", + "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", + "dev": true + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "continuable-cache": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + }, + "entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + }, + "error": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", + "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "dev": true, + "requires": { + "string-template": "~0.2.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", + "dev": true, + "requires": { + "glob": "~5.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "requires": { + "globule": "^1.0.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true + }, + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globule": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", + "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "dev": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "grunt": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.4.tgz", + "integrity": "sha512-PYsMOrOC+MsdGEkFVwMaMyc6Ob7pKmq+deg1Sjr+vvMWp35sztfwKE7qoN51V+UEtHsyNuMcGdgMLFkBHvMxHQ==", + "dev": true, + "requires": { + "coffeescript": "~1.10.0", + "dateformat": "~1.0.12", + "eventemitter2": "~0.4.13", + "exit": "~0.1.1", + "findup-sync": "~0.3.0", + "glob": "~7.0.0", + "grunt-cli": "~1.2.0", + "grunt-known-options": "~1.1.0", + "grunt-legacy-log": "~2.0.0", + "grunt-legacy-util": "~1.1.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.13.0", + "minimatch": "~3.0.2", + "mkdirp": "~0.5.1", + "nopt": "~3.0.6", + "path-is-absolute": "~1.0.0", + "rimraf": "~2.6.2" + }, + "dependencies": { + "grunt-cli": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", + "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "dev": true, + "requires": { + "findup-sync": "~0.3.0", + "grunt-known-options": "~1.1.0", + "nopt": "~3.0.6", + "resolve": "~1.1.0" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "grunt-banner": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/grunt-banner/-/grunt-banner-0.6.0.tgz", + "integrity": "sha1-P4eQIdEj+linuloLb7a+QStYhaw=", + "dev": true, + "requires": { + "chalk": "^1.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-clean": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.0.tgz", + "integrity": "sha512-g5ZD3ORk6gMa5ugZosLDQl3dZO7cI3R14U75hTM+dVLVxdMNJCPVmwf9OUt4v4eWgpKKWWoVK9DZc1amJp4nQw==", + "dev": true, + "requires": { + "async": "^2.6.1", + "rimraf": "^2.6.2" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + } + } + }, + "grunt-contrib-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz", + "integrity": "sha1-YVCYYwhOhx1+ht5IwBUlntl3Rb0=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "source-map": "^0.5.3" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-cssmin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-3.0.0.tgz", + "integrity": "sha512-eXpooYmVGKMs/xV7DzTLgJFPVOfMuawPD3x0JwhlH0mumq2NtH3xsxaHxp1Y3NKxp0j0tRhFS6kSBRsz6TuTGg==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "clean-css": "~4.2.1", + "maxmin": "^2.1.0" + } + }, + "grunt-contrib-jshint": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-2.1.0.tgz", + "integrity": "sha512-65S2/C/6RfjY/umTxfwXXn+wVvaYmykHkHSsW6Q6rhkbv3oudTEgqnFFZvWzWCoHUb+3GMZLbP3oSrNyvshmIQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "hooker": "^0.2.3", + "jshint": "~2.10.2" + } + }, + "grunt-contrib-uglify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-4.0.1.tgz", + "integrity": "sha512-dwf8/+4uW1+7pH72WButOEnzErPGmtUvc8p08B0eQS/6ON0WdeQu0+WFeafaPTbbY1GqtS25lsHWaDeiTQNWPg==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "maxmin": "^2.1.0", + "uglify-js": "^3.5.0", + "uri-path": "^1.0.0" + } + }, + "grunt-contrib-watch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", + "integrity": "sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg==", + "dev": true, + "requires": { + "async": "^2.6.0", + "gaze": "^1.1.0", + "lodash": "^4.17.10", + "tiny-lr": "^1.1.1" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + } + } + }, + "grunt-known-options": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz", + "integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ==", + "dev": true + }, + "grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "dev": true, + "requires": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.5" + } + }, + "grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "dev": true, + "requires": { + "chalk": "~2.4.1", + "lodash": "~4.17.10" + } + }, + "grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "dev": true, + "requires": { + "async": "~1.5.2", + "exit": "~0.1.1", + "getobject": "~0.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.10", + "underscore.string": "~3.3.4", + "which": "~1.3.0" + } + }, + "gzip-size": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz", + "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=", + "dev": true, + "requires": { + "duplexer": "^0.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "http-parser-js": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jshint": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.3.tgz", + "integrity": "sha512-d8AoXcNNYzmm7cdmulQ3dQApbrPYArtVBO6n4xOICe4QsXGNHCAKDcFORzqP52LhK61KX0VhY39yYzCsNq+bxQ==", + "dev": true, + "requires": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.11", + "minimatch": "~3.0.2", + "shelljs": "0.3.x", + "strip-json-comments": "1.0.x" + } + }, + "leaflet": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.3.4.tgz", + "integrity": "sha512-FYL1LGFdj6v+2Ifpw+AcFIuIOqjNggfoLUwuwQv6+3sS21Za7Wvapq+LhbSE4NDXrEj6eYnW3y7LsaBICpyXtw==" + }, + "livereload-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "maxmin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz", + "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "figures": "^1.0.1", + "gzip-size": "^3.0.0", + "pretty-bytes": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pretty-bytes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz", + "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "qs": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.1.tgz", + "integrity": "sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA==", + "dev": true + }, + "raw-body": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", + "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", + "dev": true, + "requires": { + "bytes": "1", + "string_decoder": "0.10" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true + }, + "safe-json-parse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", + "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shelljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", + "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tiny-lr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", + "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", + "dev": true, + "requires": { + "body": "^5.1.0", + "debug": "^3.1.0", + "faye-websocket": "~0.10.0", + "livereload-js": "^2.3.0", + "object-assign": "^4.1.0", + "qs": "^6.4.0" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "uglify-js": { + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz", + "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==", + "dev": true, + "requires": { + "commander": "~2.20.3", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "underscore.string": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz", + "integrity": "sha512-g+dpmgn+XBneLmXXo+sGlW5xQEt4ErkS3mgeN2GFbremYeMBSJKr9Wf2KJplQVaiPY/f7FN6atosWYNm9ovrYg==", + "dev": true, + "requires": { + "sprintf-js": "^1.0.3", + "util-deprecate": "^1.0.2" + } + }, + "uri-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", + "integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "websocket-driver": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", + "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0 <0.4.11", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/package.json b/package.json index 5eaa80c..0b1da4c 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "leaflet-panel-layers", - "version": "1.2.6", + "name": "@istador/leaflet-panel-layers", + "version": "1.2.7", "description": "Leaflet Control Layers extended for group of layers and icons legend", "repository": { "type": "git", - "url": "git@github.com:stefanocudini/leaflet-panel-layers.git" + "url": "git+https://github.com/Istador/leaflet-panel-layers.git" }, "homepage": "http://labs.easyblog.it/maps/leaflet-panel-layers/", "main": "dist/leaflet-panel-layers.src.js", @@ -20,16 +20,20 @@ "panel", "leaflet" ], + "scripts": { + "build": "npx grunt" + }, "dependencies": { "leaflet": "~1.3.0" }, "devDependencies": { - "grunt": "^0.4.5", - "grunt-contrib-clean": "~0.5.0", - "grunt-contrib-concat": "~0.3.0", - "grunt-contrib-cssmin": "~0.7.0", - "grunt-contrib-jshint": "~0.7.2", - "grunt-contrib-uglify": "~0.2.7", - "grunt-contrib-watch": "~0.5.3" + "grunt": "^1.0.4", + "grunt-banner": "^0.6.0", + "grunt-contrib-clean": "^2.0.0", + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-cssmin": "^3.0.0", + "grunt-contrib-jshint": "^2.1.0", + "grunt-contrib-uglify": "^4.0.1", + "grunt-contrib-watch": "^1.1.0" } }