diff --git a/src/popup/app/components/action-buttons.component.ts b/src/popup/app/components/action-buttons.component.ts index 84296a4b9c..26fb4085eb 100644 --- a/src/popup/app/components/action-buttons.component.ts +++ b/src/popup/app/components/action-buttons.component.ts @@ -4,7 +4,7 @@ import { BrowserApi } from '../../../browser/browserApi'; import { ConstantsService } from 'jslib/services/constants.service'; -import PopupUtilsService from '../services/popupUtils.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; export class ActionButtonsController implements ng.IController { onView: Function; @@ -44,7 +44,6 @@ export class ActionButtonsController implements ng.IController { } } - ActionButtonsController.$inject = ['i18nService', '$analytics', 'constantsService', 'toastr', '$timeout', '$window']; export const ActionButtonsComponent = { diff --git a/src/popup/app/components/pop-out.component.ts b/src/popup/app/components/pop-out.component.ts index 6a2892a9d7..0611f715f4 100644 --- a/src/popup/app/components/pop-out.component.ts +++ b/src/popup/app/components/pop-out.component.ts @@ -4,7 +4,7 @@ import { BrowserApi } from '../../../browser/browserApi'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; -import PopupUtilsService from '../services/popupUtils.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; export class PopOutController implements ng.IController { i18n: any; @@ -59,6 +59,8 @@ export class PopOutController implements ng.IController { } } +PopOutController.$inject = ['$analytics', '$window', 'platformUtilsService', 'i18nService']; + export const PopOutComponent = { bindings: {}, controller: PopOutController, diff --git a/src/popup/app/current/current.component.ts b/src/popup/app/current/current.component.ts index 9736cf4bff..9d25ab67c9 100644 --- a/src/popup/app/current/current.component.ts +++ b/src/popup/app/current/current.component.ts @@ -10,7 +10,7 @@ import { UtilsService } from 'jslib/abstractions/utils.service'; import { AutofillService } from '../../../services/abstractions/autofill.service'; -import PopupUtilsService from '../services/popupUtils.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; export class CurrentController { i18n: any; diff --git a/src/popup/app/directives/bit-form.directive.ts b/src/popup/app/directives/bit-form.directive.ts index 1144ed5265..ff09f336f1 100644 --- a/src/popup/app/directives/bit-form.directive.ts +++ b/src/popup/app/directives/bit-form.directive.ts @@ -1,11 +1,10 @@ -import { ValidationService } from '../services/validation.service'; +import { ValidationService } from '../services/validation.service'; export function BitFormDirective($rootScope: ng.IRootScopeService, validationService: ValidationService) { return { require: 'form', restrict: 'A', - link: (scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes, - formCtrl: ng.IFormController) => { + link: (scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: ng.IAttributes, formCtrl: ng.IFormController) => { const watchPromise = attrs.bitForm || null; if (watchPromise) { scope.$watch(watchPromise, formSubmitted.bind(null, formCtrl, scope)); diff --git a/src/popup/app/global/base.controller.ts b/src/popup/app/global/base.controller.ts index d762c6d9a5..16333ba171 100644 --- a/src/popup/app/global/base.controller.ts +++ b/src/popup/app/global/base.controller.ts @@ -1,5 +1,7 @@ -export class BaseController implements ng.IController { +export class BaseController implements ng.IController { constructor($scope: any, i18nService: any) { $scope.i18n = i18nService; } } + +BaseController.$inject = ['$scope', 'i18nService']; diff --git a/src/popup/app/global/main.controller.ts b/src/popup/app/global/main.controller.ts index fb5f73218e..51c7192ba0 100644 --- a/src/popup/app/global/main.controller.ts +++ b/src/popup/app/global/main.controller.ts @@ -1,6 +1,6 @@ import { BrowserApi } from '../../../browser/browserApi'; -import AuthService from '../services/auth.service'; +import { AuthService } from '../services/auth.service'; import { UtilsService } from 'jslib/abstractions/utils.service'; @@ -51,3 +51,6 @@ export class MainController implements ng.IController { BrowserApi.messageListener($window.bitwardenPopupMainMessageListener); } } + +MainController.$inject = ['$scope', '$transitions', '$state', 'authService', 'toastr', 'i18nService', '$analytics', + 'utilsService', '$window']; diff --git a/src/popup/app/global/private-mode.controller.ts b/src/popup/app/global/private-mode.controller.ts index 7ae60b5cf5..a6d728f7b0 100644 --- a/src/popup/app/global/private-mode.controller.ts +++ b/src/popup/app/global/private-mode.controller.ts @@ -9,3 +9,5 @@ export class PrivateModeController implements ng.IController { }; } } + +PrivateModeController.$inject = ['$scope']; diff --git a/src/popup/app/lock/lock.component.ts b/src/popup/app/lock/lock.component.ts index e6f6036b9f..0282a8bc08 100644 --- a/src/popup/app/lock/lock.component.ts +++ b/src/popup/app/lock/lock.component.ts @@ -5,7 +5,7 @@ import { CryptoService } from 'jslib/abstractions/crypto.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; import { UserService } from 'jslib/abstractions/user.service'; -import PopupUtilsService from '../services/popupUtils.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; export class LockController { i18n: any; @@ -59,6 +59,9 @@ export class LockController { } } +LockController.$inject = ['$state', 'i18nService', '$timeout', 'cryptoService', 'toastr', 'userService', + 'messagingService', 'SweetAlert']; + export const LockComponent = { bindings: {}, controller: LockController, diff --git a/src/popup/app/services/auth.service.ts b/src/popup/app/services/auth.service.ts index 144205606a..363f96b26a 100644 --- a/src/popup/app/services/auth.service.ts +++ b/src/popup/app/services/auth.service.ts @@ -11,7 +11,7 @@ import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { TokenService } from 'jslib/abstractions/token.service'; import { UserService } from 'jslib/abstractions/user.service'; -class AuthService { +export class AuthService { constructor(public cryptoService: CryptoService, public apiService: ApiService, public userService: UserService, public tokenService: TokenService, public $rootScope: any, public appIdService: AppIdService, public platformUtilsService: PlatformUtilsService, public constantsService: ConstantsService, @@ -80,4 +80,5 @@ class AuthService { } } -export default AuthService; +AuthService.$inject = ['cryptoService', 'apiService', 'userService', 'tokenService', '$rootScope', 'appIdService', + 'platformUtilsService', 'constantsService', 'messagingService']; diff --git a/src/popup/app/services/popupUtils.service.ts b/src/popup/app/services/popupUtils.service.ts index a3a7aa4723..5524afec59 100644 --- a/src/popup/app/services/popupUtils.service.ts +++ b/src/popup/app/services/popupUtils.service.ts @@ -1,4 +1,4 @@ -export default class PopupUtilsService { +export class PopupUtilsService { static initListSectionItemListeners(doc: Document, angular: any): void { if (!doc) { throw new Error('doc parameter required'); diff --git a/src/popup/app/services/services.module.ts b/src/popup/app/services/services.module.ts index 696ac8414f..bc22460381 100644 --- a/src/popup/app/services/services.module.ts +++ b/src/popup/app/services/services.module.ts @@ -1,8 +1,8 @@ import * as angular from 'angular'; -import AuthService from './auth.service'; +import { AuthService } from './auth.service'; import * as backgroundServices from './background.service'; -import PopupUtilsService from './popupUtils.service'; -import StateService from './state.service'; +import { PopupUtilsService } from './popupUtils.service'; +import { StateService } from './state.service'; import { ValidationService } from './validation.service'; import BrowserMessagingService from '../../../services/browserMessaging.service'; diff --git a/src/popup/app/services/state.service.ts b/src/popup/app/services/state.service.ts index 1ff2db7b05..c9a6d16a73 100644 --- a/src/popup/app/services/state.service.ts +++ b/src/popup/app/services/state.service.ts @@ -2,7 +2,7 @@ import { ConstantsService } from 'jslib/services/constants.service'; import { StorageService } from 'jslib/abstractions/storage.service'; -class StateService { +export class StateService { private state: any = {}; constructor(private storageService: StorageService, private constantsService: ConstantsService) { @@ -34,4 +34,4 @@ class StateService { } } -export default StateService; +StateService.$inject = ['storageService', 'constantsService']; diff --git a/src/popup/app/services/validation.service.ts b/src/popup/app/services/validation.service.ts index f68f540cb7..4738b56799 100644 --- a/src/popup/app/services/validation.service.ts +++ b/src/popup/app/services/validation.service.ts @@ -32,3 +32,5 @@ export class ValidationService { } } + +ValidationService.$inject = ['toastr', 'i18nService']; diff --git a/src/popup/app/settings/about.component.ts b/src/popup/app/settings/about.component.ts index 6956d8ebbd..674017d4a7 100644 --- a/src/popup/app/settings/about.component.ts +++ b/src/popup/app/settings/about.component.ts @@ -14,6 +14,8 @@ export class AboutController { } } +AboutController.$inject = ['i18nService']; + export const AboutComponent = { bindings: {}, controller: AboutController, diff --git a/src/popup/app/settings/credits.component.ts b/src/popup/app/settings/credits.component.ts index 444f997cf5..ad7384c2f0 100644 --- a/src/popup/app/settings/credits.component.ts +++ b/src/popup/app/settings/credits.component.ts @@ -15,6 +15,8 @@ export class CreditsController { } } +CreditsController.$inject = ['i18nService', '$analytics']; + export const CreditsComponent = { bindings: {}, controller: CreditsController, diff --git a/src/popup/app/settings/environment.component.ts b/src/popup/app/settings/environment.component.ts index e5e07c1150..0465e8d342 100644 --- a/src/popup/app/settings/environment.component.ts +++ b/src/popup/app/settings/environment.component.ts @@ -3,7 +3,7 @@ import * as template from './environment.component.html'; import { EnvironmentService } from 'jslib/abstractions/environment.service'; -import PopupUtilsService from '../services/popupUtils.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; export class EnvironmentController { iconsUrl: string; @@ -13,8 +13,8 @@ export class EnvironmentController { baseUrl: string; i18n: any; - constructor(private i18nService: any, private $analytics: any, - private environmentService: EnvironmentService, private toastr: any, private $timeout: ng.ITimeoutService) { + constructor(private i18nService: any, private $analytics: any, private environmentService: EnvironmentService, + private toastr: any, private $timeout: ng.ITimeoutService) { this.i18n = i18nService; $timeout(() => { @@ -51,6 +51,8 @@ export class EnvironmentController { } } +EnvironmentController.$inject = ['i18nService', '$analytics', 'environmentService', 'toastr', '$timeout']; + export const EnvironmentComponent = { bindings: {}, controller: EnvironmentController, diff --git a/src/popup/app/settings/folders/add-folder.component.ts b/src/popup/app/settings/folders/add-folder.component.ts index 123c5db461..6ba687fe5c 100644 --- a/src/popup/app/settings/folders/add-folder.component.ts +++ b/src/popup/app/settings/folders/add-folder.component.ts @@ -5,7 +5,7 @@ import { Folder } from 'jslib/models/domain/folder'; import { FolderService } from 'jslib/abstractions/folder.service'; -import PopupUtilsService from '../../services/popupUtils.service'; +import { PopupUtilsService } from '../../services/popupUtils.service'; export class AddFolderController { savePromise: any; @@ -40,6 +40,8 @@ export class AddFolderController { } } +AddFolderController.$inject = ['folderService', '$state', 'toastr', '$analytics', 'i18nService', '$timeout']; + export const AddFolderComponent = { bindings: {}, controller: AddFolderController, diff --git a/src/popup/app/settings/folders/edit-folder.component.ts b/src/popup/app/settings/folders/edit-folder.component.ts index 7084f7e711..c491e3d4fa 100644 --- a/src/popup/app/settings/folders/edit-folder.component.ts +++ b/src/popup/app/settings/folders/edit-folder.component.ts @@ -5,7 +5,7 @@ import { Folder } from 'jslib/models/domain/folder'; import { FolderService } from 'jslib/abstractions/folder.service'; -import PopupUtilsService from '../../services/popupUtils.service'; +import { PopupUtilsService } from '../../services/popupUtils.service'; export class EditFolderController { $transition$: any; @@ -72,6 +72,9 @@ export class EditFolderController { } } +EditFolderController.$inject = ['$scope', '$stateParams', 'folderService', 'toastr', '$state', 'SweetAlert', + '$analytics', 'i18nService', '$timeout']; + export const EditFolderComponent = { bindings: { $transition$: '<', diff --git a/src/popup/app/settings/folders/folders.component.ts b/src/popup/app/settings/folders/folders.component.ts index 5cda2888cb..6c8752ba68 100644 --- a/src/popup/app/settings/folders/folders.component.ts +++ b/src/popup/app/settings/folders/folders.component.ts @@ -35,6 +35,8 @@ export class FoldersController { } } +FoldersController.$inject = ['folderService', '$state', 'i18nService']; + export const FoldersComponent = { bindings: {}, controller: FoldersController, diff --git a/src/popup/app/settings/help.component.ts b/src/popup/app/settings/help.component.ts index 5727f5af49..4421ca81c3 100644 --- a/src/popup/app/settings/help.component.ts +++ b/src/popup/app/settings/help.component.ts @@ -30,6 +30,8 @@ export class HelpController { } } +HelpController.$inject = ['i18nService', '$analytics']; + export const HelpComponent = { bindings: {}, controller: HelpController, diff --git a/src/popup/app/settings/options.component.ts b/src/popup/app/settings/options.component.ts index ea8f64a1cc..f04cf72b3d 100644 --- a/src/popup/app/settings/options.component.ts +++ b/src/popup/app/settings/options.component.ts @@ -8,8 +8,8 @@ import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { StorageService } from 'jslib/abstractions/storage.service'; import { TotpService } from 'jslib/abstractions/totp.service'; -import PopupUtilsService from '../services/popupUtils.service'; -import StateService from '../services/state.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; +import { StateService } from '../services/state.service'; export class OptionsController { disableFavicon = false; @@ -95,6 +95,9 @@ export class OptionsController { } } +OptionsController.$inject = ['i18nService', '$analytics', 'constantsService', 'platformUtilsService', 'totpService', + 'stateService', 'storageService', 'messagingService', '$timeout']; + export const OptionsComponent = { bindings: {}, controller: OptionsController, diff --git a/src/popup/app/settings/premium.component.ts b/src/popup/app/settings/premium.component.ts index 7326c08576..9f24287888 100644 --- a/src/popup/app/settings/premium.component.ts +++ b/src/popup/app/settings/premium.component.ts @@ -58,6 +58,9 @@ export class PremiumController { } } +PremiumController.$inject = ['i18nService', 'tokenService', 'apiService', 'toastr', 'SweetAlert', '$analytics', + '$timeout']; + export const PremiumComponent = { bindings: {}, controller: PremiumController, diff --git a/src/popup/app/settings/settings.component.ts b/src/popup/app/settings/settings.component.ts index 947e5dac5f..8ef7bd22c7 100644 --- a/src/popup/app/settings/settings.component.ts +++ b/src/popup/app/settings/settings.component.ts @@ -13,7 +13,7 @@ import { MessagingService } from 'jslib/abstractions/messaging.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { StorageService } from 'jslib/abstractions/storage.service'; -import PopupUtilsService from '../services/popupUtils.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; const RateUrls = { [DeviceType.Chrome]: @@ -161,6 +161,9 @@ export class SettingsController { } } +SettingsController.$inject = ['$state', 'SweetAlert', 'platformUtilsService', '$analytics', 'i18nService', + 'constantsService', 'cryptoService', 'lockService', 'storageService', 'messagingService', '$timeout']; + export const SettingsComponent = { bindings: {}, controller: SettingsController, diff --git a/src/popup/app/tools/export.component.ts b/src/popup/app/tools/export.component.ts index 67f5133a63..f7e59ceac0 100644 --- a/src/popup/app/tools/export.component.ts +++ b/src/popup/app/tools/export.component.ts @@ -154,6 +154,9 @@ export class ExportController { } } +ExportController.$inject = ['$state', 'cryptoService', 'toastr', 'utilsService', '$analytics', 'i18nService', + 'folderService', 'cipherService', '$window', 'userService']; + export const ExportComponent = { bindings: {}, controller: ExportController, diff --git a/src/popup/app/tools/password-generator-history.component.ts b/src/popup/app/tools/password-generator-history.component.ts index dade6e5cc9..5b165e03da 100644 --- a/src/popup/app/tools/password-generator-history.component.ts +++ b/src/popup/app/tools/password-generator-history.component.ts @@ -47,6 +47,9 @@ export class PasswordGeneratorHistoryController { } } +PasswordGeneratorHistoryController.$inject = ['$state', 'passwordGenerationService', 'toastr', '$analytics', + 'i18nService']; + export const PasswordGeneratorHistoryComponent = { bindings: { $transition$: '<', diff --git a/src/popup/app/tools/password-generator.component.ts b/src/popup/app/tools/password-generator.component.ts index 08a5212f7b..e665c2a28d 100644 --- a/src/popup/app/tools/password-generator.component.ts +++ b/src/popup/app/tools/password-generator.component.ts @@ -3,7 +3,7 @@ import * as template from './password-generator.component.html'; import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service'; -import PopupUtilsService from '../services/popupUtils.service'; +import { PopupUtilsService } from '../services/popupUtils.service'; export class PasswordGeneratorController { $transition$: any; @@ -15,8 +15,7 @@ export class PasswordGeneratorController { i18n: any; constructor(private $state: any, private passwordGenerationService: PasswordGenerationService, - private toastr: any, private $analytics: any, private i18nService: any, - private $timeout: ng.ITimeoutService) { + private toastr: any, private $analytics: any, private i18nService: any, private $timeout: ng.ITimeoutService) { this.i18n = i18nService; passwordGenerationService.getOptions().then((options: any) => { @@ -136,6 +135,9 @@ export class PasswordGeneratorController { } } +PasswordGeneratorController.$inject = ['$state', 'passwordGenerationService', 'toastr', '$analytics', 'i18nService', + '$timeout']; + export const PasswordGeneratorComponent = { bindings: { $transition$: '<', diff --git a/src/popup/app/tools/tools.component.ts b/src/popup/app/tools/tools.component.ts index 93222073c8..3279408af6 100644 --- a/src/popup/app/tools/tools.component.ts +++ b/src/popup/app/tools/tools.component.ts @@ -11,9 +11,8 @@ export class ToolsController { i18n: any; private webVaultBaseUrl: string = 'https://vault.bitwarden.com'; - constructor(private SweetAlert: any, private i18nService: any, - private $analytics: any, private platformUtilsService: PlatformUtilsService, - private environmentService: EnvironmentService) { + constructor(private SweetAlert: any, private i18nService: any, private $analytics: any, + private platformUtilsService: PlatformUtilsService, private environmentService: EnvironmentService) { this.i18n = i18nService; this.showExport = !platformUtilsService.isEdge(); this.showPopout = !platformUtilsService.isSafari(); @@ -56,6 +55,8 @@ export class ToolsController { } } +ToolsController.$inject = ['SweetAlert', 'i18nService', '$analytics', 'platformUtilsService', 'environmentService']; + export const ToolsComponent = { bindings: {}, controller: ToolsController,