Skip to content

Commit 292583c

Browse files
[DSC-1864] fix missing dependency in chart, fix missing scss variables
1 parent c1653b3 commit 292583c

10 files changed

Lines changed: 80 additions & 24 deletions

File tree

src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
.dropdown-menu {
77
overflow: hidden;
8+
background-color: var(--ds-expandable-navbar-bg);
9+
810
@include media-breakpoint-down(sm) {
911
border: 0;
10-
background-color: var(--ds-expandable-navbar-bg);
1112
}
1213
@include media-breakpoint-up(md) {
1314
border-top-left-radius: 0;
1415
border-top-right-radius: 0;
15-
background-color: var(--ds-navbar-dropdown-bg);
1616
}
1717
}
1818

src/app/shared/explore/section-component/facet-section/facet-section.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h2>{{ 'explore.facet-section.title' | translate }}</h2>
44
<div *ngFor="let facet of (facets$ | async)" [class]="getFacetsBoxCol(facet)" class="mb-4" data-test="facet-column">
55
<h5>{{'explore.index.' + facet.name | translate}}</h5>
66
<div *ngIf="facet.filterType.includes('chart'); else notChartFacet">
7-
<ds-search-chart [filter]="facet" [inPlaceSearch]="false"> </ds-search-chart>
7+
<ds-search-chart [scope]="''" [filter]="facet" [inPlaceSearch]="false"> </ds-search-chart>
88
</div>
99
<ng-template #notChartFacet>
1010
<div *ngFor="let facetValue of facet._embedded.values" class="border p-3">

src/app/shared/search/search-charts/search-chart/search-chart-wrapper/search-chart-wrapper.component.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { GenericConstructor } from '../../../../../core/shared/generic-construct
44
import {
55
FILTER_CONFIG,
66
IN_PLACE_SEARCH,
7-
REFRESH_FILTER
7+
REFRESH_FILTER,
8+
SCOPE
89
} from '../../../../../core/shared/search/search-filter.service';
910
import { FilterType } from '../../../models/filter-type.model';
1011
import { SearchFilterConfig } from '../../../models/search-filter-config.model';
@@ -37,6 +38,11 @@ export class SearchChartFilterWrapperComponent implements OnInit {
3738
*/
3839
@Input() refreshFilters: BehaviorSubject<boolean>;
3940

41+
/**
42+
* The scope of the search.
43+
*/
44+
@Input() scope: string;
45+
4046
/**
4147
* The constructor of the search facet filter that should be rendered, based on the filter config's type
4248
*/
@@ -59,7 +65,8 @@ export class SearchChartFilterWrapperComponent implements OnInit {
5965
providers: [
6066
{ provide: FILTER_CONFIG, useFactory: () => (this.filterConfig), deps: [] },
6167
{ provide: IN_PLACE_SEARCH, useFactory: () => (this.inPlaceSearch), deps: [] },
62-
{ provide: REFRESH_FILTER, useFactory: () => (this.refreshFilters), deps: [] }
68+
{ provide: REFRESH_FILTER, useFactory: () => (this.refreshFilters), deps: [] },
69+
{ provide: SCOPE, useFactory: () => (this.scope), deps: [] }
6370
],
6471
parent: this.injector
6572
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<div class="facet-filter mb-3 p-3">
22
<ds-search-chart-wrapper [filterConfig]="filter"
33
[inPlaceSearch]="inPlaceSearch"
4+
[scope]="scope"
45
[refreshFilters]="refreshFilters"></ds-search-chart-wrapper>
56
<p class="mt-3 mb-0" *ngIf="showCaption">{{caption}}</p>
67
</div>

src/app/shared/search/search-charts/search-chart/search-chart.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export class SearchChartComponent implements OnInit {
3636
*/
3737
@Input() refreshFilters: BehaviorSubject<boolean>;
3838

39+
/**
40+
* The scope of the search
41+
*/
42+
@Input() scope: string;
43+
3944
/**
4045
* Emits all currently selected values for this filter
4146
*/

src/app/shared/search/search-charts/search-charts.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ <h2 class="m-0 text-break">{{'search.filters.applied.charts.' + ((configuration
2424
<div *ngIf="(canShowChart(selectedFilter) | async)">
2525
<ds-search-chart [filter]="selectedFilter"
2626
[inPlaceSearch]="inPlaceSearch"
27+
[scope]="scope"
2728
[refreshFilters]="refreshFilters"></ds-search-chart>
2829
</div>
2930
</div>

src/app/shared/search/search-charts/search-charts.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ export class SearchChartsComponent implements OnInit {
5454
*/
5555
@Input() showChartsToggle = false;
5656

57+
/**
58+
* The scope of the search
59+
*/
60+
@Input() scope: string;
61+
5762
/**
5863
* The selected chart to show
5964
*/

src/app/shared/search/search.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
[filters]="chartFiltersRD$.asObservable()"
1313
[inPlaceSearch]="inPlaceSearch"
1414
[refreshFilters]="refreshFilters"
15+
[scope]="scope"
1516
[showChartsToggle]="showChartsToggle"></ds-search-charts>
1617

1718
<div *ngIf="!showSidebar && (initialized$ | async)">

src/styles/_bootstrap_variables.scss

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
// All SASS variables that are declared must have the '!default' flag, otherwise it won't be possible
1313
// to override them in custom themes.
1414

15+
/** Help Variables **/
16+
$fa-fixed-width: 1.25rem !default;
17+
$icon-padding: 1rem !default;
18+
$collapsed-sidebar-width: calculatePx($fa-fixed-width + (2 * $icon-padding)) !default;
19+
$sidebar-items-width: 250px !default;
20+
$total-sidebar-width: $collapsed-sidebar-width + $sidebar-items-width !default;
1521

1622
/*** FONT FAMILIES AND FONT SIZES ***/
1723

@@ -33,15 +39,31 @@ $enable-shadows: true !default;
3339

3440
/*** SEMANTIC COLOR SCHEME ***/
3541

42+
/* Colors */
43+
$gray-700: #495057 !default; // Bootstrap $gray-700
44+
$gray-100: #f8f9fa !default; // $gray-100
45+
3646
// Override semantic colors
37-
$primary: #2b4e72 !default; // Blue gray
38-
$secondary: #495057 !default; // As Bootstrap $gray-700
47+
$blue: #2B4E72 !default;
48+
$green: #94BA65 !default;
49+
$cyan: #006666 !default;
50+
$yellow: #ec9433 !default;
51+
$red: #CF4444 !default;
52+
$dark: darken($blue, 17%) !default;
3953
$success: #94ba65 !default; // Lime
40-
$info: #006666 !default; // Blue green
41-
$warning: #ec9433 !default; // Orange
42-
$danger: #cf4444 !default; // Red
43-
$light: #f8f9fa !default; // As Bootstrap $gray-100
44-
$dark: darken(#2b4e72, 17%) !default; // Blue gray (darker)
54+
55+
56+
57+
$theme-colors: (
58+
primary: $blue,
59+
secondary: $gray-700,
60+
success: $green,
61+
info: $cyan,
62+
warning: $yellow,
63+
danger: $red,
64+
light: $gray-100,
65+
dark: $dark
66+
) !default;
4567

4668

4769
/*** OTHER BOOTSTRAP VARIABLES ***/
@@ -87,16 +109,19 @@ $ds-admin-sidebar-fixed-element-width: 55px !default;
87109
$ds-admin-sidebar-collapsible-element-width: 250px !default;
88110
$ds-admin-sidebar-total-width: $ds-admin-sidebar-fixed-element-width + $ds-admin-sidebar-collapsible-element-width; // do not change/override
89111

90-
$ds-primary-bg: #{lighten($primary, 30%)} !default;
91-
$ds-secondary-bg: #{lighten($secondary, 30%)} !default;
92-
$ds-success-bg: #{lighten($success, 30%)} !default;
93-
$ds-info-bg: #{lighten($info, 30%)} !default;
94-
$ds-warning-bg: #{lighten($warning, 30%)} !default;
95-
$ds-danger-bg: #{lighten($danger, 30%)} !default;
112+
113+
$primary-bg: #{lighten(map-get($theme-colors, primary), 30%)} !default;
114+
$secondary-bg: #{lighten(map-get($theme-colors, secondary), 30%)} !default;
115+
$success-bg: #{lighten(map-get($theme-colors, success), 30%)} !default;
116+
$info-bg: #{lighten(map-get($theme-colors, info), 30%)} !default;
117+
$warning-bg: #{lighten(map-get($theme-colors, warning), 30%)} !default;
118+
$danger-bg: #{lighten(map-get($theme-colors, danger), 30%)} !default;
96119

97120

98121
/*** MISC ***/
99122

100123
// Starting this url with a caret (^) allows it to be a relative path based on UI's deployment path
101124
// See https://github.com/angular/angular-cli/issues/12797#issuecomment-598534241
102125
$fa-font-path: "^assets/fonts" !default;
126+
/* Images */
127+
$image-path: "../assets/images" !default;

src/styles/_custom_variables.scss

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
--ds-sidebar-z-index: 20;
2323

2424
--ds-header-bg: #{$white};
25+
--ds-header-logo-height: 50px;
26+
--ds-header-logo-height-xs: 50px;
2527
--ds-header-icon-color: #{$link-color};
2628
--ds-header-icon-color-hover: #{$link-hover-color};
2729
--ds-navbar-bg: var(--ds-header-bg);
@@ -62,6 +64,11 @@
6264
--ds-notification-bg-info: #{darken(adjust-hue($info, -10), 10%)};
6365
--ds-notification-bg-warning: #{darken(adjust-hue($warning, -10), 10%)};
6466

67+
--ds-fa-fixed-width: #{$fa-fixed-width};
68+
--ds-icon-padding: #{$icon-padding};
69+
--ds-collapsed-sidebar-width: #{$collapsed-sidebar-width};
70+
--ds-sidebar-items-width: #{$sidebar-items-width};
71+
--ds-total-sidebar-width: #{$total-sidebar-width};
6572

6673
--ds-top-footer-bg: #{$gray-200};
6774
--ds-footer-bg: #{theme-color('primary')};
@@ -165,17 +172,21 @@
165172
--ds-admin-sidebar-link-hover-color: #{$navbar-dark-hover-color};
166173
--ds-admin-sidebar-item-padding: 1rem;
167174
--ds-admin-sidebar-section-indent: .75rem;
175+
--ds-admin-sidebar-logo-height: 20px;
176+
--ds-admin-sidebar-fixed-element-width: #{$ds-admin-sidebar-fixed-element-width};
177+
--ds-admin-sidebar-fixed-element-z-index: 10;
178+
168179

169180
--ds-dark-scrollbar-width: 8px;
170181

171182
--ds-slider-handle-color: #{darken($blue, 17%)};
172183

173-
--ds-primary-bg: #{$ds-primary-bg};
174-
--ds-secondary-bg: #{$ds-secondary-bg};
175-
--ds-success-bg: #{$ds-success-bg};
176-
--ds-info-bg: #{$ds-info-bg};
177-
--ds-warning-bg: #{$ds-warning-bg};
178-
--ds-danger-bg: #{$ds-danger-bg};
184+
--ds-primary-bg: #{$primary-bg};
185+
--ds-secondary-bg: #{$secondary-bg};
186+
--ds-success-bg: #{$success-bg};
187+
--ds-info-bg: #{$info-bg};
188+
--ds-warning-bg: #{$warning-bg};
189+
--ds-danger-bg: #{$danger-bg};
179190

180191
--green1: #1FB300; // This variable represents the success color for the Klaro cookie banner
181192
--button-text-color-cookie: #333; // This variable represents the text color for buttons in the Klaro cookie banner

0 commit comments

Comments
 (0)