1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

Upgrade Angular to 9 (#151)

* Upgrade Angular to 8

* Upgrade Angular to 9

* Fix format

* Add ordered-imports tslint rule

* Upgrade Angular CDK to 9.2.4
This commit is contained in:
Oscar Hinton
2020-08-17 18:14:40 +02:00
committed by GitHub
parent 7bf00b4fb3
commit 8fe78916e2
18 changed files with 78 additions and 86 deletions

View File

@@ -3,6 +3,7 @@ import {
moveItemInArray,
} from '@angular/cdk/drag-drop';
import {
Directive,
EventEmitter,
Input,
OnInit,
@@ -41,6 +42,7 @@ import { SecureNoteView } from '../../models/view/secureNoteView';
import { Utils } from '../../misc/utils';
@Directive()
export class AddEditComponent implements OnInit {
@Input() cloneMode: boolean = false;
@Input() folderId: string = null;

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@@ -16,6 +17,7 @@ import { Cipher } from '../../models/domain/cipher';
import { AttachmentView } from '../../models/view/attachmentView';
import { CipherView } from '../../models/view/cipherView';
@Directive()
export class AttachmentsComponent implements OnInit {
@Input() cipherId: string;
@Output() onUploadedAttachment = new EventEmitter();

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
Output,
@@ -8,6 +9,7 @@ import { SearchService } from '../../abstractions/search.service';
import { CipherView } from '../../models/view/cipherView';
@Directive()
export class CiphersComponent {
@Input() activeCipherId: string = null;
@Output() onCipherClicked = new EventEmitter<CipherView>();

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@@ -15,6 +16,7 @@ import { CollectionView } from '../../models/view/collectionView';
import { Cipher } from '../../models/domain/cipher';
@Directive()
export class CollectionsComponent implements OnInit {
@Input() cipherId: string;
@Input() allowSelectNone = false;

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Output,
} from '@angular/core';
@@ -7,6 +8,7 @@ import { EnvironmentService } from '../../abstractions/environment.service';
import { I18nService } from '../../abstractions/i18n.service';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
@Directive()
export class EnvironmentComponent {
@Output() onSaved = new EventEmitter();

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Output,
} from '@angular/core';
@@ -10,6 +11,7 @@ import { I18nService } from '../../abstractions/i18n.service';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { EventType } from '../../enums/eventType';
@Directive()
export class ExportComponent {
@Output() onSaved = new EventEmitter();

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@@ -11,6 +12,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { FolderView } from '../../models/view/folderView';
@Directive()
export class FolderAddEditComponent implements OnInit {
@Input() folderId: string;
@Output() onSavedFolder = new EventEmitter<FolderView>();

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
Output,
@@ -18,6 +19,7 @@ import { UserService } from '../../abstractions/user.service';
import { ConstantsService } from '../../services/constants.service';
@Directive()
export class GroupingsComponent {
@Input() showFolders = true;
@Input() showCollections = true;

View File

@@ -1,4 +1,5 @@
import {
Directive,
Input,
OnInit,
} from '@angular/core';
@@ -25,6 +26,7 @@ const Keys = {
rememberEmail: 'rememberEmail',
};
@Directive()
export class LoginComponent implements OnInit {
@Input() email: string = '';
@Input() rememberEmail = true;

View File

@@ -20,7 +20,7 @@ export class ModalComponent implements OnDestroy {
@Output() onClosed = new EventEmitter();
@Output() onShow = new EventEmitter();
@Output() onShown = new EventEmitter();
@ViewChild('container', { read: ViewContainerRef }) container: ViewContainerRef;
@ViewChild('container', { read: ViewContainerRef, static: true }) container: ViewContainerRef;
parentContainer: ViewContainerRef = null;
fade: boolean = true;

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@@ -11,6 +12,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { PasswordGeneratorPolicyOptions } from '../../models/domain/passwordGeneratorPolicyOptions';
@Directive()
export class PasswordGeneratorComponent implements OnInit {
@Input() showSelect: boolean = false;
@Output() onSelected = new EventEmitter<string>();

View File

@@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@@ -19,6 +20,7 @@ import { CollectionView } from '../../models/view/collectionView';
import { Utils } from '../../misc/utils';
@Directive()
export class ShareComponent implements OnInit {
@Input() cipherId: string;
@Input() organizationId: string;

View File

@@ -1,6 +1,6 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
Output,
} from '@angular/core';
@@ -12,6 +12,7 @@ import { AuthService } from '../../abstractions/auth.service';
import { I18nService } from '../../abstractions/i18n.service';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
@Directive()
export class TwoFactorOptionsComponent implements OnInit {
@Output() onProviderSelected = new EventEmitter<TwoFactorProviderType>();
@Output() onRecoverSelected = new EventEmitter();

View File

@@ -1,5 +1,6 @@
import {
ChangeDetectorRef,
Directive,
EventEmitter,
Input,
NgZone,
@@ -30,6 +31,7 @@ import { BroadcasterService } from '../services/broadcaster.service';
const BroadcasterSubscriptionId = 'ViewComponent';
@Directive()
export class ViewComponent implements OnDestroy, OnInit {
@Input() cipherId: string;
@Output() onEditCipher = new EventEmitter<CipherView>();

View File

@@ -8,8 +8,8 @@ import {
} from '@angular/core';
import {
ControlValueAccessor,
NG_VALUE_ACCESSOR,
NgControl,
NG_VALUE_ACCESSOR,
} from '@angular/forms';
// ref: https://juristr.com/blog/2018/02/ng-true-value-directive/