@signalplus/params-about 1.0.23-alpha → 1.0.24
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 +16 -15
- 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
|
-
* Generated: 2024-05-
|
|
4
|
-
* Version: 1.0.
|
|
3
|
+
* Generated: 2024-05-24
|
|
4
|
+
* Version: 1.0.24
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -971,7 +971,7 @@ var ExpiriesLimit = /*#__PURE__*/function (_PureComponent) {
|
|
|
971
971
|
this.value = ((_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.filter(function (it) {
|
|
972
972
|
return !isExpired(it.expiry);
|
|
973
973
|
})) || [];
|
|
974
|
-
if (!this.value.length) this.value.push({
|
|
974
|
+
if (!this.value.length && !this.props.readonly) this.value.push({
|
|
975
975
|
expiry: ''
|
|
976
976
|
});
|
|
977
977
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1130,7 +1130,7 @@ var ExpiriesValueList = /*#__PURE__*/function (_PureComponent) {
|
|
|
1130
1130
|
this.value = ((_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.filter(function (it) {
|
|
1131
1131
|
return !isExpired(it.expiry);
|
|
1132
1132
|
})) || [];
|
|
1133
|
-
if (!this.value.length) this.value.push({
|
|
1133
|
+
if (!this.value.length && !this.props.readonly) this.value.push({
|
|
1134
1134
|
expiry: ''
|
|
1135
1135
|
});
|
|
1136
1136
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1443,7 +1443,7 @@ var InstrumentsValueList = /*#__PURE__*/function (_PureComponent) {
|
|
|
1443
1443
|
_this2 = this;
|
|
1444
1444
|
|
|
1445
1445
|
this.value = this.props.value || [];
|
|
1446
|
-
if (!this.value.length) this.value.push({
|
|
1446
|
+
if (!this.value.length && !this.props.readonly) this.value.push({
|
|
1447
1447
|
instrument: ''
|
|
1448
1448
|
});
|
|
1449
1449
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2303,12 +2303,10 @@ var OneWayHandlerList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2303
2303
|
value: [it.expiry],
|
|
2304
2304
|
onChange: function onChange(val) {
|
|
2305
2305
|
return _this2.onChange(i, val[0], 'expiry');
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
});
|
|
2311
|
-
},
|
|
2306
|
+
} // calcDisabled={(expiry) =>
|
|
2307
|
+
// this.value.some((item) => item !== it && item.expiry === expiry)
|
|
2308
|
+
// }
|
|
2309
|
+
,
|
|
2312
2310
|
onBlur: _this2.props.onBlur
|
|
2313
2311
|
}), /*#__PURE__*/React.createElement(TextSelector, {
|
|
2314
2312
|
style: {
|
|
@@ -2774,11 +2772,14 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
2774
2772
|
|
|
2775
2773
|
if (isNullLike(val.offloadRisk)) {
|
|
2776
2774
|
return emptyErrText(i, 'OffloadRisk');
|
|
2777
|
-
}
|
|
2775
|
+
} // if (expiries.includes(val.expiry)) {
|
|
2776
|
+
// return `The ${i + 1} ${
|
|
2777
|
+
// i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th'
|
|
2778
|
+
// } expiry is same as the ${expiries.indexOf(val.expiry) + 1} ${
|
|
2779
|
+
// i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th'
|
|
2780
|
+
// }`;
|
|
2781
|
+
// }
|
|
2778
2782
|
|
|
2779
|
-
if (expiries.includes(val.expiry)) {
|
|
2780
|
-
return "The ".concat(i + 1, " ").concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " expiry is same as the ").concat(expiries.indexOf(val.expiry) + 1, " ").concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th');
|
|
2781
|
-
}
|
|
2782
2783
|
|
|
2783
2784
|
expiries.push(val.expiry);
|
|
2784
2785
|
}
|