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