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

@sanity/default-layout

Package Overview
Dependencies
Maintainers
6
Versions
1149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/default-layout - npm Package Compare versions

Comparing version 0.99.5 to 0.99.6

38

lib/components/Search.js

@@ -25,4 +25,2 @@ 'use strict';

var _lodash = require('lodash');
var _preview = require('part:@sanity/base/preview?');

@@ -32,2 +30,10 @@

var _location = require('part:@sanity/base/location');
var _location2 = _interopRequireDefault(_location);
var _router = require('part:@sanity/base/router');
var _lodash = require('lodash');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -125,15 +131,9 @@

_this.handleGoToItem = function (item) {
// TODO Hack for assuming desktool until we have a path resolver
// @TODO Hack for assuming desktool until we have a path resolver
var type = item._type.split('.')[1];
var id = item._id.split('/').join('.');
var router = _this.context.router;
var url = ['/desk', type, 'edit', id].join('/');
router.navigate({
Desk: {
action: 'edit',
selectedType: type,
selectedDocumentId: id
},
tool: 'Desk'
});
_location2.default.actions.navigate(url, { replace: false });
_this.setState({

@@ -158,7 +158,11 @@ isOpen: false

if (type && _preview2.default && _schema2.default) {
return _react2.default.createElement(_preview2.default, {
value: item,
style: 'default' // eslint-disable-line
, typeDef: type
});
return _react2.default.createElement(
_router.IntentLink,
{ intent: 'edit', params: { id: item._id, type: typeName } },
_react2.default.createElement(_preview2.default, {
value: item,
style: 'default' // eslint-disable-line
, typeDef: type
})
);
}

@@ -165,0 +169,0 @@ return null;

{
"name": "@sanity/default-layout",
"version": "0.99.5",
"version": "0.99.6",
"description": "The default layout components for Sanity",

@@ -31,8 +31,8 @@ "main": "lib/default-layout.js",

"devDependencies": {
"@sanity/base": "^0.99.4",
"@sanity/base": "^0.99.6",
"@sanity/check": "^0.99.0",
"@sanity/cli": "^0.99.4",
"@sanity/components": "^0.99.5",
"@sanity/cli": "^0.99.6",
"@sanity/components": "^0.99.6",
"@sanity/core": "^0.99.5",
"@sanity/form-builder": "^0.99.5",
"@sanity/form-builder": "^0.99.6",
"chai": "^3.5.0",

@@ -39,0 +39,0 @@ "chai-as-promised": "^6.0.0",

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