* Implement ProtonPass json importer
* Add protonpass-importer json type definition
* Fix alphabetical order in importer imports
* Add importer error message for encrypted protonpass imports
* Add i18n to protonpass importer
* Add protonpass (zip) importer
* Fix protonpass importer
* Add unit tests for protonpass importer
* Make protonpass importer not discard totp codes
* Merge protonpass json & zip importers
* Add protonpass creditcard import & fix note import
* Fix protonpass zip import not recognizing zip files on windows/chrome
* Make protonpass importer use vault types
* Make protonpass importer treat vaults as folders
* Make protonpass importer treat folders as collections for organizations
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
* Add types to protonpass test data
* Fix protonpass importer's moveFoldersToCollections
* Add tests for folders/collections
* Remove unecessary type cast in protonpass importer
* Remove unecessary type annotations in protonpass importer
* Add assertion for credit card cvv in protonpass importer
* Handle trashed items in protonpass importer
* Fix setting expiry month on credit cards
* Fix wrong folder-assignment
Only the first item of a "vault" was getting assigned to a folder
Extend unit tests to verify behaviour
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith@web.de>
* Add password history to json exports
Change callout to not mention missing password history any longer
* Added item meta dates to json exports
Added vault items creation-/revision-/deleted-dates to json exports
* Removed unnecessary promises
* Add bitwarden-json-export types
Define types
Use types in vault-export-service
Move existing password-protected type to export-types
* Use bitwarden-json-export types in bitwarden-json-importer
* Clean up passwordHistory if needed
* Define and use bitwarden-csv-export-types
* Migrate callouts to the CL ones
* Add folder/collection selection
* Use bitTypography as page header/title
* Migrate submit button to CL
* Migrate fileSelector and fileContents
* Add ability to import into an existing folder/collection
Extended import.service and abstraction to receive importTarget on import()
Pass selectedImportTarget to importService.import()
Wrote unit tests
* Added vault selector, folders/collections selection logic and component library to the import
* Revert changes to the already migrated CL fileSelector, fileContents and header/title
* Fix fileContents input and spacing to submit button
* Use id's instead of name for tghe targetSelector
* Remove unneeded empty line
* Fix import into existing folder/collection
Map ciphers with no folder/no collection to the new rootFolder when selected by the user
Modified and added unit tests
* Added CL to fileSelector and fileInput on vault import
* Added reactive forms and new selector logic to import vault
* Added new texts on Import Vault
* Corrected logic on enable targetSelector
* Removing target selector from being required
* Fixed imports after messing up a merge conflict
* Set No-Folder as default
* Show icons (folder/collection) on targetSelector
* Add icons to vaultSelector
* Set `My Vault` as default of the vaultSelector
* Updates labels based on feedback from design
* Set `My Vault` as default of the vaultSelector pt2
* Improvements to reactive forms on import.component
* Only disabling individual vault import on PersonalOwnership policy
* Use import destination instead of import location
* Add hint to folder/collection dropdown
* Removed required attribute as provided by formGroup
* Display no collection option same as no folder
* Show error on org import with unassigned items
Only admins can have unassigned items (items with no collection)
If these are present in a export/backup file, they should still be imported, to not break existing behaviour. This is limited to admins.
When a member of an org does not set a root collection (no collection option) and any items are unassigned an error message is shown and the import is aborted.
* Removed for-attribute from bit-labels
* Removed bitInput from bit-selects
* Updates to messages.json after PR feedback
* Removed name-attribute from bit-selects
* Removed unneeded variables
* Removed unneeded line break
* Migrate form to use bitSubmit
Rename old submit() to performImport()
Create submit arrow function calling performImport() (which can be overridden/called by org-import.component)
Remove #form and ngNativeValidate
Add bitSubmit and bitFormButton directives
Remove now unneeded loading variable
* Added await to super.performImport()
* Move form check into submit
* AC-1558 - Enable org import with remove individual vault policy
Hide the `My Vault` entry when policy is active
Always check if the policy applies and disable the formGroup if no vault-target is selectable
* [AC-1549] Import page design updates (#5933)
* Display select folder/collection in targetSelector
Filter the no-folder entry from the folderViews-observable
Add labels for the targetSelector placeholders
* Update importTargetHint and remove importTargetOrgHint
* Update language on importUnassignedItemsError
* Add help icon with link to the import documentation
---------
Co-authored-by: Andre Rosado <arosado@bitwarden.com>
* Migrate file-password-prompt to Dialog
* Fix issue with cancel/empty password returned
* Removed unneeded click handler to cancel dialog
* Added margin as requested by design
* Only apply margin to top of field
* Call submit when clicking on Import data
* Add form and and submit trigger
* Defining the card brand according to its number
* Moving cardBrandByPatterns function to Card View
* Getting Card brand via cardBrandByPatterns function
* Changing cardBrandByPatterns method to static. See:
The reason being that someone wanting to use this outside of the onCardNumberChange would need to know to set the cc-number on the view-model before calling cardBrandByPatterns
* Defining the card brand according to its number on Desktop
* Defining the card brand according to its number on Web
* Rename service-factory folder
* Move cryptographic service factories
* Move crypto models
* Move crypto services
* Move domain base class
* Platform code owners
* Move desktop log services
* Move log files
* Establish component library ownership
* Move background listeners
* Move background background
* Move localization to Platform
* Move browser alarms to Platform
* Move browser state to Platform
* Move CLI state to Platform
* Move Desktop native concerns to Platform
* Move flag and misc to Platform
* Lint fixes
* Move electron state to platform
* Move web state to Platform
* Move lib state to Platform
* Fix broken tests
* Rename interface to idiomatic TS
* `npm run prettier` 🤖
* Resolve review feedback
* Set platform as owners of web core and shared
* Expand moved services
* Fix test types
---------
Co-authored-by: Hinton <hinton@users.noreply.github.com>
* Fix importer parsing credit card expiry year
When importing a credit card from Enpass it was found that with a 4
digit expiry year was prefixed with '20', stored at 11/202025 instead of
11/2025.
Fixed typo that checked length of month instead of year which
incorrectly added prefix.
* Refactor setCardExpiration to use RegExp
* Return error code when any tsc typecheck fails
* Try with bash
`sh ./scripts/test-types.s` resulted in errors missing `[[`,
which is a bash builtin. It's possible the ubuntu runner is using
some other shell.
* Fix spec type errors
* Switch to node for Windows compatibility
* Create and register new libs/exporter
Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint
* Migrate exportService to libs/exporter
Move exportService (abstraction and impl) into libs/exporter
Refactored exportService to be split into vault-export and event-export
Created barrel-files for both exports
Moved export.service.spec.ts into vault-export
Created an export-helper, which helps build the filename (extract method refactor from ExportService)
* Move components in libs/angular into tools-subfolder
Moved components
Updated imports in jslib-services.module and jslib.module
* Register libs/exporter with browser and fix imports
Move export.component into tools-subfolder
* Register libs/exporter with cli and fix imports
Move export.command into tools-subfolder
* Register libs/exporter with desktop and fix imports
Move export.component into tools-subfolder
* Move export models to libs/exporter
* Update web imports
* Update package-lock.json
* Move export models back as it would create circular dependency
Reponse models in common rely on export models which are in libs/exporter, which relies on common
* Fix up web for event-export
* Update CODEOWNERS
* Add export-models to team-tools-dev
* Simplify domain import
* Moving EventExport into web
* Prefer callback over error-flow to prompt for password
Remove error-flow to request file password
Prefer callback, which has to be provided when retrieving/creating an instance.
Delete ImportError
Call BitwardenPasswordProtector for all Bitwarden json imports, as it extends BitwardenJsonImporter
Throw errors instead of returning
Return ImportResult
Fix and extend tests import.service
Replace "@fluffy-spoon/substitute" with "jest-mock-extended"
* Fix up test cases
Delete bitwarden-json-importer.spec.ts
Add test case to ensure bitwarden-json-importer.ts is called given unencrypted or account-protected files
* Move file-password-prompt into dialog-folder
* Add import success dialog
* Fix typo
* Only list the type when at least one got imported
* update copy based on design feedback
* Remove unnecessary /index import
* Remove promptForPassword_callback from interface
PR feedback from @MGibson1 that giving every importer the ability to request a password is unnecessary. Instead, we can pass the callback into the constructor for every importer that needs this functionality
* Remove unneeded import of BitwardenJsonImporter
* Fix spec constructor
* Fixed organizational import
Added an else statement, or else we'd import into an org and then also import into an individual vault
* PS-2390 - Passing folder and collection id on import
Reading groupingid from lastpass csv as collection or folder id
* PS-2390 - Added toDomain and toModel on FolderWithIdExport model and created CollectionWithIdExport model
* PS-2390 - renamed groupingid into bwcollectionid on lastpass importer
* PS-2390 - Updated collection/folder-with-id export to reuse parent toDomain and toView
* PS-2390 Undo the lastpass importer groupingId rename
* PS-2390 Undo lastpass importer changes
* PS-2390 - Removed externalId set. Cleaning collection-with-id-request to user parent properties
* Lint prettier
* Fix encrypted export using fixed PBKDF2 iterations
* Replace hardcoded KdfType in importer
* Clean up kdf handling in password-protected export
* Extract BitwardenPasswordProtectedFileFormat
* Rename bitwarden-json-types
* Move StateService import to fix linting issue
* Make linter happy
* Use abstraction instead of implementation
---------
Co-authored-by: Daniel James Smith <djsmith@web.de>
* Create and register new libs/importer
Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint
* Move importer-related files to libs/importer
* Move importer-spec-related files to libs/importer
Move import.service.spec
* Update package-lock.json
* Set CODEOWNERS for new libs/importer
* Register libs/importer with cli and fix imports
* Register libs/importer with web and fix imports
* Move importOption into models
Rename importOptions to import-options
* Fix linting issues after updating prettier
* Only expose necessary files from libs/importer
Fix tsconfig files
- Removes the trailing /index on imports in web/cli
As the spec-files no longer can access the internals via @bitwarden/importer they import by path (../src/importers)
* Add barrel files to vendors with more than one importer