bitwarden-estensione-browser/apps/web/src/app/organizations/tools/export.component.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

84 lines
2.8 KiB
TypeScript
Raw Normal View History

2018-07-05 20:40:53 +02:00
import { Component } from "@angular/core";
import { FormBuilder } from "@angular/forms";
2018-07-05 20:40:53 +02:00
import { ActivatedRoute } from "@angular/router";
import { ModalConfig, ModalService } from "@bitwarden/angular/services/modal.service";
2022-06-21 22:17:57 +02:00
import { UserVerificationPromptService } from "@bitwarden/angular/services/userVerificationPrompt.service";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
2022-06-14 17:10:53 +02:00
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
import { EventService } from "@bitwarden/common/abstractions/event.service";
import { ExportService } from "@bitwarden/common/abstractions/export.service";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
import { PolicyService } from "@bitwarden/common/abstractions/policy.service";
import { StateService } from "@bitwarden/common/abstractions/state.service";
2022-06-14 17:10:53 +02:00
import { UserVerificationService } from "@bitwarden/common/abstractions/userVerification.service";
2018-07-05 20:40:53 +02:00
import { ExportComponent as BaseExportComponent } from "../../tools/export.component";
2019-08-09 17:14:46 +02:00
2018-07-05 20:40:53 +02:00
@Component({
selector: "app-org-export",
templateUrl: "../../tools/export.component.html",
})
export class ExportComponent extends BaseExportComponent {
constructor(
cryptoService: CryptoService,
i18nService: I18nService,
2018-08-14 21:14:04 +02:00
platformUtilsService: PlatformUtilsService,
exportService: ExportService,
eventService: EventService,
private route: ActivatedRoute,
policyService: PolicyService,
logService: LogService,
userVerificationService: UserVerificationService,
formBuilder: FormBuilder,
modalService: ModalService,
apiService: ApiService,
stateService: StateService,
2022-06-21 22:17:57 +02:00
userVerificationPromptService: UserVerificationPromptService,
modalConfig: ModalConfig
) {
super(
cryptoService,
i18nService,
platformUtilsService,
exportService,
eventService,
policyService,
logService,
userVerificationService,
formBuilder,
modalService,
apiService,
stateService,
2022-06-21 22:17:57 +02:00
userVerificationPromptService,
modalConfig
);
2018-07-05 20:40:53 +02:00
}
2021-12-17 15:57:11 +01:00
async ngOnInit() {
this.route.parent.parent.params.subscribe(async (params) => {
2018-07-05 20:40:53 +02:00
this.organizationId = params.organizationId;
});
await super.ngOnInit();
2018-07-05 20:40:53 +02:00
}
2021-12-17 15:57:11 +01:00
async checkExportDisabled() {
return;
}
2021-12-17 15:57:11 +01:00
2018-07-05 20:40:53 +02:00
getExportData() {
2018-12-17 16:54:18 +01:00
return this.exportService.getOrganizationExport(this.organizationId, this.format);
2018-07-05 20:40:53 +02:00
}
2021-12-17 15:57:11 +01:00
2018-07-05 20:40:53 +02:00
getFileName() {
return super.getFileName("org");
}
2022-06-20 23:32:19 +02:00
async collectEvent(): Promise<any> {
// TODO
// await this.eventService.collect(EventType.Organization_ClientExportedVault);
}
2018-07-05 20:40:53 +02:00
}