diff --git a/api/@internal/component/ets/textarea.d.ts b/api/@internal/component/ets/textarea.d.ts index 91fb656edfc29b4445c8489a4a137ab687a54de0..b2cf605b34497eb245fae0fb80b0a59e9b55c95d 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 60a367e5d342cc7f0f84823ab6d5d264e7e4381a..99fb150c81ef92cd8f90480d4a5b8ffc4877f3e5 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; } diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index 2397a8c0f28690a4af663af17b4e1c54132834d9..c1469fe5fd78d294622747696e2e41d6d7cceb8c 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.