mirror of
https://github.com/bitwarden/browser
synced 2025-12-28 14:13:22 +00:00
* Initial org filter work * update jslib * Move filter to below cipher length check * don't show vault filter in personal or org folder * Use family icon for families org * jslib and auth guard updates * lint fixes * rename GroupingsComponent to VaultFilterComponent * fix no folder showing all items * Add checks for PersonalOwnership policy * update css class names * lint fixes * cleanup * Some final cleanup * import order lint fix * remove unused import * Use smaller icon for chevron * Update src/popup/vault/organization-filter.component.ts Co-authored-by: Addison Beck <addisonbeck1@gmail.com> * Update src/popup/vault/organization-filter.component.ts Co-authored-by: Addison Beck <addisonbeck1@gmail.com> * fix lint error * remove extra localizations * rename orgFilter -> vaultSelect * Rename orgFilterService to VaultSelectService * lint fixes * combine vault select service with vault filter service * Use base vault filter service methods * Use VaultFilter model and other small fixes * lint fixes * Final restructuring pass * Update jslib and remove extra function * Remove extra imports * remove space * Remove vaultFilterService from background services * Update jslib to latest on feature branch * merge fix * update jslib * [feat] Implement EUVR for desktop Should contain only https://github.com/bitwarden/desktop/pull/1487, with merge resolutions and style fixes * [fix] Delete unused GroupingsComponentTemplate * [dep] Update jslib Co-authored-by: Addison Beck <addisonbeck1@gmail.com>
135 lines
5.2 KiB
TypeScript
135 lines
5.2 KiB
TypeScript
import { APP_INITIALIZER, InjectionToken, NgModule } from "@angular/core";
|
|
|
|
import {
|
|
JslibServicesModule,
|
|
SECURE_STORAGE,
|
|
STATE_FACTORY,
|
|
STATE_SERVICE_USE_CACHE,
|
|
CLIENT_TYPE,
|
|
LOCALES_DIRECTORY,
|
|
SYSTEM_LANGUAGE,
|
|
} from "jslib-angular/services/jslib-services.module";
|
|
import { BroadcasterService as BroadcasterServiceAbstraction } from "jslib-common/abstractions/broadcaster.service";
|
|
import { CryptoService as CryptoServiceAbstraction } from "jslib-common/abstractions/crypto.service";
|
|
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "jslib-common/abstractions/cryptoFunction.service";
|
|
import { I18nService as I18nServiceAbstraction } from "jslib-common/abstractions/i18n.service";
|
|
import {
|
|
LogService,
|
|
LogService as LogServiceAbstraction,
|
|
} from "jslib-common/abstractions/log.service";
|
|
import { MessagingService as MessagingServiceAbstraction } from "jslib-common/abstractions/messaging.service";
|
|
import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "jslib-common/abstractions/passwordReprompt.service";
|
|
import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "jslib-common/abstractions/platformUtils.service";
|
|
import { StateService as StateServiceAbstraction } from "jslib-common/abstractions/state.service";
|
|
import { StateMigrationService as StateMigrationServiceAbstraction } from "jslib-common/abstractions/stateMigration.service";
|
|
import { StorageService as StorageServiceAbstraction } from "jslib-common/abstractions/storage.service";
|
|
import { SystemService as SystemServiceAbstraction } from "jslib-common/abstractions/system.service";
|
|
import { ClientType } from "jslib-common/enums/clientType";
|
|
import { StateFactory } from "jslib-common/factories/stateFactory";
|
|
import { GlobalState } from "jslib-common/models/domain/globalState";
|
|
import { SystemService } from "jslib-common/services/system.service";
|
|
import { ElectronCryptoService } from "jslib-electron/services/electronCrypto.service";
|
|
import { ElectronLogService } from "jslib-electron/services/electronLog.service";
|
|
import { ElectronPlatformUtilsService } from "jslib-electron/services/electronPlatformUtils.service";
|
|
import { ElectronRendererMessagingService } from "jslib-electron/services/electronRendererMessaging.service";
|
|
import { ElectronRendererSecureStorageService } from "jslib-electron/services/electronRendererSecureStorage.service";
|
|
import { ElectronRendererStorageService } from "jslib-electron/services/electronRendererStorage.service";
|
|
|
|
import { Account } from "../../models/account";
|
|
import { I18nService } from "../../services/i18n.service";
|
|
import { NativeMessagingService } from "../../services/nativeMessaging.service";
|
|
import { PasswordRepromptService } from "../../services/passwordReprompt.service";
|
|
import { StateService } from "../../services/state.service";
|
|
import { LoginGuard } from "../guards/login.guard";
|
|
import { SearchBarService } from "../layout/search/search-bar.service";
|
|
|
|
import { InitService } from "./init.service";
|
|
|
|
const RELOAD_CALLBACK = new InjectionToken<() => any>("RELOAD_CALLBACK");
|
|
|
|
@NgModule({
|
|
imports: [JslibServicesModule],
|
|
declarations: [],
|
|
providers: [
|
|
InitService,
|
|
NativeMessagingService,
|
|
SearchBarService,
|
|
LoginGuard,
|
|
{
|
|
provide: APP_INITIALIZER,
|
|
useFactory: (initService: InitService) => initService.init(),
|
|
deps: [InitService],
|
|
multi: true,
|
|
},
|
|
{
|
|
provide: STATE_FACTORY,
|
|
useValue: new StateFactory(GlobalState, Account),
|
|
},
|
|
{
|
|
provide: CLIENT_TYPE,
|
|
useValue: ClientType.Desktop,
|
|
},
|
|
{
|
|
provide: RELOAD_CALLBACK,
|
|
useValue: null,
|
|
},
|
|
{ provide: LogServiceAbstraction, useClass: ElectronLogService, deps: [] },
|
|
{
|
|
provide: PlatformUtilsServiceAbstraction,
|
|
useClass: ElectronPlatformUtilsService,
|
|
deps: [
|
|
I18nServiceAbstraction,
|
|
MessagingServiceAbstraction,
|
|
CLIENT_TYPE,
|
|
StateServiceAbstraction,
|
|
],
|
|
},
|
|
{
|
|
provide: I18nServiceAbstraction,
|
|
useClass: I18nService,
|
|
deps: [SYSTEM_LANGUAGE, LOCALES_DIRECTORY],
|
|
},
|
|
{
|
|
provide: MessagingServiceAbstraction,
|
|
useClass: ElectronRendererMessagingService,
|
|
deps: [BroadcasterServiceAbstraction],
|
|
},
|
|
{ provide: StorageServiceAbstraction, useClass: ElectronRendererStorageService },
|
|
{ provide: SECURE_STORAGE, useClass: ElectronRendererSecureStorageService },
|
|
{
|
|
provide: CryptoServiceAbstraction,
|
|
useClass: ElectronCryptoService,
|
|
deps: [
|
|
CryptoFunctionServiceAbstraction,
|
|
PlatformUtilsServiceAbstraction,
|
|
LogServiceAbstraction,
|
|
StateServiceAbstraction,
|
|
],
|
|
},
|
|
{
|
|
provide: SystemServiceAbstraction,
|
|
useClass: SystemService,
|
|
deps: [
|
|
MessagingServiceAbstraction,
|
|
PlatformUtilsServiceAbstraction,
|
|
RELOAD_CALLBACK,
|
|
StateServiceAbstraction,
|
|
],
|
|
},
|
|
{ provide: PasswordRepromptServiceAbstraction, useClass: PasswordRepromptService },
|
|
{
|
|
provide: StateServiceAbstraction,
|
|
useClass: StateService,
|
|
deps: [
|
|
StorageServiceAbstraction,
|
|
SECURE_STORAGE,
|
|
LogService,
|
|
StateMigrationServiceAbstraction,
|
|
STATE_FACTORY,
|
|
STATE_SERVICE_USE_CACHE,
|
|
],
|
|
},
|
|
],
|
|
})
|
|
export class ServicesModule {}
|