Compare commits
6 Commits
master
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b35084d548 | ||
|
|
cc57415de0 | ||
|
|
bcdd793730 | ||
|
|
b572484950 | ||
|
|
074f88e66a | ||
|
|
a3f931e4bc |
@ -254,6 +254,10 @@ section.settings {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cursor-default {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.fit-content {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ export interface DetailsRadioOption<I> {
|
||||
id?: string;
|
||||
label: string;
|
||||
description: string;
|
||||
descriptionParams?: Record<string, string>;
|
||||
descriptionParams?: Record<string, string | number>;
|
||||
icon?: string;
|
||||
value: I;
|
||||
disabled?: boolean;
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import { BaseHeaderConfig } from './base-config.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { OverlappingElement } from '../../../help-mode';
|
||||
|
||||
export interface ActionConfig extends BaseHeaderConfig {
|
||||
readonly action: ($event: MouseEvent) => void;
|
||||
readonly helpModeKey?: string;
|
||||
readonly disabled$?: Observable<boolean>;
|
||||
readonly disabled?: boolean;
|
||||
readonly disableStopPropagation?: boolean;
|
||||
}
|
||||
|
||||
@ -3,4 +3,5 @@ import { ActionConfig } from './action-config.model';
|
||||
|
||||
export interface ButtonConfig extends ActionConfig {
|
||||
readonly type?: IconButtonType;
|
||||
readonly tooltip?: string;
|
||||
}
|
||||
|
||||
@ -50,7 +50,10 @@
|
||||
[icon]="config.icon"
|
||||
[label]="config.label | translate"
|
||||
[type]="config.type"
|
||||
[matTooltip]="(config.tooltip | translate) ?? ''"
|
||||
[disabled]="config.disabled"
|
||||
[attr.help-mode-key]="config.helpModeKey"
|
||||
matTooltipPosition="above"
|
||||
></iqser-icon-button>
|
||||
}
|
||||
}
|
||||
@ -60,10 +63,11 @@
|
||||
<iqser-circle-button
|
||||
(action)="config.action($event)"
|
||||
[buttonId]="config.id"
|
||||
[disabled]="config.disabled$ && (config.disabled$ | async)"
|
||||
[disabled]="config.disabled"
|
||||
[icon]="config.icon"
|
||||
[tooltip]="config.label | translate"
|
||||
[attr.help-mode-key]="config.helpModeKey"
|
||||
[iqserDisableStopPropagation]="config.disableStopPropagation"
|
||||
></iqser-circle-button>
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,8 @@ import { filterEach } from '../../utils';
|
||||
import { List } from '../../utils';
|
||||
import { IListable } from '../models';
|
||||
import { ActionConfig, ButtonConfig, SearchPosition, SearchPositions } from './models';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { DisableStopPropagationDirective } from '../../directives';
|
||||
|
||||
@Component({
|
||||
selector: 'iqser-page-header',
|
||||
@ -31,6 +33,8 @@ import { ActionConfig, ButtonConfig, SearchPosition, SearchPositions } from './m
|
||||
CircleButtonComponent,
|
||||
TranslateModule,
|
||||
InputWithActionComponent,
|
||||
MatTooltip,
|
||||
DisableStopPropagationDirective,
|
||||
],
|
||||
})
|
||||
export class PageHeaderComponent<T extends IListable> {
|
||||
|
||||
@ -52,7 +52,7 @@ export class ListingService<Class extends IListable<PrimaryKey>, PrimaryKey exte
|
||||
|
||||
get selected(): Class[] {
|
||||
const selectedIds = this.selectedIds;
|
||||
return this._entitiesService.all.filter(a => selectedIds.includes(a.id));
|
||||
return selectedIds.map(id => this._entitiesService.all.find(a => a.id === id)).filter(a => !!a);
|
||||
}
|
||||
|
||||
get selectedIds(): PrimaryKey[] {
|
||||
|
||||
@ -75,6 +75,5 @@
|
||||
|
||||
a {
|
||||
display: contents;
|
||||
cursor: default;
|
||||
@include mixins.clear-a;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryK
|
||||
getTableItemClasses(entity: Class): Record<string, boolean> {
|
||||
const classes: Record<string, boolean> = {
|
||||
'table-item': true,
|
||||
pointer: !!entity.routerLink && entity.routerLink.length > 0,
|
||||
'cursor-default': !entity.routerLink,
|
||||
};
|
||||
for (const key in this.tableItemClasses) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.tableItemClasses, key)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user