@signalplus/params-about 1.0.26-alpha13 → 1.0.26-alpha15

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/index.d.ts CHANGED
@@ -111,7 +111,7 @@ declare class ParamFormModalEl extends PureComponent<ParamFormProps & Required<P
111
111
  state: {
112
112
  visible: boolean;
113
113
  pending: boolean;
114
- width: number | undefined;
114
+ width: number;
115
115
  };
116
116
  get isEdit(): boolean;
117
117
  onShow: () => void;
package/lib/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Bundle of @signalplus/params-about
3
- * Generated: 2025-11-06
4
- * Version: 1.0.26-alpha13
3
+ * Generated: 2025-11-07
4
+ * Version: 1.0.26-alpha15
5
5
  * License: MIT
6
6
  * Author: 2631541504@qq.com
7
7
  */
@@ -561,7 +561,7 @@ var Num = /*#__PURE__*/function (_PureComponent) {
561
561
  className: "param-number-val"
562
562
  }, this.state.tempValue || 'N/A') : /*#__PURE__*/React.createElement("input", {
563
563
  style: {
564
- width: this.props.isPercentage ? 50 : 90
564
+ width: this.props.singleWidth || this.props.isPercentage ? 50 : 90
565
565
  },
566
566
  className: "param-number-val",
567
567
  type: "text",
@@ -634,7 +634,8 @@ var NumRange = /*#__PURE__*/function (_PureComponent) {
634
634
  onChange: this.onChange.bind(null, 'min'),
635
635
  isPercentage: this.props.isPercentage,
636
636
  readonly: this.props.readonly,
637
- onBlur: this.props.onBlur
637
+ onBlur: this.props.onBlur,
638
+ singleWidth: this.props.singleWidth
638
639
  }), /*#__PURE__*/React.createElement("span", {
639
640
  className: "param-number-range-sep",
640
641
  style: this.props.readonly ? {
@@ -647,7 +648,8 @@ var NumRange = /*#__PURE__*/function (_PureComponent) {
647
648
  onChange: this.onChange.bind(null, 'max'),
648
649
  isPercentage: this.props.isPercentage,
649
650
  readonly: this.props.readonly,
650
- onBlur: this.props.onBlur
651
+ onBlur: this.props.onBlur,
652
+ singleWidth: this.props.singleWidth
651
653
  }), this.props.readonly ? ')' : '');
652
654
  }
653
655
  }]);
@@ -2842,40 +2844,89 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2842
2844
  }) : '-' : /*#__PURE__*/React.createElement("div", {
2843
2845
  className: "param-expiries-limit-inputs",
2844
2846
  style: {
2845
- gridTemplateColumns: '110px 100px auto auto',
2847
+ display: 'flex',
2848
+ flexDirection: 'column',
2846
2849
  width: 1150
2847
2850
  }
2848
2851
  }, /*#__PURE__*/React.createElement("div", {
2849
- className: "param-number-range readonly"
2852
+ style: {
2853
+ display: 'flex',
2854
+ width: '100%',
2855
+ gap: 8
2856
+ }
2857
+ }, /*#__PURE__*/React.createElement("div", {
2858
+ style: {
2859
+ width: 100
2860
+ }
2850
2861
  }, "Expiry"), /*#__PURE__*/React.createElement("div", {
2851
- className: "param-number-range readonly"
2862
+ style: {
2863
+ width: 80
2864
+ }
2852
2865
  }, "Vega Target"), /*#__PURE__*/React.createElement("div", {
2853
- className: "param-number-range readonly"
2854
- }), /*#__PURE__*/React.createElement("div", {
2855
- className: "param-number-range readonly"
2856
- }), this.value.map(function (it, i) {
2866
+ style: {
2867
+ width: 120,
2868
+ paddingLeft: 18
2869
+ }
2870
+ }, "Both/Call/Put"), /*#__PURE__*/React.createElement("div", {
2871
+ style: {
2872
+ width: 160
2873
+ }
2874
+ }, "Delta Range"), /*#__PURE__*/React.createElement("div", {
2875
+ style: {
2876
+ width: 210
2877
+ }
2878
+ }, "Bid Edge Range"), /*#__PURE__*/React.createElement("div", {
2879
+ style: {
2880
+ width: 210
2881
+ }
2882
+ }, "Ask Edge Range"), /*#__PURE__*/React.createElement("div", {
2883
+ style: {
2884
+ width: 74
2885
+ }
2886
+ }, "Allow Taker"), /*#__PURE__*/React.createElement("div", {
2887
+ style: {
2888
+ width: 60
2889
+ }
2890
+ }, "Disabled")), this.value.map(function (it, i) {
2857
2891
  var _this2$props$value, _this2$props$value$i;
2858
2892
 
2859
- return /*#__PURE__*/React.createElement(React.Fragment, {
2860
- key: i
2893
+ return /*#__PURE__*/React.createElement("div", {
2894
+ key: i,
2895
+ style: {
2896
+ display: 'flex',
2897
+ flexDirection: 'column',
2898
+ width: '100%',
2899
+ marginBottom: i > 0 ? -30 : 0
2900
+ }
2901
+ }, /*#__PURE__*/React.createElement("div", {
2902
+ style: {
2903
+ display: 'flex',
2904
+ width: '100%',
2905
+ alignItems: 'flex-start',
2906
+ gap: 8
2907
+ }
2908
+ }, /*#__PURE__*/React.createElement("div", {
2909
+ style: {
2910
+ width: 100,
2911
+ marginRight: 0
2912
+ }
2861
2913
  }, /*#__PURE__*/React.createElement(Expiries, {
2862
2914
  style: {
2863
- width: 110,
2864
- minWidth: 0,
2865
- position: 'relative',
2866
- top: i > 0 ? -30 : 0
2915
+ width: 100,
2916
+ minWidth: 0
2867
2917
  },
2868
2918
  multiple: false,
2869
2919
  options: _this2.props.options,
2870
2920
  value: [it.expiry || ''],
2871
2921
  onChange: function onChange(val) {
2872
2922
  return _this2.onChange(i, val[0], 'expiry');
2873
- } // calcDisabled={(expiry) =>
2874
- // this.value.some((item) => item !== it && item.expiry === expiry)
2875
- // }
2876
- ,
2923
+ },
2877
2924
  onBlur: _this2.props.onBlur
2878
- }), /*#__PURE__*/React.createElement(Num, {
2925
+ })), /*#__PURE__*/React.createElement("div", {
2926
+ style: {
2927
+ width: 80
2928
+ }
2929
+ }, /*#__PURE__*/React.createElement(Num, {
2879
2930
  value: (_this2$props$value = _this2.props.value) === null || _this2$props$value === void 0 ? void 0 : (_this2$props$value$i = _this2$props$value[i]) === null || _this2$props$value$i === void 0 ? void 0 : _this2$props$value$i.vegaTarget,
2880
2931
  onChange: function onChange(val) {
2881
2932
  return _this2.onChange(i, val, 'vegaTarget');
@@ -2884,40 +2935,37 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2884
2935
  readonly: _this2.props.readonly,
2885
2936
  onBlur: _this2.props.onBlur,
2886
2937
  style: {
2887
- height: 30,
2888
- position: 'relative',
2889
- top: i > 0 ? -30 : 0
2938
+ height: 30
2939
+ },
2940
+ singleWidth: 50
2941
+ })), /*#__PURE__*/React.createElement("div", {
2942
+ style: {
2943
+ flex: 1,
2944
+ minWidth: 734
2890
2945
  }
2891
- }), /*#__PURE__*/React.createElement("div", {
2892
- className: "param-expiries-limit-inputs",
2946
+ }, /*#__PURE__*/React.createElement("div", {
2893
2947
  style: {
2894
- position: 'relative',
2895
- top: -30,
2896
- width: 734,
2897
- gridTemplateColumns: 'auto auto auto auto auto auto'
2948
+ display: 'flex',
2949
+ flexDirection: 'column',
2950
+ gap: 8
2898
2951
  }
2899
2952
  }, it.vegaRules.map(function (rule, k) {
2900
2953
  var _it$vegaRules;
2901
2954
 
2902
- return /*#__PURE__*/React.createElement(React.Fragment, null, i === 0 && k === 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2903
- className: "param-number-range readonly",
2955
+ return /*#__PURE__*/React.createElement("div", {
2956
+ key: k,
2904
2957
  style: {
2905
- paddingLeft: 36
2958
+ display: 'flex',
2959
+ width: '100%',
2960
+ alignItems: 'center',
2961
+ gap: 8
2906
2962
  }
2907
- }, "Both/Call/Put"), /*#__PURE__*/React.createElement("div", {
2908
- className: "param-number-range readonly"
2909
- }, "Delta Range"), /*#__PURE__*/React.createElement("div", {
2910
- className: "param-number-range readonly"
2911
- }, "Bid Edge Range"), /*#__PURE__*/React.createElement("div", {
2912
- className: "param-number-range readonly"
2913
- }, "Ask Edge Range"), /*#__PURE__*/React.createElement("div", {
2914
- className: "param-number-range readonly"
2915
- }, "Allow Taker"), /*#__PURE__*/React.createElement("div", {
2916
- className: "param-number-range readonly"
2917
- }, "Disabled")) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement("div", {
2963
+ }, /*#__PURE__*/React.createElement("div", {
2918
2964
  style: {
2919
2965
  display: 'flex',
2920
- width: 116
2966
+ width: 120,
2967
+ height: 30,
2968
+ alignItems: 'center'
2921
2969
  }
2922
2970
  }, /*#__PURE__*/React.createElement("div", {
2923
2971
  className: "param-arr-ops",
@@ -2933,18 +2981,20 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2933
2981
  })), /*#__PURE__*/React.createElement(TextSelector, {
2934
2982
  style: {
2935
2983
  width: 88,
2936
- minWidth: 0,
2937
2984
  padding: '0 10px',
2938
- height: 30
2985
+ height: '30px !important'
2939
2986
  },
2940
2987
  multiple: false,
2941
2988
  value: [rule.optionType || ''],
2942
2989
  onChange: function onChange(val) {
2943
2990
  return _this2.onChange(i, val[0], 'vegaRules', k, 'optionType');
2944
- } // onBlur={this.props.onBlur}
2945
- ,
2991
+ },
2946
2992
  options: ['Both', 'Call', 'Put']
2947
- })), /*#__PURE__*/React.createElement(NumRange, {
2993
+ })), /*#__PURE__*/React.createElement("div", {
2994
+ style: {
2995
+ width: 160
2996
+ }
2997
+ }, /*#__PURE__*/React.createElement(NumRange, {
2948
2998
  value: {
2949
2999
  min: rule.deltaRange.min,
2950
3000
  max: rule.deltaRange.max
@@ -2952,8 +3002,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2952
3002
  onChange: function onChange(val) {
2953
3003
  return _this2.onChange(i, val, 'vegaRules', k, 'deltaRange');
2954
3004
  },
2955
- onBlur: _this2.props.onBlur
2956
- }), /*#__PURE__*/React.createElement(NumRangeFromTo, {
3005
+ onBlur: _this2.props.onBlur,
3006
+ singleWidth: 50
3007
+ })), /*#__PURE__*/React.createElement("div", {
3008
+ style: {
3009
+ width: 210
3010
+ }
3011
+ }, /*#__PURE__*/React.createElement(NumRangeFromTo, {
2957
3012
  value: {
2958
3013
  from: rule.bidEdgeSpan.from,
2959
3014
  to: rule.bidEdgeSpan.to
@@ -2963,7 +3018,11 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2963
3018
  },
2964
3019
  isPercentage: true,
2965
3020
  onBlur: _this2.props.onBlur
2966
- }), /*#__PURE__*/React.createElement(NumRangeFromTo, {
3021
+ })), /*#__PURE__*/React.createElement("div", {
3022
+ style: {
3023
+ width: 210
3024
+ }
3025
+ }, /*#__PURE__*/React.createElement(NumRangeFromTo, {
2967
3026
  value: {
2968
3027
  from: rule.askEdgeSpan.from,
2969
3028
  to: rule.askEdgeSpan.to
@@ -2973,11 +3032,9 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2973
3032
  },
2974
3033
  isPercentage: true,
2975
3034
  onBlur: _this2.props.onBlur
2976
- }), /*#__PURE__*/React.createElement("div", {
3035
+ })), /*#__PURE__*/React.createElement("div", {
2977
3036
  style: {
2978
- width: 74,
2979
- position: 'relative',
2980
- top: 4
3037
+ width: 74
2981
3038
  }
2982
3039
  }, /*#__PURE__*/React.createElement(Checkbox, {
2983
3040
  checked: rule.allowTaker,
@@ -2986,9 +3043,8 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2986
3043
  }
2987
3044
  })), /*#__PURE__*/React.createElement("div", {
2988
3045
  style: {
2989
- width: 74,
2990
3046
  position: 'relative',
2991
- top: 4
3047
+ width: 60
2992
3048
  }
2993
3049
  }, /*#__PURE__*/React.createElement(Checkbox, {
2994
3050
  checked: rule.disable,
@@ -2999,31 +3055,26 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2999
3055
  className: "param-arr-ops",
3000
3056
  style: {
3001
3057
  position: 'absolute',
3058
+ right: -80,
3002
3059
  top: -4,
3003
- right: -30,
3004
3060
  visibility: k === 0 ? 'hidden' : 'visible'
3005
3061
  }
3006
3062
  }, /*#__PURE__*/React.createElement(DeleteOutlined, {
3007
3063
  className: "param-arr-ops-del",
3008
3064
  onClick: _this2.onDelRule.bind(null, i, k)
3009
3065
  }))));
3010
- })), /*#__PURE__*/React.createElement("div", {
3011
- className: "param-arr-ops"
3012
- }, /*#__PURE__*/React.createElement(PlusOutlined, {
3013
- className: "param-arr-ops-add",
3014
- onClick: _this2.onAdd.bind(null, i),
3066
+ }))), /*#__PURE__*/React.createElement("div", {
3067
+ className: "param-arr-ops",
3015
3068
  style: {
3016
- position: 'relative',
3017
- top: i > 0 ? -30 : 0
3069
+ width: 60
3018
3070
  }
3071
+ }, /*#__PURE__*/React.createElement(PlusOutlined, {
3072
+ className: "param-arr-ops-add",
3073
+ onClick: _this2.onAdd.bind(null, i)
3019
3074
  }), /*#__PURE__*/React.createElement(DeleteOutlined, {
3020
3075
  className: "param-arr-ops-del",
3021
- onClick: _this2.onDel.bind(null, i),
3022
- style: {
3023
- position: 'relative',
3024
- top: i > 0 ? -30 : 0
3025
- }
3026
- })));
3076
+ onClick: _this2.onDel.bind(null, i)
3077
+ }))));
3027
3078
  })));
3028
3079
  }
3029
3080
  }]);
@@ -3780,8 +3831,6 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3780
3831
  var _super2 = _createSuper(ParamFormModalEl);
3781
3832
 
3782
3833
  function ParamFormModalEl() {
3783
- var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
3784
-
3785
3834
  var _this4;
3786
3835
 
3787
3836
  _classCallCheck(this, ParamFormModalEl);
@@ -3797,12 +3846,15 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3797
3846
  _defineProperty(_assertThisInitialized(_this4), "state", {
3798
3847
  visible: false,
3799
3848
  pending: false,
3800
- width: ((_this4$props$initialV = _this4.props.initialValues) === null || _this4$props$initialV === void 0 ? void 0 : _this4$props$initialV.valueType) ? (_ParamTypeConfig$_thi = ParamTypeConfig[(_this4$props$initialV2 = _this4.props.initialValues) === null || _this4$props$initialV2 === void 0 ? void 0 : _this4$props$initialV2.valueType]) === null || _ParamTypeConfig$_thi === void 0 ? void 0 : _ParamTypeConfig$_thi.modalWidth : 740
3849
+ width: 740
3801
3850
  });
3802
3851
 
3803
3852
  _defineProperty(_assertThisInitialized(_this4), "onShow", function () {
3853
+ var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
3854
+
3804
3855
  return _this4.setState({
3805
- visible: true
3856
+ visible: true,
3857
+ width: ((_this4$props$initialV = _this4.props.initialValues) === null || _this4$props$initialV === void 0 ? void 0 : _this4$props$initialV.valueType) ? (_ParamTypeConfig$_thi = ParamTypeConfig[(_this4$props$initialV2 = _this4.props.initialValues) === null || _this4$props$initialV2 === void 0 ? void 0 : _this4$props$initialV2.valueType]) === null || _ParamTypeConfig$_thi === void 0 ? void 0 : _ParamTypeConfig$_thi.modalWidth : 740
3806
3858
  });
3807
3859
  });
3808
3860
 
@@ -3859,6 +3911,7 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3859
3911
  closable: false,
3860
3912
  title: !this.isEdit ? '新增参数' : '修改参数',
3861
3913
  visible: this.state.visible,
3914
+ destroyOnClose: true,
3862
3915
  footer: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
3863
3916
  onClick: this.onHide
3864
3917
  }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
@@ -4064,12 +4117,13 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
4064
4117
  _defineProperty(_assertThisInitialized(_this3), "state", {
4065
4118
  visible: false,
4066
4119
  pending: false,
4067
- width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
4120
+ width: 740
4068
4121
  });
4069
4122
 
4070
4123
  _defineProperty(_assertThisInitialized(_this3), "onShow", function () {
4071
4124
  return _this3.setState({
4072
- visible: true
4125
+ visible: true,
4126
+ width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
4073
4127
  });
4074
4128
  });
4075
4129
 
@@ -4113,11 +4167,9 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
4113
4167
  _createClass(ParamValueEditorModalEl, [{
4114
4168
  key: "render",
4115
4169
  value: function render() {
4116
- console.log('this.props===========================', this.props);
4117
- var width = ParamTypeConfig[this.props.valueType].modalWidth || this.state.width || 740;
4118
4170
  return /*#__PURE__*/React.createElement(Modal, {
4119
4171
  key: String(this.state.visible),
4120
- width: width,
4172
+ width: this.state.width,
4121
4173
  title: 'Edit Value',
4122
4174
  closable: false,
4123
4175
  visible: this.state.visible,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalplus/params-about",
3
- "version": "1.0.26-alpha13",
3
+ "version": "1.0.26-alpha15",
4
4
  "description": "A description for the module",
5
5
  "main": "./lib/umd/index.js",
6
6
  "module": "./lib/es/index.js",