shineout 3.8.0-beta.47 → 3.8.0-beta.48
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/cjs/index.js +1 -1
- package/dist/shineout.js +37 -29
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.8.0-beta.
|
|
525
|
+
version: '3.8.0-beta.48'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12386
12386
|
};
|
|
12387
12387
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12388
12388
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12389
|
-
/* harmony default export */ var version = ('3.8.0-beta.
|
|
12389
|
+
/* harmony default export */ var version = ('3.8.0-beta.48');
|
|
12390
12390
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12391
12391
|
|
|
12392
12392
|
|
|
@@ -30649,26 +30649,11 @@ var usePopup = function usePopup(props) {
|
|
|
30649
30649
|
}
|
|
30650
30650
|
setOpenState(!!props.open);
|
|
30651
30651
|
}, [props.open]);
|
|
30652
|
-
|
|
30653
|
-
|
|
30654
|
-
|
|
30655
|
-
|
|
30656
|
-
|
|
30657
|
-
// const parent = el?.parentElement;
|
|
30658
|
-
// let clone = el.cloneNode(true) as HTMLElement;
|
|
30659
|
-
// clone.style.opacity = '0';
|
|
30660
|
-
// clone.style.display = '';
|
|
30661
|
-
// clone.style.visibility = 'visible';
|
|
30662
|
-
// clone.style.pointerEvents = 'none';
|
|
30663
|
-
// parent?.appendChild(clone);
|
|
30664
|
-
// height = clone.offsetHeight;
|
|
30665
|
-
// parent?.removeChild(clone);
|
|
30666
|
-
// //@ts-ignore
|
|
30667
|
-
// clone = null;
|
|
30668
|
-
// }
|
|
30669
|
-
// return height;
|
|
30670
|
-
// };
|
|
30671
|
-
|
|
30652
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
30653
|
+
if (defaultOpen) {
|
|
30654
|
+
setOpenState(true);
|
|
30655
|
+
}
|
|
30656
|
+
}, []);
|
|
30672
30657
|
var handleFocus = function handleFocus(delay) {
|
|
30673
30658
|
if (props.open === undefined) {
|
|
30674
30659
|
updatePosition();
|
|
@@ -43745,8 +43730,27 @@ function useFormControl(props) {
|
|
|
43745
43730
|
if (onChangePo) onChangePo.apply(void 0, [v].concat(other));
|
|
43746
43731
|
if (validateFieldSet) validateFieldSet();
|
|
43747
43732
|
});
|
|
43733
|
+
var initError = use_persist_fn(function () {
|
|
43734
|
+
var errors = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getErrors();
|
|
43735
|
+
if (isArray(name)) {
|
|
43736
|
+
for (var i = 0; i < name.length; i++) {
|
|
43737
|
+
var n = name[i];
|
|
43738
|
+
var currentErrorInForm = errors === null || errors === void 0 ? void 0 : errors[n];
|
|
43739
|
+
if (currentErrorInForm) {
|
|
43740
|
+
setErrorState(currentErrorInForm);
|
|
43741
|
+
break;
|
|
43742
|
+
}
|
|
43743
|
+
}
|
|
43744
|
+
} else {
|
|
43745
|
+
var _currentErrorInForm = errors === null || errors === void 0 ? void 0 : errors[name];
|
|
43746
|
+
if (_currentErrorInForm) {
|
|
43747
|
+
setErrorState(_currentErrorInForm);
|
|
43748
|
+
}
|
|
43749
|
+
}
|
|
43750
|
+
});
|
|
43748
43751
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
43749
43752
|
if (inForm && controlFunc) {
|
|
43753
|
+
initError();
|
|
43750
43754
|
if (isArray(name)) {
|
|
43751
43755
|
var dv = isArray(defaultValue) ? defaultValue : [];
|
|
43752
43756
|
name.forEach(function (n, index) {
|
|
@@ -51146,11 +51150,15 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
51146
51150
|
}
|
|
51147
51151
|
if (componentElement.props.multiple) {
|
|
51148
51152
|
fieldSchemaInfo.type = 'array';
|
|
51149
|
-
|
|
51150
|
-
|
|
51151
|
-
|
|
51153
|
+
if (itemType !== 'undefined') {
|
|
51154
|
+
fieldSchemaInfo.items = {
|
|
51155
|
+
type: itemType
|
|
51156
|
+
};
|
|
51157
|
+
}
|
|
51152
51158
|
} else {
|
|
51153
|
-
|
|
51159
|
+
if (itemType !== 'undefined') {
|
|
51160
|
+
fieldSchemaInfo.type = itemType;
|
|
51161
|
+
}
|
|
51154
51162
|
}
|
|
51155
51163
|
if (itemType === 'object') {
|
|
51156
51164
|
// 对于对象类型,使用 oneOf 而不是 enum
|
|
@@ -51691,6 +51699,9 @@ var useForm = function useForm(props) {
|
|
|
51691
51699
|
context.removeArr.forEach(function (n) {
|
|
51692
51700
|
deepRemove(v, n);
|
|
51693
51701
|
context.removeArr.delete(n);
|
|
51702
|
+
if (context.errors[n]) {
|
|
51703
|
+
delete context.errors[n];
|
|
51704
|
+
}
|
|
51694
51705
|
});
|
|
51695
51706
|
});
|
|
51696
51707
|
};
|
|
@@ -51927,9 +51938,6 @@ var useForm = function useForm(props) {
|
|
|
51927
51938
|
context.names.delete(n);
|
|
51928
51939
|
delete context.defaultValues[n];
|
|
51929
51940
|
}
|
|
51930
|
-
if (context.errors[n]) {
|
|
51931
|
-
delete context.errors[n];
|
|
51932
|
-
}
|
|
51933
51941
|
var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
|
|
51934
51942
|
if (!finalReserveAble && !context.removeLock) {
|
|
51935
51943
|
addRemove(n);
|
|
@@ -73006,7 +73014,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
73006
73014
|
|
|
73007
73015
|
|
|
73008
73016
|
/* harmony default export */ var src_0 = ({
|
|
73009
|
-
version: '3.8.0-beta.
|
|
73017
|
+
version: '3.8.0-beta.48'
|
|
73010
73018
|
});
|
|
73011
73019
|
}();
|
|
73012
73020
|
/******/ return __webpack_exports__;
|