[PM-6780][PM-6781] Create vault-export-ui package / Migrate export-scope-callout.component to CL (#8318)
* PM-6780 - Create vault-export-ui package * Migrate export-scope-callout to CL - Move export-scope-callout.component to vault-export-UI - Use bit-callout instead of app-callout - Make component standalone - Remove from jslib.module - Prefix selector with team-name - Export it from vault-export-ui * Update usage of tools-export-scope-callout for desktop * Update usage of tools-export-scope-callout for web * Update usage of tools-export-scope-callout for browser * Change package description --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>pull/8415/head
parent
eedf00e215
commit
c6327d7f12
@ -1,12 +1,19 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
|
||||
import { ExportScopeCalloutComponent } from "@bitwarden/vault-export-ui";
|
||||
|
||||
import { LooseComponentsModule, SharedModule } from "../../../../shared";
|
||||
|
||||
import { OrganizationVaultExportRoutingModule } from "./org-vault-export-routing.module";
|
||||
import { OrganizationVaultExportComponent } from "./org-vault-export.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule, LooseComponentsModule, OrganizationVaultExportRoutingModule],
|
||||
imports: [
|
||||
SharedModule,
|
||||
LooseComponentsModule,
|
||||
OrganizationVaultExportRoutingModule,
|
||||
ExportScopeCalloutComponent,
|
||||
],
|
||||
declarations: [OrganizationVaultExportComponent],
|
||||
})
|
||||
export class OrganizationVaultExportModule {}
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
|
||||
import { ExportScopeCalloutComponent } from "@bitwarden/vault-export-ui";
|
||||
|
||||
import { LooseComponentsModule, SharedModule } from "../../shared";
|
||||
|
||||
import { ExportRoutingModule } from "./export-routing.module";
|
||||
import { ExportComponent } from "./export.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule, LooseComponentsModule, ExportRoutingModule],
|
||||
imports: [SharedModule, LooseComponentsModule, ExportRoutingModule, ExportScopeCalloutComponent],
|
||||
declarations: [ExportComponent],
|
||||
})
|
||||
export class ExportModule {}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
const { pathsToModuleNameMapper } = require("ts-jest");
|
||||
|
||||
const { compilerOptions } = require("../../../../shared/tsconfig.libs");
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
testMatch: ["**/+(*.)+(spec).+(ts)"],
|
||||
preset: "ts-jest",
|
||||
testEnvironment: "jsdom",
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, {
|
||||
prefix: "<rootDir>/../../../",
|
||||
}),
|
||||
};
|
||||
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@bitwarden/vault-export-ui",
|
||||
"version": "0.0.0",
|
||||
"description": "Angular components for the Bitwarden vault exporter",
|
||||
"keywords": [
|
||||
"bitwarden"
|
||||
],
|
||||
"author": "Bitwarden Inc.",
|
||||
"homepage": "https://bitwarden.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bitwarden/clients"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"build": "npm run clean && tsc",
|
||||
"build:watch": "npm run clean && tsc -watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bitwarden/common": "file:../../../../common",
|
||||
"@bitwarden/angular": "file:../../../../angular",
|
||||
"@bitwarden/vault-export-core": "file:../vault-export-core"
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
<ng-container *ngIf="show">
|
||||
<app-callout type="info" title="{{ scopeConfig.title | i18n }}">
|
||||
<bit-callout type="info" title="{{ scopeConfig.title | i18n }}">
|
||||
{{ scopeConfig.description | i18n: scopeConfig.scopeIdentifier }}
|
||||
</app-callout>
|
||||
</bit-callout>
|
||||
</ng-container>
|
||||
@ -1,11 +1,16 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, Input, OnInit } from "@angular/core";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||
import { CalloutModule } from "@bitwarden/components";
|
||||
|
||||
@Component({
|
||||
selector: "app-export-scope-callout",
|
||||
selector: "tools-export-scope-callout",
|
||||
templateUrl: "export-scope-callout.component.html",
|
||||
standalone: true,
|
||||
imports: [CommonModule, JslibModule, CalloutModule],
|
||||
})
|
||||
export class ExportScopeCalloutComponent implements OnInit {
|
||||
show = false;
|
||||
@ -0,0 +1 @@
|
||||
export { ExportScopeCalloutComponent } from "./components/export-scope-callout.component";
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "../../../../shared/tsconfig.libs",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "./tsconfig.json"
|
||||
}
|
||||
Loading…
Reference in new issue