mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +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:
@@ -27,7 +27,7 @@ export class BitActionDirective implements OnDestroy {
|
||||
constructor(
|
||||
private buttonComponent: ButtonLikeAbstraction,
|
||||
@Optional() private validationService?: ValidationService,
|
||||
@Optional() private logService?: LogService
|
||||
@Optional() private logService?: LogService,
|
||||
) {}
|
||||
|
||||
get loading() {
|
||||
@@ -55,7 +55,7 @@ export class BitActionDirective implements OnDestroy {
|
||||
},
|
||||
}),
|
||||
finalize(() => (this.loading = false)),
|
||||
takeUntil(this.destroy$)
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export class BitSubmitDirective implements OnInit, OnDestroy {
|
||||
constructor(
|
||||
private formGroupDirective: FormGroupDirective,
|
||||
@Optional() validationService?: ValidationService,
|
||||
@Optional() logService?: LogService
|
||||
@Optional() logService?: LogService,
|
||||
) {
|
||||
formGroupDirective.ngSubmit
|
||||
.pipe(
|
||||
@@ -46,10 +46,10 @@ export class BitSubmitDirective implements OnInit, OnDestroy {
|
||||
logService?.error(`Async submit exception: ${err}`);
|
||||
validationService?.showError(err);
|
||||
return of(undefined);
|
||||
})
|
||||
}),
|
||||
);
|
||||
}),
|
||||
takeUntil(this.destroy$)
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe({
|
||||
next: () => (this.loading = false),
|
||||
|
||||
@@ -33,7 +33,7 @@ export class BitFormButtonDirective implements OnDestroy {
|
||||
constructor(
|
||||
buttonComponent: ButtonLikeAbstraction,
|
||||
@Optional() submitDirective?: BitSubmitDirective,
|
||||
@Optional() actionDirective?: BitActionDirective
|
||||
@Optional() actionDirective?: BitActionDirective,
|
||||
) {
|
||||
if (submitDirective && buttonComponent) {
|
||||
submitDirective.loading$.pipe(takeUntil(this.destroy$)).subscribe((loading) => {
|
||||
|
||||
@@ -76,7 +76,7 @@ export class AvatarComponent implements OnChanges {
|
||||
const html = window.document.createElement("div").appendChild(svg).outerHTML;
|
||||
const svgHtml = window.btoa(unescape(encodeURIComponent(html)));
|
||||
this.src = this.sanitizer.bypassSecurityTrustResourceUrl(
|
||||
"data:image/svg+xml;base64," + svgHtml
|
||||
"data:image/svg+xml;base64," + svgHtml,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ export class AvatarComponent implements OnChanges {
|
||||
textTag.setAttribute(
|
||||
"font-family",
|
||||
'"Open Sans","Helvetica Neue",Helvetica,Arial,' +
|
||||
'sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"'
|
||||
'sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"',
|
||||
);
|
||||
textTag.textContent = character;
|
||||
textTag.style.fontWeight = this.svgFontWeight.toString();
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<span class="tw-sr-only" *ngIf="!last || isFiltered">, </span>
|
||||
</ng-container>
|
||||
<span *ngIf="isFiltered" bitBadge [badgeType]="badgeType">
|
||||
{{ "plusNMore" | i18n : (items.length - filteredItems.length).toString() }}
|
||||
{{ "plusNMore" | i18n: (items.length - filteredItems.length).toString() }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
applicationConfig({
|
||||
providers: [
|
||||
importProvidersFrom(
|
||||
RouterModule.forRoot([{ path: "**", component: EmptyComponent }], { useHash: true })
|
||||
RouterModule.forRoot([{ path: "**", component: EmptyComponent }], { useHash: true }),
|
||||
),
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -45,13 +45,13 @@ describe("Button", () => {
|
||||
fixture.detectChanges();
|
||||
expect(
|
||||
Array.from(buttonDebugElement.nativeElement.classList).some((klass: string) =>
|
||||
klass.startsWith("tw-bg")
|
||||
)
|
||||
klass.startsWith("tw-bg"),
|
||||
),
|
||||
).toBe(false);
|
||||
expect(
|
||||
Array.from(linkDebugElement.nativeElement.classList).some((klass: string) =>
|
||||
klass.startsWith("tw-bg")
|
||||
)
|
||||
klass.startsWith("tw-bg"),
|
||||
),
|
||||
).toBe(false);
|
||||
|
||||
testAppComponent.buttonType = null;
|
||||
|
||||
@@ -77,10 +77,12 @@ export class CheckboxComponent implements BitFormControlAbstraction {
|
||||
constructor(@Optional() @Self() private ngControl?: NgControl) {}
|
||||
|
||||
@HostBinding("style.--mask-image")
|
||||
protected maskImage = `url('data:image/svg+xml,%3Csvg class="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="8" height="8" viewBox="0 0 10 10"%3E%3Cpath d="M0.5 6.2L2.9 8.6L9.5 1.4" fill="none" stroke="white" stroke-width="2"%3E%3C/path%3E%3C/svg%3E')`;
|
||||
protected maskImage =
|
||||
`url('data:image/svg+xml,%3Csvg class="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="8" height="8" viewBox="0 0 10 10"%3E%3Cpath d="M0.5 6.2L2.9 8.6L9.5 1.4" fill="none" stroke="white" stroke-width="2"%3E%3C/path%3E%3C/svg%3E')`;
|
||||
|
||||
@HostBinding("style.--indeterminate-mask-image")
|
||||
protected indeterminateImage = `url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="none" viewBox="0 0 13 13"%3E%3Cpath stroke="%23fff" stroke-width="2" d="M2.5 6.5h8"/%3E%3C/svg%3E%0A')`;
|
||||
protected indeterminateImage =
|
||||
`url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="none" viewBox="0 0 13 13"%3E%3Cpath stroke="%23fff" stroke-width="2" d="M2.5 6.5h8"/%3E%3C/svg%3E%0A')`;
|
||||
|
||||
@HostBinding()
|
||||
@Input()
|
||||
|
||||
@@ -50,7 +50,10 @@ class StoryDialogComponent {
|
||||
`,
|
||||
})
|
||||
class StoryDialogContentComponent {
|
||||
constructor(public dialogRef: DialogRef, @Inject(DIALOG_DATA) private data: Animal) {}
|
||||
constructor(
|
||||
public dialogRef: DialogRef,
|
||||
@Inject(DIALOG_DATA) private data: Animal,
|
||||
) {}
|
||||
|
||||
get animal() {
|
||||
return this.data?.animal;
|
||||
|
||||
@@ -44,7 +44,7 @@ export class DialogService extends Dialog implements OnDestroy {
|
||||
@Optional() router: Router,
|
||||
@Optional() authService: AuthService,
|
||||
|
||||
protected i18nService: I18nService
|
||||
protected i18nService: I18nService,
|
||||
) {
|
||||
super(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy);
|
||||
|
||||
@@ -55,7 +55,7 @@ export class DialogService extends Dialog implements OnDestroy {
|
||||
filter((event) => event instanceof NavigationEnd),
|
||||
switchMap(() => authService.getAuthStatus()),
|
||||
filter((v) => v !== AuthenticationStatus.Unlocked),
|
||||
takeUntil(this._destroy$)
|
||||
takeUntil(this._destroy$),
|
||||
)
|
||||
.subscribe(() => this.closeAll());
|
||||
}
|
||||
@@ -69,7 +69,7 @@ export class DialogService extends Dialog implements OnDestroy {
|
||||
|
||||
override open<R = unknown, D = unknown, C = unknown>(
|
||||
componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,
|
||||
config?: DialogConfig<D, DialogRef<R, C>>
|
||||
config?: DialogConfig<D, DialogRef<R, C>>,
|
||||
): DialogRef<R, C> {
|
||||
config = {
|
||||
backdropClass: this.backDropClasses,
|
||||
|
||||
@@ -32,7 +32,7 @@ export class DialogComponent {
|
||||
|
||||
@HostBinding("class") get classes() {
|
||||
return ["tw-flex", "tw-flex-col", "tw-max-h-screen", "tw-w-screen", "tw-p-4"].concat(
|
||||
this.width
|
||||
this.width,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export class SimpleConfigurableDialogComponent {
|
||||
constructor(
|
||||
public dialogRef: DialogRef,
|
||||
private i18nService: I18nService,
|
||||
@Inject(DIALOG_DATA) public simpleDialogOpts?: SimpleDialogOptions
|
||||
@Inject(DIALOG_DATA) public simpleDialogOpts?: SimpleDialogOptions,
|
||||
) {
|
||||
this.localizeText();
|
||||
}
|
||||
@@ -66,7 +66,7 @@ export class SimpleConfigurableDialogComponent {
|
||||
// If accept text is overridden, use cancel, otherwise no
|
||||
this.cancelButtonText = this.translate(
|
||||
this.simpleDialogOpts.cancelButtonText,
|
||||
this.simpleDialogOpts.acceptButtonText !== undefined ? "cancel" : "no"
|
||||
this.simpleDialogOpts.acceptButtonText !== undefined ? "cancel" : "no",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,10 @@ class StoryDialogComponent {
|
||||
calloutType = "info";
|
||||
dialogCloseResult: boolean;
|
||||
|
||||
constructor(public dialogService: DialogService, private i18nService: I18nService) {}
|
||||
constructor(
|
||||
public dialogService: DialogService,
|
||||
private i18nService: I18nService,
|
||||
) {}
|
||||
|
||||
async openSimpleConfigurableDialog(opts: SimpleDialogOptions) {
|
||||
this.dialogCloseResult = await this.dialogService.openSimpleDialog(opts);
|
||||
|
||||
@@ -50,7 +50,10 @@ class StoryDialogComponent {
|
||||
`,
|
||||
})
|
||||
class StoryDialogContentComponent {
|
||||
constructor(public dialogRef: DialogRef, @Inject(DIALOG_DATA) private data: Animal) {}
|
||||
constructor(
|
||||
public dialogRef: DialogRef,
|
||||
@Inject(DIALOG_DATA) private data: Animal,
|
||||
) {}
|
||||
|
||||
get animal() {
|
||||
return this.data?.animal;
|
||||
|
||||
@@ -50,7 +50,7 @@ export class FormControlComponent {
|
||||
|
||||
protected get labelContentClasses() {
|
||||
return ["tw-inline-flex", "tw-flex-col", "tw-font-semibold"].concat(
|
||||
this.formControl.disabled ? "tw-text-muted" : "tw-text-main"
|
||||
this.formControl.disabled ? "tw-text-muted" : "tw-text-main",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AbstractControl, UntypedFormGroup } from "@angular/forms";
|
||||
@Component({
|
||||
selector: "bit-error-summary",
|
||||
template: ` <ng-container *ngIf="errorCount > 0">
|
||||
<i class="bwi bwi-error"></i> {{ "fieldsNeedAttention" | i18n : errorString }}
|
||||
<i class="bwi bwi-error"></i> {{ "fieldsNeedAttention" | i18n: errorString }}
|
||||
</ng-container>`,
|
||||
host: {
|
||||
class: "tw-block tw-text-danger tw-mt-2",
|
||||
|
||||
@@ -44,7 +44,7 @@ export class BitPasswordInputToggleDirective implements AfterContentInit, OnChan
|
||||
constructor(
|
||||
@Host() private button: BitIconButtonComponent,
|
||||
private formField: BitFormFieldComponent,
|
||||
private i18nService: I18nService
|
||||
private i18nService: I18nService,
|
||||
) {}
|
||||
|
||||
get icon() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -104,7 +104,7 @@ export class BitInputDirective implements BitFormFieldControl {
|
||||
constructor(
|
||||
@Optional() @Self() private ngControl: NgControl,
|
||||
private ngZone: NgZone,
|
||||
private elementRef: ElementRef<HTMLInputElement>
|
||||
private elementRef: ElementRef<HTMLInputElement>,
|
||||
) {}
|
||||
|
||||
focus() {
|
||||
|
||||
@@ -18,9 +18,10 @@ export default {
|
||||
* Applying a CSS transform makes a `position: fixed` element act like it is `position: relative`
|
||||
* https://github.com/storybookjs/storybook/issues/8011#issue-490251969
|
||||
*/
|
||||
(story) => /* HTML */ `<div class="tw-scale-100 tw-border-2 tw-border-solid tw-border-[red]">
|
||||
${story}
|
||||
</div>`
|
||||
(story) =>
|
||||
/* HTML */ `<div class="tw-scale-100 tw-border-2 tw-border-solid tw-border-[red]">
|
||||
${story}
|
||||
</div>`,
|
||||
),
|
||||
moduleMetadata({
|
||||
imports: [NavigationModule, RouterTestingModule, CalloutModule],
|
||||
|
||||
@@ -59,7 +59,7 @@ export class MenuTriggerForDirective implements OnDestroy {
|
||||
constructor(
|
||||
private elementRef: ElementRef<HTMLElement>,
|
||||
private viewContainerRef: ViewContainerRef,
|
||||
private overlay: Overlay
|
||||
private overlay: Overlay,
|
||||
) {}
|
||||
|
||||
@HostListener("click") toggleMenu() {
|
||||
@@ -110,7 +110,7 @@ export class MenuTriggerForDirective implements OnDestroy {
|
||||
filter((event: KeyboardEvent) => {
|
||||
const keys = this.menu.ariaRole === "menu" ? ["Escape", "Tab"] : ["Escape"];
|
||||
return keys.includes(event.key);
|
||||
})
|
||||
}),
|
||||
);
|
||||
const backdrop = this.overlayRef.backdropClick();
|
||||
const menuClosed = this.menu.closed;
|
||||
|
||||
@@ -56,7 +56,10 @@ export class MultiSelectComponent implements OnInit, BitFormFieldControl, Contro
|
||||
|
||||
@Output() onItemsConfirmed = new EventEmitter<any[]>();
|
||||
|
||||
constructor(private i18nService: I18nService, @Optional() @Self() private ngControl?: NgControl) {
|
||||
constructor(
|
||||
private i18nService: I18nService,
|
||||
@Optional() @Self() private ngControl?: NgControl,
|
||||
) {
|
||||
if (ngControl != null) {
|
||||
ngControl.valueAccessor = this;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export class NavItemComponent extends NavBaseComponent {
|
||||
*/
|
||||
protected focusVisibleWithin$ = new BehaviorSubject(false);
|
||||
protected fvwStyles$ = this.focusVisibleWithin$.pipe(
|
||||
map((value) => (value ? "tw-z-10 tw-rounded tw-outline-none tw-ring tw-ring-text-alt2" : ""))
|
||||
map((value) => (value ? "tw-z-10 tw-rounded tw-outline-none tw-ring tw-ring-text-alt2" : "")),
|
||||
);
|
||||
@HostListener("focusin", ["$event.target"])
|
||||
onFocusIn(target: HTMLElement) {
|
||||
|
||||
@@ -66,7 +66,7 @@ export class PopoverTriggerForDirective implements OnDestroy, AfterViewInit {
|
||||
constructor(
|
||||
private elementRef: ElementRef<HTMLElement>,
|
||||
private viewContainerRef: ViewContainerRef,
|
||||
private overlay: Overlay
|
||||
private overlay: Overlay,
|
||||
) {}
|
||||
|
||||
@HostListener("click")
|
||||
|
||||
@@ -33,7 +33,7 @@ export class ProgressComponent {
|
||||
|
||||
get outerBarStyles() {
|
||||
return ["tw-overflow-hidden", "tw-rounded", "tw-bg-secondary-100"].concat(
|
||||
SizeClasses[this.size]
|
||||
SizeClasses[this.size],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,10 @@ export class SelectComponent<T> implements BitFormFieldControl, ControlValueAcce
|
||||
private notifyOnChange?: (value: T) => void;
|
||||
private notifyOnTouched?: () => void;
|
||||
|
||||
constructor(private i18nService: I18nService, @Optional() @Self() private ngControl?: NgControl) {
|
||||
constructor(
|
||||
private i18nService: I18nService,
|
||||
@Optional() @Self() private ngControl?: NgControl,
|
||||
) {
|
||||
if (ngControl != null) {
|
||||
ngControl.valueAccessor = this;
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ export class TableDataSource<T> extends DataSource<T> {
|
||||
|
||||
private updateChangeSubscription() {
|
||||
const filteredData = combineLatest([this._data, this._filter]).pipe(
|
||||
map(([data]) => this.filterData(data))
|
||||
map(([data]) => this.filterData(data)),
|
||||
);
|
||||
|
||||
const orderedData = combineLatest([filteredData, this._sort]).pipe(
|
||||
map(([data, sort]) => this.orderData(data, sort))
|
||||
map(([data, sort]) => this.orderData(data, sort)),
|
||||
);
|
||||
|
||||
this._renderChangesSubscription?.unsubscribe();
|
||||
|
||||
@@ -57,8 +57,8 @@ export default {
|
||||
{ path: "item-3", component: ItemThreeDummyComponent },
|
||||
{ path: "disabled", component: DisabledDummyComponent },
|
||||
],
|
||||
{ useHash: true }
|
||||
)
|
||||
{ useHash: true },
|
||||
),
|
||||
),
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -12,7 +12,7 @@ declare const require: {
|
||||
context(
|
||||
path: string,
|
||||
deep?: boolean,
|
||||
filter?: RegExp
|
||||
filter?: RegExp,
|
||||
): {
|
||||
<T>(id: string): T;
|
||||
keys(): string[];
|
||||
|
||||
Reference in New Issue
Block a user