Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/google-maps-input

Package Overview
Dependencies
Maintainers
6
Versions
1130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/google-maps-input - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

yarn.lock

25

lib/GeopointInput.js

@@ -61,7 +61,6 @@ 'use strict';

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(GeopointInput).call(this));
var _this = _possibleConstructorReturn(this, (GeopointInput.__proto__ || Object.getPrototypeOf(GeopointInput)).call(this));
_this.handleToggleModal = _this.handleToggleModal.bind(_this);
_this.handleCloseModal = _this.handleCloseModal.bind(_this);
_this.handleDialogAction = _this.handleDialogAction.bind(_this);

@@ -104,21 +103,9 @@ _this.state = {

}, {
key: 'handleDialogAction',
value: function handleDialogAction(action) {
if (action.key === 'close') {
this.handleCloseModal();
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props;
var value = _props.value;
var field = _props.field;
var _props = this.props,
value = _props.value,
field = _props.field;
var actions = [{
title: 'Close',
key: 'close'
}];
if (!_googleMapsInput2.default || !_googleMapsInput2.default.apiKey) {

@@ -195,5 +182,3 @@ return _react2.default.createElement(

message: (0, _formatters.formatMessage)('google-maps.mapHelpText'),
isOpen: this.state.modalOpen,
actions: actions,
onAction: this.handleDialogAction
isOpen: this.state.modalOpen
},

@@ -200,0 +185,0 @@ _react2.default.createElement(_GoogleMapsLoadProxy2.default, {

32

lib/GeopointSelect.js

@@ -35,3 +35,3 @@ 'use strict';

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(GeopointSelect).call(this, props));
var _this = _possibleConstructorReturn(this, (GeopointSelect.__proto__ || Object.getPrototypeOf(GeopointSelect)).call(this, props));

@@ -45,8 +45,8 @@ _this.elementRefs = {};

value: function componentDidMount() {
var _props$api = this.props.api;
var Map = _props$api.Map;
var Circle = _props$api.Circle;
var places = _props$api.places;
var event = _props$api.event;
var _props$api = this.props.api,
Circle = _props$api.Circle,
places = _props$api.places,
event = _props$api.event;
var GMap = this.props.api.Map;
var geoPoint = this.getValueLatLng();

@@ -58,3 +58,3 @@ var options = {

this.mapInstance = new Map(this.elementRefs.map, options);
this.mapInstance = new GMap(this.elementRefs.map, options);
this.declareMarker();

@@ -74,6 +74,6 @@

value: function getValueLatLng() {
var _props = this.props;
var api = _props.api;
var value = _props.value;
var defaultLocation = _props.defaultLocation;
var _props = this.props,
api = _props.api,
value = _props.value,
defaultLocation = _props.defaultLocation;

@@ -89,5 +89,5 @@ return value ? new api.LatLng(value.lat, value.lng) : new api.LatLng(defaultLocation.lat, defaultLocation.lng);

var _props$api2 = this.props.api;
var Marker = _props$api2.Marker;
var event = _props$api2.event;
var _props$api2 = this.props.api,
Marker = _props$api2.Marker,
event = _props$api2.event;

@@ -124,3 +124,5 @@ this.marker = new Marker({

patch: {
$set: {
type: 'set',
path: [],
value: {
lat: geoPoint.lat(),

@@ -127,0 +129,0 @@ lng: geoPoint.lng()

@@ -33,3 +33,3 @@ 'use strict';

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(GoogleMapsLoadProxy).call(this, props));
var _this = _possibleConstructorReturn(this, (GoogleMapsLoadProxy.__proto__ || Object.getPrototypeOf(GoogleMapsLoadProxy)).call(this, props));

@@ -57,6 +57,6 @@ _this.state = {

value: function render() {
var _state = this.state;
var error = _state.error;
var loading = _state.loading;
var api = _state.api;
var _state = this.state,
error = _state.error,
loading = _state.loading,
api = _state.api;

@@ -63,0 +63,0 @@ if (error) {

{
"name": "@sanity/google-maps-input",
"version": "0.0.2",
"version": "0.0.3",
"description": "Sanity plugin providing input handlers for geo-related input types using Google Maps",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc