New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@n3/kit

Package Overview
Dependencies
Maintainers
4
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@n3/kit - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

lib/select/wrapper.js

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## 0.8.2 (13 августа 2018)
### Багфикс
* Исправлен баг открытия селекта внутри модального окна, вызванного другим селектом (`Select` и `Select.Async`)
* Исправлен цвет текста индикаторов сортировки внутри таблиц (`SortSwitcher`)
## 0.8.1 (8 августа 2018)

@@ -2,0 +9,0 @@

93

lib/select/async.js

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

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');

@@ -28,5 +26,5 @@

var _modalSelectButton = require('../modal-select-button');
var _wrapper = require('./wrapper');
var _modalSelectButton2 = _interopRequireDefault(_modalSelectButton);
var _wrapper2 = _interopRequireDefault(_wrapper);

@@ -41,67 +39,26 @@ var _texts = require('./texts');

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var CustomizedAsyncSelect = function CustomizedAsyncSelect(props) {
var hasError = props.hasError,
multi = props.multi,
small = props.small,
modalComponent = props.modalComponent,
modalProps = props.modalProps,
restProps = _objectWithoutProperties(props, ['hasError', 'multi', 'small', 'modalComponent', 'modalProps']);
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
return _react2.default.createElement(
_wrapper2.default,
props,
_react2.default.createElement(_reactSelectAsyncPaginate2.default, _extends({}, _texts2.default, {
multi: multi,
className: (0, _classnames2.default)({
'Select_has-error': hasError,
Select_small: small
}),
autosize: false,
closeOnSelect: !multi,
arrowRenderer: modalComponent ? _wrapper.buttonPlaceholderRenderer : undefined
}, restProps))
);
};
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CustomizedAsyncSelect = function (_Component) {
_inherits(CustomizedAsyncSelect, _Component);
function CustomizedAsyncSelect() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, CustomizedAsyncSelect);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CustomizedAsyncSelect.__proto__ || Object.getPrototypeOf(CustomizedAsyncSelect)).call.apply(_ref, [this].concat(args))), _this), _this.buttonRenderer = function () {
var _this$props = _this.props,
disabled = _this$props.disabled,
onChange = _this$props.onChange,
modalComponent = _this$props.modalComponent,
modalProps = _this$props.modalProps;
return _react2.default.createElement(_modalSelectButton2.default, {
className: 'n3__select__button',
modalComponent: modalComponent,
modalProps: modalProps,
disabled: disabled,
onSelect: onChange
});
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(CustomizedAsyncSelect, [{
key: 'render',
value: function render() {
var _props = this.props,
hasError = _props.hasError,
multi = _props.multi,
small = _props.small,
modalComponent = _props.modalComponent,
modalProps = _props.modalProps,
props = _objectWithoutProperties(_props, ['hasError', 'multi', 'small', 'modalComponent', 'modalProps']);
return _react2.default.createElement(_reactSelectAsyncPaginate2.default, _extends({}, _texts2.default, {
multi: multi,
className: (0, _classnames2.default)('n3__select', {
'Select_has-error': hasError,
Select_small: small
}),
autosize: false,
closeOnSelect: !multi,
arrowRenderer: modalComponent ? this.buttonRenderer : undefined
}, props));
}
}]);
return CustomizedAsyncSelect;
}(_react.Component);
CustomizedAsyncSelect.propTypes = {

@@ -117,2 +74,3 @@ hasError: _propTypes2.default.bool,

};
CustomizedAsyncSelect.defaultProps = {

@@ -128,2 +86,3 @@ hasError: false,

};
exports.default = CustomizedAsyncSelect;

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

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');

@@ -28,6 +26,2 @@

var _modalSelectButton = require('../modal-select-button');
var _modalSelectButton2 = _interopRequireDefault(_modalSelectButton);
var _async = require('./async');

@@ -37,2 +31,6 @@

var _wrapper = require('./wrapper');
var _wrapper2 = _interopRequireDefault(_wrapper);
var _texts = require('./texts');

@@ -46,68 +44,28 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var CustomizedSelect = function CustomizedSelect(props) {
var hasError = props.hasError,
multi = props.multi,
small = props.small,
modalComponent = props.modalComponent,
modalProps = props.modalProps,
restProps = _objectWithoutProperties(props, ['hasError', 'multi', 'small', 'modalComponent', 'modalProps']);
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
return _react2.default.createElement(
_wrapper2.default,
props,
_react2.default.createElement(_reactSelect2.default, _extends({}, _texts2.default, {
multi: multi,
className: (0, _classnames2.default)({
'Select_has-error': hasError,
Select_small: small
}),
autosize: false,
closeOnSelect: !multi,
arrowRenderer: modalComponent ? _wrapper.buttonPlaceholderRenderer : undefined
}, restProps))
);
};
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
CustomizedSelect.Async = _async2.default;
var CustomizedSelect = function (_Component) {
_inherits(CustomizedSelect, _Component);
function CustomizedSelect() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, CustomizedSelect);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CustomizedSelect.__proto__ || Object.getPrototypeOf(CustomizedSelect)).call.apply(_ref, [this].concat(args))), _this), _this.buttonRenderer = function () {
var _this$props = _this.props,
disabled = _this$props.disabled,
onChange = _this$props.onChange,
modalComponent = _this$props.modalComponent,
modalProps = _this$props.modalProps;
return _react2.default.createElement(_modalSelectButton2.default, {
className: 'n3__select__button',
modalComponent: modalComponent,
modalProps: modalProps,
disabled: disabled,
onSelect: onChange
});
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(CustomizedSelect, [{
key: 'render',
value: function render() {
var _props = this.props,
hasError = _props.hasError,
multi = _props.multi,
small = _props.small,
modalComponent = _props.modalComponent,
modalProps = _props.modalProps,
props = _objectWithoutProperties(_props, ['hasError', 'multi', 'small', 'modalComponent', 'modalProps']);
return _react2.default.createElement(_reactSelect2.default, _extends({}, _texts2.default, {
multi: multi,
className: (0, _classnames2.default)('n3__select', {
'Select_has-error': hasError,
Select_small: small
}),
autosize: false,
closeOnSelect: !multi,
arrowRenderer: modalComponent ? this.buttonRenderer : undefined
}, props));
}
}]);
return CustomizedSelect;
}(_react.Component);
CustomizedSelect.Async = _async2.default;
CustomizedSelect.propTypes = {

@@ -123,2 +81,3 @@ hasError: _propTypes2.default.bool,

};
CustomizedSelect.defaultProps = {

@@ -134,2 +93,3 @@ hasError: false,

};
exports.default = CustomizedSelect;
{
"name": "@n3/kit",
"version": "0.8.1",
"version": "0.8.2",
"description": "React components for n3 interfaces",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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