From fc6235e7e7f2edd416c1688553a5f5d5e02a5f7c Mon Sep 17 00:00:00 2001 From: zhongjianfei Date: Wed, 15 Sep 2021 20:41:09 +0800 Subject: [PATCH 1/2] zhongjianfei@huawei.com Signed-off-by: zhongjianfei Change-Id: I49e0015c87a26290313d5bad0ef36c848159dacb --- api/@internal/ets/lifecycle.d.ts | 56 +++++++++----------------------- 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index 2397a8c0f2..c1469fe5fd 100644 --- a/api/@internal/ets/lifecycle.d.ts +++ b/api/@internal/ets/lifecycle.d.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + import { Want } from "../ability/want"; import { ResultSet } from "../data/rdb/resultSet"; import { AbilityInfo } from "../bundle/abilityInfo"; @@ -20,8 +20,8 @@ import { DataAbilityResult } from "../ability/dataAbilityResult"; import { DataAbilityOperation } from "../ability/dataAbilityOperation"; import dataAbility from "../@ohos.data.dataAbility"; import rdb from "../@ohos.data.rdb"; -import rpc from "../@ohos.rpc"; import resourceManager from "../@ohos.resourceManager"; +import { PacMap } from "../ability/dataAbilityHelper"; /** * interface of app lifecycle. @@ -144,7 +144,6 @@ export declare interface LifecycleApp { * @devices phone, tablet * @since 7 * @sysCap AAFwk - * @param data Indicates the user data to restore. * @return - */ onRemoteTerminated?(): void; @@ -184,43 +183,6 @@ export declare interface LifecycleService { */ onCommand?(want: Want, startId: number): void; - /** - * Called back when a Service ability is first connected to an ability. - * - * @devices phone, tablet - * @since 7 - * @sysCap AAFwk - * @param want Indicates connection information about the Service ability. - * @return Returns the proxy of the Service ability. - */ - onConnect?(want: Want): rpc.RemoteObject; - - /** - * Called back when all abilities connected to a Service ability are disconnected. - * - * @devices phone, tablet - * @since 7 - * @sysCap AAFwk - * @param want Indicates disconnection information about the Service ability. - * @return - - */ - onDisconnect?(want: Want): void; - - /** - * Called when a new client attempts to connect to a Service ability after all previous client connections to it - * are disconnected. - * - *

The Service ability must have been started but not been destroyed, that is, {@link #startAbility} has been - * called but {@link #terminateSelf} has not.

- * - * @devices phone, tablet - * @since 7 - * @sysCap AAFwk - * @param want Indicates the want of the Service ability being connected. - * @return - - */ - onReconnect?(want: Want): void; - /** * Called back before an ability is destroyed. * @@ -308,6 +270,18 @@ export declare interface LifecycleData { */ normalizeUri?(uri: string): string; + /** + * Inserts multiple data records into the database. This method should be implemented by a Data ability. + * + * @devices phone, tablet + * @since 7 + * @sysCap AAFwk + * @param uri Indicates the position where the data is to insert. + * @param valueBuckets Indicates the data to insert. + * @return Returns the number of data records inserted. + */ + batchInsert?(uri: string, valueBuckets: Array): number; + /** * Converts the given normalized {@code uri} generated by {@link #normalizeUri(uri)} into a denormalized one. * The default implementation of this method returns the original uri passed to it. @@ -376,7 +350,7 @@ export declare interface LifecycleData { * @param extras Indicates the parameter transferred by the method. * @return Returns the result of the method. */ - call?(method: string, arg: string, extras: Object): Object; + call?(method: string, arg: string, extras: PacMap): PacMap; /** * Called to carry {@code AbilityInfo} to this ability after the ability is initialized. -- Gitee From 32062b0a4c0c1c8d379a38ead0afe0eff790f45d Mon Sep 17 00:00:00 2001 From: zhongjianfei Date: Fri, 17 Sep 2021 20:44:30 +0800 Subject: [PATCH 2/2] zhongjianfei@huawei.com Signed-off-by: zhongjianfei Change-Id: Ie9729c10bf057bd9fd4051a3e9c8fe5ac2f1d284 --- api/@internal/component/ets/textarea.d.ts | 1 - api/@internal/component/ets/textinput.d.ts | 43 ++++++++-------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/api/@internal/component/ets/textarea.d.ts b/api/@internal/component/ets/textarea.d.ts index 91fb656edf..b2cf605b34 100644 --- a/api/@internal/component/ets/textarea.d.ts +++ b/api/@internal/component/ets/textarea.d.ts @@ -31,7 +31,6 @@ declare class TextAreaAttribute extends CommonMethod { placeholderFont(value:{ size: number, weight: FontWeight, fontFamily: string | Resource, style: FontStyle }): T; textAlign(value: TextAlign): T; caretColor(value: Color): T; - correction(value: boolean): T; onChange(callback: (value: string) => void): T; } diff --git a/api/@internal/component/ets/textinput.d.ts b/api/@internal/component/ets/textinput.d.ts index 60a367e5d3..99fb150c81 100644 --- a/api/@internal/component/ets/textinput.d.ts +++ b/api/@internal/component/ets/textinput.d.ts @@ -16,30 +16,19 @@ import {CommonMethod, Color, Resource} from "./common"; import {FontWeight, FontStyle} from "./text"; -export declare enum TextInputType { - BEGIN = 0, - TEXT = BEGIN, - MULTILINE = 1, - NUMBER = 2, - PHONE = 3, - DATETIME = 4, - EMAIL_ADDRESS = 5, - URL = 6, - VISIBLE_PASSWORD = 7, - END +export declare enum InputType { + Normal, + Number, + Email, + Password, } -export declare enum TextInputAction { - BEGIN = 0, - UNSPECIFIED = BEGIN, - NONE = 1, - GO = 2, - SEARCH = 3, - SEND = 4, - NEXT = 5, - DONE = 6, - PREVIOUS = 7, - END = PREVIOUS +export declare enum EnterKeyType { + Go, + Search, + Send, + Next, + Done, } export declare class TextInputExtend extends TextInputAttribute { @@ -53,15 +42,13 @@ interface TextInput extends TextInputAttribute { } declare class TextInputAttribute extends CommonMethod { - textInputType(value: TextInputType): T; + type(value: InputType): T; placeholderColor(value: Color): T; - placeholderFont(value: {size: number, weight: FontWeight, fontFamily: string | Resource, style: FontStyle}): T; - textInputAction(value: TextInputAction): T; - inputFilter(value: boolean): T; + placeholderFont(value: { size?: number | string, weight?: number | FontWeight, family?: string, style?: FontStyle}): T; + enterKeyType(value: EnterKeyType): T; caretColor(value: Color): T; - correction(value: boolean): T; onEditChanged(callback: (isEditing: boolean) => void): T; - onSubmit(callback: (enterKey: TextInputAction) => void): T; + onSubmit(callback: (enterKey: EnterKeyType) => void): T; onChange(callback: (value: string) => void): T; } -- Gitee