Pull request #12: VM/TestsIds
Merge in SL/common-ui from VM/TestsIds to master * commit 'dfa5be23247ae142b4ce516eb023f5f8b55331d2': Added multiple ids needed for tests
This commit is contained in:
commit
fe2ad1138a
@ -8,6 +8,7 @@
|
|||||||
[class.grey-selected]="greySelected"
|
[class.grey-selected]="greySelected"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[type]="isSubmit ? 'submit' : 'button'"
|
[type]="isSubmit ? 'submit' : 'button'"
|
||||||
|
[id]="id ? id : buttonId"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
>
|
>
|
||||||
<mat-icon [svgIcon]="icon"></mat-icon>
|
<mat-icon [svgIcon]="icon"></mat-icon>
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import { IqserTooltipPosition, IqserTooltipPositions } from '../../utils';
|
|||||||
export class CircleButtonComponent implements OnInit {
|
export class CircleButtonComponent implements OnInit {
|
||||||
readonly circleButtonTypes = CircleButtonTypes;
|
readonly circleButtonTypes = CircleButtonTypes;
|
||||||
|
|
||||||
|
@Input() id!: string;
|
||||||
@Input() icon!: string;
|
@Input() icon!: string;
|
||||||
@Input() tooltip?: string;
|
@Input() tooltip?: string;
|
||||||
@Input() tooltipClass?: string;
|
@Input() tooltipClass?: string;
|
||||||
@ -49,4 +50,8 @@ export class CircleButtonComponent implements OnInit {
|
|||||||
this.action.emit($event);
|
this.action.emit($event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get buttonId (): String {
|
||||||
|
return `${Math.random().toString(36).substring(2, 9)}-button`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
mat-button
|
mat-button
|
||||||
type="button"
|
type="button"
|
||||||
|
[id]="id ? id : buttonId"
|
||||||
>
|
>
|
||||||
<mat-icon *ngIf="icon" [svgIcon]="icon"></mat-icon>
|
<mat-icon *ngIf="icon" [svgIcon]="icon"></mat-icon>
|
||||||
<span>{{ label }}</span>
|
<span>{{ label }}</span>
|
||||||
|
|||||||
@ -12,9 +12,14 @@ export class IconButtonComponent {
|
|||||||
readonly iconButtonTypes = IconButtonTypes;
|
readonly iconButtonTypes = IconButtonTypes;
|
||||||
|
|
||||||
@Input() @Required() label!: string;
|
@Input() @Required() label!: string;
|
||||||
|
@Input() id!: string;
|
||||||
@Input() icon?: string;
|
@Input() icon?: string;
|
||||||
@Input() showDot = false;
|
@Input() showDot = false;
|
||||||
@Input() disabled = false;
|
@Input() disabled = false;
|
||||||
@Input() type: IconButtonType = IconButtonTypes.default;
|
@Input() type: IconButtonType = IconButtonTypes.default;
|
||||||
@Output() readonly action = new EventEmitter<MouseEvent>();
|
@Output() readonly action = new EventEmitter<MouseEvent>();
|
||||||
|
|
||||||
|
get buttonId (): String {
|
||||||
|
return `${Math.random().toString(36).substring(2, 9)}-button`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
export interface BaseHeaderConfig {
|
export interface BaseHeaderConfig {
|
||||||
|
readonly id?: string;
|
||||||
readonly label: string;
|
readonly label: string;
|
||||||
readonly icon?: string;
|
readonly icon?: string;
|
||||||
readonly hide?: boolean;
|
readonly hide?: boolean;
|
||||||
|
|||||||
@ -53,6 +53,7 @@
|
|||||||
[icon]="config.icon"
|
[icon]="config.icon"
|
||||||
[iqserHelpMode]="config.helpModeKey"
|
[iqserHelpMode]="config.helpModeKey"
|
||||||
[tooltip]="config.label"
|
[tooltip]="config.label"
|
||||||
|
[id]="config.id"
|
||||||
tooltipPosition="below"
|
tooltipPosition="below"
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<div *ngIf="config.requireInput" class="iqser-input-group required w-300 mt-24">
|
<div *ngIf="config.requireInput" class="iqser-input-group required w-300 mt-24">
|
||||||
<label>{{ inputLabel }}</label>
|
<label>{{ inputLabel }}</label>
|
||||||
<input [(ngModel)]="inputValue" />
|
<input [(ngModel)]="inputValue" id="requiredConfirmInput"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="config.checkboxes.length > 0" class="mt-24 checkboxes-wrapper">
|
<div *ngIf="config.checkboxes.length > 0" class="mt-24 checkboxes-wrapper">
|
||||||
@ -35,6 +35,7 @@
|
|||||||
[disabled]="(config.requireInput && confirmationDoesNotMatch()) || config.disableConfirm"
|
[disabled]="(config.requireInput && confirmationDoesNotMatch()) || config.disableConfirm"
|
||||||
color="primary"
|
color="primary"
|
||||||
mat-flat-button
|
mat-flat-button
|
||||||
|
id="confirm"
|
||||||
>
|
>
|
||||||
{{ config.confirmationText }}
|
{{ config.confirmationText }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user