@arco-design/mobile-react 2.27.3 → 2.27.4
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/CHANGELOG.md +12 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/form/type.js +2 -0
- package/cjs/index-bar/utils.js +1 -3
- package/cjs/show-monitor/index.js +4 -3
- package/dist/index.js +7 -4
- package/dist/index.min.js +2 -2
- package/esm/form/type.js +2 -0
- package/esm/index-bar/utils.js +1 -2
- package/esm/show-monitor/index.js +4 -3
- package/package.json +3 -3
- package/umd/form/type.js +2 -0
- package/umd/index-bar/utils.js +5 -5
- package/umd/show-monitor/index.js +4 -3
package/esm/form/type.js
CHANGED
package/esm/index-bar/utils.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
import { Children, isValidElement } from 'react';
|
2
|
-
import { IndexBarGroup } from './group';
|
3
2
|
export function filterValidIndexBarChild(children) {
|
4
3
|
var validChildren = [];
|
5
4
|
Children.forEach(children, function (child) {
|
6
|
-
if (! /*#__PURE__*/isValidElement(child)
|
5
|
+
if (! /*#__PURE__*/isValidElement(child)) {
|
7
6
|
console.warn('<IndexBar /> only accept <IndexBar.Group /> as the children');
|
8
7
|
return;
|
9
8
|
}
|
@@ -217,8 +217,9 @@ var ShowMonitor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
217
217
|
onOnceEmittedListeners[key] = [];
|
218
218
|
}, []);
|
219
219
|
|
220
|
-
function handleCheckChildrenExist() {
|
221
|
-
|
220
|
+
function handleCheckChildrenExist(target) {
|
221
|
+
var dom = target || domRef.current;
|
222
|
+
return isChildrenExist.current && (dom == null ? void 0 : dom.children.length);
|
222
223
|
}
|
223
224
|
|
224
225
|
function handleObserverStatusChange(entries) {
|
@@ -238,7 +239,7 @@ var ShowMonitor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
238
239
|
* @en Callback when the visible status of current element changes before the comparison
|
239
240
|
*/
|
240
241
|
|
241
|
-
isIntersecting !== curVisible && handleCheckChildrenExist() && onCompVisibleChange(isIntersecting, target);
|
242
|
+
isIntersecting !== curVisible && handleCheckChildrenExist(target) && onCompVisibleChange(isIntersecting, target);
|
242
243
|
/**
|
243
244
|
* 当前元素状态由不可见变为可见,且只触发一次
|
244
245
|
* @en The current element is invisible -> visible, and once, triggers the callback
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arco-design/mobile-react",
|
3
|
-
"version": "2.27.
|
3
|
+
"version": "2.27.4",
|
4
4
|
"description": "",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "esm/index.js",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
16
16
|
"license": "ISC",
|
17
17
|
"dependencies": {
|
18
|
-
"@arco-design/mobile-utils": "2.15.
|
18
|
+
"@arco-design/mobile-utils": "2.15.4",
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
20
20
|
"lodash.throttle": "^4.1.1",
|
21
21
|
"resize-observer-polyfill": "^1.5.1"
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "1ae5c477f0f78e51fd883214b25923a4dcfea8bb"
|
39
39
|
}
|
package/umd/form/type.js
CHANGED
@@ -15,6 +15,8 @@
|
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
17
17
|
_exports.ValidateStatus = _exports.FormInternalComponentType = void 0;
|
18
|
+
// 注意:自动识别form关联组件的依据,请勿轻易改变代码结构
|
19
|
+
// Notice: Automatically identify the basis of the associated component of the form, DO NOT change the code structure.
|
18
20
|
var FormInternalComponentType;
|
19
21
|
_exports.FormInternalComponentType = FormInternalComponentType;
|
20
22
|
|
package/umd/index-bar/utils.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "react"
|
3
|
+
define(["exports", "react"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("react")
|
5
|
+
factory(exports, require("react"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.react
|
10
|
+
factory(mod.exports, global.react);
|
11
11
|
global.utils = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
@@ -23,7 +23,7 @@
|
|
23
23
|
var validChildren = [];
|
24
24
|
|
25
25
|
_react.Children.forEach(children, function (child) {
|
26
|
-
if (! /*#__PURE__*/(0, _react.isValidElement)(child)
|
26
|
+
if (! /*#__PURE__*/(0, _react.isValidElement)(child)) {
|
27
27
|
console.warn('<IndexBar /> only accept <IndexBar.Group /> as the children');
|
28
28
|
return;
|
29
29
|
}
|
@@ -239,8 +239,9 @@
|
|
239
239
|
onOnceEmittedListeners[key] = [];
|
240
240
|
}, []);
|
241
241
|
|
242
|
-
function handleCheckChildrenExist() {
|
243
|
-
|
242
|
+
function handleCheckChildrenExist(target) {
|
243
|
+
var dom = target || domRef.current;
|
244
|
+
return isChildrenExist.current && (dom == null ? void 0 : dom.children.length);
|
244
245
|
}
|
245
246
|
|
246
247
|
function handleObserverStatusChange(entries) {
|
@@ -260,7 +261,7 @@
|
|
260
261
|
* @en Callback when the visible status of current element changes before the comparison
|
261
262
|
*/
|
262
263
|
|
263
|
-
isIntersecting !== curVisible && handleCheckChildrenExist() && onCompVisibleChange(isIntersecting, target);
|
264
|
+
isIntersecting !== curVisible && handleCheckChildrenExist(target) && onCompVisibleChange(isIntersecting, target);
|
264
265
|
/**
|
265
266
|
* 当前元素状态由不可见变为可见,且只触发一次
|
266
267
|
* @en The current element is invisible -> visible, and once, triggers the callback
|