netlify-cms-widget-map
Advanced tools
Comparing version
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.4.5](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-map/compare/netlify-cms-widget-map@1.4.4...netlify-cms-widget-map@1.4.5) (2021-02-10) | ||
**Note:** Version bump only for package netlify-cms-widget-map | ||
## [1.4.4](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-map/compare/netlify-cms-widget-map@1.4.3...netlify-cms-widget-map@1.4.4) (2020-09-15) | ||
@@ -8,0 +16,0 @@ |
@@ -24,8 +24,10 @@ "use strict"; | ||
const Widget = (opts = {}) => _objectSpread({ | ||
name: 'map', | ||
controlComponent, | ||
previewComponent: _MapPreview.default, | ||
schema: _schema.default | ||
}, opts); | ||
function Widget(opts = {}) { | ||
return _objectSpread({ | ||
name: 'map', | ||
controlComponent, | ||
previewComponent: _MapPreview.default, | ||
schema: _schema.default | ||
}, opts); | ||
} | ||
@@ -32,0 +34,0 @@ const NetlifyCmsWidgetMap = { |
@@ -18,5 +18,7 @@ "use strict"; | ||
const MapPreview = ({ | ||
function MapPreview({ | ||
value | ||
}) => (0, _core.jsx)(_netlifyCmsUiDefault.WidgetPreviewContainer, null, value ? value.toString() : null); | ||
}) { | ||
return (0, _core.jsx)(_netlifyCmsUiDefault.WidgetPreviewContainer, null, value ? value.toString() : null); | ||
} | ||
@@ -23,0 +25,0 @@ MapPreview.propTypes = { |
@@ -41,14 +41,18 @@ "use strict"; | ||
const getDefaultFormat = () => new _GeoJSON.default(formatOptions); | ||
function getDefaultFormat() { | ||
return new _GeoJSON.default(formatOptions); | ||
} | ||
const getDefaultMap = (target, featuresLayer) => new _Map.default({ | ||
target, | ||
layers: [new _Tile.default({ | ||
source: new _OSM.default() | ||
}), featuresLayer], | ||
view: new _View.default({ | ||
center: [0, 0], | ||
zoom: 2 | ||
}) | ||
}); | ||
function getDefaultMap(target, featuresLayer) { | ||
return new _Map.default({ | ||
target, | ||
layers: [new _Tile.default({ | ||
source: new _OSM.default() | ||
}), featuresLayer], | ||
view: new _View.default({ | ||
center: [0, 0], | ||
zoom: 2 | ||
}) | ||
}); | ||
} | ||
@@ -55,0 +59,0 @@ function withMapControl({ |
{ | ||
"name": "netlify-cms-widget-map", | ||
"description": "Widget for editing spatial data in Netlify CMS.", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"homepage": "https://www.netlifycms.org/docs/widgets/#map", | ||
@@ -35,3 +35,3 @@ "repository": "https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-map", | ||
}, | ||
"gitHead": "9f9b93c7182f30007b13518a78ce83c9b25dd21a" | ||
"gitHead": "9348bd40a8cacdf98252e5363cc4c90e045177db" | ||
} |
@@ -6,11 +6,14 @@ import withMapControl from './withMapControl'; | ||
const controlComponent = withMapControl(); | ||
const Widget = (opts = {}) => ({ | ||
name: 'map', | ||
controlComponent, | ||
previewComponent, | ||
schema, | ||
...opts, | ||
}); | ||
function Widget(opts = {}) { | ||
return { | ||
name: 'map', | ||
controlComponent, | ||
previewComponent, | ||
schema, | ||
...opts, | ||
}; | ||
} | ||
export const NetlifyCmsWidgetMap = { Widget, controlComponent, previewComponent }; | ||
export default NetlifyCmsWidgetMap; |
@@ -5,5 +5,5 @@ import React from 'react'; | ||
const MapPreview = ({ value }) => ( | ||
<WidgetPreviewContainer>{value ? value.toString() : null}</WidgetPreviewContainer> | ||
); | ||
function MapPreview({ value }) { | ||
return <WidgetPreviewContainer>{value ? value.toString() : null}</WidgetPreviewContainer>; | ||
} | ||
@@ -10,0 +10,0 @@ MapPreview.propTypes = { |
@@ -18,6 +18,9 @@ import React from 'react'; | ||
}; | ||
const getDefaultFormat = () => new GeoJSON(formatOptions); | ||
const getDefaultMap = (target, featuresLayer) => | ||
new Map({ | ||
function getDefaultFormat() { | ||
return new GeoJSON(formatOptions); | ||
} | ||
function getDefaultMap(target, featuresLayer) { | ||
return new Map({ | ||
target, | ||
@@ -27,2 +30,3 @@ layers: [new TileLayer({ source: new OSMSource() }), featuresLayer], | ||
}); | ||
} | ||
@@ -29,0 +33,0 @@ export default function withMapControl({ getFormat, getMap } = {}) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2056302
0.02%1428
0.92%7
-12.5%