161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (C) 2023 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit ArkUI 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ci/** 2261847f8eSopenharmony_ci * Control margin status of ExceptionPrompt. 2361847f8eSopenharmony_ci * @enum { number } 2461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 2561847f8eSopenharmony_ci * @crossplatform 2661847f8eSopenharmony_ci * @since 11 2761847f8eSopenharmony_ci */ 2861847f8eSopenharmony_ci /** 2961847f8eSopenharmony_ci * Control margin status of ExceptionPrompt. 3061847f8eSopenharmony_ci * @enum { number } 3161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 3261847f8eSopenharmony_ci * @crossplatform 3361847f8eSopenharmony_ci * @atomicservice 3461847f8eSopenharmony_ci * @since 12 3561847f8eSopenharmony_ci */ 3661847f8eSopenharmony_ciexport declare enum MarginType { 3761847f8eSopenharmony_ci /** 3861847f8eSopenharmony_ci * Default margin of MarginType,Margin 1: references ohos_id_card_margin_start, margin 2: references ohos_id_card_margin_end. 3961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4061847f8eSopenharmony_ci * @crossplatform 4161847f8eSopenharmony_ci * @since 11 4261847f8eSopenharmony_ci */ 4361847f8eSopenharmony_ci /** 4461847f8eSopenharmony_ci * Default margin of MarginType,Margin 1: references ohos_id_card_margin_start, margin 2: references ohos_id_card_margin_end. 4561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4661847f8eSopenharmony_ci * @crossplatform 4761847f8eSopenharmony_ci * @atomicservice 4861847f8eSopenharmony_ci * @since 12 4961847f8eSopenharmony_ci */ 5061847f8eSopenharmony_ci DEFAULT_MARGIN = 0, 5161847f8eSopenharmony_ci 5261847f8eSopenharmony_ci /** 5361847f8eSopenharmony_ci * Margins can be adapted of MarginType,Margin 1: references ohos_id_max_padding_start, margin 2: references ohos_id_max_padding_end. 5461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 5561847f8eSopenharmony_ci * @crossplatform 5661847f8eSopenharmony_ci * @since 11 5761847f8eSopenharmony_ci */ 5861847f8eSopenharmony_ci /** 5961847f8eSopenharmony_ci * Margins can be adapted of MarginType,Margin 1: references ohos_id_max_padding_start, margin 2: references ohos_id_max_padding_end. 6061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 6161847f8eSopenharmony_ci * @crossplatform 6261847f8eSopenharmony_ci * @atomicservice 6361847f8eSopenharmony_ci * @since 12 6461847f8eSopenharmony_ci */ 6561847f8eSopenharmony_ci FIT_MARGIN = 1, 6661847f8eSopenharmony_ci} 6761847f8eSopenharmony_ci 6861847f8eSopenharmony_ci/** 6961847f8eSopenharmony_ci * Configuration parameter of ExceptionPrompt. 7061847f8eSopenharmony_ci * @interface PromptOptions 7161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7261847f8eSopenharmony_ci * @crossplatform 7361847f8eSopenharmony_ci * @since 11 7461847f8eSopenharmony_ci */ 7561847f8eSopenharmony_ci /** 7661847f8eSopenharmony_ci * Configuration parameter of ExceptionPrompt. 7761847f8eSopenharmony_ci * @interface PromptOptions 7861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7961847f8eSopenharmony_ci * @crossplatform 8061847f8eSopenharmony_ci * @atomicservice 8161847f8eSopenharmony_ci * @since 12 8261847f8eSopenharmony_ci */ 8361847f8eSopenharmony_ciexport interface PromptOptions { 8461847f8eSopenharmony_ci /** 8561847f8eSopenharmony_ci * Icon of PromptOptions. 8661847f8eSopenharmony_ci * @type { ?ResourceStr } 8761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 8861847f8eSopenharmony_ci * @crossplatform 8961847f8eSopenharmony_ci * @since 11 9061847f8eSopenharmony_ci */ 9161847f8eSopenharmony_ci /** 9261847f8eSopenharmony_ci * Icon of PromptOptions. 9361847f8eSopenharmony_ci * @type { ?ResourceStr } 9461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 9561847f8eSopenharmony_ci * @crossplatform 9661847f8eSopenharmony_ci * @atomicservice 9761847f8eSopenharmony_ci * @since 12 9861847f8eSopenharmony_ci */ 9961847f8eSopenharmony_ci icon?: ResourceStr; 10061847f8eSopenharmony_ci 10161847f8eSopenharmony_ci /** 10261847f8eSopenharmony_ci * Tip text of PromptOptions. 10361847f8eSopenharmony_ci * @type { ?ResourceStr } 10461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 10561847f8eSopenharmony_ci * @crossplatform 10661847f8eSopenharmony_ci * @since 11 10761847f8eSopenharmony_ci */ 10861847f8eSopenharmony_ci /** 10961847f8eSopenharmony_ci * Tip text of PromptOptions. 11061847f8eSopenharmony_ci * @type { ?ResourceStr } 11161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 11261847f8eSopenharmony_ci * @crossplatform 11361847f8eSopenharmony_ci * @atomicservice 11461847f8eSopenharmony_ci * @since 12 11561847f8eSopenharmony_ci */ 11661847f8eSopenharmony_ci tip?: ResourceStr; 11761847f8eSopenharmony_ci 11861847f8eSopenharmony_ci /** 11961847f8eSopenharmony_ci * Margin Type of ExceptionPrompt. 12061847f8eSopenharmony_ci * @type { MarginType } 12161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12261847f8eSopenharmony_ci * @crossplatform 12361847f8eSopenharmony_ci * @since 11 12461847f8eSopenharmony_ci */ 12561847f8eSopenharmony_ci /** 12661847f8eSopenharmony_ci * Margin Type of ExceptionPrompt. 12761847f8eSopenharmony_ci * @type { MarginType } 12861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12961847f8eSopenharmony_ci * @crossplatform 13061847f8eSopenharmony_ci * @atomicservice 13161847f8eSopenharmony_ci * @since 12 13261847f8eSopenharmony_ci */ 13361847f8eSopenharmony_ci marginType: MarginType; 13461847f8eSopenharmony_ci 13561847f8eSopenharmony_ci /** 13661847f8eSopenharmony_ci * Right icon button text of PromptOptions. 13761847f8eSopenharmony_ci * @type { ?ResourceStr } 13861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 13961847f8eSopenharmony_ci * @crossplatform 14061847f8eSopenharmony_ci * @since 11 14161847f8eSopenharmony_ci */ 14261847f8eSopenharmony_ci /** 14361847f8eSopenharmony_ci * Right icon button text of PromptOptions. 14461847f8eSopenharmony_ci * @type { ?ResourceStr } 14561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 14661847f8eSopenharmony_ci * @crossplatform 14761847f8eSopenharmony_ci * @atomicservice 14861847f8eSopenharmony_ci * @since 12 14961847f8eSopenharmony_ci */ 15061847f8eSopenharmony_ci actionText?: ResourceStr; 15161847f8eSopenharmony_ci 15261847f8eSopenharmony_ci /** 15361847f8eSopenharmony_ci * Distance from the top of PromptOptions. 15461847f8eSopenharmony_ci * @type { Dimension } 15561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 15661847f8eSopenharmony_ci * @crossplatform 15761847f8eSopenharmony_ci * @since 11 15861847f8eSopenharmony_ci */ 15961847f8eSopenharmony_ci /** 16061847f8eSopenharmony_ci * Distance from the top of PromptOptions. 16161847f8eSopenharmony_ci * @type { Dimension } 16261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 16361847f8eSopenharmony_ci * @crossplatform 16461847f8eSopenharmony_ci * @atomicservice 16561847f8eSopenharmony_ci * @since 12 16661847f8eSopenharmony_ci */ 16761847f8eSopenharmony_ci marginTop: Dimension 16861847f8eSopenharmony_ci 16961847f8eSopenharmony_ci /** 17061847f8eSopenharmony_ci * Control concealment of PromptOptions. 17161847f8eSopenharmony_ci * @type { boolean } 17261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 17361847f8eSopenharmony_ci * @crossplatform 17461847f8eSopenharmony_ci * @since 11 17561847f8eSopenharmony_ci */ 17661847f8eSopenharmony_ci /** 17761847f8eSopenharmony_ci * Control concealment of PromptOptions. 17861847f8eSopenharmony_ci * @type { boolean } 17961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 18061847f8eSopenharmony_ci * @crossplatform 18161847f8eSopenharmony_ci * @atomicservice 18261847f8eSopenharmony_ci * @since 12 18361847f8eSopenharmony_ci */ 18461847f8eSopenharmony_ci isShown?: boolean 18561847f8eSopenharmony_ci} 18661847f8eSopenharmony_ci 18761847f8eSopenharmony_ci/** 18861847f8eSopenharmony_ci * Declare struct ExceptionPrompt higher-order component. 18961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 19061847f8eSopenharmony_ci * @crossplatform 19161847f8eSopenharmony_ci * @since 11 19261847f8eSopenharmony_ci */ 19361847f8eSopenharmony_ci /** 19461847f8eSopenharmony_ci * Declare struct ExceptionPrompt higher-order component. 19561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 19661847f8eSopenharmony_ci * @crossplatform 19761847f8eSopenharmony_ci * @atomicservice 19861847f8eSopenharmony_ci * @since 12 19961847f8eSopenharmony_ci */ 20061847f8eSopenharmony_ci@Component 20161847f8eSopenharmony_ciexport declare struct ExceptionPrompt { 20261847f8eSopenharmony_ci 20361847f8eSopenharmony_ci /** 20461847f8eSopenharmony_ci * Configuration information of ExceptionPrompt. 20561847f8eSopenharmony_ci * @type { PromptOptions } 20661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 20761847f8eSopenharmony_ci * @crossplatform 20861847f8eSopenharmony_ci * @since 11 20961847f8eSopenharmony_ci */ 21061847f8eSopenharmony_ci /** 21161847f8eSopenharmony_ci * Configuration information of ExceptionPrompt. 21261847f8eSopenharmony_ci * @type { PromptOptions } 21361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 21461847f8eSopenharmony_ci * @crossplatform 21561847f8eSopenharmony_ci * @atomicservice 21661847f8eSopenharmony_ci * @since 12 21761847f8eSopenharmony_ci */ 21861847f8eSopenharmony_ci @Prop options: PromptOptions; 21961847f8eSopenharmony_ci 22061847f8eSopenharmony_ci /** 22161847f8eSopenharmony_ci * Callback when clicking the text on the left. 22261847f8eSopenharmony_ci * @type { ?function } 22361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 22461847f8eSopenharmony_ci * @crossplatform 22561847f8eSopenharmony_ci * @since 11 22661847f8eSopenharmony_ci */ 22761847f8eSopenharmony_ci /** 22861847f8eSopenharmony_ci * Callback when clicking the text on the left. 22961847f8eSopenharmony_ci * @type { ?function } 23061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 23161847f8eSopenharmony_ci * @crossplatform 23261847f8eSopenharmony_ci * @atomicservice 23361847f8eSopenharmony_ci * @since 12 23461847f8eSopenharmony_ci */ 23561847f8eSopenharmony_ci onTipClick?: () => void; 23661847f8eSopenharmony_ci 23761847f8eSopenharmony_ci /** 23861847f8eSopenharmony_ci * Callback when click the icon button. 23961847f8eSopenharmony_ci * @type { ?function } 24061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 24161847f8eSopenharmony_ci * @crossplatform 24261847f8eSopenharmony_ci * @since 11 24361847f8eSopenharmony_ci */ 24461847f8eSopenharmony_ci /** 24561847f8eSopenharmony_ci * Callback when click the icon button. 24661847f8eSopenharmony_ci * @type { ?function } 24761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 24861847f8eSopenharmony_ci * @crossplatform 24961847f8eSopenharmony_ci * @atomicservice 25061847f8eSopenharmony_ci * @since 12 25161847f8eSopenharmony_ci */ 25261847f8eSopenharmony_ci onActionTextClick?: () => void; 25361847f8eSopenharmony_ci 25461847f8eSopenharmony_ci /** 25561847f8eSopenharmony_ci * The build function is a member function that must return an ArkTS component type (Element) to represent the component to be rendered as a user interface. 25661847f8eSopenharmony_ci * @type { function } 25761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 25861847f8eSopenharmony_ci * @crossplatform 25961847f8eSopenharmony_ci * @since 11 26061847f8eSopenharmony_ci */ 26161847f8eSopenharmony_ci /** 26261847f8eSopenharmony_ci * The build function is a member function that must return an ArkTS component type (Element) to represent the component to be rendered as a user interface. 26361847f8eSopenharmony_ci * @type { function } 26461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 26561847f8eSopenharmony_ci * @crossplatform 26661847f8eSopenharmony_ci * @atomicservice 26761847f8eSopenharmony_ci * @since 12 26861847f8eSopenharmony_ci */ 26961847f8eSopenharmony_ci build(): void; 27061847f8eSopenharmony_ci} 271