diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.scss b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.scss new file mode 100644 index 0000000000..5b808b9cfd --- /dev/null +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.scss @@ -0,0 +1,16 @@ +:host ::ng-deep { + // For proper scoping, do not include the .css file suffix here + @import "../../form.component"; +} + +:host { + display: flex; + flex-direction: column; + justify-content: center; +} + +:host /deep/ .custom-select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts index b4cbabe0c5..1d7b59775a 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts @@ -131,7 +131,7 @@ export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type< @Component({ selector: 'ds-dynamic-form-control', - styleUrls: ['./ds-dynamic-form.component.scss', '../../form.component.scss'], + styleUrls: ['./ds-dynamic-form-control-container.component.scss'], templateUrl: './ds-dynamic-form-control-container.component.html', changeDetection: ChangeDetectionStrategy.Default }) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.scss b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.scss deleted file mode 100644 index 52facc2f2c..0000000000 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -:host { - display: flex; - flex-direction: column; - justify-content: center; -} diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts index ccf9e6d292..490275a03b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts @@ -1,20 +1,12 @@ -import { - Component, - ContentChildren, - EventEmitter, - Input, - Output, - QueryList, - ViewChildren -} from '@angular/core'; +import { Component, ContentChildren, EventEmitter, Input, Output, QueryList, ViewChildren } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { - DynamicFormComponent, DynamicFormControlContainerComponent, + DynamicFormComponent, + DynamicFormControlContainerComponent, DynamicFormControlEvent, DynamicFormControlModel, DynamicFormLayout, DynamicFormLayoutService, - DynamicFormService, DynamicTemplateDirective, } from '@ng-dynamic-forms/core'; import { DsDynamicFormControlContainerComponent } from './ds-dynamic-form-control-container.component'; @@ -22,7 +14,6 @@ import { FormBuilderService } from '../form-builder.service'; @Component({ selector: 'ds-dynamic-form', - styleUrls: ['../../form.component.scss'], templateUrl: './ds-dynamic-form.component.html' }) export class DsDynamicFormComponent extends DynamicFormComponent { diff --git a/src/app/shared/form/form.component.ts b/src/app/shared/form/form.component.ts index aeeeedfb52..e656b50a33 100644 --- a/src/app/shared/form/form.component.ts +++ b/src/app/shared/form/form.component.ts @@ -31,8 +31,7 @@ import { FormEntry, FormError } from './form.reducer'; exportAs: 'formComponent', selector: 'ds-form', styleUrls: ['form.component.scss'], - templateUrl: 'form.component.html', - encapsulation: ViewEncapsulation.ShadowDom + templateUrl: 'form.component.html' }) export class FormComponent implements OnDestroy, OnInit {