[ACS-6693] Angular 15 migration initial point

This commit is contained in:
MichalKinas
2024-03-13 09:19:19 +01:00
parent 7982c1e7e7
commit 698b53d522
15 changed files with 101 additions and 97 deletions

View File

@@ -1,6 +1,6 @@
<form class="aca-rule-action__form" [formGroup]="form">
<mat-form-field class="aca-rule-action-full-width" appearance="standard">
<mat-form-field class="aca-rule-action-full-width">
<mat-select
formControlName="actionDefinitionId"
data-automation-id="rule-action-select"

View File

@@ -62,7 +62,7 @@ describe('RuleOptionsUiComponent', () => {
TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [FormsModule, ReactiveFormsModule, CoreTestingModule, RuleOptionsUiComponent],
providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'never' } }]
providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'auto' } }]
});
fixture = TestBed.createComponent(RuleOptionsUiComponent);
@@ -153,7 +153,7 @@ describe('RuleOptionsUiComponent', () => {
expect((await matOptions[2].getText()).trim()).toBe('Script 2');
});
it('should always show a label for the error script dropdown even when MAT_FORM_FIELD_DEFAULT_OPTIONS sets floatLabel to never', () => {
it('should always show a label for the error script dropdown even when MAT_FORM_FIELD_DEFAULT_OPTIONS sets floatLabel to auto', () => {
component.writeValue({
isEnabled: true,
isInheritable: false,

View File

@@ -4,7 +4,7 @@
<div class="aca-rule-details__form__row aca-rule-details__form__name">
<label for="rule-details-name-input">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.NAME' | translate }}</label>
<div>
<mat-form-field floatLabel='never' class="aca-rule-details__form__row__field">
<mat-form-field floatLabel='auto' class="aca-rule-details__form__row__field">
<input
id="rule-details-name-input"
matInput type="text" formControlName="name" data-automation-id="rule-details-name-input"
@@ -17,7 +17,7 @@
<div class="aca-rule-details__form__row aca-rule-details__form__description">
<label for="rule-details-description-textarea">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.DESCRIPTION' | translate }}</label>
<div>
<mat-form-field floatLabel='never' class="aca-rule-details__form__row__field">
<mat-form-field floatLabel='auto' class="aca-rule-details__form__row__field">
<textarea
class="aca-rule-details__form__row__field__textarea"
id="rule-details-description-textarea"

View File

@@ -75,14 +75,16 @@
/* stylelint-disable selector-class-pattern */
&.aca-read-only,
.mat-form-field-disabled {
.mat-form-field-underline,
.mat-select-arrow-wrapper {
display: none;
.mat-mdc-form-field-disabled {
.mdc-line-ripple {
&::before,
&::after {
display: none;
}
}
*:disabled,
.mat-select-disabled .mat-select-value {
.mat-mdc-select-disabled .mat-mdc-select-value {
color: inherit;
}
}