mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 09:22:53 +00:00
update ets declare file Signed-off-by: lihong <lihong67@huawei.com> Change-Id: I7f9e942cf69032c18e25784fffe3f519aab5f763
This commit is contained in:
parent
031029f032
commit
4ee6ca38db
12
BUILD.gn
12
BUILD.gn
@ -28,9 +28,11 @@ ohos_copy("ets_internal_api") {
|
||||
ohos_copy("ets_component") {
|
||||
sources = [
|
||||
"api/@internal/component/ets/ability_component.d.ts",
|
||||
"api/@internal/component/ets/action_sheet.d.ts",
|
||||
"api/@internal/component/ets/alert_dialog.d.ts",
|
||||
"api/@internal/component/ets/alphabet_indexer.d.ts",
|
||||
"api/@internal/component/ets/animator.d.ts",
|
||||
"api/@internal/component/ets/badge.d.ts",
|
||||
"api/@internal/component/ets/blank.d.ts",
|
||||
"api/@internal/component/ets/button.d.ts",
|
||||
"api/@internal/component/ets/calendar.d.ts",
|
||||
@ -42,25 +44,32 @@ ohos_copy("ets_component") {
|
||||
"api/@internal/component/ets/counter.d.ts",
|
||||
"api/@internal/component/ets/custom_dialog_controller.d.ts",
|
||||
"api/@internal/component/ets/datapanel.d.ts",
|
||||
"api/@internal/component/ets/datePicker.d.ts",
|
||||
"api/@internal/component/ets/divider.d.ts",
|
||||
"api/@internal/component/ets/ellipse.d.ts",
|
||||
"api/@internal/component/ets/flex.d.ts",
|
||||
"api/@internal/component/ets/forEach.d.ts",
|
||||
"api/@internal/component/ets/form_component.d.ts",
|
||||
"api/@internal/component/ets/gauge.d.ts",
|
||||
"api/@internal/component/ets/geometryView.d.ts",
|
||||
"api/@internal/component/ets/gesture.d.ts",
|
||||
"api/@internal/component/ets/grid.d.ts",
|
||||
"api/@internal/component/ets/gridItem.d.ts",
|
||||
"api/@internal/component/ets/grid_container.d.ts",
|
||||
"api/@internal/component/ets/hyperlink.d.ts",
|
||||
"api/@internal/component/ets/image.d.ts",
|
||||
"api/@internal/component/ets/image_animator.d.ts",
|
||||
"api/@internal/component/ets/index.d.ts",
|
||||
"api/@internal/component/ets/lazyForEach.d.ts",
|
||||
"api/@internal/component/ets/line.d.ts",
|
||||
"api/@internal/component/ets/list.d.ts",
|
||||
"api/@internal/component/ets/listItem.d.ts",
|
||||
"api/@internal/component/ets/loadingProgress.d.ts",
|
||||
"api/@internal/component/ets/marquee.d.ts",
|
||||
"api/@internal/component/ets/menu.d.ts",
|
||||
"api/@internal/component/ets/navigator.d.ts",
|
||||
"api/@internal/component/ets/navigatorView.d.ts",
|
||||
"api/@internal/component/ets/option.d.ts",
|
||||
"api/@internal/component/ets/pageTransition.d.ts",
|
||||
"api/@internal/component/ets/panel.d.ts",
|
||||
"api/@internal/component/ets/path.d.ts",
|
||||
@ -84,6 +93,9 @@ ohos_copy("ets_component") {
|
||||
"api/@internal/component/ets/tab_content.d.ts",
|
||||
"api/@internal/component/ets/tabs.d.ts",
|
||||
"api/@internal/component/ets/text.d.ts",
|
||||
"api/@internal/component/ets/textPicker.d.ts",
|
||||
"api/@internal/component/ets/textarea.d.ts",
|
||||
"api/@internal/component/ets/textinput.d.ts",
|
||||
"api/@internal/component/ets/toggle.d.ts",
|
||||
"api/@internal/component/ets/video.d.ts",
|
||||
]
|
||||
|
@ -1,36 +1,41 @@
|
||||
/*
|
||||
* 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";
|
||||
import {Want} from "../../../ability/want";
|
||||
|
||||
export declare class AbilityController {
|
||||
constructor();
|
||||
startAbility(value: Want);
|
||||
performBackPress();
|
||||
getStackCount();
|
||||
}
|
||||
|
||||
interface AbilityComponent extends CommonMethod<AbilityComponent> {
|
||||
(value: { want: Want, controller?: AbilityController }): AbilityComponent;
|
||||
|
||||
onReady(event: () => void): AbilityComponent;
|
||||
onDestroy(event: () => void): AbilityComponent;
|
||||
onAbilityCreated(event: (name: string) => void): AbilityComponent;
|
||||
onAbilityMoveToFront(event: () => void): AbilityComponent;
|
||||
onAbilityWillRemove(event: () => void): AbilityComponent;
|
||||
}
|
||||
|
||||
export declare const AbilityComponentInterface: AbilityComponent;
|
||||
/*
|
||||
* 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";
|
||||
import {Want} from "../api/common/ability/want";
|
||||
|
||||
export declare class AbilityController {
|
||||
constructor();
|
||||
startAbility(value: Want);
|
||||
performBackPress();
|
||||
getStackCount();
|
||||
}
|
||||
|
||||
export declare class AbilityComponentExtend<T> extends AbilityComponentAttribute<T> {
|
||||
}
|
||||
|
||||
interface AbilityComponent extends AbilityComponentAttribute<AbilityComponent> {
|
||||
(value: { want: Want, controller?: AbilityController }): AbilityComponent;
|
||||
}
|
||||
|
||||
declare class AbilityComponentAttribute<T> extends CommonMethod<T> {
|
||||
onReady(event: () => void): T;
|
||||
onDestroy(event: () => void): T;
|
||||
onAbilityCreated(event: (name: string) => void): T;
|
||||
onAbilityMoveToFront(event: () => void): T;
|
||||
onAbilityWillRemove(event: () => void): T;
|
||||
}
|
||||
|
||||
export declare const AbilityComponentInterface: AbilityComponent;
|
||||
|
47
api/@internal/component/ets/action_sheet.d.ts
vendored
Normal file
47
api/@internal/component/ets/action_sheet.d.ts
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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 {CommonMethod, Resource} from "./common"
|
||||
|
||||
interface SheetInfo {
|
||||
title: string | Resource;
|
||||
icon?: string | Resource;
|
||||
action: () => void;
|
||||
}
|
||||
|
||||
export declare class ActionSheetExtend<T> extends ActionSheetAttribute<T> {
|
||||
}
|
||||
|
||||
interface ActionSheet extends ActionSheetAttribute<ActionSheet> {
|
||||
}
|
||||
|
||||
declare class ActionSheetAttribute<T> extends CommonMethod<T> {
|
||||
show(value: {
|
||||
title: string | Resource;
|
||||
message: string | Resource;
|
||||
confirm?: {
|
||||
value: string | Resource;
|
||||
action: () => void;
|
||||
};
|
||||
cancel?: () => void;
|
||||
sheets: Array<SheetInfo>;
|
||||
autoCancel?: boolean;
|
||||
alignment?: DialogAlignment;
|
||||
offset?: { dx: number | string | Resource, dy: number | string | Resource };
|
||||
});
|
||||
}
|
||||
|
||||
export declare const ActionSheetInterface: ActionSheet;
|
99
api/@internal/component/ets/alert_dialog.d.ts
vendored
99
api/@internal/component/ets/alert_dialog.d.ts
vendored
@ -1,44 +1,55 @@
|
||||
/*
|
||||
* 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, Resource} from "./common"
|
||||
|
||||
interface AlertDialog extends CommonMethod<AlertDialog> {
|
||||
show(value: {
|
||||
title?: string | Resource;
|
||||
message: string | Resource;
|
||||
autoCancel?: boolean;
|
||||
confirm?: {
|
||||
value: string | Resource;
|
||||
action: () => void;
|
||||
};
|
||||
cancel?: () => void;
|
||||
} | {
|
||||
title?: string | Resource;
|
||||
message: string | Resource;
|
||||
autoCancel?: boolean;
|
||||
primaryButton: {
|
||||
value: string | Resource;
|
||||
action: () => void;
|
||||
};
|
||||
secondaryButton: {
|
||||
value: string | Resource;
|
||||
action: () => void;
|
||||
};
|
||||
cancel?: () => void;
|
||||
});
|
||||
}
|
||||
|
||||
export declare const AlertDialogInterface: AlertDialog;
|
||||
/*
|
||||
* 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, Resource} from "./common"
|
||||
|
||||
export declare enum DialogAlignment {
|
||||
Top,
|
||||
Center,
|
||||
Bottom,
|
||||
Default
|
||||
}
|
||||
|
||||
interface AlertDialog {
|
||||
show(value: {
|
||||
title?: string | Resource;
|
||||
message: string | Resource;
|
||||
autoCancel?: boolean;
|
||||
confirm?: {
|
||||
value: string | Resource;
|
||||
action: () => void;
|
||||
};
|
||||
cancel?: () => void;
|
||||
alignment?: DialogAlignment;
|
||||
offset?: { dx: number | string | Resource, dy: number | string | Resource };
|
||||
} | {
|
||||
title?: string | Resource;
|
||||
message: string | Resource;
|
||||
autoCancel?: boolean;
|
||||
primaryButton: {
|
||||
value: string | Resource;
|
||||
action: () => void;
|
||||
};
|
||||
secondaryButton: {
|
||||
value: string | Resource;
|
||||
action: () => void;
|
||||
};
|
||||
cancel?: () => void;
|
||||
alignment?: DialogAlignment;
|
||||
offset?: { dx: number | string | Resource, dy: number | string | Resource };
|
||||
});
|
||||
}
|
||||
|
||||
export declare const AlertDialogInterface: AlertDialog;
|
||||
|
@ -17,36 +17,41 @@ import {CommonMethod, Color, Resource} from "./common";
|
||||
import {FontWeight, FontStyle} from "./text";
|
||||
|
||||
export declare enum IndexerAlign {
|
||||
Left,
|
||||
Right
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
|
||||
interface AlphabetIndexer extends CommonMethod<AlphabetIndexer> {
|
||||
export declare class AlphabetIndexerExtend<T> extends AlphabetIndexerAttribute<T> {
|
||||
}
|
||||
|
||||
interface AlphabetIndexer extends AlphabetIndexerAttribute<AlphabetIndexer> {
|
||||
(value: {ArrayValue : Array<string>, selected : number}): AlphabetIndexer;
|
||||
}
|
||||
|
||||
onSelected(event: (index: number) => void): AlphabetIndexer;
|
||||
declare class AlphabetIndexerAttribute<T> extends CommonMethod<T> {
|
||||
onSelected(event: (index: number) => void): T;
|
||||
|
||||
color(value: Color | number | string | Resource): AlphabetIndexer;
|
||||
color(value: Color | number | string | Resource): T;
|
||||
|
||||
selectedColor(value: Color | number | string | Resource): AlphabetIndexer;
|
||||
selectedColor(value: Color | number | string | Resource): T;
|
||||
|
||||
popupColor(value: Color | number | string | Resource): AlphabetIndexer;
|
||||
popupColor(value: Color | number | string | Resource): T;
|
||||
|
||||
selectedBackgroundColor(value: Color | number | string | Resource): AlphabetIndexer;
|
||||
selectedBackgroundColor(value: Color | number | string | Resource): T;
|
||||
|
||||
popupBackground(value: Color | number | string | Resource): AlphabetIndexer;
|
||||
popupBackground(value: Color | number | string | Resource): T;
|
||||
|
||||
usingPopup(value: boolean): AlphabetIndexer;
|
||||
usingPopup(value: boolean): T;
|
||||
|
||||
selectedFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer;
|
||||
selectedFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): T;
|
||||
|
||||
popupFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer;
|
||||
popupFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): T;
|
||||
|
||||
iteamSize(value: string | number): AlphabetIndexer;
|
||||
itemSize(value: string | number): T;
|
||||
|
||||
font(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer;
|
||||
font(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): T;
|
||||
|
||||
alignStyle(value: IndexerAlign): AlphabetIndexer;
|
||||
alignStyle(value: IndexerAlign): T;
|
||||
}
|
||||
|
||||
export declare const AlphabetIndexerInterface: AlphabetIndexer;
|
||||
|
45
api/@internal/component/ets/animator.d.ts
vendored
45
api/@internal/component/ets/animator.d.ts
vendored
@ -16,51 +16,56 @@
|
||||
import {CommonMethod, AnimationStatus, Curve, FillMode, PlayMode} from "./common";
|
||||
|
||||
export declare class SpringProp {
|
||||
constructor(mass: number, stiffness: number, damping: number): SpringProp;
|
||||
constructor(mass: number, stiffness: number, damping: number);
|
||||
}
|
||||
|
||||
export declare class SpringMotion {
|
||||
constructor(start: number, end: number, velocity: number, prop: SpringProp): SpringMotion;
|
||||
constructor(start: number, end: number, velocity: number, prop: SpringProp);
|
||||
}
|
||||
|
||||
export declare class FrictionMotion {
|
||||
constructor(friction: number, position: number, velocity: number): FrictionMotion;
|
||||
constructor(friction: number, position: number, velocity: number);
|
||||
}
|
||||
|
||||
export declare class ScrollMotion {
|
||||
constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp): ScrollMotion;
|
||||
constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp);
|
||||
}
|
||||
|
||||
interface Animator extends CommonMethod<Animator> {
|
||||
(value: string): Animator;
|
||||
export declare class AnimatorExtend<T> extends AnimatorAttribute<T> {
|
||||
}
|
||||
|
||||
state(value: AnimationStatus): Animator;
|
||||
interface Animator extends AnimatorAttribute<Animator> {
|
||||
(value: string): Animator;
|
||||
}
|
||||
|
||||
duration(value: number): Animator;
|
||||
declare class AnimatorAttribute<T> extends CommonMethod<T> {
|
||||
state(value: AnimationStatus): T;
|
||||
|
||||
curve(value: Curve): Animator;
|
||||
duration(value: number): T;
|
||||
|
||||
delay(value: number): Animator;
|
||||
curve(value: Curve): T;
|
||||
|
||||
fillMode(value: FillMode): Animator;
|
||||
delay(value: number): T;
|
||||
|
||||
iterations(value: number): Animator;
|
||||
fillMode(value: FillMode): T;
|
||||
|
||||
playMode(value: PlayMode): Animator;
|
||||
iterations(value: number): T;
|
||||
|
||||
motion(value: Motion): Animator;
|
||||
playMode(value: PlayMode): T;
|
||||
|
||||
onStart(event: () => void): Animator;
|
||||
motion(value: SpringMotion | FrictionMotion | ScrollMotion): T;
|
||||
|
||||
onPause(event: () => void): Animator;
|
||||
onStart(event: () => void): T;
|
||||
|
||||
onRepeat(event: () => void): Animator;
|
||||
onPause(event: () => void): T;
|
||||
|
||||
onCancel(event: () => void): Animator;
|
||||
onRepeat(event: () => void): T;
|
||||
|
||||
onFinish(event: () => void): Animator;
|
||||
onCancel(event: () => void): T;
|
||||
|
||||
onFrame(event: (value: number) => void): Animator;
|
||||
onFinish(event: () => void): T;
|
||||
|
||||
onFrame(event: (value: number) => void): T;
|
||||
}
|
||||
|
||||
export declare const AnimatorInterface: Animator;
|
42
api/@internal/component/ets/badge.d.ts
vendored
Normal file
42
api/@internal/component/ets/badge.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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, Color} from "./common"
|
||||
|
||||
declare enum BadgePosition {
|
||||
Right,
|
||||
RightTop,
|
||||
Left
|
||||
}
|
||||
|
||||
interface BadgeStyle {
|
||||
color?: Color;
|
||||
fontSize?: number | string;
|
||||
badgeSize?: number | string;
|
||||
badgeColor: Color;
|
||||
}
|
||||
|
||||
export declare class BadgeExtend<T> extends BadgeAttribute<T> {
|
||||
}
|
||||
|
||||
interface Badge extends BadgeAttribute<Badge> {
|
||||
(value: {count: number, position?: BadgePosition, maxCount?: number, style?: BadgeStyle}): Badge;
|
||||
(value: {value: string, position?: BadgePosition, maxCount?: number, style?: BadgeStyle}): Badge;
|
||||
}
|
||||
|
||||
declare class BadgeAttribute<T> extends CommonMethod<T> {
|
||||
}
|
||||
|
||||
export declare const BadgeInterface: Badge
|
11
api/@internal/component/ets/blank.d.ts
vendored
11
api/@internal/component/ets/blank.d.ts
vendored
@ -15,10 +15,15 @@
|
||||
|
||||
import {CommonMethod, Color, Resource} from "./common"
|
||||
|
||||
interface Blank extends CommonMethod<Blank> {
|
||||
(min?: number | string): Blank;
|
||||
export declare class BlankExtend<T> extends BlankAttribute<T> {
|
||||
}
|
||||
|
||||
color(value: Color | number | string | Resource): Blank;
|
||||
interface Blank extends BlankAttribute<Blank> {
|
||||
(min?: number | string): Blank;
|
||||
}
|
||||
|
||||
declare class BlankAttribute<T> extends CommonMethod<T> {
|
||||
color(value: Color | number | string | Resource): T;
|
||||
}
|
||||
|
||||
export declare const BlankInterface: Blank
|
17
api/@internal/component/ets/button.d.ts
vendored
17
api/@internal/component/ets/button.d.ts
vendored
@ -23,22 +23,27 @@ export declare enum ButtonType {
|
||||
Normal
|
||||
}
|
||||
|
||||
interface Button extends CommonMethod<Button> {
|
||||
export declare class ButtonExtend<T> extends ButtonAttribute<T> {
|
||||
}
|
||||
|
||||
interface Button extends ButtonAttribute<Button> {
|
||||
(): Button;
|
||||
|
||||
(options: { type?: ButtonType, stateEffect?: boolean }): Button;
|
||||
|
||||
(label: string, options?: { type?: ButtonType, stateEffect?: boolean }): Button;
|
||||
}
|
||||
|
||||
type(value: ButtonType): Button;
|
||||
declare class ButtonAttribute<T> extends CommonMethod<T> {
|
||||
type(value: ButtonType): T;
|
||||
|
||||
stateEffect(value: boolean): Button;
|
||||
stateEffect(value: boolean): T;
|
||||
|
||||
fontColor(value: Color | number | string | Resource): Button;
|
||||
fontColor(value: Color | number | string | Resource): T;
|
||||
|
||||
fontSize(value: number | string | Resource): Button;
|
||||
fontSize(value: number | string | Resource): T;
|
||||
|
||||
fontWeight(value: number | FontWeight | string): Button;
|
||||
fontWeight(value: number | FontWeight | string): T;
|
||||
}
|
||||
|
||||
export declare const ButtonInterface: Button
|
||||
|
38
api/@internal/component/ets/calendar.d.ts
vendored
38
api/@internal/component/ets/calendar.d.ts
vendored
@ -96,38 +96,44 @@ export interface WorkStateStyle {
|
||||
}
|
||||
|
||||
declare class CalendarController {
|
||||
constructor();
|
||||
backToToday();
|
||||
constructor();
|
||||
backToToday();
|
||||
goTo(value: { year: number, month: number, day: number });
|
||||
}
|
||||
|
||||
interface Calendar {
|
||||
export declare class CalendarExtend<T> extends CalendarAttribute<T> {
|
||||
}
|
||||
|
||||
interface Calendar extends CalendarAttribute<Calendar> {
|
||||
(value: { date: { year: number, month: number, day: number }, currentData: MonthData, preData: MonthData, nextData: MonthData, controller?: CalendarController }): Calendar;
|
||||
}
|
||||
|
||||
showLunar(value: boolean): Calendar;
|
||||
declare class CalendarAttribute<T> {
|
||||
showLunar(value: boolean): T;
|
||||
|
||||
showHoliday(value: boolean): Calendar;
|
||||
showHoliday(value: boolean): T;
|
||||
|
||||
needSlide(value: boolean): Calendar;
|
||||
needSlide(value: boolean): T;
|
||||
|
||||
startOfWeek(value: number): Calendar;
|
||||
startOfWeek(value: number): T;
|
||||
|
||||
offDays(value: number): Calendar;
|
||||
offDays(value: number): T;
|
||||
|
||||
direction(value: Axis): Calendar;
|
||||
direction(value: Axis): T;
|
||||
|
||||
currentDayStyle(value: CurrentDayStyle): Calendar;
|
||||
currentDayStyle(value: CurrentDayStyle): T;
|
||||
|
||||
nonCurrentDayStyle(value: NonCurrentDayStyle): Calendar;
|
||||
nonCurrentDayStyle(value: NonCurrentDayStyle): T;
|
||||
|
||||
todayStyle(value: TodayStyle): Calendar;
|
||||
todayStyle(value: TodayStyle): T;
|
||||
|
||||
weekStyle(value: WeekStyle): Calendar;
|
||||
weekStyle(value: WeekStyle): T;
|
||||
|
||||
workStateStyle(value: WorkStateStyle): Calendar;
|
||||
workStateStyle(value: WorkStateStyle): T;
|
||||
|
||||
onSelectChange(event: (event: { year: number, month: number, day: number }) => void): Calendar;
|
||||
onSelectChange(event: (event: { year: number, month: number, day: number }) => void): T;
|
||||
|
||||
onRequestData(event: (event: { year: number, month: number, currentYear: number, currentMonth: number, monthState: number }) => void): Calendar;
|
||||
onRequestData(event: (event: { year: number, month: number, currentYear: number, currentMonth: number, monthState: number }) => void): T;
|
||||
}
|
||||
|
||||
export declare const CalendarInterface: Calendar
|
||||
|
11
api/@internal/component/ets/camera.d.ts
vendored
11
api/@internal/component/ets/camera.d.ts
vendored
@ -20,10 +20,15 @@ export declare enum DevicePosition {
|
||||
Back
|
||||
}
|
||||
|
||||
interface Camera extends CommonMethod<Camera> {
|
||||
(value: { id: string, resolutionWidth: number, resolutionHeight: number }): Camera;
|
||||
export declare class CameraExtend<T> extends CameraAttribute<T> {
|
||||
}
|
||||
|
||||
devicePosition(value: DevicePosition): Camera;
|
||||
interface Camera extends CameraAttribute<Camera> {
|
||||
(value: { id: string, resolutionWidth: number, resolutionHeight: number }): Camera;
|
||||
}
|
||||
|
||||
declare class CameraAttribute<T> extends CommonMethod<T> {
|
||||
devicePosition(value: DevicePosition): T;
|
||||
}
|
||||
|
||||
export declare const CameraInterface: Camera;
|
||||
|
8
api/@internal/component/ets/circle.d.ts
vendored
8
api/@internal/component/ets/circle.d.ts
vendored
@ -15,9 +15,15 @@
|
||||
|
||||
import {CommonShapeMethod} from "./common";
|
||||
|
||||
interface Circle extends CommonShapeMethod<Circle> {
|
||||
export declare class CircleExtend<T> extends CircleAttribute<T> {
|
||||
}
|
||||
|
||||
interface Circle extends CircleAttribute<Circle> {
|
||||
new (value?: { width?: string | number, height?: string | number }): Circle;
|
||||
(value?: { width?: string | number, height?: string | number }): Circle;
|
||||
}
|
||||
|
||||
declare class CircleAttribute<T> extends CommonShapeMethod<T> {
|
||||
}
|
||||
|
||||
export declare const CircleInterface: Circle;
|
||||
|
11
api/@internal/component/ets/column.d.ts
vendored
11
api/@internal/component/ets/column.d.ts
vendored
@ -15,10 +15,15 @@
|
||||
|
||||
import {CommonMethod, HorizontalAlignDeclaration, HorizontalAlign} from "./common";
|
||||
|
||||
interface Column extends CommonMethod<Column> {
|
||||
(value?: { useAlign?: HorizontalAlignDeclaration, space?: string | number }): Column;
|
||||
export declare class ColumnExtend<T> extends ColumnAttribute<T> {
|
||||
}
|
||||
|
||||
alignItems(value: HorizontalAlign): Column;
|
||||
interface Column extends ColumnAttribute<Column> {
|
||||
(value?: { useAlign?: HorizontalAlignDeclaration, space?: string | number }): Column;
|
||||
}
|
||||
|
||||
export declare class ColumnAttribute<T> extends CommonMethod<T> {
|
||||
alignItems(value: HorizontalAlign): T;
|
||||
}
|
||||
|
||||
export declare const ColumnInterface: Column;
|
||||
|
11
api/@internal/component/ets/column_split.d.ts
vendored
11
api/@internal/component/ets/column_split.d.ts
vendored
@ -15,10 +15,15 @@
|
||||
|
||||
import {CommonMethod} from "./common";
|
||||
|
||||
interface ColumnSplit extends CommonMethod<ColumnSplit> {
|
||||
(): ColumnSplit;
|
||||
export declare class ColumnSplitExtend<T> extends ColumnSplitAttribute<T> {
|
||||
}
|
||||
|
||||
resizeable(value: boolean): ColumnSplit;
|
||||
interface ColumnSplit extends ColumnSplitAttribute<ColumnSplit> {
|
||||
(): ColumnSplit;
|
||||
}
|
||||
|
||||
declare class ColumnSplitAttribute<T> extends CommonMethod<T> {
|
||||
resizeable(value: boolean): T;
|
||||
}
|
||||
|
||||
export declare const ColumnSplitInterface: ColumnSplit;
|
||||
|
45
api/@internal/component/ets/common.d.ts
vendored
45
api/@internal/component/ets/common.d.ts
vendored
@ -33,6 +33,7 @@ export declare const StorageProp: (value: string) => PropertyDecorator;
|
||||
export declare const StorageLink: (value: string) => PropertyDecorator;
|
||||
export declare const Watch: (value: string) => PropertyDecorator;
|
||||
export declare const Builder: MethodDecorator;
|
||||
export declare const CustomDialog: ClassDecorator;
|
||||
declare interface NormalResource {
|
||||
readonly id: number;
|
||||
readonly type: number;
|
||||
@ -458,6 +459,8 @@ export declare class CommonMethod<T> {
|
||||
|
||||
onTouch(event: (event?: TouchEvent) => void): T;
|
||||
|
||||
onHover(event: (isHover?: boolean) => void): T;
|
||||
|
||||
onKeyEvent(event: (event?: KeyEvent) => void): T;
|
||||
|
||||
onPan(event: (event?: any) => void): T;
|
||||
@ -482,6 +485,22 @@ export declare class CommonMethod<T> {
|
||||
|
||||
blur(value: number): T;
|
||||
|
||||
brightness(value: number): T;
|
||||
|
||||
contrast(value: number): T;
|
||||
|
||||
grayscale(value: number): T;
|
||||
|
||||
colorBlend(value: Color | string | Resource): T;
|
||||
|
||||
saturate(value: number): T;
|
||||
|
||||
sepia(value: number): T;
|
||||
|
||||
invert(value: number): T;
|
||||
|
||||
hueRotate(value:{deg: string | number}): T;
|
||||
|
||||
backdropBlur(value: number): T;
|
||||
|
||||
windowBlur(value: { percent: number, style?: BlurStyle }): T;
|
||||
@ -536,11 +555,11 @@ export declare class CommonMethod<T> {
|
||||
|
||||
align(value: Alignment): T;
|
||||
|
||||
position(value: { x?: number | string, y?: number | string }): T;
|
||||
position(value: { x?: number | string | Resource, y?: number | string | Resource }): T;
|
||||
|
||||
markAnchor(value: { x?: number | string, y?: number | string }): T;
|
||||
markAnchor(value: { x?: number | string | Resource, y?: number | string | Resource }): T;
|
||||
|
||||
offset(value: { x?: number | string, y?: number | string }): T;
|
||||
offset(value: { x?: number | string | Resource, y?: number | string | Resource }): T;
|
||||
|
||||
enabled(value: boolean): T;
|
||||
|
||||
@ -573,7 +592,7 @@ export declare class CommonMethod<T> {
|
||||
|
||||
motionPath(value: { path: string, from?: number, to?: number, rotatable?: boolean }): T;
|
||||
|
||||
shadow(value: { radius: number | Resource, color?: Color | string | Resource, offsetX?: number, offsetY?: number}): T;
|
||||
shadow(value: { radius: number | Resource, color?: Color | string | Resource, offsetX?: number | Resource, offsetY?: number | Resource }): T;
|
||||
|
||||
clip(value: boolean | Circle | Ellipse | Path | Rect): T;
|
||||
|
||||
@ -588,6 +607,22 @@ export declare class CommonMethod<T> {
|
||||
accessibilityImportance(value: string): T;
|
||||
|
||||
onAccessibility(callback: (event?: { eventType: number }) => void): T;
|
||||
|
||||
geometryTransition(id: string): T;
|
||||
|
||||
bindPopup(show: boolean, popup: {
|
||||
message: string,
|
||||
placementOnTop: boolean,
|
||||
primaryButton: {
|
||||
value: string;
|
||||
action: () => void;
|
||||
};
|
||||
secondaryButton: {
|
||||
value: string;
|
||||
action: () => void;
|
||||
};
|
||||
onStateChange?: (callback: (event?: { isVisible: boolean }) => void) => void;
|
||||
}): T;
|
||||
}
|
||||
|
||||
export declare class CommonShapeMethod<T> extends CommonMethod<T> {
|
||||
@ -609,7 +644,7 @@ export declare class CommonShapeMethod<T> extends CommonMethod<T> {
|
||||
|
||||
fillOpacity(value: number | string | Resource): T;
|
||||
|
||||
strokeWidth(value: number | string): T;
|
||||
strokeWidth(value: number | string | Resource): T;
|
||||
|
||||
antiAlias(value: boolean): T;
|
||||
|
||||
|
13
api/@internal/component/ets/counter.d.ts
vendored
13
api/@internal/component/ets/counter.d.ts
vendored
@ -15,14 +15,19 @@
|
||||
|
||||
import {CommonMethod} from "./common";
|
||||
|
||||
interface Counter extends CommonMethod<Counter> {
|
||||
export declare class CounterExtend<T> extends CounterAttribute<T> {
|
||||
}
|
||||
|
||||
interface Counter extends CounterAttribute<Counter> {
|
||||
(): Counter;
|
||||
}
|
||||
|
||||
onStateChange(event: () => void): Counter;
|
||||
declare class CounterAttribute<T> extends CommonMethod<T> {
|
||||
onStateChange(event: () => void): T;
|
||||
|
||||
onInc(event: () => void): Counter;
|
||||
onInc(event: () => void): T;
|
||||
|
||||
onDec(event: () => void): Counter;
|
||||
onDec(event: () => void): T;
|
||||
}
|
||||
|
||||
export declare const CounterInterface: Counter;
|
||||
|
@ -1,24 +1,28 @@
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare const CustomDialog: ClassDecorator;
|
||||
|
||||
export declare class CustomDialogController {
|
||||
constructor(value: { builder: any, cancel?: () => void, autoCancel?: boolean });
|
||||
open();
|
||||
close();
|
||||
}
|
||||
/*
|
||||
* 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 {CommonMethod, Resource} from "./common";
|
||||
|
||||
export declare class CustomDialogController {
|
||||
constructor(value: {
|
||||
builder: any, cancel?: () => void,
|
||||
autoCancel?: boolean,
|
||||
alignment?: DialogAlignment,
|
||||
offset?: { dx: number | string | Resource, dy: number | string | Resource }
|
||||
});
|
||||
open();
|
||||
close();
|
||||
}
|
||||
|
52
api/@internal/component/ets/datapanel.d.ts
vendored
52
api/@internal/component/ets/datapanel.d.ts
vendored
@ -1,23 +1,29 @@
|
||||
/*
|
||||
* 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";
|
||||
|
||||
interface DataPanel extends CommonMethod<DataPanel> {
|
||||
(options: {values: number[], max?: number}): DataPanel;
|
||||
closeEffect(value: boolean): DataPanel;
|
||||
}
|
||||
|
||||
export declare const DataPanelInterface: DataPanel;
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare class DataPanelExtend<T> extends DataPanelAttribute<T> {
|
||||
}
|
||||
|
||||
interface DataPanel extends DataPanelAttribute<DataPanel> {
|
||||
(options: {values: number[], max?: number}): DataPanel;
|
||||
}
|
||||
|
||||
declare class DataPanelAttribute<T> extends CommonMethod<T> {
|
||||
closeEffect(value: boolean): T;
|
||||
}
|
||||
|
||||
export declare const DataPanelInterface: DataPanel;
|
||||
|
45
api/@internal/component/ets/datePicker.d.ts
vendored
Normal file
45
api/@internal/component/ets/datePicker.d.ts
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare class DatePickerExtend<T> extends DatePickerAttribute<T> {
|
||||
}
|
||||
|
||||
export declare enum DatePickerType {
|
||||
Time,
|
||||
Date
|
||||
}
|
||||
|
||||
export interface DatePickerResult {
|
||||
year?: number;
|
||||
month?: number;
|
||||
day?: number;
|
||||
hour?: number;
|
||||
minute?: number;
|
||||
second?: number;
|
||||
}
|
||||
|
||||
interface DatePicker extends DatePickerAttribute<DatePicker> {
|
||||
(options?: {start?: Date, end?: Date, selected?: Date, type?: DatePickerType}): DatePicker;
|
||||
}
|
||||
|
||||
declare class DatePickerAttribute<T> extends CommonMethod<T> {
|
||||
lunar(value: boolean): T;
|
||||
useMilitaryTime(value: boolean): T;
|
||||
onChange(callback: (value: DatePickerResult) => void): T;
|
||||
}
|
||||
|
||||
export declare const DatePickerInterface: DatePicker;
|
15
api/@internal/component/ets/divider.d.ts
vendored
15
api/@internal/component/ets/divider.d.ts
vendored
@ -15,16 +15,21 @@
|
||||
|
||||
import {CommonMethod, Color, LineCapStyle, Resource} from "./common";
|
||||
|
||||
interface Divider extends CommonMethod<Divider> {
|
||||
export declare class DividerExtend<T> extends DividerAttribute<T> {
|
||||
}
|
||||
|
||||
interface Divider extends DividerAttribute<Divider> {
|
||||
(): Divider;
|
||||
}
|
||||
|
||||
vertical(value: boolean): Divider;
|
||||
declare class DividerAttribute<T> extends CommonMethod<T> {
|
||||
vertical(value: boolean): T;
|
||||
|
||||
color(value: Color | number | string | Resource): Divider;
|
||||
color(value: Color | number | string | Resource): T;
|
||||
|
||||
strokeWidth(value: number | string): Divider;
|
||||
strokeWidth(value: number | string): T;
|
||||
|
||||
lineCap(value: LineCapStyle): Divider;
|
||||
lineCap(value: LineCapStyle): T;
|
||||
}
|
||||
|
||||
export declare const DividerInterface: Divider;
|
||||
|
8
api/@internal/component/ets/ellipse.d.ts
vendored
8
api/@internal/component/ets/ellipse.d.ts
vendored
@ -15,9 +15,15 @@
|
||||
|
||||
import {CommonShapeMethod} from "./common";
|
||||
|
||||
interface Ellipse extends CommonShapeMethod<Ellipse> {
|
||||
export declare class EllipseExtend<T> extends EllipseAttribute<T> {
|
||||
}
|
||||
|
||||
interface Ellipse extends EllipseAttribute<Ellipse> {
|
||||
new (value?: { width?: string | number, height?: string | number }): Ellipse;
|
||||
(value?: { width?: string | number, height?: string | number }): Ellipse;
|
||||
}
|
||||
|
||||
declare class EllipseAttribute<T> extends CommonShapeMethod<T> {
|
||||
}
|
||||
|
||||
export declare const EllipseInterface: Ellipse;
|
||||
|
8
api/@internal/component/ets/flex.d.ts
vendored
8
api/@internal/component/ets/flex.d.ts
vendored
@ -15,11 +15,17 @@
|
||||
|
||||
import {CommonMethod, FlexDirection, FlexWrap, FlexAlign, ItemAlign} from "./common";
|
||||
|
||||
interface Flex extends CommonMethod<Flex> {
|
||||
export declare class FlexExtend<T> extends FlexAttribute<T> {
|
||||
}
|
||||
|
||||
interface Flex extends FlexAttribute<Flex> {
|
||||
(value?: {
|
||||
direction?: FlexDirection, wrap?: FlexWrap, justifyContent?: FlexAlign,
|
||||
alignItems?: ItemAlign, alignContent?: FlexAlign
|
||||
}): Flex;
|
||||
}
|
||||
|
||||
declare class FlexAttribute<T> extends CommonMethod<T> {
|
||||
}
|
||||
|
||||
export declare const FlexInterface: Flex;
|
||||
|
23
api/@internal/component/ets/form_component.d.ts
vendored
23
api/@internal/component/ets/form_component.d.ts
vendored
@ -22,24 +22,29 @@ export declare enum FormDimension {
|
||||
Dimension_4_4
|
||||
}
|
||||
|
||||
interface FormComponent extends CommonMethod<FormComponent> {
|
||||
export declare class FormComponentExtend<T> extends FormComponentAttribute<T> {
|
||||
}
|
||||
|
||||
interface FormComponent extends FormComponentAttribute<FormComponent> {
|
||||
(value: {id: number, name: string, bundle: string, ability: string, module: string, dimension?: FormDimension}): FormComponent;
|
||||
}
|
||||
|
||||
size(value: {width: number, height: number}): FormComponent;
|
||||
declare class FormComponentAttribute<T> extends CommonMethod<T> {
|
||||
size(value: {width: number, height: number}): T;
|
||||
|
||||
moduleName(value: string): FormComponent;
|
||||
moduleName(value: string): T;
|
||||
|
||||
dimension(value: FormDimension): FormComponent;
|
||||
dimension(value: FormDimension): T;
|
||||
|
||||
allowUpdate(value: boolean): FormComponent;
|
||||
allowUpdate(value: boolean): T;
|
||||
|
||||
visibility(value: Visibility): FormComponent;
|
||||
visibility(value: Visibility): T;
|
||||
|
||||
onAcquired(callback: (info: {id: number}) => void): FormComponent;
|
||||
onAcquired(callback: (info: {id: number}) => void): T;
|
||||
|
||||
onError(callback: (info: {errcode: number, msg: string}) => void): FormComponent;
|
||||
onError(callback: (info: {errcode: number, msg: string}) => void): T;
|
||||
|
||||
onRouter(callback: (info: any) => void): FormComponent;
|
||||
onRouter(callback: (info: any) => void): T;
|
||||
}
|
||||
|
||||
export declare const FormComponentInterface: FormComponent;
|
||||
|
35
api/@internal/component/ets/gauge.d.ts
vendored
Normal file
35
api/@internal/component/ets/gauge.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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, Color} from "./common";
|
||||
|
||||
export declare class GaugeExtend<T> extends GaugeAttribute<T> {
|
||||
}
|
||||
|
||||
interface Gauge extends GaugeAttribute<Gauge> {
|
||||
(options: {value: number, min?: number, max?: number}): Gauge;
|
||||
}
|
||||
|
||||
declare class GaugeAttribute<T> extends CommonMethod<T> {
|
||||
value(value: number): T;
|
||||
startAngle(angle: number): T;
|
||||
endAngle(angle: number): T;
|
||||
colors(colors: Array<any>): T;
|
||||
strokeWidth(length: number): T;
|
||||
labelTextConfig(markedLabelText: string): T;
|
||||
labelColorConfig(markedLabelColor: Color): T;
|
||||
}
|
||||
|
||||
export declare const GaugeInterface: Gauge;
|
@ -15,8 +15,14 @@
|
||||
|
||||
import {CommonMethod} from "./common";
|
||||
|
||||
interface GeometryView extends CommonMethod<GeometryView> {
|
||||
export declare class GeometryViewExtend<T> extends GeometryViewAttribute<T> {
|
||||
}
|
||||
|
||||
interface GeometryView extends GeometryViewAttribute<GeometryView> {
|
||||
(callback: (geometry?: any) => void): GeometryView;
|
||||
}
|
||||
|
||||
declare class GeometryViewAttribute<T> extends CommonMethod<T> {
|
||||
}
|
||||
|
||||
export declare const GeometryViewInterface: GeometryView;
|
||||
|
27
api/@internal/component/ets/grid.d.ts
vendored
27
api/@internal/component/ets/grid.d.ts
vendored
@ -13,27 +13,34 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {CommonMethod, BarState, Color} from "./common";
|
||||
import {CommonMethod, BarState, Color, Resource} from "./common";
|
||||
import {Scroller} from "./scroll";
|
||||
|
||||
interface Grid extends CommonMethod<Grid> {
|
||||
export declare class GridExtend<T> extends GridAttribute<T> {
|
||||
}
|
||||
|
||||
interface Grid extends GridAttribute<Grid> {
|
||||
(scroller?: Scroller): Grid;
|
||||
}
|
||||
|
||||
columnsTemplate(value: string): Grid;
|
||||
declare class GridAttribute<T> extends CommonMethod<T> {
|
||||
columnsTemplate(value: string): T;
|
||||
|
||||
rowsTemplate(value: string): Grid;
|
||||
rowsTemplate(value: string): T;
|
||||
|
||||
columnsGap(value: number | string): Grid;
|
||||
columnsGap(value: number | string | Resource): T;
|
||||
|
||||
rowsGap(value: number | string): Grid;
|
||||
rowsGap(value: number | string | Resource): T;
|
||||
|
||||
scrollBarWidth(value: number | string): Grid;
|
||||
scrollBarWidth(value: number | string): T;
|
||||
|
||||
scrollBarColor(value: Color | number | string): Grid;
|
||||
scrollBarColor(value: Color | number | string): T;
|
||||
|
||||
scrollBar(value: BarState): Grid;
|
||||
scrollBar(value: BarState): T;
|
||||
|
||||
onScrollIndex(event: (first: number) => void): Grid;
|
||||
onScrollIndex(event: (first: number) => void): T;
|
||||
|
||||
cachedCount(value: number): T;
|
||||
}
|
||||
|
||||
export declare const GridInterface: Grid;
|
||||
|
69
api/@internal/component/ets/gridItem.d.ts
vendored
69
api/@internal/component/ets/gridItem.d.ts
vendored
@ -1,32 +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";
|
||||
|
||||
interface GridItem extends CommonMethod<GridItem> {
|
||||
(): GridItem;
|
||||
|
||||
rowStart(value: number): GridItem;
|
||||
|
||||
rowEnd(value: number): GridItem;
|
||||
|
||||
columnStart(value: number): GridItem;
|
||||
|
||||
columnEnd(value: number): GridItem;
|
||||
|
||||
forceRebuild(value: boolean): GridItem;
|
||||
}
|
||||
|
||||
export declare const GridItemInterface: GridItem;
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare class GridItemExtend<T> extends GridItemAttribute<T> {
|
||||
}
|
||||
|
||||
interface GridItem extends GridItemAttribute<GridItem> {
|
||||
(): GridItem;
|
||||
}
|
||||
|
||||
declare class GridItemAttribute<T> extends CommonMethod<T> {
|
||||
rowStart(value: number): T;
|
||||
|
||||
rowEnd(value: number): T;
|
||||
|
||||
columnStart(value: number): T;
|
||||
|
||||
columnEnd(value: number): T;
|
||||
|
||||
forceRebuild(value: boolean): T;
|
||||
}
|
||||
|
||||
export declare const GridItemInterface: GridItem;
|
||||
|
10
api/@internal/component/ets/grid_container.d.ts
vendored
10
api/@internal/component/ets/grid_container.d.ts
vendored
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Column} from "./column";
|
||||
import {ColumnAttribute} from "./column";
|
||||
|
||||
export declare enum SizeType {
|
||||
Auto,
|
||||
@ -23,7 +23,10 @@ export declare enum SizeType {
|
||||
LG
|
||||
}
|
||||
|
||||
interface GridContainer extends Column {
|
||||
export declare class GridContainerExtend<T> extends GridContainerAttribute<T> {
|
||||
}
|
||||
|
||||
interface GridContainer extends GridContainerAttribute<GridContainer> {
|
||||
(
|
||||
value?: {
|
||||
columns?: number | 'auto',
|
||||
@ -34,4 +37,7 @@ interface GridContainer extends Column {
|
||||
): GridContainer;
|
||||
}
|
||||
|
||||
declare class GridContainerAttribute<T> extends ColumnAttribute<T> {
|
||||
}
|
||||
|
||||
export declare const GridContainerInterface: GridContainer;
|
29
api/@internal/component/ets/hyperlink.d.ts
vendored
Normal file
29
api/@internal/component/ets/hyperlink.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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, Color, Resource} from "./common";
|
||||
|
||||
export declare class HyperlinkExtend<T> extends HyperlinkAttribute<T> {
|
||||
}
|
||||
|
||||
interface Hyperlink extends HyperlinkAttribute<Hyperlink> {
|
||||
(address: string | Resource, content?: string | Resource): Hyperlink;
|
||||
}
|
||||
|
||||
declare class HyperlinkAttribute<T> extends CommonMethod<T> {
|
||||
color(value: Color | number | string | Resource): T;
|
||||
}
|
||||
|
||||
export declare const HyperlinkInterface: Hyperlink;
|
33
api/@internal/component/ets/image.d.ts
vendored
33
api/@internal/component/ets/image.d.ts
vendored
@ -27,34 +27,39 @@ export declare enum ImageInterpolation {
|
||||
High
|
||||
}
|
||||
|
||||
interface Image extends CommonMethod<Image> {
|
||||
export declare class ImageExtend<T> extends ImageAttribute<T> {
|
||||
}
|
||||
|
||||
interface Image extends ImageAttribute<Image> {
|
||||
(src: string | PixelMap | Resource): Image;
|
||||
}
|
||||
|
||||
alt(value: string | Resource): Image;
|
||||
declare class ImageAttribute<T> extends CommonMethod<T> {
|
||||
alt(value: string | Resource): T;
|
||||
|
||||
matchTextDirection(value: boolean): Image;
|
||||
matchTextDirection(value: boolean): T;
|
||||
|
||||
fitOriginalSize(value: boolean): Image;
|
||||
fitOriginalSize(value: boolean): T;
|
||||
|
||||
fillColor(value: Color | number | string | Resource): Image;
|
||||
fillColor(value: Color | number | string | Resource): T;
|
||||
|
||||
objectFit(value: ImageFit): Image;
|
||||
objectFit(value: ImageFit): T;
|
||||
|
||||
objectRepeat(value: ImageRepeat): Image;
|
||||
objectRepeat(value: ImageRepeat): T;
|
||||
|
||||
autoResize(value: boolean): Image;
|
||||
autoResize(value: boolean): T;
|
||||
|
||||
renderMode(value: ImageRenderMode): Image;
|
||||
renderMode(value: ImageRenderMode): T;
|
||||
|
||||
interpolation(value: ImageInterpolation): Image;
|
||||
interpolation(value: ImageInterpolation): T;
|
||||
|
||||
sourceSize(value: { width: number, height: number }): Image;
|
||||
sourceSize(value: { width: number, height: number }): T;
|
||||
|
||||
onComplete(callback: (event?: { width: number, height: number, componentWidth: number, componentHeight: number, loadingStatus: number }) => void): Image;
|
||||
onComplete(callback: (event?: { width: number, height: number, componentWidth: number, componentHeight: number, loadingStatus: number }) => void): T;
|
||||
|
||||
onError(callback: (event?: { componentWidth: number, componentHeight: number }) => void): Image;
|
||||
onError(callback: (event?: { componentWidth: number, componentHeight: number }) => void): T;
|
||||
|
||||
onFinish(event: () => void): Image;
|
||||
onFinish(event: () => void): T;
|
||||
}
|
||||
|
||||
export declare const ImageInterface: Image;
|
||||
|
35
api/@internal/component/ets/image_animator.d.ts
vendored
35
api/@internal/component/ets/image_animator.d.ts
vendored
@ -15,37 +15,42 @@
|
||||
|
||||
import {CommonMethod, AnimationStatus} from "./common";
|
||||
|
||||
interface ImageAnimator extends CommonMethod<ImageAnimator> {
|
||||
(): ImageAnimator;
|
||||
export declare class ImageAnimatorExtend<T> extends ImageAnimatorAttribute<T> {
|
||||
}
|
||||
|
||||
interface ImageAnimator extends ImageAnimatorAttribute<ImageAnimator> {
|
||||
(): ImageAnimator;
|
||||
}
|
||||
|
||||
declare class ImageAnimatorAttribute<T> extends CommonMethod<T> {
|
||||
images(value: Array<{
|
||||
src: string, width?: number | string, height?: number | string, top?: number | string, left?:
|
||||
number | string, duration?: number
|
||||
}>): ImageAnimator;
|
||||
}>): T;
|
||||
|
||||
state(value: AnimationStatus): ImageAnimator;
|
||||
state(value: AnimationStatus): T;
|
||||
|
||||
duration(value: number): ImageAnimator;
|
||||
duration(value: number): T;
|
||||
|
||||
reverse(value: boolean): ImageAnimator;
|
||||
reverse(value: boolean): T;
|
||||
|
||||
fixedSize(value: boolean): ImageAnimator;
|
||||
fixedSize(value: boolean): T;
|
||||
|
||||
preDecode(value: number): ImageAnimator;
|
||||
preDecode(value: number): T;
|
||||
|
||||
fillMode(value: FillMode): ImageAnimator;
|
||||
fillMode(value: FillMode): T;
|
||||
|
||||
iterations(value: number): ImageAnimator;
|
||||
iterations(value: number): T;
|
||||
|
||||
onStart(event: () => void): ImageAnimator;
|
||||
onStart(event: () => void): T;
|
||||
|
||||
onPause(event: () => void): ImageAnimator;
|
||||
onPause(event: () => void): T;
|
||||
|
||||
onRepeat(event: () => void): ImageAnimator;
|
||||
onRepeat(event: () => void): T;
|
||||
|
||||
onCancel(event: () => void): ImageAnimator;
|
||||
onCancel(event: () => void): T;
|
||||
|
||||
onFinish(event: () => void): ImageAnimator;
|
||||
onFinish(event: () => void): T;
|
||||
}
|
||||
|
||||
export declare const ImageAnimatorInterface: ImageAnimator;
|
||||
|
11
api/@internal/component/ets/index.d.ts
vendored
11
api/@internal/component/ets/index.d.ts
vendored
@ -14,9 +14,11 @@
|
||||
*/
|
||||
|
||||
export * from './ability_component';
|
||||
export * from './action_sheet';
|
||||
export * from './alert_dialog';
|
||||
export * from './alphabet_indexer';
|
||||
export * from './animator';
|
||||
export * from './badge';
|
||||
export * from './blank';
|
||||
export * from './button';
|
||||
export * from './calendar';
|
||||
@ -27,11 +29,13 @@ export * from './column_split';
|
||||
export * from './common';
|
||||
export * from './counter';
|
||||
export * from './custom_dialog_controller';
|
||||
export * from './datePicker';
|
||||
export * from './divider';
|
||||
export * from './ellipse';
|
||||
export * from './flex';
|
||||
export * from './forEach';
|
||||
export * from './form_component';
|
||||
export * from './gauge';
|
||||
export * from './geometryView';
|
||||
export * from './gesture';
|
||||
export * from './grid';
|
||||
@ -40,9 +44,11 @@ export * from './grid_container';
|
||||
export * from './image';
|
||||
export * from './image_animator';
|
||||
export * from './lazyForEach';
|
||||
export * from './line';
|
||||
export * from './list';
|
||||
export * from './listItem';
|
||||
export * from './loadingProgress';
|
||||
export * from './marquee';
|
||||
export * from './navigator';
|
||||
export * from './navigatorView';
|
||||
export * from './pageTransition';
|
||||
@ -64,6 +70,8 @@ export * from './swiper';
|
||||
export * from './tab_content';
|
||||
export * from './tabs';
|
||||
export * from './text';
|
||||
export * from './textarea';
|
||||
export * from './textinput';
|
||||
export * from './textPicker';
|
||||
export * from './toggle';
|
||||
export * from './video';
|
||||
@ -72,3 +80,6 @@ export * from './polygon';
|
||||
export * from './polyline';
|
||||
export * from './radio';
|
||||
export * from './datapanel';
|
||||
export * from './hyperlink';
|
||||
export * from './menu';
|
||||
export * from './option';
|
||||
|
31
api/@internal/component/ets/line.d.ts
vendored
Normal file
31
api/@internal/component/ets/line.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 {CommonShapeMethod} from "./common";
|
||||
|
||||
export declare class LineExtend<T> extends LineAttribute<T> {
|
||||
}
|
||||
|
||||
interface Line extends LineAttribute<Line> {
|
||||
(): Line;
|
||||
(value?: { width?: string | number, height?: string | number }) :Line;
|
||||
}
|
||||
|
||||
declare class LineAttribute<T> extends CommonShapeMethod<T> {
|
||||
startPoint(value: Array<any>): T;
|
||||
endPoint(value: Array<any>): T;
|
||||
}
|
||||
|
||||
export declare const LineInterface: Line;
|
49
api/@internal/component/ets/list.d.ts
vendored
49
api/@internal/component/ets/list.d.ts
vendored
@ -13,60 +13,53 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {CommonMethod, Axis, Color, Resource} from "./common";
|
||||
import {CommonMethod, Axis, Color, Resource, BarState, EdgeEffect} from "./common";
|
||||
import {Scroller} from "./scroll";
|
||||
|
||||
export declare enum BarState {
|
||||
Off,
|
||||
Auto,
|
||||
On
|
||||
}
|
||||
|
||||
export declare enum EdgeEffect {
|
||||
Spring,
|
||||
Fade,
|
||||
None
|
||||
}
|
||||
|
||||
export declare enum ScrollState {
|
||||
Idle,
|
||||
Scroll,
|
||||
Fling
|
||||
}
|
||||
|
||||
interface List extends CommonMethod<List> {
|
||||
export declare class ListExtend<T> extends ListAttribute<T> {
|
||||
}
|
||||
|
||||
interface List extends ListAttribute<List> {
|
||||
(value?: { initialIndex?: number, space?: number | string, scroller?: Scroller }): List;
|
||||
}
|
||||
|
||||
listDirection(value: Axis): List;
|
||||
declare class ListAttribute<T> extends CommonMethod<T> {
|
||||
listDirection(value: Axis): T;
|
||||
|
||||
scrollBar(value: BarState): List;
|
||||
scrollBar(value: BarState): T;
|
||||
|
||||
edgeEffect(value: EdgeEffect): List;
|
||||
edgeEffect(value: EdgeEffect): T;
|
||||
|
||||
divider(value: {
|
||||
strokeWidth: number | string | Resource, color?: Color | number | string | Resource,
|
||||
startMargin?: number | string | Resource, endMargin?: number | string | Resource
|
||||
} | null): List;
|
||||
} | null): T;
|
||||
|
||||
editMode(value: boolean): List;
|
||||
editMode(value: boolean): T;
|
||||
|
||||
cachedCount(value: number): List;
|
||||
cachedCount(value: number): T;
|
||||
|
||||
chainAnimation(value: boolean): List;
|
||||
chainAnimation(value: boolean): T;
|
||||
|
||||
onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): List;
|
||||
onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): T;
|
||||
|
||||
onScrollIndex(event: (start: number, end: number) => void): List;
|
||||
onScrollIndex(event: (start: number, end: number) => void): T;
|
||||
|
||||
onReachStart(event: () => void): List;
|
||||
onReachStart(event: () => void): T;
|
||||
|
||||
onReachEnd(event: () => void): List;
|
||||
onReachEnd(event: () => void): T;
|
||||
|
||||
onScrollStop(event: () => void): List;
|
||||
onScrollStop(event: () => void): T;
|
||||
|
||||
onItemDelete(event: (index: number) => boolean): List;
|
||||
onItemDelete(event: (index: number) => boolean): T;
|
||||
|
||||
onItemMove(event: (from: number, to: number) => boolean): List;
|
||||
onItemMove(event: (from: number, to: number) => boolean): T;
|
||||
}
|
||||
|
||||
export declare const ListInterface: List;
|
||||
|
17
api/@internal/component/ets/listItem.d.ts
vendored
17
api/@internal/component/ets/listItem.d.ts
vendored
@ -21,12 +21,23 @@ export declare enum Sticky {
|
||||
Opacity,
|
||||
}
|
||||
|
||||
interface ListItem extends CommonMethod<ListItem> {
|
||||
export declare enum EditMode {
|
||||
None,
|
||||
Deletable,
|
||||
Movable,
|
||||
}
|
||||
|
||||
export declare class ListItemExtend<T> extends ListItemAttribute<T> {
|
||||
}
|
||||
|
||||
interface ListItem extends ListItemAttribute<ListItem> {
|
||||
(value?: string): ListItem;
|
||||
}
|
||||
|
||||
sticky(value: Sticky): ListItem;
|
||||
declare class ListItemAttribute<T> extends CommonMethod<T> {
|
||||
sticky(value: Sticky): T;
|
||||
|
||||
editable(value: boolean): ListItem;
|
||||
editable(value: boolean | EditMode): T;
|
||||
}
|
||||
|
||||
export declare const ListItemInterface: ListItem;
|
||||
|
10
api/@internal/component/ets/loadingProgress.d.ts
vendored
10
api/@internal/component/ets/loadingProgress.d.ts
vendored
@ -21,9 +21,15 @@ export declare enum LoadingProgressStyle{
|
||||
Orbital,
|
||||
}
|
||||
|
||||
interface LoadingProgress extends CommonMethod<LoadingProgress> {
|
||||
export declare class LoadingProgressExtend<T> extends LoadingProgressAttribute<T> {
|
||||
}
|
||||
|
||||
interface LoadingProgress extends LoadingProgressAttribute<LoadingProgress> {
|
||||
(): LoadingProgress;
|
||||
color(value: Color | Resource): LoadingProgress;
|
||||
}
|
||||
|
||||
declare class LoadingProgressAttribute<T> extends CommonMethod<T> {
|
||||
color(value: Color | Resource): T;
|
||||
}
|
||||
|
||||
export declare const LoadingProgressInterface: LoadingProgress;
|
||||
|
31
api/@internal/component/ets/marquee.d.ts
vendored
Normal file
31
api/@internal/component/ets/marquee.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare class MarqueeExtend<T> extends MarqueeAttribute<T> {
|
||||
}
|
||||
|
||||
interface Marquee extends MarqueeAttribute<Marquee> {
|
||||
(value?: {start: boolean, step?: number, loop?: number, fromStart?: boolean, src?: string}): Marquee;
|
||||
}
|
||||
|
||||
declare class MarqueeAttribute<T> extends CommonMethod<T> {
|
||||
onStart(event: () => void): T;
|
||||
onBounce(event: () => void): T;
|
||||
onFinish(event: () => void): T;
|
||||
}
|
||||
|
||||
export declare const MarqueeInterface: Marquee;
|
35
api/@internal/component/ets/menu.d.ts
vendored
Normal file
35
api/@internal/component/ets/menu.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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, Resource } from "./common";
|
||||
|
||||
export declare enum MenuType {
|
||||
Click,
|
||||
LongPress
|
||||
}
|
||||
|
||||
export declare class MenuExtend<T> extends MenuAttribute<T> {
|
||||
}
|
||||
|
||||
interface Menu extends MenuAttribute<Menu> {
|
||||
(options?: {type?: MenuType, title?: string | Resource}): Menu;
|
||||
}
|
||||
|
||||
declare class MenuAttribute<T> extends CommonMethod<T> {
|
||||
show(value: boolean): T;
|
||||
showPosition(options: {x: number, y: number}): T;
|
||||
}
|
||||
|
||||
export declare const MenuInterface: Menu;
|
15
api/@internal/component/ets/navigator.d.ts
vendored
15
api/@internal/component/ets/navigator.d.ts
vendored
@ -21,18 +21,23 @@ export declare enum NavigationType {
|
||||
Replace
|
||||
}
|
||||
|
||||
interface Navigator extends CommonMethod<Navigator> {
|
||||
export declare class NavigatorExtend<T> extends NavigatorAttribute<T> {
|
||||
}
|
||||
|
||||
interface Navigator extends NavigatorAttribute<Navigator> {
|
||||
(value?: { target: string, type?: NavigationType }): Navigator;
|
||||
|
||||
(): Navigator;
|
||||
}
|
||||
|
||||
active(value: boolean): Navigator;
|
||||
declare class NavigatorAttribute<T> extends CommonMethod<T> {
|
||||
active(value: boolean): T;
|
||||
|
||||
type(value: NavigationType): Navigator;
|
||||
type(value: NavigationType): T;
|
||||
|
||||
target(value: string): Navigator;
|
||||
target(value: string): T;
|
||||
|
||||
params(value: object): Navigator;
|
||||
params(value: object): T;
|
||||
}
|
||||
|
||||
export declare const NavigatorInterface: Navigator;
|
||||
|
@ -15,8 +15,14 @@
|
||||
|
||||
import {CommonMethod} from "./common";
|
||||
|
||||
interface NavigationView extends CommonMethod<NavigationView> {
|
||||
export declare class NavigationViewExtend<T> extends NavigationViewAttribute<T> {
|
||||
}
|
||||
|
||||
interface NavigationView extends NavigationViewAttribute<NavigationView> {
|
||||
(): NavigationView;
|
||||
}
|
||||
|
||||
declare class NavigationViewAttribute<T> extends CommonMethod<T> {
|
||||
}
|
||||
|
||||
export declare const NavigationViewInterface: NavigationView;
|
||||
|
28
api/@internal/component/ets/option.d.ts
vendored
Normal file
28
api/@internal/component/ets/option.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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, Resource } from "./common";
|
||||
|
||||
export declare class OptionExtend<T> extends OptionAttribute<T> {
|
||||
}
|
||||
|
||||
interface Option extends OptionAttribute<Option> {
|
||||
(content?: string | Resource): Option;
|
||||
}
|
||||
|
||||
declare class OptionAttribute<T> extends CommonMethod<T> {
|
||||
}
|
||||
|
||||
export declare const OptionInterface: Option;
|
@ -40,13 +40,13 @@ export declare class CommonTransition<T> {
|
||||
opacity(value: number): T;
|
||||
}
|
||||
|
||||
export interface PageTransitionEnter extends CommonTransition<PageTransitionEnter> {
|
||||
interface PageTransitionEnter extends CommonTransition<PageTransitionEnter> {
|
||||
(value: { type?: RouteType, duration?: number, curve?: Curve | string, delay?: number }): PageTransitionEnter;
|
||||
|
||||
onEnter(event: (type?: RouteType, progress?: number) => void): PageTransitionEnter;
|
||||
}
|
||||
|
||||
export interface PageTransitionExit extends CommonTransition<PageTransitionExit> {
|
||||
interface PageTransitionExit extends CommonTransition<PageTransitionExit> {
|
||||
(value: { type?: RouteType, duration?: number, curve?: Curve | string, delay?: number }): PageTransitionExit;
|
||||
|
||||
onExit(event: (type?: RouteType, progress?: number) => void): PageTransitionExit;
|
||||
|
23
api/@internal/component/ets/panel.d.ts
vendored
23
api/@internal/component/ets/panel.d.ts
vendored
@ -27,24 +27,29 @@ export declare enum PanelType {
|
||||
Temporary
|
||||
}
|
||||
|
||||
interface Panel extends CommonMethod<Panel> {
|
||||
export declare class PanelExtend<T> extends PanelAttribute<T> {
|
||||
}
|
||||
|
||||
interface Panel extends PanelAttribute<Panel> {
|
||||
(show: boolean): Panel;
|
||||
}
|
||||
|
||||
mode(value: PanelMode): Panel;
|
||||
declare class PanelAttribute<T> extends CommonMethod<T> {
|
||||
mode(value: PanelMode): T;
|
||||
|
||||
type(value: PanelType): Panel;
|
||||
type(value: PanelType): T;
|
||||
|
||||
dragBar(value: boolean): Panel;
|
||||
dragBar(value: boolean): T;
|
||||
|
||||
fullHeight(value: number | string): Panel;
|
||||
fullHeight(value: number | string): T;
|
||||
|
||||
halfHeight(value: number | string): Panel;
|
||||
halfHeight(value: number | string): T;
|
||||
|
||||
miniHeight(value: number | string): Panel;
|
||||
miniHeight(value: number | string): T;
|
||||
|
||||
show(value: boolean): Panel;
|
||||
show(value: boolean): T;
|
||||
|
||||
onChange(event: (width: number, height: number, mode: PanelMode) => void): Panel;
|
||||
onChange(event: (width: number, height: number, mode: PanelMode) => void): T;
|
||||
}
|
||||
|
||||
export declare const PanelInterface: Panel;
|
||||
|
9
api/@internal/component/ets/path.d.ts
vendored
9
api/@internal/component/ets/path.d.ts
vendored
@ -15,11 +15,16 @@
|
||||
|
||||
import {CommonShapeMethod} from "./common";
|
||||
|
||||
interface Path extends CommonShapeMethod<Path> {
|
||||
export declare class PathExtend<T> extends PathAttribute<T> {
|
||||
}
|
||||
|
||||
interface Path extends PathAttribute<Path> {
|
||||
new (value?: { width?: number | string, height?: number | string, commands?: string }): Path;
|
||||
(value?: { width?: number | string, height?: number | string, commands?: string }): Path;
|
||||
}
|
||||
|
||||
commands(value: string): Path;
|
||||
declare class PathAttribute<T> extends CommonShapeMethod<T> {
|
||||
commands(value: string): T;
|
||||
}
|
||||
|
||||
export declare const PathInterface: Path;
|
||||
|
10
api/@internal/component/ets/piece.d.ts
vendored
10
api/@internal/component/ets/piece.d.ts
vendored
@ -20,9 +20,15 @@ export declare enum IconPosition {
|
||||
End
|
||||
}
|
||||
|
||||
interface Piece extends CommonMethod<Piece> {
|
||||
export declare class PieceExtend<T> extends PieceAttribute<T> {
|
||||
}
|
||||
|
||||
interface Piece extends PieceAttribute<Piece> {
|
||||
(options?: {content: string, icon?: string}): Piece;
|
||||
iconPosition(value: IconPosition): Piece;
|
||||
}
|
||||
|
||||
declare class PieceAttribute<T> extends CommonMethod<T> {
|
||||
iconPosition(value: IconPosition): T;
|
||||
}
|
||||
|
||||
export declare const PieceInterface: Piece;
|
52
api/@internal/component/ets/polygon.d.ts
vendored
52
api/@internal/component/ets/polygon.d.ts
vendored
@ -1,24 +1,30 @@
|
||||
/*
|
||||
* 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 {CommonShapeMethod} from "./common";
|
||||
|
||||
interface Polygon extends CommonShapeMethod<Polygon> {
|
||||
(): Polygon;
|
||||
(value?: { width?: string | number, height?: string | number }): Polygon;
|
||||
points(value: Array<any>): Polygon;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 {CommonShapeMethod} from "./common";
|
||||
|
||||
export declare class PolygonExtend<T> extends PolygonAttribute<T> {
|
||||
}
|
||||
|
||||
interface Polygon extends PolygonAttribute<Polygon> {
|
||||
(): Polygon;
|
||||
(value?: { width?: string | number, height?: string | number }): Polygon;
|
||||
}
|
||||
|
||||
declare class PolygonAttribute<T> extends CommonShapeMethod<T> {
|
||||
points(value: Array<any>): T;
|
||||
}
|
||||
|
||||
export declare const PolygonInterface: Polygon;
|
52
api/@internal/component/ets/polyline.d.ts
vendored
52
api/@internal/component/ets/polyline.d.ts
vendored
@ -1,24 +1,30 @@
|
||||
/*
|
||||
* 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 {CommonShapeMethod} from "./common";
|
||||
|
||||
interface Polyline extends CommonShapeMethod<Polyline> {
|
||||
(): Polyline;
|
||||
(value?: { width?: string | number, height?: string | number }): Polyline;
|
||||
points(value: Array<any>): Polyline;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 {CommonShapeMethod} from "./common";
|
||||
|
||||
export declare class PolylineExtend<T> extends PolylineAttribute<T> {
|
||||
}
|
||||
|
||||
interface Polyline extends PolylineAttribute<Polyline> {
|
||||
(): Polyline;
|
||||
(value?: { width?: string | number, height?: string | number }): Polyline;
|
||||
}
|
||||
|
||||
declare class PolylineAttribute<T> extends CommonShapeMethod<T> {
|
||||
points(value: Array<any>): T;
|
||||
}
|
||||
|
||||
export declare const PolylineInterface: Polyline;
|
16
api/@internal/component/ets/progress.d.ts
vendored
16
api/@internal/component/ets/progress.d.ts
vendored
@ -22,11 +22,17 @@ export declare enum ProgressStyle {
|
||||
Circular,
|
||||
}
|
||||
|
||||
interface Progress extends CommonMethod<Progress> {
|
||||
(object: { value: number, total?: number, style?: ProgressStyle }): Progress;
|
||||
value(value: number): Progress;
|
||||
color(value: Color): Progress;
|
||||
cricularStyle(value: { strokeWidth?: number, scaleCount?: number, scaleWidth?: number }): Progress;
|
||||
export declare class ProgressExtend<T> extends ProgressAttribute<T> {
|
||||
}
|
||||
|
||||
interface Progress extends ProgressAttribute<Progress> {
|
||||
(object: { value: number, total?: number, style?: ProgressStyle }): Progress;
|
||||
}
|
||||
|
||||
declare class ProgressAttribute<T> extends CommonMethod<T> {
|
||||
value(value: number): T;
|
||||
color(value: Color): T;
|
||||
cricularStyle(value: { strokeWidth?: number, scaleCount?: number, scaleWidth?: number }): T;
|
||||
}
|
||||
|
||||
export declare const ProgressInterface: Progress;
|
13
api/@internal/component/ets/qrcode.d.ts
vendored
13
api/@internal/component/ets/qrcode.d.ts
vendored
@ -15,11 +15,16 @@
|
||||
|
||||
import {CommonMethod, Color, Resource} from "./common";
|
||||
|
||||
interface QRCode extends CommonMethod<QRCode> {
|
||||
(value: string): QRCode;
|
||||
export declare class QRCodeExtend<T> extends QRCodeAttribute<T> {
|
||||
}
|
||||
|
||||
color(value: Color | number | string | Resource): QRCode;
|
||||
backgroundColor(value: Color | number | string | Resource): QRCode;
|
||||
interface QRCode extends QRCodeAttribute<QRCode> {
|
||||
(value: string): QRCode;
|
||||
}
|
||||
|
||||
declare class QRCodeAttribute<T> extends CommonMethod<T> {
|
||||
color(value: Color | number | string | Resource): T;
|
||||
backgroundColor(value: Color | number | string | Resource): T;
|
||||
}
|
||||
|
||||
export declare const QRCodeInterface: QRCode;
|
||||
|
14
api/@internal/component/ets/radio.d.ts
vendored
14
api/@internal/component/ets/radio.d.ts
vendored
@ -15,10 +15,16 @@
|
||||
|
||||
import {CommonMethod} from "./common";
|
||||
|
||||
interface Radio extends CommonMethod<Radio> {
|
||||
(options: {value: string}): Radio;
|
||||
checked(value: boolean): Radio;
|
||||
onChange(callback: (isChecked: boolean) => void): Radio;
|
||||
export declare class RadioExtend<T> extends RadioAttribute<T> {
|
||||
}
|
||||
|
||||
interface Radio extends RadioAttribute<Radio> {
|
||||
(options: {value: string}): Radio;
|
||||
}
|
||||
|
||||
declare class RadioAttribute<T> extends CommonMethod<T> {
|
||||
checked(value: boolean): T;
|
||||
onChange(callback: (isChecked: boolean) => void): T;
|
||||
}
|
||||
|
||||
export declare const RadioInterface: Radio;
|
||||
|
56
api/@internal/component/ets/rating.d.ts
vendored
56
api/@internal/component/ets/rating.d.ts
vendored
@ -1,26 +1,32 @@
|
||||
/*
|
||||
* 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";
|
||||
|
||||
interface Rating extends CommonMethod<Rating> {
|
||||
(options?: {rating: number, indicator?: boolean}): Rating;
|
||||
stars(value: number): Rating;
|
||||
stepSize(value: number): Rating;
|
||||
starStyle(value: {backgroundUri: string, foregroundUri: string, secondaryUri?: string}): Rating;
|
||||
onChange(callback:(value: number) => void): Rating;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare class RatingExtend<T> extends RatingAttribute<T> {
|
||||
}
|
||||
|
||||
interface Rating extends RatingAttribute<Rating> {
|
||||
(options?: {rating: number, indicator?: boolean}): Rating;
|
||||
}
|
||||
|
||||
declare class RatingAttribute<T> extends CommonMethod<T> {
|
||||
stars(value: number): T;
|
||||
stepSize(value: number): T;
|
||||
starStyle(value: {backgroundUri: string, foregroundUri: string, secondaryUri?: string}): T;
|
||||
onChange(callback:(value: number) => void): T;
|
||||
}
|
||||
|
||||
export declare const RatingInterface: Rating;
|
13
api/@internal/component/ets/rect.d.ts
vendored
13
api/@internal/component/ets/rect.d.ts
vendored
@ -15,7 +15,10 @@
|
||||
|
||||
import {CommonShapeMethod} from "./common";
|
||||
|
||||
interface Rect extends CommonShapeMethod<Rect> {
|
||||
export declare class RectExtend<T> extends RectAttribute<T> {
|
||||
}
|
||||
|
||||
interface Rect extends RectAttribute<Rect> {
|
||||
new (value?: { width?: number | string, height?: number | string, radius?: number | string | Array<any> } |
|
||||
{
|
||||
width?: number | string, height?: number | string, radiusWidth?: number | string,
|
||||
@ -26,12 +29,14 @@ interface Rect extends CommonShapeMethod<Rect> {
|
||||
width?: number | string, height?: number | string, radiusWidth?: number | string,
|
||||
radiusHeight?: number | string
|
||||
}): Rect;
|
||||
}
|
||||
|
||||
radiusWidth(value: number | string): Rect;
|
||||
declare class RectAttribute<T> extends CommonShapeMethod<T> {
|
||||
radiusWidth(value: number | string): T;
|
||||
|
||||
radiusHeight(value: number | string): Rect;
|
||||
radiusHeight(value: number | string): T;
|
||||
|
||||
radius(value: number | string | Array<any>): Rect;
|
||||
radius(value: number | string | Array<any>): T;
|
||||
}
|
||||
|
||||
export declare const RectInterface: Rect;
|
||||
|
11
api/@internal/component/ets/row.d.ts
vendored
11
api/@internal/component/ets/row.d.ts
vendored
@ -15,10 +15,15 @@
|
||||
|
||||
import {CommonMethod, VerticalAlign, VerticalAlignDeclaration} from "./common";
|
||||
|
||||
interface Row extends CommonMethod<Row> {
|
||||
(value?: { space?: string | number, useAlign?: VerticalAlignDeclaration }): Row;
|
||||
export declare class RowExtend<T> extends RowAttribute<T> {
|
||||
}
|
||||
|
||||
alignItems(value: VerticalAlign): Row;
|
||||
interface Row extends RowAttribute<Row> {
|
||||
(value?: { space?: string | number, useAlign?: VerticalAlignDeclaration }): Row;
|
||||
}
|
||||
|
||||
declare class RowAttribute<T> extends CommonMethod<T> {
|
||||
alignItems(value: VerticalAlign): T;
|
||||
}
|
||||
|
||||
export declare const RowInterface: Row;
|
||||
|
11
api/@internal/component/ets/row_split.d.ts
vendored
11
api/@internal/component/ets/row_split.d.ts
vendored
@ -15,10 +15,15 @@
|
||||
|
||||
import {CommonMethod} from "./common";
|
||||
|
||||
interface RowSplit extends CommonMethod<RowSplit> {
|
||||
(): RowSplit;
|
||||
export declare class RowSplitExtend<T> extends RowSplitAttribute<T> {
|
||||
}
|
||||
|
||||
resizeable(value: boolean): RowSplit;
|
||||
interface RowSplit extends RowSplitAttribute<RowSplit> {
|
||||
(): RowSplit;
|
||||
}
|
||||
|
||||
declare class RowSplitAttribute<T> extends CommonMethod<T> {
|
||||
resizeable(value: boolean): T;
|
||||
}
|
||||
|
||||
export declare const RowSplitInterface: RowSplit;
|
||||
|
23
api/@internal/component/ets/scroll.d.ts
vendored
23
api/@internal/component/ets/scroll.d.ts
vendored
@ -37,24 +37,29 @@ export declare class Scroller {
|
||||
scrollToIndex(value: number);
|
||||
}
|
||||
|
||||
interface Scroll extends CommonMethod<Scroll> {
|
||||
export declare class ScrollExtend<T> extends ScrollAttribute<T> {
|
||||
}
|
||||
|
||||
interface Scroll extends ScrollAttribute<Scroll> {
|
||||
(scroller?: Scroller): Scroll;
|
||||
}
|
||||
|
||||
scrollable(value: ScrollDirection): Scroll;
|
||||
declare class ScrollAttribute<T> extends CommonMethod<T> {
|
||||
scrollable(value: ScrollDirection): T;
|
||||
|
||||
onScroll(event: (xOffset: number, yOffset: number) => void): Scroll;
|
||||
onScroll(event: (xOffset: number, yOffset: number) => void): T;
|
||||
|
||||
onScrollEdge(event: (side: Edge) => void): Scroll;
|
||||
onScrollEdge(event: (side: Edge) => void): T;
|
||||
|
||||
onScrollEnd(event: () => void): Scroll;
|
||||
onScrollEnd(event: () => void): T;
|
||||
|
||||
scrollBar(barState: BarState): Scroll;
|
||||
scrollBar(barState: BarState): T;
|
||||
|
||||
scrollBarColor(color: Color | number | string): Scroll;
|
||||
scrollBarColor(color: Color | number | string): T;
|
||||
|
||||
scrollBarWidth(value: number | string): Scroll;
|
||||
scrollBarWidth(value: number | string): T;
|
||||
|
||||
edgeEffect(edgeEffect: EdgeEffect): Scroll;
|
||||
edgeEffect(edgeEffect: EdgeEffect): T;
|
||||
}
|
||||
|
||||
export declare const ScrollInterface: Scroll;
|
||||
|
35
api/@internal/component/ets/shape.d.ts
vendored
35
api/@internal/component/ets/shape.d.ts
vendored
@ -13,37 +13,42 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {CommonMethod, Color, LineCapStyle, LineJoinStyle, Resource} from "./common";
|
||||
import {CommonMethod, Color, LineCapStyle, LineJoinStyle, Resource, PixelMap} from "./common";
|
||||
|
||||
interface Shape extends CommonMethod<Shape> {
|
||||
(): Shape;
|
||||
export declare class ShapeExtend<T> extends ShapeAttribute<T> {
|
||||
}
|
||||
|
||||
interface Shape extends ShapeAttribute<Shape> {
|
||||
(value?: PixelMap): Shape;
|
||||
}
|
||||
|
||||
declare class ShapeAttribute<T> extends CommonMethod<T> {
|
||||
viewPort(value: {
|
||||
x?: number | string, y?: number | string,
|
||||
width?: number | string, height?: number | string
|
||||
}): Shape;
|
||||
}): T;
|
||||
|
||||
stroke(value: Color | number | string | Resource): Shape;
|
||||
stroke(value: Color | number | string | Resource): T;
|
||||
|
||||
fill(value: Color | number | string | Resource): Shape;
|
||||
fill(value: Color | number | string | Resource): T;
|
||||
|
||||
strokeDashOffset(value: number | string): Shape;
|
||||
strokeDashOffset(value: number | string): T;
|
||||
|
||||
strokeDashArray(value: Array<any>): Shape;
|
||||
strokeDashArray(value: Array<any>): T;
|
||||
|
||||
strokeLineCap(value: LineCapStyle): Shape;
|
||||
strokeLineCap(value: LineCapStyle): T;
|
||||
|
||||
strokeLineJoin(value: LineJoinStyle): Shape;
|
||||
strokeLineJoin(value: LineJoinStyle): T;
|
||||
|
||||
strokeMiterLimit(value: number | string): Shape;
|
||||
strokeMiterLimit(value: number | string): T;
|
||||
|
||||
strokeOpacity(value: number | string | Resource): Shape;
|
||||
strokeOpacity(value: number | string | Resource): T;
|
||||
|
||||
fillOpacity(value: number | string | Resource): Shape;
|
||||
fillOpacity(value: number | string | Resource): T;
|
||||
|
||||
strokeWidth(value: number | string): Shape;
|
||||
strokeWidth(value: number | string): T;
|
||||
|
||||
antiAlias(value: boolean): Shape;
|
||||
antiAlias(value: boolean): T;
|
||||
}
|
||||
|
||||
export declare const ShapeInterface: Shape;
|
||||
|
88
api/@internal/component/ets/slider.d.ts
vendored
88
api/@internal/component/ets/slider.d.ts
vendored
@ -1,41 +1,47 @@
|
||||
/*
|
||||
* 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, Color} from "./common";
|
||||
|
||||
export declare enum SliderStyle {
|
||||
OUTSET = 0,
|
||||
INSET,
|
||||
}
|
||||
|
||||
export declare enum SliderChangeMode {
|
||||
BEGIN = 0,
|
||||
MOVING,
|
||||
END,
|
||||
}
|
||||
|
||||
interface Slider extends CommonMethod<Slider> {
|
||||
(options?: {value?: number, min?: number, max?: number, step?: number, style?: SliderStyle}): Slider;
|
||||
blockColor(value: Color): Slider;
|
||||
trackColor(value: Color): Slider;
|
||||
selectedColor(value: Color): Slider;
|
||||
minLabel(value: string): Slider;
|
||||
maxLabel(value: string): Slider;
|
||||
showSteps(value: boolean): Slider;
|
||||
showTips(value: boolean): Slider;
|
||||
onChange(callback:(value: number, mode: SliderChangeMode) => void): Slider;
|
||||
}
|
||||
|
||||
export declare const SliderInterface: Slider;
|
||||
/*
|
||||
* 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, Color} from "./common";
|
||||
|
||||
export declare enum SliderStyle {
|
||||
OUTSET = 0,
|
||||
INSET,
|
||||
}
|
||||
|
||||
export declare enum SliderChangeMode {
|
||||
BEGIN = 0,
|
||||
MOVING,
|
||||
END,
|
||||
}
|
||||
|
||||
export declare class SliderExtend<T> extends SliderAttribute<T> {
|
||||
}
|
||||
|
||||
interface Slider extends SliderAttribute<Slider> {
|
||||
(options?: {value?: number, min?: number, max?: number, step?: number, style?: SliderStyle}): Slider;
|
||||
}
|
||||
|
||||
declare class SliderAttribute<T> extends CommonMethod<T> {
|
||||
blockColor(value: Color): T;
|
||||
trackColor(value: Color): T;
|
||||
selectedColor(value: Color): T;
|
||||
minLabel(value: string): T;
|
||||
maxLabel(value: string): T;
|
||||
showSteps(value: boolean): T;
|
||||
showTips(value: boolean): T;
|
||||
onChange(callback:(value: number, mode: SliderChangeMode) => void): T;
|
||||
}
|
||||
|
||||
export declare const SliderInterface: Slider;
|
||||
|
23
api/@internal/component/ets/span.d.ts
vendored
23
api/@internal/component/ets/span.d.ts
vendored
@ -16,24 +16,29 @@
|
||||
import {CommonMethod, Color, Resource} from "./common";
|
||||
import {FontStyle, FontWeight, TextDecorationType, TextCase} from "./text";
|
||||
|
||||
interface Span extends CommonMethod<Span> {
|
||||
export declare class SpanExtend<T> extends SpanAttribute<T> {
|
||||
}
|
||||
|
||||
interface Span extends SpanAttribute<Span> {
|
||||
(value: string | Resource): Span;
|
||||
}
|
||||
|
||||
fontColor(value: Color | number | string | Resource): Span;
|
||||
declare class SpanAttribute<T> extends CommonMethod<T> {
|
||||
fontColor(value: Color | number | string | Resource): T;
|
||||
|
||||
fontSize(value: number | string | Resource): Span;
|
||||
fontSize(value: number | string | Resource): T;
|
||||
|
||||
fontStyle(value: FontStyle): Span;
|
||||
fontStyle(value: FontStyle): T;
|
||||
|
||||
fontWeight(value: number | FontWeight | string): Span;
|
||||
fontWeight(value: number | FontWeight | string): T;
|
||||
|
||||
fontFamily(value: string | Resource): Span;
|
||||
fontFamily(value: string | Resource): T;
|
||||
|
||||
decoration(value: { type: TextDecorationType, color?: Color | number | string | Resource}): Span;
|
||||
decoration(value: { type: TextDecorationType, color?: Color | number | string | Resource}): T;
|
||||
|
||||
letterSpacing(value: number | string): Span;
|
||||
letterSpacing(value: number | string): T;
|
||||
|
||||
textCase(value: TextCase): Span;
|
||||
textCase(value: TextCase): T;
|
||||
}
|
||||
|
||||
export declare const SpanInterface: Span;
|
||||
|
11
api/@internal/component/ets/stack.d.ts
vendored
11
api/@internal/component/ets/stack.d.ts
vendored
@ -15,10 +15,15 @@
|
||||
|
||||
import {CommonMethod, Alignment} from "./common";
|
||||
|
||||
interface Stack extends CommonMethod<Stack> {
|
||||
(value?: { alignContent?: Alignment }): Stack;
|
||||
export declare class StackExtend<T> extends StackAttribute<T> {
|
||||
}
|
||||
|
||||
alignContent(value: Alignment): Stack;
|
||||
interface Stack extends StackAttribute<Stack> {
|
||||
(value?: { alignContent?: Alignment }): Stack;
|
||||
}
|
||||
|
||||
declare class StackAttribute<T> extends CommonMethod<T> {
|
||||
alignContent(value: Alignment): T;
|
||||
}
|
||||
|
||||
export declare const StackInterface: Stack;
|
||||
|
45
api/@internal/component/ets/stateManagement.d.ts
vendored
45
api/@internal/component/ets/stateManagement.d.ts
vendored
@ -44,26 +44,28 @@ declare class SyncedPropertyOneWay<T> extends SubscribedAbstractProperty<T> impl
|
||||
}
|
||||
|
||||
export declare class AppStorage {
|
||||
static GetOrCreate(): AppStorage;
|
||||
static Get(): AppStorage | undefined;
|
||||
link<T>(propName: string): SubscribedAbstractProperty<T> | undefined;
|
||||
setAndLink<T>(propName: string, defaultValue: T): SubscribedAbstractProperty<T>;
|
||||
prop<S>(propName: string): SubscribedAbstractProperty<S> | undefined;
|
||||
setAndProp<S>(propName: string, defaultValue: S): SubscribedAbstractProperty<S>;
|
||||
has(propName: string): boolean;
|
||||
get<T>(propName: string): T | undefined;
|
||||
set<T>(propName: string, newValue: T): boolean;
|
||||
setOrCreate<T>(propName: string, newValue: T): void;
|
||||
delete(propName: string): boolean;
|
||||
keys(): IterableIterator<string>;
|
||||
protected clear(): boolean;
|
||||
getOrCreatePersistentStorage(): PersistentStorage;
|
||||
static Link<T>(propName: string): SubscribedAbstractProperty<T> | undefined;
|
||||
static SetAndLink<T>(propName: string, defaultValue: T): SubscribedAbstractProperty<T>;
|
||||
static Prop<S>(propName: string): SubscribedAbstractProperty<S> | undefined;
|
||||
static SetAndProp<S>(propName: string, defaultValue: S): SubscribedAbstractProperty<S>;
|
||||
static Has(propName: string): boolean;
|
||||
static Get<T>(propName: string): T | undefined;
|
||||
static Set<T>(propName: string, newValue: T): boolean;
|
||||
static SetOrCreate<T>(propName: string, newValue: T): void;
|
||||
static Delete(propName: string): boolean;
|
||||
static Keys(): IterableIterator<string>;
|
||||
static staticClear(): boolean;
|
||||
static IsMutable(propName: string): boolean;
|
||||
static Size(): number;
|
||||
}
|
||||
|
||||
export declare class Environment {
|
||||
constructor();
|
||||
static Prop(key:string, defaultValue:any): boolean;
|
||||
static Props(props: Array<{key: string, defaultValue: any}>): void;
|
||||
static EnvProp<S>(key: string, value: S): boolean;
|
||||
static EnvProps(props: {
|
||||
key: string;
|
||||
defaultValue: any;
|
||||
}[]): void;
|
||||
static Keys(): Array<string>;
|
||||
}
|
||||
|
||||
@ -79,10 +81,13 @@ export declare enum LayoutDirection {
|
||||
|
||||
export declare class PersistentStorage {
|
||||
constructor(appStorage: AppStorage, storage: Storage);
|
||||
link(propName: string): void;
|
||||
links(props: Array<string>): void;
|
||||
unlink(propName: string): void;
|
||||
keys(): IterableIterator<string>;
|
||||
static PersistProp<T>(key: string, defaultValue: T): void;
|
||||
static DeleteProp(key: string): void;
|
||||
static PersistProps(properties: {
|
||||
key: string;
|
||||
defaultValue: any;
|
||||
}[]): void;
|
||||
static Keys(): Array<string>;
|
||||
}
|
||||
|
||||
export declare class Storage {
|
||||
|
32
api/@internal/component/ets/swiper.d.ts
vendored
32
api/@internal/component/ets/swiper.d.ts
vendored
@ -23,26 +23,38 @@ export declare class SwiperController {
|
||||
showPrevious();
|
||||
}
|
||||
|
||||
interface Swiper extends CommonMethod<Swiper> {
|
||||
export declare enum SwiperDisplayMode {
|
||||
Stretch,
|
||||
AutoLinear
|
||||
}
|
||||
|
||||
export declare class SwiperExtend<T> extends SwiperAttribute<T> {
|
||||
}
|
||||
|
||||
interface Swiper extends SwiperAttribute<Swiper> {
|
||||
(controller?: SwiperController): Swiper;
|
||||
}
|
||||
|
||||
index(value: number): Swiper;
|
||||
declare class SwiperAttribute<T> extends CommonMethod<T> {
|
||||
index(value: number): T;
|
||||
|
||||
autoPlay(value: boolean): Swiper;
|
||||
autoPlay(value: boolean): T;
|
||||
|
||||
interval(value: number): Swiper;
|
||||
interval(value: number): T;
|
||||
|
||||
indicator(value: boolean): Swiper;
|
||||
indicator(value: boolean): T;
|
||||
|
||||
loop(value: boolean): Swiper;
|
||||
loop(value: boolean): T;
|
||||
|
||||
duration(value: number): Swiper;
|
||||
duration(value: number): T;
|
||||
|
||||
vertical(value: boolean): Swiper;
|
||||
vertical(value: boolean): T;
|
||||
|
||||
itemSpace(value: number | string): Swiper;
|
||||
itemSpace(value: number | string): T;
|
||||
|
||||
onChange(event: (index: number) => void): Swiper;
|
||||
displayMode(value: SwiperDisplayMode): T;
|
||||
|
||||
onChange(event: (index: number) => void): T;
|
||||
}
|
||||
|
||||
export declare const SwiperInterface: Swiper;
|
||||
|
11
api/@internal/component/ets/tab_content.d.ts
vendored
11
api/@internal/component/ets/tab_content.d.ts
vendored
@ -15,10 +15,15 @@
|
||||
|
||||
import {CommonMethod} from "./common";
|
||||
|
||||
interface TabContent extends CommonMethod<TabContent> {
|
||||
(): TabContent;
|
||||
export declare class TabContentExtend<T> extends TabContentAttribute<T> {
|
||||
}
|
||||
|
||||
tabBar(value: string | { icon?: string, text?: string }): TabContent;
|
||||
interface TabContent extends TabContentAttribute<TabContent> {
|
||||
(): TabContent;
|
||||
}
|
||||
|
||||
declare class TabContentAttribute<T> extends CommonMethod<T> {
|
||||
tabBar(value: string | { icon?: string, text?: string }): T;
|
||||
}
|
||||
|
||||
export declare const TabContentInterface: TabContent;
|
||||
|
23
api/@internal/component/ets/tabs.d.ts
vendored
23
api/@internal/component/ets/tabs.d.ts
vendored
@ -31,22 +31,27 @@ export declare class TabsController {
|
||||
changeIndex(value: number): void;
|
||||
}
|
||||
|
||||
interface Tabs extends CommonMethod<Tabs> {
|
||||
(value?: { barPosition?: BarPosition, initialIndex?: number, controller?: TabsController }): Tabs;
|
||||
export declare class TabsExtend<T> extends TabsAttribute<T> {
|
||||
}
|
||||
|
||||
vertical(value: boolean): Tabs;
|
||||
interface Tabs extends TabsAttribute<Tabs> {
|
||||
(value?: { barPosition?: BarPosition, index?: number, controller?: TabsController }): Tabs;
|
||||
}
|
||||
|
||||
scrollable(value: boolean): Tabs;
|
||||
declare class TabsAttribute<T> extends CommonMethod<T> {
|
||||
vertical(value: boolean): T;
|
||||
|
||||
barMode(value: BarMode): Tabs;
|
||||
scrollable(value: boolean): T;
|
||||
|
||||
barWidth(value: number): Tabs;
|
||||
barMode(value: BarMode): T;
|
||||
|
||||
barHeight(value: number): Tabs;
|
||||
barWidth(value: number): T;
|
||||
|
||||
animationDuration(value: number): Tabs;
|
||||
barHeight(value: number): T;
|
||||
|
||||
onChange(event: (index: number) => void): Tabs;
|
||||
animationDuration(value: number): T;
|
||||
|
||||
onChange(event: (index: number) => void): T;
|
||||
}
|
||||
|
||||
export declare const TabsInterface: Tabs;
|
||||
|
40
api/@internal/component/ets/text.d.ts
vendored
40
api/@internal/component/ets/text.d.ts
vendored
@ -37,7 +37,8 @@ export declare enum TextAlign {
|
||||
|
||||
export declare enum TextOverflow {
|
||||
Clip,
|
||||
Ellipsis
|
||||
Ellipsis,
|
||||
None
|
||||
}
|
||||
|
||||
export declare enum TextDecorationType {
|
||||
@ -53,38 +54,43 @@ export declare enum TextCase {
|
||||
UpperCase
|
||||
}
|
||||
|
||||
interface Text extends CommonMethod<Text> {
|
||||
export declare class TextExtend<T> extends TextAttribute<T> {
|
||||
}
|
||||
|
||||
interface Text extends TextAttribute<Text> {
|
||||
(content?: string | Resource): Text;
|
||||
}
|
||||
|
||||
fontColor(value: Color | number | string | Resource): Text;
|
||||
declare class TextAttribute<T> extends CommonMethod<T> {
|
||||
fontColor(value: Color | number | string | Resource): T;
|
||||
|
||||
fontSize(value: number | string | Resource): Text;
|
||||
fontSize(value: number | string | Resource): T;
|
||||
|
||||
minFontSize(value: number | string | Resource): Text;
|
||||
minFontSize(value: number | string | Resource): T;
|
||||
|
||||
maxFontSize(value: number | string | Resource): Text;
|
||||
maxFontSize(value: number | string | Resource): T;
|
||||
|
||||
fontStyle(value: FontStyle): Text;
|
||||
fontStyle(value: FontStyle): T;
|
||||
|
||||
fontWeight(value: number | FontWeight | string): Text;
|
||||
fontWeight(value: number | FontWeight | string): T;
|
||||
|
||||
textAlign(value: TextAlign): Text;
|
||||
textAlign(value: TextAlign): T;
|
||||
|
||||
lineHeight(value: number | string): Text;
|
||||
lineHeight(value: number | string | Resource): T;
|
||||
|
||||
textOverflow(value: { overflow: TextOverflow }): Text;
|
||||
textOverflow(value: { overflow: TextOverflow }): T;
|
||||
|
||||
fontFamily(value: string | Resource): Text;
|
||||
fontFamily(value: string | Resource): T;
|
||||
|
||||
maxLines(value: number): Text;
|
||||
maxLines(value: number): T;
|
||||
|
||||
decoration(value: { type: TextDecorationType, color?: Color | number | string | Resource}): Text;
|
||||
decoration(value: { type: TextDecorationType, color?: Color | number | string | Resource }): T;
|
||||
|
||||
letterSpacing(value: number | string): Text;
|
||||
letterSpacing(value: number | string): T;
|
||||
|
||||
textCase(value: TextCase): Text;
|
||||
textCase(value: TextCase): T;
|
||||
|
||||
baselineOffset(value: number | string): Text;
|
||||
baselineOffset(value: number | string): T;
|
||||
}
|
||||
|
||||
export declare const TextInterface: Text;
|
||||
|
70
api/@internal/component/ets/textPicker.d.ts
vendored
70
api/@internal/component/ets/textPicker.d.ts
vendored
@ -1,32 +1,38 @@
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare enum PickerStyle {
|
||||
INLINE = 0,
|
||||
BLOCK,
|
||||
FADE,
|
||||
}
|
||||
|
||||
interface TextPicker extends CommonMethod<TextPicker> {
|
||||
(options?: {range: string[], value?: string, selected?: number, loop?: boolean, style?: PickerStyle}): TextPicker;
|
||||
defaultPickerItemHeight(value: number): TextPicker;
|
||||
onAccept(callback: (value: string, index: number) => void): TextPicker;
|
||||
onCancel(callback: () => void): TextPicker;
|
||||
onChange(callback: (value: string, index: number) => void): TextPicker;
|
||||
}
|
||||
|
||||
export declare const TextPickerInterface: TextPicker;
|
||||
/*
|
||||
* 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";
|
||||
|
||||
export declare enum PickerStyle {
|
||||
INLINE = 0,
|
||||
BLOCK,
|
||||
FADE,
|
||||
}
|
||||
|
||||
export declare class TextPickerExtend<T> extends TextPickerAttribute<T> {
|
||||
}
|
||||
|
||||
interface TextPicker extends TextPickerAttribute<TextPicker> {
|
||||
(options?: {range: string[], value?: string, selected?: number, loop?: boolean , style?: PickerStyle}): TextPicker;
|
||||
}
|
||||
|
||||
declare class TextPickerAttribute<T> extends CommonMethod<T> {
|
||||
defaultPickerItemHeight(value: number): T;
|
||||
onAccept(callback: (value: string, index: number) => void): T;
|
||||
onCancel(callback: () => void): T;
|
||||
onChange(callback: (value: string, index: number) => void): T;
|
||||
}
|
||||
|
||||
export declare const TextPickerInterface: TextPicker;
|
||||
|
38
api/@internal/component/ets/textarea.d.ts
vendored
Normal file
38
api/@internal/component/ets/textarea.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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, Color, Resource} from "./common";
|
||||
import {TextAlign, FontWeight, FontStyle} from "./text";
|
||||
|
||||
export declare class TextAreaExtend<T> extends TextAreaAttribute<T> {
|
||||
}
|
||||
|
||||
interface TextArea extends TextAreaAttribute<TextArea> {
|
||||
(options?: {
|
||||
placeholder: string;
|
||||
text: string;
|
||||
}): TextArea;
|
||||
}
|
||||
|
||||
declare class TextAreaAttribute<T> extends CommonMethod<T> {
|
||||
placeholderColor(value: Color): T;
|
||||
placeholderFont(value:{ size: number, weight: FontWeight, fontFamily: string | Resource, style: FontStyle }): T;
|
||||
textAlign(value: TextAlign): T;
|
||||
caretColor(value: Color): T;
|
||||
correction(value: boolean): T;
|
||||
onChange(callback: (value: string) => void): T;
|
||||
}
|
||||
|
||||
export declare const TextAreaInterface: TextArea;
|
68
api/@internal/component/ets/textinput.d.ts
vendored
Normal file
68
api/@internal/component/ets/textinput.d.ts
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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, Color, Resource} from "./common";
|
||||
import {FontWeight, FontStyle} from "./text";
|
||||
|
||||
export declare enum TextInputType {
|
||||
BEGIN = 0,
|
||||
TEXT = BEGIN,
|
||||
MULTILINE = 1,
|
||||
NUMBER = 2,
|
||||
PHONE = 3,
|
||||
DATETIME = 4,
|
||||
EMAIL_ADDRESS = 5,
|
||||
URL = 6,
|
||||
VISIBLE_PASSWORD = 7,
|
||||
END
|
||||
}
|
||||
|
||||
export declare enum TextInputAction {
|
||||
BEGIN = 0,
|
||||
UNSPECIFIED = BEGIN,
|
||||
NONE = 1,
|
||||
GO = 2,
|
||||
SEARCH = 3,
|
||||
SEND = 4,
|
||||
NEXT = 5,
|
||||
DONE = 6,
|
||||
PREVIOUS = 7,
|
||||
END = PREVIOUS
|
||||
}
|
||||
|
||||
export declare class TextInputExtend<T> extends TextInputAttribute<T> {
|
||||
}
|
||||
|
||||
interface TextInput extends TextInputAttribute<TextInput> {
|
||||
(options?: {
|
||||
placeholder: string;
|
||||
text: string;
|
||||
}): TextInput;
|
||||
}
|
||||
|
||||
declare class TextInputAttribute<T> extends CommonMethod<T> {
|
||||
textInputType(value: TextInputType): T;
|
||||
placeholderColor(value: Color): T;
|
||||
placeholderFont(value: {size: number, weight: FontWeight, fontFamily: string | Resource, style: FontStyle}): T;
|
||||
textInputAction(value: TextInputAction): T;
|
||||
inputFilter(value: boolean): T;
|
||||
caretColor(value: Color): T;
|
||||
correction(value: boolean): T;
|
||||
onEditChanged(callback: (isEditing: boolean) => void): T;
|
||||
onSubmit(callback: (enterKey: TextInputAction) => void): T;
|
||||
onChange(callback: (value: string) => void): T;
|
||||
}
|
||||
|
||||
export declare const TextInputInterface: TextInput;
|
16
api/@internal/component/ets/toggle.d.ts
vendored
16
api/@internal/component/ets/toggle.d.ts
vendored
@ -21,11 +21,17 @@ export declare enum ToggleType {
|
||||
Button
|
||||
}
|
||||
|
||||
interface Toggle extends CommonMethod<Toggle> {
|
||||
(options?: {type?: ToggleType, isOn?: boolean}): Toggle;
|
||||
onChange(callback: (isOn: boolean) => void): Toggle;
|
||||
selectedColor(value: Color): Toggle;
|
||||
swithPointStyle(color: Color): Toggle;
|
||||
export declare class ToggleExtend<T> extends ToggleAttribute<T> {
|
||||
}
|
||||
|
||||
interface Toggle extends ToggleAttribute<Toggle> {
|
||||
(options?: {type: ToggleType, isOn?: boolean}): Toggle;
|
||||
}
|
||||
|
||||
declare class ToggleAttribute<T> extends CommonMethod<T> {
|
||||
onChange(callback: (isOn: boolean) => void): T;
|
||||
selectedColor(value: Color): T;
|
||||
swithPointStyle(color: Color): T;
|
||||
}
|
||||
|
||||
export declare const ToggleInterface: Toggle;
|
||||
|
35
api/@internal/component/ets/video.d.ts
vendored
35
api/@internal/component/ets/video.d.ts
vendored
@ -25,29 +25,34 @@ declare class VideoController {
|
||||
exitFullscreen();
|
||||
}
|
||||
|
||||
interface Video extends CommonMethod<Video> {
|
||||
export declare class VideoExtend<T> extends VideoAttribute<T> {
|
||||
}
|
||||
|
||||
interface Video extends VideoAttribute<Video> {
|
||||
(value: {
|
||||
src?: string,
|
||||
currentProgressRate?: number | string,
|
||||
previewUri?: string,
|
||||
controller?: VideoController
|
||||
}): Video;
|
||||
}
|
||||
|
||||
muted(value: boolean): Video;
|
||||
autoPlay(value: boolean): Video;
|
||||
controls(value: boolean): Video;
|
||||
loop(value: boolean): Video;
|
||||
objectFit(value: ImageFit): Video;
|
||||
declare class VideoAttribute<T> extends CommonMethod<T> {
|
||||
muted(value: boolean): T;
|
||||
autoPlay(value: boolean): T;
|
||||
controls(value: boolean): T;
|
||||
loop(value: boolean): T;
|
||||
objectFit(value: ImageFit): T;
|
||||
|
||||
onStart(event: () => void): Video;
|
||||
onPause(event: () => void): Video;
|
||||
onFinish(event: () => void): Video;
|
||||
onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void): Video;
|
||||
onPrepared(callback: (event?: { duration: number }) => void): Video;
|
||||
onSeeking(callback: (event?: { time: number }) => void): Video;
|
||||
onSeeked(callback: (event?: { time: number }) => void): Video;
|
||||
onUpdate(callback: (event?: { time: number }) => void): Video;
|
||||
onError(event: () => void): Video;
|
||||
onStart(event: () => void): T;
|
||||
onPause(event: () => void): T;
|
||||
onFinish(event: () => void): T;
|
||||
onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void): T;
|
||||
onPrepared(callback: (event?: { duration: number }) => void): T;
|
||||
onSeeking(callback: (event?: { time: number }) => void): T;
|
||||
onSeeked(callback: (event?: { time: number }) => void): T;
|
||||
onUpdate(callback: (event?: { time: number }) => void): T;
|
||||
onError(event: () => void): T;
|
||||
}
|
||||
|
||||
export declare const VideoInterface: Video;
|
||||
|
Loading…
Reference in New Issue
Block a user