mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
@@ -8,7 +8,10 @@ import { Subscription } from "rxjs";
|
||||
export class A11yInvalidDirective implements OnDestroy, OnInit {
|
||||
private sub: Subscription;
|
||||
|
||||
constructor(private el: ElementRef<HTMLInputElement>, private formControlDirective: NgControl) {}
|
||||
constructor(
|
||||
private el: ElementRef<HTMLInputElement>,
|
||||
private formControlDirective: NgControl,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.sub = this.formControlDirective.control.statusChanges.subscribe((status) => {
|
||||
|
||||
@@ -10,7 +10,10 @@ export class A11yTitleDirective {
|
||||
|
||||
private title: string;
|
||||
|
||||
constructor(private el: ElementRef, private renderer: Renderer2) {}
|
||||
constructor(
|
||||
private el: ElementRef,
|
||||
private renderer: Renderer2,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
if (!this.el.nativeElement.hasAttribute("title")) {
|
||||
|
||||
@@ -19,7 +19,7 @@ export class ApiActionDirective implements OnChanges {
|
||||
constructor(
|
||||
private el: ElementRef,
|
||||
private validationService: ValidationService,
|
||||
private logService: LogService
|
||||
private logService: LogService,
|
||||
) {}
|
||||
|
||||
ngOnChanges(changes: any) {
|
||||
@@ -42,7 +42,7 @@ export class ApiActionDirective implements OnChanges {
|
||||
}
|
||||
this.logService?.error(`Received API exception: ${e}`);
|
||||
this.validationService.showError(e);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,10 @@ export class AutofocusDirective {
|
||||
|
||||
private autofocus: boolean;
|
||||
|
||||
constructor(private el: ElementRef, private ngZone: NgZone) {}
|
||||
constructor(
|
||||
private el: ElementRef,
|
||||
private ngZone: NgZone,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
if (!Utils.isMobileBrowser && this.autofocus) {
|
||||
|
||||
@@ -13,7 +13,7 @@ export class BoxRowDirective implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.formEls = Array.from(
|
||||
this.el.querySelectorAll('input:not([type="hidden"]), select, textarea')
|
||||
this.el.querySelectorAll('input:not([type="hidden"]), select, textarea'),
|
||||
);
|
||||
this.formEls.forEach((formEl) => {
|
||||
formEl.addEventListener(
|
||||
@@ -21,7 +21,7 @@ export class BoxRowDirective implements OnInit {
|
||||
() => {
|
||||
this.el.classList.add("active");
|
||||
},
|
||||
false
|
||||
false,
|
||||
);
|
||||
|
||||
formEl.addEventListener(
|
||||
@@ -29,7 +29,7 @@ export class BoxRowDirective implements OnInit {
|
||||
() => {
|
||||
this.el.classList.remove("active");
|
||||
},
|
||||
false
|
||||
false,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export class CipherListVirtualScrollStrategy extends FixedSizeVirtualScrollStrat
|
||||
itemSize: number,
|
||||
minBufferPx: number,
|
||||
maxBufferPx: number,
|
||||
checkItemSizeCallback: any
|
||||
checkItemSizeCallback: any,
|
||||
) {
|
||||
super(itemSize, minBufferPx, maxBufferPx);
|
||||
this.checkItemSizeCallback = checkItemSizeCallback;
|
||||
@@ -54,13 +54,13 @@ export class CipherListVirtualScroll extends CdkFixedSizeVirtualScroll {
|
||||
this.itemSize,
|
||||
this.minBufferPx,
|
||||
this.maxBufferPx,
|
||||
this.checkAndUpdateItemSize
|
||||
this.checkAndUpdateItemSize,
|
||||
);
|
||||
}
|
||||
|
||||
checkAndUpdateItemSize = () => {
|
||||
const sampleItem = document.querySelector(
|
||||
"cdk-virtual-scroll-viewport .virtual-scroll-item"
|
||||
"cdk-virtual-scroll-viewport .virtual-scroll-item",
|
||||
) as HTMLElement;
|
||||
const newItemSize = sampleItem?.offsetHeight;
|
||||
|
||||
@@ -69,7 +69,7 @@ export class CipherListVirtualScroll extends CdkFixedSizeVirtualScroll {
|
||||
this._scrollStrategy.updateItemAndBufferSize(
|
||||
this.itemSize,
|
||||
this.minBufferPx,
|
||||
this.maxBufferPx
|
||||
this.maxBufferPx,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,10 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
||||
selector: "[appCopyText]",
|
||||
})
|
||||
export class CopyTextDirective {
|
||||
constructor(private el: ElementRef, private platformUtilsService: PlatformUtilsService) {}
|
||||
constructor(
|
||||
private el: ElementRef,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
) {}
|
||||
|
||||
@Input("appCopyText") copyText: string;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ describe("IfFeatureDirective", () => {
|
||||
|
||||
const mockConfigFlagValue = (flag: FeatureFlag, flagValue: FeatureFlagValue) => {
|
||||
mockConfigService.getFeatureFlag.mockImplementation((f, defaultValue) =>
|
||||
flag == f ? Promise.resolve(flagValue) : Promise.resolve(defaultValue)
|
||||
flag == f ? Promise.resolve(flagValue) : Promise.resolve(defaultValue),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export class IfFeatureDirective implements OnInit {
|
||||
private templateRef: TemplateRef<any>,
|
||||
private viewContainer: ViewContainerRef,
|
||||
private configService: ConfigServiceAbstraction,
|
||||
private logService: LogService
|
||||
private logService: LogService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
|
||||
@@ -10,7 +10,10 @@ export class InputVerbatimDirective {
|
||||
|
||||
private disableComplete: boolean;
|
||||
|
||||
constructor(private el: ElementRef, private renderer: Renderer2) {}
|
||||
constructor(
|
||||
private el: ElementRef,
|
||||
private renderer: Renderer2,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.disableComplete && !this.el.nativeElement.hasAttribute("autocomplete")) {
|
||||
|
||||
@@ -12,7 +12,7 @@ export class NotPremiumDirective implements OnInit {
|
||||
constructor(
|
||||
private templateRef: TemplateRef<any>,
|
||||
private viewContainer: ViewContainerRef,
|
||||
private stateService: StateService
|
||||
private stateService: StateService,
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
|
||||
@@ -12,7 +12,7 @@ export class PremiumDirective implements OnInit {
|
||||
constructor(
|
||||
private templateRef: TemplateRef<any>,
|
||||
private viewContainer: ViewContainerRef,
|
||||
private stateService: StateService
|
||||
private stateService: StateService,
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
|
||||
@@ -16,7 +16,10 @@ export class TrueFalseValueDirective implements ControlValueAccessor {
|
||||
@Input() trueValue: boolean | string = true;
|
||||
@Input() falseValue: boolean | string = false;
|
||||
|
||||
constructor(private elementRef: ElementRef, private renderer: Renderer2) {}
|
||||
constructor(
|
||||
private elementRef: ElementRef,
|
||||
private renderer: Renderer2,
|
||||
) {}
|
||||
|
||||
@HostListener("change", ["$event"])
|
||||
onHostChange(ev: any) {
|
||||
|
||||
Reference in New Issue
Block a user