Skip to content

Commit

Permalink
chore: fix member-ordering by eslint (#6065)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Nov 24, 2023
1 parent da0323c commit cdd907a
Showing 1 changed file with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export interface TuiHostedDropdownContext
close(): void;
}

/* eslint-disable @typescript-eslint/member-ordering */
@Component({
selector: 'tui-hosted-dropdown',
templateUrl: './hosted-dropdown.template.html',
Expand All @@ -84,8 +83,6 @@ export interface TuiHostedDropdownContext
},
})
export class TuiHostedDropdownComponent implements TuiFocusableElementAccessor {
readonly focus$ = new BehaviorSubject(false);

@ContentChild(TuiHostedDropdownConnectorDirective, {read: ElementRef})
private readonly dropdownHost?: ElementRef<HTMLElement>;

Expand All @@ -95,20 +92,7 @@ export class TuiHostedDropdownComponent implements TuiFocusableElementAccessor {
@ViewChild(TuiDropdownDirective)
private readonly dropdownDirective?: TuiDropdownDirective;

/** TODO: rename in 4.0 */
readonly openChange = new BehaviorSubject(false);

@ViewChild(TuiActiveZoneDirective)
readonly activeZone!: TuiActiveZoneDirective;

@Input()
content: PolymorpheusContent<TuiHostedDropdownContext>;

@Input()
sided = false;

@Input()
canOpen = true;
private readonly openChange$ = new BehaviorSubject(false);

private readonly hostHover$ = combineLatest([
tuiTypedFromEvent(this.el.nativeElement, 'mouseover').pipe(
Expand All @@ -124,8 +108,20 @@ export class TuiHostedDropdownComponent implements TuiFocusableElementAccessor {
this.hover$ || EMPTY,
]).pipe(map(([visible, hovered]) => visible && hovered));

@ViewChild(TuiActiveZoneDirective)
readonly activeZone!: TuiActiveZoneDirective;

@Input()
content: PolymorpheusContent<TuiHostedDropdownContext>;

@Input()
sided = false;

@Input()
canOpen = true;

@Output('openChange')
readonly open$ = merge(this.openChange, this.hostHover$).pipe(
readonly open$ = merge(this.openChange$, this.hostHover$).pipe(
skip(1),
distinctUntilChanged(),
share(),
Expand All @@ -134,6 +130,11 @@ export class TuiHostedDropdownComponent implements TuiFocusableElementAccessor {
@Output()
readonly focusedChange = new EventEmitter<boolean>();

readonly focus$ = new BehaviorSubject(false);

/** TODO: rename in 4.0 */
readonly openChange = this.openChange$;

readonly context!: TuiContextWithImplicit<TuiActiveZoneDirective>;

constructor(
Expand Down

0 comments on commit cdd907a

Please sign in to comment.