mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-21 16:18:28 +01:00
414bdde232
* rough-in passphrase validation failure handling * trigger valid change from settings * fix `max` constraint enforcement * add taps for generator validation monitoring/debugging * HTML constraints validation rises like a phoenix * remove min/max boundaries to fix chrome display issue * bind settings components as view children of options components * remove defunct `okSettings$` * extend validationless generator to passwords * extend validationless generator to catchall emails * extend validationless generator to forwarder emails * extend validationless generator to subaddress emails * extend validationless generator to usernames * fix observable cycle * disable generate button when no algorithm is selected * prevent duplicate algorithm emissions * add constraints that assign email address defaults |
||
---|---|---|
.. | ||
src | ||
jest.config.js | ||
package.json | ||
readme.md | ||
tsconfig.json | ||
tsconfig.spec.json |
Using generator components
The components within this module require the following import.
import { GeneratorModule } from "@bitwarden/generator-components";
The credential generator provides access to all generator features.
<!-- Bound to active user -->
<tools-credential-generator />
<!-- Bound to a specific user -->
<tools-credential-generator [user-id]="userId" />
<!-- receive updates when a credential is generated.
`$event` is a `GeneratedCredential`.
-->
<tools-credential-generator (onGenerated)="eventHandler($event)" />
Specialized components are provided for username and password generation. These components support the same properties as the credential generator.
<tools-password-generator [user-id]="userId" (onGenerated)="eventHandler($event)" />
<tools-username-generator [user-id]="userId" (onGenerated)="eventHandler($event)" />
The emission behavior of onGenerated
varies according to credential type. When
a credential supports immediate execution, the component automatically generates
a value and emits from onGenerated
. An additional emission occurs each time the
user changes a setting. Users may also request a regeneration.
When a credential does not support immediate execution, then onGenerated
fires
only when the user clicks the "generate" button.