shineout 3.4.4-beta.7 → 3.4.4-beta.9
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 +48 -28
- 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
|
@@ -492,5 +492,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
492
492
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
493
493
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
494
494
|
var _default = exports.default = {
|
|
495
|
-
version: '3.4.4-beta.
|
|
495
|
+
version: '3.4.4-beta.9'
|
|
496
496
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -11984,7 +11984,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11984
11984
|
};
|
|
11985
11985
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11986
11986
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11987
|
-
/* harmony default export */ var version = ('3.4.4-beta.
|
|
11987
|
+
/* harmony default export */ var version = ('3.4.4-beta.9');
|
|
11988
11988
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11989
11989
|
|
|
11990
11990
|
|
|
@@ -29030,7 +29030,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
29030
29030
|
}
|
|
29031
29031
|
var targetPosition = position;
|
|
29032
29032
|
var rootContainer = getContainer() || document.body;
|
|
29033
|
-
var closestScrollContainer = getClosestScrollContainer(parentElRef.current);
|
|
29033
|
+
var closestScrollContainer = absolute ? null : getClosestScrollContainer(parentElRef.current);
|
|
29034
29034
|
var containerRect = rootContainer.getBoundingClientRect();
|
|
29035
29035
|
var bodyRect = (document.documentElement || document.body).getBoundingClientRect();
|
|
29036
29036
|
var containerScrollBarWidth = rootContainer.offsetWidth - rootContainer.clientWidth;
|
|
@@ -30071,22 +30071,23 @@ var getPopoverPosition = function getPopoverPosition(target) {
|
|
|
30071
30071
|
var popupRect = popup === null || popup === void 0 ? void 0 : popup.getBoundingClientRect();
|
|
30072
30072
|
if (verticalPoint > windowHeight / 2) position = 'top';else position = 'bottom';
|
|
30073
30073
|
|
|
30074
|
+
// TODO: 暂时移除,另考虑方案
|
|
30074
30075
|
// 如果渲染了弹出内容,则根据弹出内容宽度计算是否自动调整位置
|
|
30075
|
-
if (popupRect) {
|
|
30076
|
-
|
|
30077
|
-
|
|
30078
|
-
|
|
30079
|
-
|
|
30080
|
-
|
|
30081
|
-
|
|
30082
|
-
} else {
|
|
30083
|
-
|
|
30084
|
-
|
|
30085
|
-
|
|
30086
|
-
|
|
30087
|
-
|
|
30088
|
-
}
|
|
30076
|
+
// if (popupRect && popupRect?.width) {
|
|
30077
|
+
// if (popupRect?.width / 2 > rect.left) {
|
|
30078
|
+
// position += '-left';
|
|
30079
|
+
// }
|
|
30080
|
+
// if (popupRect?.width / 2 > windowWidth - rect.right) {
|
|
30081
|
+
// position += '-right';
|
|
30082
|
+
// }
|
|
30083
|
+
// } else {
|
|
30084
|
+
// 兜底计算
|
|
30085
|
+
if (horizontalPoint > windowWidth * 0.6) {
|
|
30086
|
+
position += '-right';
|
|
30087
|
+
} else if (horizontalPoint < windowWidth * 0.4) {
|
|
30088
|
+
position += '-left';
|
|
30089
30089
|
}
|
|
30090
|
+
// }
|
|
30090
30091
|
}
|
|
30091
30092
|
return position;
|
|
30092
30093
|
};
|
|
@@ -38879,18 +38880,37 @@ function useFormControl(props) {
|
|
|
38879
38880
|
var errors = arguments.length > 1 ? arguments[1] : undefined;
|
|
38880
38881
|
var severErrors = arguments.length > 2 ? arguments[2] : undefined;
|
|
38881
38882
|
if (!name) return;
|
|
38882
|
-
|
|
38883
|
-
|
|
38884
|
-
|
|
38885
|
-
|
|
38886
|
-
|
|
38887
|
-
|
|
38888
|
-
|
|
38889
|
-
|
|
38890
|
-
|
|
38891
|
-
|
|
38883
|
+
if (isArray(name)) {
|
|
38884
|
+
var _value = getValue(name, formValue);
|
|
38885
|
+
var _error = getError(name, errors, severErrors);
|
|
38886
|
+
if (_error !== errorState) {
|
|
38887
|
+
setErrorState(_error);
|
|
38888
|
+
}
|
|
38889
|
+
// format defaultValue
|
|
38890
|
+
var dv = isArray(defaultValue) ? defaultValue : [];
|
|
38891
|
+
var nextValue = [];
|
|
38892
|
+
name.forEach(function (n, index) {
|
|
38893
|
+
if (_value[index] === undefined && dv[index] !== undefined) {
|
|
38894
|
+
nextValue[index] = dv[index];
|
|
38895
|
+
} else {
|
|
38896
|
+
nextValue[index] = _value[index];
|
|
38897
|
+
}
|
|
38898
|
+
});
|
|
38899
|
+
setValueState(nextValue);
|
|
38900
|
+
} else {
|
|
38901
|
+
var _value2 = getValue(name, formValue);
|
|
38902
|
+
var _error2 = getError(name, errors, severErrors);
|
|
38903
|
+
if (_error2 !== errorState) {
|
|
38904
|
+
setErrorState(_error2);
|
|
38905
|
+
}
|
|
38906
|
+
if (!shallowEqual(_value2, latestInfo.valueState)) {
|
|
38907
|
+
if (_value2 === undefined && defaultValue !== undefined) {
|
|
38908
|
+
setValueState(defaultValue);
|
|
38909
|
+
} else {
|
|
38910
|
+
setValueState(_value2);
|
|
38911
|
+
}
|
|
38912
|
+
latestInfo.valueState = _value2;
|
|
38892
38913
|
}
|
|
38893
|
-
latestInfo.valueState = value;
|
|
38894
38914
|
}
|
|
38895
38915
|
});
|
|
38896
38916
|
var validateFiled = use_persist_fn(function (name, v, formV) {
|
|
@@ -65234,7 +65254,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
65234
65254
|
|
|
65235
65255
|
|
|
65236
65256
|
/* harmony default export */ var src_0 = ({
|
|
65237
|
-
version: '3.4.4-beta.
|
|
65257
|
+
version: '3.4.4-beta.9'
|
|
65238
65258
|
});
|
|
65239
65259
|
}();
|
|
65240
65260
|
/******/ return __webpack_exports__;
|