Browse Source

KERNEL-6465 refactor: 类型补充

es6
youki 4 years ago
parent
commit
ed12165427
  1. 20
      typescript/base/combination/tab.ts
  2. 22
      typescript/base/layer/layer.popover.ts
  3. 16
      typescript/base/single/button/buttons/button.ts
  4. 55
      typescript/base/single/editor/editor.ts
  5. 5
      typescript/base/single/label/icon.label.ts
  6. 16
      typescript/case/button/item.multiselect.ts
  7. 10
      typescript/case/combo/combo.textvalue.ts
  8. 13
      typescript/case/combo/iconcombo/combo.icon.ts
  9. 32
      typescript/index.ts
  10. 22
      typescript/widget/dynamicdate/dynamicdate.combo.ts
  11. 36
      typescript/widget/editor/editor.text.ts

20
typescript/base/combination/tab.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { Widget, _Widget } from "../../core/widget";
export interface _Tab extends _Widget {
setSelect(v: string | number): void;
@ -17,3 +17,21 @@ export interface _Tab extends _Widget {
export interface _TabStatic {
EVENT_CHANGE: string;
}
export declare class Tab extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
setSelect(v: string | number): void;
removeTab(v: string | number): void;
getSelect(): string | number;
getSelectedTab(): any;
getTab(v: string | number): any;
populate(): void;
}

22
typescript/base/layer/layer.popover.ts

@ -0,0 +1,22 @@
import { Widget } from '../../core/widget';
export declare class Popover extends Widget {
static xtype: string;
static EVENT_CLOSE: string;
static EVENT_OPEN: string;
static EVENT_CANCEL: string;
static EVENT_CONFIRM: string;
hide(): void;
open(): void;
close(): void;
setZindex(zindex: number): void;
}
export declare class BarPopover extends Popover {
static xtype: string;
}

16
typescript/base/single/button/buttons/button.ts

@ -1,4 +1,4 @@
import { _BasicButton } from "../button.basic";
import { BasicButton, _BasicButton } from "../button.basic";
export interface _Button extends _BasicButton {
doRedMark(...args: any[]): void;
@ -13,3 +13,17 @@ export interface _Button extends _BasicButton {
export interface _ButtonStatic {
EVENT_CHANGE: string;
}
export declare class Button extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
}

55
typescript/base/single/editor/editor.ts

@ -1,4 +1,4 @@
import { _Single } from "../single";
import { _Single, Single } from "../single";
export interface _Editor extends _Single {
setErrorText(v: string): void;
@ -54,3 +54,56 @@ export interface _EditorStatic {
EVENT_REMOVE: string;
EVENT_EMPTY: string;
}
export declare class Editor extends Single {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CLICK: string;
static EVENT_KEY_DOWN: string;
static EVENT_SPACE: string;
static EVENT_BACKSPACE: string;
static EVENT_START: string;
static EVENT_PAUSE: string;
static EVENT_STOP: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_ENTER: string;
static EVENT_RESTRICT: string;
static EVENT_REMOVE: string;
static EVENT_EMPTY: string;
setErrorText(v: string): void;
getErrorText(): string;
setWaterMark(v: string): void;
disableError(): void;
enableError(): void;
disableWaterMark(): void;
enableWaterMark(): void;
focus(): void;
blur(): void;
selectAll(): void;
onKeyDown(keyCode: number): void;
getLastValidValue(): string;
getLastChangedValue(): string;
isEditing(): boolean;
isValid(): boolean;
}

5
typescript/base/single/label/icon.label.ts

@ -0,0 +1,5 @@
import { Single } from '../single';
export declare class IconLabel extends Single {
static xtype: string;
}

16
typescript/case/button/item.multiselect.ts

@ -1,4 +1,4 @@
import { _BasicButton } from "../../base/single/button/button.basic";
import { _BasicButton, BasicButton } from "../../base/single/button/button.basic";
export interface _MultiSelectItem extends _BasicButton {
doClick(...args: any[]): void;
@ -13,3 +13,17 @@ export interface _MultiSelectItem extends _BasicButton {
export interface _MultiSelectItemStatic {
EVENT_CHANGE: string;
}
export declare class MultiSelectItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
doClick(...args: any[]): void;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
setSelected(v: boolean): void;
}

10
typescript/case/combo/combo.textvalue.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { _Widget, Widget } from "../../core/widget";
export interface _TextValueCombo extends _Widget {
populate(items: any): void;
@ -7,3 +7,11 @@ export interface _TextValueCombo extends _Widget {
export interface _TextValueComboStatic {
EVENT_CHANGE: string;
}
export declare class TextValueCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
populate(items: any): void;
}

13
typescript/case/combo/iconcombo/combo.icon.ts

@ -0,0 +1,13 @@
import { Widget } from '../../../core/widget';
export declare class IconCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
showView(): void;
hideView(): void;
populate(items: any[]): void;
}

32
typescript/index.ts

@ -1,13 +1,13 @@
import { _Combo, _ComboStatic } from "./base/combination/combo";
import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from "./base/combination/group.button";
import { _Tab, _TabStatic } from "./base/combination/tab";
import { _Tab, _TabStatic, Tab } from "./base/combination/tab";
import { _Pane, _PaneStatic } from "./base/pane";
import { _BasicButton, _BasicButtonStatic, BasicButton } from "./base/single/button/button.basic";
import { _NodeButton } from "./base/single/button/button.node";
import { _Button, _ButtonStatic } from "./base/single/button/buttons/button";
import { _Button, _ButtonStatic, Button } from "./base/single/button/buttons/button";
import { TextButton, _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text";
import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listitem/icontextitem";
import { _Editor, _EditorStatic } from "./base/single/editor/editor";
import { _Editor, _EditorStatic, Editor } from "./base/single/editor/editor";
import { _Iframe } from "./base/single/iframe/iframe";
import { _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox";
import { _Input, _InputStatic } from "./base/single/input/input";
@ -17,9 +17,9 @@ import { _Single, Single } from "./base/single/single";
import { _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 } from "./case/button/item.multiselect";
import { _MultiSelectItem, _MultiSelectItemStatic, MultiSelectItem } from "./case/button/item.multiselect";
import { _BubbleCombo, _BubbleComboStatic } from "./case/combo/bubblecombo/combo.bubble";
import { _TextValueCombo, _TextValueComboStatic } from "./case/combo/combo.textvalue";
import { _TextValueCombo, _TextValueComboStatic, TextValueCombo } from "./case/combo/combo.textvalue";
import { _SearchTextValueCombo, _SearchTextValueComboStatic } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue";
import { _SignEditor, _SignEditorStatic } from "./case/editor/editor.sign";
import { _LoadingPane } from "./case/loading/loading_pane";
@ -53,6 +53,11 @@ import { HorizontalAutoLayout } from "./core/wrapper/layout/adapt/auto.horizonta
import { InlineVerticalAdaptLayout } from "./core/wrapper/layout/adapt/inline.vertical";
import { TableAdaptLayout } from "./core/wrapper/layout/adapt/adapt.table";
import { IconButton } from "./base/single/button/buttons/button.icon";
import { TextEditor } from "./widget/editor/editor.text";
import { IconLabel } from "./base/single/label/icon.label";
import { Popover, BarPopover } from "./base/layer/layer.popover";
import { IconCombo } from "./case/combo/iconcombo/combo.icon";
import { DynamicDateCombo } from "./widget/dynamicdate/dynamicdate.combo";
type ClassConstructor<T extends {}> = T & {
@ -118,6 +123,12 @@ export interface BI extends _func, _i18n, _base, _inject {
RightVerticalAdaptLayout: typeof RightVerticalAdaptLayout;
TableAdaptLayout: typeof TableAdaptLayout;
IconButton: typeof IconButton;
TextEditor: typeof TextEditor;
IconLabel: typeof IconLabel;
Popover: typeof Popover;
BarPopover: typeof BarPopover;
IconCombo: typeof IconCombo;
DynamicDateCombo: typeof DynamicDateCombo;
}
export default {
@ -140,4 +151,15 @@ export {
TextButton,
DownListCombo,
IconChangeButton,
Button,
TextEditor,
TextValueCombo,
Editor,
IconLabel,
Popover,
BarPopover,
Tab,
IconCombo,
DynamicDateCombo,
MultiSelectItem,
};

22
typescript/widget/dynamicdate/dynamicdate.combo.ts

@ -0,0 +1,22 @@
import { Single } from '../../base/single/single';
export declare class DynamicDateCombo extends Single {
static xtype: string;
static EVENT_KEY_DOWN: string;
static EVENT_CONFIRM: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CHANGE: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_BEFORE_POPUPVIEW: string;
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
getKey(): string;
hidePopupView(): void;
}

36
typescript/widget/editor/editor.text.ts

@ -0,0 +1,36 @@
import { Widget } from '../../core/widget';
export declare class TextEditor extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CLICK: string;
static EVENT_KEY_DOWN: string;
static EVENT_SPACE: string;
static EVENT_BACKSPACE: string;
static EVENT_START: string;
static EVENT_PAUSE: string;
static EVENT_STOP: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_ENTER: string;
static EVENT_RESTRICT: string;
static EVENT_REMOVE: string;
static EVENT_EMPTY: string;
setWaterMark(v: string): void;
focus(): void;
blur(): void;
setErrorText(v: string): void;
getErrorText(): string;
isValid(): boolean
}
Loading…
Cancel
Save