You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

netlify-cms-widget-map

Package Overview
Dependencies
Maintainers
14
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-cms-widget-map - npm Package Compare versions

Comparing version

to
1.4.5

8

CHANGELOG.md

@@ -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 @@

14

dist/esm/index.js

@@ -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