interfaces.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { Observable } from 'rxjs';
  6. import { NzSafeAny } from 'ng-zorro-antd/core/types';
  7. export type NzTabPosition = 'top' | 'bottom' | 'left' | 'right';
  8. export type NzTabType = 'line' | 'card' | 'editable-card';
  9. export type NzTabsCanDeactivateFn = (fromIndex: number, toIndex: number) => Observable<boolean> | Promise<boolean> | boolean;
  10. export type NzTabPositionMode = 'horizontal' | 'vertical';
  11. export interface NzAnimatedInterface {
  12. inkBar: boolean;
  13. tabPane: boolean;
  14. }
  15. export declare class NzTabChangeEvent {
  16. index?: number;
  17. tab: NzSafeAny;
  18. }
  19. export interface NzTabScrollListOffset {
  20. x: number;
  21. y: number;
  22. }
  23. export type NzTabScrollListOffsetEvent = NzTabScrollListOffset & {
  24. event: Event;
  25. };
  26. interface NzTabWheelScrollEvent {
  27. type: 'wheel';
  28. event: WheelEvent;
  29. }
  30. interface NzTabTouchScrollEvent {
  31. type: 'touchstart' | 'touchmove' | 'touchend';
  32. event: TouchEvent;
  33. }
  34. export type NzTabScrollEvent = NzTabTouchScrollEvent | NzTabWheelScrollEvent;
  35. export type NzTabScrollEventHandlerFun<T extends NzTabScrollEvent['event']> = (event: T) => void;
  36. export interface TabTemplateContext {
  37. visible: boolean;
  38. }
  39. export {};