From 5a4ed98aafcc92c437022664787677fcccaf04eb Mon Sep 17 00:00:00 2001 From: George Date: Thu, 3 Aug 2023 17:05:41 +0300 Subject: [PATCH] RED-7115, use fallback in translation, remove red-ui references. --- .../details-radio/details-radio.component.ts | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/lib/inputs/details-radio/details-radio.component.ts b/src/lib/inputs/details-radio/details-radio.component.ts index 3f25921..12dc9f7 100644 --- a/src/lib/inputs/details-radio/details-radio.component.ts +++ b/src/lib/inputs/details-radio/details-radio.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, inject, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; +import { Component, EventEmitter, inject, Input, Output } from '@angular/core'; import { DetailsRadioOption } from './details-radio-option'; import { FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms'; import { FormFieldComponent } from '../form-field/form-field-component.directive'; @@ -9,12 +9,6 @@ import { MatIconModule } from '@angular/material/icon'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatTooltipModule } from '@angular/material/tooltip'; import { ReplaceNbspPipe } from '../../pipes/replace-nbsp.pipe'; -import { List } from '../../utils'; - -export const removeActionDescriptorTranslationsPaths: List = [ - 'remove-redaction.dialog.content.options.only-here.types.redact', - 'remove-redaction.dialog.content.options.only-here.types.recommend', -]; @Component({ selector: 'iqser-details-radio [options]', @@ -47,7 +41,7 @@ export const removeActionDescriptorTranslationsPaths: List = [ ReplaceNbspPipe, ], }) -export class DetailsRadioComponent extends FormFieldComponent> implements OnChanges { +export class DetailsRadioComponent extends FormFieldComponent> { @Input() options: DetailsRadioOption[] = []; @Input() displayInRow = false; @@ -58,21 +52,6 @@ export class DetailsRadioComponent extends FormFieldComponent { - const type = option.descriptionParams?.['type']; - if (!type) return option; - return { - ...option, - descriptionParams: { - ...option.descriptionParams, - type: removeActionDescriptorTranslationsPaths.includes(type) ? this.#translateService.instant(type) : type, - }, - }; - }); - } - toggleOption(option: DetailsRadioOption): void { if (option.value !== this._value?.value && !option.disabled) { this.markAsTouched();