@arco-design/mobile-react 2.38.3 → 2.38.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/action-sheet/index.d.ts +0 -1
- package/cjs/date-picker/index.d.ts +1 -1
- package/cjs/date-picker/index.js +3 -0
- package/cjs/dialog/index.d.ts +0 -1
- package/cjs/form/form-item.d.ts +5 -4
- package/cjs/form/form-item.js +1 -1
- package/cjs/form/type.d.ts +2 -3
- package/cjs/form/useForm.d.ts +1 -1
- package/cjs/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/cjs/pull-refresh/hooks.d.ts +2 -2
- package/cjs/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/cjs/pull-refresh/ios-pull-refresh.js +3 -1
- package/cjs/pull-refresh/model.d.ts +0 -1
- package/cjs/stepper/hooks/useValue.d.ts +1 -1
- package/cjs/stepper/type.d.ts +1 -1
- package/cjs/swipe-action/type.d.ts +1 -1
- package/cjs/uploader/upload/upload.d.ts +4 -4
- package/dist/index.js +1299 -1296
- package/dist/index.min.js +4 -4
- package/esm/action-sheet/index.d.ts +0 -1
- package/esm/date-picker/index.d.ts +1 -1
- package/esm/date-picker/index.js +3 -0
- package/esm/dialog/index.d.ts +0 -1
- package/esm/form/form-item.d.ts +5 -4
- package/esm/form/form-item.js +5 -5
- package/esm/form/type.d.ts +2 -3
- package/esm/form/useForm.d.ts +1 -1
- package/esm/form/useForm.js +3 -3
- package/esm/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/esm/pull-refresh/android-pull-refresh.js +2 -2
- package/esm/pull-refresh/hooks.d.ts +2 -2
- package/esm/pull-refresh/hooks.js +2 -2
- package/esm/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/esm/pull-refresh/ios-pull-refresh.js +2 -1
- package/esm/pull-refresh/model.d.ts +0 -1
- package/esm/stepper/hooks/useValue.d.ts +1 -1
- package/esm/stepper/hooks/useValue.js +2 -2
- package/esm/stepper/type.d.ts +1 -1
- package/esm/swipe-action/type.d.ts +1 -1
- package/esm/uploader/upload/upload.d.ts +4 -4
- package/esm/uploader/upload/upload.js +3 -3
- package/esnext/action-sheet/index.d.ts +0 -1
- package/esnext/date-picker/index.d.ts +1 -1
- package/esnext/date-picker/index.js +5 -0
- package/esnext/dialog/index.d.ts +0 -1
- package/esnext/form/form-item.d.ts +5 -4
- package/esnext/form/form-item.js +11 -6
- package/esnext/form/type.d.ts +2 -3
- package/esnext/form/useForm.d.ts +1 -1
- package/esnext/form/useForm.js +4 -5
- package/esnext/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/esnext/pull-refresh/android-pull-refresh.js +2 -2
- package/esnext/pull-refresh/hooks.d.ts +2 -2
- package/esnext/pull-refresh/hooks.js +3 -3
- package/esnext/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/esnext/pull-refresh/ios-pull-refresh.js +2 -1
- package/esnext/pull-refresh/model.d.ts +0 -1
- package/esnext/stepper/hooks/useValue.d.ts +1 -1
- package/esnext/stepper/hooks/useValue.js +2 -2
- package/esnext/stepper/type.d.ts +1 -1
- package/esnext/swipe-action/type.d.ts +1 -1
- package/esnext/uploader/upload/upload.d.ts +4 -4
- package/esnext/uploader/upload/upload.js +3 -3
- package/package.json +3 -3
- package/umd/action-sheet/index.d.ts +0 -1
- package/umd/date-picker/index.d.ts +1 -1
- package/umd/date-picker/index.js +3 -0
- package/umd/dialog/index.d.ts +0 -1
- package/umd/form/form-item.d.ts +5 -4
- package/umd/form/form-item.js +1 -1
- package/umd/form/type.d.ts +2 -3
- package/umd/form/useForm.d.ts +1 -1
- package/umd/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/umd/pull-refresh/hooks.d.ts +2 -2
- package/umd/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/umd/pull-refresh/ios-pull-refresh.js +5 -5
- package/umd/pull-refresh/model.d.ts +0 -1
- package/umd/stepper/hooks/useValue.d.ts +1 -1
- package/umd/stepper/type.d.ts +1 -1
- package/umd/swipe-action/type.d.ts +1 -1
- package/umd/uploader/upload/upload.d.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.38.4](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.38.3...@arco-design/mobile-react@2.38.4) (2025-12-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* `DatePicker` update data when currentTs change ([#360](https://github.com/arco-design/arco-design-mobile/issues/360)) ([fd9f6ed](https://github.com/arco-design/arco-design-mobile/commit/fd9f6eda15d49f9c9d5215f388b87ea45b9612f6))
|
|
12
|
+
* promise type ([#361](https://github.com/arco-design/arco-design-mobile/issues/361)) ([4409667](https://github.com/arco-design/arco-design-mobile/commit/4409667bad7e6dc7d8793bc2250814da55baeb68))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [2.38.3](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.38.2...@arco-design/mobile-react@2.38.3) (2025-12-05)
|
|
7
19
|
|
|
8
20
|
|
package/README.en-US.md
CHANGED
|
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
|
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.38.
|
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.38.
|
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.38.3/dist/style.min.css">
|
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.38.3/dist/index.min.js"></script>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Full import
|
package/README.md
CHANGED
|
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
|
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.38.
|
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.38.
|
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.38.3/dist/style.min.css">
|
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.38.3/dist/index.min.js"></script>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## 引入全部
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { Promise } from 'es6-promise';
|
|
4
3
|
import type { PopupProps, PopupRef } from '../popup';
|
|
5
4
|
import type { OpenBaseProps } from '../masking';
|
|
6
5
|
export interface ActionSheetItemOptions {
|
package/cjs/date-picker/index.js
CHANGED
|
@@ -490,6 +490,9 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
490
490
|
(0, _react.useEffect)(function () {
|
|
491
491
|
_updateRangeValue(currentTs);
|
|
492
492
|
}, [currentTs]);
|
|
493
|
+
(0, _react.useEffect)(function () {
|
|
494
|
+
setCurrentTs(isRange ? Math.min(maxTs, Math.max(minTs, userSetCurrentTs[0])) : Math.min(maxTs, Math.max(minTs, userSetCurrentTs)));
|
|
495
|
+
}, [userSetCurrentTs, maxTs, minTs, isRange]);
|
|
493
496
|
(0, _react.useEffect)(function () {
|
|
494
497
|
if (visible) {
|
|
495
498
|
// 初始化当前时间
|
package/cjs/dialog/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { ILocale } from '@arco-design/mobile-utils';
|
|
4
|
-
import type { Promise } from 'es6-promise';
|
|
5
4
|
import type { MaskingCommonProps, MaskingRef, OpenBaseProps } from '../masking';
|
|
6
5
|
export * from './methods';
|
|
7
6
|
export interface FooterButtonOptions {
|
package/cjs/form/form-item.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
3
|
import { FormItemContext } from './form-item-context';
|
|
4
|
-
import { IFieldError, FieldValue, IFormItemInnerProps, FormItemProps, ValidateStatus, FormItemRef,
|
|
4
|
+
import type { IFieldError, FieldValue, IFormItemInnerProps, FormItemProps, ValidateStatus, FormItemRef, IFormItemContext } from './type';
|
|
5
|
+
import { ValueChangeType } from './type';
|
|
5
6
|
interface IFormItemInnerState {
|
|
6
7
|
validateStatus: ValidateStatus;
|
|
7
8
|
errors?: ReactNode[];
|
|
@@ -19,7 +20,7 @@ declare class FormItemInner extends PureComponent<IFormItemInnerProps, IFormItem
|
|
|
19
20
|
changeType: ValueChangeType;
|
|
20
21
|
} | undefined) => void;
|
|
21
22
|
getInitialValue: () => any;
|
|
22
|
-
getFieldError: () =>
|
|
23
|
+
getFieldError: () => ReactNode[];
|
|
23
24
|
isFieldTouched: () => boolean;
|
|
24
25
|
getAllRuleValidateTriggers: () => string[];
|
|
25
26
|
validateField: (validateTrigger?: string | undefined) => Promise<IFieldError>;
|
package/cjs/form/form-item.js
CHANGED
package/cjs/form/type.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IRules } from '@arco-design/mobile-utils';
|
|
2
|
-
import { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { Promise } from 'es6-promise';
|
|
1
|
+
import type { IRules } from '@arco-design/mobile-utils';
|
|
2
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
4
3
|
export declare type FieldValue = any;
|
|
5
4
|
export declare type FieldItem = Record<string, FieldValue>;
|
|
6
5
|
export declare type ILayout = 'horizontal' | 'vertical' | 'inline';
|
package/cjs/form/useForm.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
2
|
+
import type { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
3
3
|
export declare const PullRefresh: React.ForwardRefExoticComponent<PullRefreshBasicProps & React.RefAttributes<PullRefreshRef>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
|
-
import { Promise } from 'es6-promise';
|
|
2
|
+
import { Promise as ES6Promise } from 'es6-promise';
|
|
3
3
|
import { PullRefreshStatus } from './model';
|
|
4
4
|
export declare const useCommonState: ({ onRefresh, loosingMinHeight, }: {
|
|
5
5
|
onRefresh?: (() => Promise<void>) | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const useCommonState: ({ onRefresh, loosingMinHeight, }: {
|
|
|
13
13
|
labelRef: RefObject<HTMLDivElement>;
|
|
14
14
|
domRef: RefObject<HTMLDivElement>;
|
|
15
15
|
loosingHeight: number;
|
|
16
|
-
handleRefresh: () =>
|
|
16
|
+
handleRefresh: () => ES6Promise<[void | undefined, unknown]>;
|
|
17
17
|
tipsHeight: number;
|
|
18
18
|
};
|
|
19
19
|
export declare const useAddScrollEvents: ({ domRef, handleTouchStart, handleTouchMove, handleTouchEnd, }: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
2
|
+
import type { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
3
3
|
export declare const PullRefresh: React.ForwardRefExoticComponent<PullRefreshBasicProps & React.RefAttributes<PullRefreshRef>>;
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _mobileUtils = require("@arco-design/mobile-utils");
|
|
13
13
|
|
|
14
|
+
var _es6Promise = require("es6-promise");
|
|
15
|
+
|
|
14
16
|
var _loading = _interopRequireDefault(require("../loading"));
|
|
15
17
|
|
|
16
18
|
var _contextProvider = require("../context-provider");
|
|
@@ -143,7 +145,7 @@ var PullRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
143
145
|
}, [disabled, ifShouldHandle]);
|
|
144
146
|
|
|
145
147
|
var refresh = function refresh() {
|
|
146
|
-
return new Promise(function (resolve) {
|
|
148
|
+
return new _es6Promise.Promise(function (resolve) {
|
|
147
149
|
if (domRef.current) {
|
|
148
150
|
domRef.current.style.overflow = 'hidden';
|
|
149
151
|
var animationKey = new Date().getTime();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { StepperProps } from '..';
|
|
2
|
+
import type { StepperProps } from '..';
|
|
3
3
|
export default function useValue(params: Required<Pick<StepperProps, 'defaultValue' | 'min' | 'max' | 'digits'>> & Pick<StepperProps, 'formatter' | 'value'>): {
|
|
4
4
|
updateValue: (updater: number | ((oldValue: number) => number)) => void;
|
|
5
5
|
actualInputValue: number;
|
package/cjs/stepper/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Promise } from 'es6-promise';
|
|
4
|
-
import { AdapterFile, CommonFileItem, UploadCommonProps } from './type';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import { Promise as ES6Promise } from 'es6-promise';
|
|
4
|
+
import type { AdapterFile, CommonFileItem, UploadCommonProps } from './type';
|
|
5
5
|
export declare class Upload<FileItem extends CommonFileItem = CommonFileItem> {
|
|
6
6
|
props: UploadCommonProps<FileItem>;
|
|
7
7
|
fileRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
@@ -17,4 +17,4 @@ export declare class Upload<FileItem extends CommonFileItem = CommonFileItem> {
|
|
|
17
17
|
handleClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, file: FileItem, index: number) => void;
|
|
18
18
|
handleTouchStart: (e: React.TouchEvent<HTMLDivElement>, image: FileItem, index: number) => void;
|
|
19
19
|
}
|
|
20
|
-
export declare const parseFile: (file: AdapterFile) =>
|
|
20
|
+
export declare const parseFile: (file: AdapterFile) => ES6Promise<unknown>;
|