@signalplus/params-about 1.0.26-alpha8 → 1.0.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.
Files changed (3) hide show
  1. package/index.d.ts +1 -1
  2. package/lib/es/index.js +199 -113
  3. package/package.json +4 -1
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-alpha8
3
+ * Generated: 2025-11-11
4
+ * Version: 1.0.26
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,39 +2844,93 @@ 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',
2849
+ width: 1150
2846
2850
  }
2847
2851
  }, /*#__PURE__*/React.createElement("div", {
2848
- 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
+ }
2849
2861
  }, "Expiry"), /*#__PURE__*/React.createElement("div", {
2850
- className: "param-number-range readonly"
2862
+ style: {
2863
+ width: 80
2864
+ }
2851
2865
  }, "Vega Target"), /*#__PURE__*/React.createElement("div", {
2852
- className: "param-number-range readonly"
2853
- }), /*#__PURE__*/React.createElement("div", {
2854
- className: "param-number-range readonly"
2855
- }), 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
+ }, "Disable")), this.value.map(function (it, i) {
2856
2891
  var _this2$props$value, _this2$props$value$i;
2857
2892
 
2858
- return /*#__PURE__*/React.createElement(React.Fragment, {
2859
- key: i
2893
+ return /*#__PURE__*/React.createElement("div", {
2894
+ key: i,
2895
+ style: {
2896
+ display: 'flex',
2897
+ flexDirection: 'column',
2898
+ width: '100%'
2899
+ }
2900
+ }, /*#__PURE__*/React.createElement("div", {
2901
+ style: {
2902
+ display: 'flex',
2903
+ width: '100%',
2904
+ alignItems: 'flex-start',
2905
+ gap: 8
2906
+ }
2907
+ }, /*#__PURE__*/React.createElement("div", {
2908
+ style: {
2909
+ width: 100,
2910
+ marginRight: 0
2911
+ }
2860
2912
  }, /*#__PURE__*/React.createElement(Expiries, {
2861
2913
  style: {
2862
- width: 110,
2863
- minWidth: 0,
2864
- position: 'relative',
2865
- top: i > 0 ? -30 : 0
2914
+ width: 100,
2915
+ minWidth: 0
2866
2916
  },
2867
2917
  multiple: false,
2868
2918
  options: _this2.props.options,
2869
2919
  value: [it.expiry || ''],
2870
2920
  onChange: function onChange(val) {
2871
2921
  return _this2.onChange(i, val[0], 'expiry');
2872
- } // calcDisabled={(expiry) =>
2873
- // this.value.some((item) => item !== it && item.expiry === expiry)
2874
- // }
2875
- ,
2876
- onBlur: _this2.props.onBlur
2877
- }), /*#__PURE__*/React.createElement(Num, {
2922
+ },
2923
+ onBlur: _this2.props.onBlur,
2924
+ calcDisabled: function calcDisabled(option) {
2925
+ return !!_this2.value.find(function (vega) {
2926
+ return vega.expiry === option;
2927
+ });
2928
+ }
2929
+ })), /*#__PURE__*/React.createElement("div", {
2930
+ style: {
2931
+ width: 80
2932
+ }
2933
+ }, /*#__PURE__*/React.createElement(Num, {
2878
2934
  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,
2879
2935
  onChange: function onChange(val) {
2880
2936
  return _this2.onChange(i, val, 'vegaTarget');
@@ -2883,71 +2939,66 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2883
2939
  readonly: _this2.props.readonly,
2884
2940
  onBlur: _this2.props.onBlur,
2885
2941
  style: {
2886
- height: 30,
2887
- position: 'relative',
2888
- top: i > 0 ? -30 : 0
2942
+ height: 30
2943
+ },
2944
+ singleWidth: 50
2945
+ })), /*#__PURE__*/React.createElement("div", {
2946
+ style: {
2947
+ flex: 1,
2948
+ minWidth: 734
2889
2949
  }
2890
- }), /*#__PURE__*/React.createElement("div", {
2891
- className: "param-expiries-limit-inputs",
2950
+ }, /*#__PURE__*/React.createElement("div", {
2892
2951
  style: {
2893
- position: 'relative',
2894
- top: -30,
2895
- width: 734,
2896
- gridTemplateColumns: 'auto auto auto auto auto auto'
2952
+ display: 'flex',
2953
+ flexDirection: 'column',
2954
+ gap: 8
2897
2955
  }
2898
2956
  }, it.vegaRules.map(function (rule, k) {
2899
- return /*#__PURE__*/React.createElement(React.Fragment, null, i === 0 && k === 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2900
- className: "param-number-range readonly",
2957
+ var _it$vegaRules;
2958
+
2959
+ return /*#__PURE__*/React.createElement("div", {
2960
+ key: k,
2901
2961
  style: {
2902
- paddingLeft: 36
2962
+ display: 'flex',
2963
+ width: '100%',
2964
+ alignItems: 'center',
2965
+ gap: 8
2903
2966
  }
2904
- }, "Call/Put/Call"), /*#__PURE__*/React.createElement("div", {
2905
- className: "param-number-range readonly"
2906
- }, "Delta Range"), /*#__PURE__*/React.createElement("div", {
2907
- className: "param-number-range readonly"
2908
- }, "Bid Edge Range"), /*#__PURE__*/React.createElement("div", {
2909
- className: "param-number-range readonly"
2910
- }, "Ask Edge Range"), /*#__PURE__*/React.createElement("div", {
2911
- className: "param-number-range readonly"
2912
- }, "Allow Taker"), /*#__PURE__*/React.createElement("div", {
2913
- className: "param-number-range readonly"
2914
- }, "Disabled")) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement("div", {
2967
+ }, /*#__PURE__*/React.createElement("div", {
2915
2968
  style: {
2916
- display: 'flex'
2969
+ display: 'flex',
2970
+ width: 120,
2971
+ height: 30,
2972
+ alignItems: 'center'
2917
2973
  }
2918
2974
  }, /*#__PURE__*/React.createElement("div", {
2919
- className: "param-arr-ops"
2975
+ className: "param-arr-ops",
2976
+ style: {
2977
+ visibility: k === ((_it$vegaRules = it.vegaRules) === null || _it$vegaRules === void 0 ? void 0 : _it$vegaRules.length) - 1 ? 'visible' : 'hidden'
2978
+ }
2920
2979
  }, /*#__PURE__*/React.createElement(PlusOutlined, {
2921
2980
  className: "param-arr-ops-add",
2922
2981
  onClick: _this2.onAddRule.bind(null, i, k),
2923
2982
  style: {
2924
- position: 'relative',
2925
- top: i > 0 ? -30 : 0,
2926
- width: 18
2927
- }
2928
- }), /*#__PURE__*/React.createElement(DeleteOutlined, {
2929
- className: "param-arr-ops-del",
2930
- onClick: _this2.onDelRule.bind(null, i, k),
2931
- style: {
2932
- position: 'relative',
2933
- top: i > 0 ? -30 : 0,
2934
2983
  width: 18
2935
2984
  }
2936
2985
  })), /*#__PURE__*/React.createElement(TextSelector, {
2937
2986
  style: {
2938
2987
  width: 88,
2939
- minWidth: 0,
2940
2988
  padding: '0 10px',
2941
- height: 30
2989
+ height: '30px !important'
2942
2990
  },
2943
2991
  multiple: false,
2944
2992
  value: [rule.optionType || ''],
2945
2993
  onChange: function onChange(val) {
2946
2994
  return _this2.onChange(i, val[0], 'vegaRules', k, 'optionType');
2947
- } // onBlur={this.props.onBlur}
2948
- ,
2995
+ },
2949
2996
  options: ['Both', 'Call', 'Put']
2950
- })), /*#__PURE__*/React.createElement(NumRange, {
2997
+ })), /*#__PURE__*/React.createElement("div", {
2998
+ style: {
2999
+ width: 160
3000
+ }
3001
+ }, /*#__PURE__*/React.createElement(NumRange, {
2951
3002
  value: {
2952
3003
  min: rule.deltaRange.min,
2953
3004
  max: rule.deltaRange.max
@@ -2955,8 +3006,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2955
3006
  onChange: function onChange(val) {
2956
3007
  return _this2.onChange(i, val, 'vegaRules', k, 'deltaRange');
2957
3008
  },
2958
- onBlur: _this2.props.onBlur
2959
- }), /*#__PURE__*/React.createElement(NumRangeFromTo, {
3009
+ onBlur: _this2.props.onBlur,
3010
+ singleWidth: 50
3011
+ })), /*#__PURE__*/React.createElement("div", {
3012
+ style: {
3013
+ width: 210
3014
+ }
3015
+ }, /*#__PURE__*/React.createElement(NumRangeFromTo, {
2960
3016
  value: {
2961
3017
  from: rule.bidEdgeSpan.from,
2962
3018
  to: rule.bidEdgeSpan.to
@@ -2966,7 +3022,11 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2966
3022
  },
2967
3023
  isPercentage: true,
2968
3024
  onBlur: _this2.props.onBlur
2969
- }), /*#__PURE__*/React.createElement(NumRangeFromTo, {
3025
+ })), /*#__PURE__*/React.createElement("div", {
3026
+ style: {
3027
+ width: 210
3028
+ }
3029
+ }, /*#__PURE__*/React.createElement(NumRangeFromTo, {
2970
3030
  value: {
2971
3031
  from: rule.askEdgeSpan.from,
2972
3032
  to: rule.askEdgeSpan.to
@@ -2976,11 +3036,11 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2976
3036
  },
2977
3037
  isPercentage: true,
2978
3038
  onBlur: _this2.props.onBlur
2979
- }), /*#__PURE__*/React.createElement("div", {
3039
+ })), /*#__PURE__*/React.createElement("div", {
2980
3040
  style: {
2981
- width: 74,
2982
- position: 'relative',
2983
- top: 4
3041
+ display: 'flex',
3042
+ justifyContent: 'center',
3043
+ width: 74
2984
3044
  }
2985
3045
  }, /*#__PURE__*/React.createElement(Checkbox, {
2986
3046
  checked: rule.allowTaker,
@@ -2989,33 +3049,40 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2989
3049
  }
2990
3050
  })), /*#__PURE__*/React.createElement("div", {
2991
3051
  style: {
2992
- width: 74,
3052
+ display: 'flex',
3053
+ justifyContent: 'center',
2993
3054
  position: 'relative',
2994
- top: 4
3055
+ width: 60
2995
3056
  }
2996
3057
  }, /*#__PURE__*/React.createElement(Checkbox, {
2997
3058
  checked: rule.disable,
2998
3059
  onChange: function onChange(e) {
2999
3060
  return _this2.onChange(i, e.target.checked, 'vegaRules', k, 'disable');
3000
3061
  }
3001
- })));
3002
- })), /*#__PURE__*/React.createElement("div", {
3003
- className: "param-arr-ops"
3004
- }, /*#__PURE__*/React.createElement(PlusOutlined, {
3005
- className: "param-arr-ops-add",
3006
- onClick: _this2.onAdd.bind(null, i),
3062
+ }), /*#__PURE__*/React.createElement("div", {
3063
+ className: "param-arr-ops",
3064
+ style: {
3065
+ position: 'absolute',
3066
+ right: -80,
3067
+ top: -4,
3068
+ visibility: k === 0 ? 'hidden' : 'visible'
3069
+ }
3070
+ }, /*#__PURE__*/React.createElement(DeleteOutlined, {
3071
+ className: "param-arr-ops-del",
3072
+ onClick: _this2.onDelRule.bind(null, i, k)
3073
+ }))));
3074
+ }))), /*#__PURE__*/React.createElement("div", {
3075
+ className: "param-arr-ops",
3007
3076
  style: {
3008
- position: 'relative',
3009
- top: i > 0 ? -30 : 0
3077
+ width: 60
3010
3078
  }
3079
+ }, /*#__PURE__*/React.createElement(PlusOutlined, {
3080
+ className: "param-arr-ops-add",
3081
+ onClick: _this2.onAdd.bind(null, i)
3011
3082
  }), /*#__PURE__*/React.createElement(DeleteOutlined, {
3012
3083
  className: "param-arr-ops-del",
3013
- onClick: _this2.onDel.bind(null, i),
3014
- style: {
3015
- position: 'relative',
3016
- top: i > 0 ? -30 : 0
3017
- }
3018
- })));
3084
+ onClick: _this2.onDel.bind(null, i)
3085
+ }))));
3019
3086
  })));
3020
3087
  }
3021
3088
  }]);
@@ -3029,8 +3096,8 @@ function emptyErrText(index, key) {
3029
3096
  return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should not be empty");
3030
3097
  }
3031
3098
 
3032
- function zeroErrText(index, key, type) {
3033
- return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should be ").concat(type === 'min' ? '<' : '>', " 0");
3099
+ function zeroErrText(index, key, type, canZero) {
3100
+ return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should be ").concat(type === 'min' ? canZero ? '<=' : '<' : canZero ? '>=' : '>', " 0");
3034
3101
  }
3035
3102
 
3036
3103
  var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig, ParamType.ParamGroup, {
@@ -3379,10 +3446,25 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3379
3446
  return emptyErrText(i, "delta range's min");
3380
3447
  }
3381
3448
 
3449
+ if (Number(vegaRule.deltaRange.min) < 0 || Number(vegaRule.deltaRange.min) > 1) {
3450
+ // return zeroErrText(i, "delta range's min", 'max', true);
3451
+ return "The ".concat(i + 1).concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: delta range's min only support 0 ~ 1");
3452
+ }
3453
+
3382
3454
  if (isEmpty(vegaRule.deltaRange.max)) {
3383
3455
  return emptyErrText(i, "delta range's max");
3384
3456
  }
3385
3457
 
3458
+ if (Number(vegaRule.deltaRange.max) < 0 || Number(vegaRule.deltaRange.max) > 1) {
3459
+ // return zeroErrText(i, "delta range's max", 'max', true);
3460
+ return "The ".concat(i + 1).concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: delta range's max only support 0 ~ 1");
3461
+ }
3462
+
3463
+ if (Number(vegaRule.deltaRange.max) <= Number(vegaRule.deltaRange.min)) {
3464
+ // return zeroErrText(i, "delta range's max", 'max', true);
3465
+ return "The ".concat(i + 1).concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: delta range's max should be > min");
3466
+ }
3467
+
3386
3468
  if (isEmpty(vegaRule.bidEdgeSpan.from)) {
3387
3469
  return emptyErrText(i, "bid edge range's from");
3388
3470
  }
@@ -3400,38 +3482,38 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3400
3482
  }
3401
3483
 
3402
3484
  if (Number(val.vegaTarget) > 0) {
3403
- if (Number(vegaRule.bidEdgeSpan.from) <= 0) {
3404
- return zeroErrText(i, "bid edge range's from", 'max');
3485
+ if (Number(vegaRule.bidEdgeSpan.from) < 0) {
3486
+ return zeroErrText(i, "bid edge range's from", 'max', true);
3405
3487
  }
3406
3488
 
3407
- if (Number(vegaRule.bidEdgeSpan.to) <= 0) {
3408
- return zeroErrText(i, "bid edge range's to", 'max');
3489
+ if (Number(vegaRule.bidEdgeSpan.to) < 0) {
3490
+ return zeroErrText(i, "bid edge range's to", 'max', true);
3409
3491
  }
3410
3492
 
3411
- if (Number(vegaRule.askEdgeSpan.from) <= 0) {
3412
- return zeroErrText(i, "ask edge range's from", 'max');
3493
+ if (Number(vegaRule.askEdgeSpan.from) < 0) {
3494
+ return zeroErrText(i, "ask edge range's from", 'max', true);
3413
3495
  }
3414
3496
 
3415
- if (Number(vegaRule.askEdgeSpan.to) <= 0) {
3416
- return zeroErrText(i, "ask edge range's to", 'max');
3497
+ if (Number(vegaRule.askEdgeSpan.to) < 0) {
3498
+ return zeroErrText(i, "ask edge range's to", 'max', true);
3417
3499
  }
3418
3500
  }
3419
3501
 
3420
3502
  if (Number(val.vegaTarget) < 0) {
3421
- if (Number(vegaRule.bidEdgeSpan.from) >= 0) {
3422
- return zeroErrText(i, "bid edge range's from", 'min');
3503
+ if (Number(vegaRule.bidEdgeSpan.from) > 0) {
3504
+ return zeroErrText(i, "bid edge range's from", 'min', true);
3423
3505
  }
3424
3506
 
3425
- if (Number(vegaRule.bidEdgeSpan.to) >= 0) {
3426
- return zeroErrText(i, "bid edge range's to", 'min');
3507
+ if (Number(vegaRule.bidEdgeSpan.to) > 0) {
3508
+ return zeroErrText(i, "bid edge range's to", 'min', true);
3427
3509
  }
3428
3510
 
3429
- if (Number(vegaRule.askEdgeSpan.from) >= 0) {
3430
- return zeroErrText(i, "ask edge range's from", 'min');
3511
+ if (Number(vegaRule.askEdgeSpan.from) > 0) {
3512
+ return zeroErrText(i, "ask edge range's from", 'min', true);
3431
3513
  }
3432
3514
 
3433
- if (Number(vegaRule.askEdgeSpan.to) >= 0) {
3434
- return zeroErrText(i, "ask edge range's to", 'min');
3515
+ if (Number(vegaRule.askEdgeSpan.to) > 0) {
3516
+ return zeroErrText(i, "ask edge range's to", 'min', true);
3435
3517
  }
3436
3518
  }
3437
3519
  } // if (expiries.includes(val.expiry)) {
@@ -3451,7 +3533,7 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3451
3533
  return '';
3452
3534
  },
3453
3535
  sort: 18,
3454
- modalWidth: 1280
3536
+ modalWidth: 1300
3455
3537
  }), _ParamTypeConfig);
3456
3538
  function paramValidator(val, values, enableEmpty) {
3457
3539
  var _config$validator;
@@ -3772,8 +3854,6 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3772
3854
  var _super2 = _createSuper(ParamFormModalEl);
3773
3855
 
3774
3856
  function ParamFormModalEl() {
3775
- var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
3776
-
3777
3857
  var _this4;
3778
3858
 
3779
3859
  _classCallCheck(this, ParamFormModalEl);
@@ -3789,12 +3869,15 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3789
3869
  _defineProperty(_assertThisInitialized(_this4), "state", {
3790
3870
  visible: false,
3791
3871
  pending: false,
3792
- 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
3872
+ width: 740
3793
3873
  });
3794
3874
 
3795
3875
  _defineProperty(_assertThisInitialized(_this4), "onShow", function () {
3876
+ var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
3877
+
3796
3878
  return _this4.setState({
3797
- visible: true
3879
+ visible: true,
3880
+ 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
3798
3881
  });
3799
3882
  });
3800
3883
 
@@ -3851,6 +3934,7 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3851
3934
  closable: false,
3852
3935
  title: !this.isEdit ? '新增参数' : '修改参数',
3853
3936
  visible: this.state.visible,
3937
+ destroyOnClose: true,
3854
3938
  footer: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
3855
3939
  onClick: this.onHide
3856
3940
  }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
@@ -4056,12 +4140,13 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
4056
4140
  _defineProperty(_assertThisInitialized(_this3), "state", {
4057
4141
  visible: false,
4058
4142
  pending: false,
4059
- width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
4143
+ width: 740
4060
4144
  });
4061
4145
 
4062
4146
  _defineProperty(_assertThisInitialized(_this3), "onShow", function () {
4063
4147
  return _this3.setState({
4064
- visible: true
4148
+ visible: true,
4149
+ width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
4065
4150
  });
4066
4151
  });
4067
4152
 
@@ -4107,10 +4192,11 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
4107
4192
  value: function render() {
4108
4193
  return /*#__PURE__*/React.createElement(Modal, {
4109
4194
  key: String(this.state.visible),
4110
- width: this.state.width || 740,
4195
+ width: this.state.width,
4111
4196
  title: 'Edit Value',
4112
4197
  closable: false,
4113
4198
  visible: this.state.visible,
4199
+ destroyOnClose: true,
4114
4200
  footer: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
4115
4201
  onClick: this.onHide
4116
4202
  }, "Cancel"), /*#__PURE__*/React.createElement(Button, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalplus/params-about",
3
- "version": "1.0.26-alpha8",
3
+ "version": "1.0.26",
4
4
  "description": "A description for the module",
5
5
  "main": "./lib/umd/index.js",
6
6
  "module": "./lib/es/index.js",
@@ -89,5 +89,8 @@
89
89
  "dayjs": "^1.11.0",
90
90
  "lodash-es": "^4.17.21",
91
91
  "react-global-comp": "^2.0.1"
92
+ },
93
+ "dependencies": {
94
+ "@signalplus/params-about": "1.0.26-alpha18"
92
95
  }
93
96
  }