@sanity/default-layout
Advanced tools
Comparing version 0.1.10 to 0.1.11
@@ -28,2 +28,6 @@ { | ||
{ | ||
"implements": "part:@sanity/base/schema", | ||
"path": "./schema.js" | ||
}, | ||
{ | ||
"implements": "part:@sanity/base/root", | ||
@@ -39,4 +43,8 @@ "path": "components/DefaultLayoutRouter" | ||
"path": "./LoginDialog" | ||
}, | ||
{ | ||
"implements": "part:@sanity/base/preview-resolver", | ||
"path": "./previewResolver" | ||
} | ||
] | ||
} |
@@ -13,3 +13,3 @@ 'use strict'; | ||
var _Hamburger = require('./styles/Hamburger.css'); | ||
var _Hamburger = require('../../styles/Hamburger.css'); | ||
@@ -16,0 +16,0 @@ var _Hamburger2 = _interopRequireDefault(_Hamburger); |
@@ -13,5 +13,5 @@ 'use strict'; | ||
var _LoginStatus = require('./styles/LoginStatus.css'); | ||
var _reactClickOutside = require('react-click-outside'); | ||
var _LoginStatus2 = _interopRequireDefault(_LoginStatus); | ||
var _reactClickOutside2 = _interopRequireDefault(_reactClickOutside); | ||
@@ -30,2 +30,6 @@ var _user = require('part:@sanity/base/user'); | ||
var _LoginStatus = require('./styles/LoginStatus.css'); | ||
var _LoginStatus2 = _interopRequireDefault(_LoginStatus); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -39,24 +43,28 @@ | ||
var LoginStatus = function (_React$Component) { | ||
_inherits(LoginStatus, _React$Component); | ||
var LoginStatus = function (_React$PureComponent) { | ||
_inherits(LoginStatus, _React$PureComponent); | ||
function LoginStatus(props, args) { | ||
function LoginStatus() { | ||
var _ref; | ||
_classCallCheck(this, LoginStatus); | ||
var _this = _possibleConstructorReturn(this, (LoginStatus.__proto__ || Object.getPrototypeOf(LoginStatus)).call(this, props, args)); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this.handleUserMenuClose = function () { | ||
_this.setState({ | ||
userMenuOpened: false | ||
}); | ||
var _this = _possibleConstructorReturn(this, (_ref = LoginStatus.__proto__ || Object.getPrototypeOf(LoginStatus)).call.apply(_ref, [this].concat(args))); | ||
_this.handleClickOutside = function () { | ||
if (_this.state.userMenuOpened) { | ||
_this.setState({ userMenuOpened: false }); | ||
} | ||
}; | ||
_this.handleUserMenuOpen = function () { | ||
_this.setState({ | ||
userMenuOpened: true | ||
}); | ||
_this.handleUserMenuToggle = function () { | ||
_this.setState({ userMenuOpened: !_this.state.userMenuOpened }); | ||
}; | ||
_this.handleUserMenuItemClick = function (item) { | ||
if (item.index == 'signOut') { | ||
if (item.index === 'signOut') { | ||
_user2.default.actions.logout(); | ||
@@ -105,3 +113,3 @@ } | ||
'div', | ||
{ onClick: this.handleUserMenuOpen }, | ||
{ onClick: this.handleUserMenuToggle }, | ||
_react2.default.createElement('img', { src: user.profileImage, className: _LoginStatus2.default.userImage }) | ||
@@ -134,3 +142,3 @@ ), | ||
return LoginStatus; | ||
}(_react2.default.Component); | ||
}(_react2.default.PureComponent); | ||
@@ -140,2 +148,2 @@ LoginStatus.propTypes = { | ||
}; | ||
exports.default = LoginStatus; | ||
exports.default = (0, _reactClickOutside2.default)(LoginStatus); |
{ | ||
"name": "@sanity/default-layout", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "The default layout components for Sanity", | ||
@@ -29,10 +29,12 @@ "main": "lib/default-layout.js", | ||
"homepage": "https://github.com/sanity-io/default-layout#readme", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"react-click-outside": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"@sanity/base": "^0.2.19", | ||
"@sanity/base": "^0.3.11", | ||
"@sanity/check": "^0.0.3", | ||
"@sanity/cli": "^0.1.19", | ||
"@sanity/components": "^0.0.71", | ||
"@sanity/core": "^0.0.25", | ||
"@sanity/form-builder": "^0.0.61", | ||
"@sanity/cli": "^0.1.25", | ||
"@sanity/components": "^0.0.87", | ||
"@sanity/core": "^0.0.34", | ||
"@sanity/form-builder": "^0.1.17", | ||
"babel-cli": "^6.18.0", | ||
@@ -47,3 +49,3 @@ "babel-eslint": "^7.1.1", | ||
"chai-as-promised": "^6.0.0", | ||
"eslint": "^3.11.1", | ||
"eslint": "^3.12.2", | ||
"eslint-config-sanity": "^2.0.1", | ||
@@ -50,0 +52,0 @@ "eslint-plugin-react": "^6.7.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325498
48
3
1661
+ Addedreact-click-outside@^2.2.0
+ Addedhoist-non-react-statics@1.2.0(transitive)
+ Addedreact-click-outside@2.3.1(transitive)