@signalplus/params-about 1.0.26-alpha9 → 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 -109
  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-alpha9
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,67 +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
2983
  width: 18
2925
2984
  }
2926
- }), /*#__PURE__*/React.createElement(DeleteOutlined, {
2927
- className: "param-arr-ops-del",
2928
- onClick: _this2.onDelRule.bind(null, i, k),
2929
- style: {
2930
- width: 18
2931
- }
2932
2985
  })), /*#__PURE__*/React.createElement(TextSelector, {
2933
2986
  style: {
2934
2987
  width: 88,
2935
- minWidth: 0,
2936
2988
  padding: '0 10px',
2937
- height: 30
2989
+ height: '30px !important'
2938
2990
  },
2939
2991
  multiple: false,
2940
2992
  value: [rule.optionType || ''],
2941
2993
  onChange: function onChange(val) {
2942
2994
  return _this2.onChange(i, val[0], 'vegaRules', k, 'optionType');
2943
- } // onBlur={this.props.onBlur}
2944
- ,
2995
+ },
2945
2996
  options: ['Both', 'Call', 'Put']
2946
- })), /*#__PURE__*/React.createElement(NumRange, {
2997
+ })), /*#__PURE__*/React.createElement("div", {
2998
+ style: {
2999
+ width: 160
3000
+ }
3001
+ }, /*#__PURE__*/React.createElement(NumRange, {
2947
3002
  value: {
2948
3003
  min: rule.deltaRange.min,
2949
3004
  max: rule.deltaRange.max
@@ -2951,8 +3006,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2951
3006
  onChange: function onChange(val) {
2952
3007
  return _this2.onChange(i, val, 'vegaRules', k, 'deltaRange');
2953
3008
  },
2954
- onBlur: _this2.props.onBlur
2955
- }), /*#__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, {
2956
3016
  value: {
2957
3017
  from: rule.bidEdgeSpan.from,
2958
3018
  to: rule.bidEdgeSpan.to
@@ -2962,7 +3022,11 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2962
3022
  },
2963
3023
  isPercentage: true,
2964
3024
  onBlur: _this2.props.onBlur
2965
- }), /*#__PURE__*/React.createElement(NumRangeFromTo, {
3025
+ })), /*#__PURE__*/React.createElement("div", {
3026
+ style: {
3027
+ width: 210
3028
+ }
3029
+ }, /*#__PURE__*/React.createElement(NumRangeFromTo, {
2966
3030
  value: {
2967
3031
  from: rule.askEdgeSpan.from,
2968
3032
  to: rule.askEdgeSpan.to
@@ -2972,11 +3036,11 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2972
3036
  },
2973
3037
  isPercentage: true,
2974
3038
  onBlur: _this2.props.onBlur
2975
- }), /*#__PURE__*/React.createElement("div", {
3039
+ })), /*#__PURE__*/React.createElement("div", {
2976
3040
  style: {
2977
- width: 74,
2978
- position: 'relative',
2979
- top: 4
3041
+ display: 'flex',
3042
+ justifyContent: 'center',
3043
+ width: 74
2980
3044
  }
2981
3045
  }, /*#__PURE__*/React.createElement(Checkbox, {
2982
3046
  checked: rule.allowTaker,
@@ -2985,33 +3049,40 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
2985
3049
  }
2986
3050
  })), /*#__PURE__*/React.createElement("div", {
2987
3051
  style: {
2988
- width: 74,
3052
+ display: 'flex',
3053
+ justifyContent: 'center',
2989
3054
  position: 'relative',
2990
- top: 4
3055
+ width: 60
2991
3056
  }
2992
3057
  }, /*#__PURE__*/React.createElement(Checkbox, {
2993
3058
  checked: rule.disable,
2994
3059
  onChange: function onChange(e) {
2995
3060
  return _this2.onChange(i, e.target.checked, 'vegaRules', k, 'disable');
2996
3061
  }
2997
- })));
2998
- })), /*#__PURE__*/React.createElement("div", {
2999
- className: "param-arr-ops"
3000
- }, /*#__PURE__*/React.createElement(PlusOutlined, {
3001
- className: "param-arr-ops-add",
3002
- 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",
3003
3076
  style: {
3004
- position: 'relative',
3005
- top: i > 0 ? -30 : 0
3077
+ width: 60
3006
3078
  }
3079
+ }, /*#__PURE__*/React.createElement(PlusOutlined, {
3080
+ className: "param-arr-ops-add",
3081
+ onClick: _this2.onAdd.bind(null, i)
3007
3082
  }), /*#__PURE__*/React.createElement(DeleteOutlined, {
3008
3083
  className: "param-arr-ops-del",
3009
- onClick: _this2.onDel.bind(null, i),
3010
- style: {
3011
- position: 'relative',
3012
- top: i > 0 ? -30 : 0
3013
- }
3014
- })));
3084
+ onClick: _this2.onDel.bind(null, i)
3085
+ }))));
3015
3086
  })));
3016
3087
  }
3017
3088
  }]);
@@ -3025,8 +3096,8 @@ function emptyErrText(index, key) {
3025
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");
3026
3097
  }
3027
3098
 
3028
- function zeroErrText(index, key, type) {
3029
- 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");
3030
3101
  }
3031
3102
 
3032
3103
  var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig, ParamType.ParamGroup, {
@@ -3375,10 +3446,25 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3375
3446
  return emptyErrText(i, "delta range's min");
3376
3447
  }
3377
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
+
3378
3454
  if (isEmpty(vegaRule.deltaRange.max)) {
3379
3455
  return emptyErrText(i, "delta range's max");
3380
3456
  }
3381
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
+
3382
3468
  if (isEmpty(vegaRule.bidEdgeSpan.from)) {
3383
3469
  return emptyErrText(i, "bid edge range's from");
3384
3470
  }
@@ -3396,38 +3482,38 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3396
3482
  }
3397
3483
 
3398
3484
  if (Number(val.vegaTarget) > 0) {
3399
- if (Number(vegaRule.bidEdgeSpan.from) <= 0) {
3400
- 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);
3401
3487
  }
3402
3488
 
3403
- if (Number(vegaRule.bidEdgeSpan.to) <= 0) {
3404
- 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);
3405
3491
  }
3406
3492
 
3407
- if (Number(vegaRule.askEdgeSpan.from) <= 0) {
3408
- 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);
3409
3495
  }
3410
3496
 
3411
- if (Number(vegaRule.askEdgeSpan.to) <= 0) {
3412
- 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);
3413
3499
  }
3414
3500
  }
3415
3501
 
3416
3502
  if (Number(val.vegaTarget) < 0) {
3417
- if (Number(vegaRule.bidEdgeSpan.from) >= 0) {
3418
- 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);
3419
3505
  }
3420
3506
 
3421
- if (Number(vegaRule.bidEdgeSpan.to) >= 0) {
3422
- 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);
3423
3509
  }
3424
3510
 
3425
- if (Number(vegaRule.askEdgeSpan.from) >= 0) {
3426
- 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);
3427
3513
  }
3428
3514
 
3429
- if (Number(vegaRule.askEdgeSpan.to) >= 0) {
3430
- 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);
3431
3517
  }
3432
3518
  }
3433
3519
  } // if (expiries.includes(val.expiry)) {
@@ -3447,7 +3533,7 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
3447
3533
  return '';
3448
3534
  },
3449
3535
  sort: 18,
3450
- modalWidth: 1280
3536
+ modalWidth: 1300
3451
3537
  }), _ParamTypeConfig);
3452
3538
  function paramValidator(val, values, enableEmpty) {
3453
3539
  var _config$validator;
@@ -3768,8 +3854,6 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3768
3854
  var _super2 = _createSuper(ParamFormModalEl);
3769
3855
 
3770
3856
  function ParamFormModalEl() {
3771
- var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
3772
-
3773
3857
  var _this4;
3774
3858
 
3775
3859
  _classCallCheck(this, ParamFormModalEl);
@@ -3785,12 +3869,15 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3785
3869
  _defineProperty(_assertThisInitialized(_this4), "state", {
3786
3870
  visible: false,
3787
3871
  pending: false,
3788
- 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
3789
3873
  });
3790
3874
 
3791
3875
  _defineProperty(_assertThisInitialized(_this4), "onShow", function () {
3876
+ var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
3877
+
3792
3878
  return _this4.setState({
3793
- 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
3794
3881
  });
3795
3882
  });
3796
3883
 
@@ -3847,6 +3934,7 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
3847
3934
  closable: false,
3848
3935
  title: !this.isEdit ? '新增参数' : '修改参数',
3849
3936
  visible: this.state.visible,
3937
+ destroyOnClose: true,
3850
3938
  footer: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
3851
3939
  onClick: this.onHide
3852
3940
  }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
@@ -4052,12 +4140,13 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
4052
4140
  _defineProperty(_assertThisInitialized(_this3), "state", {
4053
4141
  visible: false,
4054
4142
  pending: false,
4055
- width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
4143
+ width: 740
4056
4144
  });
4057
4145
 
4058
4146
  _defineProperty(_assertThisInitialized(_this3), "onShow", function () {
4059
4147
  return _this3.setState({
4060
- visible: true
4148
+ visible: true,
4149
+ width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
4061
4150
  });
4062
4151
  });
4063
4152
 
@@ -4103,10 +4192,11 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
4103
4192
  value: function render() {
4104
4193
  return /*#__PURE__*/React.createElement(Modal, {
4105
4194
  key: String(this.state.visible),
4106
- width: this.state.width || 740,
4195
+ width: this.state.width,
4107
4196
  title: 'Edit Value',
4108
4197
  closable: false,
4109
4198
  visible: this.state.visible,
4199
+ destroyOnClose: true,
4110
4200
  footer: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
4111
4201
  onClick: this.onHide
4112
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-alpha9",
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
  }