Browse Source

UI: Move time unit intput to shared component

pull/13857/head
ArtemDzhereleiko 1 year ago
parent
commit
1725fbf3b6
  1. 3
      ui-ngx/src/app/modules/home/components/rule-node/common/common-rule-node-config.module.ts
  2. 0
      ui-ngx/src/app/shared/components/time-unit-input.component.html
  3. 2
      ui-ngx/src/app/shared/components/time-unit-input.component.ts
  4. 3
      ui-ngx/src/app/shared/shared.module.ts

3
ui-ngx/src/app/modules/home/components/rule-node/common/common-rule-node-config.module.ts

@ -33,7 +33,6 @@ import { RelationsQueryConfigOldComponent } from './relations-query-config-old.c
import { SelectAttributesComponent } from './select-attributes.component'; import { SelectAttributesComponent } from './select-attributes.component';
import { AlarmStatusSelectComponent } from './alarm-status-select.component'; import { AlarmStatusSelectComponent } from './alarm-status-select.component';
import { ExampleHintComponent } from './example-hint.component'; import { ExampleHintComponent } from './example-hint.component';
import { TimeUnitInputComponent } from './time-unit-input.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -52,7 +51,6 @@ import { TimeUnitInputComponent } from './time-unit-input.component';
SelectAttributesComponent, SelectAttributesComponent,
AlarmStatusSelectComponent, AlarmStatusSelectComponent,
ExampleHintComponent, ExampleHintComponent,
TimeUnitInputComponent
], ],
imports: [ imports: [
CommonModule, CommonModule,
@ -75,7 +73,6 @@ import { TimeUnitInputComponent } from './time-unit-input.component';
SelectAttributesComponent, SelectAttributesComponent,
AlarmStatusSelectComponent, AlarmStatusSelectComponent,
ExampleHintComponent, ExampleHintComponent,
TimeUnitInputComponent
] ]
}) })

0
ui-ngx/src/app/modules/home/components/rule-node/common/time-unit-input.component.html → ui-ngx/src/app/shared/components/time-unit-input.component.html

2
ui-ngx/src/app/modules/home/components/rule-node/common/time-unit-input.component.ts → ui-ngx/src/app/shared/components/time-unit-input.component.ts

@ -25,7 +25,7 @@ import {
Validator, Validator,
Validators Validators
} from '@angular/forms'; } from '@angular/forms';
import { TimeUnit, timeUnitTranslations } from '../rule-node-config.models'; import { TimeUnit, timeUnitTranslations } from '@home/components/rule-node/rule-node-config.models';
import { isDefinedAndNotNull, isNumeric } from '@core/utils'; import { isDefinedAndNotNull, isNumeric } from '@core/utils';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { coerceBoolean, coerceNumber } from '@shared/decorators/coercion'; import { coerceBoolean, coerceNumber } from '@shared/decorators/coercion';

3
ui-ngx/src/app/shared/shared.module.ts

@ -228,6 +228,7 @@ import { JsFuncModuleRowComponent } from '@shared/components/js-func-module-row.
import { EntityKeyAutocompleteComponent } from '@shared/components/entity/entity-key-autocomplete.component'; import { EntityKeyAutocompleteComponent } from '@shared/components/entity/entity-key-autocomplete.component';
import { DurationLeftPipe } from '@shared/pipe/duration-left.pipe'; import { DurationLeftPipe } from '@shared/pipe/duration-left.pipe';
import { MqttVersionSelectComponent } from '@shared/components/mqtt-version-select.component'; import { MqttVersionSelectComponent } from '@shared/components/mqtt-version-select.component';
import { TimeUnitInputComponent } from "@shared/components/time-unit-input.component";
export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService) { export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService) {
return markedOptionsService; return markedOptionsService;
@ -443,6 +444,7 @@ export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService)
ScadaSymbolInputComponent, ScadaSymbolInputComponent,
EntityKeyAutocompleteComponent, EntityKeyAutocompleteComponent,
MqttVersionSelectComponent, MqttVersionSelectComponent,
TimeUnitInputComponent,
], ],
imports: [ imports: [
CommonModule, CommonModule,
@ -707,6 +709,7 @@ export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService)
ScadaSymbolInputComponent, ScadaSymbolInputComponent,
EntityKeyAutocompleteComponent, EntityKeyAutocompleteComponent,
MqttVersionSelectComponent, MqttVersionSelectComponent,
TimeUnitInputComponent,
] ]
}) })
export class SharedModule { } export class SharedModule { }

Loading…
Cancel
Save