diff --git a/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts b/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts index 0daea8a56..4cb0cea4d 100644 --- a/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts +++ b/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 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 @@ -21,7 +21,7 @@ import ExtensionAbility from './@ohos.app.ability.ExtensionAbility'; import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession'; import type AutoFillExtensionContext from './application/AutoFillExtensionContext'; -import type { FillRequest, SaveRequest, FillRequestCallback, SaveRequestCallback } from './application/AutoFillRequest'; +import type { FillRequest, SaveRequest, UpdateRequest, FillRequestCallback, SaveRequestCallback } from './application/AutoFillRequest'; /** * The class of auto fill extension ability. @@ -80,6 +80,17 @@ export default class AutoFillExtensionAbility extends ExtensionAbility { */ onSaveRequest(session: UIExtensionContentSession, request: SaveRequest, callback: SaveRequestCallback): void; + /** + * Called back when an update request is coming. + * + * @param { UpdateRequest } request - Indicates the update request. + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ + onUpdateRequest(request: UpdateRequest): void; + /** * Called back when an auto fill extension session is destroyed. * diff --git a/api/@ohos.app.ability.autoFillManager.d.ts b/api/@ohos.app.ability.autoFillManager.d.ts index 961405d8b..d94ce8cd8 100644 --- a/api/@ohos.app.ability.autoFillManager.d.ts +++ b/api/@ohos.app.ability.autoFillManager.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 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 @@ -23,6 +23,7 @@ import type * as _ViewData from './application/ViewData'; import type * as _PageNodeInfo from './application/PageNodeInfo'; import { AutoFillType } from './application/AutoFillType'; import type * as _AutoFillRequest from './application/AutoFillRequest'; +import type * as _AutoFillRect from './application/AutoFillRect'; /** * This module provides the function of auto fill manager. @@ -153,6 +154,16 @@ declare namespace autoFillManager { * @since 11 */ export type SaveRequestCallback = _AutoFillRequest.SaveRequestCallback; + + /** + * Auto fill rectangle. + * + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ + export type AutoFillRect = _AutoFillRect.default; } export default autoFillManager; diff --git a/api/application/AutoFillRect.d.ts b/api/application/AutoFillRect.d.ts new file mode 100644 index 000000000..9918835ac --- /dev/null +++ b/api/application/AutoFillRect.d.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2024 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +/** + * Auto fill rectangle. + * + * @interface AutoFillRect + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @stagemodelonly + * @since 12 + */ +export default interface AutoFillRect { + /** + * The left of the rect. + * + * @type { number } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @stagemodelonly + * @since 12 + */ + left: number; + + /** + * The top of the rect. + * + * @type { number } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @stagemodelonly + * @since 12 + */ + top: number; + + /** + * The width of the rect. + * + * @type { number } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @stagemodelonly + * @since 12 + */ + width: number; + + /** + * The height of the rect. + * + * @type { number } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @stagemodelonly + * @since 12 + */ + height: number; +} \ No newline at end of file diff --git a/api/application/AutoFillRequest.d.ts b/api/application/AutoFillRequest.d.ts index e585d472e..cad387a46 100644 --- a/api/application/AutoFillRequest.d.ts +++ b/api/application/AutoFillRequest.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 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 @@ -47,6 +47,17 @@ export interface FillRequest { * @since 11 */ viewData: ViewData; + + /** + * Whether the UI extension modal is of popup. + * + * @type { boolean } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ + isPopup: boolean; } /** @@ -71,6 +82,28 @@ export interface SaveRequest { viewData: ViewData; } +/** + * Update request for automatic filling. + * + * @interface UpdateRequest + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ +export interface UpdateRequest { + /** + * The view data. Indicates the basic page information for the update request. + * + * @type { ViewData } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ + viewData: ViewData; +} + /** * Fill response for automatic filling. * diff --git a/api/application/PageNodeInfo.d.ts b/api/application/PageNodeInfo.d.ts index 7ab555c26..5741a6101 100644 --- a/api/application/PageNodeInfo.d.ts +++ b/api/application/PageNodeInfo.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 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 @@ -14,6 +14,7 @@ */ import type { AutoFillType } from './AutoFillType'; +import type AutoFillRect from './AutoFillRect'; /** * Page node info for automatic filling. @@ -112,4 +113,26 @@ export default interface PageNodeInfo { * @since 11 */ enableAutoFill: boolean; + + /** + * The rect of page node. + * + * @type { AutoFillRect } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ + rect: AutoFillRect; + + /** + * Is the page node in the focus. + * + * @type { boolean } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ + isFocus: boolean; } \ No newline at end of file diff --git a/api/application/ViewData.d.ts b/api/application/ViewData.d.ts index a3a1873cd..770d9860b 100644 --- a/api/application/ViewData.d.ts +++ b/api/application/ViewData.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 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 @@ -14,6 +14,7 @@ */ import type PageNodeInfo from './PageNodeInfo'; +import type AutoFillRect from './AutoFillRect'; /** * View data for automatic filling. @@ -79,4 +80,15 @@ export default interface ViewData { * @since 11 */ pageNodeInfos: Array; + + /** + * The page rect infos. + * + * @type { AutoFillRect } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @StageModelOnly + * @since 12 + */ + pageRect: AutoFillRect; } \ No newline at end of file