From ed121654277b2b2aee7a0e20d5fa8fe61dba64b3 Mon Sep 17 00:00:00 2001 From: youki Date: Mon, 14 Dec 2020 11:26:05 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-6465=20refactor:=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/combination/tab.ts | 20 ++++++- typescript/base/layer/layer.popover.ts | 22 ++++++++ .../base/single/button/buttons/button.ts | 16 +++++- typescript/base/single/editor/editor.ts | 55 ++++++++++++++++++- typescript/base/single/label/icon.label.ts | 5 ++ typescript/case/button/item.multiselect.ts | 16 +++++- typescript/case/combo/combo.textvalue.ts | 10 +++- typescript/case/combo/iconcombo/combo.icon.ts | 13 +++++ typescript/index.ts | 32 +++++++++-- .../widget/dynamicdate/dynamicdate.combo.ts | 22 ++++++++ typescript/widget/editor/editor.text.ts | 36 ++++++++++++ 11 files changed, 237 insertions(+), 10 deletions(-) create mode 100644 typescript/base/layer/layer.popover.ts create mode 100644 typescript/base/single/label/icon.label.ts create mode 100644 typescript/case/combo/iconcombo/combo.icon.ts create mode 100644 typescript/widget/dynamicdate/dynamicdate.combo.ts create mode 100644 typescript/widget/editor/editor.text.ts diff --git a/typescript/base/combination/tab.ts b/typescript/base/combination/tab.ts index cf3f04203..fdef5c485 100644 --- a/typescript/base/combination/tab.ts +++ b/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; +} diff --git a/typescript/base/layer/layer.popover.ts b/typescript/base/layer/layer.popover.ts new file mode 100644 index 000000000..8f65d2df3 --- /dev/null +++ b/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; +} diff --git a/typescript/base/single/button/buttons/button.ts b/typescript/base/single/button/buttons/button.ts index 2d4e171f0..a17f6ed73 100644 --- a/typescript/base/single/button/buttons/button.ts +++ b/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; +} \ No newline at end of file diff --git a/typescript/base/single/editor/editor.ts b/typescript/base/single/editor/editor.ts index 47506acc1..bd212eeaa 100644 --- a/typescript/base/single/editor/editor.ts +++ b/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; +} diff --git a/typescript/base/single/label/icon.label.ts b/typescript/base/single/label/icon.label.ts new file mode 100644 index 000000000..539c03b2a --- /dev/null +++ b/typescript/base/single/label/icon.label.ts @@ -0,0 +1,5 @@ +import { Single } from '../single'; + +export declare class IconLabel extends Single { + static xtype: string; +} diff --git a/typescript/case/button/item.multiselect.ts b/typescript/case/button/item.multiselect.ts index 8f342dd2e..99210a278 100644 --- a/typescript/case/button/item.multiselect.ts +++ b/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; +} diff --git a/typescript/case/combo/combo.textvalue.ts b/typescript/case/combo/combo.textvalue.ts index 4b933a682..e31cc0875 100644 --- a/typescript/case/combo/combo.textvalue.ts +++ b/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; +} diff --git a/typescript/case/combo/iconcombo/combo.icon.ts b/typescript/case/combo/iconcombo/combo.icon.ts new file mode 100644 index 000000000..097f50971 --- /dev/null +++ b/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; +} diff --git a/typescript/index.ts b/typescript/index.ts index 9b66c143b..3a9a66987 100644 --- a/typescript/index.ts +++ b/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 & { @@ -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, }; diff --git a/typescript/widget/dynamicdate/dynamicdate.combo.ts b/typescript/widget/dynamicdate/dynamicdate.combo.ts new file mode 100644 index 000000000..0fc1f6462 --- /dev/null +++ b/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; +} diff --git a/typescript/widget/editor/editor.text.ts b/typescript/widget/editor/editor.text.ts new file mode 100644 index 000000000..84ea3c97f --- /dev/null +++ b/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 +}