diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 3c59a82b78244adc6a891f5993930445c09f0bfc..e05c939d918099f94d86f154df0a149ef38cf9db 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -225,9 +225,15 @@ declare interface AnimateParam { tempo?: number; /** * Animation curve. + * @type { string | Curve} * @since 7 */ - curve?: Curve | string; + /** + * Animation curve. + * @type { string | Curve | ICurve} + * @since 9 + */ + curve?: Curve | string | ICurve; /** * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * @since 7 @@ -250,6 +256,18 @@ declare interface AnimateParam { onFinish?: () => void; } +/** + * Interface for curve object. + * @since 9 + */ +interface ICurve { + /** + * Get curve value by fraction. + * @since 9 + */ + interpolate(fraction : number) : number; +} + /** * Defines the motion path options. * @since 7 @@ -1172,24 +1190,48 @@ declare class CommonMethod { */ borderStyle(value: BorderStyle): T; + /** + * Border style + * @since 9 + */ + borderStyle(value: EdgeStyles): T; + /** * Border width * @since 7 */ borderWidth(value: Length): T; + /** + * Border width + * @since 9 + */ + borderWidth(value: EdgeWidths): T; + /** * Border color * @since 7 */ borderColor(value: ResourceColor): T; + /** + * Border color + * @since 9 + */ + borderColor(value: EdgeColors): T; + /** * Border radius * @since 7 */ borderRadius(value: Length): T; + /** + * Border radius + * @since 9 + */ + borderRadius(value: BorderRadiuses): T; + /** * Trigger a click event when a click is clicked. * @since 7 diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index 49f67636a8d844da42addaa171a020969a9b1fd1..2be795deba5f09165edc2ef81db72b6b78e94330 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -102,3 +102,4 @@ /// /// /// +/// diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts index 87957211c7a8cf3dbdea70c6eab50b05a1ec7aab..fbfe48bf5909933629147c157fbd367c81ed363d 100644 --- a/api/@internal/component/ets/units.d.ts +++ b/api/@internal/component/ets/units.d.ts @@ -81,6 +81,126 @@ declare type Padding = { */ declare type Margin = Padding; +/** + * Defines the border width property. + * @since 9 + */ + declare type EdgeWidths = { + /** + * top property. + * @since 9 + */ + top?: Length; + + /** + * right property. + * @since 9 + */ + right?: Length; + + /** + * bottom property. + * @since 9 + */ + bottom?: Length; + + /** + * left property. + * @since 9 + */ + left?: Length; +}; + +/** + * Defines the border radius property. + * @since 9 + */ +declare type BorderRadiuses = { + /** + * top-left property. + * @since 9 + */ + topLeft?: Length; + + /** + * top-right property. + * @since 9 + */ + topRight?: Length; + + /** + * bottom-left property. + * @since 9 + */ + bottomLeft?: Length; + + /** + * bottom-right property. + * @since 9 + */ + bottomRight?: Length; +}; + +/** + * Defines the border color property. + * @since 9 + */ +declare type EdgeColors = { + /** + * top property. + * @since 9 + */ + top?: ResourceColor; + + /** + * right property. + * @since 9 + */ + right?: ResourceColor; + + /** + * bottom property. + * @since 9 + */ + bottom?: ResourceColor; + + /** + * left property. + * @since 9 + */ + left?: ResourceColor; +}; + +/** + * Defines the border style property. + * @since 9 + */ +declare type EdgeStyles = { + /** + * top property. + * @since 9 + */ + top?: BorderStyle; + + /** + * right property. + * @since 9 + */ + right?: BorderStyle; + + /** + * bottom property. + * @since 9 + */ + bottom?: BorderStyle; + + /** + * left property. + * @since 9 + */ + left?: BorderStyle; +}; + /** * Defines the offset property. * @since 7 @@ -243,22 +363,46 @@ declare interface SizeOptions { declare interface BorderOptions { /** * Defines the border width. + * @type { Length } * @since 7 */ - width?: Length; + /** + * Defines the border width. + * @type { EdgeWidths | Length } + * @since 9 + */ + width?: EdgeWidths | Length; /** * Defines the border color. + * @type { ResourceColor } * @since 7 */ - color?: ResourceColor; + /** + * Defines the border color. + * @type { EdgeColors | ResourceColor } + * @since 9 + */ + color?: EdgeColors | ResourceColor; /** * Defines the border radius. + * @type { Length } * @since 7 */ - radius?: Length; + /** + * Defines the border radius. + * @type { BorderRadiuses | Length } + * @since 9 + */ + radius?: BorderRadiuses | Length; /** * Defines the border style. + * @type { BorderStyle } * @since 7 */ - style?: BorderStyle; + /** + * Defines the border style. + * @type { EdgeStyles | BorderStyle } + * @since 9 + */ + style?: EdgeStyles | BorderStyle; } diff --git a/api/@ohos.commonEvent.d.ts b/api/@ohos.commonEvent.d.ts index 66ee8b106b7c9ac68ed54a9641ee61953757dc3f..7826cee6e691d4e4e8911b0753292a2952b7a738 100644 --- a/api/@ohos.commonEvent.d.ts +++ b/api/@ohos.commonEvent.d.ts @@ -958,7 +958,7 @@ declare namespace commonEvent { * sent by the window manager service when the window mode is split. * @since 8 */ - COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN" + COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN", /** * The notification slot has been updated. diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index e3a377d6cea5acb289960fa17e9223cf55a1d2f8..045224bdf9ab82addd8bc08c090ebb177518947f 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -1,5 +1,5 @@ /* -* Copyright (c) 2021 Huawei Device Co., Ltd. +* Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -40,29 +40,70 @@ declare namespace curves { Friction, } + /** + * Interface for curve object. + * @since 9 + */ + interface ICurve { + /** + * Get curve value by fraction. + * @since 9 + */ + interpolate(fraction : number) : number; + } + + /** + * Initializes the interpolator curve when called. + * @since 9 + */ + function initCurve(curve?: Curve): ICurve; + /** * Initializes the interpolator curve when called. * @since 7 + * @deprecated since 9 */ function init(curve?: Curve): string; - + + /** + * Constructs a step curve when called. + * @since 9 + */ + function stepsCurve(count: number, end: boolean): ICurve; + /** * Constructs a step curve when called. * @since 7 + * @deprecated since 9 */ function steps(count: number, end: boolean): string; - + + /** + * Constructs a third-order Bezier curve when called. + * @since 9 + */ + function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; + /** * Constructs a third-order Bezier curve when called. * @since 7 + * @deprecated since 9 */ function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; - + + /** + * Constructs a spring curve when called. + * @since 9 + */ + function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + /** * Constructs a spring curve when called. * @since 7 + * @deprecated since 9 */ function spring(velocity: number, mass: number, stiffness: number, damping: number): string; + } export default curves; diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 063b48e13bc20ee3721d087a545ff544cda72a1e..7355e75a0dffcc60643dba1a72af1d1b431e7225 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -193,7 +193,7 @@ declare namespace preferences { /** * Indicates possible value types */ - type ValueType = number | string | boolean; + type ValueType = number | string | boolean | Array | Array | Array; /** * Indicates the maximum length of a key (80 characters). diff --git a/api/@ohos.prompt.d.ts b/api/@ohos.prompt.d.ts index 9d8afef0be55336a9409fccc55d6bd2a9a00a1a8..123616518373e6db2cd6203e1bee08ced2b8d50a 100644 --- a/api/@ohos.prompt.d.ts +++ b/api/@ohos.prompt.d.ts @@ -29,9 +29,15 @@ declare namespace prompt { /** * Text to display. + * @type { string } * @since 8 */ - message: string; + /** + * Text to display. + * @type { string | Resource } + * @since 9 + */ + message: string | Resource; /** * Duration of toast dialog box. The default value is 1500. @@ -54,14 +60,24 @@ declare namespace prompt { interface Button { /** + * @type { string } * @since 8 */ - text: string; + /** + * @type { string | Resource } + * @since 9 + */ + text: string | Resource; /** + * @type { string } * @since 8 */ - color: string; + /** + * @type { string | Resource } + * @since 9 + */ + color: string | Resource; } /** @@ -82,15 +98,27 @@ declare namespace prompt { /** * Title of the text to display. + * @type { string } * @since 8 */ - title?: string; + /** + * Title of the text to display. + * @type { string | Resource } + * @since 9 + */ + title?: string | Resource; /** * Text body. + * @type { string } * @since 8 */ - message?: string; + /** + * Text body. + * @type { string | Resource } + * @since 9 + */ + message?: string | Resource; /** * Array of buttons in the dialog box. @@ -119,9 +147,15 @@ declare namespace prompt { /** * Title of the text to display. + * @type { string } * @since 8 */ - title?: string; + /** + * Title of the text to display. + * @type { string | Resource } + * @since 9 + */ + title?: string | Resource; /** * Array of buttons in the dialog box. diff --git a/api/@ohos.uitest.d.ts b/api/@ohos.uitest.d.ts index 07ff2f84bf701a8b7ecc882cbce8a4413e03f2b3..7db4d3d43c574bbbc5f447c8cb6b7075e7d124b5 100755 --- a/api/@ohos.uitest.d.ts +++ b/api/@ohos.uitest.d.ts @@ -13,21 +13,6 @@ * limitations under the License. */ -/** - * Resize direction for the window. - * - * @since 9 - */ - enum ResizeDirection{ - LEFT, - RIGHT, - UP, - DOWN, - LEFT_UP, - LEFT_DOWN, - RIGHT_UP, - RIGHT_DOWN - } /** * Enumerates the string value match pattern. * @@ -64,28 +49,6 @@ ENDS_WITH = 3 } -/** - * Describes the window mode of the tested window - * - * @since 9 - */ - enum WindowMode{ - FULLSCREEN, - PRIMARY, - SECONDARY, - FLOATING - } - -/** - * Represents the point on the device screen. - * - * @since 9 - */ -declare interface Point { - readonly X: number; - readonly Y: number; -} - /** * Represents the rectangle area on the device screen. * @@ -98,18 +61,6 @@ declare interface Rect { readonly bottomY: number; } -/** - * Represents filer condition to get the window . - * - * @since 9 - */ -declare interface WindowFilter { - readonly bundleName?: string; - readonly title?: string; - readonly focused?: bool; - readonly actived?: bool; -} - /** * Describes the attribute requirements for the target UiComponents. * @@ -454,15 +405,6 @@ class UiComponent{ */ getBounds(): Promise; - /** - * Get the boundsCenter of this {@link UiComponent}. - * @syscap SystemCapability.Test.UiTest - * @return the boundsCenter object. - * @since 9 - * @test - */ - getBoundsCenter(): Promise; - /** * Drag this {@link UiComponent} to the bounds rect of target UiComponent. * @syscap SystemCapability.Test.UiTest @@ -510,16 +452,6 @@ class UiComponent{ */ findComponent(by:By):Promise; - /** - * Find the first matched {@link UiWindow} window. - * @syscap SystemCapability.Test.UiTest - * @param filter the filer condition of the target {@link UiWindow}. - * @returns the first matched {@link UiWindow} or undefined. - * @since 9 - * @test - */ - findWindow(filter:WindowFilter):Promise; - /** * Find the first matched {@link UiComponent} on current UI during the time given. * @syscap SystemCapability.Test.UiTest @@ -648,141 +580,6 @@ class UiComponent{ screenCap(savePath:string):Promise; } -/** - * - * - * @since 9 - * @test - * @syscap SystemCapability.Test.UiTest - */ - class UiWindow{ - /** - * Get the bundle name of this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the bundle name. - * @since 9 - * @test - */ - getBundleName():Promise; - - /** - * Get the bounds rect of this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @return the bounds rect object. - * @since 9 - * @test - */ - getBounds():Promise; - - /** - * Get the title of this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the title value. - * @since 9 - * @test - */ - getTitle():Promise; - - /** - * Get the windoe mode of this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the {@link WindowMode} object. - * @since 9 - * @test - */ - getWindowMode():Promise; - - /** - * Get the focused status of this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the focused status - * @since 9 - * @test - */ - isFocused():Promise; - - /** - * Get the actived status of this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the actived status - * @since 9 - * @test - */ - isActived():Promise; - - /** - * Set the focused status of this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the result of focus action - * @since 9 - * @test - */ - focus():Promise; - - /** - * Move this {@link UiWindow} to the specified points. - * @syscap SystemCapability.Test.UiTest - * @returns the result of move action - * @since 9 - * @test - */ - moveTo(x: number, y: number,):Promise; - - /** - * Resize this {@link UiWindow} to the specified size for the specified direction. - * @syscap SystemCapability.Test.UiTest - * @returns the result of resize action - * @since 9 - * @test - */ - resize(wide: number, height: number, direction: ResizeDirection):Promise; - - /** - * Change this {@link UiWindow} into split screen mode. - * @syscap SystemCapability.Test.UiTest - * @returns the result of split action - * @since 9 - * @test - */ - split():Promise; - - /** - * Maximize this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the result of maximize action - * @since 9 - * @test - */ - maximize():Promise; - - /** - * Minimize this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the result of minimize action - * @since 9 - * @test - */ - minimize():Promise; - - /** - * Resume this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the result of resume action - * @since 9 - * @test - */ - resume():Promise; - - /** - * Close this {@link UiWindow}. - * @syscap SystemCapability.Test.UiTest - * @returns the result of close action - * @since 9 - * @test - */ - close():Promise; - } - /** * The static builder for building {@link By}object conveniently,usage example:BY.text('txt').enabled(true). * @syscap SystemCapability.Test.UiTest @@ -791,4 +588,4 @@ class UiComponent{ */ const BY:By; - export {UiComponent,UiDriver,BY,MatchPattern}; + export {UiComponent,UiDriver,BY,MatchPattern}; \ No newline at end of file