wargerm 0.2.11 → 0.2.12
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/dist/components/WForm/index.d.ts +1 -0
- package/dist/index.esm.js +11 -3
- package/dist/index.js +11 -3
- package/package.json +1 -1
@@ -51,6 +51,7 @@ export interface WFormProps extends FormProps {
|
|
51
51
|
disabled?: boolean;
|
52
52
|
disabledHideInSearch?: boolean;
|
53
53
|
onSubmit?: (params: Record<string, any>) => void;
|
54
|
+
onFormChange?: (changedValues: Record<string, any>, allValues: Record<string, any>, form: any) => void;
|
54
55
|
onReset?: () => void;
|
55
56
|
formRef?: MutableRefObject<FormInstance>;
|
56
57
|
search?: Isearch | false;
|
package/dist/index.esm.js
CHANGED
@@ -7532,7 +7532,7 @@ Table.defaultProps = {
|
|
7532
7532
|
rowKey: 'key'
|
7533
7533
|
};
|
7534
7534
|
|
7535
|
-
var _excluded$5 = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "onSubmit", "onReset"];
|
7535
|
+
var _excluded$5 = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "onFormChange", "onSubmit", "onReset"];
|
7536
7536
|
var RangePicker$2 = Index$2.RangePicker;
|
7537
7537
|
|
7538
7538
|
var WForm = function WForm(props, ref) {
|
@@ -7543,6 +7543,7 @@ var WForm = function WForm(props, ref) {
|
|
7543
7543
|
search = props.search,
|
7544
7544
|
disabled = props.disabled,
|
7545
7545
|
disabledHideInSearch = props.disabledHideInSearch,
|
7546
|
+
onFormChange = props.onFormChange,
|
7546
7547
|
onSubmit = props.onSubmit,
|
7547
7548
|
onReset = props.onReset,
|
7548
7549
|
extraProps = _objectWithoutProperties(props, _excluded$5);
|
@@ -8541,6 +8542,7 @@ var WForm = function WForm(props, ref) {
|
|
8541
8542
|
},
|
8542
8543
|
onFinish: handleSearch,
|
8543
8544
|
onValuesChange: function onValuesChange(changedValues, allValues) {
|
8545
|
+
onFormChange && onFormChange(changedValues, allValues, form);
|
8544
8546
|
setchangedValues(changedValues);
|
8545
8547
|
},
|
8546
8548
|
form: form
|
@@ -9872,7 +9874,7 @@ Modal.hidden = function () {
|
|
9872
9874
|
ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
|
9873
9875
|
};
|
9874
9876
|
|
9875
|
-
var _excluded$d = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record"];
|
9877
|
+
var _excluded$d = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
|
9876
9878
|
|
9877
9879
|
var ModalForm = function ModalForm(props, ref) {
|
9878
9880
|
var columns = props.columns,
|
@@ -9885,6 +9887,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9885
9887
|
onSubmitSuccess = props.onSubmitSuccess,
|
9886
9888
|
title = props.title,
|
9887
9889
|
record = props.record,
|
9890
|
+
onFormChange = props.onFormChange,
|
9888
9891
|
extraProps = _objectWithoutProperties(props, _excluded$d);
|
9889
9892
|
|
9890
9893
|
var formRef = useRef(null);
|
@@ -10006,6 +10009,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10006
10009
|
ref: formRef,
|
10007
10010
|
disabled: disabled,
|
10008
10011
|
onSubmit: onSubmit,
|
10012
|
+
onFormChange: onFormChange,
|
10009
10013
|
disabledHideInSearch: true,
|
10010
10014
|
search: search,
|
10011
10015
|
columns: columns,
|
@@ -10015,16 +10019,18 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10015
10019
|
|
10016
10020
|
var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
|
10017
10021
|
|
10018
|
-
var _excluded$e = ["columns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "modalConfig", "optionColumnConfig"];
|
10022
|
+
var _excluded$e = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"];
|
10019
10023
|
|
10020
10024
|
var TabelCard = function TabelCard(props, ref) {
|
10021
10025
|
var columns = props.columns,
|
10026
|
+
extraColumns = props.extraColumns,
|
10022
10027
|
request = props.request,
|
10023
10028
|
modalFormSearch = props.modalFormSearch,
|
10024
10029
|
tableAction = props.tableAction,
|
10025
10030
|
renderTableBar = props.renderTableBar,
|
10026
10031
|
className = props.className,
|
10027
10032
|
style = props.style,
|
10033
|
+
onFormChange = props.onFormChange,
|
10028
10034
|
modalConfig = props.modalConfig,
|
10029
10035
|
optionColumnConfig = props.optionColumnConfig,
|
10030
10036
|
extraProps = _objectWithoutProperties(props, _excluded$e);
|
@@ -10314,6 +10320,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10314
10320
|
}(),
|
10315
10321
|
search: modalFormSearch
|
10316
10322
|
}, modalConfig), {}, {
|
10323
|
+
onFormChange: onFormChange,
|
10324
|
+
extraColumns: extraColumns || [],
|
10317
10325
|
columns: (columns || []).filter(function (item) {
|
10318
10326
|
return !item.hiddenInModalForm;
|
10319
10327
|
})
|
package/dist/index.js
CHANGED
@@ -7565,7 +7565,7 @@ Table.defaultProps = {
|
|
7565
7565
|
rowKey: 'key'
|
7566
7566
|
};
|
7567
7567
|
|
7568
|
-
var _excluded$5 = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "onSubmit", "onReset"];
|
7568
|
+
var _excluded$5 = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "onFormChange", "onSubmit", "onReset"];
|
7569
7569
|
var RangePicker$2 = Index$2.RangePicker;
|
7570
7570
|
|
7571
7571
|
var WForm = function WForm(props, ref) {
|
@@ -7576,6 +7576,7 @@ var WForm = function WForm(props, ref) {
|
|
7576
7576
|
search = props.search,
|
7577
7577
|
disabled = props.disabled,
|
7578
7578
|
disabledHideInSearch = props.disabledHideInSearch,
|
7579
|
+
onFormChange = props.onFormChange,
|
7579
7580
|
onSubmit = props.onSubmit,
|
7580
7581
|
onReset = props.onReset,
|
7581
7582
|
extraProps = _objectWithoutProperties(props, _excluded$5);
|
@@ -8574,6 +8575,7 @@ var WForm = function WForm(props, ref) {
|
|
8574
8575
|
},
|
8575
8576
|
onFinish: handleSearch,
|
8576
8577
|
onValuesChange: function onValuesChange(changedValues, allValues) {
|
8578
|
+
onFormChange && onFormChange(changedValues, allValues, form);
|
8577
8579
|
setchangedValues(changedValues);
|
8578
8580
|
},
|
8579
8581
|
form: form
|
@@ -9905,7 +9907,7 @@ Modal.hidden = function () {
|
|
9905
9907
|
ModalContainer[modelSysbol] && ModalContainer[modelSysbol].hidden();
|
9906
9908
|
};
|
9907
9909
|
|
9908
|
-
var _excluded$d = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record"];
|
9910
|
+
var _excluded$d = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange"];
|
9909
9911
|
|
9910
9912
|
var ModalForm = function ModalForm(props, ref) {
|
9911
9913
|
var columns = props.columns,
|
@@ -9918,6 +9920,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9918
9920
|
onSubmitSuccess = props.onSubmitSuccess,
|
9919
9921
|
title = props.title,
|
9920
9922
|
record = props.record,
|
9923
|
+
onFormChange = props.onFormChange,
|
9921
9924
|
extraProps = _objectWithoutProperties(props, _excluded$d);
|
9922
9925
|
|
9923
9926
|
var formRef = React.useRef(null);
|
@@ -10039,6 +10042,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10039
10042
|
ref: formRef,
|
10040
10043
|
disabled: disabled,
|
10041
10044
|
onSubmit: onSubmit,
|
10045
|
+
onFormChange: onFormChange,
|
10042
10046
|
disabledHideInSearch: true,
|
10043
10047
|
search: search,
|
10044
10048
|
columns: columns,
|
@@ -10048,16 +10052,18 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10048
10052
|
|
10049
10053
|
var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
|
10050
10054
|
|
10051
|
-
var _excluded$e = ["columns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "modalConfig", "optionColumnConfig"];
|
10055
|
+
var _excluded$e = ["columns", "extraColumns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"];
|
10052
10056
|
|
10053
10057
|
var TabelCard = function TabelCard(props, ref) {
|
10054
10058
|
var columns = props.columns,
|
10059
|
+
extraColumns = props.extraColumns,
|
10055
10060
|
request = props.request,
|
10056
10061
|
modalFormSearch = props.modalFormSearch,
|
10057
10062
|
tableAction = props.tableAction,
|
10058
10063
|
renderTableBar = props.renderTableBar,
|
10059
10064
|
className = props.className,
|
10060
10065
|
style = props.style,
|
10066
|
+
onFormChange = props.onFormChange,
|
10061
10067
|
modalConfig = props.modalConfig,
|
10062
10068
|
optionColumnConfig = props.optionColumnConfig,
|
10063
10069
|
extraProps = _objectWithoutProperties(props, _excluded$e);
|
@@ -10347,6 +10353,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10347
10353
|
}(),
|
10348
10354
|
search: modalFormSearch
|
10349
10355
|
}, modalConfig), {}, {
|
10356
|
+
onFormChange: onFormChange,
|
10357
|
+
extraColumns: extraColumns || [],
|
10350
10358
|
columns: (columns || []).filter(function (item) {
|
10351
10359
|
return !item.hiddenInModalForm;
|
10352
10360
|
})
|