shineout 3.8.0-beta.46 → 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 +49 -35
- 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
|
|
|
@@ -21815,10 +21815,10 @@ var messageStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
21815
21815
|
},
|
|
21816
21816
|
itemDismissed: {
|
|
21817
21817
|
' [data-soui-position="bottom-left"] &': {
|
|
21818
|
-
animation: "$left-out ".concat(message_animationDuration, " ease-in-out")
|
|
21818
|
+
animation: "$left-out ".concat(message_animationDuration, " ease-in-out forwards")
|
|
21819
21819
|
},
|
|
21820
21820
|
' [data-soui-position="bottom-right"] &': {
|
|
21821
|
-
animation: "$right-out ".concat(message_animationDuration, " ease-in-out")
|
|
21821
|
+
animation: "$right-out ".concat(message_animationDuration, " ease-in-out forwards")
|
|
21822
21822
|
}
|
|
21823
21823
|
},
|
|
21824
21824
|
itemShow: {
|
|
@@ -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();
|
|
@@ -43617,7 +43602,9 @@ function useFormControl(props) {
|
|
|
43617
43602
|
var errors = arguments.length > 1 ? arguments[1] : undefined;
|
|
43618
43603
|
var severErrors = arguments.length > 2 ? arguments[2] : undefined;
|
|
43619
43604
|
if (!name) return;
|
|
43620
|
-
|
|
43605
|
+
// 加入defaultValue的判断,让其只对 https://github.com/sheinsight/shineout-next/pull/742 的场景生效
|
|
43606
|
+
// 如果不加入defaultValue的判断,会导致 8ea43144-36a5-403a-9147-59d54087a110 的问题
|
|
43607
|
+
if (isArray(name) && defaultValue !== undefined) {
|
|
43621
43608
|
var _value = getValue(name, formValue);
|
|
43622
43609
|
var _error = getError(name, errors, severErrors);
|
|
43623
43610
|
if (_error !== errorState) {
|
|
@@ -43743,8 +43730,27 @@ function useFormControl(props) {
|
|
|
43743
43730
|
if (onChangePo) onChangePo.apply(void 0, [v].concat(other));
|
|
43744
43731
|
if (validateFieldSet) validateFieldSet();
|
|
43745
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
|
+
});
|
|
43746
43751
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
43747
43752
|
if (inForm && controlFunc) {
|
|
43753
|
+
initError();
|
|
43748
43754
|
if (isArray(name)) {
|
|
43749
43755
|
var dv = isArray(defaultValue) ? defaultValue : [];
|
|
43750
43756
|
name.forEach(function (n, index) {
|
|
@@ -51144,11 +51150,15 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
51144
51150
|
}
|
|
51145
51151
|
if (componentElement.props.multiple) {
|
|
51146
51152
|
fieldSchemaInfo.type = 'array';
|
|
51147
|
-
|
|
51148
|
-
|
|
51149
|
-
|
|
51153
|
+
if (itemType !== 'undefined') {
|
|
51154
|
+
fieldSchemaInfo.items = {
|
|
51155
|
+
type: itemType
|
|
51156
|
+
};
|
|
51157
|
+
}
|
|
51150
51158
|
} else {
|
|
51151
|
-
|
|
51159
|
+
if (itemType !== 'undefined') {
|
|
51160
|
+
fieldSchemaInfo.type = itemType;
|
|
51161
|
+
}
|
|
51152
51162
|
}
|
|
51153
51163
|
if (itemType === 'object') {
|
|
51154
51164
|
// 对于对象类型,使用 oneOf 而不是 enum
|
|
@@ -51689,6 +51699,9 @@ var useForm = function useForm(props) {
|
|
|
51689
51699
|
context.removeArr.forEach(function (n) {
|
|
51690
51700
|
deepRemove(v, n);
|
|
51691
51701
|
context.removeArr.delete(n);
|
|
51702
|
+
if (context.errors[n]) {
|
|
51703
|
+
delete context.errors[n];
|
|
51704
|
+
}
|
|
51692
51705
|
});
|
|
51693
51706
|
});
|
|
51694
51707
|
};
|
|
@@ -51925,9 +51938,6 @@ var useForm = function useForm(props) {
|
|
|
51925
51938
|
context.names.delete(n);
|
|
51926
51939
|
delete context.defaultValues[n];
|
|
51927
51940
|
}
|
|
51928
|
-
if (context.errors[n]) {
|
|
51929
|
-
delete context.errors[n];
|
|
51930
|
-
}
|
|
51931
51941
|
var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
|
|
51932
51942
|
if (!finalReserveAble && !context.removeLock) {
|
|
51933
51943
|
addRemove(n);
|
|
@@ -54546,7 +54556,8 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
54546
54556
|
_props$step = props.step,
|
|
54547
54557
|
step = _props$step === void 0 ? 1 : _props$step,
|
|
54548
54558
|
cancelBlurChange = props.cancelBlurChange,
|
|
54549
|
-
disabled = props.disabled
|
|
54559
|
+
disabled = props.disabled,
|
|
54560
|
+
coin = props.coin;
|
|
54550
54561
|
var getStringValue = function getStringValue(value) {
|
|
54551
54562
|
if (value === undefined) return value;
|
|
54552
54563
|
if (typeof value === 'number') {
|
|
@@ -54665,6 +54676,7 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
54665
54676
|
numType: numType,
|
|
54666
54677
|
integerLimit: integerLimit,
|
|
54667
54678
|
digits: digits,
|
|
54679
|
+
coin: coin,
|
|
54668
54680
|
onChange: onNumberChange,
|
|
54669
54681
|
onBlur: onNumberBlur,
|
|
54670
54682
|
onFocus: props.onFocus,
|
|
@@ -54678,7 +54690,7 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
54678
54690
|
;// CONCATENATED MODULE: ../base/src/input/input-number.tsx
|
|
54679
54691
|
|
|
54680
54692
|
|
|
54681
|
-
var input_number_excluded = ["jssStyle", "hideArrow", "numType", "integerLimit", "digits", "min", "max", "step", "allowNull"],
|
|
54693
|
+
var input_number_excluded = ["jssStyle", "hideArrow", "numType", "integerLimit", "digits", "min", "max", "step", "allowNull", "coin"],
|
|
54682
54694
|
input_number_excluded2 = ["onMinus", "onPlus"];
|
|
54683
54695
|
|
|
54684
54696
|
|
|
@@ -54700,6 +54712,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
54700
54712
|
max = commonProps.max,
|
|
54701
54713
|
step = commonProps.step,
|
|
54702
54714
|
allowNull = commonProps.allowNull,
|
|
54715
|
+
coin = commonProps.coin,
|
|
54703
54716
|
restProps = objectWithoutProperties_default()(commonProps, input_number_excluded);
|
|
54704
54717
|
var inputStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$input = jssStyle.input) === null || _jssStyle$input === void 0 ? void 0 : _jssStyle$input.call(jssStyle);
|
|
54705
54718
|
var numberFormatParams = {
|
|
@@ -54711,7 +54724,8 @@ var InputNumber = function InputNumber(props) {
|
|
|
54711
54724
|
min: min,
|
|
54712
54725
|
max: max,
|
|
54713
54726
|
step: step,
|
|
54714
|
-
allowNull: allowNull
|
|
54727
|
+
allowNull: allowNull,
|
|
54728
|
+
coin: coin
|
|
54715
54729
|
};
|
|
54716
54730
|
var _useInputNumber = use_input_number(objectSpread2_default()({
|
|
54717
54731
|
value: commonProps.value,
|
|
@@ -73000,7 +73014,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
73000
73014
|
|
|
73001
73015
|
|
|
73002
73016
|
/* harmony default export */ var src_0 = ({
|
|
73003
|
-
version: '3.8.0-beta.
|
|
73017
|
+
version: '3.8.0-beta.48'
|
|
73004
73018
|
});
|
|
73005
73019
|
}();
|
|
73006
73020
|
/******/ return __webpack_exports__;
|