@@ -47,13 +42,7 @@
*ngIf="entityAttributesFilterTargetType !== 'ENTITY'">
diff --git a/ui/src/app/schema-form/widget/number/number.component.html b/ui/src/app/schema-form/widget/number/number.component.html
index 8f50e41af..aa07e2fbb 100644
--- a/ui/src/app/schema-form/widget/number/number.component.html
+++ b/ui/src/app/schema-form/widget/number/number.component.html
@@ -5,12 +5,7 @@
-
- {{ schema.description }}
-
-
+
{{schema.description}}
diff --git a/ui/src/app/schema-form/widget/select/select.component.html b/ui/src/app/schema-form/widget/select/select.component.html
index 4b3437484..819a89553 100644
--- a/ui/src/app/schema-form/widget/select/select.component.html
+++ b/ui/src/app/schema-form/widget/select/select.component.html
@@ -5,12 +5,7 @@
-
- {{ schema.description }}
-
-
+
diff --git a/ui/src/app/schema-form/widget/string/string.component.html b/ui/src/app/schema-form/widget/string/string.component.html
index b7741f53c..e8dd0001a 100644
--- a/ui/src/app/schema-form/widget/string/string.component.html
+++ b/ui/src/app/schema-form/widget/string/string.component.html
@@ -3,12 +3,7 @@
{{ schema.title }}
-
- {{ schema.description }}
-
-
+
{{ schema.description }}
diff --git a/ui/src/app/schema-form/widget/textarea/textarea.component.html b/ui/src/app/schema-form/widget/textarea/textarea.component.html
index b14bbc489..fb8164600 100644
--- a/ui/src/app/schema-form/widget/textarea/textarea.component.html
+++ b/ui/src/app/schema-form/widget/textarea/textarea.component.html
@@ -5,12 +5,7 @@
-
- {{ schema.description }}
-
-
+
{{ schema.description }}
diff --git a/ui/src/app/shared/autocomplete/autocomplete.component.spec.ts b/ui/src/app/shared/autocomplete/autocomplete.component.spec.ts
index d087a87f6..67c2110b5 100644
--- a/ui/src/app/shared/autocomplete/autocomplete.component.spec.ts
+++ b/ui/src/app/shared/autocomplete/autocomplete.component.spec.ts
@@ -2,8 +2,6 @@ import { Component, ViewChild, SimpleChange, ElementRef, SimpleChanges } from '@
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
-import { StoreModule, Store, combineReducers } from '@ngrx/store';
-import { NgbPopoverModule, NgbPopoverConfig } from '@ng-bootstrap/ng-bootstrap/popover/popover.module';
import { AutoCompleteComponent } from './autocomplete.component';
import { NavigatorService } from '../../core/service/navigator.service';
import { ValidationClassDirective } from '../validation/validation-class.directive';
diff --git a/ui/src/app/shared/component/info-icon.component.html b/ui/src/app/shared/component/info-icon.component.html
new file mode 100644
index 000000000..58c70b2db
--- /dev/null
+++ b/ui/src/app/shared/component/info-icon.component.html
@@ -0,0 +1,12 @@
+
+ {{ description }}
+
+
\ No newline at end of file
diff --git a/ui/src/app/shared/component/info-icon.component.scss b/ui/src/app/shared/component/info-icon.component.scss
new file mode 100644
index 000000000..e42aa999e
--- /dev/null
+++ b/ui/src/app/shared/component/info-icon.component.scss
@@ -0,0 +1,13 @@
+:host {
+ .btn-nostyle {
+ margin: 0px;
+ padding: 0px;
+ background: none;
+ border: none;
+ display: inline;
+ }
+
+ .popover .popover-body {
+ min-width: 160px;
+ }
+}
\ No newline at end of file
diff --git a/ui/src/app/shared/component/info-icon.component.ts b/ui/src/app/shared/component/info-icon.component.ts
new file mode 100644
index 000000000..d5a7fb207
--- /dev/null
+++ b/ui/src/app/shared/component/info-icon.component.ts
@@ -0,0 +1,11 @@
+import { Component, Input, ChangeDetectionStrategy, ElementRef, ViewChild } from '@angular/core';
+
+@Component({
+ selector: 'info-icon',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ templateUrl: './info-icon.component.html',
+ styleUrls: ['./info-icon.component.scss']
+})
+export class InfoIconComponent {
+ @Input() description: string;
+}
diff --git a/ui/src/app/shared/directive/info-label.directive.ts b/ui/src/app/shared/directive/info-label.directive.ts
index 30fca48f4..893bd139d 100644
--- a/ui/src/app/shared/directive/info-label.directive.ts
+++ b/ui/src/app/shared/directive/info-label.directive.ts
@@ -18,7 +18,7 @@ export class InfoLabelDirective {
private element: ElementRef
) {
config.triggers = 'mouseenter:mouseleave';
- config.placement = ['top'];
+ config.placement = ['top', 'left'];
config.container = 'body';
element.nativeElement.setAttribute('tabindex', 0);
}
diff --git a/ui/src/app/shared/shared.module.ts b/ui/src/app/shared/shared.module.ts
index 4218324ba..20792a8aa 100644
--- a/ui/src/app/shared/shared.module.ts
+++ b/ui/src/app/shared/shared.module.ts
@@ -13,13 +13,16 @@ import { ContenteditableDirective } from './contenteditable/contenteditable.dire
import { ReplacePipe } from './pipe/replace.pipe';
import { I18nModule } from '../i18n/i18n.module';
import { CustomDatePipe } from './pipe/date.pipe';
+import { InfoIconComponent } from './component/info-icon.component';
+import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
@NgModule({
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
- I18nModule
+ I18nModule,
+ NgbPopoverModule
],
declarations: [
HighlightPipe,
@@ -32,7 +35,8 @@ import { CustomDatePipe } from './pipe/date.pipe';
PrettyXml,
ReplacePipe,
CustomDatePipe,
- ContenteditableDirective
+ ContenteditableDirective,
+ InfoIconComponent
],
exports: [
HighlightPipe,
@@ -47,7 +51,8 @@ import { CustomDatePipe } from './pipe/date.pipe';
InfoLabelDirective,
ContenteditableDirective,
ReplacePipe,
- CustomDatePipe
+ CustomDatePipe,
+ InfoIconComponent
]
})
export class SharedModule { }
diff --git a/ui/src/testing/modal.stub.ts b/ui/src/testing/modal.stub.ts
index 8c64cff35..2b39e3849 100644
--- a/ui/src/testing/modal.stub.ts
+++ b/ui/src/testing/modal.stub.ts
@@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
-import { BehaviorSubject } from 'rxjs/BehaviorSubject';
-import { NgbModalOptions } from '@ng-bootstrap/ng-bootstrap/modal/modal';
+import { NgbModalOptions } from '@ng-bootstrap/ng-bootstrap';
@Injectable()
export class NgbModalStub {
diff --git a/ui/src/testing/shared.stub.ts b/ui/src/testing/shared.stub.ts
new file mode 100644
index 000000000..64d2ebd65
--- /dev/null
+++ b/ui/src/testing/shared.stub.ts
@@ -0,0 +1,68 @@
+import { Component, Input, NgModule, Output, EventEmitter, forwardRef } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
+
+@Component({
+ selector: 'info-icon',
+ template: '{{ description }}'
+})
+export class MockIconComponent {
+ @Input() description: string;
+}
+
+@Component({
+ selector: 'auto-complete',
+ template: '
',
+ styleUrls: [],
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => MockAutoCompleteComponent),
+ multi: true
+ }
+ ]
+})
+export class MockAutoCompleteComponent implements ControlValueAccessor {
+ @Input() defaultValue = '';
+ @Input() matches: string[] = [];
+ @Input() id: string;
+ @Input() fieldId: string;
+ @Input() autoSelect = false;
+ @Input() noneFoundText = 'No Options Found';
+ @Input() limit = 0;
+ @Input() processing = false;
+ @Input() dropdown = false;
+ @Input() placeholder = '';
+
+ @Output() more: EventEmitter
= new EventEmitter();
+ @Output() onChange: EventEmitter = new EventEmitter();
+
+ propagateChange = (_: any | null) => { };
+ propagateTouched = (_: any | null) => { };
+
+ constructor() { }
+
+ writeValue(value: any): void {}
+
+ registerOnChange(fn: any): void {}
+
+ registerOnTouched(fn: any): void {}
+
+ setDisabledState(isDisabled: boolean = false): void {}
+}
+
+@NgModule({
+ imports: [
+ CommonModule
+ ],
+ declarations: [
+ MockIconComponent,
+ MockAutoCompleteComponent
+ ],
+ exports: [
+ MockIconComponent,
+ MockAutoCompleteComponent
+ ],
+ providers: []
+})
+export class MockSharedModule {}