-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): moves *ng directives to new control flow syntax
refactor(core): moves *ng directives to new control flow syntax
- Loading branch information
Showing
12 changed files
with
149 additions
and
132 deletions.
There are no files selected for viewing
31 changes: 17 additions & 14 deletions
31
projects/ngxsmart/src/lib/components/alert/alert.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
<div *ngIf="isOpen" class="row {{class}}"> | ||
<div class="col-xs-12 col-sm-12 col-md-auto mx-auto"> | ||
<div class="alert alert-{{ type }} alert-dismissible alert_div" role="alert"> | ||
<ng-content></ng-content> | ||
<button | ||
(click)="closeAlert()" | ||
*ngIf="dismissible" | ||
aria-label="Close" | ||
class="btn-close" | ||
data-bs-dismiss="alert" | ||
type="button"></button> | ||
</div> | ||
</div> | ||
</div> | ||
@if (isOpen) { | ||
<div class="row {{class}}"> | ||
<div class="col-xs-12 col-sm-12 col-md-auto mx-auto"> | ||
<div class="alert alert-{{ type }} alert-dismissible alert_div" role="alert"> | ||
<ng-content></ng-content> | ||
@if (dismissible) { | ||
<button | ||
(click)="closeAlert()" | ||
aria-label="Close" | ||
class="btn-close" | ||
data-bs-dismiss="alert" | ||
type="button"></button> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
} |
83 changes: 44 additions & 39 deletions
83
projects/ngxsmart/src/lib/components/autocomplete/autocomplete.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,49 @@ | ||
<div [formGroup]="inputFormGroup"> | ||
<mat-form-field appearance="fill" class="{{ classes }}"> | ||
<mat-label>{{ label }}</mat-label> | ||
<input | ||
#inputAutoComplete | ||
#trigger="matAutocompleteTrigger" | ||
[matAutocomplete]="auto" | ||
[placeholder]="placeHolder" | ||
[required]="required" | ||
formControlName="autocomplete" | ||
matInput | ||
type="text" /> | ||
<mat-form-field appearance="fill" class="{{ classes }}"> | ||
<mat-label>{{ label }}</mat-label> | ||
<input | ||
#inputAutoComplete | ||
#trigger="matAutocompleteTrigger" | ||
[matAutocomplete]="auto" | ||
[placeholder]="placeHolder" | ||
[required]="required" | ||
formControlName="autocomplete" | ||
matInput | ||
type="text"/> | ||
|
||
<div matSuffix style="display: flex"> | ||
<button | ||
(click)="clearInput($event)" | ||
*ngIf="inputFormGroup.get('autocomplete')?.value !== null && inputFormGroup.get('autocomplete')?.value !== ''" | ||
aria-label="Clear" | ||
mat-icon-button | ||
type="button"> | ||
<mat-icon>clear</mat-icon> | ||
</button> | ||
<div matSuffix style="display: flex"> | ||
@if (!!inputFormGroup.get('autocomplete')?.value) { | ||
<button | ||
(click)="clearInput($event)" | ||
aria-label="Clear" | ||
mat-icon-button | ||
type="button"> | ||
<mat-icon>clear</mat-icon> | ||
</button> | ||
} | ||
<button (click)="openOrClosePanel($event, trigger)" aria-label="Clear" mat-icon-button type="button"> | ||
<mat-icon>{{ arrowIconSubject.getValue() }}</mat-icon> | ||
</button> | ||
</div> | ||
|
||
<button (click)="openOrClosePanel($event, trigger)" aria-label="Clear" mat-icon-button type="button"> | ||
<mat-icon>{{ arrowIconSubject.getValue() }}</mat-icon> | ||
</button> | ||
</div> | ||
<mat-autocomplete | ||
#auto="matAutocomplete" | ||
(closed)="arrowIconSubject.next('arrow_drop_down')" | ||
(opened)="arrowIconSubject.next('arrow_drop_up')" | ||
(optionSelected)="arrowIconSubject.next('arrow_drop_down')" | ||
[displayWith]="displayFn"> | ||
@for (option of filteredOptions|async;track option[bindValue]) { | ||
<mat-option | ||
(onSelectionChange)="emitSelectedValue($event)" | ||
[value]="option"> | ||
@if ((option | typeOf) === 'string') { | ||
<ng-container>{{ option }}</ng-container> | ||
}@else if ((option | typeOf) === 'object') { | ||
<ng-container>{{ option[bindLabel] }}</ng-container> | ||
} | ||
</mat-option> | ||
} | ||
|
||
<mat-autocomplete | ||
#auto="matAutocomplete" | ||
(closed)="arrowIconSubject.next('arrow_drop_down')" | ||
(opened)="arrowIconSubject.next('arrow_drop_up')" | ||
(optionSelected)="arrowIconSubject.next('arrow_drop_down')" | ||
[displayWith]="displayFn"> | ||
<mat-option | ||
(onSelectionChange)="emitSelectedValue($event)" | ||
*ngFor="let option of filteredOptions | async; trackBy: trackByFn" | ||
[value]="option"> | ||
<ng-container *ngIf="(option | typeOf) === 'string'">{{ option }}</ng-container> | ||
<ng-container *ngIf="(option | typeOf) === 'object'">{{ option[bindLabel] }}</ng-container> | ||
</mat-option> | ||
</mat-autocomplete> | ||
</mat-form-field> | ||
</mat-autocomplete> | ||
</mat-form-field> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
projects/ngxsmart/src/lib/components/buttons/delete-button/delete-button.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 11 additions & 9 deletions
20
projects/ngxsmart/src/lib/components/buttons/primary-button/primary-button.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
.../ngxsmart/src/lib/components/buttons/save-primary-button/save-primary-button.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
projects/ngxsmart/src/lib/components/buttons/success-button/success-button.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 24 additions & 17 deletions
41
projects/ngxsmart/src/lib/components/ngx-spinner/ngx-spinner.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
<div | ||
#overlay | ||
*ngIf="spinner.show" | ||
[@.disabled]="disableAnimation" | ||
[@fadeIn]="'in'" | ||
[style.background-color]="spinner.bdColor" | ||
[style.position]="spinner.fullScreen ? 'fixed' : 'absolute'" | ||
[style.z-index]="spinner.zIndex" | ||
class="ngx-spinner-overlay"> | ||
<div *ngIf="!template" [class]="spinner.class" [style.color]="spinner.color"> | ||
<div *ngFor="let index of spinner.divArray"></div> | ||
</div> | ||
<div *ngIf="template" [innerHTML]="template | safeHtml"></div> | ||
<div [style.z-index]="spinner.zIndex" class="loading-text"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> | ||
@if(spinner.show){ | ||
<div | ||
#overlay | ||
[@.disabled]="disableAnimation" | ||
[@fadeIn]="'in'" | ||
[style.background-color]="spinner.bdColor" | ||
[style.position]="spinner.fullScreen ? 'fixed' : 'absolute'" | ||
[style.z-index]="spinner.zIndex" | ||
class="ngx-spinner-overlay"> | ||
@if(spinner.show){ | ||
<div [class]="spinner.class" [style.color]="spinner.color"> | ||
@for( index of spinner.divArray;track index){ | ||
<div></div> | ||
} | ||
</div> | ||
} | ||
@if(template){ | ||
<div [innerHTML]="template | safeHtml"></div> | ||
} | ||
<div [style.z-index]="spinner.zIndex" class="loading-text"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.