@semcore/core
Advanced tools
Comparing version 1.5.1 to 1.6.0
@@ -5,7 +5,8 @@ # Changelog | ||
## [1.5.1] - 2020-07-14 | ||
## [1.6.0] - 2020-07-14 | ||
### Added | ||
- Автоматическую установку `data-ui-name` для компонентов созданных через функцию `createBaseComponent`. | ||
- Автоматическую установку `data-ui-name` для компонентов созданных через функцию `createBaseComponent` | ||
- Добавлена мемоизация на функции которые начинаются с `bindHandler`, для биндинга значений хендлеров в геттер-функциях | ||
@@ -12,0 +13,0 @@ ## [1.5.0] - 2020-07-10 |
@@ -129,2 +129,4 @@ "use strict"; | ||
var _bindHandler = _interopRequireDefault(require("./enhancement/bindHandler")); | ||
var _styled = require("./styled"); | ||
@@ -167,3 +169,3 @@ | ||
function createGetField(enhancements, Component) { | ||
function createGetField(enhancements, Component, isFunction) { | ||
return function getField(key) { | ||
@@ -175,3 +177,3 @@ return enhancements.filter(function (enhancement) { | ||
return enhancement.condition(Component); | ||
return enhancement.condition(Component, isFunction); | ||
}).reduce(function (acc, item) { | ||
@@ -220,3 +222,3 @@ if (item[key]) { | ||
function wrapClass(OriginComponent, enhancements, Context) { | ||
var getField = createGetField(enhancements, OriginComponent); | ||
var getField = createGetField(enhancements, OriginComponent, false); | ||
var inits = getField('init'); | ||
@@ -315,3 +317,3 @@ var props = getField('asProps'); | ||
function wrapFunction(OriginComponent, enhancements, Context) { | ||
var getField = createGetField(enhancements, OriginComponent); | ||
var getField = createGetField(enhancements, OriginComponent, true); | ||
var inits = getField('init'); | ||
@@ -408,3 +410,3 @@ var props = getField('asProps'); | ||
var Component = createComposeComponent(OriginComponent, context, [(0, _Children["default"])(context, parents), // root должен быть ниже children | ||
var Component = createComposeComponent(OriginComponent, context, [(0, _bindHandler["default"])(), (0, _Children["default"])(context, parents), // root должен быть ниже children | ||
(0, _Root["default"])(), (0, _uncontrolledProps["default"])(), (0, _staticChildren["default"])(childComponents, createComponent, context, parents), // functionDefaultProps должен быть ниже staticChild | ||
@@ -411,0 +413,0 @@ (0, _functionDefaultProps["default"])(), // inheritedName должен быть ниже staticChild |
@@ -36,2 +36,3 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import styleEnhancement from './enhancement/style'; | ||
import bindHandlerEnhancement from './enhancement/bindHandler'; | ||
var CORE_COMPONENT = Symbol('CORE_COMPONENT'); | ||
@@ -49,3 +50,3 @@ var CORE_INSTANCE = Symbol('CORE_INSTANCE'); | ||
function createGetField(enhancements, Component) { | ||
function createGetField(enhancements, Component, isFunction) { | ||
return function getField(key) { | ||
@@ -57,3 +58,3 @@ return enhancements.filter(function (enhancement) { | ||
return enhancement.condition(Component); | ||
return enhancement.condition(Component, isFunction); | ||
}).reduce(function (acc, item) { | ||
@@ -101,3 +102,3 @@ if (item[key]) { | ||
function wrapClass(OriginComponent, enhancements, Context) { | ||
var getField = createGetField(enhancements, OriginComponent); | ||
var getField = createGetField(enhancements, OriginComponent, false); | ||
var inits = getField('init'); | ||
@@ -201,3 +202,3 @@ var props = getField('asProps'); | ||
function wrapFunction(OriginComponent, enhancements, Context) { | ||
var getField = createGetField(enhancements, OriginComponent); | ||
var getField = createGetField(enhancements, OriginComponent, true); | ||
var inits = getField('init'); | ||
@@ -292,3 +293,3 @@ var props = getField('asProps'); | ||
var Component = createComposeComponent(OriginComponent, context, [childrenEnhancement(context, parents), // root должен быть ниже children | ||
var Component = createComposeComponent(OriginComponent, context, [bindHandlerEnhancement(), childrenEnhancement(context, parents), // root должен быть ниже children | ||
rootEnhancement(), uncontrolledPropsEnhancement(), staticChildrenEnhancement(childComponents, createComponent, context, parents), // functionDefaultProps должен быть ниже staticChild | ||
@@ -295,0 +296,0 @@ functionDefaultPropsEnhancement(), // inheritedName должен быть ниже staticChild |
{ | ||
"name": "@semcore/core", | ||
"description": "SEMRush Core Component", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"main": "lib/cjs/index.js", | ||
@@ -6,0 +6,0 @@ "module": "lib/es6/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
291885
93
3275