1
0
mirror of https://github.com/bitwarden/web synced 2025-12-12 14:23:18 +00:00

Apply Prettier (#1347)

This commit is contained in:
Oscar Hinton
2021-12-17 15:57:11 +01:00
committed by GitHub
parent 2b0a9d995e
commit 56477eb39c
414 changed files with 33390 additions and 26857 deletions

View File

@@ -1,37 +1,39 @@
import {
Component,
EventEmitter,
Input,
Output,
} from '@angular/core';
import { Utils } from 'jslib-common/misc/utils';
import { Component, EventEmitter, Input, Output } from "@angular/core";
import { Utils } from "jslib-common/misc/utils";
@Component({
selector: 'app-nested-checkbox',
templateUrl: 'nested-checkbox.component.html',
selector: "app-nested-checkbox",
templateUrl: "nested-checkbox.component.html",
})
export class NestedCheckboxComponent {
@Input() parentId: string;
@Input() checkboxes: { id: string, get: () => boolean, set: (v: boolean) => void; }[];
@Output() onSavedUser = new EventEmitter();
@Output() onDeletedUser = new EventEmitter();
@Input()
parentId: string;
@Input()
checkboxes: {
id: string;
get: () => boolean;
set: (v: boolean) => void;
}[];
@Output()
onSavedUser = new EventEmitter();
@Output()
onDeletedUser = new EventEmitter();
get parentIndeterminate() {
return !this.parentChecked &&
this.checkboxes.some(c => c.get());
}
get parentIndeterminate() {
return !this.parentChecked && this.checkboxes.some((c) => c.get());
}
get parentChecked() {
return this.checkboxes.every(c => c.get());
}
get parentChecked() {
return this.checkboxes.every((c) => c.get());
}
set parentChecked(value: boolean) {
this.checkboxes.forEach(c => {
c.set(value);
});
}
set parentChecked(value: boolean) {
this.checkboxes.forEach((c) => {
c.set(value);
});
}
pascalize(s: string) {
return Utils.camelToPascalCase(s);
}
pascalize(s: string) {
return Utils.camelToPascalCase(s);
}
}