Browse Source

refactor: 完善描述

es6
iapyang 4 years ago
parent
commit
7ec3a53d1c
  1. 5
      typescript/base/a/a.ts
  2. 29
      typescript/base/combination/loader.ts
  3. 36
      typescript/base/combination/switcher.ts
  4. 13
      typescript/base/single/html/html.ts
  5. 21
      typescript/case/combo/bubblecombo/combo.bubble.ts
  6. 39
      typescript/case/layer/pane.list.ts
  7. 45
      typescript/case/list/list.select.ts
  8. 13
      typescript/case/toolbar/toolbar.multiselect.ts
  9. 24
      typescript/index.ts

5
typescript/base/a/a.ts

@ -0,0 +1,5 @@
import { Text } from "../single/text";
export declare class A extends Text {
static xtype: string;
}

29
typescript/base/combination/loader.ts

@ -0,0 +1,29 @@
import { Widget } from "../../core/widget";
export declare class Loader extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
populate<T>(items: T[]): void;
setNotSelectedValue(...args: any[]): void;
getNotSelectedValue<T>(): T;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getSelectedButtons<T>(): T[];
getNotSelectedButtons<T>(): T[];
getIndexByValue(value: any): number;
getNodeById(id: any): any;
getNodeByValue(value: any): any;
getValue<T>(): T[];
}

36
typescript/base/combination/switcher.ts

@ -0,0 +1,36 @@
import { Widget } from "../../core/widget";
export declare class Switcher extends Widget {
static xtype: string;
static EVENT_EXPAND: string;
static EVENT_COLLAPSE: string;
static EVENT_TRIGGER_CHANGE: string;
static EVENT_CHANGE: string;
static EVENT_AFTER_INIT: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_AFTER_POPUPVIEW: string;
static EVENT_BEFORE_HIDEVIEW: string;
static EVENT_AFTER_HIDEVIEW: string;
populate(...args: any[]): void;
setAdapter(adapter: any): void;
isViewVisible(): boolean;
isExpanded(): boolean;
showView(): void;
hideView(): void;
getView<T>(): T;
adjustView(): void;
getAllLeaves<T>(): T[];
getNodeById<T>(id: string): T | undefined;
getNodeByValue<T>(value: any): T | undefined;
}

13
typescript/base/single/html/html.ts

@ -0,0 +1,13 @@
import { Single } from "../single";
export declare class Html extends Single {
doHighLight(): void;
unHighLight(): void;
setValue(v: string): void;
setStyle(css: {[key: string]: string | number}): void;
setText(v: string): void;
}

21
typescript/case/combo/bubblecombo/combo.bubble.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../../core/widget";
import { Widget, _Widget } from "../../../core/widget";
export interface _BubbleCombo extends _Widget {
hideView(): void;
@ -19,3 +19,22 @@ export interface _BubbleComboStatic {
EVENT_BEFORE_HIDEVIEW: string;
EVENT_AFTER_HIDEVIEW: string;
}
export declare class BubbleCombo extends Widget {
static xtype: string;
static EVENT_TRIGGER_CHANGE: string;
static EVENT_CHANGE: string;
static EVENT_EXPAND: string;
static EVENT_COLLAPSE: string;
static EVENT_AFTER_INIT: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_AFTER_POPUPVIEW: string;
static EVENT_BEFORE_HIDEVIEW: string;
static EVENT_AFTER_HIDEVIEW: string;
hideView(): void;
showView(): void;
isViewVisible(): boolean;
}

39
typescript/case/layer/pane.list.ts

@ -0,0 +1,39 @@
import { Pane } from "../../base/pane";
export declare class ListPane extends Pane {
static xtype: string;
static EVENT_CHANGE: string;
hasPrev(): boolean;
hasNext(): boolean;
prependItems<T>(items: T[]): void
addItems<T>(items: T[]): void;
removeItemAt(indexes: number): void;
populate<T>(items?: T[]): void;
setNotSelectedValue(v: any): void;
getNotSelectedValue<T>(): T[];
setEnabledValue(v: any): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getSelectedButtons<T>(): T[];
getNotSelectedButtons<T>(): T[];
getIndexByValue(value: any): number;
getNodeById<T>(id: any): T;
getNodeByValue<T>(value: any): T;
}

45
typescript/case/list/list.select.ts

@ -0,0 +1,45 @@
import { Widget } from "../../core/widget";
export declare class SelectList extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
setAllSelected(v: boolean): void;
setToolBarVisible(v: boolean): void;
isAllSelected(): boolean;
hasPrev(): boolean;
hasNext(): boolean;
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
populate<T>(items: T[]): void;
resetHeight(h: number): void;
setNotSelectedValue(v: any): void;
getNotSelectedValue<T>(): T[];
setEnabledValue(v: any): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getSelectedButtons<T>(): T[];
getNotSelectedButtons<T>(): T[];
getIndexByValue(value: any): number;
getNodeById<T>(id: any): T;
getNodeByValue<T>(value: any): T;
}

13
typescript/case/toolbar/toolbar.multiselect.ts

@ -0,0 +1,13 @@
import { BasicButton } from "../../base/single/button/button.basic";
export declare class MultiSelectBar extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
setHalfSelected(v: boolean): void;
isHalfSelected(): boolean;
setValue<T>(selectedValues: T[]): void;
}

24
typescript/index.ts

@ -18,7 +18,7 @@ import { _Text, Text } from "./base/single/text";
import { _Trigger } from "./base/single/trigger/trigger";
import { IconChangeButton, _IconChangeButton, _IconChangeButtonStatic } from "./case/button/icon/icon.change";
import { _MultiSelectItem, _MultiSelectItemStatic, MultiSelectItem } from "./case/button/item.multiselect";
import { _BubbleCombo, _BubbleComboStatic } from "./case/combo/bubblecombo/combo.bubble";
import { BubbleCombo, _BubbleCombo, _BubbleComboStatic } from "./case/combo/bubblecombo/combo.bubble";
import { _TextValueCombo, _TextValueComboStatic, TextValueCombo } from "./case/combo/combo.textvalue";
import { _SearchTextValueCombo, _SearchTextValueComboStatic } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue";
import { _SignEditor, _SignEditorStatic, SignEditor } from "./case/editor/editor.sign";
@ -76,6 +76,13 @@ import { MultiSelectCombo } from "./widget/multiselect/multiselect.combo";
import { SearchEditor } from "./widget/editor/editor.search";
import { MultiLayerSingleLevelTree } from "./widget/multilayersingletree/multilayersingletree.leveltree";
import { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple";
import { A } from "./base/a/a";
import { Html } from "./base/single/html/html";
import { Switcher } from "./base/combination/switcher";
import { Loader } from "./base/combination/loader";
import { ListPane } from "./case/layer/pane.list";
import { MultiSelectBar } from "./case/toolbar/toolbar.multiselect";
import { SelectList } from "./case/list/list.select";
type ClassConstructor<T extends {}> = T & {
@ -147,6 +154,13 @@ export interface BI extends _func, _i18n, _base, _inject {
VerticalAdaptLayout: typeof VerticalAdaptLayout;
IconButton: typeof IconButton;
TextEditor: typeof TextEditor;
A: typeof A;
Html: typeof Html;
Switcher: typeof Switcher;
Loader: typeof Loader;
ListPane: typeof ListPane;
MultiSelectBar: typeof MultiSelectBar;
SelectList: typeof SelectList;
IconLabel: typeof IconLabel;
Popover: typeof Popover;
BarPopover: typeof BarPopover;
@ -200,6 +214,14 @@ export {
IconChangeButton,
Button,
TextEditor,
A,
Html,
Switcher,
BubbleCombo,
Loader,
ListPane,
MultiSelectBar,
SelectList,
TextValueCombo,
Editor,
IconLabel,

Loading…
Cancel
Save