diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index 6e9ba975ba..f82a7a82ca 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -245,23 +245,24 @@ headerTitle="{{ (!widgetsBundle?.title ? 'widget.select-widgets-bundle' : 'dashboard.select-widget-value') | translate: widgetsBundle }}" - headerHeightPx="120" + headerHeightPx="64" + [isShowSearch]="true" [isReadOnly]="true" [isEdit]="false" - (closeDetails)="onAddWidgetClosed()"> + backgroundColor="#cfd8dc" + (closeDetails)="onAddWidgetClosed()" + (closeSearch)="onCloseSearchBundle()">
-
-
- - -
+
+ +
+
+ +
+
+ -
@@ -54,6 +65,6 @@ -
+
diff --git a/ui-ngx/src/app/modules/home/components/details-panel.component.scss b/ui-ngx/src/app/modules/home/components/details-panel.component.scss index 7fb86556e7..37a0cb227a 100644 --- a/ui-ngx/src/app/modules/home/components/details-panel.component.scss +++ b/ui-ngx/src/app/modules/home/components/details-panel.component.scss @@ -28,7 +28,7 @@ :host ::ng-deep { .mat-toolbar-tools { height: 100%; - min-height: 100px; + min-height: 60px; max-height: 120px; &.tb-details-title-header { min-width: 0; diff --git a/ui-ngx/src/app/modules/home/components/details-panel.component.ts b/ui-ngx/src/app/modules/home/components/details-panel.component.ts index 85e76bcf8b..26391db994 100644 --- a/ui-ngx/src/app/modules/home/components/details-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/details-panel.component.ts @@ -32,6 +32,8 @@ export class DetailsPanelComponent extends PageComponent { @Input() headerSubtitle = ''; @Input() isReadOnly = false; @Input() isAlwaysEdit = false; + @Input() isShowSearch = false; + @Input() backgroundColor = '#FFF'; theFormValue: FormGroup; @@ -50,8 +52,11 @@ export class DetailsPanelComponent extends PageComponent { toggleDetailsEditMode = new EventEmitter(); @Output() applyDetails = new EventEmitter(); + @Output() + closeSearch = new EventEmitter(); isEditValue = false; + showSearchPane = false; @Output() isEditChange = new EventEmitter(); @@ -88,4 +93,10 @@ export class DetailsPanelComponent extends PageComponent { } } + onToggleSearch() { + this.showSearchPane = !this.showSearchPane; + if (!this.showSearchPane) { + this.closeSearch.emit(); + } + } } diff --git a/ui-ngx/src/app/shared/components/widgets-bundle-search.component.html b/ui-ngx/src/app/shared/components/widgets-bundle-search.component.html index 0a545536fa..0b86c95ef6 100644 --- a/ui-ngx/src/app/shared/components/widgets-bundle-search.component.html +++ b/ui-ngx/src/app/shared/components/widgets-bundle-search.component.html @@ -15,10 +15,15 @@ limitations under the License. --> -
+
search - -
diff --git a/ui-ngx/src/app/shared/components/widgets-bundle-search.component.scss b/ui-ngx/src/app/shared/components/widgets-bundle-search.component.scss index a434064ff7..5d48626b01 100644 --- a/ui-ngx/src/app/shared/components/widgets-bundle-search.component.scss +++ b/ui-ngx/src/app/shared/components/widgets-bundle-search.component.scss @@ -15,8 +15,10 @@ */ .input-wrapper { background: hsla(0, 0%, 100%, .2); - padding: 5px 0 5px 10px; - height: 40px; + border-radius: 8px; + color: rgb(255, 255, 255, .84); + padding: 5px 8px 5px 16px; + height: 46px; input { width: 100%; @@ -30,9 +32,24 @@ &::placeholder { color: #fff; - opacity: .8; + opacity: .6; line-height: 26px; } } + + &.focus { + background: #fff; + color: rgba(0,0,0,.54); + + input { + color: #000; + opacity: .60; + } + + .close { + color: #000 !important; + opacity: .54; + } + } } diff --git a/ui-ngx/src/app/shared/components/widgets-bundle-search.component.ts b/ui-ngx/src/app/shared/components/widgets-bundle-search.component.ts index 53d2efac34..f14ae2ee5e 100644 --- a/ui-ngx/src/app/shared/components/widgets-bundle-search.component.ts +++ b/ui-ngx/src/app/shared/components/widgets-bundle-search.component.ts @@ -31,6 +31,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; export class WidgetsBundleSearchComponent implements ControlValueAccessor { searchText: string; + focus = false; @Input() placeholder: string; @@ -60,8 +61,14 @@ export class WidgetsBundleSearchComponent implements ControlValueAccessor { this.propagateChange(this.searchText); } - clear(): void { + clear($event: Event): void { + $event.preventDefault(); + $event.stopPropagation(); this.searchText = ''; this.updateView(); } + + toggleFocus() { + this.focus = !this.focus; + } }