From c8ab6bda5aab515474c2c4a54e5d0675418998e1 Mon Sep 17 00:00:00 2001 From: Kira Date: Fri, 18 Dec 2020 18:33:11 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-6533=20refactor:=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/index.ts | 18 +++++++++++++ .../widget/intervalslider/intervalslider.ts | 22 +++++++++++++++ .../multiselectlist/multiselectlist.insert.ts | 12 +++++++++ .../widget/numberinterval/numberinterval.ts | 27 +++++++++++++++++++ typescript/widget/year/combo.year.ts | 7 +++++ .../yearmonthinterval/yearmonthinterval.ts | 14 ++++++++++ .../widget/yearquarter/combo.yearquarter.ts | 7 +++++ 7 files changed, 107 insertions(+) create mode 100644 typescript/widget/intervalslider/intervalslider.ts create mode 100644 typescript/widget/multiselectlist/multiselectlist.insert.ts create mode 100644 typescript/widget/numberinterval/numberinterval.ts create mode 100644 typescript/widget/year/combo.year.ts create mode 100644 typescript/widget/yearmonthinterval/yearmonthinterval.ts create mode 100644 typescript/widget/yearquarter/combo.yearquarter.ts diff --git a/typescript/index.ts b/typescript/index.ts index 07cb902faf..9778a2b6fb 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -126,6 +126,12 @@ import { AllCountPager } from "./case/pager/pager.all.count"; import { PopupView } from "./base/layer/layer.popup"; import { BubblePopupView, BubblePopupBarView, TextBubblePopupBarView } from "./case/combo/bubblecombo/popup.bubble"; import { ArrowTreeGroupNodeCheckbox } from "./case/checkbox/check.arrownode"; +import { NumberInterval } from "./widget/numberinterval/numberinterval"; +import { DynamicYearQuarterCombo } from "./widget/yearquarter/combo.yearquarter"; +import { DynamicYearCombo } from "./widget/year/combo.year"; +import { IntervalSlider } from "./widget/intervalslider/intervalslider"; +import { MultiSelectInsertList } from "./widget/multiselectlist/multiselectlist.insert"; +import { YearMonthInterval } from "./widget/yearmonthinterval/yearmonthinterval"; type ClassConstructor = T & { @@ -267,6 +273,12 @@ export interface BI extends _func, _i18n, _base, _inject { BubblePopupBarView: typeof BubblePopupBarView; TextBubblePopupBarView: typeof TextBubblePopupBarView; ArrowTreeGroupNodeCheckbox: typeof ArrowTreeGroupNodeCheckbox; + NumberInterval: typeof NumberInterval; + DynamicYearQuarterCombo: typeof DynamicYearQuarterCombo; + DynamicYearCombo: typeof DynamicYearCombo; + IntervalSlider: typeof IntervalSlider; + MultiSelectInsertList: typeof MultiSelectInsertList; + YearMonthInterval: typeof YearMonthInterval; } export default { @@ -402,4 +414,10 @@ export { BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, + NumberInterval, + DynamicYearQuarterCombo, + DynamicYearCombo, + IntervalSlider, + MultiSelectInsertList, + YearMonthInterval, }; diff --git a/typescript/widget/intervalslider/intervalslider.ts b/typescript/widget/intervalslider/intervalslider.ts new file mode 100644 index 0000000000..e16b9a2151 --- /dev/null +++ b/typescript/widget/intervalslider/intervalslider.ts @@ -0,0 +1,22 @@ +import { Single } from '../../base/single/single'; + +export declare class IntervalSlider extends Single { + static xtype: string; + static EVENT_CHANGE: string; + + max: number; + + min: number; + + getValue(): { + min: number; + max: number; + } + + setMinAndMax(v: { + min: number; + max: number; + }): void; + + reset(): void +} diff --git a/typescript/widget/multiselectlist/multiselectlist.insert.ts b/typescript/widget/multiselectlist/multiselectlist.insert.ts new file mode 100644 index 0000000000..d37a335354 --- /dev/null +++ b/typescript/widget/multiselectlist/multiselectlist.insert.ts @@ -0,0 +1,12 @@ +import { Single } from '../../base/single/single'; + +export declare class MultiSelectInsertList extends Single { + static xtype: string; + static REQ_GET_DATA_LENGTH: 1; + static REQ_GET_ALL_DATA: -1; + static EVENT_CHANGE: string; + + isAllSelected(): boolean; + + resize(): void; +} diff --git a/typescript/widget/numberinterval/numberinterval.ts b/typescript/widget/numberinterval/numberinterval.ts new file mode 100644 index 0000000000..3752266216 --- /dev/null +++ b/typescript/widget/numberinterval/numberinterval.ts @@ -0,0 +1,27 @@ +import { Single } from '../../base/single/single'; + +export declare class NumberInterval extends Single { + static xtype: string; + static EVENT_CHANGE: string; + static EVENT_CONFIRM: string; + static EVENT_VALID: string; + static EVENT_ERROR: string; + + isStateValid(): boolean; + + setMinEnable(v: boolean): void; + + setCloseMinEnable(v: boolean): void; + + setMaxEnable(v: boolean): void; + + setCloseMaxEnable(v: boolean): void; + + showNumTip(): void; + + hideNumTip(): void; + + setNumTip(v: string): void; + + getNumTip(): void; +} diff --git a/typescript/widget/year/combo.year.ts b/typescript/widget/year/combo.year.ts new file mode 100644 index 0000000000..32afe0aad2 --- /dev/null +++ b/typescript/widget/year/combo.year.ts @@ -0,0 +1,7 @@ +import { Widget } from "../../core/widget"; + +export declare class DynamicYearCombo extends Widget { + static xtype: string; + static EVENT_CONFIRM: string; + static EVENT_BEFORE_POPUPVIEW: string; +} diff --git a/typescript/widget/yearmonthinterval/yearmonthinterval.ts b/typescript/widget/yearmonthinterval/yearmonthinterval.ts new file mode 100644 index 0000000000..57a0c2d9e2 --- /dev/null +++ b/typescript/widget/yearmonthinterval/yearmonthinterval.ts @@ -0,0 +1,14 @@ +import { Single } from '../../base/single/single'; + +export declare class YearMonthInterval extends Single { + static xtype: string; + static EVENT_VALID: string; + static EVENT_ERROR: string; + static EVENT_CHANGE: string; + static EVENT_BEFORE_POPUPVIEW: string; + + getValue(): { + start: number; + end: number; + }; +} diff --git a/typescript/widget/yearquarter/combo.yearquarter.ts b/typescript/widget/yearquarter/combo.yearquarter.ts new file mode 100644 index 0000000000..b735dbc100 --- /dev/null +++ b/typescript/widget/yearquarter/combo.yearquarter.ts @@ -0,0 +1,7 @@ +import { Widget } from "../../core/widget"; + +export declare class DynamicYearQuarterCombo extends Widget { + static xtype: string; + static EVENT_CONFIRM: string; + static EVENT_BEFORE_POPUPVIEW: string; +}