From cd1312cca126ec96417abc2da6bee88afa1f2ef6 Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 18 Dec 2020 11:35:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20fineui=E4=B8=AD=E9=9D=9E=E6=A0=87?= =?UTF-8?q?=E5=87=86=E5=86=99=E6=B3=95=E8=A1=A5=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../single/button/listitem/icontextitem.ts | 16 ++++++- typescript/base/single/input/input.ts | 45 ++++++++++++++++++- .../combo.searchtextvalue.ts | 14 +++++- .../allvalue.multitextvalue.combo.ts | 11 ++++- .../layout/adapt/adapt.leftvertical.ts | 10 ++++- typescript/index.ts | 15 ++++--- 6 files changed, 101 insertions(+), 10 deletions(-) diff --git a/typescript/base/single/button/listitem/icontextitem.ts b/typescript/base/single/button/listitem/icontextitem.ts index 80d7d40bd..49d7ab5ab 100644 --- a/typescript/base/single/button/listitem/icontextitem.ts +++ b/typescript/base/single/button/listitem/icontextitem.ts @@ -1,4 +1,4 @@ -import { _BasicButton } from "../button.basic"; +import { BasicButton, _BasicButton } from "../button.basic"; export interface _IconTextItem extends _BasicButton { doRedMark(...args: any[]): void; @@ -13,3 +13,17 @@ export interface _IconTextItem extends _BasicButton { export interface _IconTextItemStatic { EVENT_CHANGE: string; } + +export declare class IconTextItem 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; +} diff --git a/typescript/base/single/input/input.ts b/typescript/base/single/input/input.ts index 006f30064..5c501589d 100644 --- a/typescript/base/single/input/input.ts +++ b/typescript/base/single/input/input.ts @@ -1,4 +1,4 @@ -import { _Single } from "../single"; +import { Single, _Single } from "../single"; export interface _Input extends _Single { onClick(): void; @@ -43,3 +43,46 @@ export interface _InputStatic { EVENT_ENTER: string; EVENT_RESTRICT: string; } + +export declare class Input extends Single { + static xtype: string; + static EVENT_CHANGE: string; + static EVENT_FOCUS: string; + static EVENT_CLICK: string; + static EVENT_BLUR: string; + static EVENT_KEY_DOWN: string; + static EVENT_QUICK_DOWN: string; + static EVENT_SPACE: string; + static EVENT_BACKSPACE: string; + static EVENT_START: string; + static EVENT_PAUSE: string; + static EVENT_STOP: string; + static EVENT_CHANGE_CONFIRM: string; + static EVENT_CONFIRM: string; + static EVENT_REMOVE: string; + static EVENT_EMPTY: string; + static EVENT_VALID: string; + static EVENT_ERROR: string; + static EVENT_ENTER: string; + static EVENT_RESTRICT: string; + + onClick(): void; + + onKeyDown(keyCode: number): void; + + focus(): void; + + blur(): void; + + selectAll(): void; + + setValue(v: string): void; + + getValue(): string; + + isEditing(): boolean; + + getLastValidValue(): string; + + getLastChangedValue(): string; +} diff --git a/typescript/case/combo/searchtextvaluecombo/combo.searchtextvalue.ts b/typescript/case/combo/searchtextvaluecombo/combo.searchtextvalue.ts index c87eccbcd..15869d990 100644 --- a/typescript/case/combo/searchtextvaluecombo/combo.searchtextvalue.ts +++ b/typescript/case/combo/searchtextvaluecombo/combo.searchtextvalue.ts @@ -1,4 +1,4 @@ -import { _Widget } from "../../../core/widget"; +import { Widget, _Widget } from "../../../core/widget"; export interface _SearchTextValueCombo extends _Widget { populate(items: any[]): void; @@ -12,3 +12,15 @@ export interface _SearchTextValueComboStatic { EVENT_CHANGE: string; EVENT_BEFORE_POPUPVIEW: string; } + +export declare class SearchTextValueCombo extends Widget { + static xtype: string; + static EVENT_CHANGE: string; + static EVENT_BEFORE_POPUPVIEW: string; + + populate(items: any[]): void; + + setValue(v: any): void; + + getValue(): T[]; +} diff --git a/typescript/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.ts b/typescript/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.ts index 18d43e591..990ef0cd1 100644 --- a/typescript/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.ts +++ b/typescript/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.ts @@ -1,4 +1,4 @@ -import { _Widget } from "../../core/widget"; +import { Widget, _Widget } from "../../core/widget"; export interface _AllValueMultiTextValueCombo extends _Widget { getValue(): T[]; @@ -9,3 +9,12 @@ export interface _AllValueMultiTextValueCombo extends _Widget { export interface _AllValueMultiTextValueComboStatic { EVENT_CONFIRM: string; } + +export declare class AllValueMultiTextValueCombo extends Widget { + static xtype: string; + static EVENT_CONFIRM: string; + + getValue(): T[]; + + populate(items: any): void; +} diff --git a/typescript/core/wrapper/layout/adapt/adapt.leftvertical.ts b/typescript/core/wrapper/layout/adapt/adapt.leftvertical.ts index db19c9142..8a4108b47 100644 --- a/typescript/core/wrapper/layout/adapt/adapt.leftvertical.ts +++ b/typescript/core/wrapper/layout/adapt/adapt.leftvertical.ts @@ -1,7 +1,15 @@ -import { _Layout } from "../../layout"; +import { Layout, _Layout } from "../../layout"; export interface _LeftVerticalAdapt extends _Layout { resize(): void; populate(items?: T[]): void; } + +export declare class LeftVerticalAdaptLayout extends Layout { + static xtype: string; + + resize(): void; + + populate(items?: T[]): void; +} diff --git a/typescript/index.ts b/typescript/index.ts index 40b278f0c..ce98c983c 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -6,11 +6,11 @@ import { _BasicButton, _BasicButtonStatic, BasicButton } from "./base/single/but import { _NodeButton, NodeButton } from "./base/single/button/button.node"; 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 { IconTextItem, _IconTextItem, _IconTextItemStatic } from "./base/single/button/listitem/icontextitem"; import { _Editor, _EditorStatic, Editor } from "./base/single/editor/editor"; import { Iframe, _Iframe } from "./base/single/iframe/iframe"; import { _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox"; -import { _Input, _InputStatic } from "./base/single/input/input"; +import { Input, _Input, _InputStatic } from "./base/single/input/input"; import { _AbstractLabel, AbstractLabel } from "./base/single/label/abstract.label"; import { _Label, Label } from "./base/single/label/label"; import { _Single, Single } from "./base/single/single"; @@ -20,10 +20,10 @@ import { IconChangeButton, _IconChangeButton, _IconChangeButtonStatic } from "./ import { _MultiSelectItem, _MultiSelectItemStatic, MultiSelectItem } from "./case/button/item.multiselect"; 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 { SearchTextValueCombo, _SearchTextValueCombo, _SearchTextValueComboStatic } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue"; import { _SignEditor, _SignEditorStatic, SignEditor } from "./case/editor/editor.sign"; import { _LoadingPane } from "./case/loading/loading_pane"; -import { _AllValueMultiTextValueCombo, _AllValueMultiTextValueComboStatic } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo"; +import { AllValueMultiTextValueCombo, _AllValueMultiTextValueCombo, _AllValueMultiTextValueComboStatic } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo"; import { _AbstractTreeValueChooser, AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; import { _AbstractListTreeValueChooser, AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list"; import { _Action, _ActionFactory } from "./core/action/action"; @@ -46,7 +46,7 @@ import { VerticalLayout, _VerticalLayout } from "./core/wrapper/layout/layout.ve import { DefaultLayout, _DefaultLayout } from "./core/wrapper/layout/layout.default"; import { DownListCombo, _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist"; import { Icon } from "./base/single/icon/icon"; -import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical"; +import { LeftVerticalAdaptLayout, _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical"; import { LeftRightVerticalAdaptLayout, RightVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftrightvertical"; import { IconTextIconItem } from "./base/single/button/listitem/icontexticonitem"; import { HorizontalAutoLayout } from "./core/wrapper/layout/adapt/auto.horizontal"; @@ -253,7 +253,12 @@ export { Single, BasicButton, Icon, + LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, + SearchTextValueCombo, + Input, + IconTextItem, + AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout,