diff --git a/typescript/base/combination/group.button.ts b/typescript/base/combination/group.button.ts index 4eb186f38..20fa9656a 100644 --- a/typescript/base/combination/group.button.ts +++ b/typescript/base/combination/group.button.ts @@ -1,4 +1,4 @@ -import { _Widget } from "../../core/widget"; +import { _Widget, Widget } from "../../core/widget"; export interface _ButtonGroup extends _Widget { prependItems(items: T[]): void; @@ -45,3 +45,45 @@ export interface _ButtonGroupChooseType { export interface _ButtonGroupStatic { EVENT_CHANGE: string; } + +export declare class ButtonGroup extends Widget { + static xtype: string; + static CHOOSE_TYPE_SINGLE: number; + static CHOOSE_TYPE_MULTI: number; + static CHOOSE_TYPE_ALL: number; + static CHOOSE_TYPE_NONE: number; + static CHOOSE_TYPE_DEFAULT: number; + static EVENT_CHANGE: string; + + prependItems(items: T[]): void; + + addItems(items: T[]): void; + + removeItemAt(indexes: any): void; + + removeItems(values: any): void; + + populate(items?: any, ...args: any[]): void; + + setNotSelectedValue(v: any): void; + + getNotSelectedValue(): T[]; + + setEnabledValue(v: any): void; + + getAllButtons(): T[]; + + getAllLeaves(): T[]; + + getSelectedButtons(): T[]; + + getNotSelectedButtons(): T[]; + + getIndexByValue(value: any): number; + + getNodeById(id: any): any; + + getNodeByValue(value: any): any; + + getValue(): T[]; +} diff --git a/typescript/base/combination/tree.button.ts b/typescript/base/combination/tree.button.ts new file mode 100644 index 000000000..382dcd5d3 --- /dev/null +++ b/typescript/base/combination/tree.button.ts @@ -0,0 +1,6 @@ +import { ButtonGroup } from './group.button'; + +export declare class ButtonTree extends ButtonGroup { + static xtype: string; + static EVENT_CHANGE: string; +} diff --git a/typescript/base/single/button/button.node.ts b/typescript/base/single/button/button.node.ts index f8a09ea65..b783a7c9f 100644 --- a/typescript/base/single/button/button.node.ts +++ b/typescript/base/single/button/button.node.ts @@ -1,4 +1,4 @@ -import { _BasicButton } from "./button.basic"; +import { _BasicButton, BasicButton } from "./button.basic"; export interface _NodeButton extends _BasicButton { isOpened(): void; @@ -9,3 +9,13 @@ export interface _NodeButton extends _BasicButton { triggerExpand(): void; } + +export declare class NodeButton extends BasicButton { + isOpened(): boolean; + + setOpened(b: boolean): void; + + triggerCollapse(): void; + + triggerExpand(): void; +} diff --git a/typescript/base/tree/customtree.ts b/typescript/base/tree/customtree.ts new file mode 100644 index 000000000..91f3a3482 --- /dev/null +++ b/typescript/base/tree/customtree.ts @@ -0,0 +1,22 @@ +import { Widget } from '../../core/widget'; + +export declare class CustomTree extends Widget { + static xtype: string; + static EVENT_CHANGE: string; + + initTree(nodes: any, ...args: any[]): void; + + stroke(...args: any[]): void; + + populate(nodes: any, ...args: any[]): void; + + getAllButtons(): T[]; + + getAllLeaves(): T[]; + + getNodeById(id: any): any; + + getNodeByValue(value: any): any; + + getValue(): T[]; +} diff --git a/typescript/case/button/node/node.icon.arrow.ts b/typescript/case/button/node/node.icon.arrow.ts new file mode 100644 index 000000000..23e0a44c6 --- /dev/null +++ b/typescript/case/button/node/node.icon.arrow.ts @@ -0,0 +1,9 @@ +import { NodeButton } from '../../../base/single/button/button.node'; + +export declare class IconArrowNode extends NodeButton { + static xtype: string; + + doRedMark(...args: any[]): void; + + unRedMark(...args: any[]): void; +} diff --git a/typescript/case/button/treeitem/item.first.treeleaf.ts b/typescript/case/button/treeitem/item.first.treeleaf.ts new file mode 100644 index 000000000..595121b04 --- /dev/null +++ b/typescript/case/button/treeitem/item.first.treeleaf.ts @@ -0,0 +1,17 @@ +import { BasicButton } from '../../../base/single/button/button.basic'; + +export declare class FirstTreeLeafItem extends BasicButton { + static xtype: string; + + doRedMark(...args: any[]): void; + + unRedMark(...args: any[]): void; + + doHighLight(...args: any[]): void; + + unHighLight(...args: any[]): void; + + getId(): string; + + getPId(): string; +} diff --git a/typescript/case/button/treeitem/item.last.treeleaf.ts b/typescript/case/button/treeitem/item.last.treeleaf.ts new file mode 100644 index 000000000..947950e8b --- /dev/null +++ b/typescript/case/button/treeitem/item.last.treeleaf.ts @@ -0,0 +1,17 @@ +import { BasicButton } from '../../../base/single/button/button.basic'; + +export declare class LastTreeLeafItem extends BasicButton { + static xtype: string; + + doRedMark(...args: any[]): void; + + unRedMark(...args: any[]): void; + + doHighLight(...args: any[]): void; + + unHighLight(...args: any[]): void; + + getId(): string; + + getPId(): string; +} diff --git a/typescript/case/button/treeitem/item.mid.treeleaf.ts b/typescript/case/button/treeitem/item.mid.treeleaf.ts new file mode 100644 index 000000000..e6b35984b --- /dev/null +++ b/typescript/case/button/treeitem/item.mid.treeleaf.ts @@ -0,0 +1,17 @@ +import { BasicButton } from '../../../base/single/button/button.basic'; + +export declare class MidTreeLeafItem extends BasicButton { + static xtype: string; + + doRedMark(...args: any[]): void; + + unRedMark(...args: any[]): void; + + doHighLight(...args: any[]): void; + + unHighLight(...args: any[]): void; + + getId(): string; + + getPId(): string; +} diff --git a/typescript/index.ts b/typescript/index.ts index 3a9a66987..4c52c5f8b 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -1,5 +1,5 @@ import { _Combo, _ComboStatic } from "./base/combination/combo"; -import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from "./base/combination/group.button"; +import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic, ButtonGroup } from "./base/combination/group.button"; import { _Tab, _TabStatic, Tab } from "./base/combination/tab"; import { _Pane, _PaneStatic } from "./base/pane"; import { _BasicButton, _BasicButtonStatic, BasicButton } from "./base/single/button/button.basic"; @@ -58,6 +58,12 @@ 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"; +import { CustomTree } from "./base/tree/customtree"; +import { ButtonTree } from "./base/combination/tree.button"; +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"; type ClassConstructor = T & { @@ -129,6 +135,12 @@ export interface BI extends _func, _i18n, _base, _inject { BarPopover: typeof BarPopover; IconCombo: typeof IconCombo; DynamicDateCombo: typeof DynamicDateCombo; + CustomTree: typeof CustomTree; + ButtonTree: typeof ButtonTree; + IconArrowNode: typeof IconArrowNode; + MidTreeLeafItem: typeof MidTreeLeafItem; + FirstTreeLeafItem: typeof FirstTreeLeafItem; + LastTreeLeafItem: typeof LastTreeLeafItem; } export default { @@ -162,4 +174,11 @@ export { IconCombo, DynamicDateCombo, MultiSelectItem, + CustomTree, + ButtonGroup, + ButtonTree, + IconArrowNode, + MidTreeLeafItem, + FirstTreeLeafItem, + LastTreeLeafItem, };