@pdg/react-form 1.2.9 → 1.2.10
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/index.esm.js +18 -12
- package/dist/index.js +18 -12
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -423,9 +423,11 @@ var appendFormValueData = function appendFormValueData(data, itemCommands) {
|
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
if (isAllValid) {
|
|
426
|
-
|
|
426
|
+
var _onSubmitRef$current;
|
|
427
|
+
(_onSubmitRef$current = onSubmitRef.current) === null || _onSubmitRef$current === void 0 || _onSubmitRef$current.call(onSubmitRef, data);
|
|
427
428
|
} else {
|
|
428
|
-
|
|
429
|
+
var _onInvalidRef$current;
|
|
430
|
+
(_onInvalidRef$current = onInvalidRef.current) === null || _onInvalidRef$current === void 0 || _onInvalidRef$current.call(onInvalidRef, invalidItems);
|
|
429
431
|
setTimeout(function () {
|
|
430
432
|
var _valueItems$current$f;
|
|
431
433
|
(_valueItems$current$f = valueItems.current[firstInvalidItemId]) === null || _valueItems$current$f === void 0 || _valueItems$current$f.focusValidate();
|
|
@@ -1186,7 +1188,7 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1186
1188
|
if ($[4] !== collapse || $[5] !== collapseIn || $[6] !== onCollapseChange) {
|
|
1187
1189
|
t4 = function t4() {
|
|
1188
1190
|
if (collapse) {
|
|
1189
|
-
onCollapseChange
|
|
1191
|
+
onCollapseChange === null || onCollapseChange === void 0 || onCollapseChange(!collapseIn);
|
|
1190
1192
|
}
|
|
1191
1193
|
};
|
|
1192
1194
|
$[4] = collapse;
|
|
@@ -11669,7 +11671,8 @@ function _temp$m() {
|
|
|
11669
11671
|
finalValue_1.forEach(function (v_0) {
|
|
11670
11672
|
var key = v_0.toString();
|
|
11671
11673
|
if (itemsInfos[key]) {
|
|
11672
|
-
|
|
11674
|
+
var _computedComponentVal;
|
|
11675
|
+
(_computedComponentVal = computedComponentValue) === null || _computedComponentVal === void 0 || _computedComponentVal.push(itemsInfos[key]);
|
|
11673
11676
|
}
|
|
11674
11677
|
});
|
|
11675
11678
|
} else {
|
|
@@ -13031,7 +13034,8 @@ var PrivateYearSelect = function PrivateYearSelect(t0) {
|
|
|
13031
13034
|
var t3;
|
|
13032
13035
|
if ($[3] !== onSelectRef) {
|
|
13033
13036
|
t3 = function t3(e) {
|
|
13034
|
-
|
|
13037
|
+
var _onSelectRef$current;
|
|
13038
|
+
(_onSelectRef$current = onSelectRef.current) === null || _onSelectRef$current === void 0 || _onSelectRef$current.call(onSelectRef, Number(e.target.getAttribute("data-id")));
|
|
13035
13039
|
};
|
|
13036
13040
|
$[3] = onSelectRef;
|
|
13037
13041
|
$[4] = t3;
|
|
@@ -13379,7 +13383,8 @@ var PrivateTimeSelect = function PrivateTimeSelect(t0) {
|
|
|
13379
13383
|
var t6;
|
|
13380
13384
|
if ($[5] !== onSelectRef) {
|
|
13381
13385
|
t6 = function t6(e) {
|
|
13382
|
-
|
|
13386
|
+
var _onSelectRef$current;
|
|
13387
|
+
(_onSelectRef$current = onSelectRef.current) === null || _onSelectRef$current === void 0 || _onSelectRef$current.call(onSelectRef, Number(e.target.getAttribute("data-id")));
|
|
13383
13388
|
};
|
|
13384
13389
|
$[5] = onSelectRef;
|
|
13385
13390
|
$[6] = t6;
|
|
@@ -17472,7 +17477,8 @@ function _temp$h() {
|
|
|
17472
17477
|
var t2;
|
|
17473
17478
|
if ($[0] !== onCloseRef) {
|
|
17474
17479
|
t2 = function t2() {
|
|
17475
|
-
|
|
17480
|
+
var _onCloseRef$current;
|
|
17481
|
+
(_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 || _onCloseRef$current.call(onCloseRef);
|
|
17476
17482
|
};
|
|
17477
17483
|
$[0] = onCloseRef;
|
|
17478
17484
|
$[1] = t2;
|
|
@@ -22917,8 +22923,8 @@ function _temp2() {
|
|
|
22917
22923
|
t3 = function t3() {
|
|
22918
22924
|
var _inputRef$current;
|
|
22919
22925
|
if ((_inputRef$current = inputRef.current) !== null && _inputRef$current !== void 0 && _inputRef$current.validate()) {
|
|
22920
|
-
onConfirm
|
|
22921
|
-
onClose
|
|
22926
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(value);
|
|
22927
|
+
onClose === null || onClose === void 0 || onClose();
|
|
22922
22928
|
} else {
|
|
22923
22929
|
var _inputRef$current2;
|
|
22924
22930
|
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
|
|
@@ -22935,8 +22941,8 @@ function _temp2() {
|
|
|
22935
22941
|
var t4;
|
|
22936
22942
|
if ($[7] !== onCancel || $[8] !== onClose) {
|
|
22937
22943
|
t4 = function t4() {
|
|
22938
|
-
onCancel
|
|
22939
|
-
onClose
|
|
22944
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
|
22945
|
+
onClose === null || onClose === void 0 || onClose();
|
|
22940
22946
|
};
|
|
22941
22947
|
$[7] = onCancel;
|
|
22942
22948
|
$[8] = onClose;
|
|
@@ -22951,7 +22957,7 @@ function _temp2() {
|
|
|
22951
22957
|
t6 = function t6(e, reason) {
|
|
22952
22958
|
if (reason === "backdropClick") {
|
|
22953
22959
|
if (empty(value)) {
|
|
22954
|
-
onClose
|
|
22960
|
+
onClose === null || onClose === void 0 || onClose();
|
|
22955
22961
|
}
|
|
22956
22962
|
}
|
|
22957
22963
|
};
|
package/dist/index.js
CHANGED
|
@@ -423,9 +423,11 @@ var appendFormValueData = function appendFormValueData(data, itemCommands) {
|
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
if (isAllValid) {
|
|
426
|
-
|
|
426
|
+
var _onSubmitRef$current;
|
|
427
|
+
(_onSubmitRef$current = onSubmitRef.current) === null || _onSubmitRef$current === void 0 || _onSubmitRef$current.call(onSubmitRef, data);
|
|
427
428
|
} else {
|
|
428
|
-
|
|
429
|
+
var _onInvalidRef$current;
|
|
430
|
+
(_onInvalidRef$current = onInvalidRef.current) === null || _onInvalidRef$current === void 0 || _onInvalidRef$current.call(onInvalidRef, invalidItems);
|
|
429
431
|
setTimeout(function () {
|
|
430
432
|
var _valueItems$current$f;
|
|
431
433
|
(_valueItems$current$f = valueItems.current[firstInvalidItemId]) === null || _valueItems$current$f === void 0 || _valueItems$current$f.focusValidate();
|
|
@@ -1186,7 +1188,7 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1186
1188
|
if ($[4] !== collapse || $[5] !== collapseIn || $[6] !== onCollapseChange) {
|
|
1187
1189
|
t4 = function t4() {
|
|
1188
1190
|
if (collapse) {
|
|
1189
|
-
onCollapseChange
|
|
1191
|
+
onCollapseChange === null || onCollapseChange === void 0 || onCollapseChange(!collapseIn);
|
|
1190
1192
|
}
|
|
1191
1193
|
};
|
|
1192
1194
|
$[4] = collapse;
|
|
@@ -11669,7 +11671,8 @@ function _temp$m() {
|
|
|
11669
11671
|
finalValue_1.forEach(function (v_0) {
|
|
11670
11672
|
var key = v_0.toString();
|
|
11671
11673
|
if (itemsInfos[key]) {
|
|
11672
|
-
|
|
11674
|
+
var _computedComponentVal;
|
|
11675
|
+
(_computedComponentVal = computedComponentValue) === null || _computedComponentVal === void 0 || _computedComponentVal.push(itemsInfos[key]);
|
|
11673
11676
|
}
|
|
11674
11677
|
});
|
|
11675
11678
|
} else {
|
|
@@ -13031,7 +13034,8 @@ var PrivateYearSelect = function PrivateYearSelect(t0) {
|
|
|
13031
13034
|
var t3;
|
|
13032
13035
|
if ($[3] !== onSelectRef) {
|
|
13033
13036
|
t3 = function t3(e) {
|
|
13034
|
-
|
|
13037
|
+
var _onSelectRef$current;
|
|
13038
|
+
(_onSelectRef$current = onSelectRef.current) === null || _onSelectRef$current === void 0 || _onSelectRef$current.call(onSelectRef, Number(e.target.getAttribute("data-id")));
|
|
13035
13039
|
};
|
|
13036
13040
|
$[3] = onSelectRef;
|
|
13037
13041
|
$[4] = t3;
|
|
@@ -13379,7 +13383,8 @@ var PrivateTimeSelect = function PrivateTimeSelect(t0) {
|
|
|
13379
13383
|
var t6;
|
|
13380
13384
|
if ($[5] !== onSelectRef) {
|
|
13381
13385
|
t6 = function t6(e) {
|
|
13382
|
-
|
|
13386
|
+
var _onSelectRef$current;
|
|
13387
|
+
(_onSelectRef$current = onSelectRef.current) === null || _onSelectRef$current === void 0 || _onSelectRef$current.call(onSelectRef, Number(e.target.getAttribute("data-id")));
|
|
13383
13388
|
};
|
|
13384
13389
|
$[5] = onSelectRef;
|
|
13385
13390
|
$[6] = t6;
|
|
@@ -17472,7 +17477,8 @@ function _temp$h() {
|
|
|
17472
17477
|
var t2;
|
|
17473
17478
|
if ($[0] !== onCloseRef) {
|
|
17474
17479
|
t2 = function t2() {
|
|
17475
|
-
|
|
17480
|
+
var _onCloseRef$current;
|
|
17481
|
+
(_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 || _onCloseRef$current.call(onCloseRef);
|
|
17476
17482
|
};
|
|
17477
17483
|
$[0] = onCloseRef;
|
|
17478
17484
|
$[1] = t2;
|
|
@@ -22917,8 +22923,8 @@ function _temp2() {
|
|
|
22917
22923
|
t3 = function t3() {
|
|
22918
22924
|
var _inputRef$current;
|
|
22919
22925
|
if ((_inputRef$current = inputRef.current) !== null && _inputRef$current !== void 0 && _inputRef$current.validate()) {
|
|
22920
|
-
onConfirm
|
|
22921
|
-
onClose
|
|
22926
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(value);
|
|
22927
|
+
onClose === null || onClose === void 0 || onClose();
|
|
22922
22928
|
} else {
|
|
22923
22929
|
var _inputRef$current2;
|
|
22924
22930
|
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
|
|
@@ -22935,8 +22941,8 @@ function _temp2() {
|
|
|
22935
22941
|
var t4;
|
|
22936
22942
|
if ($[7] !== onCancel || $[8] !== onClose) {
|
|
22937
22943
|
t4 = function t4() {
|
|
22938
|
-
onCancel
|
|
22939
|
-
onClose
|
|
22944
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
|
22945
|
+
onClose === null || onClose === void 0 || onClose();
|
|
22940
22946
|
};
|
|
22941
22947
|
$[7] = onCancel;
|
|
22942
22948
|
$[8] = onClose;
|
|
@@ -22951,7 +22957,7 @@ function _temp2() {
|
|
|
22951
22957
|
t6 = function t6(e, reason) {
|
|
22952
22958
|
if (reason === "backdropClick") {
|
|
22953
22959
|
if (compare.empty(value)) {
|
|
22954
|
-
onClose
|
|
22960
|
+
onClose === null || onClose === void 0 || onClose();
|
|
22955
22961
|
}
|
|
22956
22962
|
}
|
|
22957
22963
|
};
|
package/package.json
CHANGED