diff --git a/BUILD.gn b/BUILD.gn index e1313d198c90a92af6c117b1fa0c2d8633ce60b9..224d9d595735aeae93625e3fe1b0bfa81fd3f0e1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -73,7 +73,6 @@ ohos_copy("ets_component") { "api/@internal/component/ets/page_transition.d.ts", "api/@internal/component/ets/panel.d.ts", "api/@internal/component/ets/path.d.ts", - "api/@internal/component/ets/piece.d.ts", "api/@internal/component/ets/polygon.d.ts", "api/@internal/component/ets/polyline.d.ts", "api/@internal/component/ets/progress.d.ts", @@ -90,7 +89,6 @@ ohos_copy("ets_component") { "api/@internal/component/ets/search.d.ts", "api/@internal/component/ets/select.d.ts", "api/@internal/component/ets/shape.d.ts", - "api/@internal/component/ets/sheet.d.ts", "api/@internal/component/ets/sidebar.d.ts", "api/@internal/component/ets/slider.d.ts", "api/@internal/component/ets/span.d.ts", @@ -107,6 +105,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/text_input.d.ts", "api/@internal/component/ets/text_picker.d.ts", "api/@internal/component/ets/text_timer.d.ts", + "api/@internal/component/ets/time_picker.d.ts", "api/@internal/component/ets/toggle.d.ts", "api/@internal/component/ets/units.d.ts", "api/@internal/component/ets/video.d.ts", diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index ce3c01431f97a50d8863b02318d906d4b3f510df..42a4b1694a04863d01bae5fc71a2ace9462f4fe4 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -52,8 +52,9 @@ declare class AlphabetIndexerAttribute extends CommonMethod void): AlphabetIndexerAttribute; + onSelected(callback: (index: number) => void): AlphabetIndexerAttribute; /** * Definitions color. @@ -121,29 +122,35 @@ declare class AlphabetIndexerAttribute extends CommonMethod void): AlphabetIndexerAttribute; + /** * Index bar selection callback and return the strings which display on pop-up. * @since 8 */ - onRequestPopupData(event: (index: number) => Array): AlphabetIndexerAttribute; + onRequestPopupData(callback: (index: number) => Array): AlphabetIndexerAttribute; /** * Pop-up selection callback. * @since 8 */ - onPopupSelected(event: (index: number) => void): AlphabetIndexerAttribute; + onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute; /** - * Select the index. + * Sets the selected index. * @since 8 */ - selectedIndex(index: number): AlphabetIndexerAttribute; + selected(index: number): AlphabetIndexerAttribute; /** * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. * @since 8 */ - popupPosition(value: { offsetX: number; offsetY: number }): AlphabetIndexerAttribute; + popupPosition(value: Position): AlphabetIndexerAttribute; } declare const AlphabetIndexer: AlphabetIndexerInterface; diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index e8e9b7e4adc350167035479141f85a4f181811df..3ad3db720fe0169a43cd945cc9f01a02d853fcac 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -41,7 +41,7 @@ declare enum ButtonType { * Defines the button options. * @since 7 */ -declare interface ButtonOption { +declare interface ButtonOptions { /** * Describes the button style. * @since 7 @@ -70,13 +70,13 @@ interface ButtonInterface { * Create Button with Text child. * @since 7 */ - (options: ButtonOption): ButtonAttribute; + (options: ButtonOptions): ButtonAttribute; /** * Create Button with inner text label. * @since 7 */ - (label: ResourceStr, options?: ButtonOption): ButtonAttribute; + (label: ResourceStr, options?: ButtonOptions): ButtonAttribute; } /** diff --git a/api/@internal/component/ets/checkbox.d.ts b/api/@internal/component/ets/checkbox.d.ts index e96cf31217f745d46fa8f2b060397ad4a411cc30..adc255a0850ab69a12da8a844eed1e29690c0aeb 100644 --- a/api/@internal/component/ets/checkbox.d.ts +++ b/api/@internal/component/ets/checkbox.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines the option of Checkbox. + * Defines the options of Checkbox. * @since 8 */ -declare interface CheckboxOption { +declare interface CheckboxOptions { /** * Current name of Checkbox. * @since 8 @@ -41,7 +41,7 @@ interface CheckboxInterface { * Called when the Checkbox component is used. * @since 8 */ - (options?: CheckboxOption): CheckboxAttribute; + (options?: CheckboxOptions): CheckboxAttribute; } /** diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index ebf1461c3827c2b53aa34363fa099544eb8153d9..16695f09d2ee68c454c758613e1fe8726dfe006c 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -36,10 +36,10 @@ declare enum SelectStatus { } /** - * Defines the option of CheckboxGroup. + * Defines the options of CheckboxGroup. * @since 8 */ -declare interface CheckboxGroupOption { +declare interface CheckboxGroupOptions { /** * Setting the group of CheckboxGroup. * @since 8 @@ -48,7 +48,7 @@ declare interface CheckboxGroupOption { } /** - * Defines the option of CheckboxGroupResult. + * Defines the options of CheckboxGroupResult. * @since 8 */ declare interface CheckboxGroupResult { @@ -73,7 +73,7 @@ interface CheckboxGroupInterface { * Called when the CheckboxGroup component is used. * @since 8 */ - (options?: CheckboxGroupOption): CheckboxGroupAttribute; + (options?: CheckboxGroupOptions): CheckboxGroupAttribute; } /** diff --git a/api/@internal/component/ets/circle.d.ts b/api/@internal/component/ets/circle.d.ts index 56a14c7e18452458e07a35e334de45f425fac77b..3e2936e3274241bb7137fc07360d158ef2a1b35f 100644 --- a/api/@internal/component/ets/circle.d.ts +++ b/api/@internal/component/ets/circle.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines circle option for Circle component. + * Defines circle options for Circle component. * @since 7 */ -declare interface CircleOption { +declare interface CircleOptions { /** * Defines the width property. * @since 7 @@ -40,13 +40,13 @@ interface CircleInterface { * use new function to set the value. * @since 7 */ - new (value?: CircleOption): CircleAttribute; + new (value?: CircleOptions): CircleAttribute; /** * Set the value.. * @since 7 */ - (value?: CircleOption): CircleAttribute; + (value?: CircleOptions): CircleAttribute; } /** diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 9f4697c2fd0f1300691048849902b61be6aa05c8..21cce2b5a5ad837e0ce6e598383aec3d05b46bde 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -194,7 +194,7 @@ declare function $rawfile(value: string): Resource; /** * global getContentStorage function - * @since 8 + * @since 9 */ declare function getContentStorage(value: any): ContentStorage; @@ -255,10 +255,10 @@ declare interface AnimateParam { } /** - * Defines the motion path option. + * Defines the motion path options. * @since 7 */ -declare interface MotionPathOption { +declare interface MotionPathOptions { /** * The path info. * @since 7 @@ -285,7 +285,7 @@ declare interface MotionPathOption { * Defines the shard transition function params. * @since 7 */ -declare interface sharedTransitionOption { +declare interface sharedTransitionOptions { /** * Animation duration, in ms. * @since 7 @@ -305,7 +305,7 @@ declare interface sharedTransitionOption { * The motion path info. * @since 7 */ - motionPath?: MotionPathOption; + motionPath?: MotionPathOptions; /** * Z index info. * @since 7 @@ -319,10 +319,10 @@ declare interface sharedTransitionOption { } /** - * Defines the option of translate. + * Defines the options of translate. * @since 7 */ -declare interface TranslateOption { +declare interface TranslateOptions { /** * The param of x direction. * @since 7 @@ -341,10 +341,10 @@ declare interface TranslateOption { } /** - * Defines the option of scale. + * Defines the options of scale. * @since 7 */ -declare interface ScaleOption { +declare interface ScaleOptions { /** * The param of x direction. * @since 7 @@ -372,7 +372,7 @@ declare interface ScaleOption { centerY?: number | string; } -declare interface RotateOption { +declare interface RotateOptions { /** * The param of x direction. * @since 7 @@ -409,7 +409,7 @@ declare interface RotateOption { * Defines the param of transition. * @since 7 */ -declare interface TransitionOption { +declare interface TransitionOptions { /** * Defines the param of type. * @since 7 @@ -424,17 +424,17 @@ declare interface TransitionOption { * Defines the param of translate. * @since 7 */ - translate?: TransitionOption; + translate?: TransitionOptions; /** * Defines the param of scale. * @since 7 */ - scale?: ScaleOption; + scale?: ScaleOptions; /** * Defines the param of rotate. * @since 7 */ - rotate?: RotateOption; + rotate?: RotateOptions; } /** @@ -890,7 +890,7 @@ declare interface KeyEvent { * Component State Styels. * @since 8 */ -declare interface StateStyels { +declare interface StateStyles { /** * Defines normal state styles. * @since 8 @@ -926,7 +926,7 @@ declare interface StateStyels { * Defines the popup options. * @since 7 */ -declare interface PopupOption { +declare interface PopupOptions { /** * Information in the pop-up window. * @since 7 @@ -983,10 +983,10 @@ declare interface PopupOption { } /** - * Defines the custom popup option. + * Defines the custom popup options. * @since 8 */ -declare interface CustomPopupOption { +declare interface CustomPopupOptions { /** * builder of popup * @since 8 @@ -1076,7 +1076,7 @@ declare class CommonMethod { /** * Sets the touchable of the current component - * @since 8 + * @since 7 */ touchable(value: boolean): T; @@ -1135,7 +1135,7 @@ declare class CommonMethod { * width:Border width;color:Border color;radius:Border radius; * @since 7 */ - border(value: BorderOption): T; + border(value: BorderOptions): T; /** * Border style @@ -1215,13 +1215,6 @@ declare class CommonMethod { */ onBlur(event: () => void): T; - /** - * Trigger a event when focus move. - * @since 8 - * @systemapi - */ - onFocusMove(event: (direction?: FocusDirection) => void): T; - /** * animation * @since 7 @@ -1232,7 +1225,7 @@ declare class CommonMethod { * Transition parameter * @since 7 */ - transition(value: TransitionOption): T; + transition(value: TransitionOptions): T; /** * Bind gesture recognition. @@ -1336,13 +1329,13 @@ declare class CommonMethod { * When this parameter is set together with slide, slide takes effect by default. * @since 7 */ - translate(value: TranslateOption): T; + translate(value: TranslateOptions): T; /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * @since 7 */ - scale(value: ScaleOption): T; + scale(value: ScaleOptions): T; /** * Default number of occupied columns, indicating the number of occupied grid columns when the number of columns (span) of the corresponding size is not set in the useSizeType attribute. @@ -1362,7 +1355,7 @@ declare class CommonMethod { * The values are the start point during insertion and the end point during deletion. * @since 7 */ - rotate(value: RotateOption): T; + rotate(value: RotateOptions): T; /** * Sets the transformation matrix for the current component. @@ -1383,7 +1376,7 @@ declare class CommonMethod { onDisAppear(event: () => void): T; /** - * This callback is triggered when the size or position of this component has changed. + * This callback is triggered when the size or position of this component change finished. * @param event event callback. * @since 8 */ @@ -1435,7 +1428,7 @@ declare class CommonMethod { * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * @since 7 */ - sharedTransition(id: string, options?: sharedTransitionOption): T; + sharedTransition(id: string, options?: sharedTransitionOptions): T; /** * Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|). @@ -1580,7 +1573,7 @@ declare class CommonMethod { * rotatble:Whether to follow the path for rotation. * @since 7 */ - motionPath(value: MotionPathOption): T; + motionPath(value: MotionPathOptions): T; /** * Add a shadow effect to the current component @@ -1630,7 +1623,7 @@ declare class CommonMethod { * Popup control * @since 7 */ - bindPopup(show: boolean, popup: PopupOption | CustomPopupOption): T; + bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T; /** * Menu control @@ -1648,7 +1641,7 @@ declare class CommonMethod { * Sets styles for component state. * @since 8 */ - stateStyles(value: StateStyels): T; + stateStyles(value: StateStyles): T; /** * id for distrubte identification. diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index f208a905785be27f76a992eedab3d378025097ff..c0686ea814e4b35b9b29656c644f81941aa2951e 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -15,10 +15,10 @@ /** - * Defines the option of CustomDialogController. + * Defines the options of CustomDialogController. * @since 7 */ -declare interface CustomDialogControllerOption { +declare interface CustomDialogControllerOptions { /** * Custom builder function. * @since 7 @@ -71,7 +71,7 @@ declare class CustomDialogController { * The constructor transfers parameter settings. * @since 7 */ - constructor(value: CustomDialogControllerOption); + constructor(value: CustomDialogControllerOptions); /** * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts index 82d6f4c68b00d7197d82962285509577acdf8e30..9a702b2b2ef3e159ad7ae81d09314f1afc86098e 100644 --- a/api/@internal/component/ets/data_panel.d.ts +++ b/api/@internal/component/ets/data_panel.d.ts @@ -33,10 +33,10 @@ declare enum DataPanelType { } /** - * Defines the option of DataPanel. + * Defines the options of DataPanel. * @since 7 */ -declare interface DataPanelOption { +declare interface DataPanelOptions { /** * Current data value. the max length is 9. * @since 7 @@ -65,7 +65,7 @@ interface DataPanelInterface { * Return a DataPanel. * @since 7 */ - (options: DataPanelOption): DataPanelAttribute; + (options: DataPanelOptions): DataPanelAttribute; } /** diff --git a/api/@internal/component/ets/date_picker.d.ts b/api/@internal/component/ets/date_picker.d.ts index 13052c049659af9bb1fd0b7560f7d5e66eabb91d..02c116589efa4388800628ddaedbebd30913fed4 100644 --- a/api/@internal/component/ets/date_picker.d.ts +++ b/api/@internal/component/ets/date_picker.d.ts @@ -13,24 +13,6 @@ * limitations under the License. */ -/** - * Defines the type of DatePicker. - * @since 8 - */ -declare enum DatePickerType { - /** - * Application hour and second - * @since 8 - */ - Time, - - /** - * Application data - * @since 8 - */ - Date, -} - /** * Defines the struct of DatePickerResult. * @since 8 @@ -53,31 +35,13 @@ declare interface DatePickerResult { * @since 8 */ day?: number; - - /** - * Application hour - * @since 8 - */ - hour?: number; - - /** - * Application minute - * @since 8 - */ - minute?: number; - - /** - * Application second - * @since 8 - */ - second?: number; } /** - * Defines the option of DatePicker. + * Defines the options of DatePicker. * @since 8 */ -declare interface DatePickerOption { +declare interface DatePickerOptions { /** * Specifies the start date of the date selector. * @since 8 @@ -94,12 +58,6 @@ declare interface DatePickerOption { * @since 8 */ selected?: Date; - - /** - * Selector type, including date selector and time selector. By default, the date selector is used. - * @since 8 - */ - type?: DatePickerType; } /** @@ -111,7 +69,7 @@ interface DatePickerInterface { * Defines the DatePicker constructor. * @since 8 */ - (options?: DatePickerOption): DatePickerAttribute; + (options?: DatePickerOptions): DatePickerAttribute; } /** @@ -125,12 +83,6 @@ declare class DatePickerAttribute extends CommonMethod { */ lunar(value: boolean): DatePickerAttribute; - /** - * Time Selector: indicates whether to display the 24-hour clock. - * @since 8 - */ - useMilitaryTime(value: boolean): DatePickerAttribute; - /** * This event is triggered when a DatePicker date or time is selected. * @since 8 @@ -139,20 +91,16 @@ declare class DatePickerAttribute extends CommonMethod { } /** - * Defines the DatePickerDialogOption for Data Picker Dialog. + * Defines the DatePickerDialogOptions for Data Picker Dialog. * @since 8 */ -declare interface DatePickerDialogOption extends DatePickerOption { +declare interface DatePickerDialogOptions extends DatePickerOptions { /** * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. * @since 8 */ lunar?: boolean; - /** - * Time Selector: indicates whether to display the 24-hour clock. - * @since 8 - */ - useMilitaryTime?: boolean; + /** * Called when the OK button in the dialog is clicked. * @since 8 @@ -179,7 +127,7 @@ declare class DatePickerDialog { * Invoking method display. * @since 8 */ - static show(options?: DatePickerDialogOption); + static show(options?: DatePickerDialogOptions); } declare const DatePicker: DatePickerInterface; diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index 87d43584336f47be4a130346430559a1bdf053c2..518e2efabf457a584b22d6b2321ea1a507f7b164 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -274,13 +274,7 @@ declare enum MouseAction { * Triggered when the mouse is Hovered. * @since 8 */ - Hover, - - /** - * Triggered when the mouse status is None. - * @since 8 - */ - None, + Hover } /** @@ -613,42 +607,6 @@ declare enum Direction { Auto, } -/** - * Sets the horizontal layout of elements. - * @since 8 - */ -declare enum FocusDirection { - /** - * From the key up. - * @since 8 - */ - Up, - - /** - * From the key down. - * @since 8 - */ - Down, - - /** - * From the key left. - * @since 8 - */ - Left, - - /** - * From the key right. - * @since 8 - */ - Right, - - /** - * From the key tab. - * @since 8 - */ - Tab, -} - /** * Used to set the status of the scroll bar. * @since 7 @@ -1395,7 +1353,7 @@ declare enum HoverEffect { * Highlight effect * @since 8 */ - Board, + Highlight, /** * None effect diff --git a/api/@internal/component/ets/flex.d.ts b/api/@internal/component/ets/flex.d.ts index 0e6bb92157dfb4a59f4214380a00e2bcea6ae5b2..a22e7c704c5c2801c0c660a4c5038bea99bdddb7 100644 --- a/api/@internal/component/ets/flex.d.ts +++ b/api/@internal/component/ets/flex.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines the option of Flex. + * Defines the options of Flex. * @since 7 */ -declare interface FlexOption { +declare interface FlexOptions { /** * Sets the horizontal layout of elements. * @since 7 @@ -58,7 +58,7 @@ interface FlexInterface { * Defines the constructor of Flex. * @since 7 */ - (value?: FlexOption): FlexAttribute; + (value?: FlexOptions): FlexAttribute; } /** diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index e5c58dc6825e62d56c2444cf3b29ed7fbbe3e8b9..0381bdf923a8fa8e03f30fca300c38acd6ed618d 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -317,10 +317,10 @@ interface LongPressGestureInterface { } /** - * Defines the PanGesture option. + * Defines the PanGesture options. * @since 7 */ -declare class PanGestureOption { +declare class PanGestureOptions { /** * Constructor parameters. * @since 7 @@ -355,7 +355,7 @@ interface PanGestureInterface { * Set the value. * @since 7 */ - (value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOption): PanGestureInterface; + (value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions): PanGestureInterface; /** * Pan gesture recognition success callback. diff --git a/api/@internal/component/ets/grid_container.d.ts b/api/@internal/component/ets/grid_container.d.ts index 86cacbe4285c3633a39b2a676310922122340997..28203fa47f53365ea30a523ac957abe7864e6577 100644 --- a/api/@internal/component/ets/grid_container.d.ts +++ b/api/@internal/component/ets/grid_container.d.ts @@ -50,10 +50,10 @@ declare enum SizeType { } /** - * Defines the option of GridContainer. + * Defines the options of GridContainer. * @since 7 */ -declare interface GridContainerOption { +declare interface GridContainerOptions { /** * Sets the total number of columns in the current layout. * @since 7 @@ -88,7 +88,7 @@ interface GridContainerInterface { * Defines the constructor of GridContainer. * @since 7 */ - (value?: GridContainerOption): GridContainerAttribute; + (value?: GridContainerOptions): GridContainerAttribute; } /** diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index f4427afcf654483824da3b49ebf35ca180bd7101..837564798187d813417d51a49edc57caafbb9b16 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -58,7 +58,6 @@ /// /// /// -/// /// /// /// @@ -76,7 +75,6 @@ /// /// /// -/// /// /// /// @@ -92,6 +90,7 @@ /// /// /// +/// /// /// /// diff --git a/api/@internal/component/ets/lazy_for_each.d.ts b/api/@internal/component/ets/lazy_for_each.d.ts index 65e7c2cdbf88eb1c62303c01164abf6241cf436d..a027eab8aff3963214cdccde22447144c5a0ea07 100644 --- a/api/@internal/component/ets/lazy_for_each.d.ts +++ b/api/@internal/component/ets/lazy_for_each.d.ts @@ -27,53 +27,81 @@ declare interface DataChangeListener { /** * Data added. * @since 7 + * @deprecated since 8 */ onDataAdded(index: number): void; + /** + * Data added. + * @since 8 + */ + onDataAdd(index: number): void; + /** * Data moved. * @since 7 + * @deprecated since 8 */ onDataMoved(from: number, to: number): void; + /** + * Data moved. + * @since 8 + */ + onDataMove(from: number, to: number): void; + /** * Data deleted. * @since 7 + * @deprecated since 8 */ onDataDeleted(index: number): void; /** - * Data changed. + * Data deleted. + * @since 8 + */ + onDataDelete(index: number): void; + + /** + * Call when has data change. * @since 7 + * @deprecated since 8 */ onDataChanged(index: number): void; + + /** + * Call when has data change. + * @since 8 + */ + onDataChange(index: number): void; } /** - * Data changed. + * Developers need to implement this interface to provide data to LazyForEach component. * @since 7 */ declare interface IDataSource { /** - * Total count. + * Total data count. * @since 7 */ totalCount(): number; /** - * get data. + * Return the data of index. * @since 7 */ getData(index: number): any; /** - * register Data Change Listener + * Register data change listener. * @since 7 */ registerDataChangeListener(listener: DataChangeListener): void; /** - * unregister Data Change Listener + * Unregister data change listener. * @since 7 */ unregisterDataChangeListener(listener: DataChangeListener): void; diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 322f7fb52cea0440af6bfbbff28365515bb25c3e..24845b0924b93892776455ee849c167a66825335 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -106,7 +106,7 @@ declare class ListAttribute extends CommonMethod { /** * Called when setting whether to enable chain linkage dynamic effect. - * @since 8 + * @since 7 */ chainAnimation(value: boolean): ListAttribute; diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts index aa0c7f2ba6a3331e16495898093bb26256fcb147..6470485b21e0afefcdc48c33a5d8011c3fcd0e85 100644 --- a/api/@internal/component/ets/middle_class.d.ts +++ b/api/@internal/component/ets/middle_class.d.ts @@ -132,14 +132,14 @@ declare class TSButtonAttribute extends CommonMethod { * @systemapi * @since 8 */ - createWithChild(label?: ResourceStr, options?: ButtonOption): ButtonAttribute; + createWithChild(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute; /** * Used for TS compiler. * @ignore * @systemapi * @since 8 */ - createWithLabel(label?: ResourceStr, options?: ButtonOption): ButtonAttribute; + createWithLabel(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute; /** * Used for TS compiler. * @ignore @@ -239,7 +239,7 @@ declare class TSCheckboxAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options?: CheckboxOption): CheckboxAttribute; + create(options?: CheckboxOptions): CheckboxAttribute; /** * Used for TS compiler. * @ignore @@ -269,7 +269,7 @@ declare class TSCheckboxGroupAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(value?: CircleOption): CircleAttribute; + create(value?: CircleOptions): CircleAttribute; /** * Used for TS compiler. * @ignore @@ -412,7 +412,7 @@ declare class TSDataPanelAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options: DataPanelOption): DataPanelAttribute; + create(options: DataPanelOptions): DataPanelAttribute; /** * Used for TS compiler. * @ignore @@ -442,7 +442,7 @@ declare class TSDatePickerAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options?: DatePickerOption): DatePickerAttribute; + create(options?: DatePickerOptions): DatePickerAttribute; /** * Used for TS compiler. * @ignore @@ -518,7 +518,7 @@ declare class TSFlexAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(value?: FlexOption): FlexAttribute; + create(value?: FlexOptions): FlexAttribute; /** * Used for TS compiler. * @ignore @@ -696,7 +696,7 @@ declare class TSGridContainerAttribute extends ColumnAttribute { * @systemapi * @since 8 */ - create(value?: GridContainerOption): GridContainerAttribute; + create(value?: GridContainerOptions): GridContainerAttribute; /** * Used for TS compiler. * @ignore @@ -1300,7 +1300,7 @@ declare class TSRadioAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options: RadioOption): RadioAttribute; + create(options: RadioOptions): RadioAttribute; /** * Used for TS compiler. * @ignore @@ -1509,7 +1509,7 @@ declare class TSScrollBarAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(value: ScrollBarOption): ScrollBarAttribute; + create(value: ScrollBarOptions): ScrollBarAttribute; /** * Used for TS compiler. * @ignore @@ -1574,7 +1574,7 @@ declare class TSSelectAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options: Array): SelectAttribute; + create(options: Array): SelectAttribute; /** * Used for TS compiler. * @ignore @@ -1664,7 +1664,7 @@ declare class TSSliderAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options?: SliderOption): SliderAttribute; + create(options?: SliderOptions): SliderAttribute; /** * Used for TS compiler. * @ignore @@ -1920,7 +1920,7 @@ declare class TSTextAreaAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(value?: TextAreaOption): TextAreaAttribute; + create(value?: TextAreaOptions): TextAreaAttribute; /** * Used for TS compiler. * @ignore @@ -1973,7 +1973,7 @@ declare class TSTextInputAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(value?: TextInputOption): TextInputAttribute; + create(value?: TextInputOptions): TextInputAttribute; /** * Used for TS compiler. * @ignore @@ -1996,7 +1996,7 @@ declare class TSTextPickerAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options?: TextPickerOption): TextPickerAttribute; + create(options?: TextPickerOptions): TextPickerAttribute; /** * Used for TS compiler. * @ignore @@ -2026,7 +2026,7 @@ declare class TSTextTimerAttribute extends CommonMethod { * @systemapi * @since 8 */ - create(options?: TextTimerOption): TextTimerAttribute; + create(options?: TextTimerOptions): TextTimerAttribute; /** * Used for TS compiler. * @ignore @@ -2247,7 +2247,7 @@ declare class TSPanGestureInterface { direction?: PanDirection; distance?: number; } - | PanGestureOption, + | PanGestureOptions, ): PanGestureInterface; /** * Used for TS compiler. diff --git a/api/@internal/component/ets/navigation.d.ts b/api/@internal/component/ets/navigation.d.ts index 5130791878169fc2b6cfd20c07717d0fbbebf6ed..420438d98b3d5d30151a4370cf261094f0572fd4 100644 --- a/api/@internal/component/ets/navigation.d.ts +++ b/api/@internal/component/ets/navigation.d.ts @@ -108,12 +108,6 @@ declare class NavigationAttribute extends CommonMethod { */ menus(value: Array | CustomBuilder): NavigationAttribute; - /** - * The amount of the menu in Navigation. - * @since 8 - */ - menuCount(value: number): NavigationAttribute; - /** * Tool bar * @since 8 @@ -127,10 +121,10 @@ declare class NavigationAttribute extends CommonMethod { hideToolBar(value: boolean): NavigationAttribute; /** - * Trigger a titleModeChanged event when title mode changed at free mode. + * Trigger callback when title mode change finished at free mode. * @since 8 */ - onTitleModeChanged(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; + onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; } declare const Navigation: NavigationInterface; diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index e4fb5939d009250d2a09ffe328c8d53923870d03..a0ba3f6ca0bd05f475ac92ec79cfa29989236059 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines style option for progress component. + * Defines style options for progress component. * @since 8 */ -declare interface ProgressStyleOption { +declare interface ProgressStyleOptions { /** * Defines the strokeWidth property. * @since 8 @@ -106,7 +106,7 @@ declare class ProgressAttribute extends CommonMethod { * Called when the style of progress bar is set. * @since 8 */ - style(value: ProgressStyleOption): ProgressAttribute; + style(value: ProgressStyleOptions): ProgressAttribute; } declare const Progress: ProgressInterface; diff --git a/api/@internal/component/ets/radio.d.ts b/api/@internal/component/ets/radio.d.ts index 703e0034671e43e91531da8127ca3d3668e387c7..3d1792846913e51addb2f770d56f6e7080f19769 100644 --- a/api/@internal/component/ets/radio.d.ts +++ b/api/@internal/component/ets/radio.d.ts @@ -17,7 +17,7 @@ * Input parameter for creating a radio box. * @since 8 */ -declare interface RadioOption { +declare interface RadioOptions { /** * Radio group name. * @since 8 @@ -40,7 +40,7 @@ interface RadioInterface { * Called when a radio box is created. * @since 8 */ - (options: RadioOption): RadioAttribute; + (options: RadioOptions): RadioAttribute; } /** diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts index afccfd11ebbfb4c00dabf97c644a29f689101505..d8089e23b40238ad29c651a0e52c65f13cfd184e 100644 --- a/api/@internal/component/ets/scroll_bar.d.ts +++ b/api/@internal/component/ets/scroll_bar.d.ts @@ -32,10 +32,10 @@ declare enum ScrollBarDirection { } /** - * Defines the option of ScrollBar. + * Defines the options of ScrollBar. * @since 8 */ -declare interface ScrollBarOption { +declare interface ScrollBarOptions { /** * Sets the scroller of scroll bar. * @since 8 @@ -64,7 +64,7 @@ interface ScrollBarInterface { * Called when a ScrollBar container is set. * @since 8 */ - (value: ScrollBarOption): ScrollBarAttribute; + (value: ScrollBarOptions): ScrollBarAttribute; } /** diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index 6b186318b05634f816572e5c863fd64a5a0c6bd4..0c03c35b06461598cfb0e71970cdb808bfd1108e 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -112,7 +112,7 @@ declare class SelectAttribute extends CommonMethod { * Callback for selecting an item from the select. * @since 8 */ - onSelected(event: (index: number, value?: string) => void): SelectAttribute; + onSelect(callback: (index: number, value?: string) => void): SelectAttribute; } declare const Select: SelectInterface; diff --git a/api/@internal/component/ets/sheet.d.ts b/api/@internal/component/ets/sheet.d.ts deleted file mode 100644 index 59b190edb3a11f2084de9c2a82ec7ce0e579d985..0000000000000000000000000000000000000000 --- a/api/@internal/component/ets/sheet.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -/** - * Provides the interface for the sheet attributes. - * @since 8 - */ -interface SheetInterface { - /** - * Create sheet. - * @since 8 - */ - (): SheetAttribute; -} - -/** - * Declares sheet properties. - * @since 8 - */ -declare class SheetAttribute extends CommonMethod {} - -declare const Sheet: SheetInterface; -declare const SheetInstance: SheetAttribute; diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index e2c77a2d9e8ea1b2d60c0a04ab3856615d6f5dd2..e38f1ad790401262cc06ccf9b87e908c06708fcc 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -101,7 +101,7 @@ declare class SideBarContainerAttribute extends CommonMethod void): SideBarContainerAttribute; diff --git a/api/@internal/component/ets/slider.d.ts b/api/@internal/component/ets/slider.d.ts index 9f4817166e38ad4403ad7d47b76d57ede1787a8e..e3816c5c8273274a340527308ce7eba1aad28f88 100644 --- a/api/@internal/component/ets/slider.d.ts +++ b/api/@internal/component/ets/slider.d.ts @@ -56,10 +56,10 @@ declare enum SliderChangeMode { } /** - * Defines the option of Slider. + * Defines the options of Slider. * @since 7 */ -declare interface SliderOption { +declare interface SliderOptions { /** * Current value of Slider. * @since 7 @@ -112,7 +112,7 @@ interface SliderInterface { * Called when the slider bar component is used. * @since 7 */ - (options?: SliderOption): SliderAttribute; + (options?: SliderOptions): SliderAttribute; } /** diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index e4664068a3bd885392b2bf76ded74e9e723eaeb2..1a3f7ad21e13266ac548d3837f5493a408c2b669 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -38,7 +38,7 @@ declare class SwiperController { /** * Called when need to stop the swiper animation. - * @since 8 + * @since 7 */ finishAnimation(callback?: () => void); } diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 978ff49deb5f6a585d2f4fadb2dea839615932cf..d5898a5ad82cd590cc3f7512fb67c2c3b1868c34 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -31,10 +31,10 @@ declare class TextAreaController { } /** - * Defines the option of TextArea. + * Defines the options of TextArea. * @since 7 */ -declare interface TextAreaOption { +declare interface TextAreaOptions { /** * The place holder text string. * @since 7 @@ -63,7 +63,7 @@ interface TextAreaInterface { * Called when writing multiple lines of text. * @since 7 */ - (value?: TextAreaOption): TextAreaAttribute; + (value?: TextAreaOptions): TextAreaAttribute; } /** diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index 88d4ce1cf9e43326075724f42677e249c4de1fa7..3d613331f2f1b28fd9dc58fff8211382b6851b00 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -97,10 +97,10 @@ declare class TextInputController { } /** - * Defines the option of TextInput. + * Defines the options of TextInput. * @since 7 */ -declare interface TextInputOption { +declare interface TextInputOptions { /** * The place holder text string. * @since 7 @@ -129,7 +129,7 @@ interface TextInputInterface { * Called when writing a single line of text. * @since 7 */ - (value?: TextInputOption): TextInputAttribute; + (value?: TextInputOptions): TextInputAttribute; } /** @@ -168,11 +168,18 @@ declare class TextInputAttribute extends CommonMethod { caretColor(value: ResourceColor): TextInputAttribute; /** - * Called when judging whether the text editing has changed. + * Called when judging whether the text editing change finished. * @since 7 + * @deprecated since 8 */ onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute; + /** + * Called when judging whether the text editing change finished. + * @since 8 + */ + onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute; + /** * Called when submitted. * @since 7 diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index 8db6d4687d45dba790fed2ec386002c311ea08b8..9d91d8cf3e05453744de6d4d21efe3dc3df42d1e 100644 --- a/api/@internal/component/ets/text_picker.d.ts +++ b/api/@internal/component/ets/text_picker.d.ts @@ -14,10 +14,10 @@ */ /** - * Defines the option of TextPicker. + * Defines the options of TextPicker. * @since 8 */ -declare interface TextPickerOption { +declare interface TextPickerOptions { /** * Specifies the range of the text selector. */ @@ -40,7 +40,7 @@ interface TextPickerInterface { * Defines the TextPicker constructor. * @since 8 */ - (options?: TextPickerOption): TextPickerAttribute; + (options?: TextPickerOptions): TextPickerAttribute; } /** @@ -88,10 +88,10 @@ declare interface TextPickerResult { } /** - * Defines the TextPickerDialogOption for Text Picker Dialog. + * Defines the TextPickerDialogOptions for Text Picker Dialog. * @since 8 */ -declare interface TextPickerDialogOption extends TextPickerOption { +declare interface TextPickerDialogOptions extends TextPickerOptions { /** * Called when the default height of the selected element is set. * @since 8 @@ -123,7 +123,7 @@ declare class TextPickerDialog { * Invoking method display. * @since 8 */ - static show(options?: TextPickerDialogOption); + static show(options?: TextPickerDialogOptions); } declare const TextPicker: TextPickerInterface; diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts index d43d3e12ae79c5b19bafba8a6727d681acc02363..bf49c7c7e087bd74c73a9881bf31fc8df78be87a 100644 --- a/api/@internal/component/ets/text_timer.d.ts +++ b/api/@internal/component/ets/text_timer.d.ts @@ -44,10 +44,10 @@ declare class TextTimerController { } /** - * Defines the option of TextTimer. + * Defines the options of TextTimer. * @since 8 */ -interface TextTimerOption { +interface TextTimerOptions { /** * Sets whether to countdown.The default value is false. * @since 8 @@ -77,7 +77,7 @@ interface TextTimerInterface { * Defines the TextTimer constructor. * @since 8 */ - (options?: TextTimerOption): TextTimerAttribute; + (options?: TextTimerOptions): TextTimerAttribute; } /** diff --git a/api/@internal/component/ets/piece.d.ts b/api/@internal/component/ets/time_picker.d.ts similarity index 34% rename from api/@internal/component/ets/piece.d.ts rename to api/@internal/component/ets/time_picker.d.ts index 5e67176d8caf32f99dde768ddbc23051dcef3f3b..46846092967dc22bed93895c964682f08610a96c 100644 --- a/api/@internal/component/ets/piece.d.ts +++ b/api/@internal/component/ets/time_picker.d.ts @@ -13,83 +13,103 @@ * limitations under the License. */ - /** - * Sets the relative position of icons and text. + * Defines the struct of TimePickerResult. * @since 8 */ -declare enum IconPosition { +declare interface TimePickerResult { /** - * The icon is at the beginning of the text. + * Application hour * @since 8 */ - Start, + hour?: number; /** - * The icon is at the end of the text. + * Application minute * @since 8 */ - End, + minute?: number; } /** - * Provides text and icons for setting block entries. + * Defines the options of TimePicker. * @since 8 */ -interface PieceInterface { +declare interface TimePickerOptions { /** - * Called when setting the position of a block entry. - * @since 8 + * Specifies the time selector check time. */ - (options?: { content: string; icon?: string }): PieceAttribute; + selected?: Date; } /** + * Defines the TimePicker Component. * @since 8 */ -declare class PieceAttribute extends CommonMethod { +interface TimePickerInterface { /** - * Called when the relative position of the icon and the text is set. + * Defines the TimePicker constructor. * @since 8 */ - iconPosition(value: IconPosition): PieceAttribute; + (options?: TimePickerOptions): TimePickerAttribute; +} + +/** + * Defines the TimePicker attribute functions. + * @since 8 + */ +declare class TimePickerAttribute extends CommonMethod { /** - * Called when the value of Piece fontColor is set + * Time Selector: indicates whether to display the 24-hour clock. * @since 8 */ - fontColor(value: ResourceColor): PieceAttribute; + useMilitaryTime(value: boolean): TimePickerAttribute; + /** - * Called when the value of Piece fontSize is set + * This event is triggered when a TimePicker time is selected. * @since 8 */ - fontSize(value: Length): PieceAttribute; + onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute; +} + +/** + * Defines the TimePickerDialogOptions for Data Picker Dialog. + * @since 8 + */ +declare interface TimePickerDialogOptions extends TimePickerOptions { /** - * Called when the value of Piece fontStyle is set + * Time Selector: indicates whether to display the 24-hour clock. * @since 8 */ - fontStyle(value: FontStyle): PieceAttribute; + useMilitaryTime?: boolean; /** - * Called when the value of Piece fontWeight is set + * Called when the OK button in the dialog is clicked. * @since 8 */ - fontWeight(value: number | FontWeight | string): PieceAttribute; + onAccept?: (value: TimePickerResult) => void; /** - * Called when the value of Piece fontFamily is set + * Called when the Cancel button in the dialog is clicked. * @since 8 */ - fontFamily(value: ResourceStr): PieceAttribute; + onCancel?: () => void; /** - * Called when the value of Piece showDelete is set + * This event is triggered when a TimePicker Time or time is selected in dialog. * @since 8 */ - showDelete(value: boolean): PieceAttribute; + onChange?: (value: TimePickerResult) => void; +} + +/** + * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * @since 8 + */ +declare class TimePickerDialog { /** - * Default icon is invisible, - * Callback onClose function when icon is clicked + * Invoking method display. * @since 8 */ - onClose(callback: () => void): PieceAttribute; + static show(options?: TimePickerDialogOptions); } -declare const Piece: PieceInterface; -declare const PieceInstance: PieceAttribute; +declare const TimePicker: TimePickerInterface; +declare const TimePickerInstance: TimePickerAttribute; diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts index 72c00a5679760a174e91c2e37b5ab79ca9e20622..1eeb8aeadfd7701427cffe2babd034041c6f3e2d 100644 --- a/api/@internal/component/ets/units.d.ts +++ b/api/@internal/component/ets/units.d.ts @@ -150,13 +150,13 @@ declare interface Area { * Defines the local position. * @since 8 */ - pos: Position; + position: Position; /** * Defines the global position. * @since 8 */ - globalPos: Position; + globalPosition: Position; } /** @@ -177,7 +177,7 @@ declare interface Position { } /** - * Defines the constrain size option. + * Defines the constrain size options. * @since 7 */ declare interface ConstraintSizeOptions { @@ -204,7 +204,7 @@ declare interface ConstraintSizeOptions { } /** - * Defines the size option. + * Defines the size options. * @since 7 */ declare interface SizeOptions { @@ -221,10 +221,10 @@ declare interface SizeOptions { } /** - * Defines the option of border. + * Defines the options of border. * @since 7 */ -declare interface BorderOption { +declare interface BorderOptions { /** * Defines the border width. * @since 7 diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts index 8083acb3fc88707f2b74f28c013f7da2ede7987c..b36823a36d1932125f91f8bc7c21eb851b4ca90d 100644 --- a/api/@internal/component/ets/video.d.ts +++ b/api/@internal/component/ets/video.d.ts @@ -83,7 +83,7 @@ declare enum PlaybackSpeed { * Defines the video options. * @since 7 */ -declare interface VideoOption { +declare interface VideoOptions { /** * src of video. * @since 7 @@ -134,7 +134,7 @@ declare class VideoController { /** * Provides an event to stop playback. - * @since 6 + * @since 7 */ stop(); @@ -160,7 +160,7 @@ interface VideoInterface { * Set the value. * @since 7 */ - (value: VideoOption): VideoAttribute; + (value: VideoOptions): VideoAttribute; } /**