From a347a08837d7e8552526b90bd84c1dea73873b14 Mon Sep 17 00:00:00 2001 From: li_juntao Date: Thu, 19 May 2022 09:25:32 +0800 Subject: [PATCH 1/7] =?UTF-8?q?preference=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li_juntao --- api/@ohos.data.preferences.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 063b48e13bc..7355e75a0df 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). -- Gitee From b7ce620bb0b7c13b53fbb074ae5eacf21bfd210c Mon Sep 17 00:00:00 2001 From: lizhouze Date: Wed, 15 Jun 2022 09:36:49 +0800 Subject: [PATCH 2/7] lizhouze@huawei.com Signed-off-by: lizhouze --- api/@internal/component/ets/index-full.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index 49f67636a8d..2be795deba5 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -102,3 +102,4 @@ /// /// /// +/// -- Gitee From a1edbfd78392c5e46cf8eab83e516e272327dd9c Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Wed, 15 Jun 2022 15:19:23 +0800 Subject: [PATCH 3/7] error modify Signed-off-by: fangJinliang1 Change-Id: Ia5f7a8370555dd3ed0b9dcbb31f31adcc8e2ee23 --- api/@ohos.commonEvent.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.commonEvent.d.ts b/api/@ohos.commonEvent.d.ts index 66ee8b106b7..7826cee6e69 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. -- Gitee From f74d228c4ef18fd23de49a8c2c861a789fda580a Mon Sep 17 00:00:00 2001 From: bixuefeng Date: Tue, 14 Jun 2022 09:57:20 +0800 Subject: [PATCH 4/7] Feature: border setting for each edge/radius Signed-off-by: bixuefeng Change-Id: I0155b523179a7c69f201f60cbb4198828813c6ca --- api/@internal/component/ets/common.d.ts | 24 ++++ api/@internal/component/ets/units.d.ts | 152 +++++++++++++++++++++++- 2 files changed, 172 insertions(+), 4 deletions(-) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 976812d48b8..50ad2afc5de 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -1172,24 +1172,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/units.d.ts b/api/@internal/component/ets/units.d.ts index 87957211c7a..fbfe48bf590 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; } -- Gitee From 9b41fdc079095d7dfc309b4ecdd1d8740ae256f5 Mon Sep 17 00:00:00 2001 From: lanyill Date: Tue, 14 Jun 2022 18:51:33 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E3=80=90ArkUI=E3=80=91=E3=80=90API9?= =?UTF-8?q?=E3=80=91Interpolate=E6=8E=A5=E5=8F=A3=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lanyill Change-Id: Id5ea1e08e978a0896e87d1e2ed0335330c12a911 --- api/@internal/component/ets/common.d.ts | 22 ++++++++++- api/@ohos.curves.d.ts | 49 +++++++++++++++++++++++-- 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 3c59a82b782..5fa925a6ff0 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 diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index e3a377d6cea..045224bdf9a 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; -- Gitee From 9f4d2ddba78cd1e1647bc456aa84e00d810f4dc0 Mon Sep 17 00:00:00 2001 From: luoying_ace_admin Date: Thu, 16 Jun 2022 15:47:35 +0800 Subject: [PATCH 6/7] revise api Signed-off-by: luoying_ace_admin Change-Id: If9e9fa6eb9850d348d448a6e9b2b406bb3e6b393 --- api/@ohos.prompt.d.ts | 46 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/api/@ohos.prompt.d.ts b/api/@ohos.prompt.d.ts index 9d8afef0be5..12361651837 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. -- Gitee From d4cfd71985a592ca0391e61034980cad619d4cf2 Mon Sep 17 00:00:00 2001 From: ry Date: Fri, 17 Jun 2022 10:20:27 +0800 Subject: [PATCH 7/7] remove unimplemented interface Signed-off-by: ry --- api/@ohos.uitest.d.ts | 205 +----------------------------------------- 1 file changed, 1 insertion(+), 204 deletions(-) diff --git a/api/@ohos.uitest.d.ts b/api/@ohos.uitest.d.ts index 07ff2f84bf7..7db4d3d43c5 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 -- Gitee