diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 6f82b183556d8eb4b62d9b965a4abcd7cdf19ed4..9cd56c25e4db233c338da2500c5504648b45b7bc 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -70,6 +70,26 @@ import { LocalStorage } from '../stateManagement/storages/localStorage'; import { CustomBuilder } from './builder'; /*** endif */ +/** + * The type for SpringLoadingContext, see the detailed description in dragController. + * + * @typedef {import('../api/@ohos.arkui.dragController').default.SpringLoadingContext} SpringLoadingContext + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare type SpringLoadingContext = import('../api/@ohos.arkui.dragController').default.SpringLoadingContext; + +/** + * The type for DragSpringLoadingConfiguration, see the detailed description in dragController. + * + * @typedef {import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration} DragSpringLoadingConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare type DragSpringLoadingConfiguration = import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration; + /** * Defines the options of Component ClassDecorator. * @@ -13712,14 +13732,15 @@ declare type SizeChangeCallback = (oldValue: SizeOptions, newValue: SizeOptions) * @param { BaseGestureEvent } event - the event information * @param { GestureRecognizer } current - the current gesture recognizer of the component * @param { Array } recognizers - the gesture recognizers of the component on the response chain - * @param { Array } touchRecognizers - the touch recognizers of the component on the response chain + * @param { Array } [touchRecognizers] - the touch recognizers of the component on the response chain * @returns { GestureJudgeResult } the gesture judge result * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ -declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array, touchRecognizers?: Array) => GestureJudgeResult; +declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array, + touchRecognizers?: Array) => GestureJudgeResult; /** * Defines the callback type used in onGestureRecognizerJudgeBegin. @@ -22455,28 +22476,28 @@ declare interface DragInteractionOptions { defaultAnimationBeforeLifting?: boolean; /** - * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. + * Define whether to enable the haptic feedback when dragging, the default value is false. * * @type { ?boolean } - * @default true + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - enableEdgeAutoScroll?: boolean; + enableHapticFeedback?: boolean; /** - * Define whether to enable the haptic feedback when dragging, the default value is false. + * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. * * @type { ?boolean } - * @default false + * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - enableHapticFeedback?: boolean; + enableEdgeAutoScroll?: boolean; /** * Define whether to lifting trigger drag by finger. @@ -22803,26 +22824,6 @@ declare interface BackgroundOptions { ignoresLayoutSafeAreaEdges?: Array; } -/** - * The type for SpringLoadingContext, see the detailed description in dragController. - * - * @typedef {import('../api/@ohos.arkui.dragController').default.SpringLoadingContext} SpringLoadingContext - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ -declare type SpringLoadingContext = import('../api/@ohos.arkui.dragController').default.SpringLoadingContext; - -/** - * The type for DragSpringLoadingConfiguration, see the detailed description in dragController. - * - * @typedef {import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration} DragSpringLoadingConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ -declare type DragSpringLoadingConfiguration = import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration; - /** * CommonMethod. * @@ -27999,36 +28000,6 @@ declare class CommonMethod { */ onDragEnd(event: (event: DragEvent, extraParams?: string) => void): T; - /** - * Enables the component as a drag-and-drop target with spring loading functionality. - * - * When a dragged object hovers over the target, it triggers a callback notification. Spring Loading is an enhanced - * feature for drag-and-drop operations, allowing users to automatically trigger view transitions during dragging - * by hovering (hover) without needing to use another hand. - * This feature is primarily designed to enhance the smoothness and efficiency of drag-and-drop operations. Below are - * some common scenarios suitable for supporting this feature: - * - In a file manager, when dragging a file and hovering over a folder, the folder is automatically opened. - * - On a desktop launcher, when dragging a file and hovering over an application icon, the application is - * automatically opened. - * - * Please note: - * 1. Registering spring-loaded or drag-and-drop events (onDragEnter/Move/Leave/Drop) on a component makes it a - * drag-and-drop target. Only one target can be the responder at the same time when user drags and hovers on, and - * child components always have higher priority. - * 2. Once a complete spring loading is triggered on a component, new spring loading detection will only occur after the - * dragged object leaves and re-enters the component's range. - * - * @param { Callback | null } callback Registers the callback for spring loading response, or - * sets it to null to disable the support for spring loading. - * @param { DragSpringLoadingConfiguration } [configuration] The initialized spring loading configuration which is - * only used when the entire spring detecting. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - onDragSpringLoading(callback: Callback | null, configuration?: DragSpringLoadingConfiguration): T; - /** * Allowed drop uniformData type for this node. * @@ -30487,6 +30458,36 @@ declare class CommonMethod { */ accessibilityFocusDrawLevel(drawLevel: FocusDrawLevel): T; + /** + * Enables the component as a drag-and-drop target with spring loading functionality. + * + * When a dragged object hovers over the target, it triggers a callback notification. Spring Loading is an enhanced + * feature for drag-and-drop operations, allowing users to automatically trigger view transitions during dragging + * by hovering (hover) without needing to use another hand. + * This feature is primarily designed to enhance the smoothness and efficiency of drag-and-drop operations. Below are + * some common scenarios suitable for supporting this feature: + * - In a file manager, when dragging a file and hovering over a folder, the folder is automatically opened. + * - On a desktop launcher, when dragging a file and hovering over an application icon, the application is + * automatically opened. + * + * Please note: + * 1. Registering spring-loaded or drag-and-drop events (onDragEnter/Move/Leave/Drop) on a component makes it a + * drag-and-drop target. Only one target can be the responder at the same time when user drags and hovers on, and + * child components always have higher priority. + * 2. Once a complete spring loading is triggered on a component, new spring loading detection will only occur after the + * dragged object leaves and re-enters the component's range. + * + * @param { Callback | null } callback Registers the callback for spring loading response, or + * sets it to null to disable the support for spring loading. + * @param { DragSpringLoadingConfiguration } [configuration] The initialized spring loading configuration which is + * only used when the entire spring detecting. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + onDragSpringLoading(callback: Callback | null, configuration?: DragSpringLoadingConfiguration): T; + /** * Background blur style. * blurStyle:Blur style type. @@ -34394,10 +34395,7 @@ declare class DynamicNode { onMove(handler: Optional): T; /** - * Invoked when data is moved during drag and drop sorting. - * This callback is only applicable in a List component. - * where each ForEach iteration generates a ListItem component. - * It allows you to define custom drag actions and handle various drag events. + * Set the move action. * * @param { Optional } handler * @param { ItemDragEventHandler } eventHandler @@ -35135,7 +35133,7 @@ declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void; * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ -declare type AccessibilityCallback = (isHover: boolean, event: AccessibilityHoverEvent) => void +declare type AccessibilityCallback = (isHover: boolean, event: AccessibilityHoverEvent) => void; /** * Defines the callback type used in accessibility hover transparent event. diff --git a/kits/@kit.ArkUI.d.ts b/kits/@kit.ArkUI.d.ts index d08cde06cedaed640a13e383b4d5a6ea9ec7d73f..c60606d6b9fbbbab69d1d33d84f2ab6b0ff33af2 100644 --- a/kits/@kit.ArkUI.d.ts +++ b/kits/@kit.ArkUI.d.ts @@ -290,7 +290,7 @@ export { RefreshModifier, SearchModifier, TextAreaModifier, TextModifier, TextInputModifier, ImageSpanModifier, ImageAnimatorModifier, ImageModifier, VideoModifier, DataPanelModifier, GaugeModifier, LoadingProgressModifier, MarqueeModifier, ProgressModifier, QRCodeModifier, TextClockModifier, TextTimerModifier, LineModifier, PathModifier, - PolygonModifier, PolylineModifier, RectModifier, ShapeModifier, AlphabetIndexerModifier, FormComponentModifier, + PolygonModifier, PolylineModifier, RectModifier, ShapeModifier, AlphabetIndexerModifier, HyperlinkModifier, MenuModifier, MenuItemModifier, PanelModifier, SymbolGlyphModifier, AttributeUpdater, SymbolSpanModifier, ContainerSpanModifier, PixelMapDrawableDescriptor, AnimationOptions, AnimatedDrawableDescriptor, IDataSourcePrefetching, IPrefetcher, BasicPrefetcher, MarqueeDynamicSyncScene, MarqueeDynamicSyncSceneType,