Merge branch 'dev' of nes.uni-due.de:lbs/smartguide into feature/keywords-analysis
This commit is contained in:
@@ -25,7 +25,7 @@ export class WorkPrimaryCategoryPipe implements PipeTransform {
|
||||
transform(
|
||||
value: WorkPrimaryCategory | null | undefined,
|
||||
...args: unknown[]
|
||||
): unknown {
|
||||
): string {
|
||||
return transformWorkPrimaryCategory(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,11 @@
|
||||
|
||||
<div class="loading-indicator">
|
||||
@if (isNavigating()) {
|
||||
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
||||
@if (collapsed()) {
|
||||
<mat-spinner [diameter]="32"></mat-spinner>
|
||||
} @else {
|
||||
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ConfirmationDialogComponent } from '../confirmation-dialog/confirmation-dialog.component';
|
||||
import { MatCardContent, MatCardModule } from '@angular/material/card';
|
||||
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
||||
|
||||
type NavItem = {
|
||||
label: string;
|
||||
@@ -42,6 +43,7 @@ type NavItemGroup = {
|
||||
MatTooltipModule,
|
||||
MatCardModule,
|
||||
MatCardContent,
|
||||
MatProgressSpinner,
|
||||
],
|
||||
templateUrl: './app-menu.component.html',
|
||||
styleUrl: './app-menu.component.scss',
|
||||
|
||||
+21
-7
@@ -6,18 +6,32 @@
|
||||
|
||||
<!-- Autocomplete Search Input for Institutions -->
|
||||
<div class="autocomplete-search">
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Einrichtung suchen, um deren Top-3 Autoren hinzuzufügen..."
|
||||
[value]="searchQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
<mat-form-field appearance="outline" class="search-form-field">
|
||||
<mat-icon matPrefix>search</mat-icon>
|
||||
<mat-label>Einrichtung suchen</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="text"
|
||||
placeholder="Einrichtung suchen, um deren Top-3 Autoren hinzuzufügen..."
|
||||
[value]="searchQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
@if (searchQuery()) {
|
||||
<button
|
||||
mat-icon-button
|
||||
matSuffix
|
||||
(click)="searchChange.emit('')"
|
||||
aria-label="Löschen"
|
||||
type="button">
|
||||
<mat-icon>clear</mat-icon>
|
||||
</button>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
@if (searchResults().length > 0) {
|
||||
<ul class="autocomplete-results">
|
||||
@for (result of searchResults(); track result.id) {
|
||||
<li>
|
||||
<button (click)="onSelectResult(result)">
|
||||
<button type="button" (click)="onSelectResult(result)">
|
||||
<span class="name">{{ result.display_name }}</span>
|
||||
<span class="hint">{{
|
||||
result.hint || result.entity_type
|
||||
|
||||
+36
-2
@@ -1,15 +1,32 @@
|
||||
import { Component, input, output } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
HostListener,
|
||||
inject,
|
||||
input,
|
||||
output,
|
||||
} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-author-institution-selector',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatIconModule],
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatIconModule,
|
||||
MatFormFieldModule,
|
||||
MatInputModule,
|
||||
MatButtonModule,
|
||||
],
|
||||
templateUrl: './author-institution-selector.component.html',
|
||||
styleUrl: './author-institution-selector.component.scss',
|
||||
})
|
||||
export class AuthorInstitutionSelectorComponent {
|
||||
private readonly elementRef = inject(ElementRef);
|
||||
readonly searchQuery = input<string>('');
|
||||
readonly searchResults = input<any[]>([]);
|
||||
|
||||
@@ -21,10 +38,27 @@ export class AuthorInstitutionSelectorComponent {
|
||||
this.searchChange.emit(val);
|
||||
}
|
||||
|
||||
@HostListener('document:click', ['$event'])
|
||||
onDocumentClick(event: MouseEvent): void {
|
||||
if (!this.elementRef.nativeElement.contains(event.target as Node)) {
|
||||
if (this.searchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('document:keydown.escape')
|
||||
onEscape(): void {
|
||||
if (this.searchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
|
||||
onSelectResult(result: any): void {
|
||||
this.addInstitutionAuthors.emit({
|
||||
id: result.id || '',
|
||||
name: result.display_name || '',
|
||||
});
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,18 +7,32 @@
|
||||
|
||||
<!-- Autocomplete Search Input for Authors -->
|
||||
<div class="autocomplete-search">
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Autor suchen und hinzufügen..."
|
||||
[value]="searchQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
<mat-form-field appearance="outline" class="search-form-field">
|
||||
<mat-icon matPrefix>search</mat-icon>
|
||||
<mat-label>Autor vergleichen</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="text"
|
||||
placeholder="Autor suchen und hinzufügen..."
|
||||
[value]="searchQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
@if (searchQuery()) {
|
||||
<button
|
||||
mat-icon-button
|
||||
matSuffix
|
||||
(click)="searchChange.emit('')"
|
||||
aria-label="Löschen"
|
||||
type="button">
|
||||
<mat-icon>clear</mat-icon>
|
||||
</button>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
@if (searchResults().length > 0) {
|
||||
<ul class="autocomplete-results">
|
||||
@for (result of searchResults(); track result.id) {
|
||||
<li>
|
||||
<button (click)="onSelectResult(result)">
|
||||
<button type="button" (click)="onSelectResult(result)">
|
||||
<span class="name">{{ result.display_name }}</span>
|
||||
<span class="hint">{{
|
||||
result.last_known_institutions?.[0]?.display_name ||
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
import { Component, input, output } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
HostListener,
|
||||
inject,
|
||||
input,
|
||||
output,
|
||||
} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
export interface CompareItem {
|
||||
id: string;
|
||||
@@ -10,11 +20,18 @@ export interface CompareItem {
|
||||
@Component({
|
||||
selector: 'app-author-selector',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatIconModule],
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatIconModule,
|
||||
MatFormFieldModule,
|
||||
MatInputModule,
|
||||
MatButtonModule,
|
||||
],
|
||||
templateUrl: './author-selector.component.html',
|
||||
styleUrl: './author-selector.component.scss',
|
||||
})
|
||||
export class AuthorSelectorComponent {
|
||||
private readonly elementRef = inject(ElementRef);
|
||||
readonly activeTab = input<string>('publications');
|
||||
readonly comparisonAuthors = input<CompareItem[]>([]);
|
||||
readonly topSuggestions = input<any[]>([]);
|
||||
@@ -53,11 +70,28 @@ export class AuthorSelectorComponent {
|
||||
this.searchChange.emit(val);
|
||||
}
|
||||
|
||||
@HostListener('document:click', ['$event'])
|
||||
onDocumentClick(event: MouseEvent): void {
|
||||
if (!this.elementRef.nativeElement.contains(event.target as Node)) {
|
||||
if (this.searchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('document:keydown.escape')
|
||||
onEscape(): void {
|
||||
if (this.searchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
|
||||
onSelectResult(result: any): void {
|
||||
this.addAuthor.emit({
|
||||
id: result.id || '',
|
||||
name: result.display_name || '',
|
||||
});
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
|
||||
onSelectSuggestion(item: any): void {
|
||||
|
||||
@@ -24,18 +24,32 @@
|
||||
|
||||
<!-- Autocomplete Search Input -->
|
||||
<div class="autocomplete-search">
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Einrichtung suchen und hinzufügen..."
|
||||
[value]="searchQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
<mat-form-field appearance="outline" class="search-form-field">
|
||||
<mat-icon matPrefix>search</mat-icon>
|
||||
<mat-label>Einrichtung vergleichen</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="text"
|
||||
placeholder="Einrichtung suchen und hinzufügen..."
|
||||
[value]="searchQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
@if (searchQuery()) {
|
||||
<button
|
||||
mat-icon-button
|
||||
matSuffix
|
||||
(click)="searchChange.emit('')"
|
||||
aria-label="Löschen"
|
||||
type="button">
|
||||
<mat-icon>clear</mat-icon>
|
||||
</button>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
@if (searchResults().length > 0) {
|
||||
<ul class="autocomplete-results">
|
||||
@for (result of searchResults(); track result.id) {
|
||||
<li>
|
||||
<button (click)="onSelectResult(result)">
|
||||
<button type="button" (click)="onSelectResult(result)">
|
||||
<span class="name">{{ result.display_name }}</span>
|
||||
<span class="hint">{{
|
||||
result.hint || result.entity_type
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
import { Component, input, output } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
HostListener,
|
||||
inject,
|
||||
input,
|
||||
output,
|
||||
} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
export interface CompareItem {
|
||||
id: string;
|
||||
@@ -10,11 +20,18 @@ export interface CompareItem {
|
||||
@Component({
|
||||
selector: 'app-institution-selector',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatIconModule],
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatIconModule,
|
||||
MatFormFieldModule,
|
||||
MatInputModule,
|
||||
MatButtonModule,
|
||||
],
|
||||
templateUrl: './institution-selector.component.html',
|
||||
styleUrl: './institution-selector.component.scss',
|
||||
})
|
||||
export class InstitutionSelectorComponent {
|
||||
private readonly elementRef = inject(ElementRef);
|
||||
readonly activeTab = input<string>('publications');
|
||||
readonly comparisonInstitutions = input<CompareItem[]>([]);
|
||||
readonly primaryInstitution = input<string | null>(null);
|
||||
@@ -68,11 +85,28 @@ export class InstitutionSelectorComponent {
|
||||
this.searchChange.emit(val);
|
||||
}
|
||||
|
||||
@HostListener('document:click', ['$event'])
|
||||
onDocumentClick(event: MouseEvent): void {
|
||||
if (!this.elementRef.nativeElement.contains(event.target as Node)) {
|
||||
if (this.searchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('document:keydown.escape')
|
||||
onEscape(): void {
|
||||
if (this.searchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
|
||||
onSelectResult(result: any): void {
|
||||
this.addInstitution.emit({
|
||||
id: result.id || '',
|
||||
name: result.display_name || '',
|
||||
});
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
|
||||
onSelectSuggestion(item: any): void {
|
||||
|
||||
@@ -103,16 +103,31 @@
|
||||
|
||||
<!-- Autocomplete-Suche für Länder/Kontinente -->
|
||||
<div class="autocomplete-search">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Land oder Kontinent suchen..."
|
||||
[value]="locationQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
<mat-form-field appearance="outline" class="search-form-field">
|
||||
<mat-icon matPrefix>search</mat-icon>
|
||||
<mat-label>Land oder Kontinent suchen</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="text"
|
||||
placeholder="Land oder Kontinent suchen..."
|
||||
[value]="locationQuery()"
|
||||
(input)="onSearchInput($event)" />
|
||||
@if (locationQuery()) {
|
||||
<button
|
||||
mat-icon-button
|
||||
matSuffix
|
||||
(click)="searchChange.emit('')"
|
||||
aria-label="Löschen"
|
||||
type="button">
|
||||
<mat-icon>clear</mat-icon>
|
||||
</button>
|
||||
}
|
||||
</mat-form-field>
|
||||
@if (locationSearchResults().length > 0) {
|
||||
<ul class="autocomplete-results">
|
||||
@for (loc of locationSearchResults(); track loc.id) {
|
||||
<li>
|
||||
<button (click)="onSelectResult(loc)">
|
||||
<button type="button" (click)="onSelectResult(loc)">
|
||||
<span class="name">{{ loc.display_name }}</span>
|
||||
<span class="hint">{{
|
||||
loc.type === 'country' ? 'Land' : 'Kontinent'
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
import { Component, input, output } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
HostListener,
|
||||
inject,
|
||||
input,
|
||||
output,
|
||||
} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { AutocompleteLocationItem } from '../../../api';
|
||||
|
||||
export interface CompareItem {
|
||||
@@ -11,11 +21,18 @@ export interface CompareItem {
|
||||
@Component({
|
||||
selector: 'app-location-selector',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatIconModule],
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatIconModule,
|
||||
MatFormFieldModule,
|
||||
MatInputModule,
|
||||
MatButtonModule,
|
||||
],
|
||||
templateUrl: './location-selector.component.html',
|
||||
styleUrl: './location-selector.component.scss',
|
||||
})
|
||||
export class LocationSelectorComponent {
|
||||
private readonly elementRef = inject(ElementRef);
|
||||
readonly comparisonCountries = input<CompareItem[]>([]);
|
||||
readonly comparisonRegions = input<CompareItem[]>([]);
|
||||
readonly locationQuery = input<string>('');
|
||||
@@ -46,8 +63,25 @@ export class LocationSelectorComponent {
|
||||
this.searchChange.emit(val);
|
||||
}
|
||||
|
||||
@HostListener('document:click', ['$event'])
|
||||
onDocumentClick(event: MouseEvent): void {
|
||||
if (!this.elementRef.nativeElement.contains(event.target as Node)) {
|
||||
if (this.locationSearchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('document:keydown.escape')
|
||||
onEscape(): void {
|
||||
if (this.locationSearchResults().length > 0) {
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
}
|
||||
|
||||
onSelectResult(loc: AutocompleteLocationItem): void {
|
||||
this.addLocation.emit(loc);
|
||||
this.searchChange.emit('');
|
||||
}
|
||||
|
||||
onRemove(id: string, type: 'country' | 'continent'): void {
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,10 @@
|
||||
</mat-optgroup>
|
||||
}
|
||||
<mat-optgroup [label]="fetchedLabel()">
|
||||
@for (element of fetchedElements().elements; track getSelectValue()(element)) {
|
||||
@for (
|
||||
element of fetchedElements().elements;
|
||||
track getSelectValue()(element)
|
||||
) {
|
||||
<mat-option [value]="element">
|
||||
{{ getSelectLabel()(element) }}
|
||||
@if (getSelectDescription()) {
|
||||
|
||||
@@ -81,7 +81,9 @@ export class SearchableSelectComponent<T> {
|
||||
if (!fetchFn) {
|
||||
return of({ elements: [] } as Page<T>);
|
||||
}
|
||||
return fetchFn(term).pipe(catchError(() => of({ elements: [] } as Page<T>)));
|
||||
return fetchFn(term).pipe(
|
||||
catchError(() => of({ elements: [] } as Page<T>)),
|
||||
);
|
||||
}),
|
||||
tap(() => this.isLoading.set(false)),
|
||||
takeUntilDestroyed(this.destroyRef),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<button
|
||||
type="button"
|
||||
class="topic-chip__button"
|
||||
[class.topic-chip__button--without-count]="!hasCount"
|
||||
[disabled]="disabled"
|
||||
[attr.aria-pressed]="active ? 'true' : null"
|
||||
[matTooltip]="buttonTooltip"
|
||||
|
||||
@@ -18,10 +18,17 @@
|
||||
cursor: pointer;
|
||||
|
||||
&:disabled {
|
||||
cursor: default;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.45;
|
||||
filter: grayscale(0.85);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.topic-chip__button--without-count {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
:host(.topic-chip--normal) .topic-chip__button {
|
||||
column-gap: 8px;
|
||||
min-height: 34px;
|
||||
@@ -61,7 +68,7 @@
|
||||
|
||||
:host(.topic-chip--active.topic-chip--normal) .topic-chip__button {
|
||||
border-color: var(--topic-color);
|
||||
background: color-mix(in srgb, var(--topic-color) 27%, #ffffff);
|
||||
background: var(--topic-active-bg);
|
||||
color: color-mix(in srgb, var(--topic-color) 40%, #07163d);
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--topic-color),
|
||||
|
||||
@@ -25,6 +25,7 @@ export type TopicChipTooltipTarget = 'label' | 'button';
|
||||
interface TopicChipColorTokens {
|
||||
border: string;
|
||||
background: string;
|
||||
activeBackground: string;
|
||||
color: string;
|
||||
}
|
||||
|
||||
@@ -32,30 +33,39 @@ const TOPIC_CHIP_COLORS: Record<TopicChipPaletteColor, TopicChipColorTokens> = {
|
||||
purple: {
|
||||
border: '#d8cafe',
|
||||
background: '#f6f0ff',
|
||||
activeBackground: '#d9d1f5',
|
||||
color: '#7255d9',
|
||||
},
|
||||
blue: {
|
||||
border: '#bdd4ff',
|
||||
background: '#f0f6ff',
|
||||
activeBackground: '#bdd5f2',
|
||||
color: '#0b63ce',
|
||||
},
|
||||
green: {
|
||||
border: '#bdebcf',
|
||||
background: '#effaf3',
|
||||
activeBackground: '#c4decf',
|
||||
color: '#24834f',
|
||||
},
|
||||
orange: {
|
||||
border: '#ffd796',
|
||||
background: '#fff7e8',
|
||||
activeBackground: '#f0daba',
|
||||
color: '#c67500',
|
||||
},
|
||||
pink: {
|
||||
border: '#ffc7d7',
|
||||
background: '#fff1f5',
|
||||
activeBackground: '#f2c7d4',
|
||||
color: '#d12f61',
|
||||
},
|
||||
};
|
||||
|
||||
export const topicChipColorTokens = (
|
||||
color: TopicChipPaletteColor,
|
||||
): Readonly<TopicChipColorTokens> => TOPIC_CHIP_COLORS[color];
|
||||
|
||||
@Component({
|
||||
selector: 'app-topic-chip',
|
||||
imports: [MatIconModule, MatTooltipModule],
|
||||
@@ -111,6 +121,14 @@ export class TopicChipComponent {
|
||||
);
|
||||
}
|
||||
|
||||
@HostBinding('style.--topic-active-bg')
|
||||
get topicActiveBackground(): string {
|
||||
return (
|
||||
this.colorTokens?.activeBackground ??
|
||||
`color-mix(in srgb, ${this.topicColor} 27%, #ffffff)`
|
||||
);
|
||||
}
|
||||
|
||||
@HostBinding('style.--topic-color')
|
||||
get topicColor(): string {
|
||||
return this.colorTokens?.color ?? this.color;
|
||||
|
||||
@@ -27,23 +27,25 @@
|
||||
<span>{{ option.label }}</span>
|
||||
</div>
|
||||
|
||||
<mat-slider
|
||||
class="weight-slider"
|
||||
[min]="min"
|
||||
[max]="max"
|
||||
[step]="step"
|
||||
[discrete]="true"
|
||||
[showTickMarks]="true"
|
||||
[displayWith]="formatRawWeightLabel"
|
||||
[attr.aria-label]="option.label + ' Gewichtung'">
|
||||
<input
|
||||
matSliderThumb
|
||||
[formControl]="weightControl(option.key)"
|
||||
[attr.aria-label]="option.label + ' Gewichtung'" />
|
||||
</mat-slider>
|
||||
|
||||
<div class="weight-value">
|
||||
{{ formatRawWeightLabel(weightControl(option.key).value) }}
|
||||
<div class="slider-container">
|
||||
<div class="slider-labels">
|
||||
<span>unwichtig</span>
|
||||
<span>neutral</span>
|
||||
<span>wichtig</span>
|
||||
</div>
|
||||
<mat-slider
|
||||
class="weight-slider"
|
||||
[min]="min"
|
||||
[max]="max"
|
||||
[step]="step"
|
||||
[discrete]="false"
|
||||
[showTickMarks]="false"
|
||||
[attr.aria-label]="option.label + ' Gewichtung'">
|
||||
<input
|
||||
matSliderThumb
|
||||
[formControl]="weightControl(option.key)"
|
||||
[attr.aria-label]="option.label + ' Gewichtung'" />
|
||||
</mat-slider>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -57,6 +59,8 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<ng-content></ng-content>
|
||||
|
||||
<!-- Apply Button -->
|
||||
@if (showApplyButton) {
|
||||
<div class="weight-actions">
|
||||
|
||||
@@ -53,16 +53,17 @@ $touch-target: 44px;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
|
||||
.weight-row {
|
||||
::ng-deep .weight-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 40px;
|
||||
grid-template-columns: 1fr 2fr;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
gap: 0.5rem;
|
||||
min-height: 34px;
|
||||
font-size: 0.8rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.weight-label {
|
||||
::ng-deep .weight-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
@@ -86,18 +87,25 @@ $touch-target: 44px;
|
||||
}
|
||||
}
|
||||
|
||||
.weight-slider {
|
||||
::ng-deep .slider-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 20px; /* reduced from 24px */
|
||||
}
|
||||
|
||||
::ng-deep .weight-slider {
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.weight-value {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 650;
|
||||
::ng-deep .slider-labels {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.65rem;
|
||||
color: var(--sg-text-secondary);
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
margin-bottom: -4px;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
@@ -154,23 +162,19 @@ $touch-target: 44px;
|
||||
TABLET & PHONE
|
||||
============================================================ */
|
||||
@media (max-width: $tablet) {
|
||||
.weight-row {
|
||||
grid-template-columns: 1fr 40px;
|
||||
::ng-deep .weight-row {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0.15rem;
|
||||
padding: 0.1rem 0;
|
||||
}
|
||||
|
||||
.weight-label {
|
||||
::ng-deep .weight-label {
|
||||
grid-column: 1 / -1;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.weight-slider {
|
||||
grid-column: 1 / 2;
|
||||
}
|
||||
|
||||
.weight-value {
|
||||
grid-column: 2 / 3;
|
||||
::ng-deep .slider-container {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.weight-actions {
|
||||
@@ -191,21 +195,21 @@ $touch-target: 44px;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.weight-row {
|
||||
::ng-deep .weight-row {
|
||||
gap: 0.1rem;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.weight-label {
|
||||
::ng-deep .weight-label {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.weight-slider {
|
||||
::ng-deep .weight-slider {
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.weight-value {
|
||||
font-size: 0.7rem;
|
||||
::ng-deep .slider-labels {
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
.weight-actions {
|
||||
|
||||
Reference in New Issue
Block a user