@signalplus/params-about 1.0.26-alpha4 → 1.0.26-alpha5
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 +108 -47
- 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: 2025-10-28
|
|
4
|
-
* Version: 1.0.26-
|
|
4
|
+
* Version: 1.0.26-alpha5
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -2504,6 +2504,71 @@ var TenorBucketHandlerList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2504
2504
|
return TenorBucketHandlerList;
|
|
2505
2505
|
}(PureComponent);
|
|
2506
2506
|
|
|
2507
|
+
var NumRangeFromTo = /*#__PURE__*/function (_PureComponent) {
|
|
2508
|
+
_inherits(NumRangeFromTo, _PureComponent);
|
|
2509
|
+
|
|
2510
|
+
var _super = _createSuper(NumRangeFromTo);
|
|
2511
|
+
|
|
2512
|
+
function NumRangeFromTo() {
|
|
2513
|
+
var _this;
|
|
2514
|
+
|
|
2515
|
+
_classCallCheck(this, NumRangeFromTo);
|
|
2516
|
+
|
|
2517
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2518
|
+
args[_key] = arguments[_key];
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
2522
|
+
|
|
2523
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (key, val) {
|
|
2524
|
+
var _this$props$onChange, _this$props;
|
|
2525
|
+
|
|
2526
|
+
var value = _objectSpread2({}, _this.props.value);
|
|
2527
|
+
|
|
2528
|
+
value[key] = val;
|
|
2529
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, value);
|
|
2530
|
+
});
|
|
2531
|
+
|
|
2532
|
+
return _this;
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
_createClass(NumRangeFromTo, [{
|
|
2536
|
+
key: "render",
|
|
2537
|
+
value: function render() {
|
|
2538
|
+
var _this$props$value, _this$props$value2;
|
|
2539
|
+
|
|
2540
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2541
|
+
className: classNames('param-number-range', {
|
|
2542
|
+
readonly: this.props.readonly
|
|
2543
|
+
}, this.props.className),
|
|
2544
|
+
style: this.props.style
|
|
2545
|
+
}, this.props.readonly ? '(' : '', /*#__PURE__*/React.createElement(Num, {
|
|
2546
|
+
placeholder: 'From',
|
|
2547
|
+
value: (_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.from,
|
|
2548
|
+
onChange: this.onChange.bind(null, 'from'),
|
|
2549
|
+
isPercentage: this.props.isPercentage,
|
|
2550
|
+
readonly: this.props.readonly,
|
|
2551
|
+
onBlur: this.props.onBlur
|
|
2552
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2553
|
+
className: "param-number-range-sep",
|
|
2554
|
+
style: this.props.readonly ? {
|
|
2555
|
+
marginLeft: 0,
|
|
2556
|
+
marginRight: 4
|
|
2557
|
+
} : undefined
|
|
2558
|
+
}, this.props.readonly ? ',' : '~'), /*#__PURE__*/React.createElement(Num, {
|
|
2559
|
+
placeholder: 'To',
|
|
2560
|
+
value: (_this$props$value2 = this.props.value) === null || _this$props$value2 === void 0 ? void 0 : _this$props$value2.to,
|
|
2561
|
+
onChange: this.onChange.bind(null, 'to'),
|
|
2562
|
+
isPercentage: this.props.isPercentage,
|
|
2563
|
+
readonly: this.props.readonly,
|
|
2564
|
+
onBlur: this.props.onBlur
|
|
2565
|
+
}), this.props.readonly ? ')' : '');
|
|
2566
|
+
}
|
|
2567
|
+
}]);
|
|
2568
|
+
|
|
2569
|
+
return NumRangeFromTo;
|
|
2570
|
+
}(PureComponent);
|
|
2571
|
+
|
|
2507
2572
|
var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
2508
2573
|
_inherits(ExpiryVegaAlphaByEdgeList, _PureComponent);
|
|
2509
2574
|
|
|
@@ -2526,7 +2591,7 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2526
2591
|
var _item$vegaRules, _item$expiry;
|
|
2527
2592
|
|
|
2528
2593
|
var vegaRulesValid = item.vegaRules ? (_item$vegaRules = item.vegaRules) === null || _item$vegaRules === void 0 ? void 0 : _item$vegaRules.find(function (it) {
|
|
2529
|
-
return it.deltaRange.min || it.deltaRange.max || it.
|
|
2594
|
+
return it.deltaRange.min || it.deltaRange.max || it.bidEdgeSpan.from || it.bidEdgeSpan.to || it.askEdgeSpan.from || it.askEdgeSpan.to;
|
|
2530
2595
|
}) : true;
|
|
2531
2596
|
return !((_item$expiry = item.expiry) === null || _item$expiry === void 0 ? void 0 : _item$expiry.trim()) && !item.vegaTarget && !!vegaRulesValid;
|
|
2532
2597
|
});
|
|
@@ -2545,13 +2610,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2545
2610
|
min: undefined,
|
|
2546
2611
|
max: undefined
|
|
2547
2612
|
},
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2613
|
+
bidEdgeSpan: {
|
|
2614
|
+
from: undefined,
|
|
2615
|
+
to: undefined
|
|
2551
2616
|
},
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2617
|
+
askEdgeSpan: {
|
|
2618
|
+
from: undefined,
|
|
2619
|
+
to: undefined
|
|
2555
2620
|
},
|
|
2556
2621
|
allowTaker: false,
|
|
2557
2622
|
disable: false
|
|
@@ -2577,13 +2642,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2577
2642
|
min: undefined,
|
|
2578
2643
|
max: undefined
|
|
2579
2644
|
},
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2645
|
+
bidEdgeSpan: {
|
|
2646
|
+
from: undefined,
|
|
2647
|
+
to: undefined
|
|
2583
2648
|
},
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2649
|
+
askEdgeSpan: {
|
|
2650
|
+
from: undefined,
|
|
2651
|
+
to: undefined
|
|
2587
2652
|
},
|
|
2588
2653
|
allowTaker: false,
|
|
2589
2654
|
disable: false
|
|
@@ -2616,13 +2681,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2616
2681
|
min: undefined,
|
|
2617
2682
|
max: undefined
|
|
2618
2683
|
},
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2684
|
+
bidEdgeSpan: {
|
|
2685
|
+
from: undefined,
|
|
2686
|
+
to: undefined
|
|
2622
2687
|
},
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2688
|
+
askEdgeSpan: {
|
|
2689
|
+
from: undefined,
|
|
2690
|
+
to: undefined
|
|
2626
2691
|
},
|
|
2627
2692
|
allowTaker: false,
|
|
2628
2693
|
disable: false
|
|
@@ -2664,13 +2729,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2664
2729
|
min: undefined,
|
|
2665
2730
|
max: undefined
|
|
2666
2731
|
},
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2732
|
+
bidEdgeSpan: {
|
|
2733
|
+
from: undefined,
|
|
2734
|
+
to: undefined
|
|
2670
2735
|
},
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2736
|
+
askEdgeSpan: {
|
|
2737
|
+
from: undefined,
|
|
2738
|
+
to: undefined
|
|
2674
2739
|
},
|
|
2675
2740
|
allowTaker: false,
|
|
2676
2741
|
disable: false
|
|
@@ -2689,7 +2754,7 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2689
2754
|
}, it.expiry, /*#__PURE__*/React.createElement("span", null, "/"), !isNullLike(it.vegaTarget) ? it.vegaTarget : '-', /*#__PURE__*/React.createElement("span", null, "/"), it.vegaRules.map(function ($it, $i) {
|
|
2690
2755
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
2691
2756
|
key: $i
|
|
2692
|
-
}, !isNullLike($it.optionType) ? $it.optionType : '-', /*#__PURE__*/React.createElement("span", null, "/"), !isNullLike($it.deltaRange.min) && !isNullLike($it.deltaRange.max) ? "(".concat($it.deltaRange.min, ", ").concat($it.deltaRange.max, ")") : '-', /*#__PURE__*/React.createElement("span", null, "/"), !isNullLike($it.
|
|
2757
|
+
}, !isNullLike($it.optionType) ? $it.optionType : '-', /*#__PURE__*/React.createElement("span", null, "/"), !isNullLike($it.deltaRange.min) && !isNullLike($it.deltaRange.max) ? "(".concat($it.deltaRange.min, ", ").concat($it.deltaRange.max, ")") : '-', /*#__PURE__*/React.createElement("span", null, "/"), !isNullLike($it.bidEdgeSpan.from) && !isNullLike($it.bidEdgeSpan.to) ? "(".concat(NumCvt.show($it.bidEdgeSpan.from, true), "%, ").concat(NumCvt.show($it.bidEdgeSpan.to, true), "%)") : '-', /*#__PURE__*/React.createElement("span", null, "/"), !isNullLike($it.askEdgeSpan.from) && !isNullLike($it.askEdgeSpan.to) ? "(".concat(NumCvt.show($it.askEdgeSpan.from, true), "%, ").concat(NumCvt.show($it.askEdgeSpan.to, true), "%)") : '-', /*#__PURE__*/React.createElement("span", null, "/"), typeof $it.allowTaker === 'boolean' ? $it.allowTaker.toString().toUpperCase() : '-', /*#__PURE__*/React.createElement("span", null, "/"), typeof $it.disable === 'boolean' ? $it.disable.toString().toUpperCase() : '-'), /*#__PURE__*/React.createElement("br", null));
|
|
2693
2758
|
})), /*#__PURE__*/React.createElement("br", null));
|
|
2694
2759
|
}) : '-' : /*#__PURE__*/React.createElement("div", {
|
|
2695
2760
|
className: "param-expiries-limit-inputs",
|
|
@@ -2783,27 +2848,23 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2783
2848
|
return _this2.onChange(i, val, 'vegaRules', k, 'deltaRange');
|
|
2784
2849
|
},
|
|
2785
2850
|
onBlur: _this2.props.onBlur
|
|
2786
|
-
}), /*#__PURE__*/React.createElement(
|
|
2851
|
+
}), /*#__PURE__*/React.createElement(NumRangeFromTo, {
|
|
2787
2852
|
value: {
|
|
2788
|
-
|
|
2789
|
-
|
|
2853
|
+
from: rule.bidEdgeSpan.from,
|
|
2854
|
+
to: rule.bidEdgeSpan.to
|
|
2790
2855
|
},
|
|
2791
|
-
minName: "From",
|
|
2792
|
-
maxName: "To",
|
|
2793
2856
|
onChange: function onChange(val) {
|
|
2794
|
-
return _this2.onChange(i, val, 'vegaRules', k, '
|
|
2857
|
+
return _this2.onChange(i, val, 'vegaRules', k, 'bidEdgeSpan');
|
|
2795
2858
|
},
|
|
2796
2859
|
isPercentage: true,
|
|
2797
2860
|
onBlur: _this2.props.onBlur
|
|
2798
|
-
}), /*#__PURE__*/React.createElement(
|
|
2861
|
+
}), /*#__PURE__*/React.createElement(NumRangeFromTo, {
|
|
2799
2862
|
value: {
|
|
2800
|
-
|
|
2801
|
-
|
|
2863
|
+
from: rule.askEdgeSpan.from,
|
|
2864
|
+
to: rule.askEdgeSpan.to
|
|
2802
2865
|
},
|
|
2803
|
-
minName: "From",
|
|
2804
|
-
maxName: "To",
|
|
2805
2866
|
onChange: function onChange(val) {
|
|
2806
|
-
return _this2.onChange(i, val, 'vegaRules', k, '
|
|
2867
|
+
return _this2.onChange(i, val, 'vegaRules', k, 'askEdgeSpan');
|
|
2807
2868
|
},
|
|
2808
2869
|
isPercentage: true,
|
|
2809
2870
|
onBlur: _this2.props.onBlur
|
|
@@ -3206,20 +3267,20 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
3206
3267
|
return emptyErrText(i, "delta range's max");
|
|
3207
3268
|
}
|
|
3208
3269
|
|
|
3209
|
-
if (isEmpty(vegaRule.
|
|
3210
|
-
return emptyErrText(i, "bid edge range's
|
|
3270
|
+
if (isEmpty(vegaRule.bidEdgeSpan.from)) {
|
|
3271
|
+
return emptyErrText(i, "bid edge range's from");
|
|
3211
3272
|
}
|
|
3212
3273
|
|
|
3213
|
-
if (isEmpty(vegaRule.
|
|
3214
|
-
return emptyErrText(i, "bid edge range's
|
|
3274
|
+
if (isEmpty(vegaRule.bidEdgeSpan.to)) {
|
|
3275
|
+
return emptyErrText(i, "bid edge range's to");
|
|
3215
3276
|
}
|
|
3216
3277
|
|
|
3217
|
-
if (isEmpty(vegaRule.
|
|
3218
|
-
return emptyErrText(i, "ask edge range's
|
|
3278
|
+
if (isEmpty(vegaRule.askEdgeSpan.from)) {
|
|
3279
|
+
return emptyErrText(i, "ask edge range's from");
|
|
3219
3280
|
}
|
|
3220
3281
|
|
|
3221
|
-
if (isEmpty(vegaRule.
|
|
3222
|
-
return emptyErrText(i, "ask edge range's
|
|
3282
|
+
if (isEmpty(vegaRule.askEdgeSpan.to)) {
|
|
3283
|
+
return emptyErrText(i, "ask edge range's to");
|
|
3223
3284
|
}
|
|
3224
3285
|
} // if (expiries.includes(val.expiry)) {
|
|
3225
3286
|
// return `The ${i + 1} ${
|