@signalplus/params-about 1.0.26-alpha2 → 1.0.26-alpha3
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 +37 -13
- 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-10-
|
|
4
|
-
* Version: 1.0.26-
|
|
3
|
+
* Generated: 2025-10-16
|
|
4
|
+
* Version: 1.0.26-alpha3
|
|
5
5
|
* License: MIT
|
|
6
6
|
* Author: 2631541504@qq.com
|
|
7
7
|
*/
|
|
@@ -3402,10 +3402,11 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
|
|
|
3402
3402
|
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, $data);
|
|
3403
3403
|
|
|
3404
3404
|
if ('valueType' in changed) {
|
|
3405
|
-
var _this$ref$current$get, _this$ref$current, _this$props$initialVa;
|
|
3405
|
+
var _this$ref$current$get, _this$ref$current, _this$props$initialVa, _this$props$onModalWi, _this$props2, _config$modalWidth;
|
|
3406
3406
|
|
|
3407
3407
|
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)
|
|
3408
|
+
localStorage.setItem('__editParamModalWidth', config.modalWidth ? String(config.modalWidth) : '740');
|
|
3409
|
+
(_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
3410
|
|
|
3410
3411
|
_this.forceUpdate();
|
|
3411
3412
|
}
|
|
@@ -3424,7 +3425,6 @@ var ParamForm = /*#__PURE__*/function (_PureComponent) {
|
|
|
3424
3425
|
|
|
3425
3426
|
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
3427
|
var config = ParamTypeConfig[valueType];
|
|
3427
|
-
localStorage.setItem('__editParamModalWidth', String(config.modalWidth) || '0');
|
|
3428
3428
|
return [{
|
|
3429
3429
|
label: '所属分组',
|
|
3430
3430
|
name: 'parentId',
|
|
@@ -3553,6 +3553,8 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3553
3553
|
var _super2 = _createSuper(ParamFormModalEl);
|
|
3554
3554
|
|
|
3555
3555
|
function ParamFormModalEl() {
|
|
3556
|
+
var _this4$props$initialV, _ParamTypeConfig$_thi, _this4$props$initialV2;
|
|
3557
|
+
|
|
3556
3558
|
var _this4;
|
|
3557
3559
|
|
|
3558
3560
|
_classCallCheck(this, ParamFormModalEl);
|
|
@@ -3567,7 +3569,8 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3567
3569
|
|
|
3568
3570
|
_defineProperty(_assertThisInitialized(_this4), "state", {
|
|
3569
3571
|
visible: false,
|
|
3570
|
-
pending: false
|
|
3572
|
+
pending: false,
|
|
3573
|
+
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
3574
|
});
|
|
3572
3575
|
|
|
3573
3576
|
_defineProperty(_assertThisInitialized(_this4), "onShow", function () {
|
|
@@ -3604,7 +3607,11 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3604
3607
|
});
|
|
3605
3608
|
});
|
|
3606
3609
|
|
|
3607
|
-
_defineProperty(_assertThisInitialized(_this4), "
|
|
3610
|
+
_defineProperty(_assertThisInitialized(_this4), "handleModalWidthChange", function (width) {
|
|
3611
|
+
_this4.setState({
|
|
3612
|
+
width: width
|
|
3613
|
+
});
|
|
3614
|
+
});
|
|
3608
3615
|
|
|
3609
3616
|
return _this4;
|
|
3610
3617
|
}
|
|
@@ -3621,7 +3628,7 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3621
3628
|
value: function render() {
|
|
3622
3629
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
3623
3630
|
key: String(this.state.visible),
|
|
3624
|
-
width:
|
|
3631
|
+
width: this.state.width || 740,
|
|
3625
3632
|
closable: false,
|
|
3626
3633
|
title: !this.isEdit ? '新增参数' : '修改参数',
|
|
3627
3634
|
visible: this.state.visible,
|
|
@@ -3634,7 +3641,8 @@ var ParamFormModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3634
3641
|
}, "\u786E\u8BA4"))
|
|
3635
3642
|
}, /*#__PURE__*/React.createElement(ParamForm, Object.assign({}, this.props, {
|
|
3636
3643
|
ref: this.ref,
|
|
3637
|
-
onSubmit: undefined
|
|
3644
|
+
onSubmit: undefined,
|
|
3645
|
+
onModalWidthChange: this.handleModalWidthChange
|
|
3638
3646
|
})));
|
|
3639
3647
|
}
|
|
3640
3648
|
}]);
|
|
@@ -3689,9 +3697,18 @@ var ParamValueEditor = /*#__PURE__*/function (_PureComponent) {
|
|
|
3689
3697
|
_defineProperty(_assertThisInitialized(_this), "ref", React.createRef());
|
|
3690
3698
|
|
|
3691
3699
|
_defineProperty(_assertThisInitialized(_this), "onChange", function (changed, data) {
|
|
3692
|
-
var _this$props$onChange, _this$
|
|
3700
|
+
var _this$props$onChange, _this$props2;
|
|
3693
3701
|
|
|
3694
|
-
|
|
3702
|
+
if ('valueType' in changed) {
|
|
3703
|
+
var _this$ref$current$get, _this$ref$current, _this$props$onModalWi, _this$props, _config$modalWidth;
|
|
3704
|
+
|
|
3705
|
+
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];
|
|
3706
|
+
(_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);
|
|
3707
|
+
|
|
3708
|
+
_this.forceUpdate();
|
|
3709
|
+
}
|
|
3710
|
+
|
|
3711
|
+
(_this$props$onChange = (_this$props2 = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props2, data);
|
|
3695
3712
|
});
|
|
3696
3713
|
|
|
3697
3714
|
return _this;
|
|
@@ -3819,7 +3836,8 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3819
3836
|
|
|
3820
3837
|
_defineProperty(_assertThisInitialized(_this3), "state", {
|
|
3821
3838
|
visible: false,
|
|
3822
|
-
pending: false
|
|
3839
|
+
pending: false,
|
|
3840
|
+
width: ParamTypeConfig[_this3.props.valueType].modalWidth || 740
|
|
3823
3841
|
});
|
|
3824
3842
|
|
|
3825
3843
|
_defineProperty(_assertThisInitialized(_this3), "onShow", function () {
|
|
@@ -3856,6 +3874,12 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3856
3874
|
});
|
|
3857
3875
|
});
|
|
3858
3876
|
|
|
3877
|
+
_defineProperty(_assertThisInitialized(_this3), "handleModalWidthChange", function (width) {
|
|
3878
|
+
_this3.setState({
|
|
3879
|
+
width: width
|
|
3880
|
+
});
|
|
3881
|
+
});
|
|
3882
|
+
|
|
3859
3883
|
return _this3;
|
|
3860
3884
|
}
|
|
3861
3885
|
|
|
@@ -3864,7 +3888,7 @@ var ParamValueEditorModalEl = /*#__PURE__*/function (_PureComponent2) {
|
|
|
3864
3888
|
value: function render() {
|
|
3865
3889
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
3866
3890
|
key: String(this.state.visible),
|
|
3867
|
-
width: 740,
|
|
3891
|
+
width: this.state.width || 740,
|
|
3868
3892
|
title: 'Edit Value',
|
|
3869
3893
|
closable: false,
|
|
3870
3894
|
visible: this.state.visible,
|