Browse Source

deprecate abp-password component

pull/18112/head
Sinan Öztürk 3 years ago
parent
commit
c515be5e68
  1. 0
      docs/en/UI/Angular/Caps-Lock-Directive.md
  2. 8
      docs/en/docs-nav.json
  3. 29
      npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.html
  4. 5
      npm/ng-packs/packages/theme-shared/extensions/src/lib/ui-extensions.module.ts
  5. 4
      npm/ng-packs/packages/theme-shared/src/lib/components/password/password.component.ts

0
docs/en/UI/Angular/CapsLock.directive.md → docs/en/UI/Angular/Caps-Lock-Directive.md

8
docs/en/docs-nav.json

@ -1122,6 +1122,14 @@
"text": "Loading Directive", "text": "Loading Directive",
"path": "UI/Angular/Loading-Directive.md" "path": "UI/Angular/Loading-Directive.md"
}, },
{
"text": "Show Password Directive",
"path": "UI/Angular/Show-Password-Directive.md"
},
{
"text": "Caps Lock Directive",
"path": "UI/Angular/Caps-Lock-Directive.md"
},
{ {
"text": "Toast Overlay", "text": "Toast Overlay",
"path": "UI/Angular/Toaster-Service.md" "path": "UI/Angular/Toaster-Service.md"

29
npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.html

@ -141,17 +141,24 @@
<ng-template ngSwitchCase="passwordinputgroup"> <ng-template ngSwitchCase="passwordinputgroup">
<ng-template [ngTemplateOutlet]="label"></ng-template> <ng-template [ngTemplateOutlet]="label"></ng-template>
<abp-password <div class="input-group form-group" validationTarget>
*abpReplaceableTemplate="{ <input
componentKey: passwordKey, class="form-control"
inputs: { [id]="prop.id"
inputId: { value: prop.id }, [formControlName]="prop.name"
formControlName: { value: prop.name } [abpShowPassword]="showPassword"
} />
}" <button class="btn btn-secondary" type="button" (click)="showPassword = !showPassword">
[inputId]="prop.id" <i
[formControlName]="prop.name" class="fa"
></abp-password> aria-hidden="true"
[ngClass]="{
'fa-eye-slash': !showPassword,
'fa-eye': showPassword
}"
></i>
</button>
</div>
</ng-template> </ng-template>
<small *ngIf="prop.formText" class="text-muted d-block">{{ <small *ngIf="prop.formText" class="text-muted d-block">{{

5
npm/ng-packs/packages/theme-shared/extensions/src/lib/ui-extensions.module.ts

@ -1,4 +1,4 @@
import { CoreModule } from '@abp/ng.core'; import { CoreModule, ShowPasswordDirective } from '@abp/ng.core';
import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { import {
@ -49,7 +49,8 @@ import { CreateInjectorPipe } from './pipes/create-injector.pipe';
NgbDropdownModule, NgbDropdownModule,
NgbTimepickerModule, NgbTimepickerModule,
NgbTypeaheadModule, NgbTypeaheadModule,
NgbTooltipModule NgbTooltipModule,
ShowPasswordDirective
], ],
}) })
export class BaseUiExtensionsModule {} export class BaseUiExtensionsModule {}

4
npm/ng-packs/packages/theme-shared/src/lib/components/password/password.component.ts

@ -2,6 +2,10 @@ import { Component, forwardRef, Injector, Input } from '@angular/core';
import { AbstractNgModelComponent } from '@abp/ng.core'; import { AbstractNgModelComponent } from '@abp/ng.core';
import { NG_VALUE_ACCESSOR } from '@angular/forms'; import { NG_VALUE_ACCESSOR } from '@angular/forms';
/**
* @deprecated use ShowPasswordDirective directive
* https://docs.abp.io/en/abp/latest/UI/Angular/Show-Password-Directive
*/
@Component({ @Component({
selector: 'abp-password', selector: 'abp-password',
templateUrl: `./password.component.html`, templateUrl: `./password.component.html`,

Loading…
Cancel
Save