@signalplus/params-about 1.0.26-alpha → 1.0.26-alpha11
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 +6 -1
- package/lib/es/index.js +345 -94
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ interface ParamFormProps {
|
|
|
92
92
|
groupEditable?: boolean;
|
|
93
93
|
onChange?(data: ParamFormData): void;
|
|
94
94
|
onSubmit?(data: ParamFormData): any;
|
|
95
|
+
onModalWidthChange?(width: number): any;
|
|
95
96
|
}
|
|
96
97
|
declare class ParamForm extends PureComponent<ParamFormProps> {
|
|
97
98
|
ref: React.RefObject<any>;
|
|
@@ -110,12 +111,13 @@ declare class ParamFormModalEl extends PureComponent<ParamFormProps & Required<P
|
|
|
110
111
|
state: {
|
|
111
112
|
visible: boolean;
|
|
112
113
|
pending: boolean;
|
|
114
|
+
width: number | undefined;
|
|
113
115
|
};
|
|
114
116
|
get isEdit(): boolean;
|
|
115
117
|
onShow: () => void;
|
|
116
118
|
onHide: () => void;
|
|
117
119
|
onSubmit: () => any;
|
|
118
|
-
width:
|
|
120
|
+
handleModalWidthChange: (width: number) => void;
|
|
119
121
|
render(): JSX.Element;
|
|
120
122
|
}
|
|
121
123
|
declare class ParamFormModal {
|
|
@@ -139,6 +141,7 @@ interface ParamValueEditorProps {
|
|
|
139
141
|
initialValues: ParamValueEditorData;
|
|
140
142
|
onChange?(data: ParamValueEditorData): void;
|
|
141
143
|
onSubmit?(data: ParamValueEditorData): any;
|
|
144
|
+
onModalWidthChange(width: number): void;
|
|
142
145
|
}
|
|
143
146
|
declare class ParamValueEditor extends PureComponent<ParamValueEditorProps> {
|
|
144
147
|
ref: React.RefObject<any>;
|
|
@@ -158,10 +161,12 @@ declare class ParamValueEditorModalEl extends PureComponent<ParamValueEditorProp
|
|
|
158
161
|
state: {
|
|
159
162
|
visible: boolean;
|
|
160
163
|
pending: boolean;
|
|
164
|
+
width: number;
|
|
161
165
|
};
|
|
162
166
|
onShow: () => void;
|
|
163
167
|
onHide: () => void;
|
|
164
168
|
onSubmit: () => any;
|
|
169
|
+
handleModalWidthChange: (width: number) => void;
|
|
165
170
|
render(): JSX.Element;
|
|
166
171
|
}
|
|
167
172
|
declare class ParamValueEditorModal {
|
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bundle of @signalplus/params-about
|
|
3
|
-
* Generated: 2025-
|
|
4
|
-
* Version: 1.0.26-
|
|
3
|
+
* Generated: 2025-11-06
|
|
4
|
+
* Version: 1.0.26-alpha11
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -629,7 +629,7 @@ var NumRange = /*#__PURE__*/function (_PureComponent) {
|
|
|
629
629
|
}, this.props.className),
|
|
630
630
|
style: this.props.style
|
|
631
631
|
}, this.props.readonly ? '(' : '', /*#__PURE__*/React.createElement(Num, {
|
|
632
|
-
placeholder: 'Min',
|
|
632
|
+
placeholder: this.props.minName || 'Min',
|
|
633
633
|
value: (_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.min,
|
|
634
634
|
onChange: this.onChange.bind(null, 'min'),
|
|
635
635
|
isPercentage: this.props.isPercentage,
|
|
@@ -642,7 +642,7 @@ var NumRange = /*#__PURE__*/function (_PureComponent) {
|
|
|
642
642
|
marginRight: 4
|
|
643
643
|
} : undefined
|
|
644
644
|
}, this.props.readonly ? ',' : '~'), /*#__PURE__*/React.createElement(Num, {
|
|
645
|
-
placeholder: 'Max',
|
|
645
|
+
placeholder: this.props.maxName || 'Max',
|
|
646
646
|
value: (_this$props$value2 = this.props.value) === null || _this$props$value2 === void 0 ? void 0 : _this$props$value2.max,
|
|
647
647
|
onChange: this.onChange.bind(null, 'max'),
|
|
648
648
|
isPercentage: this.props.isPercentage,
|
|
@@ -2504,6 +2504,118 @@ 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
|
+
|
|
2572
|
+
function hasRangeOverlap(range1, range2) {
|
|
2573
|
+
var _range1$min, _range1$max, _range2$min, _range2$max;
|
|
2574
|
+
|
|
2575
|
+
var min1 = (_range1$min = range1.min) !== null && _range1$min !== void 0 ? _range1$min : -Infinity;
|
|
2576
|
+
var max1 = (_range1$max = range1.max) !== null && _range1$max !== void 0 ? _range1$max : Infinity;
|
|
2577
|
+
var min2 = (_range2$min = range2.min) !== null && _range2$min !== void 0 ? _range2$min : -Infinity;
|
|
2578
|
+
var max2 = (_range2$max = range2.max) !== null && _range2$max !== void 0 ? _range2$max : Infinity; // 边界相等不算重叠,所以用严格比较
|
|
2579
|
+
|
|
2580
|
+
return min1 < max2 && min2 < max1;
|
|
2581
|
+
}
|
|
2582
|
+
/**
|
|
2583
|
+
* 检查VegaRules数组是否合法
|
|
2584
|
+
*/
|
|
2585
|
+
|
|
2586
|
+
|
|
2587
|
+
function validateVegaRules(rules) {
|
|
2588
|
+
for (var i = 0; i < rules.length; i++) {
|
|
2589
|
+
var _currentRule$optionTy;
|
|
2590
|
+
|
|
2591
|
+
var currentRule = rules[i];
|
|
2592
|
+
var currentType = (_currentRule$optionTy = currentRule.optionType) !== null && _currentRule$optionTy !== void 0 ? _currentRule$optionTy : 'Both'; // 默认按Both处理
|
|
2593
|
+
|
|
2594
|
+
for (var j = i + 1; j < rules.length; j++) {
|
|
2595
|
+
var _compareRule$optionTy;
|
|
2596
|
+
|
|
2597
|
+
var compareRule = rules[j];
|
|
2598
|
+
var compareType = (_compareRule$optionTy = compareRule.optionType) !== null && _compareRule$optionTy !== void 0 ? _compareRule$optionTy : 'Both'; // 检查是否需要比较这两个规则
|
|
2599
|
+
|
|
2600
|
+
var shouldCompare = false;
|
|
2601
|
+
|
|
2602
|
+
if (currentType === 'Both' || compareType === 'Both') {
|
|
2603
|
+
// 任意一个是Both,就需要比较
|
|
2604
|
+
shouldCompare = true;
|
|
2605
|
+
} else if (currentType === compareType) {
|
|
2606
|
+
// 类型相同(都是Call或都是Put),需要比较
|
|
2607
|
+
shouldCompare = true;
|
|
2608
|
+
} // 类型不同(一个Call一个Put),不需要比较
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
if (shouldCompare && hasRangeOverlap(currentRule.deltaRange, compareRule.deltaRange)) {
|
|
2612
|
+
return false; // 发现重叠,不合法
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
return true; // 没有发现重叠,合法
|
|
2618
|
+
}
|
|
2507
2619
|
var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
2508
2620
|
_inherits(ExpiryVegaAlphaByEdgeList, _PureComponent);
|
|
2509
2621
|
|
|
@@ -2526,7 +2638,7 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2526
2638
|
var _item$vegaRules, _item$expiry;
|
|
2527
2639
|
|
|
2528
2640
|
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.
|
|
2641
|
+
return it.deltaRange.min || it.deltaRange.max || it.bidEdgeSpan.from || it.bidEdgeSpan.to || it.askEdgeSpan.from || it.askEdgeSpan.to;
|
|
2530
2642
|
}) : true;
|
|
2531
2643
|
return !((_item$expiry = item.expiry) === null || _item$expiry === void 0 ? void 0 : _item$expiry.trim()) && !item.vegaTarget && !!vegaRulesValid;
|
|
2532
2644
|
});
|
|
@@ -2545,13 +2657,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2545
2657
|
min: undefined,
|
|
2546
2658
|
max: undefined
|
|
2547
2659
|
},
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2660
|
+
bidEdgeSpan: {
|
|
2661
|
+
from: undefined,
|
|
2662
|
+
to: undefined
|
|
2551
2663
|
},
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2664
|
+
askEdgeSpan: {
|
|
2665
|
+
from: undefined,
|
|
2666
|
+
to: undefined
|
|
2555
2667
|
},
|
|
2556
2668
|
allowTaker: false,
|
|
2557
2669
|
disable: false
|
|
@@ -2560,38 +2672,38 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2560
2672
|
|
|
2561
2673
|
if (key) {
|
|
2562
2674
|
if (subKey && typeof k === 'number') {
|
|
2563
|
-
if (subKey === 'optionType') {
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2675
|
+
// if (subKey === 'optionType') {
|
|
2676
|
+
// // console.log('changeValue==========================', value, i, val, key, k, subKey);
|
|
2677
|
+
// if (val === 'Both') {
|
|
2678
|
+
// value[i].vegaRules = [{ ...value[i].vegaRules[k], optionType: 'Both' }];
|
|
2679
|
+
// } else {
|
|
2680
|
+
// if (value[i].vegaRules?.length <= 1)
|
|
2681
|
+
// value[i].vegaRules = [
|
|
2682
|
+
// { ...value[i].vegaRules[k], optionType: val },
|
|
2683
|
+
// {
|
|
2684
|
+
// optionType: val === 'Call' ? 'Put' : 'Call',
|
|
2685
|
+
// deltaRange: {
|
|
2686
|
+
// min: undefined,
|
|
2687
|
+
// max: undefined,
|
|
2688
|
+
// },
|
|
2689
|
+
// bidEdgeSpan: {
|
|
2690
|
+
// from: undefined,
|
|
2691
|
+
// to: undefined,
|
|
2692
|
+
// },
|
|
2693
|
+
// askEdgeSpan: {
|
|
2694
|
+
// from: undefined,
|
|
2695
|
+
// to: undefined,
|
|
2696
|
+
// },
|
|
2697
|
+
// allowTaker: false,
|
|
2698
|
+
// disable: false,
|
|
2699
|
+
// },
|
|
2700
|
+
// ];
|
|
2701
|
+
// else value[i].vegaRules[k][subKey] = val as never;
|
|
2702
|
+
// }
|
|
2703
|
+
// } else {
|
|
2704
|
+
// value[i].vegaRules[k][subKey] = val as never;
|
|
2705
|
+
// }
|
|
2706
|
+
value[i].vegaRules[k][subKey] = val;
|
|
2595
2707
|
} else {
|
|
2596
2708
|
value[i][key] = val;
|
|
2597
2709
|
}
|
|
@@ -2616,13 +2728,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2616
2728
|
min: undefined,
|
|
2617
2729
|
max: undefined
|
|
2618
2730
|
},
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2731
|
+
bidEdgeSpan: {
|
|
2732
|
+
from: undefined,
|
|
2733
|
+
to: undefined
|
|
2622
2734
|
},
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2735
|
+
askEdgeSpan: {
|
|
2736
|
+
from: undefined,
|
|
2737
|
+
to: undefined
|
|
2626
2738
|
},
|
|
2627
2739
|
allowTaker: false,
|
|
2628
2740
|
disable: false
|
|
@@ -2632,16 +2744,52 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2632
2744
|
(_this$props$onBlur = (_this$props3 = _this.props).onBlur) === null || _this$props$onBlur === void 0 ? void 0 : _this$props$onBlur.call(_this$props3);
|
|
2633
2745
|
});
|
|
2634
2746
|
|
|
2635
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
2747
|
+
_defineProperty(_assertThisInitialized(_this), "onAddRule", function (i, k) {
|
|
2636
2748
|
var _this$props$onChange3, _this$props4, _this$props$onBlur2, _this$props5;
|
|
2637
2749
|
|
|
2638
2750
|
var value = _toConsumableArray(_this.value);
|
|
2639
2751
|
|
|
2640
|
-
value.splice(
|
|
2641
|
-
|
|
2752
|
+
value[i].vegaRules.splice(k + 1, 0, {
|
|
2753
|
+
optionType: undefined,
|
|
2754
|
+
deltaRange: {
|
|
2755
|
+
min: undefined,
|
|
2756
|
+
max: undefined
|
|
2757
|
+
},
|
|
2758
|
+
bidEdgeSpan: {
|
|
2759
|
+
from: undefined,
|
|
2760
|
+
to: undefined
|
|
2761
|
+
},
|
|
2762
|
+
askEdgeSpan: {
|
|
2763
|
+
from: undefined,
|
|
2764
|
+
to: undefined
|
|
2765
|
+
},
|
|
2766
|
+
allowTaker: false,
|
|
2767
|
+
disable: false
|
|
2768
|
+
});
|
|
2769
|
+
(_this$props$onChange3 = (_this$props4 = _this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props4, value);
|
|
2642
2770
|
(_this$props$onBlur2 = (_this$props5 = _this.props).onBlur) === null || _this$props$onBlur2 === void 0 ? void 0 : _this$props$onBlur2.call(_this$props5);
|
|
2643
2771
|
});
|
|
2644
2772
|
|
|
2773
|
+
_defineProperty(_assertThisInitialized(_this), "onDel", function (i) {
|
|
2774
|
+
var _this$props$onChange4, _this$props6, _this$props$onBlur3, _this$props7;
|
|
2775
|
+
|
|
2776
|
+
var value = _toConsumableArray(_this.value);
|
|
2777
|
+
|
|
2778
|
+
value.splice(i, 1);
|
|
2779
|
+
(_this$props$onChange4 = (_this$props6 = _this.props).onChange) === null || _this$props$onChange4 === void 0 ? void 0 : _this$props$onChange4.call(_this$props6, value.length === 1 && _this.isEmptyItem(value[0]) ? [] : value);
|
|
2780
|
+
(_this$props$onBlur3 = (_this$props7 = _this.props).onBlur) === null || _this$props$onBlur3 === void 0 ? void 0 : _this$props$onBlur3.call(_this$props7);
|
|
2781
|
+
});
|
|
2782
|
+
|
|
2783
|
+
_defineProperty(_assertThisInitialized(_this), "onDelRule", function (i, k) {
|
|
2784
|
+
var _this$props$onChange5, _this$props8, _this$props$onBlur4, _this$props9;
|
|
2785
|
+
|
|
2786
|
+
var value = _toConsumableArray(_this.value);
|
|
2787
|
+
|
|
2788
|
+
value[i].vegaRules.splice(k, 1);
|
|
2789
|
+
(_this$props$onChange5 = (_this$props8 = _this.props).onChange) === null || _this$props$onChange5 === void 0 ? void 0 : _this$props$onChange5.call(_this$props8, value.length === 1 && _this.isEmptyItem(value[0]) ? [] : value);
|
|
2790
|
+
(_this$props$onBlur4 = (_this$props9 = _this.props).onBlur) === null || _this$props$onBlur4 === void 0 ? void 0 : _this$props$onBlur4.call(_this$props9);
|
|
2791
|
+
});
|
|
2792
|
+
|
|
2645
2793
|
return _this;
|
|
2646
2794
|
}
|
|
2647
2795
|
|
|
@@ -2664,13 +2812,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2664
2812
|
min: undefined,
|
|
2665
2813
|
max: undefined
|
|
2666
2814
|
},
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2815
|
+
bidEdgeSpan: {
|
|
2816
|
+
from: undefined,
|
|
2817
|
+
to: undefined
|
|
2670
2818
|
},
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2819
|
+
askEdgeSpan: {
|
|
2820
|
+
from: undefined,
|
|
2821
|
+
to: undefined
|
|
2674
2822
|
},
|
|
2675
2823
|
allowTaker: false,
|
|
2676
2824
|
disable: false
|
|
@@ -2689,12 +2837,13 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2689
2837
|
}, it.expiry, /*#__PURE__*/React.createElement("span", null, "/"), !isNullLike(it.vegaTarget) ? it.vegaTarget : '-', /*#__PURE__*/React.createElement("span", null, "/"), it.vegaRules.map(function ($it, $i) {
|
|
2690
2838
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
2691
2839
|
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.
|
|
2840
|
+
}, !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
2841
|
})), /*#__PURE__*/React.createElement("br", null));
|
|
2694
2842
|
}) : '-' : /*#__PURE__*/React.createElement("div", {
|
|
2695
2843
|
className: "param-expiries-limit-inputs",
|
|
2696
2844
|
style: {
|
|
2697
|
-
gridTemplateColumns: '110px 100px auto auto'
|
|
2845
|
+
gridTemplateColumns: '110px 100px auto auto',
|
|
2846
|
+
width: 1150
|
|
2698
2847
|
}
|
|
2699
2848
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2700
2849
|
className: "param-number-range readonly"
|
|
@@ -2748,9 +2897,14 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2748
2897
|
gridTemplateColumns: 'auto auto auto auto auto auto'
|
|
2749
2898
|
}
|
|
2750
2899
|
}, it.vegaRules.map(function (rule, k) {
|
|
2900
|
+
var _it$vegaRules;
|
|
2901
|
+
|
|
2751
2902
|
return /*#__PURE__*/React.createElement(React.Fragment, null, i === 0 && k === 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2752
|
-
className: "param-number-range readonly"
|
|
2753
|
-
|
|
2903
|
+
className: "param-number-range readonly",
|
|
2904
|
+
style: {
|
|
2905
|
+
paddingLeft: 36
|
|
2906
|
+
}
|
|
2907
|
+
}, "Both/Call/Put"), /*#__PURE__*/React.createElement("div", {
|
|
2754
2908
|
className: "param-number-range readonly"
|
|
2755
2909
|
}, "Delta Range"), /*#__PURE__*/React.createElement("div", {
|
|
2756
2910
|
className: "param-number-range readonly"
|
|
@@ -2760,7 +2914,23 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2760
2914
|
className: "param-number-range readonly"
|
|
2761
2915
|
}, "Allow Taker"), /*#__PURE__*/React.createElement("div", {
|
|
2762
2916
|
className: "param-number-range readonly"
|
|
2763
|
-
}, "Disabled")) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(
|
|
2917
|
+
}, "Disabled")) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement("div", {
|
|
2918
|
+
style: {
|
|
2919
|
+
display: 'flex',
|
|
2920
|
+
width: 116
|
|
2921
|
+
}
|
|
2922
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2923
|
+
className: "param-arr-ops",
|
|
2924
|
+
style: {
|
|
2925
|
+
visibility: k === ((_it$vegaRules = it.vegaRules) === null || _it$vegaRules === void 0 ? void 0 : _it$vegaRules.length) - 1 ? 'visible' : 'hidden'
|
|
2926
|
+
}
|
|
2927
|
+
}, /*#__PURE__*/React.createElement(PlusOutlined, {
|
|
2928
|
+
className: "param-arr-ops-add",
|
|
2929
|
+
onClick: _this2.onAddRule.bind(null, i, k),
|
|
2930
|
+
style: {
|
|
2931
|
+
width: 18
|
|
2932
|
+
}
|
|
2933
|
+
})), /*#__PURE__*/React.createElement(TextSelector, {
|
|
2764
2934
|
style: {
|
|
2765
2935
|
width: 88,
|
|
2766
2936
|
minWidth: 0,
|
|
@@ -2774,7 +2944,7 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2774
2944
|
} // onBlur={this.props.onBlur}
|
|
2775
2945
|
,
|
|
2776
2946
|
options: ['Both', 'Call', 'Put']
|
|
2777
|
-
}), /*#__PURE__*/React.createElement(NumRange, {
|
|
2947
|
+
})), /*#__PURE__*/React.createElement(NumRange, {
|
|
2778
2948
|
value: {
|
|
2779
2949
|
min: rule.deltaRange.min,
|
|
2780
2950
|
max: rule.deltaRange.max
|
|
@@ -2783,23 +2953,23 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2783
2953
|
return _this2.onChange(i, val, 'vegaRules', k, 'deltaRange');
|
|
2784
2954
|
},
|
|
2785
2955
|
onBlur: _this2.props.onBlur
|
|
2786
|
-
}), /*#__PURE__*/React.createElement(
|
|
2956
|
+
}), /*#__PURE__*/React.createElement(NumRangeFromTo, {
|
|
2787
2957
|
value: {
|
|
2788
|
-
|
|
2789
|
-
|
|
2958
|
+
from: rule.bidEdgeSpan.from,
|
|
2959
|
+
to: rule.bidEdgeSpan.to
|
|
2790
2960
|
},
|
|
2791
2961
|
onChange: function onChange(val) {
|
|
2792
|
-
return _this2.onChange(i, val, 'vegaRules', k, '
|
|
2962
|
+
return _this2.onChange(i, val, 'vegaRules', k, 'bidEdgeSpan');
|
|
2793
2963
|
},
|
|
2794
2964
|
isPercentage: true,
|
|
2795
2965
|
onBlur: _this2.props.onBlur
|
|
2796
|
-
}), /*#__PURE__*/React.createElement(
|
|
2966
|
+
}), /*#__PURE__*/React.createElement(NumRangeFromTo, {
|
|
2797
2967
|
value: {
|
|
2798
|
-
|
|
2799
|
-
|
|
2968
|
+
from: rule.askEdgeSpan.from,
|
|
2969
|
+
to: rule.askEdgeSpan.to
|
|
2800
2970
|
},
|
|
2801
2971
|
onChange: function onChange(val) {
|
|
2802
|
-
return _this2.onChange(i, val, 'vegaRules', k, '
|
|
2972
|
+
return _this2.onChange(i, val, 'vegaRules', k, 'askEdgeSpan');
|
|
2803
2973
|
},
|
|
2804
2974
|
isPercentage: true,
|
|
2805
2975
|
onBlur: _this2.props.onBlur
|
|
@@ -2825,7 +2995,18 @@ var ExpiryVegaAlphaByEdgeList = /*#__PURE__*/function (_PureComponent) {
|
|
|
2825
2995
|
onChange: function onChange(e) {
|
|
2826
2996
|
return _this2.onChange(i, e.target.checked, 'vegaRules', k, 'disable');
|
|
2827
2997
|
}
|
|
2828
|
-
})
|
|
2998
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2999
|
+
className: "param-arr-ops",
|
|
3000
|
+
style: {
|
|
3001
|
+
position: 'absolute',
|
|
3002
|
+
top: -4,
|
|
3003
|
+
right: -36,
|
|
3004
|
+
visibility: k === 0 ? 'hidden' : 'visible'
|
|
3005
|
+
}
|
|
3006
|
+
}, /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
3007
|
+
className: "param-arr-ops-del",
|
|
3008
|
+
onClick: _this2.onDelRule.bind(null, i, k)
|
|
3009
|
+
}))));
|
|
2829
3010
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2830
3011
|
className: "param-arr-ops"
|
|
2831
3012
|
}, /*#__PURE__*/React.createElement(PlusOutlined, {
|
|
@@ -2856,6 +3037,10 @@ function emptyErrText(index, key) {
|
|
|
2856
3037
|
return "The ".concat(index + 1).concat(index === 0 ? 'st' : index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: ").concat(key ? key + ' ' : '', "should not be empty");
|
|
2857
3038
|
}
|
|
2858
3039
|
|
|
3040
|
+
function zeroErrText(index, key, type) {
|
|
3041
|
+
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");
|
|
3042
|
+
}
|
|
3043
|
+
|
|
2859
3044
|
var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig, ParamType.ParamGroup, {
|
|
2860
3045
|
name: '参数组',
|
|
2861
3046
|
Comp: function Comp() {
|
|
@@ -3168,7 +3353,7 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
3168
3353
|
sort: 17
|
|
3169
3354
|
}), _defineProperty(_ParamTypeConfig, ParamType.ExpiryVegaAlphaByEdgeList, {
|
|
3170
3355
|
name: 'ExpiryVegaAlphaByEdgeList',
|
|
3171
|
-
key: '
|
|
3356
|
+
key: 'expiryVegaAlphaByEdgeList',
|
|
3172
3357
|
Comp: ExpiryVegaAlphaByEdgeList,
|
|
3173
3358
|
validator: function validator($val) {
|
|
3174
3359
|
if (!($val === null || $val === void 0 ? void 0 : $val.length)) return '';
|
|
@@ -3185,6 +3370,10 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
3185
3370
|
return emptyErrText(i, 'vegaTarget');
|
|
3186
3371
|
}
|
|
3187
3372
|
|
|
3373
|
+
if (Number(val.vegaTarget) === 0) {
|
|
3374
|
+
return "The ".concat(i + 1).concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: vega target can not be 0");
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3188
3377
|
var $$val = val.vegaRules || [];
|
|
3189
3378
|
|
|
3190
3379
|
for (var k = 0; k < $$val.length; k++) {
|
|
@@ -3202,20 +3391,56 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
3202
3391
|
return emptyErrText(i, "delta range's max");
|
|
3203
3392
|
}
|
|
3204
3393
|
|
|
3205
|
-
if (isEmpty(vegaRule.
|
|
3206
|
-
return emptyErrText(i, "bid edge range's
|
|
3394
|
+
if (isEmpty(vegaRule.bidEdgeSpan.from)) {
|
|
3395
|
+
return emptyErrText(i, "bid edge range's from");
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
if (isEmpty(vegaRule.bidEdgeSpan.to)) {
|
|
3399
|
+
return emptyErrText(i, "bid edge range's to");
|
|
3207
3400
|
}
|
|
3208
3401
|
|
|
3209
|
-
if (isEmpty(vegaRule.
|
|
3210
|
-
return emptyErrText(i, "
|
|
3402
|
+
if (isEmpty(vegaRule.askEdgeSpan.from)) {
|
|
3403
|
+
return emptyErrText(i, "ask edge range's from");
|
|
3211
3404
|
}
|
|
3212
3405
|
|
|
3213
|
-
if (isEmpty(vegaRule.
|
|
3214
|
-
return emptyErrText(i, "ask edge range's
|
|
3406
|
+
if (isEmpty(vegaRule.askEdgeSpan.to)) {
|
|
3407
|
+
return emptyErrText(i, "ask edge range's to");
|
|
3215
3408
|
}
|
|
3216
3409
|
|
|
3217
|
-
if (
|
|
3218
|
-
|
|
3410
|
+
if (Number(val.vegaTarget) > 0) {
|
|
3411
|
+
if (Number(vegaRule.bidEdgeSpan.from) <= 0) {
|
|
3412
|
+
return zeroErrText(i, "bid edge range's from", 'max');
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
if (Number(vegaRule.bidEdgeSpan.to) <= 0) {
|
|
3416
|
+
return zeroErrText(i, "bid edge range's to", 'max');
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
if (Number(vegaRule.askEdgeSpan.from) <= 0) {
|
|
3420
|
+
return zeroErrText(i, "ask edge range's from", 'max');
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
if (Number(vegaRule.askEdgeSpan.to) <= 0) {
|
|
3424
|
+
return zeroErrText(i, "ask edge range's to", 'max');
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
if (Number(val.vegaTarget) < 0) {
|
|
3429
|
+
if (Number(vegaRule.bidEdgeSpan.from) >= 0) {
|
|
3430
|
+
return zeroErrText(i, "bid edge range's from", 'min');
|
|
3431
|
+
}
|
|
3432
|
+
|
|
3433
|
+
if (Number(vegaRule.bidEdgeSpan.to) >= 0) {
|
|
3434
|
+
return zeroErrText(i, "bid edge range's to", 'min');
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
if (Number(vegaRule.askEdgeSpan.from) >= 0) {
|
|
3438
|
+
return zeroErrText(i, "ask edge range's from", 'min');
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
if (Number(vegaRule.askEdgeSpan.to) >= 0) {
|
|
3442
|
+
return zeroErrText(i, "ask edge range's to", 'min');
|
|
3443
|
+
}
|
|
3219
3444
|
}
|
|
3220
3445
|
} // if (expiries.includes(val.expiry)) {
|
|
3221
3446
|
// return `The ${i + 1} ${
|
|
@@ -3226,13 +3451,15 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
|
|
|
3226
3451
|
// }
|
|
3227
3452
|
|
|
3228
3453
|
|
|
3454
|
+
var hasOverRange = validateVegaRules($$val);
|
|
3455
|
+
if (!hasOverRange) return "The ".concat(i + 1).concat(i === 0 ? 'st' : i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: delta range overlap");
|
|
3229
3456
|
expiries.push(val.expiry);
|
|
3230
3457
|
}
|
|
3231
3458
|
|
|
3232
3459
|
return '';
|
|
3233
3460
|
},
|
|
3234
3461
|
sort: 18,
|
|
3235
|
-
modalWidth:
|
|
3462
|
+
modalWidth: 1300
|
|
3236
3463
|
}), _ParamTypeConfig);
|
|
3237
3464
|
function paramValidator(val, values, enableEmpty) {
|
|
3238
3465
|
var _config$validator;
|
|
@@ -3402,10 +3629,11 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
|
|
|
3402
3629
|
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, $data);
|
|
3403
3630
|
|
|
3404
3631
|
if ('valueType' in changed) {
|
|
3405
|
-
var _this$ref$current$get, _this$ref$current, _this$props$initialVa;
|
|
3632
|
+
var _this$ref$current$get, _this$ref$current, _this$props$initialVa, _this$props$onModalWi, _this$props2, _config$modalWidth;
|
|
3406
3633
|
|
|
3407
3634
|
var config = ParamTypeConfig[(_this$ref$current$get = (_this$ref$current = _this.ref.current) === null || _this$ref$current === void 0 ? void 0 : _this$ref$current.getFieldValue('valueType')) !== null && _this$ref$current$get !== void 0 ? _this$ref$current$get : (_this$props$initialVa = _this.props.initialValues) === null || _this$props$initialVa === void 0 ? void 0 : _this$props$initialVa.valueType];
|
|
3408
|
-
localStorage.setItem('__editParamModalWidth', String(config.modalWidth)
|
|
3635
|
+
localStorage.setItem('__editParamModalWidth', config.modalWidth ? String(config.modalWidth) : '740');
|
|
3636
|
+
(_this$props$onModalWi = (_this$props2 = _this.props).onModalWidthChange) === null || _this$props$onModalWi === void 0 ? void 0 : _this$props$onModalWi.call(_this$props2, (_config$modalWidth = config.modalWidth) !== null && _config$modalWidth !== void 0 ? _config$modalWidth : 740);
|
|
3409
3637
|
|
|
3410
3638
|
_this.forceUpdate();
|
|
3411
3639
|
}
|
|
@@ -3424,7 +3652,6 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
|
|
|
3424
3652
|
|
|
3425
3653
|
var valueType = (_this$ref$current$get2 = (_this$ref$current2 = this.ref.current) === null || _this$ref$current2 === void 0 ? void 0 : _this$ref$current2.getFieldValue('valueType')) !== null && _this$ref$current$get2 !== void 0 ? _this$ref$current$get2 : (_this$props$initialVa2 = this.props.initialValues) === null || _this$props$initialVa2 === void 0 ? void 0 : _this$props$initialVa2.valueType;
|
|
3426
3654
|
var config = ParamTypeConfig[valueType];
|
|
3427
|
-
localStorage.setItem('__editParamModalWidth', String(config.modalWidth) || '0');
|
|
3428
3655
|
return [{
|
|
3429
3656
|
label: '所属分组',
|
|
3430
3657
|
name: 'parentId',
|
|
@@ -3553,6 +3780,8 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3553
3780
|
var _super2 = _createSuper(ParamFormModalEl);
|
|
3554
3781
|
|
|
3555
3782
|
function ParamFormModalEl() {
|
|
3783
|
+
var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
|
|
3784
|
+
|
|
3556
3785
|
var _this4;
|
|
3557
3786
|
|
|
3558
3787
|
_classCallCheck(this, ParamFormModalEl);
|
|
@@ -3567,7 +3796,8 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3567
3796
|
|
|
3568
3797
|
_defineProperty(_assertThisInitialized(_this4), "state", {
|
|
3569
3798
|
visible: false,
|
|
3570
|
-
pending: false
|
|
3799
|
+
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
|
|
3571
3801
|
});
|
|
3572
3802
|
|
|
3573
3803
|
_defineProperty(_assertThisInitialized(_this4), "onShow", function () {
|
|
@@ -3604,7 +3834,11 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3604
3834
|
});
|
|
3605
3835
|
});
|
|
3606
3836
|
|
|
3607
|
-
_defineProperty(_assertThisInitialized(_this4), "
|
|
3837
|
+
_defineProperty(_assertThisInitialized(_this4), "handleModalWidthChange", function (width) {
|
|
3838
|
+
_this4.setState({
|
|
3839
|
+
width: width
|
|
3840
|
+
});
|
|
3841
|
+
});
|
|
3608
3842
|
|
|
3609
3843
|
return _this4;
|
|
3610
3844
|
}
|
|
@@ -3621,7 +3855,7 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3621
3855
|
value: function render() {
|
|
3622
3856
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
3623
3857
|
key: String(this.state.visible),
|
|
3624
|
-
width:
|
|
3858
|
+
width: this.state.width || 740,
|
|
3625
3859
|
closable: false,
|
|
3626
3860
|
title: !this.isEdit ? '新增参数' : '修改参数',
|
|
3627
3861
|
visible: this.state.visible,
|
|
@@ -3634,7 +3868,8 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3634
3868
|
}, "\u786E\u8BA4"))
|
|
3635
3869
|
}, /*#__PURE__*/React.createElement(ParamForm, Object.assign({}, this.props, {
|
|
3636
3870
|
ref: this.ref,
|
|
3637
|
-
onSubmit: undefined
|
|
3871
|
+
onSubmit: undefined,
|
|
3872
|
+
onModalWidthChange: this.handleModalWidthChange
|
|
3638
3873
|
})));
|
|
3639
3874
|
}
|
|
3640
3875
|
}]);
|
|
@@ -3689,9 +3924,18 @@ var ParamValueEditor = /*#__PURE__*/function (_PureComponent) {
|
|
|
3689
3924
|
_defineProperty(_assertThisInitialized(_this), "ref", React.createRef());
|
|
3690
3925
|
|
|
3691
3926
|
_defineProperty(_assertThisInitialized(_this), "onChange", function (changed, data) {
|
|
3692
|
-
var _this$props$onChange, _this$
|
|
3927
|
+
var _this$props$onChange, _this$props2;
|
|
3693
3928
|
|
|
3694
|
-
|
|
3929
|
+
if ('valueType' in changed) {
|
|
3930
|
+
var _this$ref$current$get, _this$ref$current, _this$props$onModalWi, _this$props, _config$modalWidth;
|
|
3931
|
+
|
|
3932
|
+
var config = ParamTypeConfig[(_this$ref$current$get = (_this$ref$current = _this.ref.current) === null || _this$ref$current === void 0 ? void 0 : _this$ref$current.getFieldValue('valueType')) !== null && _this$ref$current$get !== void 0 ? _this$ref$current$get : _this.props.valueType];
|
|
3933
|
+
(_this$props$onModalWi = (_this$props = _this.props).onModalWidthChange) === null || _this$props$onModalWi === void 0 ? void 0 : _this$props$onModalWi.call(_this$props, (_config$modalWidth = config.modalWidth) !== null && _config$modalWidth !== void 0 ? _config$modalWidth : 740);
|
|
3934
|
+
|
|
3935
|
+
_this.forceUpdate();
|
|
3936
|
+
}
|
|
3937
|
+
|
|
3938
|
+
(_this$props$onChange = (_this$props2 = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props2, data);
|
|
3695
3939
|
});
|
|
3696
3940
|
|
|
3697
3941
|
return _this;
|
|
@@ -3819,7 +4063,8 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3819
4063
|
|
|
3820
4064
|
_defineProperty(_assertThisInitialized(_this3), "state", {
|
|
3821
4065
|
visible: false,
|
|
3822
|
-
pending: false
|
|
4066
|
+
pending: false,
|
|
4067
|
+
width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
|
|
3823
4068
|
});
|
|
3824
4069
|
|
|
3825
4070
|
_defineProperty(_assertThisInitialized(_this3), "onShow", function () {
|
|
@@ -3856,6 +4101,12 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3856
4101
|
});
|
|
3857
4102
|
});
|
|
3858
4103
|
|
|
4104
|
+
_defineProperty(_assertThisInitialized(_this3), "handleModalWidthChange", function (width) {
|
|
4105
|
+
_this3.setState({
|
|
4106
|
+
width: width
|
|
4107
|
+
});
|
|
4108
|
+
});
|
|
4109
|
+
|
|
3859
4110
|
return _this3;
|
|
3860
4111
|
}
|
|
3861
4112
|
|
|
@@ -3864,7 +4115,7 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3864
4115
|
value: function render() {
|
|
3865
4116
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
3866
4117
|
key: String(this.state.visible),
|
|
3867
|
-
width: 740,
|
|
4118
|
+
width: this.state.width || 740,
|
|
3868
4119
|
title: 'Edit Value',
|
|
3869
4120
|
closable: false,
|
|
3870
4121
|
visible: this.state.visible,
|