From b436d675765ebf91a8c2ce53ae52fb9ae4c49888 Mon Sep 17 00:00:00 2001 From: alan Date: Fri, 18 Dec 2020 11:38:08 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-6537=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 --- typescript/base/single/input/checkbox.ts | 9 +++++- typescript/base/single/trigger/trigger.ts | 12 ++++++-- typescript/case/loading/loading_pane.ts | 6 +++- typescript/core/action/action.show.ts | 7 +++-- typescript/core/action/action.ts | 14 +++++++-- .../core/behavior/behavior.highlight.ts | 8 +++-- typescript/core/behavior/behavior.redmark.ts | 8 +++-- typescript/core/behavior/behavior.ts | 12 ++++++-- typescript/index.ts | 29 +++++++++++++------ 9 files changed, 82 insertions(+), 23 deletions(-) diff --git a/typescript/base/single/input/checkbox.ts b/typescript/base/single/input/checkbox.ts index b1a367b8b..6f8e0c081 100644 --- a/typescript/base/single/input/checkbox.ts +++ b/typescript/base/single/input/checkbox.ts @@ -1,4 +1,4 @@ -import { _BasicButton } from "../button/button.basic"; +import { BasicButton, _BasicButton } from "../button/button.basic"; export interface _Checkbox extends _BasicButton { _setEnable(enable: boolean): void; @@ -7,3 +7,10 @@ export interface _Checkbox extends _BasicButton { export interface _CheckboxStatic { EVENT_CHANGE: string; } + +export declare class Checkbox extends BasicButton { + static xtype: string; + static EVENT_CHANGE: string; + + _setEnable(enable: boolean): void; +} diff --git a/typescript/base/single/trigger/trigger.ts b/typescript/base/single/trigger/trigger.ts index 48f2a055a..e27b63874 100644 --- a/typescript/base/single/trigger/trigger.ts +++ b/typescript/base/single/trigger/trigger.ts @@ -1,7 +1,15 @@ -import { _Single } from "../single"; +import { Single, _Single } from "../single"; export interface _Trigger extends _Single { setKey(..._args: any[]): void; getKey(): string; -} \ No newline at end of file +} + +export declare class Trigger extends Single { + static xtype: string; + + setKey(..._args: any[]): void; + + getKey(): string; +} diff --git a/typescript/case/loading/loading_pane.ts b/typescript/case/loading/loading_pane.ts index 35c0d3aa5..773df51f9 100644 --- a/typescript/case/loading/loading_pane.ts +++ b/typescript/case/loading/loading_pane.ts @@ -1,5 +1,9 @@ -import { _Pane } from "../../base/pane"; +import { _Pane, Pane } from "../../base/pane"; export interface _LoadingPane extends _Pane { __loaded: (...args: any[]) => void; } + +export declare class LoadingPane extends Pane { + __loaded: (...args: any[]) => void; +} diff --git a/typescript/core/action/action.show.ts b/typescript/core/action/action.show.ts index b14456a8e..847ce9754 100644 --- a/typescript/core/action/action.show.ts +++ b/typescript/core/action/action.show.ts @@ -1,5 +1,8 @@ -import { _Action } from "./action"; +import { _Action, Action } from "./action"; export interface _ShowAction extends _Action { -} \ No newline at end of file +} +export declare class ShowAction extends Action { + +} diff --git a/typescript/core/action/action.ts b/typescript/core/action/action.ts index a7b298982..b1f1a99c3 100644 --- a/typescript/core/action/action.ts +++ b/typescript/core/action/action.ts @@ -1,4 +1,4 @@ -import { _OB } from "../ob"; +import { _OB, OB } from "../ob"; export interface _Action extends _OB { actionPerformed(src: any, tar: any, callback: Function): void; @@ -8,4 +8,14 @@ export interface _Action extends _OB { export interface _ActionFactory { createAction(key: string, options: any): _Action; -} \ No newline at end of file +} + +export declare class Action extends OB { + actionPerformed(src: any, tar: any, callback: Function): void; + + actionBack(tar: any, src: any, callback: Function): void; +} + +export declare class ActionFactory { + createAction(key: string, options: any): Action; +} diff --git a/typescript/core/behavior/behavior.highlight.ts b/typescript/core/behavior/behavior.highlight.ts index 6f9f32899..d3a947e32 100644 --- a/typescript/core/behavior/behavior.highlight.ts +++ b/typescript/core/behavior/behavior.highlight.ts @@ -1,4 +1,8 @@ -import { _Behavior } from "./behavior"; +import { _Behavior, Behavior } from "./behavior"; export interface _HighlightBehavior extends _Behavior { -} \ No newline at end of file +} + +export declare class HighlightBehavior extends Behavior { + +} diff --git a/typescript/core/behavior/behavior.redmark.ts b/typescript/core/behavior/behavior.redmark.ts index 2bdc3f955..985d3b1f8 100644 --- a/typescript/core/behavior/behavior.redmark.ts +++ b/typescript/core/behavior/behavior.redmark.ts @@ -1,4 +1,8 @@ -import { _Behavior } from "./behavior"; +import { _Behavior, Behavior } from "./behavior"; export interface _RedMarkBehavior extends _Behavior { -} \ No newline at end of file +} + +export declare class RedMarkBehavior extends Behavior { + +} diff --git a/typescript/core/behavior/behavior.ts b/typescript/core/behavior/behavior.ts index 9af876f03..795698edd 100644 --- a/typescript/core/behavior/behavior.ts +++ b/typescript/core/behavior/behavior.ts @@ -1,4 +1,4 @@ -import { _OB } from "../ob"; +import { _OB, OB } from "../ob"; export interface _Behavior extends _OB { doBehavior(items: any[]): void; @@ -6,4 +6,12 @@ export interface _Behavior extends _OB { export interface _BehaviorFactory { createBehavior(key: string, options: any): _Behavior; -} \ No newline at end of file +} + +export declare class Behavior extends OB { + doBehavior(items: any[]): void; +} + +export declare class BehaviorFactory { + createBehavior(key: string, options: any): Behavior; +} diff --git a/typescript/index.ts b/typescript/index.ts index 40b278f0c..4333fca9a 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -9,34 +9,34 @@ import { TextButton, _TextButton, _TextButtonStatic } from "./base/single/button import { _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 { Checkbox, _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox"; import { _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"; import { _Text, Text } from "./base/single/text"; -import { _Trigger } from "./base/single/trigger/trigger"; +import { Trigger, _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, _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"; -import { _LoadingPane } from "./case/loading/loading_pane"; +import { LoadingPane, _LoadingPane } from "./case/loading/loading_pane"; import { _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"; -import { _ShowAction } from "./core/action/action.show"; +import { Action, ActionFactory, _Action, _ActionFactory } from "./core/action/action"; +import { ShowAction, _ShowAction } from "./core/action/action.show"; import { _base } from "./core/base"; -import { _Behavior, _BehaviorFactory } from "./core/behavior/behavior"; -import { _HighlightBehavior } from "./core/behavior/behavior.highlight"; -import { _RedMarkBehavior } from "./core/behavior/behavior.redmark"; +import { Behavior, BehaviorFactory, _Behavior, _BehaviorFactory } from "./core/behavior/behavior"; +import { HighlightBehavior, _HighlightBehavior } from "./core/behavior/behavior.highlight"; +import { RedMarkBehavior, _RedMarkBehavior } from "./core/behavior/behavior.redmark"; import * as decorator from "./core/decorator/decorator"; import { _func } from "./core/func"; import { _i18n } from "./core/i18n"; import { _Plugin } from "./core/plugin"; -import { _OB } from "./core/ob"; +import { OB, _OB } from "./core/ob"; import { _Widget, _WidgetStatic, Widget } from "./core/widget"; import { _inject } from "./core/inject"; import { Layout, _Layout } from "./core/wrapper/layout"; @@ -249,9 +249,11 @@ export default { Decorators: decorator, }; export { + OB, Widget, Single, BasicButton, + Checkbox, Icon, LeftRightVerticalAdaptLayout, IconTextIconItem, @@ -271,7 +273,16 @@ export { VTapeLayout, VerticalAdaptLayout, IconButton, + Trigger, TriggerIconButton, + Action, + ActionFactory, + ShowAction, + Behavior, + BehaviorFactory, + RedMarkBehavior, + HighlightBehavior, + LoadingPane, Searcher, AbstractLabel, Label,