From e34e51b5a1b81a430f406f1d1bb7814098a7df38 Mon Sep 17 00:00:00 2001 From: alan Date: Mon, 14 Dec 2020 16:57:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?KERNEL-6431=20=E8=A1=A5=E5=85=85=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/index.ts | 6 ++++++ typescript/widget/editor/editor.multifile.ts | 20 +++++++++++++++++++ typescript/widget/editor/editor.text.small.ts | 5 +++++ 3 files changed, 31 insertions(+) create mode 100644 typescript/widget/editor/editor.multifile.ts create mode 100644 typescript/widget/editor/editor.text.small.ts diff --git a/typescript/index.ts b/typescript/index.ts index 7f3f6bf2a..cd5c148dd 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -64,6 +64,8 @@ import { IconArrowNode } from "./case/button/node/node.icon.arrow"; import { MidTreeLeafItem } from "./case/button/treeitem/item.mid.treeleaf"; import { FirstTreeLeafItem } from "./case/button/treeitem/item.first.treeleaf"; import { LastTreeLeafItem } from "./case/button/treeitem/item.last.treeleaf"; +import { SmallTextEditor } from "./widget/editor/editor.text.small"; +import { MultifileEditor } from "./widget/editor/editor.multifile"; type ClassConstructor = T & { @@ -141,6 +143,8 @@ export interface BI extends _func, _i18n, _base, _inject { MidTreeLeafItem: typeof MidTreeLeafItem; FirstTreeLeafItem: typeof FirstTreeLeafItem; LastTreeLeafItem: typeof LastTreeLeafItem; + SmallTextEditor: typeof SmallTextEditor; + MultifileEditor: typeof MultifileEditor; } export default { @@ -182,4 +186,6 @@ export { MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, + SmallTextEditor, + MultifileEditor, }; diff --git a/typescript/widget/editor/editor.multifile.ts b/typescript/widget/editor/editor.multifile.ts new file mode 100644 index 000000000..4854d9820 --- /dev/null +++ b/typescript/widget/editor/editor.multifile.ts @@ -0,0 +1,20 @@ +import { Widget } from "../../core/widget"; + +export declare class MultifileEditor extends Widget { + static xtype: string; + static EVENT_CHANGE: string; + static EVENT_UPLOADSTART: string; + static EVENT_ERROR: string; + static EVENT_PROGRESS: string; + static EVENT_UPLOADED: string; + + _reset(): void; + select(): void; + getValue(): { + attach_id: string; + attach_type: string; + filename: string; + }[]; + upload(): void; + reset(): void; +} diff --git a/typescript/widget/editor/editor.text.small.ts b/typescript/widget/editor/editor.text.small.ts new file mode 100644 index 000000000..cf3a10b24 --- /dev/null +++ b/typescript/widget/editor/editor.text.small.ts @@ -0,0 +1,5 @@ +import { TextEditor } from "./editor.text"; + +export declare class SmallTextEditor extends TextEditor { + static xtype: string; +} From 68058234acacd3393c1ac13fc05545e6560b79c9 Mon Sep 17 00:00:00 2001 From: alan Date: Tue, 15 Dec 2020 10:20:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?KERNEL-6431=20=E8=A1=A5=E5=85=85=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/case/editor/editor.sign.ts | 53 +++++++++++++++- .../wrapper/layout/adapt/inline.vertical.ts | 2 +- typescript/index.ts | 9 ++- typescript/widget/editor/editor.multifile.ts | 4 ++ .../widget/multiselect/multiselect.combo.ts | 57 ++++++++++++++++++ .../multiselect/multiselect.insert.combo.ts | 60 +++++++++++++++++++ 6 files changed, 182 insertions(+), 3 deletions(-) create mode 100644 typescript/widget/multiselect/multiselect.combo.ts create mode 100644 typescript/widget/multiselect/multiselect.insert.combo.ts diff --git a/typescript/case/editor/editor.sign.ts b/typescript/case/editor/editor.sign.ts index 906941933..2cb13d3de 100644 --- a/typescript/case/editor/editor.sign.ts +++ b/typescript/case/editor/editor.sign.ts @@ -1,4 +1,4 @@ -import { _Widget } from "../../core/widget"; +import { Widget, _Widget } from "../../core/widget"; export interface _SignEditor extends _Widget { setTitle(v: string | Function): void; @@ -53,3 +53,54 @@ export interface _SignEditorStatic { EVENT_SPACE: string; EVENT_EMPTY: string; } + +export declare class SignEditor extends Widget { + static xtype: string; + static EVENT_FOCUS: string; + static EVENT_BLUR: string; + static EVENT_CHANGE: string; + static EVENT_CLICK: string; + static EVENT_KEY_DOWN: string; + static EVENT_CLICK_LABEL: 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_SPACE: string; + static EVENT_EMPTY: string; + + setTitle(v: string | Function): void; + + setWarningTitle(v: string | Function): void; + + setWaterMark(v: string): void; + + focus(): void; + + blur(): void; + + doRedMark(...args: any[]): void; + + unRedMark(...args: any[]): void; + + doHighLight(...args: any[]): void; + + unHighLight(...args: any[]): void; + + setErrorText(v: string): void; + + getErrorText(): string; + + isEditing(): boolean; + + getLastChangedValue(): string; + + getState(): any; + + setState(...args: any[]): void; +} diff --git a/typescript/core/wrapper/layout/adapt/inline.vertical.ts b/typescript/core/wrapper/layout/adapt/inline.vertical.ts index 464ad5b4c..2f3fc9a00 100644 --- a/typescript/core/wrapper/layout/adapt/inline.vertical.ts +++ b/typescript/core/wrapper/layout/adapt/inline.vertical.ts @@ -2,4 +2,4 @@ import { Layout } from "../../layout"; export declare class InlineVerticalAdaptLayout extends Layout { static xtype: string; -} \ No newline at end of file +} diff --git a/typescript/index.ts b/typescript/index.ts index a583d06e7..752bf71a3 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -21,7 +21,7 @@ import { _MultiSelectItem, _MultiSelectItemStatic, MultiSelectItem } from "./cas import { _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 } from "./case/editor/editor.sign"; +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 { _AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; @@ -71,6 +71,8 @@ import { HorizontalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.horizon import { FloatLeftLayout } from "./core/wrapper/layout/layout.flow"; import { CenterAdaptLayout } from "./core/wrapper/layout/adapt/adapt.center"; import { VerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.vertical"; +import { MultiSelectInsertCombo } from "./widget/multiselect/multiselect.insert.combo"; +import { MultiSelectCombo } from "./widget/multiselect/multiselect.combo"; type ClassConstructor = T & { @@ -155,6 +157,8 @@ export interface BI extends _func, _i18n, _base, _inject { LastTreeLeafItem: typeof LastTreeLeafItem; SmallTextEditor: typeof SmallTextEditor; MultifileEditor: typeof MultifileEditor; + MultiSelectInsertCombo: typeof MultiSelectInsertCombo; + MultiSelectCombo: typeof MultiSelectCombo; } export default { @@ -209,4 +213,7 @@ export { LastTreeLeafItem, SmallTextEditor, MultifileEditor, + SignEditor, + MultiSelectInsertCombo, + MultiSelectCombo, }; diff --git a/typescript/widget/editor/editor.multifile.ts b/typescript/widget/editor/editor.multifile.ts index 4854d9820..f55abaf81 100644 --- a/typescript/widget/editor/editor.multifile.ts +++ b/typescript/widget/editor/editor.multifile.ts @@ -9,12 +9,16 @@ export declare class MultifileEditor extends Widget { static EVENT_UPLOADED: string; _reset(): void; + select(): void; + getValue(): { attach_id: string; attach_type: string; filename: string; }[]; + upload(): void; + reset(): void; } diff --git a/typescript/widget/multiselect/multiselect.combo.ts b/typescript/widget/multiselect/multiselect.combo.ts new file mode 100644 index 000000000..a1de3ad67 --- /dev/null +++ b/typescript/widget/multiselect/multiselect.combo.ts @@ -0,0 +1,57 @@ +import { Single } from "../../base/single/single"; + +export declare class MultiSelectCombo extends Single { + static xtype: string; + static EVENT_BLUR: string; + static EVENT_FOCUS: string; + static EVENT_STOP: string; + static EVENT_SEARCHING: string; + static EVENT_CLICK_ITEM: string; + static EVENT_CONFIRM: string; + static REQ_GET_DATA_LENGTH: 1; + static REQ_GET_ALL_DATA: -1; + + _itemsCreator4Trigger(op: any, callback: Function): void; + + _stopEditing(): void; + + _defaultState(): void; + + _assertValue(): void; + + _makeMap(): Obj; + + _joinKeywords(keywords: string[], callback: Function): void; + + _joinAll(res: { + type: string; + value: string[]; + assist: string[]; + }, callback: Function): void; + + _adjust(callback: Function): void; + + _join(): void; + + _setStartValue(value: string): void; + + _populate(...args: any[]): void; + + showView(): void; + + hideView(): void; + + setValue(value: { + type: string; + value: string[]; + assist: string[]; + }[]): void; + + getValue(): { + type: string; + value: string[]; + assist: string[]; + }[]; + + populate(...args: any[]): void; +} diff --git a/typescript/widget/multiselect/multiselect.insert.combo.ts b/typescript/widget/multiselect/multiselect.insert.combo.ts new file mode 100644 index 000000000..868b4c735 --- /dev/null +++ b/typescript/widget/multiselect/multiselect.insert.combo.ts @@ -0,0 +1,60 @@ +import { Single } from "../../base/single/single"; + +export declare class MultiSelectInsertCombo extends Single { + static xtype: string; + static EVENT_FOCUS: string; + static EVENT_BLUR: string; + static EVENT_STOP: string; + static EVENT_SEARCHING: string; + static EVENT_CLICK_ITEM: string; + static EVENT_CONFIRM: string; + static EVENT_ADD_ITEM: string; + static REQ_GET_DATA_LENGTH: 1; + static REQ_GET_ALL_DATA: -1; + + _itemsCreator4Trigger(op: any, callback: Function): void; + + _addItem(assertShowValue: () => void, matched: boolean): void; + + _stopEditing(): void; + + _defaultState(): void; + + _assertValue(): void; + + _makeMap(): Obj; + + _joinKeywords(keywords: string[], callback: Function): void; + + _joinAll(res: { + type: string; + value: string[]; + assist: string[]; + }, callback: Function): void; + + _adjust(callback: Function): void; + + _join(): void; + + _setStartValue(value: string): void; + + _populate(...args: any[]): void; + + showView(): void; + + hideView(): void; + + setValue(value: { + type: string; + value: string[]; + assist: string[]; + }[]): void; + + getValue(): { + type: string; + value: string[]; + assist: string[]; + }[]; + + populate(...args: any[]): void; +}