|
|
@ -11,24 +11,44 @@ import { |
|
|
TemplateRef, |
|
|
TemplateRef, |
|
|
ViewEncapsulation, |
|
|
ViewEncapsulation, |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'; |
|
|
import { NgbDropdown, NgbDropdownMenu, NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap'; |
|
|
import { NzFormatBeforeDropEvent, NzFormatEmitEvent, NzTreeNode } from 'ng-zorro-antd/tree'; |
|
|
import { |
|
|
import { LazyLoadService, LOADING_STRATEGY, SubscriptionService } from '@abp/ng.core'; |
|
|
NzFormatBeforeDropEvent, |
|
|
|
|
|
NzFormatEmitEvent, |
|
|
|
|
|
NzTreeComponent, |
|
|
|
|
|
NzTreeNode, |
|
|
|
|
|
} from 'ng-zorro-antd/tree'; |
|
|
|
|
|
import { |
|
|
|
|
|
InitDirective, |
|
|
|
|
|
LazyLoadService, |
|
|
|
|
|
LOADING_STRATEGY, |
|
|
|
|
|
SubscriptionService, |
|
|
|
|
|
} from '@abp/ng.core'; |
|
|
import { of } from 'rxjs'; |
|
|
import { of } from 'rxjs'; |
|
|
import { DISABLE_TREE_STYLE_LOADING_TOKEN } from '../disable-tree-style-loading.token'; |
|
|
import { DISABLE_TREE_STYLE_LOADING_TOKEN } from '../disable-tree-style-loading.token'; |
|
|
import { TreeNodeTemplateDirective } from '../templates/tree-node-template.directive'; |
|
|
import { TreeNodeTemplateDirective } from '../templates/tree-node-template.directive'; |
|
|
import { ExpandedIconTemplateDirective } from '../templates/expanded-icon-template.directive'; |
|
|
import { ExpandedIconTemplateDirective } from '../templates/expanded-icon-template.directive'; |
|
|
|
|
|
import { CommonModule } from '@angular/common'; |
|
|
|
|
|
import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation'; |
|
|
|
|
|
|
|
|
export type DropEvent = NzFormatEmitEvent & { pos: number }; |
|
|
export type DropEvent = NzFormatEmitEvent & { pos: number }; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
standalone: false, |
|
|
|
|
|
selector: 'abp-tree', |
|
|
selector: 'abp-tree', |
|
|
templateUrl: 'tree.component.html', |
|
|
templateUrl: 'tree.component.html', |
|
|
styleUrls: ['tree.component.scss'], |
|
|
styleUrls: ['tree.component.scss'], |
|
|
encapsulation: ViewEncapsulation.None, |
|
|
encapsulation: ViewEncapsulation.None, |
|
|
providers: [SubscriptionService], |
|
|
providers: [SubscriptionService], |
|
|
changeDetection: ChangeDetectionStrategy.OnPush, |
|
|
changeDetection: ChangeDetectionStrategy.OnPush, |
|
|
|
|
|
imports: [ |
|
|
|
|
|
CommonModule, |
|
|
|
|
|
NzTreeComponent, |
|
|
|
|
|
NgbDropdown, |
|
|
|
|
|
NgbDropdownMenu, |
|
|
|
|
|
NgbDropdownToggle, |
|
|
|
|
|
InitDirective, |
|
|
|
|
|
NzNoAnimationDirective, |
|
|
|
|
|
], |
|
|
}) |
|
|
}) |
|
|
export class TreeComponent implements OnInit { |
|
|
export class TreeComponent implements OnInit { |
|
|
private lazyLoadService = inject(LazyLoadService); |
|
|
private lazyLoadService = inject(LazyLoadService); |
|
|
|