Git Product home page Git Product logo

angular-material-extensions / password-strength Goto Github PK

View Code? Open in Web Editor NEW
285.0 9.0 70.0 49.83 MB

Angular UI library to illustrate and validate a password's strength with material design

Home Page: https://angular-material-extensions.github.io/password-strength

License: MIT License

JavaScript 5.22% TypeScript 52.15% HTML 41.71% SCSS 0.92%
strength material angular-library password-strength materialdesign password-safety password confrimation strength-score material-extensions

password-strength's Introduction

angular-material-extensions's logo

@angular-material-extensions/password-strength - Material password strength meter to indicate how secure is the provided password

npm version npm demo docs: typedoc Join the chat at https://gitter.im/angular-material-extensions/Lobby CircleCI branch Build Status codecov dependency Status devDependency Status Greenkeeper Badge license Awesome

@angular-material-extensions/password-strength demonstration

Built by and for developers ❤️

Do you have any question or suggestion ? Please do not hesitate to contact us! Alternatively, provide a PR | open an appropriate issue here

If you like this project, support angular-material-extensions by starring ⭐ and sharing it 📢

Table of Contents

View all the directives and components in action at https://angular-material-extensions.github.io/password-strength

  • <mat-password-strength> used to calculate and display the strength of a provided password
  1. strength score <= 20%

@angular-material-extensions/password-strength score less than 20%

  1. strength score <= 80%

@angular-material-extensions/password-strength score less than 40%

  1. strength score > 80%

@angular-material-extensions/password-strength score less than 100%

  • <mat-password-strength-info> used to display more information about the strength of a provided password

@angular-material-extensions/password-strength's info

  • <mat-pass-toggle-visibility> used to show/hide the password provided in the input element

@angular-material-extensions/password-strength's info


  • Angular developed and tested with 15.x

1. Install via ng add. (Recommended)

If Angular Material Design is not setup, just run ng add @angular/material learn more

Now add the library via the angular schematics

ng add @angular-material-extensions/password-strength

2. Install via npm. (Alternative)

Now install @angular-material-extensions/password-strength via:

npm install --save @angular-material-extensions/password-strength

SystemJS

Note:If you are using SystemJS, you should adjust your configuration to point to the UMD bundle. In your systemjs config file, map needs to tell the System loader where to look for @angular-material-extensions/password-strength:

{
  '@angular-material-extensions/password-strength';: 'node_modules/@angular-material-extensions/password-strength/bundles/password-strength.umd.js',
}

-> follow the instructions here


Import the library

Once installed you need to import the main module:

import { MatPasswordStrengthModule } from "@angular-material-extensions/password-strength";

The only remaining part is to list the imported module in your application module. The exact method will be slightly different for the root (top-level) module for which you should end up with the code similar to (notice MatPasswordStrengthModule .forRoot()):

import { MatPasswordStrengthModule } from '@angular-material-extensions/password-strength';

@NgModule({
  declarations: [AppComponent, ...],
  imports: [MatPasswordStrengthModule.forRoot(), ...],
  bootstrap: [AppComponent]
})
export class AppModule {
}

Other modules in your application can simply import MatPasswordStrengthModule:

import { MatPasswordStrengthModule } from '@angular-material-extensions/password-strength';

@NgModule({
  declarations: [OtherComponent, ...],
  imports: [MatPasswordStrengthModule, ...],
})
export class OtherModule {
}

<mat-password-strength> used to calculate and display the strength of a provided password - see the demo examples

option bind type default description
password Input() string - the password to calculate its strength
customValidator Input() RegExp - custom regex validator
externalError Input() boolean false used to change the color of the password to warn if an external error occurs
enableLengthRule Input() boolean true whether to validate the length of the password
enableLowerCaseLetterRule Input() boolean true whether a lowercase letter is optional
enableUpperCaseLetterRule Input() boolean true whether a uppercase letter is optional
enableDigitRule Input() boolean true whether a digit char is optional
enableSpecialCharRule Input() boolean true whether a special char is optional
min Input() number 8 the minimum length of the password
max Input() number 30 the maximum length of the password
warnThreshold Input() number 21 password strength less than this number shows the warn color
accentThreshold Input() number 81 password strength less than this number shows the accent color
onStrengthChanged Output() number - emits the strength of the provided password in % e.g: 20%, 40%, 60%, 80% or 100%

<mat-password-strength-info> used to display more information about the strength of a provided password - see the demo examples

option bind type default description
passwordComponent Input() PasswordStrengthComponent - the password component used in the template in order to display more info related to the provided password
enableScoreInfo Input() boolean false whether to show the password's score in %
lowerCaseCriteriaMsg Input() string contains at least one lower character an appropriate msg for the lower case %
upperCaseCriteriaMsg Input() string contains at least one upper character an appropriate msg for the upper case %
digitsCriteriaMsg Input() string contains at least one digit character an appropriate msg for the digit case %
specialCharsCriteriaMsg Input() string contains at least one special character an appropriate msg for the special case %
customCharsCriteriaMsg Input() string contains at least one custom character an appropriate msg for the custom validator case %
minCharsCriteriaMsg Input() string contains at least ${this.passwordComponent.min} characters an appropriate msg for the minimum number of chars %

<mat-pass-toggle-visibility> used to show/hide the password provided in the input element

option bind type default description
isVisible Input() boolean false whether the password is visible or hidden
tabindex Input() string null set the desired tabindex value of the toggle visibility button.

add the @angular-material-extensions/password-strength element to your template:

<mat-password-strength [password]="password.value"> </mat-password-strength>

This will display only the material password strength meter in form of a progress without any input fields or similar.

In the following example, we integration a material input container with @angular-material-extensions/password-strength 's component.

NOTE: In order to repaint the mat-form-field correctly after changing the value of the password's strength, please consider to change the detection strategy for the parent component -->

import {
  ChangeDetectionStrategy,
  Component,
  OnInit,
  ViewEncapsulation,
} from "@angular/core";
import { Title } from "@angular/platform-browser";
import { MatSlideToggleChange } from "@angular/material";
import { MatPasswordStrengthComponent } from "@angular-material-extensions/password-strength";

@Component({
  selector: "app-home",
  templateUrl: "./home.component.html",
  styleUrls: ["./home.component.scss"],
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HomeComponent implements OnInit {}
<div>
  <mat-form-field
    appearance="outline"
    style="width: 100%"
    [color]="passwordComponent.color"
  >
    <mat-label>Password</mat-label>
    <input
      matInput
      #password
      [type]="inputType"
      required
      placeholder="Password"
    />
    <mat-hint align="end" aria-live="polite">
      {{password.value.length}} / 25
    </mat-hint>
  </mat-form-field>

  <mat-password-strength
    #passwordComponent
    (onStrengthChanged)="onStrengthChanged($event)"
    [password]="password.value"
  >
  </mat-password-strength>
</div>

learn more about mat-form-field

Example of how to use the emitted strength of the password in your template

<div fxLayout="row" fxLayoutGap="10px">
  <div *ngIf="passwordComponent.strength === 100; then done else error"></div>
  <ng-template #done>
    <mat-icon color="primary">done</mat-icon>
  </ng-template>
  <ng-template #error>
    <mat-icon color="warn">error</mat-icon>
  </ng-template>
  <div>
    <p>Password's strength = {{passwordComponent.strength}} %100</p>
  </div>
</div>

Use the toggle visibility component

  • add the mat-pass-toggle-visibility to your mat-form-field
  • give it a name to use it in the html file like toggle
  • set the type of the input to that value emitted from the mat-pass-toggle-visibility component <input matInput [type]="toggle.type"/>
<mat-form-field
  appearance="outline"
  style="width: 100%"
  [color]="passwordComponent.color"
>
  <mat-label>Password</mat-label>
  <!-- HERE DOWN :D-->
  <mat-pass-toggle-visibility #toggle matSuffix></mat-pass-toggle-visibility>
  <!-- THERE ABOVE ;)-->
  <input
    matInput
    #password
    [type]="toggle.type"
    required
    placeholder="Password"
  />
  <mat-hint align="end" aria-live="polite">
    {{password.value.length}} / 25
  </mat-hint>
</mat-form-field>

Client Side password's validation using a built in angular formController

  1. add an input element to your template with an appropriate @angular-material-extensions/password-strength's component
  2. hold a reference of the @angular-material-extensions/password-strength's component by adding passwordComponentWithValidation (or whatever you want) inside the element

e.g:

<mat-password-strength
  #passwordComponentWithValidation
  [password]="passwordWithValidation.value"
>
</mat-password-strength>
  1. bind the form controller of the mat-password-strength to the input element
  • you can access the form controller of @angular-material-extensions/password-strength using the chile view --> passwordComponentWithValidation.passwordFormControl
  • bind the form controller to an input element --> [formControl]="passwordComponentWithValidation.passwordFormControl"
  1. Full example - see below
<div>
  <mat-form-field appearance="outline" style="width: 100%">
    <mat-label>Password</mat-label>
    <input
      matInput
      #passwordWithValidation
      [type]="inputType"
      required
      [formControl]="passwordComponentWithValidation.passwordFormControl"
      placeholder="Password"
    />
    <mat-hint align="end" aria-live="polite">
      {{passwordWithValidation.value.length}} / 25
    </mat-hint>
    <mat-error
      *ngIf="passwordComponentWithValidation.passwordFormControl.hasError('required')"
    >
      Password is required
    </mat-error>
    <mat-error
      *ngIf="passwordComponentWithValidation.passwordFormControl.hasError('pattern')"
    >
      Password is not valid
    </mat-error>
  </mat-form-field>
  <mat-password-strength
    #passwordComponentWithValidation
    (onStrengthChanged)="onStrengthChanged($event)"
    [password]="passwordWithValidation.value"
  >
  </mat-password-strength>
  <!--Password's strength info-->
  <mat-password-strength-info
    [passwordComponent]="passwordComponentWithValidation"
  >
  </mat-password-strength-info>
</div>

this will looks like -->

@angular-material-extensions/password-strength


custom regex validation

please consider to use the customValidator input (see below)

<mat-slide-toggle #toggle>Show Password Details</mat-slide-toggle>

<mat-form-field
  appearance="outline"
  style="width: 100%"
  [color]="passwordComponent.color"
>
  <mat-label>Password</mat-label>
  <mat-pass-toggle-visibility
    #toggleVisbility
    matSuffix
  ></mat-pass-toggle-visibility>
  <input
    matInput
    #password
    [type]="toggleVisbility.type"
    placeholder="Password"
  />
  <mat-hint align="end" aria-live="polite">
    {{password.value.length}} / {{passwordComponent.max}}
  </mat-hint>
</mat-form-field>

<mat-password-strength
  #passwordComponent
  (onStrengthChanged)="onStrengthChanged($event)"
  [password]="password.value"
  [customValidator]="pattern"
>
</mat-password-strength>

<mat-password-strength-info
  *ngIf="toggle.checked"
  [passwordComponent]="passwordComponent6"
  customCharsCriteriaMsg="1 german special chars is required"
  [enableScoreInfo]="true"
>
</mat-password-strength-info>
pattern = new RegExp(/^(?=.*?[äöüÄÖÜß])/);

Confirm the password with built in angular form controllers - see the live example

@angular-material-extensions/password-strength with confirmation feature

@angular-material-extensions/password-strength with confirmation feature

Use always the green color for a strong password just by adding the green css class to the mat-password-strength

<mat-password-strength
  #passwordComponent
  class="green"
  [password]="password.value"
>
</mat-password-strength>

Supporting custom messages and ngx-translate for the info component please check the example demo here

@angular-material-extensions/password-strength demonstration

for more examples please visit this URL : [(https://angular-material-extensions.github.io/password-strength/examples]((https://angular-material-extensions.github.io/password-strength/examples)

Please checkout the full documentation here or follow the official tutorial


Other Angular Libraries


Built by and for developers ❤️ we will help you 👊


Who is using this library? Awesome apps?

  1. Nahaus.de - Digitale und automatisierte Immobilienverwaltung Software für privat Vermieter und Hausverwaltungen

Are you missing your project or you app? PR me to publish it on the README



jetbrains logo

This project is supported by jetbrains with 1 ALL PRODUCTS PACK OS LICENSE incl. webstorm


Copyright (c) 2019-2023 Anthony Nahas. Licensed under the MIT License (MIT)

password-strength's People

Contributors

andriineverov avatar anthonynahas avatar bazaim avatar greenkeeper[bot] avatar hmica avatar lakmoore avatar marvinosswald avatar msenosiain avatar rramo012 avatar rubencodeforges avatar yerevin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

password-strength's Issues

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.27.6 to 1.27.7.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.27.7

2019-12-01

Bug Fixes

  • Fix a scenario where a reassignments to computed properties were not tracked (#3267)

Pull Requests

Commits

The new version differs by 4 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Animation on strength info component does not play

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

macOS Catalina

Versions

Angular CLI: 8.3.14
Node: 12.10.0
OS: darwin x64
Angular: 8.2.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.803.14
@angular-devkit/build-angular 0.803.14
@angular-devkit/build-optimizer 0.803.14
@angular-devkit/build-webpack 0.803.14
@angular-devkit/core 8.3.14
@angular-devkit/schematics 8.3.14
@angular/cdk 8.2.3
@angular/cli 8.3.14
@angular/flex-layout 8.0.0-beta.27
@angular/material 8.2.3
@ngtools/webpack 8.3.14
@schematics/angular 8.3.14
@schematics/update 0.803.14
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2

Repro steps

Minimal example with router animation - https://stackblitz.com/edit/angular-vku5es

The log given by the failure

Enter animation (@Items) in mat-strength-info component does not play when any animation is played over (before?) it. This happens when the component is used in a router outlet that has an animation or stepper component.

Desired functionality

Enter animation should play at all times.

Mention any other details that might be useful

I stumbled upon this on accident and I am not even sure if thats a bug, it most likely will be a problem with my animation. Any help is appreciated

Error with angular 8

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

MacOs Mojave

Versions

Angular CLI: 8.0.3
Node: 10.9.0
OS: darwin x64
Angular: 8.0.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
"@angular-material-extensions/password-strength": "^4.0.0-beta",

Package Version

@angular-devkit/architect 0.800.3
@angular-devkit/build-angular 0.800.3
@angular-devkit/build-optimizer 0.800.3
@angular-devkit/build-webpack 0.800.3
@angular-devkit/core 8.0.3
@angular-devkit/schematics 8.0.3
@angular/cdk 8.0.1
@angular/cli 8.0.3
@angular/material 8.0.1
@ngtools/webpack 8.0.3
@schematics/angular 8.0.3
@schematics/update 0.800.3
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0

Repro steps

Launch my app with ng build --watch, with or without aot, at the launch i have an error. Your component is not even used in the app.component.html but further in the signup page.

The log given by the failure

image

Mention any other details that might be useful

If I can help you in anyway, ask for it. Thanks for your work.

An in-range update of @angular/cli is breaking the build 🚨

The devDependency @angular/cli was updated from 7.1.0 to 7.1.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular/cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests passed on CircleCI! (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v7.1.1

Commits

@ngtools/webpack (7.1.1)

Commit Description Notes
files are not being updated when using `allowJs` or `resolveJsonModule` (#13089) [Closes #13076]
[Closes #12964]
cleanup resources after modules are loaded (#12994)

@schematics/update (0.11.1)

Commit Description Notes
replace environment variables in npm/yarn rc

@schematics/angular (7.1.1)

Commit Description Notes
let tslint resolve codelyzer (#13101) [Closes #13101]
[Closes #13100]
add providers into providers metadata but not inner Object with ut. (#13081)

Special Thanks

Alan Agius, Charles Lyding, Vikram Subramanian, 赵正阳, Hans Larsen, Mathou54, Krishna Mohan

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Some special characters are not recognized

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Windows 10 1803

Versions

No idea, used the demo page today, 2019-03-10 at around 13:00 UTC

Repro steps

Activate "Show Password Details"
Enter the special character §, ,\ or µ. There are probably a lot more that don't work, but those are the ones I tested.
Observe how "At least one special character" is still showing as unfulfilled.

The log given by the failure

-

Desired functionality

Recognize more special characters.

Mention any other details that might be useful

German Umlauts(äöüßÄÖÜẞ) are also not recognized as special character or lower- or uppercase letters.
The regular expression token \W matches all non-word characters and could be used to check for this.

Uncaught TypeError: Cannot read property 'isFirstChange' of undefined at MatPasswordStrengthComponent.ngOnChanges (password-strength.js:148)

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

MacOS Catalina

Versions

Angular CLI: 8.3.15
Node: 12.13.0
OS: darwin x64
Angular: 8.2.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package Version

@angular-devkit/architect 0.803.15
@angular-devkit/build-angular 0.803.15
@angular-devkit/build-optimizer 0.803.15
@angular-devkit/build-webpack 0.803.15
@angular-devkit/core 8.3.15
@angular-devkit/schematics 8.3.15
@angular/cdk 8.2.3
@angular/cli 8.3.15
@angular/flex-layout 7.0.0-beta.19
@angular/material 8.2.3
@ngtools/webpack 8.3.15
@schematics/angular 8.3.15
@schematics/update 0.803.15
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2

Repro steps

Install via the ng add @angular-material-extensions/password-strength command.

The log given by the failure

zone-evergreen.js:172 Uncaught TypeError: Cannot read property 'isFirstChange' of undefined
at MatPasswordStrengthComponent.ngOnChanges (password-strength.js:148)
at checkAndUpdateDirectiveInline (core.js:31906)
at checkAndUpdateNodeInline (core.js:44367)
at checkAndUpdateNode (core.js:44306)
at debugCheckAndUpdateNode (core.js:45328)
at debugCheckDirectivesFn (core.js:45271)
at Object.eval [as updateDirectives] (RegisterComponent.html:194)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:45259)
at checkAndUpdateView (core.js:44271)
at callViewAction (core.js:44637)

Desired functionality

I should not see the error I'm reporting

Mention any other details that might be useful

Updating the ngOnChanges method in password-strength.js fixes the problem. I don't like that fix though.

Orignal method:

ngOnChanges(changes) {
        if ((changes.externalError && changes.externalError.firstChange) || changes.password.isFirstChange()) {
            return;
        }
        else if (changes.externalError && changes.externalError.currentValue) {
            this._color = Colors.warn;
            return;
        }
        else if (changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) {
            this.calculatePasswordStrength();
        }
        else {
            this.password && this.password.length > 0 ?
                this.calculatePasswordStrength() : this.reset();
        }
    }

Updated/Modified method:

ngOnChanges(changes) {
    if ((changes.externalError && changes.externalError.firstChange)) {
        return;
    }
    else if (changes.externalError && changes.externalError.currentValue) {
        this._color = Colors.warn;
        return;
    }
    // else if (changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) {
    //     this.calculatePasswordStrength();
    // }
    else {
        this.password && this.password.length > 0 ?
            this.calculatePasswordStrength() : this.reset();
    }
}

An in-range update of @angular-devkit/schematics is breaking the build 🚨

The devDependency @angular-devkit/schematics was updated from 8.3.3 to 8.3.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular-devkit/schematics is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • ci/circleci: Your tests passed on CircleCI! (Details).

Release Notes for v8.3.4

Commits

@angular/cli (8.3.4)

Commit Description Notes
correctly account for linked packages in update [Closes #15511]
[Closes #15294]

@schematics/angular (8.3.4)

Commit Description Notes
infer main server file name from main option
lazy loading module generation routing module lookup

@angular-devkit/build-angular (0.803.4)

Commit Description Notes
fully optimize script bundles with bundle downleveling [Closes #15507]
add trailing back slash to protractor baseUrl [Closes #15522]

@schematics/update (0.803.4)

Commit Description Notes
only update peer dependency if out of range


Special Thanks

Alan Agius, Judy Bogart, Charles Lyding, Keen Yee Liau, Joey Perrott

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular-devkit/schematics is breaking the build 🚨

The devDependency @angular-devkit/schematics was updated from 7.1.0 to 7.1.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular-devkit/schematics is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests passed on CircleCI! (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v7.1.1

Commits

@ngtools/webpack (7.1.1)

Commit Description Notes
files are not being updated when using `allowJs` or `resolveJsonModule` (#13089) [Closes #13076]
[Closes #12964]
cleanup resources after modules are loaded (#12994)

@schematics/update (0.11.1)

Commit Description Notes
replace environment variables in npm/yarn rc

@schematics/angular (7.1.1)

Commit Description Notes
let tslint resolve codelyzer (#13101) [Closes #13101]
[Closes #13100]
add providers into providers metadata but not inner Object with ut. (#13081)

Special Thanks

Alan Agius, Charles Lyding, Vikram Subramanian, 赵正阳, Hans Larsen, Mathou54, Krishna Mohan

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Confirmation Behavoire on Demo.

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Linux Arch Manjaro

Versions

On the Demo of this repo running in the web currently

Repro steps

  1. Type in Password (like: !1AaasdFf)
  2. Type in Confirmation
  3. Change password (by deleting f soo: !1AaasdF)
  4. Input is still valid no Error is found

The log given by the failure

Desired functionality

  1. User is sure he typed in password corretlly second time.
  2. Testing Currently implementing this into my app and have problems testing the Confirmation behavior.

Mention any other details that might be useful

I did not found any test. in the repo where the confirmation is tested.

I'm writing tests on my app and have Problems with the notConfirmed error. Should I do this in another issue?

feat: add password toggle visibility directive

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request

Versions

latest

Desired functionality

add a new angular directive that can be attached to an input component or input suffix -> material icon -> in order to hide/show the typed password

An in-range update of angular2 is breaking the build 🚨

Version 6.4.4 of the angular2 packages was just published.

Branch Build failing 🚨
Monorepo release group angular2
Current Version 6.4.3
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the angular2 group definition.

angular2 is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ci/circleci: Your tests passed on CircleCI! (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes mithril-magnet

Bug Fixes

  • button: allow transition for the button focus overlay for all buttons (#12552) (0a56cf7)
  • button-toggle: forward tabindex to underlying button (#12538) (dcae875)
  • breakpoint-observer: Emit matching state of each query provided (#12506) (cb3f760)
  • datepicker: input not picking up changes if datepicker is assigned after init (#12546) (d10a6c4)
  • drag-drop: add support for sorting animations (#12530) (7d0e69b)
  • drag-drop: ignore self inside connectedTo (#12626) (7e7e873)
  • drag-drop: remove circular dependencies (#12554) (fd70c07)
  • list: disable hover styling on touch devices (#12520) (6048f6f)
  • overlay: flexible overlay with push not handling scroll offset and position locking (#11628) (a192907)
  • paginator: inconsistently disabling tooltips between browsers (#12539) (35bdd00)
  • snackbar: wrap simple snackbar text in span (#12599) (11b97e4)
  • tabs: animation running after initialization (#12549) (2798084)
  • tree: include constructors on MatTree classes to allow es6 builds (#12556) (5b0eed3)
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Have green color as "100% strong password"

I understand the design of returning the primary color here. However my primary color is not green.
How can I make the "primary color" green? This is probably a material flaw by not having a success color.

I solved this problem by adding global styles css:

mat-password-strength mat-progress-bar.mat-progress-bar.mat-primary > div.mat-progress-bar-primary.mat-progress-bar-fill.mat-progress-bar-element::after {
    background-color: #155724;
}

mat-password-strength mat-progress-bar.mat-progress-bar.mat-primary > div.mat-progress-bar-secondary.mat-progress-bar-fill.mat-progress-bar-element::after {
    background-color: #155724;
}

mat-password-strength-info > mat-card  > mat-card-content > div.info-row > mat-icon.mat-icon.mat-primary {
    color: #155724;
}

Is there a way or any plans on making a API that styles a 100% save password green?

Something like

@Input() savePasswordGreen: boolean

Best wishes,
André

An in-range update of gulp-conventional-changelog is breaking the build 🚨

The devDependency gulp-conventional-changelog was updated from 2.0.3 to 2.0.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

gulp-conventional-changelog is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Angular 8 & Material 8 compatibility

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

OS and Version?

Windows 10

Versions

Angular CLI: 8.0.0
Node: 10.15.3
OS: win32 x64
Angular: 8.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0
@angular-devkit/build-angular     0.800.0
@angular-devkit/build-optimizer   0.800.0
@angular-devkit/build-webpack     0.800.0
@angular-devkit/core              8.0.0
@angular-devkit/schematics        8.0.0
@angular/cdk                      7.3.7
@angular/material                 7.3.7
@angular/pwa                      0.12.4
@ngtools/webpack                  8.0.0
@schematics/angular               8.0.0
@schematics/update                0.800.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.30.0

Repro steps

ng update @angular/material

The log given by the failure

Using package manager: 'npm'
Collecting installed dependencies...
Found 43 dependencies.
Fetching dependency metadata from registry...
                  Package "@angular-material-extensions/password-strength" has an incompatible peer dependency to "@angular/material" (requires "^7.3.7", would install "8.0.0").
                  Package "@angular-material-extensions/password-strength" has an incompatible peer dependency to "@angular/cdk" (requires "^7.3.7", would install "8.0.0").
Incompatible peer dependencies found. See above.

Desired functionality

Support for Angular 8 & Material 8.

feat request: customize strength validation and info display

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request

Hello, thanks for sharing this, I started using it and I believe it could benefit if the password strength could be changed by parameters, for example, password length, requires special characters and so on.

this should also be reflected in the info panel where I think the final item of the password strength in percentage is redundant with the information from the bullet points and the sliding bar on top, if it could be made hidden with an optional parameter it would be great.

cheers

An in-range update of autoprefixer is breaking the build 🚨

The devDependency autoprefixer was updated from 9.3.1 to 9.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

autoprefixer is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests passed on CircleCI! (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for 9.4 “Advance Australia”

Coat of Arms of Australia

Autoprefixer 9.4.0 brings limited autoplacement support to the IE CSS Grid.

Grid Autoplacement

If the grid option is set to "autoplace", limited autoplacement support is now added to the Autoprefixer CSS Grid translations. You can also use the /* autoprefixer grid: autoplace */ control comment to enable autoplacement directly in your CSS.

In order to use the new autoplacement feature, you must define both rows and columns when declaring the grid template.

/* Input CSS */

/ autoprefixer grid: autoplace /

.autoplacement-example {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto;
grid-gap: 20px;
}

/* Output CSS */

/ autoprefixer grid: autoplace /

.autoplacement-example {
display: -ms-grid;
display: grid;
-ms-grid-columns: 1fr 20px 1fr;
grid-template-columns: 1fr 1fr;
-ms-grid-rows: auto 20px auto;
grid-template-rows: auto auto;
grid-gap: 20px;
}

.autoplacement-example > *:nth-child(1) {
-ms-grid-row: 1;
-ms-grid-column: 1;
}

.autoplacement-example > *:nth-child(2) {
-ms-grid-row: 1;
-ms-grid-column: 3;
}

.autoplacement-example > *:nth-child(3) {
-ms-grid-row: 3;
-ms-grid-column: 1;
}

.autoplacement-example > *:nth-child(4) {
-ms-grid-row: 3;
-ms-grid-column: 3;
}

Autoplacement support in Autoprefixer is currently very limited in what it can do. Please read the Grid Autoplacement support in IE section before using this new feature.

Thanks to @bogdan0083 for implementing the new feature, @Dan503 for documenting it, and @evandiamond for coming up with the initial idea.

Other Changes

  • Remove some unnecessary warnings for Grid (by @fanich37).
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of webpack-dev-server is breaking the build 🚨

The devDependency webpack-dev-server was updated from 3.3.0 to 3.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-dev-server is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • ci/circleci: Your tests passed on CircleCI! (Details).

Release Notes for v3.3.1

3.3.1 (2019-04-09)

Bug Fixes

  • regression: always get necessary stats for hmr (#1780) (66b04a9)
  • regression: host and port can be undefined or null (#1779) (028ceee)
  • only add entries after compilers have been created (#1774) (b31cbaa)
Commits

The new version differs by 6 commits.

  • 99b78dc chore(release): 3.3.1
  • f10fd68 docs: fix changelog (#1783)
  • b31cbaa fix: only add entries after compilers have been created (#1774)
  • 66b04a9 fix(regression): always get necessary stats for hmr (#1780)
  • 028ceee fix(regression): host and port can be undefined or null (#1779)
  • f5ea174 docs(contribution): alternative way to test (#1506)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

ExpressionChangedAfterItHasBeenCheckedError

So when the component is switching between colors I am getting this one:
RegisterComponent.html:73 ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'color: accent'. Current value: 'color: warn'.

Tested with Angular Material 7 and Angular 7

An in-range update of @angular/cli is breaking the build 🚨

The devDependency @angular/cli was updated from 8.3.3 to 8.3.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular/cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • ci/circleci: Your tests passed on CircleCI! (Details).

Release Notes for v8.3.4

Commits

@angular/cli (8.3.4)

Commit Description Notes
correctly account for linked packages in update [Closes #15511]
[Closes #15294]

@schematics/angular (8.3.4)

Commit Description Notes
infer main server file name from main option
lazy loading module generation routing module lookup

@angular-devkit/build-angular (0.803.4)

Commit Description Notes
fully optimize script bundles with bundle downleveling [Closes #15507]
add trailing back slash to protractor baseUrl [Closes #15522]

@schematics/update (0.803.4)

Commit Description Notes
only update peer dependency if out of range


Special Thanks

Alan Agius, Judy Bogart, Charles Lyding, Keen Yee Liau, Joey Perrott

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.29.0 to 1.29.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • ci/circleci: Your tests passed on CircleCI! (Details).

Release Notes for v1.29.1

2020-01-21

Bug Fixes

  • Avoid crashes for circular reexports when named exports cannot be found (#3350)

Pull Requests

Commits

The new version differs by 5 commits.

  • 21a1775 1.29.1
  • a49d951 Update changelog
  • e82410d Properly handle circular reexports (#3350)
  • 56cbbdc fix tpyo (#3335)
  • 63644db Remove : from test file names for Windows, update dependencies (#3342)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

flexbox mat-password-strength-info div.info-row wrong alignment

have you tried your awesome <3 password module on OPERA?

The items inside mat-password-strength-info where misaligned for me.

adding the following css in global styles.scss solved it.

mat-password-strength-info > mat-card  > mat-card-content > div.info-row {
    align-items: center;
}

I guess it has something to do with different default values of different browsers.

Lets see :-)

An in-range update of autoprefixer is breaking the build 🚨

The devDependency autoprefixer was updated from 9.7.3 to 9.7.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

autoprefixer is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • ci/circleci: Your tests passed on CircleCI! (Details).

Release Notes for 9.7.4
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

min input wont work properly

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

any

Versions

any

Repro steps

set [min]="10" or [min]="5"

The log given by the failure

due to this code https://github.com/angular-material-extensions/password-strength/blob/master/src/module/component/mat-password-strength/mat-password-strength.component.ts#L89

the check will always perform check with hardcoded value

Desired functionality

if you provide a min value the strength should consider the min value , currently it is not respecting and is using 8 always

Mention any other details that might be useful

https://github.com/angular-material-extensions/password-strength/blob/master/src/module/component/mat-password-strength/mat-password-strength.component.ts#L89 this needs a change

An in-range update of webpack-dev-server is breaking the build 🚨

The devDependency webpack-dev-server was updated from 3.8.0 to 3.8.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-dev-server is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • ci/circleci: Your tests passed on CircleCI! (Details).

Release Notes for v3.8.1

3.8.1 (2019-09-16)

Bug Fixes

Commits

The new version differs by 30 commits.

  • 9d1c6d2 chore(release): 3.8.1
  • 9764d57 chore(deps): update minor dependencies without http proxy middleware (#2248)
  • 090b184 test(cli): use ports map for quiet logging test (#2247)
  • 00903f6 fix: scriptHost in client (#2246)
  • 5f9dde9 chore(deps): update dependency is-absolute-url to ^3.0.2 (maste… (#2249)
  • 7e2224e fix: add status in quiet log level (#2235)
  • 3748c3f chore(deps): update dependency typescript to ^3.6.3 (master) (#2245)
  • 7daff1d chore(deps): update all patch dependencies (#2241)
  • fffb21e chore(deps): update dependency webpack-dev-middleware to ^3.7.1 (#2237)
  • 96fb33a chore(deps): update dependency husky to ^3.0.5 (master) (#2236)
  • ea61454 chore(deps): update all minor dependencies (master) (minor) (#2234)
  • 62e874c refactor(magic-html): use string template (#2232)
  • 88f0fc9 chore(deps): update all patch dependencies (master) (patch) (#2230)
  • b24f072 chore(deps): update dependency sockjs-client to v1.4.0 (#2217)
  • 78f2fb4 chore(deps): update dependency jest-junit to v8 (#2227)

There are 30 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Customizable Animations

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Desired functionality

Ability to disable and/or modify the animations on <mat-password-strength-info>.

Mention any other details that might be useful

There aktually is a workaround which I used to disable the initial animation while keeping the others.
You can disable all animations on an element by setting [@.disabled]="true". I simply check if the passwords input has focus and enable the animations only in this case ->
[@.disabled]="document.activeElement !== newPasswordInput"

Force update strength meter

- [ ] bug report -> please search issues before submitting
- [x ] feature request

It would be nice if there was a way to force update the strength meter.

I have a scenario where the password is stored in a service, and the password-strength component is a part of a component that either has a load or a generate password component, when I come to the page with the generate component, a password is automatticly generated, but the strength bar is only updated when I update the password again. So either this is a bug where the strength meter misses an update, or it is a missing feature on how I can update the strength meter.

To be clear, when I change the password to the same password again it does not notice this too.

  <mat-password-strength class="strength" [password]="this.passwordUIHelper.password" (onStrengthChanged)="this.onStrengthChanged($event)" >
  </mat-password-strength>

[feature request] Create custom validator

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request

Desired functionality

In my case I want the form to be invalid until user inputs a password with strength = 100.

I have two alternatives in mind:
create a custom validator using same REGEXes

Or something like this:

  onStrengthChanged($event) {
    if ($event < 100) {
      this.form.get('password').setErrors({ 'strength': true });
    }
  }

But of course, having the lib to provide a Validator would be better.

What do you think?

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.18.0 to 1.19.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 6 commits.

  • 9af119d 1.19.0
  • b3f361c Update changelog
  • 456f4d2 Avoid variable from empty module name be empty (#3026)
  • 17eaa43 Use id of last module in chunk as name base for auto-generated chunks (#3025)
  • 871bfa0 Switch to a code-splitting build and update dependencies (#3020)
  • 2443783 Unified file emission api (#2999)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Add support for FormGroup

Bug Report or Feature Request (mark with an x)

- [] bug report -> please search issues before submitting
- [X ] feature request

OS and Version?

Windows 10

Versions

Angular CLI: 8.0.4
Node: 10.16.0
OS: win32 x64
Angular: 8.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.4
@angular-devkit/build-angular     0.800.4
@angular-devkit/build-optimizer   0.800.4
@angular-devkit/build-webpack     0.800.4
@angular-devkit/core              8.0.4
@angular-devkit/schematics        8.0.4
@angular/cdk                      8.0.1
@angular/cli                      8.0.4
@angular/material                 8.0.1
@ngtools/webpack                  8.0.4
@schematics/angular               8.0.4
@schematics/update                0.800.4
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Repro steps

clean Angular 8 project, adding FormGroup with different fields, including password-strength component.

form.component.ts

  signupForm: FormGroup;

  ngOnInit() {
    this.signupForm = this.formBuilder.group({
      passwordComponent: ["", [Validators.required, Validators.pattern]],
      confirmPassword: ["", [Validators.required, Validators.pattern]],
      email: ["", [Validators.required, Validators.email]],
      name: ["", [Validators.required]],
      rememberPassword: [false]
    });
  }

form.component.html

<form class="form-signin" (ngSubmit)="onSubmit()" novalidate [formGroup]="signupForm">
<mat-form-field class="full-width">
  <input
    type="text"
    maxlength="50"
    formControlName="name"
    required
    matInput
    placeholder="Full Name"
  />
  <mat-error *ngIf="hasError('name', 'required')"  >Name is required</mat-error>
</mat-form-field>

<mat-form-field class="full-width">
  <input
    type="email"
    maxlength="50"
   formControlName="email"
    required
    matInput
    placeholder="Email"
  />
  <mat-error *ngIf="hasError('email', 'required')">Email is required</mat-error>
</mat-form-field>

<!--password input filed-->
<mat-form-field
  appearance="outline"
  [color]="passwordComponentWithConfirmation.color"
  style="width: 100%" >
  <mat-label>Password</mat-label>
  <mat-pass-toggle-visibility #toggle3 matSuffix > </mat-pass-toggle-visibility>
  <input
    matInput
    #passwordWithConfirmation
    [type]="toggle3.type"
    formControlName="passwordComponent"
    placeholder="Password"
    required
  />

  <!--password hint-->
  <mat-hint align="end" aria-live="polite">
    {{ passwordWithConfirmation.value.length }} /
    {{ passwordComponentWithConfirmation.max }}
  </mat-hint>

  <mat-error
    *ngIf="passwordComponentWithConfirmation.passwordFormControl.hasError('required')">
    Password is required
  </mat-error>
  <mat-error
    *ngIf="passwordComponentWithConfirmation.passwordFormControl.hasError('pattern')">
    Password is not valid
  </mat-error>
</mat-form-field>

<!--@angular-material-extensions/password-strength's main component-->
<mat-password-strength
  #passwordComponentWithConfirmation
  [password]="passwordWithConfirmation.value">
</mat-password-strength>

<!--Password's strength info-->
<mat-password-strength-info
  [passwordComponent]="passwordComponentWithConfirmation">
</mat-password-strength-info>

<!--password input field for confirmation-->
<mat-form-field
  appearance="outline"
  class="mt-3"
  style="width: 100%">
  <mat-label>Confirm Password</mat-label>
  <mat-pass-toggle-visibility
    #toggleConfirmPassword
    matSuffix>
</mat-pass-toggle-visibility>
  <input
    matInput
    #passwordToConfirm
    [type]="toggleConfirmPassword.type"
    [formControl]="passwordComponentWithConfirmation.passwordConfirmationFormControl"
    placeholder="Password"
  />

  <!-- password hint-->
  <mat-hint align="end" aria-live="polite">
    {{ passwordToConfirm.value.length }} /
    {{ passwordComponentWithConfirmation.max }}
  </mat-hint>

  <!-- password error msgs-->
  <mat-error
    *ngIf="passwordComponentWithConfirmation.passwordConfirmationFormControl.hasError('required'
      )
    "
  >
    Password confirmation is required
  </mat-error>
  <mat-error *ngIf="passwordComponentWithConfirmation.passwordConfirmationFormControl.hasError('notConfirmed')">
    Password is not the same
  </mat-error>
</mat-form-field>
<div class="justify-right">
<mat-checkbox name="rememberPasswordField">זכור סיסמא
</mat-checkbox>
</div>

<button
      mat-raised-button
      color="primary"
      [disabled]="!signupForm.valid">
      Register
</button>
</form>

Desired functionality

I would like to create a FormGroup and attach different fields to it, including the password-strength component. As for now, the Submit button is enabled regardless of the password-strength validation status. i.e. even if the password is not strong enough, the Submit button gets enabled if all the other fields are valid.
I tried using MatPasswordStrengthValidator but couldn't find the right usage for it for this cause.

Workaround (for those who needs this functionality for now)

export function ValidatePasswordStrength(control: AbstractControl) {
  // numbers, uppercase and minimum 8 chars
  // just change this regex to fit your needs
  const regex = new RegExp(/^(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/);
  if (!regex.test(control.value)) {
    return { invalidPassword: true };
  }

  return null;
}
    this.signupForm = this.formBuilder.group({
      passwordComponent: ["", [Validators.required, ValidatePasswordStrength]],
      confirmPassword: ["", [Validators.required, Validators.pattern]],
      email: ["", [Validators.required, Validators.email]],
      name: ["", [Validators.required]],
      rememberPassword: [false]
    });
<mat-error
                *ngIf="
                  signupForm.get('passwordComponent').errors &&
                  signupForm.get('passwordComponent').dirty &&
                  signupForm.get('passwordComponent').hasError('invalidPassword')">
Please enter a valid password
              </mat-error>

onStrengthChanged is not called if we paste the password using (command + v)

Usecase is very simple. If you paste the password using command+v then progress-bar color is not changing it is still pink. Password is QwerT#123
`
<mat-password-strength #passwordComponent (onStrengthChanged)="onStrengthChanged($event)" [password]="passwordWithValidation?.value">

<mat-password-strength-info *ngIf="showPasswordDetails"
[lowerCaseCriteriaMsg]="'Contains atleast one lower character'"
[upperCaseCriteriaMsg]="'contains at least one upper character'"
[digitsCriteriaMsg]="'contains at least one digit character'"
[specialCharsCriteriaMsg]="'contains at least one special character'" [minCharsCriteriaMsg]="'contains at least 8 characters'"
[passwordComponent]="passwordComponent">

`
screenshot 2018-12-28 at 12 45 10 am

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.14.2 to 1.14.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for v1.14.3

2019-06-06

Bug Fixes

  • Generate correct external imports when importing from a directory that would be above the root of the current working directory (#2902)

Pull Requests

Commits

The new version differs by 4 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Missing flex library requirement in documention

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Windows 10

Versions

node v10.13.0
npm 6.4.1
Angular 7.2.1

Description

Missing flex-library requirements in documentation.
Without @angular/flex-layout library there are some alignment issues.

Compile error when using Ivy and Angular 9

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

MacOS Mojave

Versions

Node: 12.10.0
OS: darwin x64
Angular: 9.0.0-rc.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.3
@angular-devkit/build-angular     0.900.0-rc.0
@angular-devkit/build-optimizer   0.900.0-rc.0
@angular-devkit/build-webpack     0.900.0-rc.0
@angular-devkit/core              8.3.3
@angular-devkit/schematics        8.3.3
@angular/fire                     5.2.1
@angular/flex-layout              6.0.0-beta.16
@ngtools/webpack                  9.0.0-rc.0
@schematics/angular               8.3.3
@schematics/update                0.900.0-rc.0
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Repro steps

  1. Install via the ng add @angular-material-extensions/password-strength command.
  2. Post install ivy compile fails with the below error.

The log given by the failure

Compiling @angular-material-extensions/password-strength : es2015 as esm2015
Error: Error on worker #1: Error: Tried to overwrite /Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@ngrx/effects/src/actions.d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
    at NewEntryPointFileWriter.InPlaceFileWriter.writeFileAndBackup (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/writing/in_place_file_writer.js:36:23)
    at NewEntryPointFileWriter.writeFile (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/writing/new_entry_point_file_writer.js:63:53)
    at /Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/writing/new_entry_point_file_writer.js:45:69
    at Array.forEach (<anonymous>)
    at NewEntryPointFileWriter.writeBundle (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/writing/new_entry_point_file_writer.js:45:30)
    at ClusterWorker.compile (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/main.js:166:32)
    at Worker.<anonymous> (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/worker.js:41:42)
    at Worker.emit (events.js:209:13)
    at process.<anonymous> (internal/cluster/worker.js:30:12)
    at process.emit (events.js:209:13)
    at ClusterMaster.onWorkerMessage (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:158:27)
    at /Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:46:95
    at ClusterMaster.<anonymous> (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:238:57)
    at step (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/tslib/tslib.js:136:27)
    at Object.next (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/tslib/tslib.js:117:57)
    at /Users/zackaryc/code/newNgAtlanta/conferences/node_modules/tslib/tslib.js:110:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/tslib/tslib.js:106:16)
    at EventEmitter.<anonymous> (/Users/zackaryc/code/newNgAtlanta/conferences/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:232:32)
    at EventEmitter.emit (events.js:209:13)

Desired functionality

Mention any other details that might be useful

bug: form controller is not working properly (validators should 1 single time set)

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Versions

latest

Repro steps

get reference of the mat-password-strength component and get access to the formController --> the validators are not set properly

Desired functionality

ability to use the validators in combination with mat-error : e.g:

<!--password error msgs-->
              <mat-error *ngIf="passwordComponentWithValidation.passwordFormControl.invalid">
                Password is invalid
              </mat-error>
              <mat-error *ngIf="passwordComponentWithValidation.passwordFormControl.hasError('required')">
                Password is required
              </mat-error>
              <mat-error *ngIf="passwordComponentWithValidation.passwordFormControl.hasError('pattern')">
                Password is not valid
              </mat-error>

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 0.67.3 to 0.67.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests passed on CircleCI! (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

How to set tabindex on mat-pass-toggle-visibility button

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

OS and Version?

Linux Ubuntu 18.04.3

Versions

Angular CLI: 8.3.12
Node: 10.18.0
OS: linux x64
Angular: 8.2.11
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.803.12
@angular-devkit/build-angular 0.803.12
@angular-devkit/build-optimizer 0.803.12
@angular-devkit/build-webpack 0.803.12
@angular-devkit/core 8.3.12
@angular-devkit/schematics 8.3.12
@angular/cdk 8.2.3
@angular/cli 8.3.12
@angular/flex-layout 8.0.0-beta.27
@angular/material 8.2.3
@ngtools/webpack 8.3.12
@schematics/angular 8.3.12
@schematics/update 0.803.12
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2

Repro steps

There seems to be no way to control the tabindex value for the button created by mat-pass-toggle-visibility. Thus, there doesn't seem to be a way to setup the tab key so that it would go from the password field to the confirm password field with a single tab (it'll always go to the password's visibility button first).

The log given by the failure

Desired functionality

Maybe there could be an input value for mat-pass-toggle-visibility to set the desired tabindex value?

Mention any other details that might be useful

An in-range update of webpack-cli is breaking the build 🚨

The devDependency webpack-cli was updated from 3.3.8 to 3.3.9.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webpack-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • ci/circleci: Your tests passed on CircleCI! (Details).

Commits

The new version differs by 3 commits.

  • 48c03ab chore: v3.3.9
  • a1341bd Merge pull request #1078 from lneveu/fix/process-exit-hang
  • ee001bd fix: use process.exitCode instead of process.exit in compilerCallback

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.9.2 to 1.9.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.9.3

2019-04-10

Bug Fixes

  • Simplify return expressions that are evaluated before the surrounding function is bound (#2803)

Pull Requests

  • #2803: Handle out-of-order binding of identifiers to improve tree-shaking (@lukastaegert)
Commits

The new version differs by 3 commits.

  • 516a06d 1.9.3
  • a5526ea Update changelog
  • c3d73ff Handle out-of-order binding of identifiers to improve tree-shaking (#2803)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Support @Input formControlName with <mat-password-strength>

  • feature request

Repro steps

file.ts:
import { Validators as Special } from "@angular-material-extensions/password-strength"
let myFormGroup = formbuilder.group({
passwdstrength: [ '', Special.strength( minchars, lowercases, ...etc ), Special.confirmation( fldid )],
email: [ '', [ Validators.required, Validators.email ]]
});

file.html:
<mat-password-strength formControlName="passwdstrength" ...>

Desired functionality

(Pls.) Support attribute "formControlName" for use with angular FormGroup(s)
In my special case, this would help me with:

https://material.angular.io/components/stepper/overview

<mat-step [stepControl]="myFormGroup">

(Disable transitions to next step(s) as long as form validation fails)

... would be of great help. Thanx.

Edit:
Not sure, but maybe this is the direction:
https://stackoverflow.com/questions/44731894/get-access-to-formcontrol-from-the-custom-form-component-in-angular

feat: add schematics to the library (ng add @angular-material-extensions/password-strength)

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Versions

lib version -> 3.4.1

Desired functionality

the developer should be able to add the library via schematics

ng add @angular-material-extensions/password-strength

and everything should be already setup e.g: add import statement of the lib to app.module.ts

Custom Regex for Validating Password and Displaying on Info Component

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ x ] feature request

OS and Version?

Windows 10

Versions

Package Version

@angular-devkit/architect 0.12.4
@angular-devkit/build-angular 0.12.4
@angular-devkit/build-optimizer 0.12.4
@angular-devkit/build-webpack 0.12.4
@angular-devkit/core 7.2.4
@angular-devkit/schematics 7.3.0
@angular/cdk 7.3.6
@angular/cli 7.3.0
@angular/language-service 7.2.4
@angular/material 7.3.6
@ngtools/webpack 7.2.4
@schematics/angular 7.3.0
@schematics/update 0.13.0
rxjs 6.4.0
typescript 3.1.6
webpack 4.28.4

Desired functionality

Password Strength Component

  • ability to set custom regex when testing password strength

Password Strength Info Component

  • ability to set custom messages that correspond to the custom regex

Password is valid when missing a required upper case character

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version? Mac OS High Sierra

Repro steps

Open https://angular-material-extensions.github.io/password-strength/home
Go to @angular-material-extensions/password-strength second's panel (client side password validation with angular form controller)

Toggle Show Password Details
Enter Password:
Hello12!
The form input will outline in green, no error msg shown.
Change H-> h
The Show Password Details will indicate a missing upper case character.
The form input will not show any error msg and still color the outline in green.

Desired functionality

It should invalidate the form input and show a proper error msg (password is invalid)

feat: add password confirmation (optional on demand)

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ x] feature request

Versions

lib v4.3.1

Desired functionality

developers should be able to add a form control ta validated the password confirmation

Mention any other details that might be useful

#38

console.log printing out password from mat-password-strength.component.ts line 65

Bug Report or Feature Request (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Windows 10

Versions

Angular CLI: 7.3.6
Node: 10.15.0
OS: win32 x64
Angular: 7.2.10
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.13.6
@angular-devkit/build-angular 0.13.6
@angular-devkit/build-optimizer 0.13.6
@angular-devkit/build-webpack 0.13.6
@angular-devkit/core 7.3.6
@angular-devkit/schematics 7.3.6
@angular/cdk 7.3.5
@angular/cli 7.3.6
@angular/material 7.3.5
@ngtools/webpack 7.3.6
@schematics/angular 7.3.6
@schematics/update 0.13.6
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.0

Repro steps

Use the mat-password-strength component, open developer javascript console, type password

The log given by the failure

This is printed to the console:

{password: SimpleChange}
password: SimpleChange
currentValue: "MyPassword"
firstChange: false
previousValue: "MyPasswor"
proto: Object
proto: Object

Desired functionality

console.log should be removed from mat-password-strength.component.ts line 65

Mention any other details that might be useful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.