typography.component.d.ts 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 { Direction, Directionality } from '@angular/cdk/bidi';
  6. import { Platform } from '@angular/cdk/platform';
  7. import { AfterViewInit, ChangeDetectorRef, ElementRef, EmbeddedViewRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
  8. import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
  9. import { NzResizeService } from 'ng-zorro-antd/core/services';
  10. import { NzTSType } from 'ng-zorro-antd/core/types';
  11. import { NzI18nService, NzTextI18nInterface } from 'ng-zorro-antd/i18n';
  12. import { NzTextCopyComponent } from './text-copy.component';
  13. import { NzTextEditComponent } from './text-edit.component';
  14. import * as i0 from "@angular/core";
  15. export declare class NzTypographyComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
  16. nzConfigService: NzConfigService;
  17. private host;
  18. private cdr;
  19. private viewContainerRef;
  20. private renderer;
  21. private platform;
  22. private i18n;
  23. private resizeService;
  24. private directionality;
  25. readonly _nzModuleName: NzConfigKey;
  26. nzCopyable: boolean;
  27. nzEditable: boolean;
  28. nzDisabled: boolean;
  29. nzExpandable: boolean;
  30. nzEllipsis: boolean;
  31. nzCopyTooltips?: [NzTSType, NzTSType] | null;
  32. nzCopyIcons: [NzTSType, NzTSType];
  33. nzEditTooltip?: null | NzTSType;
  34. nzEditIcon: NzTSType;
  35. nzContent?: string;
  36. nzEllipsisRows: number;
  37. nzType: 'secondary' | 'warning' | 'danger' | 'success' | undefined;
  38. nzCopyText: string | undefined;
  39. nzSuffix: string | undefined;
  40. readonly nzContentChange: EventEmitter<string>;
  41. readonly nzCopy: EventEmitter<string>;
  42. readonly nzExpandChange: EventEmitter<void>;
  43. readonly nzOnEllipsis: EventEmitter<boolean>;
  44. textEditRef?: NzTextEditComponent;
  45. textCopyRef?: NzTextCopyComponent;
  46. ellipsisContainer?: ElementRef<HTMLSpanElement>;
  47. expandableBtn?: ElementRef<HTMLSpanElement>;
  48. contentTemplate?: TemplateRef<{
  49. content: string;
  50. }>;
  51. locale: NzTextI18nInterface;
  52. private document;
  53. expandableBtnElementCache: HTMLElement | null;
  54. editing: boolean;
  55. ellipsisText: string | undefined;
  56. cssEllipsis: boolean;
  57. isEllipsis: boolean;
  58. expanded: boolean;
  59. ellipsisStr: string;
  60. dir: Direction;
  61. get hasEllipsisObservers(): boolean;
  62. get canCssEllipsis(): boolean;
  63. get hasOperationsWithEllipsis(): boolean;
  64. private viewInit;
  65. private rfaId;
  66. private destroy$;
  67. private windowResizeSubscription;
  68. get copyText(): string;
  69. constructor(nzConfigService: NzConfigService, host: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, viewContainerRef: ViewContainerRef, renderer: Renderer2, platform: Platform, i18n: NzI18nService, resizeService: NzResizeService, directionality: Directionality);
  70. onTextCopy(text: string): void;
  71. onStartEditing(): void;
  72. onEndEditing(text: string): void;
  73. onExpand(): void;
  74. canUseCSSEllipsis(): boolean;
  75. renderOnNextFrame(): void;
  76. getOriginContentViewRef(): {
  77. viewRef: EmbeddedViewRef<{
  78. content: string;
  79. }>;
  80. removeView(): void;
  81. };
  82. syncEllipsis(): void;
  83. private getExpandableBtnElement;
  84. private renderAndSubscribeWindowResize;
  85. ngOnInit(): void;
  86. ngAfterViewInit(): void;
  87. ngOnChanges(changes: SimpleChanges): void;
  88. ngOnDestroy(): void;
  89. static ɵfac: i0.ɵɵFactoryDeclaration<NzTypographyComponent, never>;
  90. static ɵcmp: i0.ɵɵComponentDeclaration<NzTypographyComponent, " nz-typography, [nz-typography], p[nz-paragraph], span[nz-text], h1[nz-title], h2[nz-title], h3[nz-title], h4[nz-title] ", ["nzTypography"], { "nzCopyable": { "alias": "nzCopyable"; "required": false; }; "nzEditable": { "alias": "nzEditable"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzExpandable": { "alias": "nzExpandable"; "required": false; }; "nzEllipsis": { "alias": "nzEllipsis"; "required": false; }; "nzCopyTooltips": { "alias": "nzCopyTooltips"; "required": false; }; "nzCopyIcons": { "alias": "nzCopyIcons"; "required": false; }; "nzEditTooltip": { "alias": "nzEditTooltip"; "required": false; }; "nzEditIcon": { "alias": "nzEditIcon"; "required": false; }; "nzContent": { "alias": "nzContent"; "required": false; }; "nzEllipsisRows": { "alias": "nzEllipsisRows"; "required": false; }; "nzType": { "alias": "nzType"; "required": false; }; "nzCopyText": { "alias": "nzCopyText"; "required": false; }; "nzSuffix": { "alias": "nzSuffix"; "required": false; }; }, { "nzContentChange": "nzContentChange"; "nzCopy": "nzCopy"; "nzExpandChange": "nzExpandChange"; "nzOnEllipsis": "nzOnEllipsis"; }, never, ["*"], true, never>;
  91. static ngAcceptInputType_nzCopyable: unknown;
  92. static ngAcceptInputType_nzEditable: unknown;
  93. static ngAcceptInputType_nzDisabled: unknown;
  94. static ngAcceptInputType_nzExpandable: unknown;
  95. static ngAcceptInputType_nzEllipsis: unknown;
  96. static ngAcceptInputType_nzEllipsisRows: unknown;
  97. }