diff --git a/projects/arlas-components/src/lib/components/results/model/item.ts b/projects/arlas-components/src/lib/components/results/model/item.ts index 3ab57539..2d93f6fa 100644 --- a/projects/arlas-components/src/lib/components/results/model/item.ts +++ b/projects/arlas-components/src/lib/components/results/model/item.ts @@ -20,6 +20,11 @@ import { Action, Attachment, ItemDataType } from '../utils/results.utils'; import { Column } from './column'; +export interface ItemDetailGroup { + group: string; + details: Array<{ key: string; value: string; }>; +}; + export class Item { /** @@ -66,13 +71,7 @@ export class Item { /** * @description More data organized in groups. */ - public itemDetailedData: Array<{ - group: string; - details: Array<{ key: string; value: string; }>; - }> = new Array<{ - group: string; - details: Array<{ key: string; value: string; }>; - }>(); + public itemDetailedData = new Array(); /** * @description Links attached to the item. */ diff --git a/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.html b/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.html index acde4c7e..bd7d80f8 100644 --- a/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.html +++ b/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.html @@ -3,29 +3,25 @@
{{rowItem?.detailsTitle}}
- - - {{group.group | translate}} - -
- - {{detail.key | translate}} : - {{detail.value | formatNumber:NUMBER_FORMAT_CHAR}} - -
-
-
- +
+ + {{group.group | translate}} + + + {{detail.key | translate}} + {{detail.value | formatNumber:NUMBER_FORMAT_CHAR}} + +
+ + -
-
- {{'Attachments' | translate}} -
+
{{'Attachments' | translate}}
diff --git a/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.scss b/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.scss index d0ea3029..54ac83b9 100644 --- a/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.scss +++ b/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.scss @@ -36,30 +36,41 @@ } .resultdetaileditem /* @doc Sets all texts style.*/ { - font-family: - Roboto, - Helvetica Neue, - sans-serif; + font-family: Roboto, Helvetica Neue, sans-serif; font-size: 0.7em; text-align: left; padding: 0 5px; - &--group-title { - font-weight: bold; - color: #322d90; - font-size: 1.1em; + &--group { + padding-bottom: 10px; + + &-title { + font-weight: bold; + font-size: 12px; + border-bottom: 1px solid #f0eeeecf; + display: block; + } } &--item { - font-weight: bold; - color: #444; + display: block; + color: black; + padding: 3px; + border-bottom: 1px solid #f0eeeecf; &--key /* @doc Sets key style. (key: value part)*/ { - font-weight: 520; + font-size: 11px; + font-weight: 500; + width: 120px; + display: inline-block; + white-space: pre-wrap; } &--value /* @doc Sets value style (key: value part)*/ { margin-right: 10px; + font-weight: 500; + font-size: 11px; + overflow-wrap: anywhere; } } @@ -81,6 +92,7 @@ .result-attachments { display: block; max-width: 95%; + padding-top: 10px; &--title /* @doc Sets the style of attachments section's title*/ { font-weight: bold; diff --git a/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.ts b/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.ts index 9b8744cc..d12e68e9 100644 --- a/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.ts +++ b/projects/arlas-components/src/lib/components/results/result-detailed-item/result-detailed-item.component.ts @@ -78,6 +78,7 @@ export class ResultDetailedItemComponent implements OnInit { public NUMBER_FORMAT_CHAR = NUMBER_FORMAT_CHAR; + public constructor(public translate: TranslateService) { } public ngOnInit() {} diff --git a/projects/arlas-components/src/public-api.ts b/projects/arlas-components/src/public-api.ts index 78de2ac5..64737afe 100644 --- a/projects/arlas-components/src/public-api.ts +++ b/projects/arlas-components/src/public-api.ts @@ -53,7 +53,7 @@ export { Action, ElementIdentifier, FieldsConfiguration, DescribedUrl, ResultListOptions, Attachment, AdditionalInfo, Field, PageQuery, PROTECTED_IMAGE_HEADER, ActionHandler } from './lib/components/results/utils/results.utils'; -export { Item } from './lib/components/results/model/item'; +export { Item, ItemDetailGroup } from './lib/components/results/model/item'; export { Column } from './lib/components/results/model/column'; export { MapglComponent, VisualisationSetConfig, IconConfig, OnMoveResult, CROSS_LAYER_PREFIX } from './lib/components/mapgl/mapgl.component'; export { MapglModule } from './lib/components/mapgl/mapgl.module';