diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index 74f9a301acb712e5c71f769d2446d4536ea3f281..b09c7f339f8b2adadd2d8be79535a5bc84381565 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -27,8 +27,18 @@ import { ComponentContent } from './ComponentContent'; /*** if arkts 1.2 */ import { UIContext } from '@ohos.arkui.UIContext'; -import { UICommonEvent, UIGestureEvent, CommonAttribute } from './component/common' -import { ListOptions, ListAttribute } from './component/list' +import { UICommonEvent, UIGestureEvent, CommonAttribute } from './component/common'; +import { ResourceStr } from './component/units'; +import { ListOptions, ListAttribute } from './component/list'; +import { ButtonOptions, ButtonAttribute} from './component/button'; +import { CheckboxOptions, CheckboxAttribute} from './component/Checkbox'; +import { CheckboxGroupOptions, CheckboxGroupAttribute} from './component/CheckboxGroup'; +import { RadioOptions, RadioAttribute} from './component/Radio'; +import { RatingOptions, RatingAttribute} from './component/Rating'; +import { SelectOption, SelectAttribute} from './component/Select'; +import { SliderOptions, SliderAttribute} from './component/Slider'; +import { ToggleOptions, ToggleAttribute} from './component/Toggle'; + /*** endif */ /** * Layout constraint, include the max size, the min size and the reference size for children to calculate percent. @@ -1516,6 +1526,44 @@ export declare namespace typeNode { */ type Button = TypedFrameNode; + /** + * Define the Button type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class ButtonFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { ResourceStr } label - Button label + * @param { ButtonOptions } [options] - Button options + * @returns { ButtonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(label: ResourceStr, options?: ButtonOptions): ButtonAttribute; + } + + /** + * Define the FrameNode type for Button. + * + * @typedef { ButtonFrameNode } Button + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Button = ButtonFrameNode; + /** * Create a FrameNode of Button type. * @@ -1524,7 +1572,8 @@ export declare namespace typeNode { * @returns { Button } - Return Button type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'Button'): Button; @@ -1657,6 +1706,44 @@ export declare namespace typeNode { */ type Checkbox = TypedFrameNode; + + /** + * Define the Checkbox type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class CheckboxFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { CheckboxOptions } [options] - Checkbox options + * @returns { CheckboxAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: CheckboxOptions): CheckboxAttribute; + } + + /** + * Define the FrameNode type for Checkbox. + * + * @typedef { CheckboxFrameNode } Checkbox + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Checkbox = CheckboxFrameNode; + /** * Create a FrameNode of Checkbox type. * @@ -1665,7 +1752,8 @@ export declare namespace typeNode { * @returns { Checkbox } - Return Checkbox type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'Checkbox'): Checkbox; @@ -1680,6 +1768,43 @@ export declare namespace typeNode { */ type CheckboxGroup = TypedFrameNode; + /** + * Define the CheckboxGroup type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class CheckboxGroupFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { CheckboxGroupOptions } [options] - CheckboxGroup options + * @returns { CheckboxGroupAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: CheckboxGroupOptions): CheckboxGroupAttribute; + } + + /** + * Define the FrameNode type for CheckboxGroup. + * + * @typedef { CheckboxGroupFrameNode } CheckboxGroup + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type CheckboxGroup = CheckboxGroupFrameNode; + /** * Create a FrameNode of CheckboxGroup type. * @@ -1688,7 +1813,8 @@ export declare namespace typeNode { * @returns { CheckboxGroup } - Return CheckboxGroup type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'CheckboxGroup'): CheckboxGroup; @@ -1703,6 +1829,43 @@ export declare namespace typeNode { */ type Radio = TypedFrameNode; + /** + * Define the Radio type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class RadioFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { RadioOptions } options - Radio options + * @returns { RadioAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options: RadioOptions): RadioAttribute; + } + + /** + * Define the FrameNode type for Radio. + * + * @typedef { RadioFrameNode } Radio + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Radio = RadioFrameNode; + /** * Create a FrameNode of Radio type. * @@ -1711,7 +1874,8 @@ export declare namespace typeNode { * @returns { Radio } - Return Radio type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'Radio'): Radio; @@ -1726,6 +1890,43 @@ export declare namespace typeNode { */ type Rating = TypedFrameNode; + /** + * Define the Rating type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class RatingFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { RatingOptions } [options] - Rating options + * @returns { RatingAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: RatingOptions): RatingAttribute; + } + + /** + * Define the FrameNode type for Rating. + * + * @typedef { RatingFrameNode } Rating + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Rating = RatingFrameNode; + /** * Create a FrameNode of Rating type. * @@ -1734,7 +1935,8 @@ export declare namespace typeNode { * @returns { Rating } - Return Rating type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'Rating'): Rating; @@ -1749,6 +1951,43 @@ export declare namespace typeNode { */ type Select = TypedFrameNode; + /** + * Define the Select type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class SelectFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { SelectOption } [options] - Select option + * @returns { SelectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options: Array): SelectAttribute; + } + + /** + * Define the FrameNode type for Select. + * + * @typedef { SelectFrameNode } Select + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Select = SelectFrameNode; + /** * Create a FrameNode of Select type. * @@ -1757,7 +1996,8 @@ export declare namespace typeNode { * @returns { Select } - Return Select type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'Select'): Select; @@ -1772,6 +2012,43 @@ export declare namespace typeNode { */ type Slider = TypedFrameNode; + /** + * Define the Slider type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class SliderFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { SliderOption } [options] - Slider options + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: SliderOptions): SliderAttribute; + } + + /** + * Define the FrameNode type for Slider. + * + * @typedef { SliderFrameNode } Slider + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Slider = SliderFrameNode; + /** * Create a FrameNode of Slider type. * @@ -1780,7 +2057,8 @@ export declare namespace typeNode { * @returns { Slider } - Return Slider type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'Slider'): Slider; @@ -1795,6 +2073,44 @@ export declare namespace typeNode { */ type Toggle = TypedFrameNode; + + /** + * Define the Toggle type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class ToggleFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { ToggleOptions } options - Toggle options + * @returns { ToggleAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options: ToggleOption): ToggleAttribute; + } + + /** + * Define the FrameNode type for Toggle. + * + * @typedef { ToggleFrameNode } Toggle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Toggle = ToggleFrameNode; + /** * Create a FrameNode of Toggle type. * @@ -1804,7 +2120,8 @@ export declare namespace typeNode { * @returns { Toggle } - Return Toggle type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function createNode(context: UIContext, nodeType: 'Toggle', options?: ToggleOptions): Toggle;