!212 update code from wagner.

Merge pull request !212 from lihong/master_1222
This commit is contained in:
openharmony_ci 2021-12-22 13:19:25 +00:00 committed by Gitee
commit cb1f9884ae
55 changed files with 413 additions and 471 deletions

View File

@ -1,113 +1,113 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DialogAlignment } from "./alert_dialog";
import { Resource } from ".";
/**
* The information of sheet.
* @since 8
*/
export interface SheetInfo {
/**
* Title Properties
* @since 8
*/
title: string | Resource;
/**
* Icon Properties.
* @since 8
*/
icon?: string | Resource;
/**
* Callback method after the operation.
* @since 8
*/
action: () => void;
}
/**
* Declare the ActionSheet
* @since 8
*/
export declare class ActionSheet {
/**
* Invoking method display.
* @since 8
*/
static show(value: {
/**
* Title Properties
* @since 8
*/
title: string | Resource;
/**
* message Properties
* @since 8
*/
message: string | Resource;
/**
* Invoke the commit function.
* @since 8
*/
confirm?: {
/**
* Text content of the confirmation button.
* @since 8
*/
value: string | Resource;
/**
* Method executed by the callback.
* @since 8
*/
action: () => void;
};
/**
* Execute Cancel Function.
* @since 8
*/
cancel?: () => void;
/**
* The Array of sheets
* @since 8
*/
sheets: Array<SheetInfo>;
/**
* Allows users to click the mask layer to exit.
* @since 8
*/
autoCancel?: boolean;
/**
* Alignment in the vertical direction.
* @since 8
*/
alignment?: DialogAlignment;
/**
* Offset of the pop-up window relative to the alignment position.
* @since 8
*/
offset?: { dx: number | string | Resource; dy: number | string | Resource };
});
}
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DialogAlignment } from "./alert_dialog";
import { Resource } from ".";
/**
* The information of sheet.
* @since 8
*/
interface SheetInfo {
/**
* Title Properties
* @since 8
*/
title: string | Resource;
/**
* Icon Properties.
* @since 8
*/
icon?: string | Resource;
/**
* Callback method after the operation.
* @since 8
*/
action: () => void;
}
/**
* Declare the ActionSheet
* @since 8
*/
export declare class ActionSheet {
/**
* Invoking method display.
* @since 8
*/
static show(value: {
/**
* Title Properties
* @since 8
*/
title: string | Resource;
/**
* message Properties
* @since 8
*/
message: string | Resource;
/**
* Invoke the commit function.
* @since 8
*/
confirm?: {
/**
* Text content of the confirmation button.
* @since 8
*/
value: string | Resource;
/**
* Method executed by the callback.
* @since 8
*/
action: () => void;
};
/**
* Execute Cancel Function.
* @since 8
*/
cancel?: () => void;
/**
* The Array of sheets
* @since 8
*/
sheets: Array<SheetInfo>;
/**
* Allows users to click the mask layer to exit.
* @since 8
*/
autoCancel?: boolean;
/**
* Alignment in the vertical direction.
* @since 8
*/
alignment?: DialogAlignment;
/**
* Offset of the pop-up window relative to the alignment position.
* @since 8
*/
offset?: { dx: number | string | Resource; dy: number | string | Resource };
});
}

View File

@ -117,7 +117,7 @@ export declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
fontColor?: ResourceColor;
/**
* Backgound color of the confirmation button.
* Background color of the confirmation button.
* @since 7
*/
backgroundColor?: ResourceColor;
@ -149,7 +149,7 @@ export declare interface AlertDialogParamWithButtons extends AlertDialogParam {
fontColor?: ResourceColor;
/**
* Backgound color of the confirmation button.
* Background color of the confirmation button.
* @since 7
*/
backgroundColor?: ResourceColor;
@ -179,7 +179,7 @@ export declare interface AlertDialogParamWithButtons extends AlertDialogParam {
fontColor?: ResourceColor;
/**
* Backgound color of the confirmation button.
* Background color of the confirmation button.
* @since 7
*/
backgroundColor?: ResourceColor;

View File

@ -1,44 +1,44 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @name Provides parameters required for installing or uninstalling an application.
* @since 7
* @SysCap SystemCapability.Appexecfwk
* @permission NA
* @devices phone, tablet, tv, wearable, car
*/
export declare interface InstallParam {
/**
* @default Indicates the user id
* @since 7
* @SysCap SystemCapability.Appexecfwk
*/
userId: number;
/**
* @default Indicates the install flag
* @since 7
* @SysCap SystemCapability.Appexecfwk
*/
installFlag: number;
/**
* @default Indicates whether the param has data
* @since 7
* @SysCap SystemCapability.Appexecfwk
*/
isKeepData: boolean;
}
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @name Provides parameters required for installing or uninstalling an application.
* @since 7
* @SysCap SystemCapability.Appexecfwk
* @permission NA
* @devices phone, tablet, tv, wearable, car
*/
export declare interface InstallParam {
/**
* @default Indicates the user id
* @since 7
* @SysCap SystemCapability.Appexecfwk
*/
userId: number;
/**
* @default Indicates the install flag
* @since 7
* @SysCap SystemCapability.Appexecfwk
*/
installFlag: number;
/**
* @default Indicates whether the param has data
* @since 7
* @SysCap SystemCapability.Appexecfwk
*/
isKeepData: boolean;
}

View File

@ -13,10 +13,10 @@
* limitations under the License.
*/
import { Resource } from '.';
import { CommonMethod } from "./common";
import { FontWeight,FontStyle } from "./enums";
import { FontWeight, FontStyle } from "./enums";
import { Length, ResourceColor, ResourceStr } from "./units";
import { Resource } from ".";
/**
* Provides a button component.
@ -85,7 +85,7 @@ interface Button extends ButtonAttribute<Button> {
}
/**
* Defines the button attibute functions.
* Defines the button attribute functions.
* @since 7
*/
declare class ButtonAttribute<T> extends CommonMethod<T> {
@ -114,10 +114,11 @@ declare class ButtonAttribute<T> extends CommonMethod<T> {
fontSize(value: Length): T;
/**
* fonse weight
* Font weight.
* @since 7
*/
fontWeight(value: number | FontWeight | string): T;
/**
* Font style.
* @since 8

View File

@ -258,7 +258,7 @@ export interface CurrentDayStyle {
dailySixRowSpace?: number;
/**
* Sigle lunar height.
* Single lunar height.
* @since 7
* @systemapi
*/
@ -286,14 +286,14 @@ export interface CurrentDayStyle {
scheduleMarkerRadius?: number;
/**
* Boun dary row offset.
* Bound dary row offset.
* @since 7
* @systemapi
*/
boundaryRowOffset?: number;
/**
* Boundary col offsett.
* Boundary col offset.
* @since 7
* @systemapi
*/

View File

@ -86,7 +86,7 @@ export declare type CanvasTextBaseline = 'alphabetic' | 'bottom' | 'hanging' | '
/**
* Sets the image smoothness attribute. The options are as follows:
* "high": high
* "high": height
* "low": (default)low
* "medium": medium
* @since 8
@ -112,7 +112,7 @@ export declare class CanvasGradient {
* Path object, which provides basic methods for drawing paths.
* @since 8
*/
export declare class CanvasPath {
declare class CanvasPath {
/**
* Draw an arc path
* @param x The x-axis coordinate of the center (center of the circle) of the arc.
@ -395,7 +395,7 @@ export declare class ImageBitmap {
* Image data object
* @since 8
*/
export declare class ImageData {
export declare interface ImageData {
/**
* Array containing image pixel data
* @since 8
@ -454,7 +454,7 @@ export declare class RenderingContextSettings {
* Canvas renderer for drawing shapes, text, images and other objects
* @since 8
*/
export declare class CanvasRenderer extends CanvasPath {
declare class CanvasRenderer extends CanvasPath {
/**
* Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque).
* The default value is 1.0. If the value is out of range, the assignment is invalid.
@ -659,18 +659,18 @@ export declare class CanvasRenderer extends CanvasPath {
* --- <blur-radius>: Blur radius. The larger the value, the greater the blur. The value cannot be a negative number.
* --- <spread-radius>: Positive numbers make the shadow expand larger, negative numbers make the shadow shrink.
* --- <color>: Shadow Color
* grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely grayed out.
* grayscale(<percentage>)Converts the image to a gray image. When the value is 100%, the image is completely grayed out.
* When the value is 0%, there is no change in the image.
* hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image.
* invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%,
* hue-rotate(<degree>)Perform color rotation on an image. When the value is 0 degrees, there is no change in the image.
* invert(<percentage>)Inverted image (representing the effect of a photographic negative). When the value is 100%,
* the image is completely inverted. When the value is 0%, there is no change in the image.
* opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent.
* opacity(<percentage>)Transparency of the image. At 0%, the image is completely transparent.
* When the value is 100%, there is no change in the image.
* saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely unsaturated.
* saturate(<percentage>)Perform saturation processing on the image. At 0%, the image is completely unsaturated.
* When the value is 100%, there is no change in the image.
* sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia.
* sepia(<percentage>)The image is sepia (nostalgic style). At 100%, the image turns completely sepia.
* When the value is 0%, there is no change in the image.
* none:Turn off filter effects
* noneTurn off filter effects
* @since 8
*/
filter(filter: string): void;
@ -1062,7 +1062,7 @@ export declare class OffscreenRenderingContext extends CanvasRenderer {
* Draw an object off the screen. The drawing content is not directly displayed on the screen.
* @since 8
*/
export declare class OffscreenCanvas extends CanvasRenderer {
export declare interface OffscreenCanvas extends CanvasRenderer {
/**
* Height of the off-screen canvas.
* @since 8
@ -1094,7 +1094,7 @@ export declare class OffscreenCanvas extends CanvasRenderer {
*TextTimer component, which provides the text timer capability.
* @since 8
*/
interface Canvas extends CanvasAttribute<Canvas>{
interface Canvas extends CanvasAttribute<Canvas> {
/**
* Construct a canvas component.
* @param context Canvas context object. For details, see {@link RenderingContext}.
@ -1111,4 +1111,4 @@ declare class CanvasAttribute<T> extends CommonMethod<T> {
onReady(event: () => void): T;
}
export declare class CanvasExtend<T> extends CanvasAttribute<T> {}
export declare const CanvasInstance: Canvas;
export declare const CanvasInterface: Canvas;

View File

@ -43,7 +43,7 @@ interface Circle extends CircleAttribute<Circle> {
* @since 7
*/
new (value?: CircleOption): Circle;
/**
* Set the value..
* @since 7

View File

@ -18,7 +18,7 @@ import { Circle } from "./circle";
import { Ellipse } from "./ellipse";
import { Path } from "./path";
import { Rect } from "./rect";
import { Resource, Length, Padding, Margin, Area} from "./units";
import { Resource, Length, Padding, Margin, Area } from "./units";
import {
Alignment,
BorderStyle,
@ -38,7 +38,7 @@ import {
Visibility,
FocusDirection,
Placement,
HoverEffect
HoverEffect,
} from "./enums";
/**
@ -62,7 +62,7 @@ export declare const Observed: ClassDecorator;
* Defining Preview ClassDecorator.
* @since 7
*/
export declare const Preview: ClassDecorator;
export declare const Preview: ClassDecorator & ((value: PreviewParams) => ClassDecorator);
/**
* Defining State PropertyDecorator.
@ -215,7 +215,7 @@ export interface AnimateToParam {
* Define Preview property
* @since 8
*/
export interface PreviewParams {
interface PreviewParams {
title?: string;
width?: number;
height?: number;
@ -283,7 +283,7 @@ export interface EventTarget {
* Defines the base event.
* @since 8
*/
interface BaseEvent {
export interface BaseEvent {
/**
* Defines the current target which fires this event.
* @since 8
@ -301,7 +301,7 @@ interface BaseEvent {
* The tap action triggers this method invocation.
* @since 7
*/
export interface ClickEvent {
export interface ClickEvent extends BaseEvent {
/**
* X coordinate of the click point relative to the left edge of the device screen.
* @since 7
@ -373,7 +373,7 @@ export interface TouchObject {
* Touch Action Function Parameters
* @since 7
*/
export interface TouchEvent {
export interface TouchEvent extends BaseEvent {
/**
* Type of the touch event.
* @since 7
@ -391,7 +391,7 @@ export interface TouchEvent {
* @since 7
*/
changedTouches: TouchObject[];
/**
* The blocking event pops up.
* @since 7
@ -485,9 +485,9 @@ export interface KeyEvent {
}
/**
* Component State Styels.
* @since 8
*/
* Component State Styels.
* @since 8
*/
export interface StateStyels {
/**
* Defines normal state styles.
@ -520,7 +520,7 @@ export interface StateStyels {
clicked?: any;
}
interface PopupOption {
export interface PopupOption {
/**
* Information in the pop-up window.
* @since 7
@ -576,7 +576,7 @@ interface PopupOption {
onStateChange?: (event: { isVisible: boolean }) => void;
}
interface CustomPopupOption {
export interface CustomPopupOption {
/**
* builder of popup
* @since 8
@ -667,6 +667,7 @@ export declare class CommonMethod<T> {
minHeight?: number | string | Resource;
maxHeight?: number | string | Resource;
}): T;
/**
* Sets the touchable of the current component
* @devices phone, tablet, car
@ -1214,10 +1215,9 @@ export declare class CommonMethod<T> {
* Applies a mask of the specified shape to the current assembly.
* @since 7
*/
mask(value: Circle| Ellipse | Path | Rect): T;
mask(value: Circle | Ellipse | Path | Rect): T;
/**
/**
* Key. User can set an key to the component to identify it.
* @since 8
*/
@ -1252,7 +1252,7 @@ export declare class CommonMethod<T> {
* Defines the CustomBuilder Type.
* @since 7
*/
declare type CustomBuilder = () => any;
export declare type CustomBuilder = () => any;
/**
* CommonShapeMethod

View File

@ -28,7 +28,7 @@ interface Counter extends CounterAttribute<Counter> {
}
/**
* Defines the Counter attibute functions.
* Defines the Counter attribute functions.
* @since 8
*/
declare class CounterAttribute<T> extends CommonMethod<T> {

View File

@ -61,7 +61,7 @@ export declare interface CustomDialogControllerOption {
* Grid count of dialog.
* @since 8
*/
gridCount?: number;
gridCount?: number;
}
/**

View File

@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CommonMethod } from "./common";
import { CommonMethod } from "./common";
/**
* DataPanelType enum
@ -49,6 +49,7 @@ export declare interface DataPanelOption {
* @since 7
*/
max?: number;
/**
* DataPanel Type
* @since 8

View File

@ -19,9 +19,8 @@ import { CommonShapeMethod } from "./common";
* Ellipse drawing.
* @since 7
*/
interface Ellipse extends EllipseAttribute<Ellipse> {
/**
/**
* use new function to set the value.
* @since 7
*/

View File

@ -734,7 +734,7 @@ export declare enum Alignment {
}
/**
* TransitionType enumeration descriptio.
* TransitionType enumeration description.
* @since 7
*/
export declare enum TransitionType {
@ -1331,6 +1331,7 @@ export declare enum TextCase {
*/
UpperCase,
}
/**
* HoverEffect enumeration description
* @since 8
@ -1365,7 +1366,7 @@ export declare enum HoverEffect {
* Placement enumeration description
* @since 8
*/
declare enum Placement {
export declare enum Placement {
/**
* Left placement
* @since 8

View File

@ -17,7 +17,7 @@ import { CommonMethod } from "./common";
import { Color } from "./enums";
/**
* Defines the Guage component.
* Defines the Gauge component.
* @since 8
*/
interface Gauge extends GaugeAttribute<Gauge> {

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
import { BaseEvent } from "./common";
/**
@ -207,24 +206,16 @@ export interface FingerInfo {
* @since 7
*/
export declare type GestureType =
| TapGesture
| LongPressGesture
| PanGesture
| PinchGesture
| SwipeGesture
| RotationGesture
| GestureGroup;
/**
* Set a type value.
* @since 7
*/
declare type GestureEvent =
| TapGestureEvent
| LongPressGestureEvent
| PanGestureEvent
| SwipeGestureEvent
| PinchGestureEvent
| RotationGestureEvent;
TapGesture | LongPressGesture | PanGesture | PinchGesture
| SwipeGesture | RotationGesture | GestureGroup;
/**
* Defines the GestureEvent type.
* @since 7
*/
export declare type GestureEvent =
TapGestureEvent | LongPressGestureEvent | PanGestureEvent
| SwipeGestureEvent | PinchGestureEvent | RotationGestureEvent;
/**
* tap gesture event used in the longpress scenario.
@ -248,6 +239,7 @@ export interface LongPressGestureEvent extends BaseGestureEvent {
* @since 7
*/
repeat: boolean;
/**
* All finger information.
* @since 8
@ -273,8 +265,7 @@ export interface PanGestureEvent extends BaseGestureEvent {
}
/**
* * pinch gesture event used for triggering the pinch gesture.
* @since 7
* slide gesture event used in the slide gesture triggering scenario.
*/
export interface SwipeGestureEvent extends BaseGestureEvent {
/**
@ -282,13 +273,13 @@ export interface SwipeGestureEvent extends BaseGestureEvent {
* @since 8
*/
angle: number;
/**
* Gesture event slide speed.
* @since 8
*/
speed: number;
}
/**
* pinch gesture event used for triggering the pinch gesture.
* @since 7
@ -451,12 +442,13 @@ interface PanGesture {
/**
* @since 8
*/
interface SwipeGesture{
interface SwipeGesture {
/**
* Set the value.
* @since 8
*/
(value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGesture;
(value?: { fingers?: number; direction?: SwipeDirection; speed?: number })
: SwipeGesture;
/**
* Slide gesture recognition success callback.
@ -555,7 +547,7 @@ interface GestureGroup {
export declare const TapGestureInterface: TapGesture;
export declare const LongPressGestureInterface: LongPressGesture;
export declare const PanGestureInterface: PanGesture;
declare const SwipeGestureInterface: SwipeGesture;
export declare const SwipeGestureInterface: SwipeGesture;
export declare const PinchGestureInterface: PinchGesture;
export declare const RotationGestureInterface: RotationGesture;
export declare const GestureGroupInterface: GestureGroup;

View File

@ -60,7 +60,7 @@ export declare interface GridContainerOption {
* Sets the total number of columns in the current layout.
* @since 7
*/
columns?: number | "auto";
columns?: number | 'auto';
/**
* Select the device width type.

View File

@ -22,7 +22,7 @@ import { Resource, ResourceColor } from "./units";
interface Hyperlink extends HyperlinkAttribute<Hyperlink> {
/**
* Return to get Hyperlink.
* adress: Web page redirected by the hyperlink component.
* address: Web page redirected by the hyperlink component.
* content: Hyperlinks in the hyperlink component display text.
* @since 7
*/

View File

@ -142,6 +142,7 @@ declare class ImageAttribute<T> extends CommonMethod<T> {
* @since 7
*/
sourceSize(value: { width: number; height: number }): T;
/**
* Sets the synchronous or asynchronous mode for image loading.
* The default parameter type is bool, and the default value is false.

View File

@ -87,6 +87,4 @@ export * from "./text_picker";
export * from "./toggle";
export * from "./units";
export * from "./video";
export * from "./web";
export * from "./xcomponent";

View File

@ -16,31 +16,34 @@
/**
* Get inspector node infos.
* @since 7
* @systemapi
*/
export declare function getInspectorNodes(): object;
/**
* Get inspector node info by node id.
* @since 7
* @systemapi
*/
export declare function getInspectorNodeById(id: number): object;
export declare function getInspectorNodeById(id: number): object;
/**
* Get inspector info by key.
* @since 8
* @systemapi
*/
export declare function getInspectorByKey(key: string): string;
export declare function getInspectorByKey(key: string): string;
/**
* Get inspector tree.
* @systemapi
* @since 8
*/
export declare function getInspectorTree(): string;
export declare function getInspectorTree(): string;
/**
* Send event to inspector by key. Return false if no inspector with key is found.
* @since 8
* @systemapi
*/
export declare function sendEventByKey(key: string, action: number, params: string): boolean;
export declare function sendEventByKey(key: string, action: number, params: string): boolean;

View File

@ -27,6 +27,7 @@ interface Line extends LineAttribute<Line> {
* @since 7
*/
new (value?: { width?: string | number; height?: string | number }): Line;
/**
* The return value of the parameter is Line.
* width: Width of the rectangle where the line resides..

View File

@ -81,7 +81,7 @@ interface List extends ListAttribute<List> {
/**
* @since 7
*/
export declare class ListAttribute<T> extends CommonMethod<T> {
declare class ListAttribute<T> extends CommonMethod<T> {
/**
* Called when the arrangement direction of the list component is set.
* @since 7
@ -127,6 +127,7 @@ export declare class ListAttribute<T> extends CommonMethod<T> {
/**
* Called when setting whether to enable chain linkage dynamic effect.
* @since 8
*/
chainAnimation(value: boolean): T;
@ -171,12 +172,13 @@ export declare class ListAttribute<T> extends CommonMethod<T> {
* @since 7
*/
onItemMove(event: (from: number, to: number) => boolean): 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
*/
onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) | void): T;
onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) | void)): T;
/**
* After binding, a callback is triggered when the component is dragged to the range of the component.
@ -201,9 +203,7 @@ export declare class ListAttribute<T> extends CommonMethod<T> {
* This callback is triggered when the drag behavior is stopped within the scope of the component.
* @since 8
*/
onItemDrop(
event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): T;
onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): T;
}
/**

View File

@ -56,6 +56,7 @@ export declare interface NavigationMenuItem {
*/
action?: () => void;
}
/**
* Provide navigator view interface
* @since 8
@ -72,7 +73,7 @@ interface Navigation extends NavigationAttribute<Navigation> {
* Declare Navigation view properties.
* @since 8
*/
export declare class NavigationAttribute<T> extends CommonMethod<T> {
declare class NavigationAttribute<T> extends CommonMethod<T> {
/**
* Navigation title
* @since 8
@ -107,7 +108,7 @@ export declare class NavigationAttribute<T> extends CommonMethod<T> {
* Navigation title bar's menus
* @since 8
*/
menus(value: Array<NavigationMenuItem> | CustomBuilder): T;
menus(value: Array<NavigationMenuItem> | CustomBuilder) : T;
/**
* Tool bar
@ -127,5 +128,6 @@ export declare class NavigationAttribute<T> extends CommonMethod<T> {
*/
onTitleModeChanged(callback: (titleMode: NavigationTitleMode) => void): T;
}
export declare class NavigationExtend<T> extends NavigationAttribute<T> {}
export declare const NavigationInterface: Navigation;

View File

@ -20,11 +20,12 @@ import { CommonShapeMethod } from "./common";
* @since 7
*/
interface Path extends PathAttribute<Path> {
/**
/**
* Use new to create Path.
* @since 7
*/
new (value?: { width?: number | string; height?: number | string; commands?: string }): Path;
/**
* Called when drawing path.
* @since 7

View File

@ -24,14 +24,12 @@ import { Length, ResourceColor, ResourceStr } from "./units";
export declare enum IconPosition {
/**
* The icon is at the beginning of the text.
* @devices phone, tablet, car.
* @since 8
*/
Start,
/**
* The icon is at the end of the text.
* @devices phone, tablet, car.
* @since 8
*/
End,
@ -97,4 +95,5 @@ declare class PieceAttribute<T> extends CommonMethod<T> {
}
export declare class PieceExtend<T> extends PieceAttribute<T> {}
export declare const PieceInterface: Piece;

View File

@ -20,7 +20,7 @@ import { CommonShapeMethod } from "./common";
* @since 7
*/
interface Polygon extends PolygonAttribute<Polygon> {
/**
/**
* Uses new to create Polygon.
* @since 7
*/
@ -28,7 +28,6 @@ interface Polygon extends PolygonAttribute<Polygon> {
/**
* Called when drawing a polygon.
* @devices phone, tablet, car.
* @since 7
*/
(value?: { width?: string | number; height?: string | number }): Polygon;
@ -37,7 +36,6 @@ interface Polygon extends PolygonAttribute<Polygon> {
declare class PolygonAttribute<T> extends CommonShapeMethod<T> {
/**
* Called when the vertex coordinate list of a polygon is set.
* @devices phone, tablet, car.
* @since 7
*/
points(value: Array<any>): T;

View File

@ -20,16 +20,11 @@ import { CommonShapeMethod } from "./common";
* @since 7
*/
interface Polyline extends PolylineAttribute<Polyline> {
/**
/**
* Uses new to create Polyline.
* @since 7
*/
new (value?: { width?: string | number; height?: string | number }): Polyline;
/**
* Called when using the draw polyline interface.
* @since 7
*/
(): Polyline;
/**
* Called when using the draw fold.

View File

@ -14,7 +14,7 @@
*/
import { CommonMethod } from "./common";
import { ResourceColor } from "./units";
import { Length, ResourceColor } from "./units";
/**
* Type of progress bar
@ -41,6 +41,7 @@ export declare enum ProgressStyle {
* @since 7
*/
Eclipse,
/**
* ScaleRing progress bar.
* @devices phone, tablet, car.
@ -54,6 +55,7 @@ export declare enum ProgressStyle {
* @since 8
*/
Capsule,
}
/**
@ -87,15 +89,15 @@ declare class ProgressAttribute<T> extends CommonMethod<T> {
/**
* Called when the style of the circular progress bar is set.
* @since 7
* @deprecated since 7
*/
circularStyle(value: { strokeWidth?: number; scaleCount?: number; scaleWidth?: number }): T;
circularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): T;
/**
* Called when the style of the cricular progress bar is set.
* @since 7
* @deprecated since 7
*/
cricularStyle(value: { strokeWidth?: number; scaleCount?: number; scaleWidth?: number }): T;
cricularStyle(value: { strokeWidth?: Length; scaleCount?: number; scaleWidth?: Length }): T;
}
export declare class ProgressExtend<T> extends ProgressAttribute<T> {}

View File

@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CommonMethod } from "./common";
/**
@ -37,14 +38,16 @@ export declare interface RadioOption {
/**
* Provides an interface for creating a radio box.
* @devices phone, tablet, car
* @since 8
*/
interface Radio extends RadioAttribute<Radio> {
/**
* Called when a radio box is created.
* @devices phone, tablet, car
* @since 8
*/
(options: { value: string }): Radio;
(options: RadioOption): Radio;
}
/**

View File

@ -20,13 +20,36 @@ import { CommonShapeMethod } from "./common";
* @since 7
*/
interface Rect extends RectAttribute<Rect> {
/**
* Use new function to create Rect.
* @since 7
*/
new (
value?:
| {
width?: number | string;
height?: number | string;
radius?: number | string | Array<any>;
}
| {
width?: number | string;
height?: number | string;
radiusWidth?: number | string;
radiusHeight?: number | string;
},
): Rect;
/**
* Called when a rectangle is created.
* @since 7
*/
(
value?:
| { width?: number | string; height?: number | string; radius?: number | string | Array<any> }
| {
width?: number | string;
height?: number | string;
radius?: number | string | Array<any>;
}
| {
width?: number | string;
height?: number | string;

View File

@ -15,7 +15,7 @@
import { CommonMethod } from "./common";
import { BarState } from "./enums";
import { Scroller } from "./scroll"
import { Scroller } from "./scroll";
/**
* Content scroll direction.

View File

@ -17,6 +17,7 @@ import { CommonMethod } from "./common";
import { ResourceColor, Font } from "./units";
/**
* The construct function of search
* @since 8
*/
interface Search extends SearchAttribute<Search> {
@ -24,6 +25,7 @@ interface Search extends SearchAttribute<Search> {
}
/**
* The attribute function of search
* @since 8
*/
declare class SearchAttribute<T> extends CommonMethod<T> {
@ -32,6 +34,7 @@ declare class SearchAttribute<T> extends CommonMethod<T> {
* @since 8
*/
searchButton(value: string): T;
/**
* Set the place hold text color
* @since 8
@ -49,16 +52,19 @@ declare class SearchAttribute<T> extends CommonMethod<T> {
* @since 8
*/
textFont(value?: Font): T;
/**
* Call the function when clicked the search button
* @since 8
*/
onSubmit(callback: (value: string) => void): T;
/**
* Call the function when editing the input text
* @since 8
*/
onChange(callback: (value: string) => void): T;
/**
* Called when using the Clipboard menu
* @since 8

View File

@ -22,6 +22,12 @@ import { Resource, ResourceColor } from "./units";
* @since 7
*/
interface Shape extends ShapeAttribute<Shape> {
/**
* Use the new function to create Shape.
* @since 7
*/
new (value?: PixelMap): Shape;
/**
* Called when a component is drawn.
* @since 7

View File

@ -1,37 +1,37 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CommonMethod } from "./common"
/**
* Provides the interface for the sheet attributes.
* @since 8
*/
interface Sheet extends SheetAttribute<Sheet>{
/**
* Create sheet.
* @since 8
*/
(): Sheet;
}
/**
* Declares sheet properties.
* @since 8
*/
declare class SheetAttribute<T> extends CommonMethod<T> {}
export declare class SheetExtend<T> extends SheetAttribute<T> {}
export declare const SheetInstance: Sheet;
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CommonMethod } from "./common";
/**
* Provides the interface for the sheet attributes.
* @since 8
*/
interface Sheet extends SheetAttribute<Sheet> {
/**
* Create sheet.
* @since 8
*/
(): Sheet;
}
/**
* Declares sheet properties.
* @since 8
*/
declare class SheetAttribute<T> extends CommonMethod<T> {}
export declare class SheetExtend<T> extends SheetAttribute<T> {}
export declare const SheetInterface: Sheet;

View File

@ -33,6 +33,7 @@ export declare enum SliderStyle {
* @since 7
*/
InSet,
/**
* Capsule style slider.
* @since 8
@ -98,6 +99,7 @@ export declare interface SliderOption {
* @since 7
*/
style?: SliderStyle;
/**
* Sets the slider direction style.
* @since 8

View File

@ -142,8 +142,7 @@ declare abstract class SubscribedAbstractProperty<T> {
*/
declare class SyncedPropertyTwoWay<T>
extends SubscribedAbstractProperty<T>
implements ISinglePropertyChangeSubscriber<T>
{
implements ISinglePropertyChangeSubscriber<T> {
/**
* Sources of synchronization attributes bidirectionally.
* @since 7
@ -186,8 +185,7 @@ declare class SyncedPropertyTwoWay<T>
*/
declare class SyncedPropertyOneWay<T>
extends SubscribedAbstractProperty<T>
implements ISinglePropertyChangeSubscriber<T>
{
implements ISinglePropertyChangeSubscriber<T> {
/**
* Pack value for single-item binding.
* @since 7

View File

@ -17,11 +17,13 @@ import { CommonMethod } from "./common";
/**
* Declare the stepper.
* @since 8
*/
interface Stepper extends StepperAttribute<Stepper> {
/**
* Called when the stepper component is used.
* @since 8
*/
(value?: { index?: number }): Stepper;
@ -34,34 +36,39 @@ interface Stepper extends StepperAttribute<Stepper> {
declare class StepperAttribute<T> extends CommonMethod<T> {
/**
* Callback when the finish label is clicked.
* @since 8
*/
onFinish(callback: () => void): T;
/**
* Callback when the skip label is clicked.
* @since 8
*/
onSkip(callback: () => void): T;
/**
* Callback when the change label is clicked.
* @since 8
*/
onChange(callback: (prevIndex?: number, index?: number) => void): T;
/**
* Callback when the next label is clicked.
* @since 8
*/
onNext(callback: (index?: number, pendingIndex?: number) => void): T;
/**
* Callback when the previous label is clicked.
* @since 8
*/
onPrevious(callback: (index?: number, pendingIndex?: number) => void): T;
}
export declare class StepperExtend<T> extends StepperAttribute<T> {}
export declare const StepperInstance: Stepper;
export declare const StepperInterface: Stepper;

View File

@ -38,6 +38,7 @@ export declare class SwiperController {
* @since 7
*/
showPrevious();
/**
* Called when need to stop the swiper animation.
* @since 8

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
import { CommonMethod } from "./common";
import { CommonMethod, CustomBuilder } from "./common";
import { Resource } from "./units";
/**
@ -37,7 +37,8 @@ declare class TabContentAttribute<T> extends CommonMethod<T> {
* Called when tabbar is entered.
* @since 7
*/
tabBar(value: string | Resource | { icon?: string | Resource; text?: string | Resource }): T;
tabBar(value: string | Resource | CustomBuilder |
{ icon?: string | Resource; text?: string | Resource }): T;
}
export declare class TabContentExtend<T> extends TabContentAttribute<T> {}

View File

@ -15,65 +15,65 @@
import { ResourceStr } from ".";
import { CommonMethod } from "./common";
import { TextAlign, FontStyle,FontWeight} from "./enums";
import { Font, ResourceColor, Length} from "./units";
import { TextAlign, FontWeight, FontStyle } from "./enums";
import { Font, Length, ResourceColor } from "./units";
/**
* Defines the option of TextArea.
* @since 8
* @since 7
*/
export declare interface TextAreaOption {
/**
* The place holder text string.
* @since 8
* @since 7
*/
placeholder?: ResourceStr;
/**
* Sets the current value of TextArea.
* @since 8
* @since 7
*/
text?: ResourceStr;
}
/**
* Provides an interface for the multi-line text input component.
* @since 8
* @since 7
*/
interface TextArea extends TextAreaAttribute<TextArea> {
/**
* Called when writing multiple lines of text.
* @since 8
* @since 7
*/
(value?: TextAreaOption): TextArea;
}
/**
* Defines the attribute functions of TextArea.
* @since 8
* @since 7
*/
declare class TextAreaAttribute<T> extends CommonMethod<T> {
/**
* Called when the color of the placeholder is set.
* @since 8
* @since 7
*/
placeholderColor(value: ResourceColor): T;
/**
* Called when the font property of the placeholder is set.
* @since 8
* @since 7
*/
placeholderFont(value: Font): T;
/**
* Called when the alignment of the contents of a multiline text box is set.
* @since 8
* @since 7
*/
textAlign(value: TextAlign): T;
/**
* Called when the insertion cursor color is set.
* @since 6
* @since 7
*/
caretColor(value: ResourceColor): T;
@ -110,9 +110,10 @@ declare class TextAreaAttribute<T> extends CommonMethod<T> {
/**
* Called when the input changes.
* @devices phone, tablet, car.
* @since 8
* @since 7
*/
onChange(callback: (value: string) => void): T;
/**
* Called when using the Clipboard menu
* @since 7

View File

@ -14,155 +14,155 @@
*/
import { Font } from ".";
import { CommonMethod } from "./common";
import { FontWeight, FontStyle } from "./enums";
import { CommonMethod } from "./common";
import { ResourceColor, ResourceStr, Length } from "./units";
/**
* Declare the type of input box
* @since 8
* @since 7
*/
export declare enum InputType {
/**
* Basic input mode.
* @since 8
* @since 7
*/
Normal,
/**
* Password entry mode.
* @since 8
* @since 7
*/
Number,
/**
* E-mail address input mode.
* @since 8
* @since 7
*/
Email,
/**
* Pure digital input mode.
* @since 8
* @since 7
*/
Password,
}
/**
* Declare the type of soft keyboard.
* @since 8
* @since 7
*/
export declare enum EnterKeyType {
/**
* Go.
* @since 8
* @since 7
*/
Go,
/**
* Search.
* @since 8
* @since 7
*/
Search,
/**
* Send.
* @since 8
* @since 7
*/
Send,
/**
* Next.
* @since 8
* @since 7
*/
Next,
/**
* Done.
* @since 8
* @since 7
*/
Done,
}
/**
* Defines the option of TextInput.
* @since 8
* @since 7
*/
export declare interface TextInputOption {
/**
* The place holder text string.
* @since 8
* @since 7
*/
placeholder?: ResourceStr;
/**
* Sets the current value of TextArea.
* @since 8
* @since 7
*/
text?: ResourceStr;
}
/**
* Provides a single-line text input component interface.
* @since 8
* @since 7
*/
interface TextInput extends TextInputAttribute<TextInput> {
/**
* Called when writing a single line of text.
* @since 8
* @since 7
*/
(value?: TextInputOption): TextInput;
}
/**
* @since 8
* @since 7
*/
declare class TextInputAttribute<T> extends CommonMethod<T> {
/**
* Called when the input type is set.
* @since 8
* @since 7
*/
type(value: InputType): T;
/**
* Called when the color of the placeholder is set.
* @since 8
* @since 7
*/
placeholderColor(value: ResourceColor): T;
/**
* Called when the font property of the placeholder is set.
* @since 8
* @since 7
*/
placeholderFont(value?: Font): T;
/**
* Called when the type of soft keyboard input button is set.
* @since 8
* @since 7
*/
enterKeyType(value: EnterKeyType): T;
/**
* Called when the color of the insertion cursor is set.
* @since 8
* @since 7
*/
caretColor(value: ResourceColor): T;
/**
* Called when judging whether the text editing has changed.
* @since 8
* @since 7
*/
onEditChanged(callback: (isEditing: boolean) => void): T;
/**
* Called when submitted.
* @since 8
* @since 7
*/
onSubmit(callback: (enterKey: EnterKeyType) => void): T;
/**
* Called when the input of the input box changes.
* @since 8
* @since 7
*/
onChange(callback: (value: string) => void): T;

View File

@ -66,7 +66,7 @@ declare class TextPickerAttribute<T> extends CommonMethod<T> {
* Called when the default height of the selected element is set.
* @since 8
*/
defaultPickerItemHeight(value: number): T;
defaultPickerItemHeight(value: number | string): T;
/**
* Called when the pop-up value is returned.

View File

@ -48,7 +48,7 @@ interface Toggle extends ToggleAttribute<Toggle> {
* Set parameters to obtain the toggle.
* @since 8
*/
(options?: { type: ToggleType; isOn?: boolean }): Toggle;
(options: { type: ToggleType; isOn?: boolean }): Toggle;
}
/**
@ -71,7 +71,7 @@ declare class ToggleAttribute<T> extends CommonMethod<T> {
* Called when the color of the selected button is set.
* @since 8
*/
swithPointColor(color: ResourceColor): T;
switchPointColor(color: ResourceColor): T;
}
export declare class ToggleExtend<T> extends ToggleAttribute<T> {}

View File

@ -79,7 +79,7 @@ export declare type Padding = {
/**
* Defines the margin property.
* @sicne 7
* @since 7
*/
export declare type Margin = Padding;
@ -130,6 +130,7 @@ export declare interface Font {
*/
style?: FontStyle;
}
/**
* Defines the area property.
* @since 8

View File

@ -103,7 +103,7 @@ declare class VideoAttribute<T> extends CommonMethod<T> {
controls(value: boolean): T;
/**
* Called when judging whether the video is played circularly.
* Called when judging whether the video is played circular.
* @since 6
*/
loop(value: boolean): T;

View File

@ -1,97 +0,0 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CommonMethod } from "./common";
/**
* Defines the WebController.
* @since 8
*/
export declare class WebController {
/**
* Defines the constructor of WebController.
* @since 8
*/
constructor();
/**
* Reload current web page.
* @since 8
*/
reload();
}
/**
* Defines the option of Web component.
* @since 8
*/
export declare interface WebOption {
/**
* The web url.
* @since 8
*/
src: string;
/**
* The web Controller.
* @since 8
*/
controller: WebController;
}
/**
* Defines the Web component.
* @since 8
*/
interface Web extends WebAttribute<Web> {
/**
* Defines the constructor of Web.
* @since 8
*/
(value: WebOption): Web;
}
/**
* Defines the Web component attribute functions.
* @since 8
*/
declare class WebAttribute<T> extends CommonMethod<T> {
/**
* The Callback of onPageStart.
* @since 8
*/
onPageStart(callback: (url: string) => void): T;
/**
* The Callback of onPageFinish.
* @since 8
*/
onPageFinish(callback: (url: string) => void): T;
/**
* The Callback of onError.
* @since 8
*/
onError(callback: (errorMsg: string) => void): T;
/**
* The Callback of onMessage.
* @since 8
*/
onMessage(callback: (msg: string) => void): T;
}
export declare class WebExtend<T> extends WebAttribute<T> {}
export declare const WebInterface: Web;

View File

@ -13,13 +13,18 @@
* limitations under the License.
*/
import { CommonMethod } from "./common"
import { CommonMethod } from "./common";
/**
* @since 8
*/
interface XComponent extends XComponentAttribute<XComponent>{
(value: { id: string; type: string; libraryname: string; source: string }): XComponent;
interface XComponent extends XComponentAttribute<XComponent> {
(value: {
id: string;
type: string;
libraryname: string;
source: string;
}): XComponent;
}
/**
@ -30,13 +35,13 @@ declare class XComponentAttribute<T> extends CommonMethod<T> {
* Called when judging whether the xcomponent surface is created.
* @since 8
*/
onLoad(callback: (event?: any) => void): T;
onLoad(callback: (event?: {}) => void): T;
/**
* Called when judging whether the xcomponent is destroyed.
* @since 8
*/
onDestroy(event: () => void): T;
onDestroy(event: () => void): T;
}
export declare class XComponentExtend<T> extends XComponentAttribute<T> {}

View File

@ -68,13 +68,6 @@ export enum DeviceType {
*/
DEVICE_TYPE_CAR = 0x02,
/**
* Indicates a PC.
*
* @since 6
*/
DEVICE_TYPE_PC = 0x03,
/**
* Indicates a smart TV.
*

View File

@ -106,7 +106,6 @@ export interface DeviceResponse {
* ar: AR
* vr: virtual reality
* earphones: headset
* pc: personal computer
* speaker: speaker
* smartVision: smart visual device
* linkIoT: connection module

View File

@ -2325,7 +2325,7 @@
"name": "border-image-repeat",
"syntax": [
{
"name": "stretch | repeat | round"
"name": "stretch | repeat | round | space"
}
],
"values": [
@ -2340,6 +2340,10 @@
{
"name": "round",
"description": "Tile the picture according to the image size"
},
{
"name": "space",
"description": "Tile the picture according to the image size, leaving the extra part blank."
}
],
"version": [

View File

@ -93,7 +93,6 @@ export interface DeviceResponse {
* ar: AR
* vr: virtual reality
* earphones: headset
* pc: personal computer
* speaker: speaker
* smartVision: smart visual device
* linkIoT: connection module

View File

@ -93,7 +93,6 @@ export interface DeviceResponse {
* ar: AR
* vr: virtual reality
* earphones: headset
* pc: personal computer
* speaker: speaker
* smartVision: smart visual device
* linkIoT: connection module

View File

@ -93,7 +93,6 @@ export interface DeviceResponse {
* ar: AR
* vr: virtual reality
* earphones: headset
* pc: personal computer
* speaker: speaker
* smartVision: smart visual device
* linkIoT: connection module

View File

@ -93,7 +93,6 @@ export interface DeviceResponse {
* ar: AR
* vr: virtual reality
* earphones: headset
* pc: personal computer
* speaker: speaker
* smartVision: smart visual device
* linkIoT: connection module

View File

@ -93,7 +93,6 @@ export interface DeviceResponse {
* ar: AR
* vr: virtual reality
* earphones: headset
* pc: personal computer
* speaker: speaker
* smartVision: smart visual device
* linkIoT: connection module