diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index 42a4b1694a04863d01bae5fc71a2ace9462f4fe4..23913ae592a414dc418b3a4198fc27f726907dfa 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -18,17 +18,17 @@ * @since 7 */ declare enum IndexerAlign { - /** + /** * A dialog box is displayed on the right of the index bar. * @since 7 */ - Left, + Left, /** * A dialog box is displayed on the left of the index bar. * @since 7 - */ - Right, + */ + Right, } /** @@ -36,12 +36,12 @@ declare enum IndexerAlign { * @since 7 */ interface AlphabetIndexerInterface { - /** + /** * ArrayValue: Alphabetical index string array. * selected: ID of the selected item. * @since 7 */ - (value: { arrayValue: Array; selected: number }): AlphabetIndexerAttribute; + (value: { arrayValue: Array; selected: number }): AlphabetIndexerAttribute; } /** @@ -49,108 +49,113 @@ interface AlphabetIndexerInterface { * @since 7 */ declare class AlphabetIndexerAttribute extends CommonMethod { - /** + /** * Index bar selection callback. + * @since 7 - * @deprecated since 8 - */ - onSelected(callback: (index: number) => void): AlphabetIndexerAttribute; + + * @deprecated since 8 + + * useinstead onSelect + + */ + onSelected(callback: (index: number) => void): AlphabetIndexerAttribute; /** * Definitions color. * @since 7 - */ - color(value: ResourceColor): AlphabetIndexerAttribute; + */ + color(value: ResourceColor): AlphabetIndexerAttribute; /** * Select the text color. * @since 7 - */ - selectedColor(value: ResourceColor): AlphabetIndexerAttribute; + */ + selectedColor(value: ResourceColor): AlphabetIndexerAttribute; /** * Font color of the pop-up prompt text. * @since 7 - */ - popupColor(value: ResourceColor): AlphabetIndexerAttribute; + */ + popupColor(value: ResourceColor): AlphabetIndexerAttribute; /** * Select the text background color. * @since 7 - */ - selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute; + */ + selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute; /** * Background color of the pop-up window index. * @since 7 - */ - popupBackground(value: ResourceColor): AlphabetIndexerAttribute; + */ + popupBackground(value: ResourceColor): AlphabetIndexerAttribute; /** * Whether to use pop-up index hints. * @since 7 - */ - usingPopup(value: boolean): AlphabetIndexerAttribute; + */ + usingPopup(value: boolean): AlphabetIndexerAttribute; /** * Select the text text style, * @since 7 - */ - selectedFont(value: Font): AlphabetIndexerAttribute; + */ + selectedFont(value: Font): AlphabetIndexerAttribute; /** * Select the text background color. * @since 7 - */ - popupFont(value: Font): AlphabetIndexerAttribute; + */ + popupFont(value: Font): AlphabetIndexerAttribute; /** * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. * @since 7 - */ - itemSize(value: string | number): AlphabetIndexerAttribute; + */ + itemSize(value: string | number): AlphabetIndexerAttribute; /** * Definitions fonts. * @since 7 - */ - font(value: Font): AlphabetIndexerAttribute; + */ + font(value: Font): AlphabetIndexerAttribute; /** * Alphabet index bar alignment style. The left and right alignment styles are supported, which affects the pop-up position of the pop-up window. * @since 7 - */ - alignStyle(value: IndexerAlign): AlphabetIndexerAttribute; + */ + alignStyle(value: IndexerAlign): AlphabetIndexerAttribute; /** * Index bar selection callback. * @since 8 - */ - onSelect(callback: (index: number) => void): AlphabetIndexerAttribute; + */ + onSelect(callback: (index: number) => void): AlphabetIndexerAttribute; /** * Index bar selection callback and return the strings which display on pop-up. * @since 8 - */ - onRequestPopupData(callback: (index: number) => Array): AlphabetIndexerAttribute; + */ + onRequestPopupData(callback: (index: number) => Array): AlphabetIndexerAttribute; /** * Pop-up selection callback. * @since 8 - */ - onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute; + */ + onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute; /** * Sets the selected index. * @since 8 - */ - selected(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: Position): AlphabetIndexerAttribute; + */ + popupPosition(value: Position): AlphabetIndexerAttribute; } declare const AlphabetIndexer: AlphabetIndexerInterface; diff --git a/api/@internal/component/ets/animator.d.ts b/api/@internal/component/ets/animator.d.ts index ff253c2ebaa90bfc339572b4c13555577ca65064..7f94a1f6acc90dcb74bf1b451ab35722a6ac22a0 100644 --- a/api/@internal/component/ets/animator.d.ts +++ b/api/@internal/component/ets/animator.d.ts @@ -19,12 +19,12 @@ * @systemapi */ declare class SpringProp { - /** + /** * Constructor parameters * @since 7 * @systemapi */ - constructor(mass: number, stiffness: number, damping: number); + constructor(mass: number, stiffness: number, damping: number); } /** @@ -33,12 +33,12 @@ declare class SpringProp { * @systemapi */ declare class SpringMotion { - /** + /** * Constructor parameters * @since 7 * @systemapi */ - constructor(start: number, end: number, velocity: number, prop: SpringProp); + constructor(start: number, end: number, velocity: number, prop: SpringProp); } /** @@ -47,12 +47,12 @@ declare class SpringMotion { * @systemapi */ declare class FrictionMotion { - /** + /** * Constructor parameters * @since 7 * @systemapi */ - constructor(friction: number, position: number, velocity: number); + constructor(friction: number, position: number, velocity: number); } /** @@ -61,26 +61,26 @@ declare class FrictionMotion { * @systemapi */ declare class ScrollMotion { - /** + /** * Constructor parameters * @since 7 * @systemapi */ - constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp); + constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp); } /** - * Defines Animtor. + * Defines Animator. * @since 7 * @systemapi */ interface AnimatorInterface { - /** + /** * Constructor parameters * @since 7 * @systemapi */ - (value: string): AnimatorAttribute; + (value: string): AnimatorAttribute; } /** @@ -89,103 +89,103 @@ interface AnimatorInterface { * @systemapi */ declare class AnimatorAttribute extends CommonMethod { - /** + /** * Controls the playback status. The default value is the initial state. * @since 7 * @systemapi */ - state(value: AnimationStatus): AnimatorAttribute; + state(value: AnimationStatus): AnimatorAttribute; /** * Animation duration, in milliseconds. * @since 7 * @systemapi - */ - duration(value: number): AnimatorAttribute; + */ + duration(value: number): AnimatorAttribute; /** * Animation curve, default to linear curve * @since 7 * @systemapi - */ - curve(value: Curve): AnimatorAttribute; + */ + curve(value: Curve): AnimatorAttribute; /** * Delayed animation playback duration, in milliseconds. By default, the animation is not delayed. * @since 7 * @systemapi - */ - delay(value: number): AnimatorAttribute; + */ + delay(value: number): AnimatorAttribute; /** * Sets the state before and after the animation starts. * @since 7 * @systemapi - */ - fillMode(value: FillMode): AnimatorAttribute; + */ + fillMode(value: FillMode): AnimatorAttribute; /** * The default playback is once. If the value is -1, the playback is unlimited. * @since 7 * @systemapi - */ - iterations(value: number): AnimatorAttribute; + */ + iterations(value: number): AnimatorAttribute; /** * Sets the animation playback mode. By default, the animation starts to play again after the playback is complete. * @since 7 * @systemapi - */ - playMode(value: PlayMode): AnimatorAttribute; + */ + playMode(value: PlayMode): AnimatorAttribute; /** * Configure the physical animation algorithm. * @since 7 * @systemapi - */ - motion(value: SpringMotion | FrictionMotion | ScrollMotion): AnimatorAttribute; + */ + motion(value: SpringMotion | FrictionMotion | ScrollMotion): AnimatorAttribute; /** * Status callback, which is triggered when the animation starts to play. * @since 7 * @systemapi - */ - onStart(event: () => void): AnimatorAttribute; + */ + onStart(event: () => void): AnimatorAttribute; /** * Status callback, triggered when the animation pauses. * @since 7 * @systemapi - */ - onPause(event: () => void): AnimatorAttribute; + */ + onPause(event: () => void): AnimatorAttribute; /** * Status callback, triggered when the animation is replayed. * @since 7 * @systemapi - */ - onRepeat(event: () => void): AnimatorAttribute; + */ + onRepeat(event: () => void): AnimatorAttribute; /** * Status callback, which is triggered when the animation is canceled. * @since 7 * @systemapi - */ - onCancel(event: () => void): AnimatorAttribute; + */ + onCancel(event: () => void): AnimatorAttribute; /** * Status callback, which is triggered when the animation playback is complete. * @since 7 * @systemapi - */ - onFinish(event: () => void): AnimatorAttribute; + */ + onFinish(event: () => void): AnimatorAttribute; /** * The callback input parameter is the interpolation during animation playback. * @since 7 * @systemapi - */ - onFrame(event: (value: number) => void): AnimatorAttribute; + */ + onFrame(event: (value: number) => void): AnimatorAttribute; } declare const Animator: AnimatorInterface; diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index 6c6ef7b5936c4e46a99a4a1cd8780479c6f19028..8bccb32fafb31363e75e5d45664de054ae18a829 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -18,23 +18,23 @@ * @since 7 */ declare enum BadgePosition { - /** + /** * The dot is displayed vertically centered on the right. * @since 7 */ - RightTop, + RightTop, /** * Dots are displayed in the upper right corner. * @since 7 - */ - Right, + */ + Right, /** * The dot is displayed in the left vertical center. * @since 7 - */ - Left, + */ + Left, } /** @@ -42,29 +42,29 @@ declare enum BadgePosition { * @since 7 */ declare interface BadgeStyle { - /** + /** * Text Color * @since 7 */ - color?: ResourceColor; + color?: ResourceColor; /** * Text size. * @since 7 - */ - fontSize?: number | string; + */ + fontSize?: number | string; /** * Size of a badge. * @since 7 - */ - badgeSize?: number | string; + */ + badgeSize?: number | string; /** * Color of the badge. * @since 7 - */ - badgeColor?: ResourceColor; + */ + badgeColor?: ResourceColor; } /** @@ -72,17 +72,17 @@ declare interface BadgeStyle { * @since 7 */ declare interface BadgeParam { - /** + /** * Set the display position of the prompt point. * @since 7 */ - position?: BadgePosition; + position?: BadgePosition; /** * Defines the style of the Badge component, including the text color, size, dot color, and size. * @since 7 - */ - style: BadgeStyle; + */ + style: BadgeStyle; } /** @@ -90,17 +90,17 @@ declare interface BadgeParam { * @since 7 */ declare interface BadgeParamWithNumber extends BadgeParam { - /** + /** * Set the number of reminder messages. * @since 7 */ - count: number; + count: number; /** * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * @since 7 - */ - maxCount?: number; + */ + maxCount?: number; } /** @@ -108,26 +108,26 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @since 7 */ declare interface BadgeParamWithString extends BadgeParam { - /** + /** * Text string of the prompt content. * @since 7 */ - value: string; + value: string; } /** - * Defines Badge Componrnt. + * Defines Badge Component. * @since 7 */ interface BadgeInterface { - /** + /** * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * count: Set the number of reminder messages. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * @since 7 */ - (value: BadgeParamWithNumber): BadgeAttribute; + (value: BadgeParamWithNumber): BadgeAttribute; /** * value: Text string of the prompt content. @@ -135,12 +135,12 @@ interface BadgeInterface { * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * @since 7 - */ - (value: BadgeParamWithString): BadgeAttribute; + */ + (value: BadgeParamWithString): BadgeAttribute; } /** - * Defines Badge Componrnt attribute. + * Defines Badge Component attribute. * @since 7 */ declare class BadgeAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts index 63569d81073600b4718ce87c33e435a764bbde85..22e92f0701d4e1a8c5b0a13d194a2325ad2c7022 100644 --- a/api/@internal/component/ets/calendar.d.ts +++ b/api/@internal/component/ets/calendar.d.ts @@ -19,86 +19,86 @@ * @systemapi */ interface CalendarDay { - /** + /** * Indicates the sequence number of the 7 x 7 (7 x 6) grid layout on a calendar page by row. * The week sequence is one, two, three, four, five, six. * @since 7 * @systemapi */ - index: number; + index: number; /** * Lunar moon. * The week sequence is one, two, three, four, five, six. * @since 7 * @systemapi - */ - lunarMonth: string; + */ + lunarMonth: string; /** * Lunar day. * @since 7 * @systemapi - */ - lunarDay: string; + */ + lunarDay: string; /** * Day. * @since 7 * @systemapi - */ - dayMark: string; + */ + dayMark: string; /** * Indicates the off-duty flag information. The options are work and off.By default, the off-duty flag information is not required. * @since 7 * @systemapi - */ - dayMarkValue: string; + */ + dayMarkValue: string; /** * Gregorian calendar year. * @since 7 * @systemapi - */ - year: number; + */ + year: number; /** * Gregorian calendar month. * @since 7 * @systemapi - */ - month: number; + */ + month: number; /** * Gregorian calendar day. * @since 7 * @systemapi - */ - day: number; + */ + day: number; /** * * Indicates whether the default value is Lunar calendar. * @since 7 * @systemapi - */ - isFirstOfLunar: boolean; + */ + isFirstOfLunar: boolean; /** * Indicates whether to display has Schedule. * The week sequence is one, two, three, four, five, six. * @since 7 * @systemapi - */ - hasSchedule: boolean; + */ + hasSchedule: boolean; /** * Display Lunar Date.The week sequence is one, two, three, four, five, six. * @since 7 * @systemapi - */ - markLunarDay: boolean; + */ + markLunarDay: boolean; } /** @@ -107,26 +107,26 @@ interface CalendarDay { * @systemapi */ interface MonthData { - /** + /** * Gregorian calendar year. * @since 7 * @systemapi */ - year: number; + year: number; /** * Gregorian calendar month. * @since 7 * @systemapi - */ - month: number; + */ + month: number; /** * CalendarDay. * @since 7 * @systemapi - */ - data: CalendarDay[]; + */ + data: CalendarDay[]; } /** @@ -135,166 +135,166 @@ interface MonthData { * @systemapi */ interface CurrentDayStyle { - /** + /** * Text color. * @since 7 * @systemapi */ - dayColor?: ResourceColor; + dayColor?: ResourceColor; /** * lunar Text color. * @since 7 * @systemapi - */ - lunarColor?: ResourceColor; + */ + lunarColor?: ResourceColor; /** * lunar Work and rest text color. * @since 7 * @systemapi - */ - markLunarColor?: ResourceColor; + */ + markLunarColor?: ResourceColor; /** * Text fontSize. * @since 7 * @systemapi - */ - dayFontSize?: number; + */ + dayFontSize?: number; /** * lunar text fontSize. * @since 7 * @systemapi - */ - lunarDayFontSize?: number; + */ + lunarDayFontSize?: number; /** * Single date height. * @since 7 * @systemapi - */ - dayHeight?: number; + */ + dayHeight?: number; /** * Single date width. * @since 7 * @systemapi - */ - dayWidth?: number; + */ + dayWidth?: number; /** * Gregorian calendar height. * @since 7 * @systemapi - */ - gregorianCalendarHeight?: number; + */ + gregorianCalendarHeight?: number; /** * Data y axis Off set. * @since 7 * @systemapi - */ - dayYAxisOffset?: number; + */ + dayYAxisOffset?: number; /** * Lunar data y axis Off set. * @since 7 * @systemapi - */ - lunarDayYAxisOffset?: number; + */ + lunarDayYAxisOffset?: number; /** * Under score X Axis Off set. * @since 7 * @systemapi - */ - underscoreXAxisOffset?: number; + */ + underscoreXAxisOffset?: number; /** * Under score Y Axis Off set * @since 7 * @systemapi - */ - underscoreYAxisOffset?: number; + */ + underscoreYAxisOffset?: number; /** * Schedule marker X axis Off set * @since 7 * @systemapi - */ - scheduleMarkerXAxisOffset?: number; + */ + scheduleMarkerXAxisOffset?: number; /** * schedule Marker Y Axis Off set * @since 7 * @systemapi - */ - scheduleMarkerYAxisOffset?: number; + */ + scheduleMarkerYAxisOffset?: number; /** * Number of columns. * @since 7 * @systemapi - */ - colSpace?: number; + */ + colSpace?: number; /** * Daily five row space. * @since 7 * @systemapi - */ - dailyFiveRowSpace?: number; + */ + dailyFiveRowSpace?: number; /** * Daily six row space. * @since 7 * @systemapi - */ - dailySixRowSpace?: number; + */ + dailySixRowSpace?: number; /** * Single lunar height. * @since 7 * @systemapi - */ - lunarHeight?: number; + */ + lunarHeight?: number; /** * Under score width. * @since 7 * @systemapi - */ - underscoreWidth?: number; + */ + underscoreWidth?: number; /** * Under score length. * @since 7 * @systemapi - */ - underscoreLength?: number; + */ + underscoreLength?: number; /** * Schedule marker radius. * @since 7 * @systemapi - */ - scheduleMarkerRadius?: number; + */ + scheduleMarkerRadius?: number; /** - * Bound dary row offset. + * Boundary row offset. * @since 7 * @systemapi - */ - boundaryRowOffset?: number; + */ + boundaryRowOffset?: number; /** * Boundary col offset. * @since 7 * @systemapi - */ - boundaryColOffset?: number; + */ + boundaryColOffset?: number; } /** @@ -303,33 +303,33 @@ interface CurrentDayStyle { * @systemapi */ interface NonCurrentDayStyle { - /** + /** * Non-current month day color. * @since 7 * @systemapi */ - nonCurrentMonthDayColor?: ResourceColor; + nonCurrentMonthDayColor?: ResourceColor; /** * Lunar style of non-current month. * @since 7 * @systemapi - */ - nonCurrentMonthLunarColor?: ResourceColor; + */ + nonCurrentMonthLunarColor?: ResourceColor; /** * Non-Current Month Workday Marker Color. * @since 7 * @systemapi - */ - nonCurrentMonthWorkDayMarkColor?: ResourceColor; + */ + nonCurrentMonthWorkDayMarkColor?: ResourceColor; /** * Non-Current Month Off Day Marker Color. * @since 7 * @systemapi - */ - nonCurrentMonthOffDayMarkColor?: ResourceColor; + */ + nonCurrentMonthOffDayMarkColor?: ResourceColor; } /** @@ -338,33 +338,33 @@ interface NonCurrentDayStyle { * @systemapi */ interface TodayStyle { - /** + /** * Style of focus color. * @since 7 * @systemapi */ - focusedDayColor?: ResourceColor; + focusedDayColor?: ResourceColor; /** * Focus on Lunar Colors. * @since 7 * @systemapi - */ - focusedLunarColor?: ResourceColor; + */ + focusedLunarColor?: ResourceColor; /** * Background color of the focus area. * @since 7 * @systemapi - */ - focusedAreaBackgroundColor?: ResourceColor; + */ + focusedAreaBackgroundColor?: ResourceColor; /** * Focus area radius. * @since 7 * @systemapi - */ - focusedAreaRadius?: number; + */ + focusedAreaRadius?: number; } /** @@ -373,54 +373,54 @@ interface TodayStyle { * @systemapi */ interface WeekStyle { - /** + /** * Style of week color. * @since 7 * @systemapi */ - weekColor?: ResourceColor; + weekColor?: ResourceColor; /** * Style of week day color. * @since 7 * @systemapi - */ - weekendDayColor?: ResourceColor; + */ + weekendDayColor?: ResourceColor; /** * Style of lunar color. * @since 7 * @systemapi - */ - weekendLunarColor?: ResourceColor; + */ + weekendLunarColor?: ResourceColor; /** * Style of week font size. * @since 7 * @systemapi - */ - weekFontSize?: number; + */ + weekFontSize?: number; /** * Style of week height. * @since 7 * @systemapi - */ - weekHeight?: number; + */ + weekHeight?: number; /** * Style of week width. * @since 7 * @systemapi - */ - weekWidth?: number; + */ + weekWidth?: number; /** * Style of week space. * @since 7 * @systemapi - */ - weekAndDayRowSpace?: number; + */ + weekAndDayRowSpace?: number; } /** @@ -429,54 +429,54 @@ interface WeekStyle { * @systemapi */ interface WorkStateStyle { - /** + /** * Style of day color. * @since 7 * @systemapi */ - workDayMarkColor?: ResourceColor; + workDayMarkColor?: ResourceColor; /** * Style of day color. * @since 7 * @systemapi - */ - offDayMarkColor?: ResourceColor; + */ + offDayMarkColor?: ResourceColor; /** * Style of day size. * @since 7 * @systemapi - */ - workDayMarkSize?: number; + */ + workDayMarkSize?: number; /** * Style of day size. * @since 7 * @systemapi - */ - offDayMarkSize?: number; + */ + offDayMarkSize?: number; /** * Style of width. * @since 7 * @systemapi - */ - workStateWidth?: number; + */ + workStateWidth?: number; /** * Style of distance. * @since 7 * @systemapi - */ - workStateHorizontalMovingDistance?: number; + */ + workStateHorizontalMovingDistance?: number; /** * Style of distance. * @since 7 * @systemapi - */ - workStateVerticalMovingDistance?: number; + */ + workStateVerticalMovingDistance?: number; } /** @@ -485,26 +485,26 @@ interface WorkStateStyle { * @systemapi */ declare class CalendarController { - /** + /** * Constructor. * @since 7 * @systemapi */ - constructor(); + constructor(); /** * Back to day. * @since 7 * @systemapi - */ - backToToday(); + */ + backToToday(); /** * To the specified element. * @since 7 * @systemapi - */ - goTo(value: { year: number; month: number; day: number }); + */ + goTo(value: { year: number; month: number; day: number }); } /** @@ -512,18 +512,18 @@ declare class CalendarController { * @systemapi */ interface CalendarInterface { - /** + /** * Set value. * @since 7 * @systemapi */ - (value: { + (value: { date: { year: number; month: number; day: number }; currentData: MonthData; preData: MonthData; nextData: MonthData; controller?: CalendarController; - }): CalendarAttribute; + }): CalendarAttribute; } /** @@ -531,96 +531,97 @@ interface CalendarInterface { * @systemapi */ declare class CalendarAttribute { - /** + /** * Specifies whether the component displays the lunar calendar information. * @since 7 * @systemapi */ - showLunar(value: boolean): CalendarAttribute; + showLunar(value: boolean): CalendarAttribute; /** * Setting whether to display holiday information * @since 7 * @systemapi - */ - showHoliday(value: boolean): CalendarAttribute; + */ + showHoliday(value: boolean): CalendarAttribute; /** * Indicates whether the page can be scrolled. * @since 7 * @systemapi - */ - needSlide(value: boolean): CalendarAttribute; + */ + needSlide(value: boolean): CalendarAttribute; /** * Set the start day of the week for the calendar. * @since 7 * @systemapi - */ - startOfWeek(value: number): CalendarAttribute; + */ + startOfWeek(value: number): CalendarAttribute; /** * Set weekend. The default value is Sunday and Saturday. * @since 7 * @systemapi - */ - offDays(value: number): CalendarAttribute; + */ + offDays(value: number): CalendarAttribute; /** * Sets the sliding direction. * @since 7 * @systemapi - */ - direction(value: Axis): CalendarAttribute; + */ + direction(value: Axis): CalendarAttribute; /** * Sets the date style in the current month. * @since 7 * @systemapi - */ - currentDayStyle(value: CurrentDayStyle): CalendarAttribute; + */ + currentDayStyle(value: CurrentDayStyle): CalendarAttribute; /** * Sets the non-monthly date style. * @since 7 * @systemapi - */ - nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute; + */ + nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute; /** * Set the date style for today. * @since 7 * @systemapi - */ - todayStyle(value: TodayStyle): CalendarAttribute; + */ + todayStyle(value: TodayStyle): CalendarAttribute; /** * Sets the date style for the weekend. * @since 7 * @systemapi - */ - weekStyle(value: WeekStyle): CalendarAttribute; + */ + weekStyle(value: WeekStyle): CalendarAttribute; /** * Sets the style of the working state. * @since 7 * @systemapi - */ - workStateStyle(value: WorkStateStyle): CalendarAttribute; + */ + workStateStyle(value: WorkStateStyle): CalendarAttribute; /** * Click a date to return the information about the date you clicked. * @since 7 * @systemapi - */ - onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute; + */ + onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute; /** * When you swipe to switch months, the information about the previous month and the next month is requested. * @since 7 * @systemapi - */ - onRequestData( + */ + onRequestData( + event: (event: { year: number; month: number; diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index 16695f09d2ee68c454c758613e1fe8726dfe006c..2292b7656eafe6dfcfb2bcbc3141b8fae51f79e0 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -18,21 +18,21 @@ * @since 8 */ declare enum SelectStatus { - /** - * All checkboxs is selected. + /** + * All checkboxes are selected. * @since 8 */ - All, - /** + All, + /** * Part of the checkbox is selected. * @since 8 */ - Part, - /** + Part, + /** * None of the checkbox is selected. * @since 8 */ - None, + None, } /** @@ -40,11 +40,11 @@ declare enum SelectStatus { * @since 8 */ declare interface CheckboxGroupOptions { - /** + /** * Setting the group of CheckboxGroup. * @since 8 */ - group?: string; + group?: string; } /** @@ -52,16 +52,16 @@ declare interface CheckboxGroupOptions { * @since 8 */ declare interface CheckboxGroupResult { - /** + /** * Checkbox name. * @since 8 */ - name: Array; - /** + name: Array; + /** * Set the group of status. * @since 8 */ - status: SelectStatus; + status: SelectStatus; } /** @@ -69,11 +69,11 @@ declare interface CheckboxGroupResult { * @since 8 */ interface CheckboxGroupInterface { - /** + /** * Called when the CheckboxGroup component is used. * @since 8 */ - (options?: CheckboxGroupOptions): CheckboxGroupAttribute; + (options?: CheckboxGroupOptions): CheckboxGroupAttribute; } /** @@ -81,23 +81,23 @@ interface CheckboxGroupInterface { * @since 8 */ declare class CheckboxGroupAttribute extends CommonMethod { - /** + /** * setting whether all checkbox is selected. * @since 8 */ - selectAll(value: boolean): CheckboxGroupAttribute; + selectAll(value: boolean): CheckboxGroupAttribute; /** * setting the display color of checkbox. * @since 8 - */ - selectedColor(value: ResourceColor): CheckboxGroupAttribute; + */ + selectedColor(value: ResourceColor): CheckboxGroupAttribute; /** * Called when the selection status changes. * @since 8 - */ - onChange(callback: (event: CheckboxGroupResult) => void): CheckboxGroupAttribute; + */ + onChange(callback: (event: CheckboxGroupResult) => void): CheckboxGroupAttribute; } declare const CheckboxGroup: CheckboxGroupInterface; diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 0f109d96c8c2a6ba8d10a5e3675041f01686ab20..998e6c47ec2e77b76755911a5787ffc8568772f6 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -162,17 +162,17 @@ declare type Context = import('../api/application/Context').default; * @since 7 */ declare interface Configuration { - /** + /** * Set colorMode. * @since 7 */ - readonly colorMode: string; + readonly colorMode: string; /** * Set fontScale. * @since 7 - */ - readonly fontScale: number; + */ + readonly fontScale: number; } /** @@ -180,29 +180,29 @@ declare interface Configuration { * @since 8 */ declare interface Rectangle { - /** + /** * x:Horizontal coordinate * @since 8 */ - x?: Length; + x?: Length; /** * y:Vertical axis coordinate. * @since 8 - */ - y?: Length; + */ + y?: Length; /** * Sets the width of the current touchRect. * @since 8 - */ - width?: Length; + */ + width?: Length; /** * Sets the height of the current touchRect. * @since 8 - */ - height?: Length; + */ + height?: Length; } /** @@ -222,48 +222,48 @@ declare function $rawfile(value: string): Resource; * @since 7 */ declare interface AnimateParam { - /** + /** * Animation duration, in ms. * @since 7 */ - duration?: number; - /** + duration?: number; + /** * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower * animation playback. The value 0 means that there is no animation. * @since 7 */ - tempo?: number; - /** + tempo?: number; + /** * Animation curve. * @type { string | Curve} * @since 7 */ - /** + /** * Animation curve. * @type { string | Curve | ICurve} * @since 9 */ - curve?: Curve | string | ICurve; - /** + curve?: Curve | string | ICurve; + /** * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * @since 7 */ - delay?: number; - /** + delay?: number; + /** * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * @since 7 */ - iterations?: number; - /** + iterations?: number; + /** * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * @since 7 */ - playMode?: PlayMode; - /** + playMode?: PlayMode; + /** * Callback invoked when the animation playback is complete. * @since 7 */ - onFinish?: () => void; + onFinish?: () => void; } /** @@ -271,11 +271,11 @@ declare interface AnimateParam { * @since 9 */ interface ICurve { - /** + /** * Get curve value by fraction. * @since 9 */ - interpolate(fraction : number) : number; + interpolate(fraction : number) : number; } /** @@ -283,26 +283,26 @@ interface ICurve { * @since 7 */ declare interface MotionPathOptions { - /** + /** * The path info. * @since 7 */ - path: string; - /** + path: string; + /** * The origin point info. * @since 7 */ - from?: number; - /** + from?: number; + /** * The distance point info. * @since 7 */ - to?: number; - /** + to?: number; + /** * The rotate info. * @since 7 */ - rotatable?: boolean; + rotatable?: boolean; } /** @@ -310,36 +310,36 @@ declare interface MotionPathOptions { * @since 7 */ declare interface sharedTransitionOptions { - /** + /** * Animation duration, in ms. * @since 7 */ - duration?: number; - /** + duration?: number; + /** * Animation duration, in ms. * @since 7 */ - curve?: Curve | string; - /** + curve?: Curve | string; + /** * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * @since 7 */ - delay?: number; - /** + delay?: number; + /** * The motion path info. * @since 7 */ - motionPath?: MotionPathOptions; - /** + motionPath?: MotionPathOptions; + /** * Z index info. * @since 7 */ - zIndex?: number; - /** + zIndex?: number; + /** * the animate type. * @since 7 */ - type?: SharedTransitionEffectType; + type?: SharedTransitionEffectType; } /** @@ -347,21 +347,21 @@ declare interface sharedTransitionOptions { * @since 7 */ declare interface TranslateOptions { - /** + /** * The param of x direction. * @since 7 */ - x?: number | string; - /** + x?: number | string; + /** * The param of y direction. * @since 7 */ - y?: number | string; - /** + y?: number | string; + /** * The param of z direction. * @since 7 */ - z?: number | string; + z?: number | string; } /** @@ -369,31 +369,31 @@ declare interface TranslateOptions { * @since 7 */ declare interface ScaleOptions { - /** + /** * The param of x direction. * @since 7 */ - x?: number; - /** + x?: number; + /** * The param of y direction. * @since 7 */ - y?: number; - /** + y?: number; + /** * The param of z direction. * @since 7 */ - z?: number; - /** + z?: number; + /** * The param of center point of x. * @since 7 */ - centerX?: number | string; - /** + centerX?: number | string; + /** * The param of center point of y. * @since 7 */ - centerY?: number | string; + centerY?: number | string; } /** @@ -401,69 +401,69 @@ declare interface ScaleOptions { * @since 9 */ declare interface AlignRuleOption { - /** + /** * The param of left align. * @since 9 */ - left?: { anchor: string, align: HorizontalAlign }; - /** + left?: { anchor: string, align: HorizontalAlign }; + /** * The param of right align. * @since 9 */ - right?: { anchor: string, align: HorizontalAlign }; - /** + right?: { anchor: string, align: HorizontalAlign }; + /** * The param of middle align. * @since 9 */ - middle?: { anchor: string, align: HorizontalAlign }; - /** + middle?: { anchor: string, align: HorizontalAlign }; + /** * The param of top align. * @since 9 */ - top?: { anchor: string, align: VerticalAlign }; - /** + top?: { anchor: string, align: VerticalAlign }; + /** * The param of bottom align. * @since 9 */ - bottom?: { anchor: string, align: VerticalAlign }; - /** + bottom?: { anchor: string, align: VerticalAlign }; + /** * The param of center align. * @since 9 */ - center?: { anchor: string, align: VerticalAlign }; + center?: { anchor: string, align: VerticalAlign }; } declare interface RotateOptions { /** * The param of x direction. * @since 7 - */ - x?: number; - /** + */ + x?: number; + /** * The param of y direction. * @since 7 - */ - y?: number; - /** + */ + y?: number; + /** * The param of z direction. * @since 7 - */ - z?: number; - /** + */ + z?: number; + /** * The param of center point of x. * @since 7 - */ - centerX?: number | string; - /** + */ + centerX?: number | string; + /** * The param of center point of y. * @since 7 - */ - centerY?: number | string; - /** + */ + centerY?: number | string; + /** * The param of angle. * @since 7 - */ - angle: number | string; + */ + angle: number | string; } /** @@ -471,31 +471,31 @@ declare interface RotateOptions { * @since 7 */ declare interface TransitionOptions { - /** + /** * Defines the param of type. * @since 7 */ - type?: TransitionType; - /** + type?: TransitionType; + /** * Defines the param of opacity. * @since 7 */ - opacity?: number; - /** + opacity?: number; + /** * Defines the param of translate. * @since 7 */ - translate?: TranslateOptions; - /** + translate?: TranslateOptions; + /** * Defines the param of scale. * @since 7 */ - scale?: ScaleOptions; - /** + scale?: ScaleOptions; + /** * Defines the param of rotate. * @since 7 */ - rotate?: RotateOptions; + rotate?: RotateOptions; } /** @@ -503,51 +503,51 @@ declare interface TransitionOptions { * @since 9 */ interface PreviewParams { - /** + /** * Define Preview title * @since 9 */ - title?: string; - /** + title?: string; + /** * Define Preview width * @since 9 */ - width?: number; - /** + width?: number; + /** * Define Preview height * @since 9 */ - height?: number; - /** + height?: number; + /** * Define Preview locale * @since 9 */ - locale?: string; - /** + locale?: string; + /** * Define Preview colorMode * @since 9 */ - colorMode?: string; - /** + colorMode?: string; + /** * Define Preview deviceType * @since 9 */ - deviceType?: string; - /** + deviceType?: string; + /** * Define Preview dpi * @since 9 */ - dpi?: number; - /** + dpi?: number; + /** * Define Preview orientation * @since 9 */ - orientation?: string; - /** + orientation?: string; + /** * Define Preview roundScreen * @since 9 */ - roundScreen?: boolean; + roundScreen?: boolean; } /** @@ -555,17 +555,17 @@ interface PreviewParams { * @since 8 */ declare interface ItemDragInfo { - /** + /** * Obtains the X coordinate of the drag window, in vp. * @since 8 */ - x: number; + x: number; /** * Obtains the Y coordinate of the drag window, in vp. * @since 8 - */ - y: number; + */ + y: number; } /** @@ -573,23 +573,23 @@ declare interface ItemDragInfo { * @since 8 */ declare interface DragItemInfo { - /** + /** * Uses the pixelMap object for drawing. * @since 8 */ - pixelMap?: PixelMap; + pixelMap?: PixelMap; /** * Uses the custom builder for drawing, if pixelMap is set, this value is ignored. * @since 8 - */ - builder?: CustomBuilder; + */ + builder?: CustomBuilder; /** * Sets the extra info for drag event. * @since 8 - */ - extraInfo?: string; + */ + extraInfo?: string; } /** @@ -638,8 +638,8 @@ declare namespace focusControl { /** * Request focus to the specific component by param: 'id/key'. * @since 9 - */ - function requestFocus(value: string): boolean; + */ + function requestFocus(value: string): boolean; } /** @@ -647,11 +647,11 @@ declare namespace focusControl { * @since 8 */ declare interface EventTarget { - /** + /** * Area of current target. * @since 8 */ - area: Area; + area: Area; } /** @@ -659,23 +659,23 @@ declare interface EventTarget { * @since 8 */ declare enum SourceType { - /** + /** * Unknown type. * @since 8 */ - Unknown, + Unknown, /** * The mouse type. * @since 8 - */ - Mouse, + */ + Mouse, /** * The touch screen type. * @since 8 - */ - TouchScreen, + */ + TouchScreen, } /** @@ -683,29 +683,29 @@ declare enum SourceType { * @since 9 */ declare enum RepeatMode { - /** + /** * Repeat mode. * @since 9 */ - Repeat, - + Repeat, + /** * Stretch mode. * @since 9 - */ - Stretch, + */ + Stretch, /** * Round mode. * @since 9 - */ - Round, + */ + Round, /** * Space mode. * @since 9 - */ - Space, + */ + Space, } /** * enum Blur style @@ -713,26 +713,26 @@ declare enum RepeatMode { * @systemapi */ declare enum BlurStyle { - /** + /** * Defines the fuzzy scale. * @since 9 * @systemapi */ - Thin, + Thin, /** * Defines the fuzzy scale. * @since 9 * @systemapi - */ - Regular, + */ + Regular, /** * Defines the fuzzy scale. * @since 9 * @systemapi - */ - Thick, + */ + Thick, } /** @@ -740,23 +740,23 @@ declare enum RepeatMode { * @since 8 */ declare interface BaseEvent { - /** + /** * Defines the current target which fires this event. * @since 8 */ - target: EventTarget; + target: EventTarget; /** * Event timestamp. * @since 8 - */ - timestamp: number; + */ + timestamp: number; /** * the event source info. * @since 8 - */ - source: SourceType; + */ + source: SourceType; } /** @@ -764,41 +764,41 @@ declare interface BaseEvent { * @since 9 */ declare interface BorderImageOption { - /** + /** * Border image slice * @since 9 */ - slice?: Length | EdgeWidths, + slice?: Length | EdgeWidths, /** * Border image repeat * @since 9 - */ - repeat?: RepeatMode, + */ + repeat?: RepeatMode, /** * Border image source * @since 9 - */ - source?: string | Resource | linearGradient, + */ + source?: string | Resource | linearGradient, /** * Border image width * @since 9 - */ - width?: Length | EdgeWidths, + */ + width?: Length | EdgeWidths, /** * Border image outset * @since 9 - */ - outset?: Length | EdgeWidths, + */ + outset?: Length | EdgeWidths, /** * Border image center fill * @since 9 - */ - fill?: boolean + */ + fill?: boolean } /** @@ -806,29 +806,29 @@ declare interface BorderImageOption { * @since 7 */ declare interface ClickEvent extends BaseEvent { - /** + /** * X coordinate of the click point relative to the left edge of the device screen. * @since 7 */ - screenX: number; + screenX: number; /** * The Y coordinate of the touch point relative to the upper edge of the device screen. * @since 7 - */ - screenY: number; + */ + screenY: number; /** * X coordinate of the click point relative to the left edge of the clicked element. * @since 7 - */ - x: number; + */ + x: number; /** * Y coordinate of the click point relative to the upper edge of the clicked element. * @since 7 - */ - y: number; + */ + y: number; } /** @@ -836,47 +836,47 @@ declare interface ClickEvent extends BaseEvent { * @since 8 */ declare interface MouseEvent extends BaseEvent { - /** + /** * Mouse button of the click event. * @since 8 */ - button: MouseButton; + button: MouseButton; /** * Mouse action of the click event. * @since 8 - */ - action: MouseAction; + */ + action: MouseAction; /** * X coordinate of the click point relative to the left edge of the device screen. * @since 8 - */ - screenX: number; + */ + screenX: number; /** * The Y coordinate of the click point relative to the upper edge of the device screen. * @since 8 - */ - screenY: number; + */ + screenY: number; /** * X coordinate of the click point relative to the left edge of the clicked element. * @since 8 - */ - x: number; + */ + x: number; /** * Y coordinate of the click point relative to the upper edge of the clicked element. * @since 8 - */ - y: number; + */ + y: number; /** * The blocking event pops up. * @since 8 - */ - stopPropagation?: () => void; + */ + stopPropagation?: () => void; } /** @@ -884,41 +884,41 @@ declare interface MouseEvent extends BaseEvent { * @since 7 */ declare interface TouchObject { - /** + /** * Type of the touch event. * @since 7 */ - type: TouchType; + type: TouchType; /** * Finger unique identifier. * @since 7 - */ - id: number; + */ + id: number; /** * X coordinate of the touch point relative to the left edge of the device screen. * @since 7 - */ - screenX: number; + */ + screenX: number; /** * The Y coordinate of the touch point relative to the upper edge of the device screen. * @since 7 - */ - screenY: number; + */ + screenY: number; /** * X coordinate of the touch point relative to the left edge of the touched element. * @since 7 - */ - x: number; + */ + x: number; /** * Y coordinate of the touch point relative to the upper edge of the touched element. * @since 7 - */ - y: number; + */ + y: number; } /** @@ -926,29 +926,29 @@ declare interface TouchObject { * @since 7 */ declare interface TouchEvent extends BaseEvent { - /** + /** * Type of the touch event. * @since 7 */ - type: TouchType; + type: TouchType; /** * All finger information. * @since 7 - */ - touches: TouchObject[]; + */ + touches: TouchObject[]; /** * Indicates the current changed finger information. * @since 7 - */ - changedTouches: TouchObject[]; + */ + changedTouches: TouchObject[]; /** * The blocking event pops up. * @since 7 - */ - stopPropagation?: () => void; + */ + stopPropagation?: () => void; } /** @@ -963,12 +963,12 @@ declare type PixelMap = import('../api/@ohos.multimedia.image').default.PixelMap * @since 7 */ declare interface PixelMapMock { - /** + /** * release function. * @systemapi * @since 7 */ - release(): void; + release(): void; } /** @@ -976,17 +976,17 @@ declare interface PixelMapMock { * @since 7 */ declare interface DragEvent { - /** + /** * Obtains the X coordinate of the drag window, in vp. * @since 7 */ - getX(): number; + getX(): number; /** * Obtains the Y coordinate of the drag window, in vp. * @since 7 - */ - getY(): number; + */ + getY(): number; } /** @@ -994,90 +994,90 @@ declare interface DragEvent { * @since 7 */ declare interface KeyEvent { - /** + /** * Type of a key. * @since 7 */ - type: KeyType; + type: KeyType; /** * Key code of a key * @since 7 - */ - keyCode: number; + */ + keyCode: number; /** * Key value of a key. * @since 7 - */ - keyText: string; + */ + keyText: string; /** * Type of the input device that triggers the current key, such as the keyboard or handle. * @since 7 - */ - keySource: KeySource; + */ + keySource: KeySource; /** * Indicates the ID of the input device that triggers the current key. * @since 7 - */ - deviceId: number; + */ + deviceId: number; /** * Indicates the status of the key when the key is pressed. * The value 1 indicates the pressed state, and the value 0 indicates the unpressed state. * @since 7 - */ - metaKey: number; + */ + metaKey: number; /** * Timestamp when the key was pressed. * @since 7 - */ - timestamp: number; + */ + timestamp: number; /** * Block event bubbling. * @since 7 - */ - stopPropagation?: () => void; + */ + stopPropagation?: () => void; } /** - * Component State Styels. + * Component State Styles. * @since 8 */ declare interface StateStyles { - /** + /** * Defines normal state styles. * @since 8 */ - normal?: any; + normal?: any; /** * Defines pressed state styles. * @since 8 - */ - pressed?: any; + */ + pressed?: any; /** * Defines disabled state styles. * @since 8 - */ - disabled?: any; + */ + disabled?: any; /** * Defines focused state styles. * @since 8 - */ - focused?: any; + */ + focused?: any; /** * Defines clicked state styles. * @since 8 - */ - clicked?: any; + */ + clicked?: any; } /** @@ -1085,29 +1085,30 @@ declare interface StateStyles { * @since 7 */ declare interface PopupOptions { - /** + /** * Information in the pop-up window. * @since 7 */ - message: string; + message: string; /** * placement On Top * @since 7 - */ - placementOnTop?: boolean; + */ + placementOnTop?: boolean; /** * The first button. * @since 7 - */ - primaryButton?: { + */ + primaryButton?: { + /** * Button text value * @since 7 */ value: string; - + /** * action * @since 7 @@ -1118,14 +1119,15 @@ declare interface PopupOptions { /** * The second button. * @since 7 - */ - secondaryButton?: { + */ + secondaryButton?: { + /** * Button text value * @since 7 */ value: string; - + /** * action * @since 7 @@ -1136,20 +1138,20 @@ declare interface PopupOptions { /** * on State Change * @since 7 - */ - onStateChange?: (event: { isVisible: boolean }) => void; + */ + onStateChange?: (event: { isVisible: boolean }) => void; /** * The offset of the sharp corner of popup. * @since 9 - */ - arrowOffset?: Length; + */ + arrowOffset?: Length; /** * Whether to display in the sub window. * @since 9 - */ - showInSubWindow?: boolean; + */ + showInSubWindow?: boolean; } /** @@ -1157,59 +1159,59 @@ declare interface PopupOptions { * @since 8 */ declare interface CustomPopupOptions { - /** + /** * builder of popup * @since 8 */ - builder: CustomBuilder; + builder: CustomBuilder; /** * placement of popup * @since 8 - */ - placement?: Placement; + */ + placement?: Placement; /** * mask color of popup * @since 8 - */ - maskColor?: Color | string | Resource | number; + */ + maskColor?: Color | string | Resource | number; /** * background color of popup * @since 8 - */ - popupColor?: Color | string | Resource | number; + */ + popupColor?: Color | string | Resource | number; /** * whether show arrow * @since 8 - */ - enableArrow?: boolean; + */ + enableArrow?: boolean; /** * whether hide popup when click mask * @since 8 - */ - autoCancel?: boolean; + */ + autoCancel?: boolean; /** * on State Change * @since 8 - */ - onStateChange?: (event: { isVisible: boolean }) => void; + */ + onStateChange?: (event: { isVisible: boolean }) => void; /** * The offset of the sharp corner of popup. * @since 9 - */ - arrowOffset?: Length; + */ + arrowOffset?: Length; /** * Whether to display in the sub window. * @since 9 - */ - showInSubWindow?: boolean; + */ + showInSubWindow?: boolean; } /** @@ -1217,325 +1219,330 @@ declare interface CustomPopupOptions { * @since 7 */ declare class CommonMethod { - /** + /** * constructor. * @systemapi * @since 7 * @ignore */ - constructor(); + constructor(); /** * Sets the width of the current component. * @since 7 - */ - width(value: Length): T; + */ + width(value: Length): T; /** * Sets the width of the current component. * @since 7 - */ - height(value: Length): T; + */ + height(value: Length): T; /** * Sets the response region of the current component. * @since 8 - */ - responseRegion(value: Array | Rectangle): T; + */ + responseRegion(value: Array | Rectangle): T; /** * The size of the current component. * @since 7 - */ - size(value: SizeOptions): T; + */ + size(value: SizeOptions): T; /** * constraint Size: * minWidth:minimum Width,maxWidth:maximum Width,minHeight:minimum Height ,maxHeight:maximum Height, * @since 7 - */ - constraintSize(value: ConstraintSizeOptions): T; + */ + constraintSize(value: ConstraintSizeOptions): T; /** * Sets the touchable of the current component + * @since 7 - * @deprecated since 9, instead of hitTestBehavior. - */ - touchable(value: boolean): T; + + * @deprecated since 9 + + * @useinstead hitTestBehavior + + */ + touchable(value: boolean): T; /** * Defines the component's hit test behavior in touch events. * @param value the hit test mode. * @since 9 - */ - hitTestBehavior(value: HitTestMode): T; + */ + hitTestBehavior(value: HitTestMode): T; /** * layout Weight * @since 7 - */ - layoutWeight(value: number | string): T; + */ + layoutWeight(value: number | string): T; /** * Inner margin. * @since 7 - */ - padding(value: Padding | Length): T; + */ + padding(value: Padding | Length): T; /** * Outer Margin. * @since 7 - */ - margin(value: Margin | Length): T; + */ + margin(value: Margin | Length): T; /** * Background color * @since 7 - */ - backgroundColor(value: ResourceColor): T; + */ + backgroundColor(value: ResourceColor): T; /** * Background image * src: Image address url * @since 7 - */ - backgroundImage(src: ResourceStr, repeat?: ImageRepeat): T; + */ + backgroundImage(src: ResourceStr, repeat?: ImageRepeat): T; /** * Background image size * @since 7 - */ - backgroundImageSize(value: SizeOptions | ImageSize): T; + */ + backgroundImageSize(value: SizeOptions | ImageSize): T; /** * Background image position * x:Horizontal coordinate;y:Vertical axis coordinate. * @since 7 - */ - backgroundImagePosition(value: Position | Alignment): T; + */ + backgroundImagePosition(value: Position | Alignment): T; /** * Background blur style. * blurStyle:Blur style type. * @since 9 * @systemapi - */ - backgroundBlurStyle(value: BlurStyle): T; - + */ + backgroundBlurStyle(value: BlurStyle): T; + /** * Opacity * @since 7 - */ - opacity(value: number | Resource): T; + */ + opacity(value: number | Resource): T; /** * Opacity * width:Border width;color:Border color;radius:Border radius; * @since 7 - */ - border(value: BorderOptions): T; + */ + border(value: BorderOptions): T; /** * Border style * @since 7 - */ - borderStyle(value: BorderStyle): T; + */ + borderStyle(value: BorderStyle): T; /** * Border style * @since 9 - */ - borderStyle(value: EdgeStyles): T; + */ + borderStyle(value: EdgeStyles): T; /** * Border width * @since 7 - */ - borderWidth(value: Length): T; + */ + borderWidth(value: Length): T; /** * Border width * @since 9 - */ - borderWidth(value: EdgeWidths): T; + */ + borderWidth(value: EdgeWidths): T; /** * Border color * @since 7 - */ - borderColor(value: ResourceColor): T; + */ + borderColor(value: ResourceColor): T; /** * Border color * @since 9 - */ - borderColor(value: EdgeColors): T; + */ + borderColor(value: EdgeColors): T; /** * Border radius * @since 7 - */ - borderRadius(value: Length): T; + */ + borderRadius(value: Length): T; /** * Border radius * @since 9 - */ - borderRadius(value: BorderRadiuses): T; + */ + borderRadius(value: BorderRadiuses): T; /** * Border image * @since 9 - */ - borderImage(value: BorderImageOption): T; + */ + borderImage(value: BorderImageOption): T; /** * Trigger a click event when a click is clicked. * @since 7 - */ - onClick(event: (event?: ClickEvent) => void): T; + */ + onClick(event: (event?: ClickEvent) => void): T; /** * Trigger a mouse hover event. * @since 8 - */ - onHover(event: (isHover?: boolean) => void): T; + */ + onHover(event: (isHover?: boolean) => void): T; /** * Set hover effect. * @since 8 - */ - hoverEffect(value: HoverEffect): T; + */ + hoverEffect(value: HoverEffect): T; /** * Trigger a mouse event. * @since 8 - */ - onMouse(event: (event?: MouseEvent) => void): T; + */ + onMouse(event: (event?: MouseEvent) => void): T; /** * Trigger a touch event when touched. * @since 7 - */ - onTouch(event: (event?: TouchEvent) => void): T; + */ + onTouch(event: (event?: TouchEvent) => void): T; /** * Keyboard input * @since 7 - */ - onKeyEvent(event: (event?: KeyEvent) => void): T; + */ + onKeyEvent(event: (event?: KeyEvent) => void): T; /** * Set focusable. * @since 8 - */ - focusable(value: boolean): T; + */ + focusable(value: boolean): T; /** * Trigger a event when got focus. * @since 8 - */ - onFocus(event: () => void): T; + */ + onFocus(event: () => void): T; /** * Trigger a event when lose focus. * @since 8 - */ - onBlur(event: () => void): T; + */ + onBlur(event: () => void): T; /** * Set focus index by key tab. * @since 9 - */ - tabIndex(index: number): T; + */ + tabIndex(index: number): T; /** * Set default focused component when a page create. * @since 9 - */ - defaultFocus(value: boolean): T; + */ + defaultFocus(value: boolean): T; /** * Set default focused component when focus on a focus group. * @since 9 - */ - groupDefaultFocus(value: boolean): T; + */ + groupDefaultFocus(value: boolean): T; /** * Set a component focused when the component be touched. * @since 9 - */ - focusOnTouch(value: boolean): T; + */ + focusOnTouch(value: boolean): T; /** * animation * @since 7 - */ - animation(value: AnimateParam): T; + */ + animation(value: AnimateParam): T; /** * Transition parameter * @since 7 - */ - transition(value: TransitionOptions): T; + */ + transition(value: TransitionOptions): T; /** * Bind gesture recognition. * gesture:Bound Gesture Type,mask:GestureMask; * @since 7 - */ - gesture(gesture: GestureType, mask?: GestureMask): T; + */ + gesture(gesture: GestureType, mask?: GestureMask): T; /** * Binding Preferential Recognition Gestures * gesture:Bound Gesture Type,mask:GestureMask; * @since 7 - */ - priorityGesture(gesture: GestureType, mask?: GestureMask): T; + */ + priorityGesture(gesture: GestureType, mask?: GestureMask): T; /** * Binding gestures that can be triggered simultaneously with internal component gestures * gesture:Bound Gesture Type,mask:GestureMask; * @since 7 - */ - parallelGesture(gesture: GestureType, mask?: GestureMask): T; + */ + parallelGesture(gesture: GestureType, mask?: GestureMask): T; /** * Adds the content blurring effect for the current component. The input parameter is the blurring radius. * The larger the blurring radius, the more blurring the content. * If the value is 0, the content blurring effect is not blurring. * @since 7 - */ - blur(value: number): T; + */ + blur(value: number): T; /** * Adds a highlight effect to the current component. * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. * The component is displayed as all white (percentage). * @since 7 - */ - brightness(value: number): T; + */ + brightness(value: number): T; /** * Adds a contrast effect to the current component. The input parameter is the contrast value. * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * @since 7 - */ - contrast(value: number): T; + */ + contrast(value: number): T; /** * Adds a grayscale effect to the current component. * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) * @since 7 - */ - grayscale(value: number): T; + */ + grayscale(value: number): T; /** * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * @since 7 - */ - colorBlend(value: Color | string | Resource): T; + */ + colorBlend(value: Color | string | Resource): T; /** * Adds a saturation effect to the current component. @@ -1543,188 +1550,189 @@ declare class CommonMethod { * The larger the color-containing component, the greater the saturation. * The larger the achromatic component, the smaller the saturation. (Percentage) * @since 7 - */ - saturate(value: number): T; + */ + saturate(value: number): T; /** * Converts the image to sepia. Value defines the scale of the conversion. * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * @since 7 - */ - sepia(value: number): T; + */ + sepia(value: number): T; /** - * Inverts the input image. Value defines the scale of the conversion. 100% of the value is a complete reversal. + * Invert the input image. Value defines the scale of the conversion. 100% of the value is a complete reversal. * A value of 0% does not change the image. (Percentage) * @since 7 - */ - invert(value: number): T; + */ + invert(value: number): T; /** * Adds the hue rotation effect to the current component. * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. * If the value exceeds 360deg, the image is circled again. * @since 7 - */ - hueRotate(value: number | string): T; + */ + hueRotate(value: number | string): T; /** * Adds the background blur effect for the current component. The input parameter is the blur radius. * The larger the blur radius, the more blurred the background. If the value is 0, the background blur is not blurred. * @since 7 - */ - backdropBlur(value: number): T; + */ + backdropBlur(value: number): T; /** * Sets the translation effect during page transition. * The value is the start point of entry and end point of exit. * When this parameter is set together with slide, slide takes effect by default. * @since 7 - */ - translate(value: TranslateOptions): 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: ScaleOptions): 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. * @since 7 - */ - gridSpan(value: number): T; + */ + gridSpan(value: number): T; /** * The default offset column number indicates the number of offset columns of the current component in the start direction of the parent component when the useSizeType attribute does not set the offset of the corresponding dimension. That is, * the current component is located in the nth column. * @since 7 - */ - gridOffset(value: number): T; + */ + gridOffset(value: number): T; /** * Sets the rotation effect during assembly transition. * The values are the start point during insertion and the end point during deletion. * @since 7 - */ - rotate(value: RotateOptions): T; + */ + rotate(value: RotateOptions): T; /** * Sets the transformation matrix for the current component. * @since 7 - */ - transform(value: object): T; + */ + transform(value: object): T; /** * This callback is triggered when a component mounts a display. * @since 7 - */ - onAppear(event: () => void): T; + */ + onAppear(event: () => void): T; /** * This callback is triggered when component uninstallation disappears. * @since 7 - */ - onDisAppear(event: () => void): T; + */ + onDisAppear(event: () => void): T; /** * This callback is triggered when the size or position of this component change finished. * @param event event callback. * @since 8 - */ - onAreaChange(event: (oldValue: Area, newValue: Area) => void): T; + */ + onAreaChange(event: (oldValue: Area, newValue: Area) => void): T; /** * Controls the display or hide of the current component. * @since 7 - */ - visibility(value: Visibility): T; + */ + visibility(value: Visibility): T; /** * The percentage of the remaining space of the Flex container allocated to the component on which this property resides. * @since 7 - */ - flexGrow(value: number): T; + */ + flexGrow(value: number): T; /** * The proportion of the Flex container compression size assigned to the component on which this attribute resides. * @since 7 - */ - flexShrink(value: number): T; + */ + flexShrink(value: number): T; /** * The base dimension of the assembly on which this attribute is located in the direction of the principal axis in the Flex container. * @since 7 - */ - flexBasis(value: number | string): T; + */ + flexBasis(value: number | string): T; /** * Overrides the default configuration of alignItems in the Flex Layout container. * @since 7 - */ - alignSelf(value: ItemAlign): T; + */ + alignSelf(value: ItemAlign): T; /** * Sets the current component and displays the priority in the layout container. This parameter is valid only in Row, Column, and Flex single-row layouts. * @since 7 - */ - displayPriority(value: number): T; + */ + displayPriority(value: number): T; /** * The sibling components in the same container are hierarchically displayed. A larger value of z indicates a higher display level. * @since 7 - */ - zIndex(value: number): T; + */ + zIndex(value: number): T; /** * 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?: sharedTransitionOptions): T; + */ + sharedTransition(id: string, options?: sharedTransitionOptions): T; /** * Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|). * @since 7 - */ - direction(value: Direction): T; + */ + direction(value: Direction): T; /** * align * @since 7 - */ - align(value: Alignment): T; + */ + align(value: Alignment): T; /** * position * @since 7 - */ - position(value: Position): T; + */ + position(value: Position): T; /** * Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element. * @since 7 - */ - markAnchor(value: Position): T; + */ + markAnchor(value: Position): T; /** * Coordinate offset relative to the layout completion position. * Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing. * @since 7 - */ - offset(value: Position): T; + */ + offset(value: Position): T; /** * If the value is true, the component is available and can respond to operations such as clicking. * If it is set to false, click operations are not responded. * @since 7 - */ - enabled(value: boolean): T; + */ + enabled(value: boolean): T; /** * Sets the number of occupied columns and offset columns for a specific device width type. * @since 7 - */ - useSizeType(value: { + */ + useSizeType(value: { + xs?: number | { span: number; offset: number }; sm?: number | { span: number; offset: number }; md?: number | { span: number; offset: number }; @@ -1734,59 +1742,60 @@ declare class CommonMethod { /** * Specifies the alignRules of relative container * @since 9 - */ - alignRules(value: AlignRuleOption): T; + */ + alignRules(value: AlignRuleOption): T; /** * Specifies the aspect ratio of the current component. * @since 7 - */ - aspectRatio(value: number): T; + */ + aspectRatio(value: number): T; /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. * (To be triggered, press and hold for 170 milliseconds (ms)) * @since 8 - */ - onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): T; + */ + onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): T; /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @since 8 - */ - onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T; + */ + onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T; /** * After binding, a callback is triggered when the drag moves within the range of a placeable component. * @since 8 - */ - onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T; + */ + onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T; /** * After binding, a callback is triggered when the component is dragged out of the component range. * @since 8 - */ - onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T; + */ + onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T; /** * The component bound to this event can be used as the drag release target. * This callback is triggered when the drag behavior is stopped within the scope of the component. * @since 8 - */ - onDrop(event: (event?: DragEvent, extraParams?: string) => void): T; + */ + onDrop(event: (event?: DragEvent, extraParams?: string) => void): T; /** * Add mask text to the current component. The layout is the same as that of the current component. * @since 7 - */ - overlay(value: string, options?: { align?: Alignment; offset?: { x?: number; y?: number } }): T; + */ + overlay(value: string, options?: { align?: Alignment; offset?: { x?: number; y?: number } }): T; /** * Linear Gradient * angle: Angle of Linear Gradient; direction:Direction of Linear Gradient; colors:Color description for gradients,repeating:repeating. * @since 7 - */ - linearGradient(value: { + */ + linearGradient(value: { + angle?: number | string; direction?: GradientDirection; colors: Array; @@ -1803,8 +1812,9 @@ declare class CommonMethod { * colors:Color description for gradients * repeating:repeating * @since 7 - */ - sweepGradient(value: { + */ + sweepGradient(value: { + center: Array; start?: number | string; end?: number | string; @@ -1820,24 +1830,25 @@ declare class CommonMethod { * colors:Color description for gradients * repeating: Refill * @since 7 - */ - radialGradient(value: { center: Array; radius: number | string; colors: Array; repeating?: boolean }): T; + */ + radialGradient(value: { center: Array; radius: number | string; colors: Array; repeating?: boolean }): T; /** * Set the motion path of the component * path:Motion path for displacement animation, using the svg path string. * from:Start point of the motion path. The default value is 0.0. * to:End point of the motion path. The default value is 1.0. - * rotatble:Whether to follow the path for rotation. + * rotatable:Whether to follow the path for rotation. * @since 7 - */ - motionPath(value: MotionPathOptions): T; + */ + motionPath(value: MotionPathOptions): T; /** * Add a shadow effect to the current component * @since 7 - */ - shadow(value: { + */ + shadow(value: { + radius: number | Resource; color?: Color | string | Resource; offsetX?: number | Resource; @@ -1848,70 +1859,70 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * @since 7 - */ - clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T; + */ + clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T; /** * Applies a mask of the specified shape to the current assembly. * @since 7 - */ - mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T; + */ + mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T; /** * Key. User can set an key to the component to identify it. * @since 8 * @systemapi * @test - */ - key(value: string): T; + */ + key(value: string): T; /** * Id. User can set an id to the component to identify it. * @since 8 - */ - id(value: string): T; + */ + id(value: string): T; /** * geometryTransition * @since 7 - */ - geometryTransition(id: string): T; + */ + geometryTransition(id: string): T; /** * Popup control * @since 7 - */ - bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T; + */ + bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T; /** * Menu control * @since 7 - */ - bindMenu(content: { value: string; action: () => void }[] | CustomBuilder): T; + */ + bindMenu(content: { value: string; action: () => void }[] | CustomBuilder): T; /** * ContextMenu control * @since 8 - */ - bindContextMenu(content: CustomBuilder, responseType: ResponseType): T; + */ + bindContextMenu(content: CustomBuilder, responseType: ResponseType): T; /** * Sets styles for component state. * @since 8 - */ - stateStyles(value: StateStyles): T; + */ + stateStyles(value: StateStyles): T; /** - * id for distrubte identification. + * id for distribute identification. * @since 8 - */ - restoreId(value: number): T; + */ + restoreId(value: number): T; /** * Trigger a visible area change event. * @since 9 - */ - onVisibleAreaChange(ratios: Array, event: (isVisible: boolean, currentRatio: number) => void): T; + */ + onVisibleAreaChange(ratios: Array, event: (isVisible: boolean, currentRatio: number) => void): T; } /** @@ -1925,7 +1936,7 @@ declare class CommonAttribute extends CommonMethod {} * @since 7 */ interface CommonInterface { - (): CommonAttribute; + (): CommonAttribute; } /** @@ -1951,78 +1962,78 @@ declare type CustomBuilder = (() => any) | void; * @since 7 */ declare class CommonShapeMethod extends CommonMethod { - /** + /** * constructor. * @since 7 - * @syetemapi + * @systemapi */ - constructor(); + constructor(); /** * border Color * @since 7 - */ - stroke(value: ResourceColor): T; + */ + stroke(value: ResourceColor): T; /** * Fill color. * @since 7 - */ - fill(value: ResourceColor): T; + */ + fill(value: ResourceColor): T; /** * Offset from the start point of the border drawing. * @since 7 - */ - strokeDashOffset(value: number | string): T; + */ + strokeDashOffset(value: number | string): T; /** * Path endpoint drawing style. * @since 7 - */ - strokeLineCap(value: LineCapStyle): T; + */ + strokeLineCap(value: LineCapStyle): T; /** * Border corner drawing style. * @since 7 - */ - strokeLineJoin(value: LineJoinStyle): T; + */ + strokeLineJoin(value: LineJoinStyle): T; /** * Limits for drawing acute angles as bevels * @since 7 - */ - strokeMiterLimit(value: number | string): T; + */ + strokeMiterLimit(value: number | string): T; /** * Sets the opacity of the border. * @since 7 - */ - strokeOpacity(value: number | string | Resource): T; + */ + strokeOpacity(value: number | string | Resource): T; /** * fill Opacity * @since 7 - */ - fillOpacity(value: number | string | Resource): T; + */ + fillOpacity(value: number | string | Resource): T; /** * Sets the width of the dividing line. * @since 7 - */ - strokeWidth(value: Length): T; + */ + strokeWidth(value: Length): T; /** * Indicates whether to enable anti-aliasing * @since 7 - */ - antiAlias(value: boolean): T; + */ + antiAlias(value: boolean): T; /** * Sets the gap for the border. * @since 7 - */ - strokeDashArray(value: Array): T; + */ + strokeDashArray(value: Array): T; } /** @@ -2030,9 +2041,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 9 */ declare interface LayoutBorderInfo { - borderWidth: EdgeWidths, - margin: Margin, - padding: Padding, + borderWidth: EdgeWidths, + margin: Margin, + padding: Padding, } /** @@ -2040,8 +2051,8 @@ declare interface LayoutBorderInfo { * @since 9 */ declare interface LayoutInfo { - position: Position, - constraint: ConstraintSizeOptions, + position: Position, + constraint: ConstraintSizeOptions, } /** @@ -2049,47 +2060,47 @@ declare interface LayoutInfo { * @since 9 */ declare interface LayoutChild { - /** + /** * Sub component name. * @since 9 */ - name: string, + name: string, /** * Sub component id. * @since 9 - */ - id: string, + */ + id: string, /** * Sub component constraint. * @since 9 - */ - constraint: ConstraintSizeOptions, + */ + constraint: ConstraintSizeOptions, /** * Sub component border info. * @since 9 - */ - borderInfo: LayoutBorderInfo, + */ + borderInfo: LayoutBorderInfo, /** * Sub component position. * @since 9 - */ - position: Position, + */ + position: Position, /** * Call this measure method in onMeasure callback to supply sub component size. * @since 9 - */ - measure(childConstraint: ConstraintSizeOptions), + */ + measure(childConstraint: ConstraintSizeOptions), /** * Call this layout method in onLayout callback to assign layout info to sub component. * @since 9 - */ - layout(childLayoutInfo: LayoutInfo) + */ + layout(childLayoutInfo: LayoutInfo) } /** @@ -2102,60 +2113,60 @@ declare interface LayoutChild { * @since 9 */ declare class CustomComponent extends CommonAttribute { - /** + /** * Customize the pop-up content constructor. * @since 7 */ - build(): void; + build(): void; /** * aboutToAppear Method * @since 7 - */ - aboutToAppear?(): void; + */ + aboutToAppear?(): void; /** * aboutToDisappear Method * @since 7 - */ - aboutToDisappear?(): void; + */ + aboutToDisappear?(): void; /** * Custom component override this method to layout each of its sub components. * @since 9 - */ - onLayout?(children: Array, constraint: ConstraintSizeOptions): void; + */ + onLayout?(children: Array, constraint: ConstraintSizeOptions): void; /** * Custom component override this method to measure each of its sub components. * @since 9 - */ - onMeasure?(children: Array, constraint: ConstraintSizeOptions): void; + */ + onMeasure?(children: Array, constraint: ConstraintSizeOptions): void; /** * onPageShow Method * @since 7 - */ - onPageShow?(): void; + */ + onPageShow?(): void; /** * onPageHide Method * @since 7 - */ - onPageHide?(): void; + */ + onPageHide?(): void; /** * onBackPress Method * @since 7 - */ - onBackPress?(): void; + */ + onBackPress?(): void; /** * PageTransition Method. * Implement Animation when enter this page or move to other pages. * @since 9 - */ - pageTransition?(): void; + */ + pageTransition?(): void; } /** @@ -2165,13 +2176,13 @@ declare class CustomComponent extends CommonAttribute { * @since 7 */ declare class View { - /** + /** * Just use for generate tsbundle - * @ignore ide should ignore this arrtibute + * @ignore ide should ignore this attribute * @systemapi * @since 7 */ - create(value: any): any; + create(value: any): any; } declare module "SpecialEvent" { diff --git a/api/@internal/component/ets/common_ts_ets_api.d.ts b/api/@internal/component/ets/common_ts_ets_api.d.ts index a1c780576a00adda899a4b44b1e7dbc8575b1b27..f3d71e1d1ceb3e04d32152ea005aee017a89d46e 100644 --- a/api/@internal/component/ets/common_ts_ets_api.d.ts +++ b/api/@internal/component/ets/common_ts_ets_api.d.ts @@ -18,91 +18,91 @@ * @since 7 */ declare class AppStorage { - /** + /** * Called when a link is set. * @since 7 */ - static Link(propName: string): any; + static Link(propName: string): any; /** * Called when a hyperlink is set. * @since 7 - */ - static SetAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty; + */ + static SetAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty; /** * Called when a property is set. * @since 7 - */ - static Prop(propName: string): any; + */ + static Prop(propName: string): any; /** * Called when dynamic properties are set. * @since 7 - */ - static SetAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty; + */ + static SetAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty; /** * Called when owning or not. * @since 7 - */ - static Has(propName: string): boolean; + */ + static Has(propName: string): boolean; /** * Called when data is obtained. * @since 7 - */ - static Get(propName: string): T | undefined; + */ + static Get(propName: string): T | undefined; /** * Called when setting. * @since 7 - */ - static Set(propName: string, newValue: T): boolean; + */ + static Set(propName: string, newValue: T): boolean; /** * Called when setting or creating. * @since 7 - */ - static SetOrCreate(propName: string, newValue: T): void; + */ + static SetOrCreate(propName: string, newValue: T): void; /** * Called when a deletion is made. * @since 7 - */ - static Delete(propName: string): boolean; + */ + static Delete(propName: string): boolean; /** * Called when a dictionary is sorted. * @since 7 - */ - static Keys(): IterableIterator; + */ + static Keys(): IterableIterator; /** * Called when a cleanup occurs. * @since 7 * @deprecated since 9 * @useinstead AppStorage.Clear - */ - static staticClear(): boolean; + */ + static staticClear(): boolean; /** * Called when a cleanup occurs. * @since 9 - */ - static Clear(): boolean; + */ + static Clear(): boolean; /** * Called when the data can be changed. * @since 7 - */ - static IsMutable(propName: string): boolean; + */ + static IsMutable(propName: string): boolean; /** * Called when you check how much data is stored. * @since 7 - */ - static Size(): number; + */ + static Size(): number; } /** @@ -111,32 +111,32 @@ declare class AppStorage { * @systemapi */ declare abstract class SubscribedAbstractProperty { - /** + /** * Setting Subscribers. * @since 7 * @systemapi */ - protected subscribers_: Set; + protected subscribers_: Set; /** * Private user ID. * @since 7 * @systemapi - */ - private id_; + */ + private id_; /** * Private user information. * @since 7 * @systemapi - */ - private info_?; + */ + private info_?; /** * @since 7 * @systemapi - */ - constructor( + */ + constructor( /** * Subscriber IPropertySubscriber. * @since 7 @@ -149,77 +149,77 @@ declare abstract class SubscribedAbstractProperty { * @systemapi */ info?: string, - ); + ); /** * Called when the subscriber ID is entered. * @since 7 * @systemapi - */ - id(): number; + */ + id(): number; /** * Called when a subscriber information description is entered. * @since 7 * @systemapi - */ - info(): string; + */ + info(): string; /** * Called when data is obtained. * @since 7 * @systemapi - */ - abstract get(): T; + */ + abstract get(): T; /** * Called when data is created. * @since 7 * @systemapi - */ - abstract set(newValue: T): void; + */ + abstract set(newValue: T): void; /** * Called when a two-way synchronization is created. * @since 7 * @systemapi - */ - createTwoWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyTwoWay; + */ + createTwoWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyTwoWay; /** * Called when a one-way synchronization is created. * @since 7 * @systemapi - */ - createOneWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyOneWay; + */ + createOneWaySync(subscribeMe?: IPropertySubscriber, info?: string): SyncedPropertyOneWay; /** * Called when the subscriber is unlinked. * @since 7 * @systemapi - */ - unlinkSuscriber(subscriberId: number): void; + */ + unlinkSuscriber(subscriberId: number): void; /** * Called when the notification has changed. * @since 7 * @systemapi - */ - protected notifyHasChanged(newValue: T): void; + */ + protected notifyHasChanged(newValue: T): void; /** * Called when the notification property is read. * @since 7 * @systemapi - */ - protected notifyPropertyRead(): void; + */ + protected notifyPropertyRead(): void; /** * Called when the number of users is queried. * @since 7 * @systemapi - */ - numberOfSubscrbers(): number; + */ + numberOfSubscrbers(): number; } /** @@ -228,19 +228,19 @@ declare abstract class SubscribedAbstractProperty { * @systemapi */ interface IPropertySubscriber { - /** + /** * Called when the ID of the property subscriber is queried. * @since 7 * @systemapi */ - id(): number; + id(): number; /** * Provides a single attribute change user interface. * @since 7 * @systemapi - */ - aboutToBeDeleted(owningView?: IPropertySubscriber): void; + */ + aboutToBeDeleted(owningView?: IPropertySubscriber): void; } /** @@ -249,48 +249,48 @@ interface IPropertySubscriber { * @systemapi */ declare class SyncedPropertyTwoWay extends SubscribedAbstractProperty - implements ISinglePropertyChangeSubscriber { - /** + implements ISinglePropertyChangeSubscriber { + /** * Sources of synchronization attributes bidirectionally. * @since 7 * @systemapi */ - private source_; + private source_; /** * constructor parameters. * @since 7 * @systemapi - */ - constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string); + */ + constructor(source: SubscribedAbstractProperty, subscribeMe?: IPropertySubscriber, info?: string); /** * Called when processing information about to be deleted. * @since 7 * @systemapi - */ - aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void; + */ + aboutToBeDeleted(unsubscribeMe?: IPropertySubscriber): void; /** * Information Changed. * @since 7 * @systemapi - */ - hasChanged(newValue: T): void; + */ + hasChanged(newValue: T): void; /** * Called when data is obtained. * @since 7 * @systemapi - */ - get(): T; + */ + get(): T; /** * Called when data is created. * @since 7 * @systemapi - */ - set(newValue: T): void; + */ + set(newValue: T): void; } /** @@ -356,94 +356,87 @@ declare class SyncedPropertyOneWay extends SubscribedAbstractProperty * @systemapi */ interface ISinglePropertyChangeSubscriber extends IPropertySubscriber { - /** + /** * Provides a single attribute change user interface. * @since 7 * @systemapi */ - hasChanged(newValue: T): void; + hasChanged(newValue: T): void; } /** * Defines the Subscribale base class. * @since 7 * @systemapi - * @hide - */ -declare abstract class SubscribaleAbstract { - /** - * Returns the ownership attribute set by the. - * @since 7 - * @systemapi - * @hide - */ - private owningProperties_: Set; + */ + declare abstract class SubscribaleAbstract { + /** + * Returns the ownership attribute set by the. + * @since 7 + * @systemapi + */ + private owningProperties_: Set; /** * Constructor. * @since 7 * @systemapi - * @hide - */ - constructor(); + */ + constructor(); /** * Called when the notification property has changed. * @since 7 * @systemapi - * @hide - */ - protected notifyPropertyHasChanged(propName: string, newValue: any): void; + */ + protected notifyPropertyHasChanged(propName: string, newValue: any): void; /** * Called when adding an already owned property. * @since 7 * @systemapi - * @hide - */ - public addOwningProperty(subscriber: IPropertySubscriber): void; + */ + public addOwningProperty(subscriber: IPropertySubscriber): void; /** * Called when an already owned property is deleted. * @since 7 * @systemapi - * @hide - */ - public removeOwningProperty(property: IPropertySubscriber): void; + */ + public removeOwningProperty(property: IPropertySubscriber): void; /** * Called when an already owned property is deleted by ID * @since 7 * @systemapi - * @hide - */ - public removeOwningPropertyById(subscriberId: number): void; -} + */ + public removeOwningPropertyById(subscriberId: number): void; + } /** * Defines the Environment interface. * @since 7 */ declare class Environment { - /** + /** * Constructor. * @since 7 * @systemapi - * @hide - */ - constructor(); + */ + constructor(); /** * Called when a property value is checked. * @since 7 - */ - static EnvProp(key: string, value: S): boolean; + */ + static EnvProp(key: string, value: S): boolean; /** * Called when multiple property values are checked. * @since 7 - */ - static EnvProps( + */ + static EnvProps( + props: { key: string; defaultValue: any; @@ -453,8 +446,8 @@ declare class Environment { /** * Set the key value. * @since 7 - */ - static Keys(): Array; + */ + static Keys(): Array; } /** @@ -462,31 +455,31 @@ declare class Environment { * @since 7 */ declare class PersistentStorage { - /** + /** * Constructor parameters. * @since 7 * @systemapi - * @hide - */ - constructor(appStorage: AppStorage, storage: Storage); + */ + constructor(appStorage: AppStorage, storage: Storage); /** * Called when a persistence property is stored. * @since 7 - */ - static PersistProp(key: string, defaultValue: T): void; + */ + static PersistProp(key: string, defaultValue: T): void; /** * Called when a property is deleted. * @since 7 - */ - static DeleteProp(key: string): void; + */ + static DeleteProp(key: string): void; /** * Called when multiple persistence properties are stored. * @since 7 - */ - static PersistProps( + */ + static PersistProps( + properties: { key: string; defaultValue: any; @@ -496,108 +489,107 @@ declare class PersistentStorage { /** * Set the key value. * @since 7 - */ - static Keys(): Array; + */ + static Keys(): Array; } /** * Used for ide. * @since 7 * @systemapi - * @hide - */ -declare const appStorage: AppStorage; + */ + declare const appStorage: AppStorage; /** * Define LocalStorage. * @since 9 */ declare class LocalStorage { - /** + /** * Constructor. * @since 9 */ - constructor(initializingProperties?: Object); + constructor(initializingProperties?: Object); /** * Get current LocalStorage shared from stage. * @StageModelOnly * @since 9 - */ - static GetShared(): LocalStorage; + */ + static GetShared(): LocalStorage; /** - * Return true if prooperty with given name exists + * Return true if property with given name exists * @since 9 - */ - has(propName: string): boolean; + */ + has(propName: string): boolean; /** * Return a Map Iterator * @since 9 - */ - keys(): IterableIterator; + */ + keys(): IterableIterator; /** * Return number of properties * @since 9 - */ - size(): number; + */ + size(): number; /** * Return value of given property * @since 9 - */ - get(propName: string): T; + */ + get(propName: string): T; /** * Set value of given property * @since 9 - */ - set(propName: string, newValue: T): boolean; + */ + set(propName: string, newValue: T): boolean; /** * Add property if not property with given name * @since 9 - */ - setOrCreate(propName: string, newValue?: T): boolean; + */ + setOrCreate(propName: string, newValue?: T): boolean; /** * Create and return a 'link' (two-way sync) to named property * @since 9 - */ - link(propName: string, linkUser?: T, subscribersName?: string): T; + */ + link(propName: string, linkUser?: T, subscribersName?: string): T; /** * Like link(), will create and initialize a new source property in LocalStorge if missing * @since 9 - */ - setAndLink(propName: string, defaultValue: T, linkUser?: T, subscribersName?: string): T; + */ + setAndLink(propName: string, defaultValue: T, linkUser?: T, subscribersName?: string): T; /** * Create and return a 'prop' (one-way sync) to named property * @since 9 - */ - prop(propName: string, propUser?: T, subscribersName?: string): T; + */ + prop(propName: string, propUser?: T, subscribersName?: string): T; /** * Like prop(), will create and initialize a new source property in LocalStorage if missing * @since 9 - */ - setAndProp(propName: string, defaultValue: T, propUser?: T, subscribersName?: string): T; - + */ + setAndProp(propName: string, defaultValue: T, propUser?: T, subscribersName?: string): T; + /** * Delete property from StorageBase * @since 9 * @returns false if method failed - */ - delete(propName: string): boolean; + */ + delete(propName: string): boolean; /** * Delete all properties from the StorageBase * @since 9 - */ - clear(): boolean; + */ + clear(): boolean; } declare module "StateManagement" { diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index c0686ea814e4b35b9b29656c644f81941aa2951e..32e8d33259f81da5ecfc955922c2a9113a3d2ca1 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -19,47 +19,47 @@ * @since 7 */ declare interface CustomDialogControllerOptions { - /** + /** * Custom builder function. * @since 7 */ - builder: any; + builder: any; /** * Defines the cancel function. * @since 7 - */ - cancel?: () => void; + */ + cancel?: () => void; /** * Defines if use auto cancel when click on the outside of the dialog. * @since 7 - */ - autoCancel?: boolean; + */ + autoCancel?: boolean; /** * Defines the dialog alignment of the screen. * @since 7 - */ - alignment?: DialogAlignment; + */ + alignment?: DialogAlignment; /** * Defines the dialog offset. * @since 7 - */ - offset?: Offset; + */ + offset?: Offset; /** - * Defines if use costom style. + * Defines if use custom style. * @since 7 - */ - customStyle?: boolean; + */ + customStyle?: boolean; /** * Grid count of dialog. * @since 8 - */ - gridCount?: number; + */ + gridCount?: number; } /** @@ -67,21 +67,21 @@ declare interface CustomDialogControllerOptions { * @since 7 */ declare class CustomDialogController { - /** + /** * The constructor transfers parameter settings. * @since 7 */ - constructor(value: CustomDialogControllerOptions); + constructor(value: CustomDialogControllerOptions); /** * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. * @since 7 - */ - open(); + */ + open(); /** * Closes the custom pop-up window. If the window is closed, the window does not take effect. * @since 7 - */ - close(); + */ + close(); } diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index 4485ed6929a68744047ec61af4e3feaa89f775ff..20eddd136b5696abed8687be6fed243d40bb56a4 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -18,77 +18,77 @@ * @since 7 */ declare enum Color { - /** + /** * White. * @since 7 */ - White, + White, /** * Black. * @since 7 - */ - Black, + */ + Black, /** * Blue. * @since 7 - */ - Blue, + */ + Blue, /** * Brown. * @since 7 - */ - Brown, + */ + Brown, /** * Gray. * @since 7 - */ - Gray, + */ + Gray, /** * Green. * @since 7 - */ - Green, + */ + Green, /** * Grey. * @since 7 - */ - Grey, + */ + Grey, /** * Orange. * @since 7 - */ - Orange, + */ + Orange, /** * color. * @since 7 - */ - Pink, + */ + Pink, /** * Red. * @since 7 - */ - Red, + */ + Red, /** * Yellow. * @since 7 - */ - Yellow, + */ + Yellow, /** * Transparent. * @since 9 - */ - Transparent, + */ + Transparent, } /** @@ -96,41 +96,41 @@ declare enum Color { * @since 7 */ declare enum ImageFit { - /** + /** * Keep the aspect ratio to zoom out or zoom in so that the image is completely displayed within the display boundary. * @since 7 */ - Contain, + Contain, /** * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the display boundary. * @since 7 - */ - Cover, + */ + Cover, /** * Adaptive display * @since 7 - */ - Auto, + */ + Auto, /** * Zoom in or out without maintaining the aspect ratio so that the image fills the display boundary. * @since 7 - */ - Fill, + */ + Fill, /** * Keep the aspect ratio displayed, and the image zooms out or remains unchanged. * @since 7 - */ - ScaleDown, + */ + ScaleDown, /** * Keep the original size and display it in the center. * @since 7 - */ - None, + */ + None, } /** @@ -138,23 +138,23 @@ declare enum ImageFit { * @since 7 */ declare enum BorderStyle { - /** + /** * Displays as a series of dots with a radius of half the borderWidth. * @since 7 */ - Dotted, + Dotted, /** * Shows as a series of short square dashed lines. * @since 7 - */ - Dashed, + */ + Dashed, /** * Shows as a solid line. * @since 7 - */ - Solid, + */ + Solid, } /** @@ -162,23 +162,23 @@ declare enum BorderStyle { * @since 7 */ declare enum LineJoinStyle { - /** + /** * Connect path segments using bevels. * @since 7 */ - Miter, + Miter, /** * Connect path segments using sharp corners. * @since 7 - */ - Round, + */ + Round, /** * Connect path segments using fillets. * @since 7 - */ - Bevel, + */ + Bevel, } /** @@ -186,29 +186,29 @@ declare enum LineJoinStyle { * @since 7 */ declare enum TouchType { - /** + /** * Triggered when the finger is pressed. * @since 7 */ - Down, + Down, /** * Triggered when the finger is raised. * @since 7 - */ - Up, + */ + Up, /** * Triggered when the finger presses on the screen. * @since 7 - */ - Move, + */ + Move, /** * Triggers when the touch event cancels. * @since 7 - */ - Cancel, + */ + Cancel, } /** @@ -216,41 +216,41 @@ declare enum TouchType { * @since 8 */ declare enum MouseButton { - /** + /** * Mouse Left Button. * @since 8 */ - Left, + Left, /** * Mouse Right Button. * @since 8 - */ - Right, + */ + Right, /** * Mouse Middle Button. * @since 8 - */ - Middle, + */ + Middle, /** * Mouse Back Button. * @since 8 - */ - Back, + */ + Back, /** * Mouse Forward Button. * @since 8 - */ - Forward, + */ + Forward, /** * Mouse None Button. * @since 8 - */ - None, + */ + None, } /** @@ -258,29 +258,29 @@ declare enum MouseButton { * @since 8 */ declare enum MouseAction { - /** + /** * Triggered when the mouse is pressed. * @since 8 */ - Press, + Press, /** * Triggered when the mouse is released. * @since 8 - */ - Release, + */ + Release, /** * Triggered when the mouse is Moved. * @since 8 - */ - Move, + */ + Move, /** * Triggered when the mouse is Hovered. * @since 8 - */ - Hover + */ + Hover } /** @@ -288,29 +288,29 @@ declare enum MouseAction { * @since 7 */ declare enum AnimationStatus { - /** + /** * Initial state of the animation. * @since 7 */ - Initial, + Initial, /** * The animation is playing. * @since 7 - */ - Running, + */ + Running, /** * The animation is paused. * @since 7 - */ - Paused, + */ + Paused, /** * The animation is stopped. * @since 7 - */ - Stopped, + */ + Stopped, } /** @@ -318,83 +318,83 @@ declare enum AnimationStatus { * @since 7 */ declare enum Curve { - /** + /** * Indicates that the speed of the animation is the same from start to finish. * @since 7 */ - Linear, + Linear, /** * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, CubicBezier(0.25, 0.1, 0.25, 1.0). * @since 7 - */ - Ease, + */ + Ease, /** * Indicates that the animation starts at a low speed, CubicBezier(0.42, 0.0, 1.0, 1.0). * @since 7 - */ - EaseIn, + */ + EaseIn, /** * Indicates that the animation ends at a low speed, CubicBezier(0.0, 0.0, 0.78, 1.0). * @since 7 - */ - EaseOut, + */ + EaseOut, /** * Indicates that the animation starts and ends at a slow speed, CubicBezier(0.42, 0.0, 0.78, 1.0). * @since 7 - */ - EaseInOut, + */ + EaseInOut, /** * Slow-in, fast-out * @since 7 - */ - FastOutSlowIn, + */ + FastOutSlowIn, /** * Linear Out Slow In * @since 7 - */ - LinearOutSlowIn, + */ + LinearOutSlowIn, /** - * Fast OutL inear In. + * Fast Out Linear In. * @since 7 - */ - FastOutLinearIn, + */ + FastOutLinearIn, /** * Extreme Deceleration. * @since 7 - */ - ExtremeDeceleration, + */ + ExtremeDeceleration, /** * Sharp. * @since 7 - */ - Sharp, + */ + Sharp, /** * Rhythm. * @since 7 - */ - Rhythm, + */ + Rhythm, /** * Smooth. * @since 7 - */ - Smooth, + */ + Smooth, /** * Damping curve, CubicBezier(0.2, 0.0, 0.2, 1.0). * @since 7 - */ - Friction, + */ + Friction, } /** @@ -402,29 +402,29 @@ declare enum Curve { * @since 7 */ declare enum FillMode { - /** + /** * Restores to the initial state after the playback is complete. * @since 7 */ - None, + None, /** * Retains the state at the end of the animation when the playback is complete. * @since 7 - */ - Forwards, + */ + Forwards, /** * Applies the start attribute value for the period specified by animation-delay before the animation is displayed. * @since 7 - */ - Backwards, + */ + Backwards, /** * Both forward and backward fill modes are applied. * @since 7 - */ - Both, + */ + Both, } /** @@ -432,29 +432,29 @@ declare enum FillMode { * @since 7 */ declare enum PlayMode { - /** + /** * The animation plays normally. * @since 7 */ - Normal, + Normal, /** * The animation plays backwards. * @since 7 - */ - Reverse, + */ + Reverse, /** * The animation plays forward on odd numbers (1, 3, 7...) and backward on even numbers (2, 4, 6...). * @since 7 - */ - Alternate, + */ + Alternate, /** * The animation plays backwards on odd numbers (1, 3, 7...) and forwards on even numbers (2, 4, 6...).. * @since 7 - */ - AlternateReverse, + */ + AlternateReverse, } /** @@ -462,17 +462,17 @@ declare enum PlayMode { * @since 7 */ declare enum KeyType { - /** + /** * Press the key. * @since 7 */ - Down, + Down, /** * The key is released. * @since 7 - */ - Up, + */ + Up, } /** @@ -480,17 +480,17 @@ declare enum KeyType { * @since 7 */ declare enum KeySource { - /** + /** * The input device type is unknown. * @since 7 */ - Unknown, + Unknown, /** * Set Device Type to Keyboard. * @since 7 - */ - Keyboard, + */ + Keyboard, } /** @@ -498,47 +498,47 @@ declare enum KeySource { * @since 7 */ declare enum Edge { - /** + /** * The top is centered horizontally. * @since 7 */ - Top, + Top, /** * Center horizontal and vertical. * @since 7 - */ - Center, + */ + Center, /** * The bottom is centered horizontally. * @since 7 - */ - Bottom, + */ + Bottom, /** * Cross axis direction text baseline alignment. * @since 7 - */ - Baseline, + */ + Baseline, /** * Align the head of the cross axis direction. * @since 7 - */ - Start, + */ + Start, /** * Middle * @since 7 - */ - Middle, + */ + Middle, /** * Align the head of the cross axis direction. * @since 7 - */ - End, + */ + End, } /** @@ -546,47 +546,47 @@ declare enum Edge { * @since 7 */ declare enum Week { - /** + /** * Monday. * @since 7 */ - Mon, + Mon, /** * Tuesday. * @since 7 - */ - Tue, + */ + Tue, /** * Wednesday. * @since 7 - */ - Wed, + */ + Wed, /** * Thursday. * @since 7 - */ - Thur, + */ + Thur, /** * Friday. * @since 7 - */ - Fri, + */ + Fri, /** * Saturday. * @since 7 - */ - Sat, + */ + Sat, /** * Sunday. * @since 7 - */ - Sun, + */ + Sun, } /** @@ -594,23 +594,23 @@ declare enum Week { * @since 7 */ declare enum Direction { - /** + /** * Elements are laid out from left to right. * @since 7 */ - Ltr, + Ltr, /** * Elements are laid out from right to left. * @since 7 - */ - Rtl, + */ + Rtl, /** * Use the default layout direction. * @since 7 - */ - Auto, + */ + Auto, } /** @@ -618,23 +618,23 @@ declare enum Direction { * @since 7 */ declare enum BarState { - /** + /** * Not displayed. * @since 7 */ - Off, + Off, /** * On-demand display (displayed when you touch it and disappears after 2 seconds). * @since 7 - */ - Auto, + */ + Auto, /** * Resident display. * @since 7 - */ - On, + */ + On, } /** @@ -642,23 +642,23 @@ declare enum BarState { * @since 7 */ declare enum EdgeEffect { - /** + /** * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. * @since 7 */ - Spring, + Spring, /** * Fade. * @since 7 - */ - Fade, + */ + Fade, /** * Sliding to the edge has no effect. * @since 7 - */ - None, + */ + None, } /** @@ -666,59 +666,59 @@ declare enum EdgeEffect { * @since 7 */ declare enum Alignment { - /** + /** * Top Start. * @since 7 */ - TopStart, + TopStart, /** * The top is centered horizontally. * @since 7 - */ - Top, + */ + Top, /** * Top tail end. * @since 7 - */ - TopEnd, + */ + TopEnd, /** * The starting end is centered longitudinally. * @since 7 - */ - Start, + */ + Start, /** * Center horizontal and vertical. * @since 7 - */ - Center, + */ + Center, /** * The tail end is centered longitudinally. * @since 7 - */ - End, + */ + End, /** * Bottom starting end. * @since 7 - */ - BottomStart, + */ + BottomStart, /** * The bottom is centered horizontally. * @since 7 - */ - Bottom, + */ + Bottom, /** * Bottom end. * @since 7 - */ - BottomEnd, + */ + BottomEnd, } /** @@ -726,23 +726,23 @@ declare enum Alignment { * @since 7 */ declare enum TransitionType { - /** + /** * Specifies that the current transition action takes effect in all change scenarios of the component. * @since 7 */ - All, + All, /** * Specifies the insertion scenario in which the current transition action takes effect. * @since 7 - */ - Insert, + */ + Insert, /** * Specifies the deletion scenario in which the current transition action takes effect. * @since 7 - */ - Delete, + */ + Delete, } /** @@ -750,17 +750,17 @@ declare enum TransitionType { * @since 7 */ declare enum RelateType { - /** + /** * Scales the current component to fill the parent component. * @since 7 */ - FILL, + FILL, /** * Scales the current component to fit the parent component. * @since 7 - */ - FIT, + */ + FIT, } /** @@ -768,23 +768,23 @@ declare enum RelateType { * @since 7 */ declare enum Visibility { - /** + /** * Show * @since 7 */ - Visible, + Visible, /** * Hide, but participate in layout for placeholder. * @since 7 - */ - Hidden, + */ + Hidden, /** * Hides but does not participate in layout and does not take place. * @since 7 - */ - None, + */ + None, } /** @@ -792,23 +792,23 @@ declare enum Visibility { * @since 7 */ declare enum LineCapStyle { - /** + /** * The two ends of the dividing line are parallel lines. * @since 7 */ - Butt, + Butt, /** * The two ends of the dividing line are semicircles. * @since 7 - */ - Round, + */ + Round, /** * Extends half a circle at the end of the path with a width equal to half the line width and a height equal to the line width. * @since 7 - */ - Square, + */ + Square, } /** @@ -816,17 +816,17 @@ declare enum LineCapStyle { * @since 7 */ declare enum Axis { - /** + /** * Longitudinal arrangement * @since 7 */ - Vertical, + Vertical, /** * Horizontal arrangement. * @since 7 - */ - Horizontal, + */ + Horizontal, } /** @@ -834,23 +834,23 @@ declare enum Axis { * @since 7 */ declare enum HorizontalAlign { - /** + /** * Aligns the start end in the language direction. * @since 7 */ - Start, + Start, /** * Center alignment. The default alignment mode is used. * @since 7 - */ - Center, + */ + Center, /** * Aligns the ends in the language direction. * @since 7 - */ - End, + */ + End, } /** @@ -858,50 +858,50 @@ declare enum HorizontalAlign { * @since 7 */ declare enum FlexAlign { - /** + /** * The element is aligned at the head of the principal axis, * the first element is aligned with the head of the row, and subsequent elements are aligned with the previous one. * @since 7 */ - Start, + Start, /** * The elements are centered in the direction of the principal axis, * and the first element is the same distance from the beginning of the row as the last element is from the end of the row. * @since 7 - */ - Center, + */ + Center, /** * The element is aligned at the tail of the principal axis, * the last element is aligned at the end of the row, and the other elements are aligned with the next. * @since 7 - */ - End, + */ + End, /** * Elastic elements are evenly distributed in the direction of the Flex principal axis, * with the same distance between adjacent elements. * The first element aligns with the beginning of the line, and the last element aligns with the end of the line. * @since 7 - */ - SpaceBetween, + */ + SpaceBetween, /** * Elastic elements are evenly distributed in the direction of the Flex principal axis, * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance between * the first element and the distance between the last element and the end of the row. * @since 7 - */ - SpaceAround, + */ + SpaceAround, /** * Elements in the Flex axis direction are evenly spaced. * The spacing between adjacent elements, the spacing between the first element and the beginning of the row, * and the spacing between the last element and the end of the row are the same. * @since 7 - */ - SpaceEvenly, + */ + SpaceEvenly, } /** @@ -909,41 +909,41 @@ declare enum FlexAlign { * @since 7 */ declare enum ItemAlign { - /** + /** * Use the default configuration in the Flex container. * @since 7 */ - Auto, + Auto, /** * The element is in the Flex container with the cross-axis direction head aligned. * @since 7 - */ - Start, + */ + Start, /** * The element is centered in the Flex container with the cross axis direction aligned. * @since 7 - */ - Center, + */ + Center, /** * The element is bottom aligned in the Flex container with the cross axis direction. * @since 7 - */ - End, + */ + End, /** * Element In the Flex container, the cross-axis direction text baseline is aligned. * @since 7 - */ - Baseline, + */ + Baseline, /** * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container size. * @since 7 - */ - Stretch, + */ + Stretch, } /** @@ -951,29 +951,29 @@ declare enum ItemAlign { * @since 7 */ declare enum FlexDirection { - /** + /** * The main axis is consistent with the row direction as the layout mode. * @since 7 */ - Row, + Row, /** * The main axis is consistent with the column direction as the layout mode. * @since 7 - */ - Column, + */ + Column, /** * The layout is in the opposite direction to the Row direction. * @since 7 - */ - RowReverse, + */ + RowReverse, /** * Layout in the opposite direction to the column. * @since 7 - */ - ColumnReverse, + */ + ColumnReverse, } /** @@ -981,23 +981,23 @@ declare enum FlexDirection { * @since 7 */ declare enum FlexWrap { - /** + /** * The Flex container has a single row/column layout of elements, and children are allowed to go beyond the container. * @since 7 */ - NoWrap, + NoWrap, /** * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to exceed the container. * @since 7 - */ - Wrap, + */ + Wrap, /** * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to exceed the container. * @since 7 - */ - WrapReverse, + */ + WrapReverse, } /** @@ -1005,23 +1005,23 @@ declare enum FlexWrap { * @since 7 */ declare enum VerticalAlign { - /** + /** * Top alignment. * @since 7 */ - Top, + Top, /** * Center alignment. The default alignment mode is used. * @since 7 - */ - Center, + */ + Center, /** * Bottom alignment. * @since 7 - */ - Bottom, + */ + Bottom, } /** @@ -1029,29 +1029,29 @@ declare enum VerticalAlign { * @since 7 */ declare enum ImageRepeat { - /** + /** * Do not draw the picture again. * @since 7 */ - NoRepeat, + NoRepeat, /** * Repeat the drawing only on the horizontal axis. * @since 7 - */ - X, + */ + X, /** * Repeat the drawing only on the vertical axis. * @since 7 - */ - Y, + */ + Y, /** * Draw the picture repeatedly on both axes. * @since 7 - */ - XY, + */ + XY, } /** @@ -1059,23 +1059,23 @@ declare enum ImageRepeat { * @since 7 */ declare enum ImageSize { - /** + /** * Keep the scale of the original image unchanged. * @since 7 */ - Auto, + Auto, /** * Default value. Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the display boundary. * @since 7 - */ - Cover, + */ + Cover, /** * Keep the aspect ratio to zoom out or zoom in so that the image is completely displayed within the display boundary. * @since 7 - */ - Contain, + */ + Contain, } /** @@ -1083,59 +1083,59 @@ declare enum ImageSize { * @since 7 */ declare enum GradientDirection { - /** + /** * Right to left. * @since 7 */ - Left, + Left, /** * From the bottom up. * @since 7 - */ - Top, + */ + Top, /** * From left to right. * @since 7 - */ - Right, + */ + Right, /** * From the top down. * @since 7 - */ - Bottom, + */ + Bottom, /** * Top Left * @since 7 - */ - LeftTop, + */ + LeftTop, /** * Left Bottom * @since 7 - */ - LeftBottom, + */ + LeftBottom, /** * Right Top * @since 7 - */ - RightTop, + */ + RightTop, /** * Right Bottom * @since 7 - */ - RightBottom, + */ + RightBottom, /** * None * @since 7 - */ - None, + */ + None, } /** @@ -1143,18 +1143,18 @@ declare enum GradientDirection { * @since 7 */ declare enum SharedTransitionEffectType { - /** + /** * The location of the destination page element remains unchanged, and you can configure the transparency animation. Currently, * only the static effect configured for redirecting to the target page takes effect. * @since 7 */ - Static, + Static, /** * Move the source page element to the destination page element location and scale it appropriately. * @since 7 - */ - Exchange, + */ + Exchange, } /** @@ -1162,17 +1162,17 @@ declare enum SharedTransitionEffectType { * @since 7 */ declare enum FontStyle { - /** + /** * Default style. * @since 7 */ - Normal, + Normal, /** * Italic style. * @since 7 - */ - Italic, + */ + Italic, } /** @@ -1180,41 +1180,41 @@ declare enum FontStyle { * @since 7 */ declare enum FontWeight { - /** + /** * Defines a lighter value than [Inherited Value].. * @since 7 */ - Lighter, + Lighter, /** * Normal font. Equivalent to a digital value of 400. * @since 7 - */ - Normal, + */ + Normal, /** * Defines a more general value than [Inherited Value]. * @since 7 - */ - Regular, + */ + Regular, /** * Defines a value that is more centered than [Inherited Value]. * @since 7 - */ - Medium, + */ + Medium, /** * Bold. Equivalent to a numeric value of 700. * @since 7 - */ - Bold, + */ + Bold, /** * Defines a value that is heavier than [Inherited Value]. * @since 7 - */ - Bolder, + */ + Bolder, } /** @@ -1222,23 +1222,23 @@ declare enum FontWeight { * @since 7 */ declare enum TextAlign { - /** + /** * Center the text. * @since 7 */ - Center, + Center, /** * The text is aligned in the same direction as the writing * @since 7 - */ - Start, + */ + Start, /** * The text is aligned in the opposite direction of writing * @since 7 - */ - End, + */ + End, } /** @@ -1246,7 +1246,7 @@ declare enum TextAlign { * @since 7 */ declare enum TextOverflow { - /** + /** * When the text is too long, it will be cropped and displayed. * @since 7 */ @@ -1255,15 +1255,15 @@ declare enum TextOverflow { /** * If the text is too long, the text that cannot be displayed shall be replaced by ellipsis. * @since 7 - */ + */ Ellipsis, /** * Text is not cropped when it is too long. * @since 7 - */ - None, + */ + None, } /** @@ -1271,29 +1271,29 @@ declare enum TextOverflow { * @since 7 */ declare enum TextDecorationType { - /** + /** * Do not use text decorative lines. * @since 7 */ - None, + None, /** * Underline the words. * @since 7 - */ - Underline, + */ + Underline, /** * Text is in all uppercase. * @since 7 - */ - Overline, + */ + Overline, /** * A modifier line that passes through the text. * @since 7 - */ - LineThrough, + */ + LineThrough, } /** @@ -1301,23 +1301,23 @@ declare enum TextDecorationType { * @since 7 */ declare enum TextCase { - /** + /** * The default is normal. * @since 7 */ - Normal, + Normal, /** * The text is all lowercase. * @since 7 - */ - LowerCase, + */ + LowerCase, /** * The text is all uppercase. * @since 7 - */ - UpperCase, + */ + UpperCase, } /** @@ -1325,17 +1325,17 @@ declare enum TextCase { * @since 8 */ declare enum ResponseType { - /** + /** * Right click. * @since 8 */ - RightClick, + RightClick, /** * Long press. * @since 8 - */ - LongPress, + */ + LongPress, } /** @@ -1343,29 +1343,29 @@ declare enum ResponseType { * @since 8 */ declare enum HoverEffect { - /** + /** * Default effect * @since 8 */ - Auto, + Auto, /** * Zoom in and out effect * @since 8 - */ - Scale, + */ + Scale, /** * Highlight effect * @since 8 - */ - Highlight, + */ + Highlight, /** * None effect * @since 8 - */ - None, + */ + None, } /** @@ -1373,77 +1373,77 @@ declare enum HoverEffect { * @since 8 */ declare enum Placement { - /** + /** * Left placement * @since 8 */ - Left, + Left, /** * Right placement * @since 8 - */ - Right, + */ + Right, /** * Top placement * @since 8 - */ - Top, + */ + Top, /** * Bottom placement * @since 8 - */ - Bottom, + */ + Bottom, /** * TopLeft placement * @since 8 - */ - TopLeft, + */ + TopLeft, /** * TopRight placement * @since 8 - */ - TopRight, + */ + TopRight, /** * BottomLeft placement * @since 8 - */ - BottomLeft, + */ + BottomLeft, /** * BottomRight placement * @since 8 - */ - BottomRight, + */ + BottomRight, /** * LeftTop placement * @since 9 - */ - LeftTop, + */ + LeftTop, /** * LeftBottom placement * @since 9 - */ - LeftBottom, + */ + LeftBottom, /** * RightTop placement * @since 9 - */ - RightTop, + */ + RightTop, /** * RightBottom placement * @since 9 - */ - RightBottom, + */ + RightBottom, } /** @@ -1452,23 +1452,23 @@ declare enum Placement { * @since 9 */ declare enum CopyOptions { - /** + /** * Not allow share. * @since 9 */ - None = 0, + None = 0, /** * Share in app. * @since 9 - */ - InApp = 1, + */ + InApp = 1, /** * Share in local device. * @since 9 - */ - LocalDevice = 2, + */ + LocalDevice = 2, } /** @@ -1476,33 +1476,33 @@ declare enum CopyOptions { * @since 9 */ declare enum HitTestMode { - /** + /** * Both self and children nodes respond to the hit test for touch events, * but block hit test of the other nodes which is masked by this node. * @since 9 */ - Default, + Default, /** * Self respond to the hit test for touch events, * but block hit test of children and other nodes which is masked by this node. * @since 9 - */ - Block, + */ + Block, /** * Self and children respond to the hit test for touch events, * and allow hit test of other nodes which is masked by this node. * @since 9 - */ - Transparent, + */ + Transparent, /** * Self not respond to the hit test for touch events, * but children respond to the hit test for touch events. * @since 9 - */ - None, + */ + None, } /** @@ -1510,15 +1510,15 @@ declare enum HitTestMode { * @since 9 */ declare enum TitleHeight { - /** - * Title height when only main title is avaliable. + /** + * Title height when only main title is available. * @since 9 */ - MainOnly, + MainOnly, /** - * Title height when main title and subtitle are both avaliable. + * Title height when main title and subtitle are both available. * @since 9 - */ - MainWithSub, + */ + MainWithSub, } \ No newline at end of file diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts index e58a4765bcee9799274ca04d52c879227b7de0d0..afd864cb83d79be36af2ac78e386f8402bd0ae3c 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -18,11 +18,11 @@ * @since 7 */ interface GridInterface { - /** + /** * Grid is returned when the parameter is transferred. * @since 7 */ - (scroller?: Scroller): GridAttribute; + (scroller?: Scroller): GridAttribute; } /** @@ -30,160 +30,161 @@ interface GridInterface { * @since 8 */ declare enum GridDirection { - /** + /** * The row direction. * @since 8 */ - Row, - /** + Row, + /** * The column direction. * @since 8 */ - Column, - /** + Column, + /** * The row reverse direction. * @since 8 */ - RowReverse, - /** + RowReverse, + /** * The column reverse direction. * @since 8 */ - ColumnReverse, + ColumnReverse, } /** - * Defines the grid attibute functions. + * Defines the grid attribute functions. * @since 7 */ declare class GridAttribute extends CommonMethod { - /** + /** * This parameter specifies the number of columns in the current grid layout. * @since 7 */ - columnsTemplate(value: string): GridAttribute; + columnsTemplate(value: string): GridAttribute; /** * Lets you set the number of rows in the current grid layout, * @since 7 - */ - rowsTemplate(value: string): GridAttribute; + */ + rowsTemplate(value: string): GridAttribute; /** * Allows you to set the spacing between columns. * @since 7 - */ - columnsGap(value: Length): GridAttribute; + */ + columnsGap(value: Length): GridAttribute; /** * Lets you set the spacing between rows. * @since 7 - */ - rowsGap(value: Length): GridAttribute; + */ + rowsGap(value: Length): GridAttribute; /** * This parameter specifies the width of the scroll bar. * @since 7 - */ - scrollBarWidth(value: number | string): GridAttribute; + */ + scrollBarWidth(value: number | string): GridAttribute; /** * Sets the color of the scroll bar. * @since 7 - */ - scrollBarColor(value: Color | number | string): GridAttribute; + */ + scrollBarColor(value: Color | number | string): GridAttribute; /** * Lets you set the spacing between rows. * @since 7 - */ - scrollBar(value: BarState): GridAttribute; + */ + scrollBar(value: BarState): GridAttribute; /** * Sets the status of the scroll bar. * @since 7 - */ - onScrollIndex(event: (first: number) => void): GridAttribute; + */ + onScrollIndex(event: (first: number) => void): GridAttribute; /** * cached Count * @since 7 - */ - cachedCount(value: number): GridAttribute; + */ + cachedCount(value: number): GridAttribute; /** * editMode * @since 8 - */ - editMode(value: boolean): GridAttribute; + */ + editMode(value: boolean): GridAttribute; /** * Called when judging whether it is multiSelectable. * @since 8 - */ - multiSelectable(value: boolean): GridAttribute; + */ + multiSelectable(value: boolean): GridAttribute; /** * maxCount * @since 8 - */ - maxCount(value: number): GridAttribute; + */ + maxCount(value: number): GridAttribute; /** * minCount * @since 8 - */ - minCount(value: number): GridAttribute; + */ + minCount(value: number): GridAttribute; /** * cellLength * @since 8 - */ - cellLength(value: number): GridAttribute; + */ + cellLength(value: number): GridAttribute; /** * control GridDirection of the grid. * @since 8 - */ - layoutDirection(value: GridDirection): GridAttribute; + */ + layoutDirection(value: GridDirection): GridAttribute; /** * control if the grid supports animation. * @since 8 - */ - supportAnimation(value: boolean): GridAttribute; + */ + supportAnimation(value: boolean): GridAttribute; /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. * (To be triggered, press and hold for 170 milliseconds (ms)) * @since 8 - */ - onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) | void): GridAttribute; + */ + onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) | void): GridAttribute; /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @since 8 - */ - onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute; + */ + onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute; /** * After binding, a callback is triggered when the drag moves within the range of a placeable component. * @since 8 - */ - onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute; + */ + onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute; /** * After binding, a callback is triggered when the component is dragged out of the component range. * @since 8 - */ - onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute; + */ + onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute; /** * The component bound to this event can be used as the drag release target. * This callback is triggered when the drag behavior is stopped within the scope of the component. * @since 8 - */ - onItemDrop( + */ + onItemDrop( + event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void, ): GridAttribute; } diff --git a/api/@internal/component/ets/hyperlink.d.ts b/api/@internal/component/ets/hyperlink.d.ts index 40751b2d28b0228f41b5266b250b72122e8cc0e6..66967c0ecaa037c9c3e1b9aeb80fcba1038606ae 100644 --- a/api/@internal/component/ets/hyperlink.d.ts +++ b/api/@internal/component/ets/hyperlink.d.ts @@ -18,25 +18,25 @@ * @since 7 */ interface HyperlinkInterface { - /** + /** * Return to get Hyperlink. * adress: Web page redirected by the hyperlink component. * content: Hyperlinks in the hyperlink component display text. * @since 7 */ - (address: string | Resource, content?: string | Resource): HyperlinkAttribute; + (address: string | Resource, content?: string | Resource): HyperlinkAttribute; } /** - * Defines the hyperlink attibute functions + * Defines the hyperlink attribute functions * @since 7 */ declare class HyperlinkAttribute extends CommonMethod { - /** + /** * Set Color * @since 7 */ - color(value: Color | number | string | Resource): HyperlinkAttribute; + color(value: Color | number | string | Resource): HyperlinkAttribute; } declare const Hyperlink: HyperlinkInterface; diff --git a/api/@internal/component/ets/inspector.d.ts b/api/@internal/component/ets/inspector.d.ts index c62f3802cf6cfc69b9c8ea99829073ebc6e02145..1c59070f99b9a4e13f7190ae6827b7cb57b15264 100644 --- a/api/@internal/component/ets/inspector.d.ts +++ b/api/@internal/component/ets/inspector.d.ts @@ -15,17 +15,24 @@ /** * Get inspector node infos. + * @since 7 + * @systemapi - * @deprecated - */ -declare function getInspectorNodes(): object; + + * @deprecated since 9 + + * @useinstead getInspectorTree + +*/ + declare function getInspectorNodes(): object; /** * Get inspector node info by node id. * @since 7 * @systemapi - * @deprecated + * @deprecated since 9 + * @useinstead getInspectorTree */ declare function getInspectorNodeById(id: number): object; @@ -36,22 +43,22 @@ declare function getInspectorNodeById(id: number): object; * @test */ declare namespace Profiler { - /** + /** * Registers vsync callback for profiler. * @param callback the callback info is json string with ui update info. * @since 8 * @systemapi * @test */ - function registerVsyncCallback(callback: (info: string) => void): void; + function registerVsyncCallback(callback: (info: string) => void): void; /** * Unregisters vsync callback. * @since 8 * @systemapi * @test - */ - function unregisterVsyncCallback(): void; + */ + function unregisterVsyncCallback(): void; } /** diff --git a/api/@internal/component/ets/lazy_for_each.d.ts b/api/@internal/component/ets/lazy_for_each.d.ts index a027eab8aff3963214cdccde22447144c5a0ea07..8bc51e959217d654baa53404c7330308f1579850 100644 --- a/api/@internal/component/ets/lazy_for_each.d.ts +++ b/api/@internal/component/ets/lazy_for_each.d.ts @@ -18,63 +18,67 @@ * @since 7 */ declare interface DataChangeListener { - /** + /** * Data ready. * @since 7 */ - onDataReloaded(): void; + onDataReloaded(): void; /** * Data added. * @since 7 - * @deprecated since 8 - */ - onDataAdded(index: number): void; + * @deprecated since 8 + * @useinstead onDataAdd + */ + onDataAdded(index: number): void; /** * Data added. * @since 8 - */ - onDataAdd(index: number): void; + */ + onDataAdd(index: number): void; /** * Data moved. * @since 7 - * @deprecated since 8 - */ - onDataMoved(from: number, to: number): void; + * @deprecated since 8 + * @useinstead onDataMove + */ + onDataMoved(from: number, to: number): void; /** * Data moved. * @since 8 - */ - onDataMove(from: number, to: number): void; + */ + onDataMove(from: number, to: number): void; /** * Data deleted. * @since 7 - * @deprecated since 8 - */ - onDataDeleted(index: number): void; + * @deprecated since 8 + * @useinstead onDataDelete + */ + onDataDeleted(index: number): void; /** * Data deleted. * @since 8 - */ - onDataDelete(index: number): void; + */ + onDataDelete(index: number): void; /** * Call when has data change. * @since 7 - * @deprecated since 8 - */ - onDataChanged(index: number): void; + * @deprecated since 8 + * @useinstead onDataChange + */ + onDataChanged(index: number): void; /** * Call when has data change. * @since 8 - */ - onDataChange(index: number): void; + */ + onDataChange(index: number): void; } /** @@ -82,29 +86,29 @@ declare interface DataChangeListener { * @since 7 */ declare interface IDataSource { - /** + /** * Total data count. * @since 7 */ - totalCount(): number; + totalCount(): number; /** * Return the data of index. * @since 7 - */ - getData(index: number): any; + */ + getData(index: number): any; /** * Register data change listener. * @since 7 - */ - registerDataChangeListener(listener: DataChangeListener): void; + */ + registerDataChangeListener(listener: DataChangeListener): void; /** * Unregister data change listener. * @since 7 - */ - unregisterDataChangeListener(listener: DataChangeListener): void; + */ + unregisterDataChangeListener(listener: DataChangeListener): void; } /** @@ -112,15 +116,15 @@ declare interface IDataSource { * @since 7 */ interface LazyForEachInterface { - /** + /** * Enter the value to obtain the LazyForEach. * @since 7 */ - ( + ( dataSource: IDataSource, itemGenerator: (item: any, index?: number) => void, keyGenerator?: (item: any, index?: number) => string, - ): LazyForEachInterface; + ): LazyForEachInterface; } declare const LazyForEach: LazyForEachInterface; diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts index edfea632c956d112fc14f2bc06c99b6f49c7ec13..b3b2ad038f7da4ade186559d5a8d743072b15c46 100644 --- a/api/@internal/component/ets/list_item.d.ts +++ b/api/@internal/component/ets/list_item.d.ts @@ -19,23 +19,23 @@ * @since 7 */ declare enum Sticky { - /** + /** * No sticky. * @since 7 */ - None, + None, /** * Normal mode * @since 7 - */ - Normal, + */ + Normal, /** * Set opacity. * @since 7 - */ - Opacity, + */ + Opacity, } /** @@ -43,23 +43,23 @@ declare enum Sticky { * @since 7 */ declare enum EditMode { - /** + /** * Unrestricted operations. * @since 7 */ - None, + None, /** - * Deleteable. + * Deletable. * @since 7 - */ - Deletable, + */ + Deletable, /** * Movable. * @since 7 - */ - Movable, + */ + Movable, } /** @@ -67,17 +67,17 @@ declare enum EditMode { * @since 9 */ declare enum SwipeEdgeEffect { - /** + /** * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. * @since 9 */ - Spring, + Spring, /** * Sliding to the edge has no effect. * @since 9 - */ - None, + */ + None, } /** @@ -85,24 +85,24 @@ declare enum SwipeEdgeEffect { * @since 9 */ declare interface SwipeActionOptions { - /** + /** * An action item that appears when a list item slides right (when list direction is Vertical) or * slides down (when list direction Horizontal). * @since 9 */ - start?: CustomBuilder; - /** + start?: CustomBuilder; + /** * An action item that appears when a list item slides left (when list direction is Vertical) or * slides up (when list direction Horizontal). * @since 9 */ - end?: CustomBuilder; + end?: CustomBuilder; /** * Sets whether sliding to a boundary has a spring effect. * @since 9 - */ - edgeEffect?: SwipeEdgeEffect; + */ + edgeEffect?: SwipeEdgeEffect; } /** @@ -114,47 +114,47 @@ declare interface SwipeActionOptions { * @since 7 */ interface ListItemInterface { - /** + /** * Called when an interface is used. * @since 7 */ - (value?: string): ListItemAttribute; + (value?: string): ListItemAttribute; } /** * @since 7 */ declare class ListItemAttribute extends CommonMethod { - /** + /** * Called when setting whether item is ceiling effect. * @since 7 */ - sticky(value: Sticky): ListItemAttribute; + sticky(value: Sticky): ListItemAttribute; /** * Called when judging whether it is editable. * @since 7 - */ - editable(value: boolean | EditMode): ListItemAttribute; + */ + editable(value: boolean | EditMode): ListItemAttribute; /** * Called when judging whether it is selectable. * @since 8 - */ - selectable(value: boolean): ListItemAttribute; + */ + selectable(value: boolean): ListItemAttribute; /** * Sets the action item that appears when the list item slides in the cross axis direction of the list. * @param value items defines in the SwipeActionOption. * @since 9 - */ - swipeAction(value: SwipeActionOptions): ListItemAttribute; + */ + swipeAction(value: SwipeActionOptions): ListItemAttribute; /** * Called when the listItem is selected. * @since 8 - */ - onSelect(event: (isSelected: boolean) => void): ListItemAttribute; + */ + onSelect(event: (isSelected: boolean) => void): ListItemAttribute; } /** diff --git a/api/@internal/component/ets/list_item_group.d.ts b/api/@internal/component/ets/list_item_group.d.ts index 6914c606ce942197b419d6794065efb632ad394b..bbad24b0cc550649631190077c3b6a54729a1fa6 100644 --- a/api/@internal/component/ets/list_item_group.d.ts +++ b/api/@internal/component/ets/list_item_group.d.ts @@ -18,23 +18,23 @@ * @since 9 */ declare interface ListItemGroupOptions { - /** + /** * Describes the ListItemGroup header. * @since 9 */ - header?: CustomBuilder; + header?: CustomBuilder; /** * Describes the ListItemGroup footer. * @since 9 - */ - footer?: CustomBuilder; + */ + footer?: CustomBuilder; /** * Describes the ListItemGroup space. * @since 9 - */ - space?: number | string; + */ + space?: number | string; } /** @@ -42,30 +42,30 @@ declare interface ListItemGroupOptions { * @since 9 */ interface ListItemGroupInterface { - /** + /** * Called when interface is called. * @since 9 */ - (options?: ListItemGroupOptions): ListItemGroupAttribute; + (options?: ListItemGroupOptions): ListItemGroupAttribute; } /** - * Defines the item group attibute functions. + * Defines the item group attribute functions. * @since 9 */ declare class ListItemGroupAttribute extends CommonMethod { - /** + /** * Called when the ListItemGroup split line style is set. * @since 9 */ - divider( + divider( value: { strokeWidth: Length; color?: ResourceColor; startMargin?: Length; endMargin?: Length; } | null, - ): ListItemGroupAttribute; + ): ListItemGroupAttribute; } /** @@ -73,4 +73,3 @@ declare class ListItemGroupAttribute extends CommonMethod void; + */ + action?: () => void; } /** @@ -136,11 +136,11 @@ declare interface NavigationMenuItem { * @since 8 */ interface NavigationInterface { - /** + /** * Called when the navigator view interface is used. * @since 8 */ - (): NavigationAttribute; + (): NavigationAttribute; } /** @@ -148,97 +148,97 @@ interface NavigationInterface { * @since 8 */ declare class NavigationAttribute extends CommonMethod { - /** + /** * Sets the width of navigation bar. * @since 9 */ - navBarWidth(value: Length): NavigationAttribute; + navBarWidth(value: Length): NavigationAttribute; /** * Sets the position of navigation bar. * @since 9 - */ - navBarPosition(value: NavBarPosition): NavigationAttribute; - + */ + navBarPosition(value: NavBarPosition): NavigationAttribute; + /** * Sets the mode of navigation. * @since 9 - */ - mode(value: NavigationMode): NavigationAttribute; - + */ + mode(value: NavigationMode): NavigationAttribute; + /** * Sets the back button icon. * @since 9 - */ - backButtonIcon(value: string | PixelMap | Resource): NavigationAttribute; - + */ + backButtonIcon(value: string | PixelMap | Resource): NavigationAttribute; + /** * Hide the navigation bar. * @since 9 - */ - hideNavBar(value: boolean): NavigationAttribute; + */ + hideNavBar(value: boolean): NavigationAttribute; /** * Navigation title * @since 8 - */ - title(value: string | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle): NavigationAttribute; + */ + title(value: string | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle): NavigationAttribute; /** * Navigation subtitle * @since 8 * @deprecated since 9 * @useinstead title - */ - subTitle(value: string): NavigationAttribute; + */ + subTitle(value: string): NavigationAttribute; /** * Hide navigation title bar * @since 8 - */ - hideTitleBar(value: boolean): NavigationAttribute; + */ + hideTitleBar(value: boolean): NavigationAttribute; /** * Hide navigation back button * @since 8 - */ - hideBackButton(value: boolean): NavigationAttribute; + */ + hideBackButton(value: boolean): NavigationAttribute; /** * Navigation title mode * @since 8 - */ - titleMode(value: NavigationTitleMode): NavigationAttribute; + */ + titleMode(value: NavigationTitleMode): NavigationAttribute; /** * Navigation title bar's menus * @since 8 - */ - menus(value: Array | CustomBuilder): NavigationAttribute; + */ + menus(value: Array | CustomBuilder): NavigationAttribute; /** * Tool bar * @since 8 - */ - toolBar(value: object | CustomBuilder): NavigationAttribute; + */ + toolBar(value: object | CustomBuilder): NavigationAttribute; /** * Hide tool bar * @since 8 - */ - hideToolBar(value: boolean): NavigationAttribute; + */ + hideToolBar(value: boolean): NavigationAttribute; /** * Trigger callback when title mode change finished at free mode. * @since 8 - */ - onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; + */ + onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; /** * Trigger callback when the visibility of navigation bar change. * @since 9 - */ - onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; + */ + onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; } declare const Navigation: NavigationInterface; diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts index 08ddae847e61272cd9d92d6692229872ed6711ef..29d147b956cd9fa8d89b7dd7d7f34d863c54e1d8 100644 --- a/api/@internal/component/ets/plugin_component.d.ts +++ b/api/@internal/component/ets/plugin_component.d.ts @@ -19,18 +19,18 @@ * @systemapi */ interface PluginComponentTemplate { - /** + /** * Defines the plugin source name. * @since 9 * @systemapi */ - source: string; - /** + source: string; + /** * Defines the ability name. * @since 9 * @systemapi */ - ability: string; + ability: string; } /** @@ -39,33 +39,33 @@ interface PluginComponentTemplate { * @systemapi */ interface PluginComponentInterface { - /** + /** * Called when setting the plugin. * @since 9 * @systemapi */ - (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; + (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; } /** - * Defines the plugin component attibute functions. + * Defines the plugin component attribute functions. * @since 9 * @systemapi */ declare class PluginComponentAttribute extends CommonMethod { - /** + /** * pluginComponent onComplete callback, * @since 9 * @systemapi */ - onComplete(callback: () => void): PluginComponentAttribute; + onComplete(callback: () => void): PluginComponentAttribute; /** * pluginComponent onError callback, * @since 9 * @systemapi - */ - onError(callback: (info: { errcode: number; msg: string }) => void): PluginComponentAttribute; + */ + onError(callback: (info: { errcode: number; msg: string }) => void): PluginComponentAttribute; } declare const PluginComponent: PluginComponentInterface; diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 76faf8e8a693123a150fb6c18bea118ee30144ba..8848dc63842f0307bb5c0a7ef6a7d9ee5c2075a6 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -18,30 +18,31 @@ * @since 7 */ declare interface ProgressOptions { - /** + /** * Sets the value of Progress. * @since 7 */ - value: number; + value: number; /** * Sets the total of Progress. * @since 7 - */ - total?: number; + */ + total?: number; /** * Sets the style of Progress. * @since 7 - * @deprecated since 8 - */ - style?: ProgressStyle + * @deprecated since 8 + * @useinstead type + */ + style?: ProgressStyle /** * Sets the type of Progress. * @since 8 - */ - type?: ProgressType + */ + type?: ProgressType } /** @@ -49,35 +50,35 @@ * @since 8 */ declare enum ProgressType { - /** + /** * Linear progress bar style. * @since 8 */ - Linear, + Linear, /** * Ring progress bar. * @since 8 - */ - Ring, + */ + Ring, /** * Eclipse progress bar. * @since 8 - */ - Eclipse, + */ + Eclipse, /** * ScaleRing progress bar. * @since 8 - */ - ScaleRing, + */ + ScaleRing, /** * Capsule progress bar. * @since 8 - */ - Capsule, + */ + Capsule, } /** @@ -85,23 +86,23 @@ declare enum ProgressType { * @since 8 */ declare interface ProgressStyleOptions { - /** + /** * Defines the strokeWidth property. * @since 8 */ - strokeWidth?: Length; + strokeWidth?: Length; /** - * Defines the scaleCoun property. + * Defines the scaleCount property. * @since 8 - */ - scaleCount?: number; + */ + scaleCount?: number; /** * Defines the scaleWidth property. * @since 8 - */ - scaleWidth?: Length; + */ + scaleWidth?: Length; } /** @@ -109,35 +110,35 @@ declare interface ProgressStyleOptions { * @since 7 */ declare enum ProgressStyle { - /** + /** * Linear progress bar style. * @since 7 */ - Linear, + Linear, /** * Ring progress bar. * @since 8 - */ - Ring, + */ + Ring, /** * Eclipse progress bar. * @since 7 - */ - Eclipse, + */ + Eclipse, /** * ScaleRing progress bar. * @since 8 - */ - ScaleRing, + */ + ScaleRing, /** * Capsule progress bar. * @since 8 - */ - Capsule, + */ + Capsule, } /** @@ -145,35 +146,35 @@ declare enum ProgressStyle { * @since 7 */ interface ProgressInterface { - /** + /** * Called when the progress bar is set. * @since 7 */ - (options: ProgressOptions): ProgressAttribute; + (options: ProgressOptions): ProgressAttribute; } /** - * Defines the progress attibute functions. + * Defines the progress attribute functions. * @since 7 */ declare class ProgressAttribute extends CommonMethod { - /** + /** * Called when the current progress value is set. * @since 7 */ - value(value: number): ProgressAttribute; + value(value: number): ProgressAttribute; /** * Called when the progress bar foreground is set. * @since 7 - */ - color(value: ResourceColor): ProgressAttribute; + */ + color(value: ResourceColor): ProgressAttribute; /** * Called when the style of progress bar is set. * @since 8 - */ - style(value: ProgressStyleOptions): ProgressAttribute; + */ + style(value: ProgressStyleOptions): ProgressAttribute; } declare const Progress: ProgressInterface; diff --git a/api/@internal/component/ets/qrcode.d.ts b/api/@internal/component/ets/qrcode.d.ts index ecae91dc558eae0032bdb9fcbeb1284cf5dcfbb8..80951f0adf37ed7ebbd8dc38c4ad3a119e7b8c62 100644 --- a/api/@internal/component/ets/qrcode.d.ts +++ b/api/@internal/component/ets/qrcode.d.ts @@ -18,29 +18,29 @@ * @since 7 */ interface QRCodeInterface { - /** + /** * Called when a QR code is set. * @since 7 */ - (value: string): QRCodeAttribute; + (value: string): QRCodeAttribute; } /** - * Defines the qrcode attibute functions. + * Defines the qrcode attribute functions. * @since 7 */ declare class QRCodeAttribute extends CommonMethod { - /** + /** * Called when the QR code color is set. * @since 7 */ - color(value: ResourceColor): QRCodeAttribute; + color(value: ResourceColor): QRCodeAttribute; /** * Called when setting the QR code background color. * @since 7 - */ - backgroundColor(value: ResourceColor): QRCodeAttribute; + */ + backgroundColor(value: ResourceColor): QRCodeAttribute; } declare const QRCode: QRCodeInterface; diff --git a/api/@internal/component/ets/rating.d.ts b/api/@internal/component/ets/rating.d.ts index 7dc8bac49645fcf78bcf7f39fad4be33bcf5fff7..502469d3e77da79dee62aaf5b00a99f7cb1bf226 100644 --- a/api/@internal/component/ets/rating.d.ts +++ b/api/@internal/component/ets/rating.d.ts @@ -18,41 +18,41 @@ * @since 7 */ interface RatingInterface { - /** + /** * Called when a score bar is created. * @since 7 */ - (options?: { rating: number; indicator?: boolean }): RatingAttribute; + (options?: { rating: number; indicator?: boolean }): RatingAttribute; } /** - * Defines the rating attibute functions. + * Defines the rating attribute functions. * @since 7 */ declare class RatingAttribute extends CommonMethod { - /** + /** * Called when the total number of stars is set. * @since 7 */ - stars(value: number): RatingAttribute; + stars(value: number): RatingAttribute; /** * Called when the step size of the operation rating. * @since 7 - */ - stepSize(value: number): RatingAttribute; + */ + stepSize(value: number): RatingAttribute; /** * Called when a picture is set. * @since 7 - */ - starStyle(value: { backgroundUri: string; foregroundUri: string; secondaryUri?: string }): RatingAttribute; + */ + starStyle(value: { backgroundUri: string; foregroundUri: string; secondaryUri?: string }): RatingAttribute; /** * Called when the star rating of the operation scoring bar changes. * @since 7 - */ - onChange(callback: (value: number) => void): RatingAttribute; + */ + onChange(callback: (value: number) => void): RatingAttribute; } declare const Rating: RatingInterface; diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 2475dc5518269b153f000bc91d96f73b576f7316..790e7b850fe9b03110a190b546bfb7c732281927 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -18,35 +18,35 @@ * @since 8 */ declare enum RefreshStatus { - /** + /** * The refresh status of the drop-down refresh. * @since 8 */ - Inactive, + Inactive, /** * Drop down, but the drop-down distance is less than the refresh distance. * @since 8 - */ - Drag, + */ + Drag, /** * The pull-down exceeds the refresh distance. * @since 8 - */ - OverDrag, + */ + OverDrag, /** * After the pull-down, it rebounds to the refresh distance and enters the refresh state. * @since 8 - */ - Refresh, + */ + Refresh, /** * After refresh, return to the initial state. * @since 8 - */ - Done, + */ + Done, } /** @@ -54,29 +54,29 @@ declare enum RefreshStatus { * @since 8 */ interface RefreshInterface { - /** + /** * Called when the drop-down refresh is set. * @since 8 */ - (value: { refreshing: boolean; offset?: number | string; friction?: number | string }): RefreshAttribute; + (value: { refreshing: boolean; offset?: number | string; friction?: number | string }): RefreshAttribute; } /** - * Defines the refresh attibute functions. + * Defines the refresh attribute functions. * @since 8 */ declare class RefreshAttribute extends CommonMethod { - /** + /** * Called when the refresh state changes. * @since 8 */ - onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute; + onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute; /** * Called when the refresh state is entered. * @since 8 - */ - onRefreshing(callback: () => void): RefreshAttribute; + */ + onRefreshing(callback: () => void): RefreshAttribute; } declare const Refresh: RefreshInterface; diff --git a/api/@internal/component/ets/scroll.d.ts b/api/@internal/component/ets/scroll.d.ts index 47334f21c69678cece28301cf5c176e763107f5b..5bafc69ab8d5d0c868a3885f23e9078938194abe 100644 --- a/api/@internal/component/ets/scroll.d.ts +++ b/api/@internal/component/ets/scroll.d.ts @@ -18,46 +18,51 @@ * @since 7 */ declare enum ScrollDirection { - /** + /** * Vertical scrolling is supported. * @since 7 */ - Vertical, + Vertical, /** * Horizontal scrolling is supported. * @since 7 - */ - Horizontal, + */ + + Horizontal, /** * Free scrolling is supported. * @since 7 - */ - Free, + */ + + Free, /** * Non-scrollable. * @since 7 - */ - None, + */ + + None, } /** * @since 7 */ declare class Scroller { - /** + /** * constructor. * @since 7 */ - constructor(); + constructor(); /** * Called when the setting slides to the specified position. * @since 7 - */ - scrollTo(value: { + */ + + scrollTo(value: { + xOffset: number | string; yOffset: number | string; animation?: { duration: number; curve: Curve }; @@ -66,32 +71,37 @@ declare class Scroller { /** * Called when scrolling to the edge of the container. * @since 7 - */ - scrollEdge(value: Edge); + */ + + scrollEdge(value: Edge); /** * Called when page turning mode is set. * @since 7 - */ - scrollPage(value: { next: boolean; direction?: Axis }); + */ + + scrollPage(value: { next: boolean; direction?: Axis }); /** * Called when viewing the scroll offset. * @since 7 - */ - currentOffset(); + */ + + currentOffset(); /** * Called when sliding to the specified index. * @since 7 - */ - scrollToIndex(value: number); + */ + + scrollToIndex(value: number); /** * Called when the setting slides by offset. * @since 9 - */ - scrollBy(dx: Length, dy: Length); + */ + + scrollBy(dx: Length, dy: Length); } /** @@ -99,71 +109,79 @@ declare class Scroller { * @since 7 */ interface ScrollInterface { - /** + /** * Called when a scrollable container is set. * @since 7 */ - (scroller?: Scroller): ScrollAttribute; + (scroller?: Scroller): ScrollAttribute; } /** - * Defines the scroll attibute functions. + * Defines the scroll attribute functions. * @since 7 */ declare class ScrollAttribute extends CommonMethod { - /** + /** * Called when the scroll method is slid. * @since 7 */ - scrollable(value: ScrollDirection): ScrollAttribute; + scrollable(value: ScrollDirection): ScrollAttribute; /** * Called when the setting slides to the specified position. * @since 7 - */ - onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute; + */ + + onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute; /** * Called when scrolling to the edge of the container. * @since 7 - */ - onScrollEdge(event: (side: Edge) => void): ScrollAttribute; + */ + + onScrollEdge(event: (side: Edge) => void): ScrollAttribute; /** * Called when scrolling has stopped. * @since 7 - */ - onScrollEnd(event: () => void): ScrollAttribute; + */ + + onScrollEnd(event: () => void): ScrollAttribute; /** * Called when the status of the scroll bar is set. * @since 7 - */ - scrollBar(barState: BarState): ScrollAttribute; + */ + + scrollBar(barState: BarState): ScrollAttribute; /** * Called when the color of the scroll bar is set. * @since 7 - */ - scrollBarColor(color: Color | number | string): ScrollAttribute; + */ + + scrollBarColor(color: Color | number | string): ScrollAttribute; /** * Called when the width of the scroll bar is set. * @since 7 - */ - scrollBarWidth(value: number | string): ScrollAttribute; + */ + + scrollBarWidth(value: number | string): ScrollAttribute; /** * Called when the sliding effect is set. * @since 7 - */ - edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute; + */ + + edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute; /** - * Event called when sroll will scroll. + * Event called when Scroll will scroll. * @since 9 - */ - onScrollBegin(event: (dx: number, dy: number) => { dxRemain: number, dyRemain: number }): ScrollAttribute; + */ + + onScrollBegin(event: (dx: number, dy: number) => { dxRemain: number, dyRemain: number }): ScrollAttribute; } declare const Scroll: ScrollInterface; diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts index d8089e23b40238ad29c651a0e52c65f13cfd184e..58d0c019ef6c5326ce07802f45fdbde20cd8da09 100644 --- a/api/@internal/component/ets/scroll_bar.d.ts +++ b/api/@internal/component/ets/scroll_bar.d.ts @@ -18,17 +18,17 @@ * @since 8 */ declare enum ScrollBarDirection { - /** + /** * Vertical scrolling is supported. * @since 8 */ - Vertical, + Vertical, /** * Horizontal scrolling is supported. * @since 8 - */ - Horizontal, + */ + Horizontal, } /** @@ -36,23 +36,23 @@ declare enum ScrollBarDirection { * @since 8 */ declare interface ScrollBarOptions { - /** + /** * Sets the scroller of scroll bar. * @since 8 */ - scroller: Scroller; + scroller: Scroller; /** * Sets the direction of scroll bar. * @since 8 - */ - direction?: ScrollBarDirection; + */ + direction?: ScrollBarDirection; /** * Sets the state of scroll bar. * @since 8 - */ - state?: BarState; + */ + state?: BarState; } /** @@ -60,15 +60,15 @@ declare interface ScrollBarOptions { * @since 8 */ interface ScrollBarInterface { - /** + /** * Called when a ScrollBar container is set. * @since 8 */ - (value: ScrollBarOptions): ScrollBarAttribute; + (value: ScrollBarOptions): ScrollBarAttribute; } /** - * Defines the scrollbar attibute functions. + * Defines the scrollbar attribute functions. * @since 8 */ declare class ScrollBarAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index 0c03c35b06461598cfb0e71970cdb808bfd1108e..8c3b3ff2479cd2f21d9758665baa92a620a5648e 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -14,21 +14,21 @@ */ /** - * The declare of slectOption. + * The declare of selectOption. * @since 8 */ declare interface SelectOption { - /** + /** * option string. * @since 8 */ - value: ResourceStr; + value: ResourceStr; /** * option icon. * @since 8 - */ - icon?: ResourceStr; + */ + icon?: ResourceStr; } /** @@ -36,11 +36,11 @@ declare interface SelectOption { * @since 8 */ interface SelectInterface { - /** + /** * Called when the select is set. * @since 8 */ - (options: Array): SelectAttribute; + (options: Array): SelectAttribute; } /** @@ -48,71 +48,71 @@ interface SelectInterface { * @since 8 */ declare class SelectAttribute extends CommonMethod { - /** + /** * Sets the serial number of the select item, starting from 0. * @since 8 */ - selected(value: number): SelectAttribute; + selected(value: number): SelectAttribute; /** * Sets the text display of the select button itself. * @since 8 - */ - value(value: string): SelectAttribute; + */ + value(value: string): SelectAttribute; /** * Sets the text properties of the select button itself. * @since 8 - */ - font(value: Font): SelectAttribute; + */ + font(value: Font): SelectAttribute; /** * Sets the text color of the select button itself. * @since 8 - */ - fontColor(value: ResourceColor): SelectAttribute; + */ + fontColor(value: ResourceColor): SelectAttribute; /** * Sets the background color of the selected items in the select. * @since 8 - */ - selectedOptionBgColor(value: ResourceColor): SelectAttribute; + */ + selectedOptionBgColor(value: ResourceColor): SelectAttribute; /** * Sets the text style of the selected items in the select. * @since 8 - */ - selectedOptionFont(value: Font): SelectAttribute; + */ + selectedOptionFont(value: Font): SelectAttribute; /** * Sets the text color of the selected item in the select. * @since 8 - */ - selectedOptionFontColor(value: ResourceColor): SelectAttribute; + */ + selectedOptionFontColor(value: ResourceColor): SelectAttribute; /** * Sets the background color of the select item. * @since 8 - */ - optionBgColor(value: ResourceColor): SelectAttribute; + */ + optionBgColor(value: ResourceColor): SelectAttribute; /** * Sets the text style for select items. * @since 8 - */ - optionFont(value: Font): SelectAttribute; + */ + optionFont(value: Font): SelectAttribute; /** * Sets the text color for select items. * @since 8 - */ - optionFontColor(value: ResourceColor): SelectAttribute; + */ + optionFontColor(value: ResourceColor): SelectAttribute; /** * Callback for selecting an item from the select. * @since 8 - */ - onSelect(callback: (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/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index 55e73273e394c8822b4b865e610897bc57fecafd..40de945111b72835daa1b0476a125dfdccd1ee5b 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -18,16 +18,16 @@ * @since 8 */ declare enum SideBarContainerType { - /** + /** * The sidebar invisible * @since 8 */ - Embed, - /** + Embed, + /** * The sidebar visible * @since 8 */ - Overlay, + Overlay, } /** @@ -35,16 +35,16 @@ declare enum SideBarContainerType { * @since 9 */ declare enum SideBarPosition { - /** + /** * The sidebar is on the Start of the container * @since 9 */ - Start, - /** + Start, + /** * The sidebar is on the End of the container * @since 9 */ - End, + End, } /** @@ -52,33 +52,34 @@ declare enum SideBarPosition { * @since 8 */ declare interface ButtonStyle { - /** + /** * Set the left of control button * @since 8 */ - left?: number; - /** + left?: number; + /** * Set the top of control button * @since 8 */ - top?: number; - /** + top?: number; + /** * Set the width of control button * @since 8 */ - width?: number; + width?: number; /** - * Set the heigth of control button + * Set the height of control button * @since 8 - */ - height?: number; + */ + height?: number; /** * Set the button icon when sidebar status has changed * @since 8 - */ - icons?: { + */ + icons?: { + shown: string | PixelMap | Resource; hidden: string | PixelMap | Resource; switching?: string | PixelMap | Resource; @@ -90,11 +91,11 @@ declare interface ButtonStyle { * @since 8 */ interface SideBarContainerInterface { - /** + /** * Called when showing the sidebar of a block entry. * @since 8 */ - (type?: SideBarContainerType): SideBarContainerAttribute; + (type?: SideBarContainerType): SideBarContainerAttribute; } /** @@ -102,72 +103,72 @@ interface SideBarContainerInterface { * @since 8 */ declare class SideBarContainerAttribute extends CommonMethod { - /** + /** * Callback showControlButton function when setting the status of sidebar * @since 8 */ - showSideBar(value: boolean): SideBarContainerAttribute; - /** + showSideBar(value: boolean): SideBarContainerAttribute; + /** * Callback controlButton function when setting the style of button * @since 8 */ - controlButton(value: ButtonStyle): SideBarContainerAttribute; - /** + controlButton(value: ButtonStyle): SideBarContainerAttribute; + /** * Callback showControlButton function when setting the status of button * @since 8 */ - showControlButton(value: boolean): SideBarContainerAttribute; - /** + showControlButton(value: boolean): SideBarContainerAttribute; + /** * Trigger callback when sidebar style of showing change finished. * @since 8 */ - onChange(callback: (value: boolean) => void): SideBarContainerAttribute; - /** + onChange(callback: (value: boolean) => void): SideBarContainerAttribute; + /** * Sets the length of sidebar. * @since 8 */ - sideBarWidth(value: number): SideBarContainerAttribute; - /** + sideBarWidth(value: number): SideBarContainerAttribute; + /** * Sets the min length of sidebar. * default value is 200vp. * @since 8 */ - minSideBarWidth(value: number): SideBarContainerAttribute; - /** + minSideBarWidth(value: number): SideBarContainerAttribute; + /** * Sets the max length of sidebar. * default value is 280vp. * @since 8 */ - maxSideBarWidth(value: number): SideBarContainerAttribute; - /** + maxSideBarWidth(value: number): SideBarContainerAttribute; + /** * Sets the length of sidebar. * @since 9 */ - sideBarWidth(value: Length): SideBarContainerAttribute; - /** + sideBarWidth(value: Length): SideBarContainerAttribute; + /** * Sets the min length of sidebar. * default value is 200vp. * @since 9 */ - minSideBarWidth(value: Length): SideBarContainerAttribute; - /** + minSideBarWidth(value: Length): SideBarContainerAttribute; + /** * Sets the max length of sidebar. * default value is 280vp. * @since 9 */ - maxSideBarWidth(value: Length): SideBarContainerAttribute; - /** + maxSideBarWidth(value: Length): SideBarContainerAttribute; + /** * Sets whether to automatically hide when drag sidebar width is less than the minimum width. * default value is true. * @since 9 */ - autoHide(value: boolean): SideBarContainerAttribute; - /** + autoHide(value: boolean): SideBarContainerAttribute; + /** * Called when determining the location of the sidebar. * default value is Start. * @since 9 */ - sideBarPosition(value: SideBarPosition): SideBarContainerAttribute; + sideBarPosition(value: SideBarPosition): SideBarContainerAttribute; } declare const SideBarContainer: SideBarContainerInterface; diff --git a/api/@internal/component/ets/stepper_item.d.ts b/api/@internal/component/ets/stepper_item.d.ts index c7e0976f37ad4b64da3ca52491c2b25d1f359978..6a9ceeaed58e300d1e3683ba132d60f5d3c5d370 100644 --- a/api/@internal/component/ets/stepper_item.d.ts +++ b/api/@internal/component/ets/stepper_item.d.ts @@ -18,29 +18,29 @@ * @since 8 */ declare enum ItemState { - /** + /** * Default State * @since 8 */ - Normal, + Normal, /** * Disabled State * @since 8 - */ - Disabled, + */ + Disabled, /** * Waiting State * @since 8 - */ - Waiting, + */ + Waiting, /** * Skip State * @since 8 - */ - Skip, + */ + Skip, } /** @@ -48,35 +48,35 @@ declare enum ItemState { * @since 8 */ interface StepperItemInterface { - /** + /** * Called when the stepperItem component is used. * @since 8 */ - (): StepperItemAttribute; + (): StepperItemAttribute; } /** - * Defines the stepper item attrbute functions. + * Defines the stepper item attribute functions. * @since 8 */ declare class StepperItemAttribute extends CommonMethod { - /** + /** * Called when the value of stepperItem prevLabel is set * @since 8 */ - prevLabel(value: string): StepperItemAttribute; + prevLabel(value: string): StepperItemAttribute; /** * Called when the value of stepperItem nextLabel is set * @since 8 - */ - nextLabel(value: string): StepperItemAttribute; + */ + nextLabel(value: string): StepperItemAttribute; /** * Called when the value of stepperItem status is set * @since 8 - */ - status(value?: ItemState): StepperItemAttribute; + */ + status(value?: ItemState): StepperItemAttribute; } declare const StepperItemInstance: StepperItemAttribute; diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index 1a3f7ad21e13266ac548d3837f5493a408c2b669..6ff7fc85bc0031d4054b8bb41891bd8e504fc3dc 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -18,29 +18,29 @@ * @since 7 */ declare class SwiperController { - /** + /** * constructor. * @since 7 */ - constructor(); + constructor(); /** * Called when the next child component is displayed. * @since 7 - */ - showNext(); + */ + showNext(); /** * Called when the previous subcomponent is displayed. * @since 7 - */ - showPrevious(); + */ + showPrevious(); /** * Called when need to stop the swiper animation. * @since 7 - */ - finishAnimation(callback?: () => void); + */ + finishAnimation(callback?: () => void); } /** @@ -48,17 +48,17 @@ declare class SwiperController { * @since 7 */ declare enum SwiperDisplayMode { - /** + /** * Carousel map extension. * @since 7 */ - Stretch, + Stretch, /** * The rotation chart is self linear. * @since 7 - */ - AutoLinear, + */ + AutoLinear, } /** @@ -66,11 +66,11 @@ declare enum SwiperDisplayMode { * @since 7 */ interface SwiperInterface { - /** + /** * Called when a sliding container is set. * @since 7 */ - (controller?: SwiperController): SwiperAttribute; + (controller?: SwiperController): SwiperAttribute; } /** @@ -78,154 +78,154 @@ interface SwiperInterface { * @since 8 */ declare interface IndicatorStyle { - /** + /** * Set the indicator to the left. * @since 8 */ - left?: Length; + left?: Length; /** * Set the indicator to the top. * @since 8 - */ - top?: Length; + */ + top?: Length; /** * Set the indicator to the right. * @since 8 - */ - right?: Length; + */ + right?: Length; /** * Set the indicator to the bottom. * @since 8 - */ - bottom?: Length; + */ + bottom?: Length; /** * Set the indicator size. * @since 8 - */ - size?: Length; + */ + size?: Length; /** * Setting indicator style mask. * @since 8 - */ - mask?: boolean; + */ + mask?: boolean; /** * Set the indicator color. * @since 8 - */ - color?: ResourceColor; + */ + color?: ResourceColor; /** * Set the navigation point color. * @since 8 - */ - selectedColor?: ResourceColor; + */ + selectedColor?: ResourceColor; } /** - * Defines the swiper attibute functions. + * Defines the swiper attribute functions. * @since 7 */ declare class SwiperAttribute extends CommonMethod { - /** + /** * Called when the index value of the displayed subcomponent is set in the container. * @since 7 */ - index(value: number): SwiperAttribute; + index(value: number): SwiperAttribute; /** * Called when setting whether the subcomponent plays automatically. * @since 7 - */ - autoPlay(value: boolean): SwiperAttribute; + */ + autoPlay(value: boolean): SwiperAttribute; /** * Called when the time interval for automatic playback is set. * @since 7 - */ - interval(value: number): SwiperAttribute; + */ + interval(value: number): SwiperAttribute; /** * Called when you set whether the navigation point indicator is enabled. * @since 7 - */ - indicator(value: boolean): SwiperAttribute; + */ + indicator(value: boolean): SwiperAttribute; /** * Called when setting whether to turn on cyclic sliding. * @since 7 - */ - loop(value: boolean): SwiperAttribute; + */ + loop(value: boolean): SwiperAttribute; /** * Called when the animation duration of the switch is set. * @since 7 - */ - duration(value: number): SwiperAttribute; + */ + duration(value: number): SwiperAttribute; /** * Called when setting whether to slide vertically. * @since 7 - */ - vertical(value: boolean): SwiperAttribute; + */ + vertical(value: boolean): SwiperAttribute; /** * Called when the size of the rotation chart is set. * @since 7 - */ - itemSpace(value: number | string): SwiperAttribute; + */ + itemSpace(value: number | string): SwiperAttribute; /** * Called when setting the size of the swiper container on the spindle. * @since 7 - */ - displayMode(value: SwiperDisplayMode): SwiperAttribute; + */ + displayMode(value: SwiperDisplayMode): SwiperAttribute; /** * Called when setting the cached count of the swiper container one side. * @since 8 - */ - cachedCount(value: number): SwiperAttribute; + */ + cachedCount(value: number): SwiperAttribute; /** * This command is invoked when the number of subcomponents is set. * @since 8 - */ - displayCount(value: number | string): SwiperAttribute; + */ + displayCount(value: number | string): SwiperAttribute; /** * Invoked when setting the sliding effect * @since 8 - */ - effectMode(value: EdgeEffect): SwiperAttribute; + */ + effectMode(value: EdgeEffect): SwiperAttribute; /** * Called when sliding is disableSwipe * @since 8 - */ - disableSwipe(value: boolean): SwiperAttribute; + */ + disableSwipe(value: boolean): SwiperAttribute; /** * Called when sliding is curve * @since 8 - */ - curve(value: Curve | string): SwiperAttribute; - /** + */ + curve(value: Curve | string): SwiperAttribute; + /** * Called when the index value changes. * @since 7 - */ - onChange(event: (index: number) => void): SwiperAttribute; + */ + onChange(event: (index: number) => void): SwiperAttribute; /** * Setting indicator style navigation. * @since 8 - */ - indicatorStyle(value?: IndicatorStyle): SwiperAttribute; + */ + indicatorStyle(value?: IndicatorStyle): SwiperAttribute; } declare const Swiper: SwiperInterface; diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index 8b8db8f2c94d235c9c8a29cac54354916a8c4ad5..66fb488be7d7c0864ca6e6cacb1e59f18e0e7123 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -18,35 +18,35 @@ * @since 7 */ declare enum InputType { - /** + /** * Basic input mode. * @since 7 */ - Normal, + Normal, /** * Pure digital input mode. * @since 7 - */ - Number, + */ + Number, /** * Phone number entry mode. * @since 9 - */ - PhoneNumber, + */ + PhoneNumber, /** * E-mail address input mode. * @since 7 - */ - Email, + */ + Email, /** * Password entry mode. * @since 7 - */ - Password, + */ + Password, } /** @@ -54,35 +54,35 @@ declare enum InputType { * @since 7 */ declare enum EnterKeyType { - /** + /** * Go. * @since 7 */ - Go, + Go, /** * Search. * @since 7 - */ - Search, + */ + Search, /** * Send. * @since 7 - */ - Send, + */ + Send, /** * Next. * @since 7 - */ - Next, + */ + Next, /** * Done. * @since 7 - */ - Done, + */ + Done, } /** @@ -90,16 +90,16 @@ declare enum EnterKeyType { * @since 8 */ declare class TextInputController { - /** + /** * constructor. * @since 8 */ - constructor(); - /** + constructor(); + /** * Called when the position of the insertion cursor is set. * @since 8 */ - caretPosition(value: number): void; + caretPosition(value: number): void; } /** @@ -107,23 +107,23 @@ declare class TextInputController { * @since 7 */ declare interface TextInputOptions { - /** + /** * The place holder text string. * @since 7 */ - placeholder?: ResourceStr; + placeholder?: ResourceStr; /** * Sets the current value of TextArea. * @since 7 - */ - text?: ResourceStr; + */ + text?: ResourceStr; /** * Called when the position of the insertion cursor is set. * @since 8 - */ - controller?: TextInputController; + */ + controller?: TextInputController; } /** @@ -131,17 +131,17 @@ declare interface TextInputOptions { * @since 9 */ declare enum TextInputStyle { - /** + /** * Text input default style. * @since 9 */ - Default, + Default, /** * Text input inline style. * @since 9 - */ - Inline + */ + Inline } /** @@ -149,11 +149,11 @@ declare enum TextInputStyle { * @since 7 */ interface TextInputInterface { - /** + /** * Called when writing a single line of text. * @since 7 */ - (value?: TextInputOptions): TextInputAttribute; + (value?: TextInputOptions): TextInputAttribute; } /** @@ -161,144 +161,145 @@ interface TextInputInterface { * @since 7 */ declare class TextInputAttribute extends CommonMethod { - /** + /** * Called when the input type is set. * @since 7 */ - type(value: InputType): TextInputAttribute; + type(value: InputType): TextInputAttribute; /** * Called when the color of the placeholder is set. * @since 7 - */ - placeholderColor(value: ResourceColor): TextInputAttribute; + */ + placeholderColor(value: ResourceColor): TextInputAttribute; /** * Called when the font property of the placeholder is set. * @since 7 - */ - placeholderFont(value?: Font): TextInputAttribute; + */ + placeholderFont(value?: Font): TextInputAttribute; /** * Called when the type of soft keyboard input button is set. * @since 7 - */ - enterKeyType(value: EnterKeyType): TextInputAttribute; + */ + enterKeyType(value: EnterKeyType): TextInputAttribute; /** * Called when the color of the insertion cursor is set. * @since 7 - */ - caretColor(value: ResourceColor): TextInputAttribute; + */ + caretColor(value: ResourceColor): TextInputAttribute; /** * Called when judging whether the text editing change finished. * @since 7 - * @deprecated since 8 - */ - onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute; + * @deprecated since 8 + * @useinstead onEditChange + */ + onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute; /** * Called when judging whether the text editing change finished. * @since 8 - */ - onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute; + */ + onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute; /** * Called when submitted. * @since 7 - */ - onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute; + */ + onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute; /** * Called when the input of the input box changes. * @since 7 - */ - onChange(callback: (value: string) => void): TextInputAttribute; + */ + onChange(callback: (value: string) => void): TextInputAttribute; /** * Called when the input of maximum text length is set. * @since 7 - */ - maxLength(value: number): TextInputAttribute; + */ + maxLength(value: number): TextInputAttribute; /** * Called when the font color is set. * @since 7 - */ - fontColor(value: ResourceColor): TextInputAttribute; + */ + fontColor(value: ResourceColor): TextInputAttribute; /** * Called when the font size is set. * @since 7 - */ - fontSize(value: Length): TextInputAttribute; + */ + fontSize(value: Length): TextInputAttribute; /** * Called when the font style of a font is set. * @since 7 - */ - fontStyle(value: FontStyle): TextInputAttribute; + */ + fontStyle(value: FontStyle): TextInputAttribute; /** * Called when the font weight is set. * @since 7 - */ - fontWeight(value: number | FontWeight | string): TextInputAttribute; + */ + fontWeight(value: number | FontWeight | string): TextInputAttribute; /** * Called when the font list of text is set. * @since 7 - */ - fontFamily(value: ResourceStr): TextInputAttribute; + */ + fontFamily(value: ResourceStr): TextInputAttribute; /** * Called when the inputFilter of text is set. * @since 8 - */ - inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute; + */ + inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute; /** * Called when using the Clipboard menu * @since 8 - */ - onCopy(callback: (value: string) => void): TextInputAttribute; + */ + onCopy(callback: (value: string) => void): TextInputAttribute; /** * Called when using the Clipboard menu * @since 8 - */ - onCut(callback: (value: string) => void): TextInputAttribute; + */ + onCut(callback: (value: string) => void): TextInputAttribute; /** * Called when using the Clipboard menu * @since 8 - */ - onPaste(callback: (value: string) => void): TextInputAttribute; + */ + onPaste(callback: (value: string) => void): TextInputAttribute; /** * Called when the copy option is set. * @since 9 - */ - copyOption(value: CopyOptions): TextInputAttribute; + */ + copyOption(value: CopyOptions): TextInputAttribute; /** * Called when the password show/hide icon is set. * @since 9 - */ - showPasswordIcon(value: boolean): TextInputAttribute; + */ + showPasswordIcon(value: boolean): TextInputAttribute; /** * Called when the text align is set. * @since 9 - */ - textAlign(value: TextAlign): TextInputAttribute; + */ + textAlign(value: TextAlign): TextInputAttribute; /** * Text input style * @since 9 - */ - style(value: TextInputStyle): TextInputAttribute; + */ + style(value: TextInputStyle): TextInputAttribute; } declare const TextInput: TextInputInterface; diff --git a/api/@internal/component/ets/toggle.d.ts b/api/@internal/component/ets/toggle.d.ts index b51b5b490ee4ce8f25d7959d29425192be4fb33c..fba5d55b7e46f78243bd7c5d1dc23bba7221b63b 100644 --- a/api/@internal/component/ets/toggle.d.ts +++ b/api/@internal/component/ets/toggle.d.ts @@ -18,23 +18,23 @@ * @since 8 */ declare enum ToggleType { - /** + /** * Checkbox * @since 8 */ - Checkbox, + Checkbox, /** * Switch * @since 8 - */ - Switch, + */ + Switch, /** * Button * @since 8 - */ - Button, + */ + Button, } /** @@ -42,35 +42,35 @@ declare enum ToggleType { * @since 8 */ interface ToggleInterface { - /** + /** * Set parameters to obtain the toggle. * @since 8 */ - (options: { type: ToggleType; isOn?: boolean }): ToggleAttribute; + (options: { type: ToggleType; isOn?: boolean }): ToggleAttribute; } /** - * Defines the toggle attibute functions + * Defines the toggle attribute functions * @since 8 */ declare class ToggleAttribute extends CommonMethod { - /** + /** * Called when the selected state of the component changes. * @since 8 */ - onChange(callback: (isOn: boolean) => void): ToggleAttribute; + onChange(callback: (isOn: boolean) => void): ToggleAttribute; /** * Called when the color of the selected button is set. * @since 8 - */ - selectedColor(value: ResourceColor): ToggleAttribute; + */ + selectedColor(value: ResourceColor): ToggleAttribute; /** * Called when the color of the selected button is set. * @since 8 - */ - switchPointColor(color: ResourceColor): ToggleAttribute; + */ + switchPointColor(color: ResourceColor): ToggleAttribute; } declare const Toggle: ToggleInterface; diff --git a/api/@internal/ets/global.d.ts b/api/@internal/ets/global.d.ts index 8040d61a9866e0ba3f9787ae224eb5cd1a140096..b8f478440a8fc2b95e70075ac3f86e9818517b8d 100644 --- a/api/@internal/ets/global.d.ts +++ b/api/@internal/ets/global.d.ts @@ -23,40 +23,40 @@ import { TouchObject, KeyEvent, MouseEvent } from 'SpecialEvent'; * @since 7 */ export declare class console { - /** + /** * Prints "debug" logs. * @param message Text to print. * @since 7 */ - static debug(message: string, ...arguments: any[]): void; + static debug(message: string, ...arguments: any[]): void; /** * Prints "log" logs. * @param message Text to print. * @since 7 - */ - static log(message: string, ...arguments: any[]): void; + */ + static log(message: string, ...arguments: any[]): void; /** * Prints "info" logs. * @param message Text to print. * @since 7 - */ - static info(message: string, ...arguments: any[]): void; + */ + static info(message: string, ...arguments: any[]): void; /** * Prints "warn" logs. * @param message Text to print. * @since 7 - */ - static warn(message: string, ...arguments: any[]): void; + */ + static warn(message: string, ...arguments: any[]): void; /** * Prints "error" logs. * @param message Text to print. * @since 7 - */ - static error(message: string, ...arguments: any[]): void; + */ + static error(message: string, ...arguments: any[]): void; } /** @@ -82,7 +82,7 @@ export declare function setInterval(handler: Function | string, delay: number, . export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; /** - * Cancels the interval set by " setInterval()". + * Cancel the interval set by " setInterval()". * @syscap SystemCapability.ArkUI.ArkUI.Full * @param intervalID Indicates the timer ID returned by "setInterval()". * @since 7 @@ -90,7 +90,7 @@ export declare function setTimeout(handler: Function | string, delay?: number, . export declare function clearInterval(intervalID?: number): void; /** - * Cancels the timer set by "setTimeout()". + * Cancel the timer set by "setTimeout()". * @syscap SystemCapability.ArkUI.ArkUI.Full * @param timeoutID Indicates the timer ID returned by "setTimeout()". * @since 7 @@ -116,9 +116,9 @@ export declare function getInspectorByKey(id: string): string; * Get components tree. * @since 9 * @test - */ + */ export declare function getInspectorTree(): string; - + /** * Sends an event to the component with the specified ID. * @param id ID of the component for which the event is to be sent. @@ -126,29 +126,29 @@ export declare function getInspectorTree(): string; * @param params Event parameters. If there is no parameter, pass an empty string "". * @since 9 * @test - */ + */ export declare function sendEventByKey(id: string, action: number, params: string): boolean; - + /** * Send touch event. * @param event TouchObject to be sent. * @since 9 * @test - */ + */ export declare function sendTouchEvent(event: TouchObject): boolean; - + /** * Send key event. * @param event KeyEvent to be sent. * @since 9 * @test - */ + */ export declare function sendKeyEvent(event: KeyEvent): boolean; - + /** * Send mouse event. * @param event MouseEvent to be sent. * @since 9 * @test - */ + */ export declare function sendMouseEvent(event: MouseEvent): boolean; diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index 4eb74e0d977ac97c89738ef3d99d906db1bd1945..8d81d6761a033c47882d36763c2d484c6760a4c7 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -21,13 +21,13 @@ * @since 7 */ declare namespace curves { - /** + /** * enum Curve. * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ - enum Curve { + enum Curve { Linear, Ease, EaseIn, @@ -41,15 +41,16 @@ declare namespace curves { Rhythm, Smooth, Friction, - } + } /** * Interface for curve object. * @typedef ICurve * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 - */ - interface ICurve { + */ + interface ICurve { + /** * Get curve value by fraction. * @param { number } fraction @@ -66,8 +67,8 @@ declare namespace curves { * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 - */ - function initCurve(curve?: Curve): ICurve; + */ + function initCurve(curve?: Curve): ICurve; /** * Initializes the interpolator curve when called. @@ -75,10 +76,11 @@ declare namespace curves { * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 - * @deprecated since 9 - */ - function init(curve?: Curve): string; - + * @deprecated since 9 + * @useinstead initCurve + */ + function init(curve?: Curve): string; + /** * Constructs a step curve when called. * @param { number } count @@ -86,9 +88,9 @@ declare namespace curves { * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 - */ - function stepsCurve(count: number, end: boolean): ICurve; - + */ + function stepsCurve(count: number, end: boolean): ICurve; + /** * Constructs a step curve when called. * @param { number } count @@ -96,10 +98,11 @@ declare namespace curves { * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 - * @deprecated since 9 - */ - function steps(count: number, end: boolean): string; - + * @deprecated since 9 + * @useinstead stepsCurve + */ + function steps(count: number, end: boolean): string; + /** * Constructs a third-order Bezier curve when called. * @param { number } x1 @@ -108,9 +111,9 @@ declare namespace curves { * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 - */ - function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; - + */ + function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; + /** * Constructs a third-order Bezier curve when called. * @param { number } x1 @@ -119,10 +122,11 @@ declare namespace curves { * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 - * @deprecated since 9 - */ - function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; - + * @deprecated since 9 + * @useinstead cubicBezierCurve + */ + function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; + /** * Constructs a spring curve when called. * @param { number } velocity @@ -132,9 +136,9 @@ declare namespace curves { * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 - */ - function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; - + */ + function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + /** * Constructs a spring curve when called. * @param { number } velocity @@ -144,9 +148,10 @@ declare namespace curves { * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 - * @deprecated since 9 - */ - function spring(velocity: number, mass: number, stiffness: number, damping: number): string; + * @deprecated since 9 + * @useinstead springCurve + */ + function spring(velocity: number, mass: number, stiffness: number, damping: number): string; /** * Constructs a spring motion when called. @@ -158,8 +163,8 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @systemapi - */ - function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + */ + function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; /** * Constructs a responsive spring motion when called. @@ -171,8 +176,8 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 * @systemapi - */ - function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + */ + function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; } diff --git a/api/@system.mediaquery.d.ts b/api/@system.mediaquery.d.ts index 445cd2d1ee6c646ceddebbbd3c82b0d937fc9f46..24e38ea0da2ca59662ba1d11bac15e320aef69fb 100644 --- a/api/@system.mediaquery.d.ts +++ b/api/@system.mediaquery.d.ts @@ -19,12 +19,12 @@ * @since 3 */ export interface MediaQueryEvent { - /** + /** * The result of match result. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ - matches: boolean; + matches: boolean; } /** @@ -33,55 +33,55 @@ export interface MediaQueryEvent { * @since 3 */ export interface MediaQueryList { - /** + /** * Serialized media query condition. * This parameter is read-only. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ - media?: string; + media?: string; /** * Whether the query is successful. True if the query condition is matched successfully, false otherwise. * This parameter is read-only. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - matches?: boolean; + */ + matches?: boolean; /** * Called when the matches value changes. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - onchange?: (matches: boolean) => void; + */ + onchange?: (matches: boolean) => void; /** * Adds a listening function to MediaQueryList. * The listening function must be added before onShow is called, that is, added to the onInit or onReady function. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - addListener(callback: (event: MediaQueryEvent) => void): void; + */ + addListener(callback: (event: MediaQueryEvent) => void): void; /** * Removes a listening function from MediaQueryList. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - removeListener(callback: (event: MediaQueryEvent) => void): void; + */ + removeListener(callback: (event: MediaQueryEvent) => void): void; } /** - * Defines the mediaqurey interface. + * Defines the mediaquery interface. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ export default class MediaQuery { - /** + /** * Queries a media item and returns a MediaQueryList object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ - static matchMedia(condition: string): MediaQueryList; + static matchMedia(condition: string): MediaQueryList; } diff --git a/api/@system.router.d.ts b/api/@system.router.d.ts index 0867df975c4ec5ef7654ac8ddd35db46df7881be..08f9b532d861be51c9179556644e69f80d20e7d3 100644 --- a/api/@system.router.d.ts +++ b/api/@system.router.d.ts @@ -16,11 +16,12 @@ /** * Defines the option of router. * @syscap SystemCapability.ArkUI.ArkUI.Lite - * @deprecated since 8, please use @ohos.router instead. + * @deprecated since 8 + * @useinstead @ohos.router * @since 3 */ export interface RouterOptions { - /** + /** * URI of the destination page, which supports the following formats: * 1. Absolute path of the page, which is provided by the pages list in the config.json file. * Example: @@ -30,7 +31,7 @@ export interface RouterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 3 */ - uri: string; + uri: string; /** * Data that needs to be passed to the destination page during navigation. @@ -38,207 +39,212 @@ export interface RouterOptions { * For example, this.data1 (data1 is the key value of the params used for page navigation.) * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 3 - */ - params?: Object; + */ + params?: Object; } /** * Defines the option of router back. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @deprecated since 8, please use @ohos.router instead. + * @deprecated since 8 + * @useinstead @ohos.router * @since 7 */ export interface BackRouterOptions { - /** + /** * Returns to the page of the specified path. * If the page with the specified path does not exist in the page stack, router.back() is called by default. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ - uri?: string; + uri?: string; /** * Data that needs to be passed to the destination page during navigation. * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 7 - */ - params?: Object; + */ + params?: Object; } /** * Defines the state of router. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @deprecated since 8, please use @ohos.router instead. + * @deprecated since 8 + * @useinstead @ohos.router * @since 3 */ export interface RouterState { - /** + /** * Index of the current page in the stack. * NOTE: The index starts from 1 from the bottom to the top of the stack. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ - index: number; + index: number; /** * Name of the current page, that is, the file name. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - name: string; + */ + name: string; /** * Path of the current page. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - path: string; + */ + path: string; } /** * Defines the option of EnableAlertBeforeBackPage. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @deprecated since 8, please use @ohos.router instead. + * @deprecated since 8 + * @useinstead @ohos.router * @since 6 */ export interface EnableAlertBeforeBackPageOptions { - /** + /** * dialog context. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ - message: string; + message: string; /** * Called when the dialog box is displayed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 - */ - success?: (errMsg: string) => void; + */ + success?: (errMsg: string) => void; /** * Called when the operation is cancelled. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 - */ - cancel?: (errMsg: string) => void; + */ + cancel?: (errMsg: string) => void; /** * Called when the dialog box is closed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 - */ - complete?: () => void; + */ + complete?: () => void; } /** * Defines the option of DisableAlertBeforeBackPage. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @deprecated since 8, please use @ohos.router instead. + * @deprecated since 8 + * @useinstead @ohos.router * @since 6 */ export interface DisableAlertBeforeBackPageOptions { - /** + /** * Called when the dialog box is displayed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 */ - success?: (errMsg: string) => void; + success?: (errMsg: string) => void; /** * Called when the operation is cancelled. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 - */ - cancel?: (errMsg: string) => void; + */ + cancel?: (errMsg: string) => void; /** * Called when the dialog box is closed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 6 - */ - complete?: () => void; + */ + complete?: () => void; } type ParamsInterface = { - [key: string]: Object; +[key: string]: Object; }; /** * Defines the Router interface. * @syscap SystemCapability.ArkUI.ArkUI.Lite - * @deprecated since 8, please use @ohos.router instead. + * @deprecated since 8 + * @useinstead @ohos.router * @since 3 */ export default class Router { - /** + /** * Navigates to a specified page in the application based on the page URL and parameters. * @param options Options. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ - static push(options: RouterOptions): void; + static push(options: RouterOptions): void; /** * Replaces the current page with another one in the application. The current page is destroyed after replacement. * @syscap SystemCapability.ArkUI.ArkUI.Lite * @param options Options. * @since 3 - */ - static replace(options: RouterOptions): void; + */ + static replace(options: RouterOptions): void; /** * Returns to the previous page or a specified page. * @syscap SystemCapability.ArkUI.ArkUI.Full * @param options Options. * @since 3 - */ - static back(options?: BackRouterOptions): void; + */ + static back(options?: BackRouterOptions): void; /** * Obtains information about the current page params. * @syscap SystemCapability.ArkUI.ArkUI.Full * @returns Page params. * @since 7 - */ - static getParams(): ParamsInterface; + */ + static getParams(): ParamsInterface; /** * Clears all historical pages and retains only the current page at the top of the stack. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - static clear(): void; + */ + static clear(): void; /** * Obtains the number of pages in the current stack. * @returns Number of pages in the stack. The maximum value is 32. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 - */ - static getLength(): string; + */ + static getLength(): string; /** * Obtains information about the current page state. * @syscap SystemCapability.ArkUI.ArkUI.Full * @returns Page state. * @since 3 - */ - static getState(): RouterState; + */ + static getState(): RouterState; /** * Pop up dialog to ask whether to back * @syscap SystemCapability.ArkUI.ArkUI.Full * @param options Options. * @since 6 - */ - static enableAlertBeforeBackPage(options: EnableAlertBeforeBackPageOptions): void; + */ + static enableAlertBeforeBackPage(options: EnableAlertBeforeBackPageOptions): void; /** * cancel enableAlertBeforeBackPage * @syscap SystemCapability.ArkUI.ArkUI.Full * @param options Options. * @since 6 - */ - static disableAlertBeforeBackPage(options?: DisableAlertBeforeBackPageOptions): void; + */ + static disableAlertBeforeBackPage(options?: DisableAlertBeforeBackPageOptions): void; } diff --git a/api/common/full/dom.d.ts b/api/common/full/dom.d.ts index 6d9ea5aeeae658167606152d6a6901a1c23cbc0f..bb6ee1e7b17df0e47b8ca824dd1ffa730756810f 100644 --- a/api/common/full/dom.d.ts +++ b/api/common/full/dom.d.ts @@ -20,10 +20,10 @@ import { Element } from './viewmodel'; * @since 8 */ export declare class dom { - /** - * create a dynamic dom by tag, rturn element + /** + * create a dynamic dom by tag, return element * @param tag dom tag * @since 8 */ - static createElement(tag: string): Element + static createElement(tag: string): Element } diff --git a/api/common/full/viewmodel.d.ts b/api/common/full/viewmodel.d.ts index 06b578c7fd23c3d18b30769cf2e4ccc94282f23d..e21af505a8eba7c1ad8d09e3663cd41d5df4028d 100644 --- a/api/common/full/viewmodel.d.ts +++ b/api/common/full/viewmodel.d.ts @@ -20,16 +20,16 @@ import image from "../../@ohos.multimedia.image"; import { CanvasPattern } from './canvaspattern'; /** - * Defines the foucs param. + * Defines the focus param. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 3 */ export interface FocusParamObj { - /** + /** * Whether needs to focus. * @since 3 */ - focus: boolean; + focus: boolean; } /** @@ -37,22 +37,22 @@ export interface FocusParamObj { * @since 6 */ export interface RectObj { - /** + /** * @since 6 */ - width: number; - /** + width: number; + /** * @since 6 */ - height: number; - /** + height: number; + /** * @since 6 */ - left: number; - /** + left: number; + /** * @since 6 */ - top: number; + top: number; } /** @@ -60,10 +60,10 @@ export interface RectObj { * @since 6 */ export interface ContextAttrOptions { - /** + /** * @since 6 */ - antialias: boolean; + antialias: boolean; } /** @@ -71,74 +71,74 @@ export interface ContextAttrOptions { * @since 4 */ export interface AnimateStyle { - /** + /** * Width value applied to the component after the animation is executed. * @since 4 */ - width: number; - /** + width: number; + /** * Height value applied to the component after the animation is executed. * @since 4 */ - height: number; - /** + height: number; + /** * left offset applied to the component after the animation is executed. * @since 4 */ - left: number; - /** + left: number; + /** * top offset applied to the component after the animation is executed. * @since 4 */ - top: number; - /** + top: number; + /** * right offset applied to the component after the animation is executed. * @since 4 */ - right: number; - /** + right: number; + /** * bottom offset applied to the component after the animation is executed. * @since 4 */ - bottom: number; - /** + bottom: number; + /** * Background color applied to the component after the animation is executed. * The default value is none. * @since 4 */ - backgroundColor: string; - /** + backgroundColor: string; + /** * Opacity applied to the component. The value ranges from 0 to 1. * The default value is 1. * @since 4 */ - opacity: number; - /** + opacity: number; + /** * The value format is "x y", in percentage or pixels. * The first value indicates the horizontal position, and the second value indicates the vertical position. * If only one value is specified, the other value is 50% by default. * @since 4 */ - backgroundPosition: string; - /** + backgroundPosition: string; + /** * Origin position of the transformed element. * The first value indicates the x-axis position. The value can be left, center, right, a length, or percentage. * The second value indicates the y-axis position. The value can be top, center, bottom, a length, or a percentage. * @since 4 */ - transformOrigin: string; - /** + transformOrigin: string; + /** * Transformation type applied to an element. * @since 4 */ - transform: "none" | TransformObject; - /** + transform: "none" | TransformObject; + /** * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided. * If there are only two frames, offset can be left empty. * If there are more than two frames, offset is mandatory. * @since 4 */ - offset?: number; + offset?: number; } /** @@ -146,7 +146,7 @@ export interface AnimateStyle { * @since 4 */ export interface TransformObject { - /** + /** * Defines a 2D transformation, using a matrix of six values.. * @param scaleX the scale value for x-axis * @param skewX the skew value for y-axis @@ -156,8 +156,8 @@ export interface TransformObject { * @param translateY the translate value for y-axis * @since 6 */ - matrix(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; - /** + matrix(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; + /** * Defines a 3D transformation using a 4x4 matrix of 16 values. * @param n00 the value of the 0 row and 0 column of the 4x4 matrix * @param n01 the value of the 0 row and 1 column of the 4x4 matrix @@ -177,7 +177,7 @@ export interface TransformObject { * @param n33 the value of the 3 row and 3 column of the 4x4 matrix * @since 6 */ - matrix3d( + matrix3d( n00: number, n01: number, n02: number, @@ -194,80 +194,80 @@ export interface TransformObject { n31: number, n32: number, n33: number, - ): void; - /** + ): void; + /** * Defines 2D transformations for translation of the X and Y axes * @param x the translate value for x-axis * @param y the translate value for y-axis * @since 4 */ - translate(x: number, y: number): void; - /** + translate(x: number, y: number): void; + /** * Defines 3D transformations for translation of the X / Y / Z axes * @param x the translate value for x-axis * @param y the translate value for y-axis * @param z the translate value for z-axis * @since 6 */ - translate3d(x: number, y: number, z: number): void; - /** + translate3d(x: number, y: number, z: number): void; + /** * Defines 2D transformations for translation of the X axes * @param x the translate value for x-axis * @since 4 */ - translateX(x: number): void; - /** + translateX(x: number): void; + /** * Defines 2D transformations for translation of the Y axes * @param y the translate value for y-axis * @since 4 */ - translateY(y: number): void; - /** + translateY(y: number): void; + /** * Defines 3D transformations for translation of the Z axes * @param z the translate value for z-axis * @since 6 */ - translateZ(z: number): void; - /** + translateZ(z: number): void; + /** * Defines 2D transformations for scaling of the X and Y axes * @param x the scale value for x-axis * @param y the scale value for y-axis * @since 4 */ - scale(x: number, y: number): void; - /** + scale(x: number, y: number): void; + /** * Defines 3D transformations for scaling of the X / Y / Z axes * @param x the scale value for x-axis * @param y the scale value for y-axis * @param z the scale value for z-axis * @since 6 */ - scale3d(x: number, y: number, z: number): void; - /** + scale3d(x: number, y: number, z: number): void; + /** * Defines 2D transformations for scaling of the X axes * @param x the scale value for x-axis * @since 4 */ - scaleX(x: number): void; - /** + scaleX(x: number): void; + /** * Defines 2D transformations for scaling of the Y axes * @param y the scale value for y-axis * @since 4 */ - scaleY(y: number): void; - /** + scaleY(y: number): void; + /** * Defines 3D transformations for scaling of the Z axes * @param z the scale value for z-axis * @since 6 */ - scaleZ(z: number): void; - /** + scaleZ(z: number): void; + /** * Define the 2D rotation and specify the angle in the parameters. * @param angle the rotate value for z-axis * @since 4 */ - rotate(angle: number): void; - /** + rotate(angle: number): void; + /** * Defines a 3D transformation for rotating the X / Y / Z axes. * @param x the vector value of the x-axis * @param y the vector value of the y-axis @@ -275,50 +275,50 @@ export interface TransformObject { * @param angle the rotate value for x&y&z vector. * @since 6 */ - rotate3d(x: number, y: number, z: number, angle: number): void; - /** + rotate3d(x: number, y: number, z: number, angle: number): void; + /** * Defines 3D transformations for rotating of the X axes. * @param x the scale value for x-axis * @since 4 */ - rotateX(angle: number): void; - /** + rotateX(angle: number): void; + /** * Defines 3D transformations for rotating of the Y axes. * @param y the scale value for y-axis * @since 4 */ - rotateY(angle: number): void; - /** + rotateY(angle: number): void; + /** * Defines 3D transformations for rotating of the Z axes. * @param z the scale value for z-axis * @since 6 */ - rotateZ(angle: number): void; - /** + rotateZ(angle: number): void; + /** * Defines the 2D skew transition along the X and Y axes. * @param xAngle the angle of inclination along the x axis. * @param yAngle the angle of inclination along the y axis. * @since 6 */ - skew(xAngle: number, yAngle: number): void; - /** + skew(xAngle: number, yAngle: number): void; + /** * Defines the 2D skew transition along the X axes. * @param angle the angle of inclination along the x axis. * @since 6 */ - skewX(angle: number): void; - /** + skewX(angle: number): void; + /** * Defines the 2D skew transition along the Y axes. * @param angle the angle of inclination along the y axis. * @since 6 */ - skewY(angle: number): void; - /** + skewY(angle: number): void; + /** * Defines a perspective view for the 3D transformation element. * @param n the vertical distance from the observation point to the component plane. * @since 6 */ - perspective(verticalDistance: number): void; + perspective(verticalDistance: number): void; } /** @@ -326,12 +326,12 @@ export interface TransformObject { * @since 4 */ export interface AnimateOptions { - /** + /** * Duration of the animation, in milliseconds. * The default value is 0. * @since 4 */ - duration: number; + duration: number; /** * Time curve of the animation. For details about the supported types. @@ -352,37 +352,37 @@ export interface AnimateOptions { * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. * The default value is ease. * @since 4 - */ - easing: string; + */ + easing: string; /** * Delay for the animation start. The default value indicates no delay. * The default value is 0. * @since 4 - */ - delay: number; + */ + delay: number; /** * Number of times the animation will be played. number indicates a fixed number of playback operations, and Infinity indicates an unlimited number of playback operations. * The default value is 1. * @since 4 - */ - iterations: number | string; + */ + iterations: number | string; /** * The animation playback mode. * The default value is "normal". * @since 6 - */ - direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; + */ + direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; /** * Whether to resume to the initial state after the animation is executed. * none: The initial state is restored after the animation is executed. * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. * @since 4 - */ - fill: "none" | "forwards" | "backwards" | "both"; + */ + fill: "none" | "forwards" | "backwards" | "both"; } /** @@ -390,17 +390,17 @@ export interface AnimateOptions { * @since 4 */ export interface AnimationResult { - /** + /** * Read-only attribute, which indicates whether the animation playback is complete. * @since 4 */ - finished: boolean; - /** + finished: boolean; + /** * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations (for example, start an animation with a delay). * @since 4 */ - pending: boolean; - /** + pending: boolean; + /** * Animation running state: * idle: The animation is not running (playback ended or not started). * running: The animation is running. @@ -408,57 +408,57 @@ export interface AnimationResult { * finished: Animation playback ends. * @since 4 */ - playstate: string; - /** + playstate: string; + /** * Animation start time. This attribute is similar to that of delay in the options parameters. * @since 4 */ - startTime: number; - /** + startTime: number; + /** * Starts the animation. * @since 4 */ - play(): void; - /** + play(): void; + /** * Ends the animation. * @since 4 */ - finish(): void; - /** + finish(): void; + /** * Pauses the animation. * @since 4 */ - pause(): void; - /** + pause(): void; + /** * Cancels the animation. * @since 4 */ - cancel(): void; - /** + cancel(): void; + /** * Plays the animation in reverse direction. * @since 4 */ - reverse(): void; - /** + reverse(): void; + /** * The animation is started. * @since 4 */ - onstart: () => void; - /** + onstart: () => void; + /** * The animation is finished. * @since 4 */ - onfinish: () => void; - /** + onfinish: () => void; + /** * The animation is canceled. * @since 4 */ - oncancel: () => void; - /** + oncancel: () => void; + /** * The animation is repeated. * @since 4 */ - onrepeat: () => void; + onrepeat: () => void; } /** @@ -466,7 +466,7 @@ export interface AnimationResult { * @since 4 */ export interface Element { - /** + /** * Requests or cancels the focus for a component. * If focus is set to true, the focus is requested for the component. * If focus is set to false, the focus is canceled for the component. @@ -474,7 +474,7 @@ export interface Element { * @param obj { focus: true | false } * @since 4 */ - focus(obj?: FocusParamObj): void; + focus(obj?: FocusParamObj): void; /** * Requests or cancels the crown rotation focus for a component. @@ -483,8 +483,8 @@ export interface Element { * This attribute can be defaulted to true. * @param obj { focus: true | false } * @since 4 - */ - rotation(obj?: FocusParamObj): void; + */ + rotation(obj?: FocusParamObj): void; /** * Creates and runs an animation shortcut on the component. Specify the keyframes and options required for the animation. @@ -492,45 +492,45 @@ export interface Element { * @param options Options. is used to describe animation parameters. * @returns This method returns the animation object. * @since 4 - */ - animate(keyframes: Array, options: AnimateOptions): AnimationResult; + */ + animate(keyframes: Array, options: AnimateOptions): AnimationResult; /** * Obtains the size and position of the element. * @returns RectObj the size position of the element. * @since 6 - */ - getBoundingClientRect(): RectObj; + */ + getBoundingClientRect(): RectObj; /** * Obtains attributes of the element. * @returns attributes of the element in json string. * @since 8 * @systemapi - */ - getInspector(): string; + */ + getInspector(): string; /** * If 0.5 is returned, 50% of the current component is visible. * @param radios Scope of Monitoring components. * @since 6 - */ - createIntersectionObserver(param: { ratios: Array }): observer; + */ + createIntersectionObserver(param: { ratios: Array }): observer; /** * Adds a node to the end of the child node list of the current node. * @param child Subnode object to be added * @since 8 - */ - addChild(child: Element): void; + */ + addChild(child: Element): void; /** * Sets the value of an attribute on a specified element. If the attribute already exists, update the value. Otherwise, a new attribute is added with the specified name and value. * @param name attribute name * @param value attribute value¡¢ * @since 8 - */ - setAttribute(name: string, value: string): void; + */ + setAttribute(name: string, value: string): void; /** * Sets a style value on a specified element. If the style exists and the style value is valid, the setting is successful. Otherwise, the setting is invalid. @@ -538,8 +538,8 @@ export interface Element { * @param value style value * @returns If the setting is successful, true is returned. If the setting fails, false is returned. * @since 8 - */ - setStyle(name: string, value: string): boolean; + */ + setStyle(name: string, value: string): boolean; } /** @@ -548,17 +548,17 @@ export interface Element { * @since 6 */ export interface observer { - /** + /** * Turn on the listener. * @since 6 */ - observe(callback: string): void; + observe(callback: string): void; /** - * Turn off the listenerr. + * Turn off the listener. * @since 6 - */ - unobserve(): void; + */ + unobserve(): void; } /** @@ -567,31 +567,31 @@ export interface observer { * @since 4 */ export interface AnimationElement extends Element { - /** + /** * Starts the animation. * @since 4 */ - play(): void; - /** + play(): void; + /** * Ends the animation. * @since 4 */ - finish(): void; - /** + finish(): void; + /** * Pauses the animation. * @since 4 */ - pause(): void; - /** + pause(): void; + /** * Cancels the animation. * @since 4 */ - cancel(): void; - /** + cancel(): void; + /** * Plays the animation in reverse direction. * @since 4 */ - reverse(): void; + reverse(): void; } /** @@ -599,23 +599,23 @@ export interface AnimationElement extends Element { * @since 4 */ export interface ScrollParam { - /** + /** * Offset for scrolling in the horizontal direction, in px. * @since 4 */ - dx?: number; + dx?: number; /** * Offset for scrolling in the vertical direction, in px. * @since 4 - */ - dy?: number; + */ + dy?: number; /** * Whether a sliding animation is displayed when scroll position is changed. * @since 4 - */ - smooth?: boolean; + */ + smooth?: boolean; } /** @@ -623,17 +623,17 @@ export interface ScrollParam { * @since 4 */ export interface CurrentOffsetResultValue { - /** + /** * Scrolling offset in the x-axis, in px. * @since 4 */ - x: number; + x: number; /** * Scrolling offset in the y-axis, in px. * @since 4 - */ - y: number; + */ + y: number; } /** @@ -641,11 +641,11 @@ export interface CurrentOffsetResultValue { * @since 4 */ export interface ListScrollToOptions { - /** + /** * specified position. * @since 4 */ - index: number; + index: number; } /** @@ -653,34 +653,34 @@ export interface ListScrollToOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full */ export interface ListElement extends Element { - /** + /** * Scrolls the list to the position of the item at the specified index. * @since 4 */ - scrollTo(position: ListScrollToOptions): void; + scrollTo(position: ListScrollToOptions): void; /** * Scrolls the list for a certain distance. * This method applies only to smart TVs. * @since 4 - */ - scrollBy(data: ScrollParam): void; + */ + scrollBy(data: ScrollParam): void; /** * If smooth is set to false (default value), the list is directly scrolled to the top. * If smooth is set to true, the list is smoothly scrolled to the top. * @param param * @since 4 - */ - scrollTop(param: { smooth: boolean }): void; + */ + scrollTop(param: { smooth: boolean }): void; /** * If smooth is set to false (default value), the list is directly scrolled to the bottom. * If smooth is set to true, the list is smoothly scrolled to the bottom. * @param param * @since 4 - */ - scrollBottom(param: { smooth: boolean }): void; + */ + scrollBottom(param: { smooth: boolean }): void; /** * If reverse is set to false (default value), the next page is displayed. If there is no next page, the list scrolls to the bottom. @@ -689,8 +689,8 @@ export interface ListElement extends Element { * If smooth is set to true, the list is smoothly scrolled to another page. * @param params * @since 4 - */ - scrollPage(params: { reverse: boolean; smooth: boolean }): void; + */ + scrollPage(params: { reverse: boolean; smooth: boolean }): void; /** * If reverse is set to false (default value), the list scrolls towards the bottom for a certain distance. If there is no sufficient distance, the list scrolls to the bottom. @@ -699,15 +699,16 @@ export interface ListElement extends Element { * If smooth is set to true, the list is smoothly scrolled. * @param params * @since 4 - */ - scrollArrow(params: { reverse: boolean; smooth: boolean }): void; + */ + scrollArrow(params: { reverse: boolean; smooth: boolean }): void; /** * Collapses a group. * @param param * @since 4 - */ - collapseGroup(param: { + */ + collapseGroup(param: { + /** * groupid: ID of the group to collapse. * All groups are collapsed when groupid is not specified. @@ -719,8 +720,9 @@ export interface ListElement extends Element { * Expands a group. * @param param * @since 4 - */ - expandGroup(param: { + */ + expandGroup(param: { + /** * groupid: ID of the group to expand. * All groups are expanded when groupid is not specified. @@ -731,8 +733,8 @@ export interface ListElement extends Element { /** * Returns the offset of the current scrolling. The return value type is Object. * @since 4 - */ - currentOffset(): CurrentOffsetResultValue; + */ + currentOffset(): CurrentOffsetResultValue; } /** @@ -741,28 +743,28 @@ export interface ListElement extends Element { * @since 4 */ export interface SwiperElement extends Element { - /** + /** * Scrolls the child component to the position at the specified index. * @since 4 */ - swipeTo(position: { + swipeTo(position: { /** * specified position. */ index: number; - }): void; + }): void; /** * Shows the next child component. * @since 4 - */ - showNext(): void; + */ + showNext(): void; /** * Shows the previous child component. * @since 4 - */ - showPrevious(): void; + */ + showPrevious(): void; } /** @@ -770,32 +772,32 @@ export interface SwiperElement extends Element { * @syscap SystemCapability.ArkUI.ArkUI.Full */ export interface CameraTakePhotoOptions { - /** + /** * Picture quality. * @since 6 */ - quality: "high" | "normal" | "low"; + quality: "high" | "normal" | "low"; /** * Callback function for successful interface invocation. * @param result the request execution result. * @since 6 - */ - success?: (result: Object) => void; + */ + success?: (result: Object) => void; /** * Callback function for interface invocation failure. * @param result the request execution result. * @since 6 - */ - fail?: (result: Object) => void; + */ + fail?: (result: Object) => void; /** * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully). * @param result the request execution result. * @since 6 - */ - complete?: (result: Object) => void; + */ + complete?: (result: Object) => void; } /** @@ -804,12 +806,12 @@ export interface CameraTakePhotoOptions { * @since 6 */ export interface CameraElement extends Element { - /** + /** * Take photos with specified parameters. * @param options the parameters of camera. * @since 6 */ - takePhoto(options: CameraTakePhotoOptions): void; + takePhoto(options: CameraTakePhotoOptions): void; } /** @@ -818,11 +820,11 @@ export interface CameraElement extends Element { * @since 6 */ export interface WebElement extends Element { - /** + /** * Reload the web page content * @since 6 */ - reload(): void; + reload(): void; } /** @@ -831,16 +833,16 @@ export interface WebElement extends Element { * @since 4 */ export interface DialogElement extends Element { - /** + /** * Shows a dialog box. * @since 4 */ - show(): void; - /** + show(): void; + /** * Closes a dialog box. * @since 4 */ - close(): void; + close(): void; } /** @@ -849,34 +851,34 @@ export interface DialogElement extends Element { * @since 4 */ export interface ImageAnimatorElement extends Element { - /** + /** * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame. * @since 4 */ - start(): void; - /** + start(): void; + /** * Pauses the frame animation playback of an image. * @since 4 */ - pause(): void; - /** + pause(): void; + /** * Stops the frame animation playback of an image. * @since 4 */ - stop(): void; - /** + stop(): void; + /** * Resumes the frame animation playback of an image. * @since 4 */ - resume(): void; - /** + resume(): void; + /** * Obtains the playback state. Available values are as follows: * Playing * Paused * Stopped * @since 4 */ - getState(): "Playing" | "Paused" | "Stopped"; + getState(): "Playing" | "Paused" | "Stopped"; } /** @@ -886,17 +888,17 @@ export interface ImageAnimatorElement extends Element { * @since 4 */ export interface MarqueeElement extends Element { - /** + /** * Starts scrolling. * @since 4 */ - start(): void; + start(): void; /** * Stops scrolling. * @since 4 - */ - stop(): void; + */ + stop(): void; } /** @@ -905,7 +907,7 @@ export interface MarqueeElement extends Element { * @since 4 */ export interface MenuElement extends Element { - /** + /** * Displays the menu. * x and y specify the position of the displayed menu. * x indicates the X-axis coordinate from the left edge of the visible area, and does not include any scrolling offset. @@ -916,7 +918,7 @@ export interface MenuElement extends Element { * @param position * @since 4 */ - show(position: { x: number; y: number }): void; + show(position: { x: number; y: number }): void; } /** @@ -925,14 +927,14 @@ export interface MenuElement extends Element { * @since 4 */ export interface ChartElement extends Element { - /** + /** * Data is dynamically added to an existing data sequence. * The target sequence is specified based on serial, which is the subscript of the datasets array and starts from 0. * datasets[index].data is not updated. Only line charts support this attribute. * The value is incremented by 1 based on the horizontal coordinate and is related to the xAxis min/max setting. * @since 4 */ - append(params: { + append(params: { /** * Set the data subscript of the line chart to be updated. */ @@ -941,7 +943,7 @@ export interface ChartElement extends Element { * Set the new data. */ data: Array; - }): void; + }): void; } /** @@ -950,27 +952,27 @@ export interface ChartElement extends Element { * @since 4 */ export interface InputElement extends Element { - /** + /** * Obtains or loses the focus of a component. * When the component type is set to text, email, date, time, number, or password, the input method can be displayed or collapsed. * @param param If focus is not passed, the default value true is used. * @since 4 */ - focus(param: { focus: boolean }): void; + focus(param: { focus: boolean }): void; /** * Displays the error message. * This attribute is available when the component type is set to text, email, date, time, number, or password. * @param param * @since 4 - */ - showError(param: { error: string }): void; + */ + showError(param: { error: string }): void; /** * Deletes the previous character at the cursor position. * @since 6 - */ - delete(): void; + */ + delete(): void; } /** @@ -979,7 +981,7 @@ export interface InputElement extends Element { * @since 4 */ export interface ButtonElement extends Element { - /** + /** * Progress bar of the download button. * The value ranges from 0 to 100. The progress bar is displayed if the value is greater than 0. * If the value is greater than or equal to 100, the progress bar is not displayed. @@ -988,7 +990,7 @@ export interface ButtonElement extends Element { * @param param * @since 4 */ - setProgress(param: { progress: number }): void; + setProgress(param: { progress: number }): void; } /** @@ -997,12 +999,12 @@ export interface ButtonElement extends Element { * @since 4 */ export interface TextAreaElement extends Element { - /** + /** * Obtains or loses the focus of a component, which can display or collapse the input method. * @param param If focus is not passed, the default value true is used. * @since 4 */ - focus(param: { focus: boolean }): void; + focus(param: { focus: boolean }): void; } /** @@ -1011,11 +1013,11 @@ export interface TextAreaElement extends Element { * @since 4 */ export interface PickerElement extends Element { - /** + /** * Displays the picker. * @since 4 */ - show(): void; + show(): void; } /** @@ -1024,43 +1026,43 @@ export interface PickerElement extends Element { * @since 4 */ export interface VideoElement extends Element { - /** + /** * Requests to start playing a video. * @since 4 */ - start(): void; + start(): void; /** * Requests to pause a video. * @since 4 - */ - pause(): void; + */ + pause(): void; /** * Specifies the video playing position. * @param param * @since 4 - */ - setCurrentTime(param: { currenttime: number }): void; + */ + setCurrentTime(param: { currenttime: number }): void; /** * Requests to enter the full screen mode. * @param param * @since 4 - */ - requestFullscreen(param: { screenOrientation: "default" }): void; + */ + requestFullscreen(param: { screenOrientation: "default" }): void; /** * Requests to exit the full screen mode. * @since 4 - */ - exitFullscreen(): void; + */ + exitFullscreen(): void; /** * Requests to stop playing a video. * @since 6 - */ - stop(): void; + */ + stop(): void; } /** @@ -1068,14 +1070,14 @@ export interface VideoElement extends Element { * @since 4 */ export interface TextMetrics { - /** + /** * @since 4 */ - width: number; - /** + width: number; + /** * @since 8 */ - height: number; + height: number; } /** @@ -1085,12 +1087,12 @@ export interface TextMetrics { * @since 7 */ export interface OffscreenCanvasRenderingContext2D { - /** + /** * Gets the dotted spacing of a line. * Returns the current line segment style array containing an even number of non-negative numbers. * @since 7 */ - getLineDash: Array; + getLineDash: Array; /** * Fill style attribute. @@ -1098,8 +1100,8 @@ export interface OffscreenCanvasRenderingContext2D { * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object. * Canvas pattern. You can call createPattern() to create a CanvasPattern object. * @since 7 - */ - fillStyle?: string | CanvasGradient | CanvasPattern; + */ + fillStyle?: string | CanvasGradient | CanvasPattern; /** * Sets the stroke paint style. @@ -1107,15 +1109,15 @@ export interface OffscreenCanvasRenderingContext2D { * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object. * Canvas pattern. You can call createPattern() to create a CanvasPattern object. * @since 7 - */ - strokeStyle?: string | CanvasGradient | CanvasPattern; + */ + strokeStyle?: string | CanvasGradient | CanvasPattern; /** * Sets the dotted spacing of a line. * @param segments A set of numbers describing the length of alternating drawn line segments and spacing (coordinate space units). * @since 7 - */ - setLineDash(segments: Array): void; + */ + setLineDash(segments: Array): void; /** * Draw an Image object. @@ -1125,8 +1127,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param dw Image The width drawn on the target canvas. * @param dh Image The height drawn on the target canvas. * @since 7 - */ - drawImage(image: Image, dx: number, dy: number, dw: number, dh: number): void; + */ + drawImage(image: Image, dx: number, dy: number, dw: number, dh: number): void; /** * Draw an Image object. @@ -1140,8 +1142,9 @@ export interface OffscreenCanvasRenderingContext2D { * @param sw The width of the image's rectangular (clipped) selection box that needs to be drawn into the target context. * @param sh The height of the image's rectangular (clipped) selection box that needs to be drawn into the target context. * @since 7 - */ - drawImage( + */ + drawImage( + image: Image, sx: number, sy: number, @@ -1161,8 +1164,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param dw Image The width drawn on the target canvas. * @param dh Image The height drawn on the target canvas. * @since 9 - */ - drawImage(image: image.PixelMap, dx: number, dy: number, dw: number, dh: number): void; + */ + drawImage(image: image.PixelMap, dx: number, dy: number, dw: number, dh: number): void; /** * Draw an Image object. @@ -1176,8 +1179,9 @@ export interface OffscreenCanvasRenderingContext2D { * @param sw The width of the image's rectangular (clipped) selection box that needs to be drawn into the target context. * @param sh The height of the image's rectangular (clipped) selection box that needs to be drawn into the target context. * @since 9 - */ - drawImage( + */ + drawImage( + image: image.PixelMap, sx: number, sy: number, @@ -1192,20 +1196,20 @@ export interface OffscreenCanvasRenderingContext2D { /** * Creates a drawing path. * @since 7 - */ - beginPath(): void; + */ + beginPath(): void; /** * Crop the current canvas. * @since 7 - */ - clip(): void; + */ + clip(): void; /** * Fills the current canvas with color. * @since 7 - */ - fill(): void; + */ + fill(): void; /** * Check whether the specified coordinate point is on the Path. @@ -1213,8 +1217,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param y The Y coordinate of the detection point. * @returns boolean Return true if the detection point is contained within the current or specified path Otherwise return false. * @since 7 - */ - isPointInPath(x: number, y: number): boolean; + */ + isPointInPath(x: number, y: number): boolean; /** * Check whether the specified coordinate point is on the Path. @@ -1224,8 +1228,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param fillRule This algorithm determines whether a point is in or out of the path. * @returns boolean Return true if the detection point is contained within the current or specified path Otherwise return false. * @since 7 - */ - isPointInPath(path: Path2D, x: number, y: number): boolean; + */ + isPointInPath(path: Path2D, x: number, y: number): boolean; /** * Checks whether the specified coordinate point is on the stroke edge. @@ -1233,8 +1237,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param y The Y coordinate of the detection point. * @returns boolean A Boolean value that returns true when the point is on the line of the path, false otherwise. * @since 7 - */ - isPointInStroke(x: number, y: number): boolean; + */ + isPointInStroke(x: number, y: number): boolean; /** * Checks whether the specified coordinate point is on the stroke edge. @@ -1243,21 +1247,21 @@ export interface OffscreenCanvasRenderingContext2D { * @param y The Y coordinate of the detection point. * @returns boolean A Boolean value that returns true when the point is on the line of the path, false otherwise. * @since 7 - */ - isPointInStroke(path: Path2D, x: number, y: number): boolean; + */ + isPointInStroke(path: Path2D, x: number, y: number): boolean; /** * Stroke draws the current path. * @since 7 - */ - stroke(): void; + */ + stroke(): void; /** * Stroke draws the current path. * @param path The object of Path2D. * @since 7 - */ - stroke(path: Path2D): void; + */ + stroke(path: Path2D): void; /** * Create a radial tween object. @@ -1269,8 +1273,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param r1 The radius of End Circle. * @returns RadialGradient object. * @since 7 - */ - createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; + */ + createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; /** * Create a drawing style template. @@ -1278,8 +1282,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param repetition Specify how to repeat images. * @returns CanvasPattern An opaque object that describes a schema. * @since 7 - */ - createPattern(image: Image, repetition: string): CanvasPattern; + */ + createPattern(image: Image, repetition: string): CanvasPattern; /** * Creates a linear gradient color. @@ -1289,8 +1293,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param y1 Y-coordinate of the end point. * @returns LinearGradient object. * @since 7 - */ - createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; + */ + createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; /** * Create an ImageData object. @@ -1298,32 +1302,32 @@ export interface OffscreenCanvasRenderingContext2D { * @param sh The height of the new object. * @returns ImageData New ImageData object with width and height specified. * @since 7 - */ - createImageData(sw: number, sh: number): ImageData; + */ + createImageData(sw: number, sh: number): ImageData; /** * Create an ImageData object. * @param imagedata Copy an object of the same width and height from an existing ImageData object The image itself is not allowed to be copied. * @returns ImageData New ImageData object with width and height specified. * @since 7 - */ - createImageData(imagedata: ImageData): ImageData; + */ + createImageData(imagedata: ImageData): ImageData; /** * Creates a path that is later used by the CanvasRenderingContext2D object. * @param path another created Path2D object. * @returns the object of Path2D. * @since 7 - */ - createPath2D(path?: Path2D): Path2D; + */ + createPath2D(path?: Path2D): Path2D; /** * Creates a path that is later used by the CanvasRenderingContext2D object. * @param cmds a string defined using the SVG path command. * @returns the object of Path2D. * @since 7 - */ - createPath2D(cmds?: string): Path2D; + */ + createPath2D(cmds?: string): Path2D; /** * Get an ImageData object. @@ -1333,8 +1337,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param sh The height of the rectangular area of the image data to be extracted. * @returns ImageData An ImageData object that contains the rectangular ImageData given by the canvas. * @since 7 - */ - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; + */ + getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; /** * Get an PixelMap object. @@ -1344,8 +1348,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param sh The height of the rectangular area of the image data to be extracted. * @returns getPixelMap An getPixelMap object that contains the rectangular ImageData given by the canvas. * @since 9 - */ - getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap + */ + getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap /** * Draws the specified ImageData object to the canvas. @@ -1353,8 +1357,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param dx The offset of the position of the source image data in the target canvas (the offset in the X-axis direction). * @param dy The offset of the position of the source image data in the target canvas (the Y-axis offset). * @since 7 - */ - putImageData(imagedata: ImageData, dx: number, dy: number): void; + */ + putImageData(imagedata: ImageData, dx: number, dy: number): void; /** * Draws the specified ImageData object to the canvas. @@ -1366,8 +1370,9 @@ export interface OffscreenCanvasRenderingContext2D { * @param dirtyWidth In the source image data, the width of a rectangular region. Default is the width of the image data. * @param dirtyHeight In the source image data, the height of a rectangular region. Default is the height of the image data. * @since 7 - */ - putImageData( + */ + putImageData( + imagedata: ImageData, dx: number, dy: number, @@ -1386,8 +1391,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param endAngle The end point of an arc, expressed in radians. * @param anticlockwise An optional Boolean value. If true, the arc is drawn counterclockwise, and otherwise clockwise. * @since 7 - */ - arc(radius: number, x: number, y: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + */ + arc(radius: number, x: number, y: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; /** * Draws an arc from the beginning to the end. @@ -1397,8 +1402,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param x2 The X-axis coordinates of the second control point. * @param y2 The Y-axis coordinates of the second control point. * @since 7 - */ - arcTo(x1: number, x2: number, y1: number, y2: number, radius: number): void; + */ + arcTo(x1: number, x2: number, y1: number, y2: number, radius: number): void; /** * Draw a third order Bezier curve. @@ -1409,22 +1414,22 @@ export interface OffscreenCanvasRenderingContext2D { * @param x The x-coordinate of the end point. * @param y The y-coordinate of the end point * @since 7 - */ - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; + */ + bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; /** * Closing the current path. * @since 7 - */ - closePath(): void; + */ + closePath(): void; /** * Draw a straight line. * @param x The X-axis coordinates at the end of the line. * @param y The Y-axis coordinates at the end of the line. * @since 7 - */ - lineTo(x: number, y: number): void; + */ + lineTo(x: number, y: number): void; /** * Draw an ellipse. @@ -1437,8 +1442,9 @@ export interface OffscreenCanvasRenderingContext2D { * @param endAngle The Angle, expressed in radians, at which the ellipse will be drawn. * @param anticlockwise If true, the ellipse is drawn counterclockwise (counterclockwise) and clockwise otherwise. * @since 7 - */ - ellipse( + */ + ellipse( + x: number, y: number, radiusX: number, @@ -1454,8 +1460,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param x The x axis. * @param y The y axis. * @since 7 - */ - moveTo(x: number, y: number): void; + */ + moveTo(x: number, y: number): void; /** * Draw a second order Bezier curve. @@ -1464,8 +1470,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param cpx The X-axis coordinates of the control points. * @param cpy The y-coordinate of the control point. * @since 7 - */ - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; + */ + quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; /** * Draw a rectangle. @@ -1474,8 +1480,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param w The width of a rectangle. * @param h The height of a rectangle. * @since 7 - */ - rect(x: number, y: number, w: number, h: number): void; + */ + rect(x: number, y: number, w: number, h: number): void; /** * Clears the contents of the specified rectangular area. @@ -1484,8 +1490,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param w The width of a rectangle. * @param h The height of a rectangle. * @since 7 - */ - clearRect(x: number, y: number, w: number, h: number): void; + */ + clearRect(x: number, y: number, w: number, h: number): void; /** * Fills a rectangular area. @@ -1494,8 +1500,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param w The width of a rectangle. * @param h The height of a rectangle. * @since 7 - */ - fillRect(x: number, y: number, w: number, h: number): void; + */ + fillRect(x: number, y: number, w: number, h: number): void; /** * Stroke a rectangular area. @@ -1504,8 +1510,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param w The width of the rectangle. Positive values on the right, negative values on the left. * @param h The height of the rectangle. Positive values are down, negative values are up. * @since 7 - */ - strokeRect(x: number, y: number, w: number, h: number): void; + */ + strokeRect(x: number, y: number, w: number, h: number): void; /** * Stroke a rectangular area. @@ -1514,16 +1520,16 @@ export interface OffscreenCanvasRenderingContext2D { * @param x The X-axis coordinates of the starting point of the text. * @param maxWidth Maximum width to draw. * @since 7 - */ - fillText(text: string, y: number, x: number /*, maxWidth?: number*/): void; + */ + fillText(text: string, y: number, x: number /*, maxWidth?: number*/): void; /** * Returns a TextMetrics object used to obtain the width of specified text. * @param text Text to be measured. * @returns Object that contains the text width. You can obtain the width by TextMetrics.width. * @since 7 - */ - measureText(text: string): TextMetrics; + */ + measureText(text: string): TextMetrics; /** * Draws the stroke of a text string. @@ -1532,29 +1538,29 @@ export interface OffscreenCanvasRenderingContext2D { * @param y Y-coordinate of the lower left corner of the text stroke. * @param maxWidth Maximum width to draw. * @since 7 - */ - strokeText(text: string, x: number, y: number /*, maxWidth?: number*/): void; + */ + strokeText(text: string, x: number, y: number /*, maxWidth?: number*/): void; /** * Resets the current matrix transformation effect. * @since 7 - */ - resetTransform(): void; + */ + resetTransform(): void; /** * Adds a rotation effect to the current canvas. * @param angle The radian of clockwise rotation. * @since 7 - */ - rotate(angle: number): void; + */ + rotate(angle: number): void; /** * Adds a zoom effect to the current canvas. * @param x The horizontal scaling factor. * @param y The scaling factor in the vertical direction. * @since 7 - */ - scale(x: number, y: number): void; + */ + scale(x: number, y: number): void; /** * Set the rotation, pan, and zoom effects. @@ -1565,8 +1571,8 @@ export interface OffscreenCanvasRenderingContext2D { * @param e The level of mobile. * @param f Vertical movement. * @since 7 - */ - setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; + */ + setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; /** * Set the rotation, pan, and zoom effects. @@ -1577,28 +1583,28 @@ export interface OffscreenCanvasRenderingContext2D { * @param e The level of mobile. * @param f Vertical movement. * @since 7 - */ - transform(a: number, b: number, c: number, d: number, e: number, f: number): void; + */ + transform(a: number, b: number, c: number, d: number, e: number, f: number): void; /** * Adds a pan effect to the current canvas. * @param x Horizontal movement distance. * @param y Vertical movement. * @since 7 - */ - translate(x: number, y: number): void; + */ + translate(x: number, y: number): void; /** * Restores the configuration information of the last saved canvas context. * @since 7 - */ - restore(): void; + */ + restore(): void; /** * Saves configuration information for the current canvas context. * @since 7 - */ - save(): void; + */ + save(): void; } /** @@ -1608,7 +1614,7 @@ export interface OffscreenCanvasRenderingContext2D { * @since 4 */ export interface CanvasRenderingContext2D { - /** + /** * Fills a rectangle on the canvas. * @param x X-coordinate of the upper left corner of the rectangle. * @param y Y-coordinate of the upper left corner of the rectangle. @@ -1616,7 +1622,7 @@ export interface CanvasRenderingContext2D { * @param height Height of the rectangle. * @since 4 */ - fillRect(x: number, y: number, width: number, height: number): void; + fillRect(x: number, y: number, width: number, height: number): void; /** * Sets the style of a paint to fill an area. @@ -1624,8 +1630,8 @@ export interface CanvasRenderingContext2D { * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object. * Canvas pattern. You can call createPattern() to create a CanvasPattern object. * @since 4 - */ - fillStyle?: string | CanvasGradient | CanvasPattern; + */ + fillStyle?: string | CanvasGradient | CanvasPattern; /** * Clears the content in a rectangle on the canvas. @@ -1634,8 +1640,8 @@ export interface CanvasRenderingContext2D { * @param width Width of the rectangle. * @param height Height of the rectangle. * @since 4 - */ - clearRect(x: number, y: number, width: number, height: number): void; + */ + clearRect(x: number, y: number, width: number, height: number): void; /** * Draws a rectangle stroke on the canvas. @@ -1644,8 +1650,8 @@ export interface CanvasRenderingContext2D { * @param width Width of the rectangle stroke. * @param height Height of the rectangle stroke. * @since 4 - */ - strokeRect(x: number, y: number, width: number, height: number): void; + */ + strokeRect(x: number, y: number, width: number, height: number): void; /** * Draws filled text on the canvas. @@ -1653,8 +1659,8 @@ export interface CanvasRenderingContext2D { * @param x X-coordinate of the lower left corner of the text. * @param y Y-coordinate of the lower left corner of the text. * @since 4 - */ - fillText(text: string, x: number, y: number): void; + */ + fillText(text: string, x: number, y: number): void; /** * Draws a text stroke on the canvas. @@ -1662,22 +1668,22 @@ export interface CanvasRenderingContext2D { * @param x X-coordinate of the lower left corner of the text stroke. * @param y Y-coordinate of the lower left corner of the text stroke. * @since 4 - */ - strokeText(text: string, x: number, y: number): void; + */ + strokeText(text: string, x: number, y: number): void; /** * Returns a TextMetrics object used to obtain the width of specified text. * @param text Text to be measured. * @returns Object that contains the text width. You can obtain the width by TextMetrics.width. * @since 4 - */ - measureText(text: string): TextMetrics; + */ + measureText(text: string): TextMetrics; /** * Sets the width of a line. * @since 4 - */ - lineWidth?: number; + */ + lineWidth?: number; /** * Sets the stroke paint style. @@ -1685,49 +1691,49 @@ export interface CanvasRenderingContext2D { * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object. * Canvas pattern. You can call createPattern() to create a CanvasPattern object. * @since 4 - */ - strokeStyle?: string | CanvasGradient | CanvasPattern; + */ + strokeStyle?: string | CanvasGradient | CanvasPattern; /** * Draws a border stroke. * @since 4 - */ - stroke(): void; + */ + stroke(): void; /** * Draws a path stroke. * @param path The object of Path2D. * @since 4 - */ - stroke(path: Path2D): void; + */ + stroke(path: Path2D): void; /** * Creates a drawing path. * @since 4 - */ - beginPath(): void; + */ + beginPath(): void; /** * Moves a drawing path to a target position on the canvas. * @param x X-coordinate of the target position. * @param y Y-coordinate of the target position. * @since 4 - */ - moveTo(x: number, y: number): void; + */ + moveTo(x: number, y: number): void; /** * Connects the current point to a target position using a straight line. * @param x X-coordinate of the target position. * @param y Y-coordinate of the target position. * @since 4 - */ - lineTo(x: number, y: number): void; + */ + lineTo(x: number, y: number): void; /** * Draws a closed path. * @since 4 - */ - closePath(): void; + */ + closePath(): void; /** * Sets the style of line endpoints. @@ -1737,8 +1743,8 @@ export interface CanvasRenderingContext2D { * square: The endpoints of the line are in square, * and each end of the line is added with a rectangle whose length is the same as the line thickness and whose width is half of the line thickness. * @since 4 - */ - lineCap: string; + */ + lineCap: string; /** * Sets the style for an intersection point where a line joins another. @@ -1747,15 +1753,15 @@ export interface CanvasRenderingContext2D { * bevel: The intersection part is a triangle. The rectangular corner of each line is independent. * miter (default): The intersection part has a miter corner by extending the outside edges of the lines until they meet. You can view the effect of this attribute in miterLimit. * @since 4 - */ - lineJoin: string; + */ + lineJoin: string; /** * Sets the maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet. * Maximum miter length. The default value is 10. * @since 4 - */ - miterLimit: number; + */ + miterLimit: number; /** * Sets the font style. @@ -1763,8 +1769,8 @@ export interface CanvasRenderingContext2D { * The default value is 10px sans-serif in tv, phone, tablet, wearable. * The default value is 30px SourceHanSansSC-Regular in smartVision. * @since 4 - */ - font: string; + */ + font: string; /** * Sets the text alignment mode. @@ -1777,15 +1783,15 @@ export interface CanvasRenderingContext2D { * NOTE * In the ltr layout mode, the value start equals to left. In the rtl layout mode, the value start equals to right. * @since 4 - */ - textAlign: "left" | "right" | "center" | "start" | "end"; + */ + textAlign: "left" | "right" | "center" | "start" | "end"; /** * Sets whether an image is smooth. * default value is true. * @since 4 - */ - imageSmoothingEnabled: boolean; + */ + imageSmoothingEnabled: boolean; /** * Sets a text baseline in the horizontal direction for text alignment. @@ -1797,8 +1803,8 @@ export interface CanvasRenderingContext2D { * ideographic: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline, the ideographic baseline is located at the bottom of the excessive character. * bottom: The text baseline is at the bottom of the text bounding box. Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line. * @since 4 - */ - textBaseline: string; + */ + textBaseline: string; /** * Creates a linear gradient color. @@ -1808,8 +1814,8 @@ export interface CanvasRenderingContext2D { * @param y1 Y-coordinate of the end point. * @returns LinearGradient object. * @since 6 - */ - createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; + */ + createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; /** * Creates a radial gradient color. @@ -1821,8 +1827,8 @@ export interface CanvasRenderingContext2D { * @param r1 The radius of End Circle. * @returns RadialGradient object. * @since 6 - */ - createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; + */ + createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; /** * Creates a pattern for image filling based on a specified source image and repetition mode. @@ -1830,24 +1836,24 @@ export interface CanvasRenderingContext2D { * @param repetition Repetition mode. The value can be "repeat", "repeat-x", "repeat-y", or "no-repeat". * @returns Pattern of image filling. * @since 4 - */ - createPattern(image: Image, repetition: string): object; + */ + createPattern(image: Image, repetition: string): object; /** * Creates a path that is later used by the CanvasRenderingContext2D object. * @param path another created Path2D object. * @returns the object of Path2D. * @since 4 - */ - createPath2D(path?: Path2D): Path2D; + */ + createPath2D(path?: Path2D): Path2D; /** * Creates a path that is later used by the CanvasRenderingContext2D object. * @param cmds a string defined using the SVG path command. * @returns the object of Path2D. * @since 4 - */ - createPath2D(cmds?: string): Path2D; + */ + createPath2D(cmds?: string): Path2D; /** * Draws a cubic bezier curve on the canvas. @@ -1858,8 +1864,8 @@ export interface CanvasRenderingContext2D { * @param x End point x-coordinate of the bezier curve. * @param y End point y-coordinate of the bezier curve. * @since 4 - */ - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; + */ + bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; /** * Draws a quadratic curve on the canvas. @@ -1868,8 +1874,8 @@ export interface CanvasRenderingContext2D { * @param x End point x-coordinate of the bezier curve. * @param y End point y-coordinate of the bezier curve. * @since 4 - */ - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; + */ + quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; /** * Draws an arc on the canvas. @@ -1880,8 +1886,8 @@ export interface CanvasRenderingContext2D { * @param endAngel End radian of the arc. * @param anticlockwise Whether to draw the arc counterclockwise. * @since 4 - */ - arc(x: number, y: number, radius: number, startAngle: number, endAngel: number, anticlockwise?: boolean): void; + */ + arc(x: number, y: number, radius: number, startAngle: number, endAngel: number, anticlockwise?: boolean): void; /** * Draws an arc based on the radius and points on the arc. @@ -1891,8 +1897,8 @@ export interface CanvasRenderingContext2D { * @param y2 Y-coordinate of the second point on the arc. * @param radius Radius of the arc. * @since 4 - */ - arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; + */ + arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; /** * Draws an ellipse based on the coordinate and radius. @@ -1906,8 +1912,9 @@ export interface CanvasRenderingContext2D { * @param anticlockwise Indicates whether to draw an ellipse counterclockwise. * 0: clockwise; 1: counterclockwise. The default value is 0. * @since 4 - */ - ellipse( + */ + ellipse( + x: number, y: number, radiusX: number, @@ -1925,35 +1932,35 @@ export interface CanvasRenderingContext2D { * @param width Width of the rectangle. * @param height Height of the rectangle. * @since 4 - */ - rect(x: number, y: number, width: number, height: number): void; + */ + rect(x: number, y: number, width: number, height: number): void; /** * Fills the area inside a closed path. * @since 4 - */ - fill(): void; + */ + fill(): void; /** * Sets a path as the clipping path. * @since 4 - */ - clip(): void; + */ + clip(): void; /** * Rotates a canvas clockwise around its coordinate axes. * @param rotate Clockwise rotation angle. You can use Math.PI / 180 to convert the angle to radian. * @since 4 - */ - rotate(rotate: number): void; + */ + rotate(rotate: number): void; /** * Scales a canvas based on scaling factors. * @param x Horizontal scale factor. * @param y Vertical scale factor. * @since 4 - */ - scale(x: number, y: number): void; + */ + scale(x: number, y: number): void; /** * Defines a transformation matrix. @@ -1967,8 +1974,8 @@ export interface CanvasRenderingContext2D { * @param translateX X-axis translation. * @param translateY Y-axis translation. * @since 4 - */ - transform(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; + */ + transform(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; /** * Uses same parameters as the transform() function to reset the existing transformation matrix and create a new transformation matrix. @@ -1979,8 +1986,9 @@ export interface CanvasRenderingContext2D { * @param translateX X-axis translation. * @param translateY Y-axis translation. * @since 4 - */ - setTransform( + */ + setTransform( + scaleX: number, skewX: number, skewY: number, @@ -1994,16 +2002,16 @@ export interface CanvasRenderingContext2D { * @param x X-axis translation. * @param y Y-axis translation. * @since 4 - */ - translate(x: number, y: number): void; + */ + translate(x: number, y: number): void; /** * Sets the alpha value. * Global alpha value to set. * The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). * @since 4 - */ - globalAlpha: number; + */ + globalAlpha: number; /** * Draws an image. @@ -2013,8 +2021,8 @@ export interface CanvasRenderingContext2D { * @param dWidth Width of the drawing area. * @param dHeight Height of the drawing area. * @since 4 - */ - drawImage(image: Image, dx: number, dy: number, dWidth: number, dHeight: number): void; + */ + drawImage(image: Image, dx: number, dy: number, dWidth: number, dHeight: number): void; /** * Draws an image. @@ -2028,8 +2036,9 @@ export interface CanvasRenderingContext2D { * @param dWidth Width of the drawing area. * @param dHeight Height of the drawing area. * @since 4 - */ - drawImage( + */ + drawImage( + image: Image, sx: number, sy: number, @@ -2049,8 +2058,8 @@ export interface CanvasRenderingContext2D { * @param dWidth Width of the drawing area. * @param dHeight Height of the drawing area. * @since 9 - */ - drawImage(image: image.PixelMap, dx: number, dy: number, dWidth: number, dHeight: number): void; + */ + drawImage(image: image.PixelMap, dx: number, dy: number, dWidth: number, dHeight: number): void; /** * Draws an image. @@ -2064,8 +2073,9 @@ export interface CanvasRenderingContext2D { * @param dWidth Width of the drawing area. * @param dHeight Height of the drawing area. * @since 9 - */ - drawImage( + */ + drawImage( + image: image.PixelMap, sx: number, sy: number, @@ -2080,14 +2090,14 @@ export interface CanvasRenderingContext2D { /** * Restores the saved drawing context. * @since 4 - */ - restore: () => void; + */ + restore: () => void; /** * Saves the current drawing context. * @since 4 - */ - save: () => void; + */ + save: () => void; /** * Creates an ImageData object. @@ -2095,15 +2105,15 @@ export interface CanvasRenderingContext2D { * @param height Height of the ImageData object. * @returns Returns the newly created FunctionCallable object. * @since 4 - */ - createImageData(width: number, height: number): ImageData; - /** + */ + createImageData(width: number, height: number): ImageData; + /** * Creates an ImageData object. * @param imagedata ImageData object with the same width and height copied from the original ImageData object. * @returns Returns the newly created FunctionCallable object. * @since 4 - */ - createImageData(imagedata: ImageData): ImageData; + */ + createImageData(imagedata: ImageData): ImageData; /** * ImageData object created with pixels in the specified area on the canvas. @@ -2113,8 +2123,8 @@ export interface CanvasRenderingContext2D { * @param sh Height of the output area. * @returns ImageData object that contains pixels in the specified area on the canvas. * @since 4 - */ - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; + */ + getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; /** * Get an PixelMap object. @@ -2124,8 +2134,8 @@ export interface CanvasRenderingContext2D { * @param sh The height of the rectangular area of the image data to be extracted. * @returns getPixelMap An getPixelMap object that contains the rectangular ImageData given by the canvas. * @since 9 - */ - getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap + */ + getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap /** * Puts the ImageData onto a rectangular area on the canvas. @@ -2133,8 +2143,8 @@ export interface CanvasRenderingContext2D { * @param dx X-axis offset of the rectangle area on the canvas. * @param dy Y-axis offset of the rectangle area on the canvas. * @since 4 - */ - putImageData(imageData: ImageData, dx: number, dy: number): void; + */ + putImageData(imageData: ImageData, dx: number, dy: number): void; /** * Puts the ImageData onto a rectangular area on the canvas. @@ -2146,8 +2156,9 @@ export interface CanvasRenderingContext2D { * @param dirtyWidth Width of the rectangle area to cop the source image. * @param dirtyHeight Height of the rectangle area to cop the source image. * @since 4 - */ - putImageData( + */ + putImageData( + imageData: ImageData, dx: number, dy: number, @@ -2161,22 +2172,22 @@ export interface CanvasRenderingContext2D { * Sets the dash line style. * @param segments Interval of alternate line segments and the length of spacing. * @since 4 - */ - setLineDash(segments: Array): void; + */ + setLineDash(segments: Array): void; /** * Obtains the dash line style. * @returns Interval of alternate line segments and the length of spacing. * @since 4 - */ - getLineDash(): Array; + */ + getLineDash(): Array; /** * Sets the dash line offset. * Dash line offset. The value is a float number starting from 0.0. * @since 4 - */ - lineDashOffset: number; + */ + lineDashOffset: number; /** * Sets the composite operation type. @@ -2192,41 +2203,41 @@ export interface CanvasRenderingContext2D { * copy Displays the new drawing and neglects the existing drawing. * xor Combines the new drawing and existing drawing using the XOR operation. * @since 4 - */ - globalCompositeOperation: string; + */ + globalCompositeOperation: string; /** * Sets the shadow blur degree. * Shadow blur degree. A larger value indicates a more blurred shadow. The value is of the float type, and the default value is 0. * @since 4 - */ - shadowBlur: number; + */ + shadowBlur: number; /** * Sets the shadow color. * @since 4 - */ - shadowColor: string; + */ + shadowColor: string; /** * Sets the x-axis shadow offset relative to the original object. * X-axis shadow offset relative to the original object. * @since 4 - */ - shadowOffsetX: number; + */ + shadowOffsetX: number; /** * Sets the y-axis shadow offset relative to the original object. * Y-axis shadow offset relative to the original object. * @since 4 - */ - shadowOffsetY: number; + */ + shadowOffsetY: number; /** * Draws the Bitmap to the current canvas. * @since 7 - */ - transferFromImageBitmap(bitmap: ImageBitmap): void; + */ + transferFromImageBitmap(bitmap: ImageBitmap): void; } /** @@ -2235,14 +2246,14 @@ export interface CanvasRenderingContext2D { * @since 4 */ export interface CanvasGradient { - /** + /** * Adds a color stop for the CanvasGradient object based on the specified offset and gradient color. * @param offset Proportion of the distance between the color stop and the start point to the total length. * The value ranges from 0 to 1. * @param color Sets the gradient color. * @since 4 */ - addColorStop(offset: number, color: string): void; + addColorStop(offset: number, color: string): void; } /** @@ -2250,12 +2261,12 @@ export interface CanvasGradient { * @since 4 */ export interface Path2D { - /** + /** * Add another path to current path. * @param path another created Path2D object. * @since 4 */ - addPath(path: Path2D): void; + addPath(path: Path2D): void; /** * Uses same parameters as the transform() function to reset the existing transformation matrix and create a new transformation matrix. @@ -2266,8 +2277,9 @@ export interface Path2D { * @param translateX X-axis translation. * @param translateY Y-axis translation. * @since 4 - */ - setTransform( + */ + setTransform( + scaleX: number, skewX: number, skewY: number, @@ -2279,24 +2291,24 @@ export interface Path2D { /** * Draws a closed path. * @since 4 - */ - closePath(): void; + */ + closePath(): void; /** * Moves a drawing path to a target position on the canvas. * @param x X-coordinate of the target position. * @param y Y-coordinate of the target position. * @since 4 - */ - moveTo(x: number, y: number): void; + */ + moveTo(x: number, y: number): void; /** * Connects the current point to a target position using a straight line. * @param x X-coordinate of the target position. * @param y Y-coordinate of the target position. * @since 4 - */ - lineTo(x: number, y: number): void; + */ + lineTo(x: number, y: number): void; /** * Draws a cubic bezier curve on the canvas. @@ -2307,8 +2319,8 @@ export interface Path2D { * @param x End point x-coordinate of the bezier curve. * @param y End point y-coordinate of the bezier curve. * @since 4 - */ - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; + */ + bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; /** * Draws a quadratic curve on the canvas. @@ -2317,8 +2329,8 @@ export interface Path2D { * @param x End point x-coordinate of the bezier curve. * @param y End point y-coordinate of the bezier curve. * @since 4 - */ - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; + */ + quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; /** * Draws an arc on the canvas. @@ -2329,8 +2341,8 @@ export interface Path2D { * @param endAngel End radian of the arc. * @param anticlockwise Whether to draw the arc counterclockwise. * @since 4 - */ - arc(x: number, y: number, radius: number, startAngle: number, endAngel: number, anticlockwise?: boolean): void; + */ + arc(x: number, y: number, radius: number, startAngle: number, endAngel: number, anticlockwise?: boolean): void; /** * Draws an arc based on the radius and points on the arc. @@ -2340,8 +2352,8 @@ export interface Path2D { * @param y2 Y-coordinate of the second point on the arc. * @param radius Radius of the arc. * @since 4 - */ - arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; + */ + arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; /** * Draws an ellipse based on the coordinate and radius. @@ -2355,8 +2367,9 @@ export interface Path2D { * @param anticlockwise Indicates whether to draw an ellipse counterclockwise. * 0: clockwise; 1: counterclockwise. The default value is 0. * @since 4 - */ - ellipse( + */ + ellipse( + x: number, y: number, radiusX: number, @@ -2374,8 +2387,8 @@ export interface Path2D { * @param width Width of the rectangle. * @param height Height of the rectangle. * @since 4 - */ - rect(x: number, y: number, width: number, height: number): void; + */ + rect(x: number, y: number, width: number, height: number): void; } /** @@ -2386,7 +2399,7 @@ export interface Path2D { * @since 4 */ export interface CanvasElement extends Element { - /** + /** * Obtains the context of 2D canvas drawing. * Only parameters related to 2D canvas drawing are supported. * The return value is a 2D drawing object that provides specific 2D drawing operations. @@ -2394,7 +2407,7 @@ export interface CanvasElement extends Element { * @param options use this context attributes to creating rendering context. * @since 4 */ - getContext(type: "2d", options?: ContextAttrOptions): CanvasRenderingContext2D; + getContext(type: "2d", options?: ContextAttrOptions): CanvasRenderingContext2D; /** * Obtains the context of webgl canvas drawing. @@ -2403,8 +2416,8 @@ export interface CanvasElement extends Element { * @param type identifier defining the drawing context associated to the canvas. * @param options use this context attributes to creating rendering context. * @since 6 - */ - getContext(type: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext; + */ + getContext(type: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext; /** * Obtains the context of webgl2 canvas drawing. @@ -2413,8 +2426,8 @@ export interface CanvasElement extends Element { * @param type identifier defining the drawing context associated to the canvas. * @param options use this context attributes to creating rendering context. * @since 4 - */ - getContext(type: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext; + */ + getContext(type: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext; /** * Creates a data URI that contains the image display. @@ -2423,8 +2436,8 @@ export interface CanvasElement extends Element { * is image/jpeg or image/webp. If this argument is anything else, * the default value for image quality is used. Other arguments are ignored. * @since 4 - */ - toDataURL(type?: string, quality?: number): string; + */ + toDataURL(type?: string, quality?: number): string; } /** @@ -2432,50 +2445,50 @@ export interface CanvasElement extends Element { * @since 6 */ export interface ScrollOptions { - /** + /** * Scroll to the target position of the page. Unit: px * @since 6 */ - position: number; + position: number; /** * Duration of the scrolling animation, in ms. * @since 6 - */ - duration: number; + */ + duration: number; /** * The selector for current scroll. * @since 6 - */ - id?: string; + */ + id?: string; /** * The timing function for current scroll animation. * @since 6 - */ - timingFunction?: string; + */ + timingFunction?: string; /** * Callback function for successful interface invocation. * @param result the request execution result. * @since 6 - */ - success?: (result: Object) => void; + */ + success?: (result: Object) => void; /** * Callback function for interface invocation failure. * @param result the request execution result. * @since 6 - */ - fail?: (result: Object) => void; + */ + fail?: (result: Object) => void; /** * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully). * @param result the request execution result. * @since 6 - */ - complete?: (result: Object) => void; + */ + complete?: (result: Object) => void; } /** @@ -2483,17 +2496,17 @@ export interface ScrollOptions { * @since 6 */ export interface ScrollOffset { - /** + /** * Scrolling offset in the x-axis, in px. * @since 6 */ - x: number; + x: number; /** * Scrolling offset in the y-axis, in px. * @since 6 - */ - y: number; + */ + y: number; } /** @@ -2502,17 +2515,17 @@ export interface ScrollOffset { * @since 6 */ export interface DivElement extends Element { - /** + /** * Scrolls the div for a certain distance. * @since 6 */ - scrollBy(data: ScrollParam): void; + scrollBy(data: ScrollParam): void; /** * Returns the offset of the current scrolling. The return value type is Object. * @since 6 - */ - getScrollOffset(): ScrollOffset; + */ + getScrollOffset(): ScrollOffset; } /** @@ -2520,11 +2533,11 @@ export interface DivElement extends Element { * @since 4 */ export interface Application { - /** + /** * Object that is exposed in the app.js file and obtained by this.$app.$def. * @since 4 */ - $def: any; + $def: any; } /** @@ -2532,7 +2545,7 @@ export interface Application { * @since 4 */ export interface ViewModel { - $app: Application; + $app: Application; /** * Sets the parameters based on the system language, for example, this.$t('strings.hello'). @@ -2542,27 +2555,27 @@ export interface ViewModel { * There are two types of placeholders available:Named placeholder, for example, {name}. The actual content must be of the object type, for example, $t('strings.object', { name: 'Hello world' }). * Digit placeholder, for example, {0}. The actual content must be of the array type, for example, $t('strings.array', ['Hello world']. * @since 4 - */ - $t(path: string, params?: object | Array): string; + */ + $t(path: string, params?: object | Array): string; /** - * Converses between singular and plural forms based on the system language, for example, this.$tc('strings.plurals'). + * Converse between singular and plural forms based on the system language, for example, this.$tc('strings.plurals'). * NOTE * The resource content is distinguished by the following JSON keys: zero, one, two, few, many, and other. * @param path Resource file path. * @param count Value. * @returns Content. * @since 4 - */ - $tc(path: string, count: number): string; + */ + $tc(path: string, count: number): string; /** * Replace the resource path based on the DPI of the current device: this.$r('image.tv'). * @param path Resource file path. * @returns Content. * @since 4 - */ - $r(path: string): string; + */ + $r(path: string): string; /** * Adds an attribute or modifies an existing attribute. @@ -2570,16 +2583,16 @@ export interface ViewModel { * @param key * @param value * @since 4 - */ - $set(key: string, value: any): void; + */ + $set(key: string, value: any): void; /** * Deletes an attribute. * Usage:this.$delete('key'): Delete an attribute. * @param key * @since 4 - */ - $delete(key: string): void; + */ + $delete(key: string): void; /** * Obtains the component with a specified ID. If no ID is specified, the root component is returned. @@ -2589,8 +2602,9 @@ export interface ViewModel { * this.$element(): Obtain the root component. * @param id Component ID. * @since 4 - */ - $element( + */ + $element( + id?: string, ): AnimationElement & CanvasElement & @@ -2614,51 +2628,51 @@ export interface ViewModel { /** * Obtains the root ViewModel instance. * @since 4 - */ - $root(): ViewModel & object; + */ + $root(): ViewModel & object; /** * Obtains the parent ViewModel instance. * @since 4 - */ - $parent(): ViewModel & object; + */ + $parent(): ViewModel & object; /** * Obtains the ViewModel instance of a custom child component with a specified ID. * Usage:this.$child('xxx'): Obtain the ViewModel instance of a custom child component whose ID is xxx. * @param id Component ID. * @since 4 - */ - $child(id: string): ViewModel & object; + */ + $child(id: string): ViewModel & object; /** * Listens for attribute changes. If the value of the data attribute changes, the bound event is triggered. * @param data Attribute. * @param callback Function name. * @since 4 - */ - $watch(data: string, callback: string): void; + */ + $watch(data: string, callback: string): void; /** * An object that holds all DOM elements and component instances that have been registered with the refs attribute. * @since 4 - */ - $refs: ElementReferences; + */ + $refs: ElementReferences; /** * Custom events. * @param event The name of event. * @param params The params of event. * @since 4 - */ - $emit(event: string, params?: object): void; + */ + $emit(event: string, params?: object): void; /** * Scroll the page to the destination. * @param options The properties of event. * @since 6 - */ - scrollTo(options: ScrollOptions): void; + */ + scrollTo(options: ScrollOptions): void; } /** @@ -2666,7 +2680,7 @@ export interface ViewModel { * @since 4 */ export interface ElementReferences { - [k: string]: AnimationElement & + [k: string]: AnimationElement & CanvasElement & object & WebElement & @@ -2691,30 +2705,30 @@ export interface ElementReferences { * @since 4 */ export declare class Locate { - /** + /** * language, such as 'zh'. * @since 4 */ - language: string; + language: string; /** - * country or regin, such ass 'CN'. + * country or region, such ass 'CN'. * @since 4 - */ - countryOrRegion: string; + */ + countryOrRegion: string; /** * text layout direction, ltr or rtl. * @since 4 - */ - dir: "ltr" | "rtl"; + */ + dir: "ltr" | "rtl"; /** * The Unicode locale key set defined by the locale. If this locale does not have a specific key set, an empty set is * returned. For example: {"nu": "arab"}, which means that the numbers in the current environment use Arabic numbers. * @since 5 - */ - unicodeSetting: object; + */ + unicodeSetting: object; } /** @@ -2722,17 +2736,17 @@ export declare class Locate { * @since 6 */ export declare class Configuration { - /** + /** * Internationalization related information, such as language, country, text layout direction, etc. * @since 6 */ - locate: Locate; + locate: Locate; /** * The magnification of the current system font. * @since 6 - */ - fontScale: number; + */ + fontScale: number; } /** @@ -2740,49 +2754,49 @@ export declare class Configuration { * @since 4 */ export interface Options> { - /** + /** * Data model of the page that can be converted into a JSON object. * The attribute name cannot start with $ or an underscore (_) or contain the reserved words such as for, if, show, and tid. * For a function, the return value must be an object. * Set the value of data to the return value of the function during page initialization. * @since 4 */ - data?: Data; + data?: Data; /** * Listens for page initialization. * Called when page initialization is complete. This function is called only once in a lifecycle. * @since 4 - */ - onInit?(): void; + */ + onInit?(): void; /** * Listens for page creation. * Called when a page is created. This function is called only once in a lifecycle. * @since 4 - */ - onReady?(): void; + */ + onReady?(): void; /** * Listens for page display. * Called when the page is displayed. * @since 4 - */ - onShow?(): void; + */ + onShow?(): void; /** * Listens for page hiding. * Called when the page disappears. * @since 4 - */ - onHide?(): void; + */ + onHide?(): void; /** * Listens for page destruction. * Called when the page is destroyed. * @since 4 - */ - onDestroy?(): void; + */ + onDestroy?(): void; /** * Listens for the back button action. @@ -2791,69 +2805,69 @@ export interface Options> { * false means that the default return logic is used. * If no value is returned, the default return logic is used. * @since 4 - */ - onBackPress?(): boolean; + */ + onBackPress?(): boolean; /** * Listens for page active. - * Called when the page is activing. + * Called when the page is active. * @since 5 - */ - onActive?(): void; + */ + onActive?(): void; /** * Listens for page inactive. * Called when the page is paused. * @since 5 - */ - onInactive?(): void; + */ + onInactive?(): void; /** * This callback is triggered when a new request is received when the FA has started. * @since 5 - */ - onNewRequest?(): void; + */ + onNewRequest?(): void; /** * Callback when FA initiates a migration, in this callback, the application can decide whether * to migrate according to the current state. * @since 5 - */ - onStartContinuation?(): boolean; + */ + onStartContinuation?(): boolean; /** * For the callback of saving state data, the developer needs to fill in the parameter object * the data to be migrated to the target device. * @since 5 - */ - onSaveData?(value: object): void; + */ + onSaveData?(value: object): void; /** * The callback to restore the data saved by the onSaveData method when the migration was initiated. * @since 5 - */ - onRestoreData?(value: object): void; + */ + onRestoreData?(value: object): void; /** * The callback for the completion of the migration, which is triggered on the calling side, indicates * the result of the application migration to the target device. * @since 5 - */ - onCompleteContinuation?(code: number): void; + */ + onCompleteContinuation?(code: number): void; /** * This callback is triggered when the corresponding system configuration changes, such as system font size, * language region, etc. * @since 6 - */ - onConfigurationUpdated?(configuration: Configuration): void; + */ + onConfigurationUpdated?(configuration: Configuration): void; /** * Listens for application creation. * Called when the application is created. * @since 4 - */ - onCreate?(): void; + */ + onCreate?(): void; } /**