@signalplus/params-about 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/es/index.js +15 -5
- package/package.json +1 -1
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bundle of @signalplus/params-about
|
|
3
3
|
* Generated: 2022-04-12
|
|
4
|
-
* Version: 0.1.
|
|
4
|
+
* Version: 0.1.26
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -751,6 +751,10 @@ var TextArray = /*#__PURE__*/function (_PureComponent) {
|
|
|
751
751
|
|
|
752
752
|
_defineProperty(_assertThisInitialized(_this), "value", []);
|
|
753
753
|
|
|
754
|
+
_defineProperty(_assertThisInitialized(_this), "isEmptyItem", function (item) {
|
|
755
|
+
return !item.trim();
|
|
756
|
+
});
|
|
757
|
+
|
|
754
758
|
_defineProperty(_assertThisInitialized(_this), "onChange", function (i, e) {
|
|
755
759
|
var _this$props$onChange, _this$props;
|
|
756
760
|
|
|
@@ -759,7 +763,7 @@ var TextArray = /*#__PURE__*/function (_PureComponent) {
|
|
|
759
763
|
var value = _toConsumableArray(_this.value);
|
|
760
764
|
|
|
761
765
|
value[i] = val;
|
|
762
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, value);
|
|
766
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, value.length === 1 && _this.isEmptyItem(value[0]) ? [] : value);
|
|
763
767
|
});
|
|
764
768
|
|
|
765
769
|
_defineProperty(_assertThisInitialized(_this), "onAdd", function (i) {
|
|
@@ -777,7 +781,7 @@ var TextArray = /*#__PURE__*/function (_PureComponent) {
|
|
|
777
781
|
var value = _toConsumableArray(_this.value);
|
|
778
782
|
|
|
779
783
|
value.splice(i, 1);
|
|
780
|
-
(_this$props$onChange3 = (_this$props3 = _this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props3, value);
|
|
784
|
+
(_this$props$onChange3 = (_this$props3 = _this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props3, value.length === 1 && _this.isEmptyItem(value[0]) ? [] : value);
|
|
781
785
|
});
|
|
782
786
|
|
|
783
787
|
return _this;
|
|
@@ -973,6 +977,12 @@ var ExpiriesLimit = /*#__PURE__*/function (_PureComponent) {
|
|
|
973
977
|
|
|
974
978
|
_defineProperty(_assertThisInitialized(_this), "value", []);
|
|
975
979
|
|
|
980
|
+
_defineProperty(_assertThisInitialized(_this), "isEmptyItem", function (item) {
|
|
981
|
+
var _item$expiry;
|
|
982
|
+
|
|
983
|
+
return !((_item$expiry = item.expiry) === null || _item$expiry === void 0 ? void 0 : _item$expiry.trim()) && isNullLike(item.minAumPercentage) && isNullLike(item.maxAumPercentage) && isNullLike(item.minAbs) && isNullLike(item.maxAbs);
|
|
984
|
+
});
|
|
985
|
+
|
|
976
986
|
_defineProperty(_assertThisInitialized(_this), "onChange", function (i, val, key) {
|
|
977
987
|
var _this$props$onChange, _this$props;
|
|
978
988
|
|
|
@@ -982,7 +992,7 @@ var ExpiriesLimit = /*#__PURE__*/function (_PureComponent) {
|
|
|
982
992
|
expiry: ''
|
|
983
993
|
};
|
|
984
994
|
if (key) value[i][key] = val;else value[i] = _objectSpread2(_objectSpread2({}, value[i]), val);
|
|
985
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, value);
|
|
995
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, value.length === 1 && _this.isEmptyItem(value[0]) ? [] : value);
|
|
986
996
|
});
|
|
987
997
|
|
|
988
998
|
_defineProperty(_assertThisInitialized(_this), "onAdd", function (i) {
|
|
@@ -1003,7 +1013,7 @@ var ExpiriesLimit = /*#__PURE__*/function (_PureComponent) {
|
|
|
1003
1013
|
var value = _toConsumableArray(_this.value);
|
|
1004
1014
|
|
|
1005
1015
|
value.splice(i, 1);
|
|
1006
|
-
(_this$props$onChange3 = (_this$props4 = _this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props4, value);
|
|
1016
|
+
(_this$props$onChange3 = (_this$props4 = _this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props4, value.length === 1 && _this.isEmptyItem(value[0]) ? [] : value);
|
|
1007
1017
|
(_this$props$onBlur2 = (_this$props5 = _this.props).onBlur) === null || _this$props$onBlur2 === void 0 ? void 0 : _this$props$onBlur2.call(_this$props5);
|
|
1008
1018
|
});
|
|
1009
1019
|
|