diff --git a/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.html b/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.html index be29713097..f735491e78 100644 --- a/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.html @@ -28,9 +28,9 @@
-
-
- +
+
+ alias.name diff --git a/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.scss b/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.scss index 0e1847f157..0aa1a0884f 100644 --- a/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.scss @@ -19,7 +19,7 @@ .tb-resolve-multiple-switch { padding: 18px 0 0 18px; @media #{$mat-xs} { - padding: 0 0 18px 0; + padding: 0 0 22px 0; } } } diff --git a/ui-ngx/src/app/modules/home/components/alias/entity-aliases-dialog.component.html b/ui-ngx/src/app/modules/home/components/alias/entity-aliases-dialog.component.html index 5c1bd2c219..c067517aff 100644 --- a/ui-ngx/src/app/modules/home/components/alias/entity-aliases-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/alias/entity-aliases-dialog.component.html @@ -38,14 +38,14 @@
-
+
{{$index + 1}}.
- + {{ 'entity.alias-required' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.html b/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.html index 22dfb34a64..25bb1d9700 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.html +++ b/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.html @@ -15,8 +15,8 @@ limitations under the License. --> -
- +
+ alias.filter-type @@ -30,18 +30,21 @@
@@ -49,12 +52,13 @@ - + entity.name-starts-with help @@ -66,6 +70,7 @@ - + alias.state-entity-parameter-name -
- - +
{{ 'alias.default-state-entity' | translate }}
+ @@ -88,10 +93,13 @@ - + asset.name-starts-with help @@ -100,10 +108,13 @@ - + device.name-starts-with help @@ -112,10 +123,13 @@ - + entity-view.name-starts-with help @@ -124,36 +138,51 @@ - + edge.name-starts-with
-
+
alias.root-entity
- + {{ 'alias.root-state-entity' | translate }} -
- - alias.state-entity-parameter-name - - - + @if (filterFormGroup.get('rootStateEntity').value) { +
+ + alias.state-entity-parameter-name + + +
+
{{ 'alias.default-state-entity' | translate }}
+ + +
+
+ } @else { + -
- - -
- + } +
+
+
alias.query-options
+
+ relation.direction @@ -161,7 +190,7 @@ - + alias.max-relation-level
+ class="mat-slide" formControlName="fetchLastLevelOnly"> {{ 'alias.last-level-relation' | translate }}
@@ -191,98 +220,113 @@ entityFilterFormGroup.get('type').value === aliasFilterType.edgeSearchQuery || entityFilterFormGroup.get('type').value === aliasFilterType.entityViewSearchQuery ? entityFilterFormGroup.get('type').value : ''"> - -
- - - -
-
- - -
-
- - alias.state-entity-parameter-name - - -
- - - -
-
-
-
- +
+
+
alias.root-entity
+ + {{ 'alias.root-state-entity' | translate }} - -
-
-
- - relation.direction - - - {{ directionTypeTranslations.get(directionTypeEnum[type]) | translate }} - - - - - alias.max-relation-level - - -
-
relation.relation-type
- - - - -
asset.asset-types
- - -
- -
device.device-types
- - -
- -
edge.edge-types
- - -
- -
entity-view.entity-view-types
- - + @if (filterFormGroup.get('rootStateEntity').value) { +
+ + alias.state-entity-parameter-name + + +
+
{{ 'alias.default-state-entity' | translate }}
+ + +
+
+ } @else { + + + } +
+
+
alias.query-options
+
+ + relation.direction + + + {{ directionTypeTranslations.get(directionTypeEnum[type]) | translate }} + + + + + alias.max-relation-level + + +
+ + {{ 'alias.last-level-relation' | translate }} + +
+
+
relation.relation-filter
+ + + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.scss b/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.scss index 686a55eb35..89e816eb35 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.scss +++ b/ui-ngx/src/app/modules/home/components/entity/entity-filter.component.scss @@ -15,25 +15,7 @@ */ :host { .tb-entity-filter { - #relationsQueryFilter { - padding-top: 20px; - - tb-entity-select { - min-height: 92px; - } - } - - .tb-root-state-entity-switch { - padding-left: 10px; - padding-bottom: 10px; - - .root-state-entity-switch { - margin: 0; - } - - .root-state-entity-label { - margin: 5px 0 5px 10px; - } - } + display: flex; + flex-direction: column; } } diff --git a/ui-ngx/src/app/modules/home/components/rule-node/action/generator-config.component.scss b/ui-ngx/src/app/modules/home/components/rule-node/action/generator-config.component.scss index 18c2498a64..b3e579787b 100644 --- a/ui-ngx/src/app/modules/home/components/rule-node/action/generator-config.component.scss +++ b/ui-ngx/src/app/modules/home/components/rule-node/action/generator-config.component.scss @@ -31,21 +31,5 @@ } } } - .tb-entity-select { - @media screen and (min-width: 599px) { - display: flex; - flex-direction: row; - gap: 16px; - } - tb-entity-type-select { - flex: 1; - } - tb-entity-autocomplete { - flex: 1; - mat-form-field { - width: 100% !important; - } - } - } } } diff --git a/ui-ngx/src/app/modules/home/components/widget/config/datasource.component.html b/ui-ngx/src/app/modules/home/components/widget/config/datasource.component.html index 1f48728166..d56fb4aaa7 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/datasource.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/datasource.component.html @@ -15,8 +15,8 @@ limitations under the License. --> -
- +
+ widget-config.datasource-type @@ -44,18 +44,20 @@ + class="flex-1" appearance="outline"> @@ -64,6 +66,7 @@
- {{ labelText }} {{ labelText }} + {{ labelText }} -
+
diff --git a/ui-ngx/src/app/shared/components/entity/entity-select.component.ts b/ui-ngx/src/app/shared/components/entity/entity-select.component.ts index a85589fae4..01b1f03388 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-select.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-select.component.ts @@ -25,6 +25,7 @@ import { EntityId } from '@shared/models/id/entity-id'; import { NULL_UUID } from '@shared/models/id/has-uuid'; import { coerceBoolean } from '@shared/decorators/coercion'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatFormFieldAppearance } from '@angular/material/form-field'; @Component({ selector: 'tb-entity-select', @@ -58,6 +59,9 @@ export class EntitySelectComponent implements ControlValueAccessor, OnInit, Afte @Input() additionEntityTypes: {[entityType in string]: string} = {}; + @Input() + appearance: MatFormFieldAppearance = 'fill'; + displayEntityTypeSelect: boolean; AliasEntityType = AliasEntityType; diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 963bf769ee..23e759a162 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -721,6 +721,7 @@ "state-entity-parameter-name": "State entity parameter name", "default-state-entity": "Default state entity", "default-entity-parameter-name": "By default", + "query-options": "Query options", "max-relation-level": "Max relation level", "unlimited-level": "Unlimited level", "state-entity": "Dashboard state entity", @@ -4367,6 +4368,7 @@ "add-relation-filter": "Add relation filter", "any-relation": "Any relation", "relation-filters": "Relation filters", + "relation-filter": "Relation filter", "additional-info": "Additional info (JSON)", "invalid-additional-info": "Unable to parse additional info json.", "no-relations-text": "No relations found", diff --git a/ui-ngx/src/form.scss b/ui-ngx/src/form.scss index e516810895..b88145331c 100644 --- a/ui-ngx/src/form.scss +++ b/ui-ngx/src/form.scss @@ -163,6 +163,9 @@ .tb-form-panel-title { font-weight: 500; font-size: 16px; + &.tb-normal { + font-weight: normal; + } &.tb-required::after { font-size: 13px; @@ -819,4 +822,41 @@ } } } + + .tb-form-panel.outlined { + --mdc-outlined-text-field-outline-color: rgba(0,0,0,0.12); + --mdc-outlined-text-field-container-shape: 6px; + --mat-form-field-trailing-icon-color: rgba(0, 0, 0, 0.56); + + box-shadow: none; + gap: 0; + padding-bottom: 0; + + &:not(.stroked) { + border-radius: 0; + } + + &:not(.mat-padding,.padding) { + padding: 0; + } + + & > .tb-form-panel-title { + margin-bottom: 16px; + } + + .tb-form-panel { + @media #{$mat-xs} { + gap: 16px; + } + } + + .tb-form-row { + height: 56px; + margin-bottom: 22px; + &.disabled { + border-color: var(--mdc-outlined-text-field-disabled-outline-color); + color: var(--mdc-outlined-text-field-disabled-input-text-color); + } + } + } }