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.100.2 to 0.100.3

28

lib/components/DefaultLayout.js

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

var _class, _temp;
var _react = require('react');

@@ -48,3 +50,3 @@

var DefaultLayout = function (_React$Component) {
exports.default = (0, _router.withRouterHOC)((_temp = _class = function (_React$Component) {
_inherits(DefaultLayout, _React$Component);

@@ -61,3 +63,3 @@

value: function maybeRedirectToFirstTool() {
var router = this.context.router;
var router = this.props.router;

@@ -81,4 +83,5 @@ if (!router.state.tool && this.props.tools.length > 0) {

value: function render() {
var router = this.context.router;
var tools = this.props.tools;
var _props = this.props,
tools = _props.tools,
router = _props.router;

@@ -120,15 +123,10 @@ return _react2.default.createElement(

return DefaultLayout;
}(_react2.default.Component);
DefaultLayout.contextTypes = {
router: _react.PropTypes.object
};
DefaultLayout.propTypes = {
}(_react2.default.Component), _class.propTypes = {
router: _react.PropTypes.shape({
state: _react.PropTypes.object,
navigate: _react.PropTypes.func
}),
tools: _react.PropTypes.arrayOf(_react.PropTypes.shape({
name: _react.PropTypes.string
}))
};
exports.default = DefaultLayout;
}, _temp));

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

var _router = require('part:@sanity/base/router');
var _DesktopNavigation = require('./styles/DesktopNavigation.css');

@@ -54,3 +56,3 @@

value: function render() {
var router = this.context.router;
var _this2 = this;

@@ -61,7 +63,13 @@ return _react2.default.createElement(

_react2.default.createElement(_CompanyBranding2.default, null),
_react2.default.createElement(_toolSwitcher2.default, {
tools: this.props.tools,
activeToolName: router.state.tool,
className: _DesktopNavigation2.default.toolSwitcher
}),
_react2.default.createElement(
_router.WithRouter,
null,
function (router) {
return _react2.default.createElement(_toolSwitcher2.default, {
tools: _this2.props.tools,
activeToolName: router.state.tool,
className: _DesktopNavigation2.default.toolSwitcher
});
}
),
_react2.default.createElement(_LoginStatus2.default, { className: _DesktopNavigation2.default.loginStatus }),

@@ -80,7 +88,2 @@ _react2.default.createElement(

DesktopNavigation.contextTypes = {
router: _react.PropTypes.object
};
DesktopNavigation.propTypes = {

@@ -91,3 +94,2 @@ tools: _react.PropTypes.arrayOf(_react.PropTypes.shape({

};
exports.default = DesktopNavigation;

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

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

@@ -84,3 +86,4 @@

value: function render() {
var router = this.context.router;
var _this2 = this;
var isOpen = this.state.isOpen;

@@ -109,8 +112,14 @@ var tools = this.props.tools;

_react2.default.createElement(_LoginStatus2.default, { className: _MobileNavigation2.default.loginStatus }),
_react2.default.createElement(_toolSwitcher2.default, {
tools: tools,
activeToolName: router.state.tool,
className: _MobileNavigation2.default.toolSwitcher,
onClick: this.handleClose
})
_react2.default.createElement(
_router.WithRouter,
null,
function (router) {
return _react2.default.createElement(_toolSwitcher2.default, {
tools: tools,
activeToolName: router.state.tool,
className: _MobileNavigation2.default.toolSwitcher,
onClick: _this2.handleClose
});
}
)
)

@@ -124,7 +133,2 @@ );

MobileNavigation.contextTypes = {
router: _react.PropTypes.object
};
MobileNavigation.propTypes = {

@@ -135,3 +139,2 @@ tools: _react.PropTypes.arrayOf(_react.PropTypes.shape({

};
exports.default = MobileNavigation;

@@ -221,5 +221,2 @@ 'use strict';

};
Search.contextTypes = {
router: _react.PropTypes.object
};
exports.default = Search;
{
"name": "@sanity/default-layout",
"version": "0.100.2",
"version": "0.100.3",
"description": "The default layout components for Sanity",

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

"devDependencies": {
"@sanity/base": "^0.100.0",
"@sanity/base": "^0.100.3",
"@sanity/check": "^0.99.0",
"@sanity/cli": "^0.99.7",
"@sanity/components": "^0.100.0",
"@sanity/core": "^0.99.10",
"@sanity/form-builder": "^0.100.2",
"@sanity/components": "^0.100.3",
"@sanity/core": "^0.100.3",
"@sanity/form-builder": "^0.100.3",
"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