Lines 65-105javascript
65 const passedCount = this.countPassed();
66 this.progressValue = Math.min(Math.max(passedCount * (100 / Object.keys(this.criteriaPassed).length), 1), 100);
67 this.validationCheck.emit(passedCount === Object.keys(this.criteriaPassed).length);
71 for (const key in this.criteriaPassed) {
72 if (Object.prototype.hasOwnProperty.call(this.criteriaPassed, key) && this.criteriaPassed[key]) {
79 return this.applicationTheme === 'classic' ? 'Info' : 'Info-in-line';
82 return this.applicationTheme === 'classic' ? 'Round-check' : 'Check-round-in-line';
84 static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PasswordStrengthComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
85 static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PasswordStrengthComponent, isStandalone: false, selector: "ui-password-strength", inputs: { applicationTheme: "applicationTheme", password: "password" }, outputs: { validationCheck: "validationCheck" }, ngImport: i0, template: "<div class=\"criteria-container\">\n <div class=\"progress\">\n <ui-progress-bar\n [progress]=\"progressValue === 1 ? 0 : progressValue\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-progress-bar>
87i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PasswordStrengthComponent, decorators: [{
89 args: [{ selector: 'ui-password-strength', standalone: false, template: "<div class=\"criteria-container\">\n <div class=\"progress\">\n <ui-progress-bar\n [progress]=\"progressValue === 1 ? 0 : progressValue\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-progress-bar>\n </div>\n\n @for (criterion of criteria; track criterion) {\n <div\n class=\"criterion\"\n [ngClass]=\"{ passed: criteriaPassed[criterion.key], error: !criteriaPassed[criterion.key] && showError }\"\n >\n
90 }], ctorParameters: () => [{ type: undefined, decorators: [{
94 args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
95 }] }], propDecorators: { applicationTheme: [{
99 }], validationCheck: [{
103class PasswordStrengthComponentModule {
104 static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PasswordStrengthComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
105 static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: PasswordStrengthComponentModule, declarations: [PasswordStrengthComponent], imports: [CommonModule, IconComponentModule, ProgressBarComponentModule, UiTranslatePipe], exports: [PasswordStrengthComponent] }); }
Long lines were clipped for display.