import * as _angular_core from '@angular/core'; import { OnInit, TemplateRef, DoCheck, Signal } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from 'ngx-tethys/button'; import * as i3 from '@angular/cdk/drag-drop'; import { CdkDrag, CdkDragDrop } from '@angular/cdk/drag-drop'; import * as i4 from 'ngx-tethys/icon'; import * as i5 from 'ngx-tethys/list'; import * as i6 from 'ngx-tethys/shared'; import * as i7 from 'ngx-tethys/flexible-text'; import { ThyTransferLocale } from 'ngx-tethys/i18n'; type Direction = 'left' | 'right'; declare enum TransferDirection { left = "left", right = "right" } interface ThyTransferData { source: ThyTransferModel; target: ThyTransferModel; } interface ThyTransferModel { title?: string; data: Array; } /** * @public * @order 20 */ interface ThyTransferItem { /** * 数据标题 */ title: string; /** * 设置方向,可选值 [left,right] */ direction?: Direction; order?: number | null; disabled?: boolean; /** * 选中状态 */ checked?: boolean; isLock?: boolean; groupId?: string; isFixed?: boolean; /** * 自定义数据 */ [key: string]: any; } interface ThyTransferSelectEvent { item: ThyTransferItem; } interface ThyTransferChangeEvent { from?: string; to?: string; items?: ThyTransferItem[]; left?: InnerTransferList; right?: InnerTransferList; } interface ThyTransferDragEvent { oldIndex?: number; newIndex?: number; model?: ThyTransferItem; models?: ThyTransferItem[]; left?: InnerTransferList; right?: InnerTransferList; } interface InnerTransferDragEvent { dragEvent?: ThyTransferDragEvent; listData?: InnerTransferList; } interface InnerTransferList { lock?: ThyTransferItem[]; unlock?: ThyTransferItem[]; } /** * 穿梭框组件 * @name thy-transfer * @order 10 */ declare class ThyTransfer implements OnInit { leftDataSource: ThyTransferItem[]; rightDataSource: ThyTransferItem[]; /** * 数据源 * @type ThyTransferItem[] */ readonly thyData: _angular_core.InputSignal; readonly thyRenderLeftTemplateRef: _angular_core.InputSignal | undefined>; readonly thyRenderRightTemplateRef: _angular_core.InputSignal | undefined>; /** * title集合,title[0]为左标题,title[1]为右标题 * @type string[] */ readonly thyTitles: _angular_core.InputSignal; /** * 右侧列表是否可以锁定 * @default false */ readonly thyRightCanLock: _angular_core.InputSignalWithTransform; /** * 右侧锁定最大数量 */ readonly thyRightLockMax: _angular_core.InputSignalWithTransform; /** * 右侧选择最大数量 */ readonly thyRightMax: _angular_core.InputSignalWithTransform; /** * 设置是否自动移动 * @description.en-us Currently not implemented, in order to support the selections move * @default true */ readonly thyAutoMove: _angular_core.InputSignalWithTransform; /** * 左侧列表是否拖动 * @default false */ readonly thyLeftDraggable: _angular_core.InputSignalWithTransform; /** * 右侧列表是否拖动 * @default false */ readonly thyRightDraggable: _angular_core.InputSignalWithTransform; /** * @type EventEmitter */ readonly thyDraggableUpdate: _angular_core.OutputEmitterRef; /** * Transfer变化的回调事件 * @type EventEmitter */ readonly thyChange: _angular_core.OutputEmitterRef; /** * 设置自定义Item渲染数据模板 * @type TemplateRef */ readonly templateRef: _angular_core.Signal | undefined>; /** * 设置自定义左侧内容模板 * @type TemplateRef */ readonly leftContentRef: _angular_core.Signal | undefined>; /** * 设置自定义右侧内容模板 * @type TemplateRef */ readonly rightContentRef: _angular_core.Signal | undefined>; readonly leftTitle: _angular_core.Signal; readonly rightTitle: _angular_core.Signal; constructor(); ngOnInit(): void; initializeTransferData(data?: ThyTransferItem[]): void; onSelect(from: Direction, event: ThyTransferSelectEvent): void; selectItem(event: ThyTransferSelectEvent): void; unselectItem(event: ThyTransferSelectEvent): void; private groupListByIsLock; onMove(to: Direction): void; onDragUpdate(direction: Direction, event: InnerTransferDragEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * @private */ declare class ThyTransferList implements OnInit, DoCheck { private differs; lockItems: ThyTransferItem[]; unlockItems: ThyTransferItem[]; private _diff; private _lockDiff; private _unlockDiff; locale: Signal; readonly title: _angular_core.InputSignal; readonly items: _angular_core.InputSignal; readonly draggable: _angular_core.InputSignalWithTransform; readonly canLock: _angular_core.InputSignalWithTransform; readonly maxLock: _angular_core.InputSignalWithTransform; readonly max: _angular_core.InputSignalWithTransform; readonly disabled: _angular_core.InputSignalWithTransform; readonly template: _angular_core.InputSignal | undefined>; readonly renderContentRef: _angular_core.InputSignal | undefined>; readonly draggableUpdate: _angular_core.OutputEmitterRef; readonly selectItem: _angular_core.OutputEmitterRef; readonly unselectItem: _angular_core.OutputEmitterRef; constructor(); ngOnInit(): void; private _combineTransferData; private _afterChangeItems; ngDoCheck(): void; lockListEnterPredicate: () => boolean; unlockListEnterPredicate: (event: CdkDrag) => boolean; onSelectItem: (item: ThyTransferItem) => void; onUnselectItem: (item: ThyTransferItem) => void; drop(event: CdkDragDrop): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class ThyTransferModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { ThyTransfer, ThyTransferList, ThyTransferModule, TransferDirection }; export type { Direction, InnerTransferDragEvent, InnerTransferList, ThyTransferChangeEvent, ThyTransferData, ThyTransferDragEvent, ThyTransferItem, ThyTransferModel, ThyTransferSelectEvent };