* migrate change login password service to use bitwarden server rather than fetch directly
- avoids CSP entirely
* add `HelpUsersUpdatePasswords` policy to policy type
* add `HelpUsersUpdatePasswordsPolicy` components
* allow list description override for policy description
* add `HelpUsersUpdatePasswordsPolicy` when the feature flag is enabled
* apply `HelpUsersUpdatePasswords` to everyone in an org
* use policy to guard the well known password API
* fix tests
* refactor to use `policyAppliesToUser$`
* remove policy work for change password - this was removed from scope
* update copy for show favicon setting - it now handles both favicons and change password urls
* remove favicon setting description - no longer needed
* only call change password service when the setting is enabled
* add popover for permitting cipher details
* import permit popover directly into the settings component
* replace `nativeFetch` with `fetch`
* use string literal to construct URL rather than `URL` class
- The `getIconsUrl` can return with an appended path which the new URL constructor will strip when passed as the base parameter
* use string literal to construct URL rather than `URL` class instance (#16045)
- The `getIconsUrl` can return with an appended path which the new URL constructor will strip when passed as the base parameter
* [PM-24716] UI changes for Change URI work (#16043)
* use platform service to launch the URI
- this allows desktop to open a separate browser instance rather than use electron
* fix spacing on web app
* add bitLink for focus/hover states
* remove spacing around links
* enforce restrictions based on collection type, set default collection type
* fix ts strict errors
* fix default collection enforcement in vault header
* enforce default collection restrictions in vault collection row
* enforce default collection restrictions in AC vault header
* enforce default collection restriction for select all
* fix ts strict error
* switch to signal, fix feature flag
* fix story
* clean up
* remove feature flag, move check for defaultCollecion to CollecitonView
* fix test
* remove unused configService
* fix test: coerce null to undefined for collection Id
* clean up leaky abstraction for default collection
* fix ts-strict error
* fix parens
* add new property to models, update logic, refactor for ts-strict
* fix type
* rename defaultCollection getter
* clean up
* clean up
* clean up, add comment, fix submit
* add comment
* add feature flag
* check model for name
* cleanup readonly logic, remove featureflag logic
* wip
* refactor CollectionRequest into Create and Update models
* fix readonly logic
* cleanup
* set defaultUserCollectionEmail in decryption from Collection
* split save into update/create methods
* fix readonly logic
* fix collections post and put requests
* add defaultUserCollection email to model when submitting collection dialog
* disable all remaining form fields for editing personally owned My Items
* fix failing tests
* ensure collection field is also properly disabled
* clean up logic
* fix failing test
* fix test
* refactor variable to avoid using `is` prefix
* directly reference parent form for status rather than subscribe to it
* refactor subscription for form status changes
* use observable as an Output
* disable attachment button on desktop vault when the form
* disable custom field components when custom fields already exist and parent form is disabled
* disable attachments button in the browser when the edit form is disabled
* grab icon button instance for disabled state
---------
Co-authored-by: Nick Krantz <nick@livefront.com>
* create libs/assets
* treeshake lib and filter out non-icons from icon story
* update docs
* fix icon colors in browser and desktop
* better name for vault icon
* move illustrations
* Throw error if appA11yTitle is null in icon button
* Add required label input
* Fix icon button errors in CL components and storeis
* fix popover aria-label errors
* remove commented code
* add labels to icon buttons in browser
* add labels to icon buttons in web
* add labels to icon buttons in license
* add labels to icon buttons in send
* add labels to icon buttons in angular
* fix missing pipe error
* fix sso icon button missed in error
* update labels in vault
* add section expand button label
* Adding labels to icon buttons
* Add lint rule to not allow icon buttons without label input
* rename util file
* trigger updates on title change
* update eslint rule name and folder
* add edit collection label to vault headers
* fix web header story label
* add show/hide summary labels
* update summary message
* fix breadcrumbs label message
* fix JSDoc to use correct input
* remove commented code
* use label as aria-label always. Remove init function
* add moreBreadcrumbs translation message to other apps
* add @bitwarden/team-ui-foundation as code owner for component eslint rules
* switch title to const variable
* add jsdoc comment on what the label input is used for
* [PM-22415] Tax ID notifications for Organizations and Providers (#15996)
* [NO LOGIC] Rename BillableEntity to BitwardenSubscriber
This helps us maintain paraody with server where we call this choice type ISubscriber. I chose BitwardenSubscriber to avoid overlap with RxJS
* [NO LOGIC] Move subscriber-billing.client to clients folder
* [NO LOGIC] Move organization warnings under organization folder
* Move getWarnings from OrganizationBillingApiService to new OrganizationBillingClient
I'd like us to move away from stashing so much in libs and utilizing the JsLibServicesModule when it's not necessary to do so. These are invocations used exclusively by the Web Vault and, until that changes, they should be treated as such
* Refactor OrganizationWarningsService
There was a case added to the Inactive Subscription warning for a free trial, but free trials do not represent inactive subscriptions so this was semantically incorrect. This creates another method that pulls the free trial warning and shows a dialog asking the user to subscribe if they're on one.
* Implement Tax ID Warnings throughout Admin Console and Provider Portal
* Fix linting error
* Jimmy's feedback
* remove duplicate messages keys
* revert changes to popover stories
* add back dupe myItems key for now as it was already here
* fix directive type errors
* remove variable left in error from merge conflict
* revert unintentional change to reports layout
* add back reports change
---------
Co-authored-by: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
This PR migrates `libs/components` to use strict TypeScript.
- Remove `@ts-strict-ignore` from each file in `libs/components` and resolved any new compilation errors
- Converted ViewChild and ContentChild decorators to use the new signal-based queries using the [Angular signal queries migration](https://angular.dev/reference/migrations/signal-queries)
- Made view/content children `required` where appropriate, eliminating the need for additional null checking. This helped simplify the strict migration.
---
Co-authored-by: Vicki League <vleague@bitwarden.com>
* properly call input functions
* don't enable sshkey form
* fix logic for disabling cipher form
* prefer use of observable
* use destroyRef. change to enabled status only
* disable cipher form for "My Items" ciphers
* use correct property
* prevent changing non org fields in cli for org owned vaults
* update var name
* fix tests
* fix stories
* revert changes to item details section. update comment in edit command
* remove unused props
* fix test
* re-apply logic to enforce org ownership
* re-apply logic to enforce org ownership
* fix logic and test
* add empty line to comment
* remove unused var
* delegate form enabling/disabling to cipherFormContainer
* rename var and getter back to original. update comment
* [PM-22136] Update sdk cipher view map to support uknown uuid type
* [PM-22136] Add key to CipherView for copying to SdkCipherView for encryption
* [PM-22136] Add fromSdk* helpers to Cipher domain objects
* [PM-22136] Add toSdk* helpers to Cipher View objects
* [PM-22136] Add encrypt() to cipher encryption service
* [PM-22136] Add feature flag
* [PM-22136] Use new SDK encrypt method when feature flag is enabled
* [PM-22136] Filter out null/empty URIs
* [PM-22136] Change default value for cipher view arrays to []. See ADR-0014.
* [PM-22136] Keep encrypted key value on attachment so that it is passed to the SDK
* [PM-22136] Keep encrypted key value on CipherView so that it is passed to the SDK during encryption
* [PM-22136] Update failing attachment test
* [PM-22136] Update failing importer tests due to new default value for arrays
* [PM-22136] Update CipherView.fromJson to handle the prototype of EncString for the cipher key
* [PM-22136] Add tickets for followup work
* [PM-22136] Use new set_fido2_credentials SDK method instead
* [PM-22136] Fix missing prototype when decrypting Fido2Credentials
* [PM-22136] Fix test after sdk change
* [PM-22136] Update @bitwarden/sdk-internal version
* [PM-22136] Fix some strict typing errors
* [PM-23348] Migrate move cipher to org to SDK (#15567)
* [PM-23348] Add moveToOrganization method to cipher-encryption.service.ts
* [PM-23348] Use cipherEncryptionService.moveToOrganization in cipherService shareWithServer and shareManyWithServer methods
* [PM-23348] Update cipherFormService to use the shareWithServer() method instead of encrypt()
* [PM-23348] Fix typo
* [PM-23348] Add missing docs
* [PM-22136] Fix EncString import after merge with main
* add `CipherViewLike` and utilities to handle `CipherView` and `CipherViewLike`
* migrate libs needed for web vault to support `CipherViewLike`
* migrate web vault components to support
* add for CipherView. will have to be later
* fetch full CipherView for copying a password
* have only the cipher service utilize SDK migration flag
- This keeps feature flag logic away from the component
- Also cuts down on what is needed for other platforms
* strongly type CipherView for AC vault
- Probably temporary before migration of the AC vault to `CipherListView` SDK
* fix build icon tests by being more gracious with the uri structure
* migrate desktop components to CipherListViews$
* consume card from sdk
* add browser implementation for `CipherListView`
* update copy message for single copiable items
* refactor `getCipherViewLikeLogin` to `getLogin`
* refactor `getCipherViewLikeCard` to `getCard`
* add `hasFido2Credentials` helper
* add decryption failure to cipher like utils
* add todo with ticket
* fix decryption failure typing
* fix copy card messages
* fix addition of organizations and collections for `PopupCipherViewLike`
- accessors were being lost
* refactor to getters to fix re-rendering bug
* fix decryption failure helper
* fix sorting functions for `CipherViewLike`
* formatting
* add `CipherViewLikeUtils` tests
* refactor "copiable" to "copyable" to match SDK
* use `hasOldAttachments` from cipherlistview
* fix typing
* update SDK version
* add feature flag for cipher list view work
* use `CipherViewLikeUtils` for copyable values rather than referring to the cipher directly
* update restricted item type to support CipherViewLike
* add cipher support to `CipherViewLikeUtils`
* update `isCipherListView` check
* refactor CipherLike to a separate type
* refactor `getFullCipherView` into the cipher service
* add optional chaining for `uriChecksum`
* set empty array for decrypted CipherListView
* migrate nudge service to use `cipherListViews`
* update web vault to not depend on `cipherViews$`
* update popup list filters to use `CipherListView`
* fix storybook
* fix tests
* accept undefined as a MY VAULT filter value for cipher list views
* use `LoginUriView` for uri logic (#15530)
* filter out null ciphers from the `_allDecryptedCiphers$` (#15539)
* use `launchUri` to avoid any unexpected behavior in URIs - this appends `http://` when missing
* PM-22882
* add bit hints
* export dialog and implement in autofill component
* remove unnecessary non null assertion
* set to previous on cancel
* add advanced options message to web and desktop
* tweak styling
* add warning capitalized to web and desktop
* PM-22391 WIP
* update autofill base desc
* fill cog when match uri open
* switch to button, populate dialog when option selected
* default strategy hint
* update match hint string and dialog behavior
* clean up naming for callbacks and variables
* revert global setting hint — this will be addressed separately
* add tests
* update copy and remove repeated copy to use quoted string
* Update apps/browser/src/_locales/en/messages.json
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
* add translation to web and desktop, make continue and cancel required
---------
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
* add end user feature flag
* add initial setup extension component and route
* redirect users from registration completion to the setup extension page
* add `hideIcon` to anon layout for web
- matches implementation on the browser.
* integrate with anon layout for extension wrapper
* add initial loading state
* conditionally redirect the user upon initialization
* redirect the user to the vault if the extension is installed
* add initial copy for setup-extension page
* add confirmation dialog for skipping the extension installation
* add success state for setup extension page
* only show loggedin toast when end user activation is not enabled.
* add image alt
* lower threshold for polling extension
* close the dialog when linking to the vault
* update party colors
* use the platform specific registration service to to only forward the web registrations to `/setup-extension`
* call `super` rather than `/vault` directly, it could change in the future
* When saving a cipher, mark any associated security tasks as complete
* fix test error from encryption refactor
* hide security tasks that are associated with deleted ciphers (#15247)
* account for deleted ciphers for atRiskPasswordDescriptions
* add restricted item types to legacy vault components
* filter out restricted item types from new menu item in desktop
* use CIPHER_MENU_ITEMS
* use CIPHER_MENU_ITEMS. move restricted cipher service to common
* use move restricted item types service to libs. re-use cipher menu items
* add shareReplay. change variable name
* move restricted filter to search service. remove unecessary import
* add reusable service method
* clean up spec
* add optional chain
* remove duplicate import
* move isCipherViewRestricted to service module
* fix logic
* fix logic
* remove extra space
---------
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
* add restricted item types service and apply it to filter web cipher
* code cleanup. add shareReplay
* account for multiple orgs when restricting item types
* restrict item types for specific orgs
* clean up logic. use policiesByType$
* track by item.type
* clean up filtering. prefer observable. do not exempt owners for restricted item types
* simplify in vault-filter. move item filter logic to vault. fix tests
* don't return early in filter-function
* add generic `union-of-values` helper
* migrate `GeneratorDialogAction` to a constant
* migrate `VaultState` to a constant
* migrate `AtRiskCarouselDialogResult` to a constant
* migrate `CredentialGeneratorDialogAction` to a constant
* migrate `FolderAddEditDialogResult` to a constant
* migrate `ViewCipherDialogResult` to a constant
* migrate `VisibleVaultBanner` to a constant
* migrate `VaultFilterLabel` to a constant
* migrate `WebVaultGeneratorDialogResult` to a constant
* migrate `BulkDeleteDialogResult` to a constant
* migrate `BulkMoveDialogResult` to a constant
* migrate `AddEditCipherDialogResult` to a constant
* migrate `VaultItemDialogResult` to a constant
* migrate `BrowserPromptState` to a constant
* migrate `NudgeType` to a constant
* migrate `SecurityTaskStatus` to a constant
* migrate `CipherRepromptType` to a constant
* migrate `SecureNoteType` to a constant
* migrate `FieldType` to a constant
* migrate `LinkedIdType` to a constant
* migrate `CollectionAssignmentResult` to a constant
* migrate `AddEditFolderDialogResult` to a constant
* migrate `AttachmentDialogResult` to a constant
* fix CipherType in delete organization dialog
* fix `in` statement in VaultFilter
* Fix build errors across enum updates
* fix two more CipherType castings
* update CipherResponse `CipherType`
* define type for `fieldType` parameter
* refine how `cipherTypeNames` is generated and add utility function for grabbing cipher type name
* use `CipherType` rather than `number`
* add stricter typing for `FieldType`
* add fixme for `CipherType` to be ADR-0025 compliant
* remove error throw for `toCipherTypeName` and instead update typing to have `| undefined`
* add helpers for CipherType conversions
* prefer `undefined`
Upgrade Angular to v19 using the update guide.
- Add `standalone: false` to any missed component in stories or tests.
- Update jest.config to follow the new best practices.
* Get userId from response if available
This is a small improvement for the Auth team which avoids inspection of the access token, sometimes.
* Initialize sdk clients with a userId
* return both Cipher and encryptedFor when encrypting a cipher
Update cipher api requests to include encryptedFor attribute
* Prefer named types with documentation
* Update sdk to latest
* Fixup types
* Fixup tests
* Revert getting userId from identity token response
---------
Co-authored-by: Shane <smelton@bitwarden.com>
* first draft at an idea dependency graph
* ignore existing errors
* remove conflicting rule regarding internal platform logic in libs
* review: allow components to import from platform
* allow use of common spec in lib/vault tests
* pass readonly collections to the assign collection component
- The assign to collections component filters them out already.
-They're also needed to display copy within the component
* add hint to assign to collections component when there are read only collections assigned to a cipher already
* add readonly hint to desktop
* only show collection hint for collections that are assigned to the provided ciphers
* consider admin/owner edit everything permission when assigning to collections
* fix icon in test
* added generator spotlight to credential generator component
* moved generator spotlight to browser component and add as slot in libs. update copy for send
* added an aria label for the generator nudge body content
* new copy and styles for browser send will be behind feature flag
* update featureflag call to observable in send-v2
* changed how nudge text is made in credential generator
* added new observable to vault nudges to return specific boolean. Update naming of vault types. update observable calls in credential-generator and send-v2
* update send-v2 and credential generator to use new renamed nudges
* update to create nudge generator spotlight component. using this inside the credential generator for nudge spotlight
* fix imports for Nudge related code
* add libs/angular to storybook
---------
Co-authored-by: Nick Krantz <nick@livefront.com>