Some fixes, bulk actions WIP
This commit is contained in:
parent
2d2cd9fcda
commit
ea2d5fc69b
@ -131,6 +131,7 @@
|
||||
.all-caps-label {
|
||||
margin: 0 16px 0 8px;
|
||||
opacity: 1;
|
||||
min-width: fit-content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,11 +21,14 @@
|
||||
|
||||
&.mat-button-disabled {
|
||||
cursor: not-allowed;
|
||||
|
||||
&:not(.primary):not(.warn):not(.dark-bg):hover {
|
||||
background-color: var(--iqser-btn-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&.primary.mat-button-disabled {
|
||||
background-color: var(--iqser-btn-bg);
|
||||
color: var(--iqser-white) !important;
|
||||
color: #ffffff80;
|
||||
}
|
||||
|
||||
&.warn:not([disabled]) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject, combineLatest, Observable } from 'rxjs';
|
||||
import { map, mapTo, tap } from 'rxjs/operators';
|
||||
import { map, tap } from 'rxjs/operators';
|
||||
import { FilterService, getFilteredEntities } from '../../filtering';
|
||||
import { SearchService } from '../../search';
|
||||
import { IListable } from '../models';
|
||||
@ -29,7 +29,10 @@ export class ListingService<E extends IListable> {
|
||||
this.displayedLength$ = this.displayed$.pipe(getLength, shareDistinctLast());
|
||||
|
||||
this.selected$ = this._selected$.asObservable().pipe(shareDistinctLast());
|
||||
this.selectedEntities$ = this._selected$.asObservable().pipe(mapTo(this.selected), shareLast());
|
||||
this.selectedEntities$ = this._selected$.asObservable().pipe(
|
||||
map(() => this.selected),
|
||||
shareLast(),
|
||||
);
|
||||
this.selectedLength$ = this._selected$.pipe(getLength, shareDistinctLast());
|
||||
|
||||
this.areAllSelected$ = this._areAllSelected$;
|
||||
|
||||
@ -25,6 +25,8 @@
|
||||
class="all-caps-label"></span>
|
||||
</div>
|
||||
|
||||
<ng-container [ngTemplateOutlet]="bulkActions"></ng-container>
|
||||
|
||||
<iqser-circle-button
|
||||
(action)="disableSelection()"
|
||||
[type]="circleButtonTypes.primary"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, TemplateRef } from '@angular/core';
|
||||
import { combineLatest, Observable } from 'rxjs';
|
||||
import { filter, map, tap } from 'rxjs/operators';
|
||||
import { CircleButtonTypes } from '../../../buttons';
|
||||
@ -18,6 +18,7 @@ export class ColumnHeaderComponent<T extends IListable, K extends string> extend
|
||||
|
||||
@Input() @Required() column!: WorkflowColumn<T, K>;
|
||||
@Input() @Required() selectionColumn?: WorkflowColumn<T, K>;
|
||||
@Input() bulkActions?: TemplateRef<unknown>;
|
||||
@Output() @Required() readonly selectionColumnChange = new EventEmitter<WorkflowColumn<T, K> | undefined>();
|
||||
|
||||
allSelected$!: Observable<boolean>;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
[class.list-source]="isSource(column)"
|
||||
[style.--color]="column.color"
|
||||
class="column">
|
||||
<iqser-column-header [(selectionColumn)]="this.selectionColumn" [column]="column"></iqser-column-header>
|
||||
<iqser-column-header [(selectionColumn)]="this.selectionColumn" [bulkActions]="bulkActions" [column]="column"></iqser-column-header>
|
||||
<div
|
||||
(cdkDropListDropped)="move($event)"
|
||||
[cdkDropListData]="column.entities | async"
|
||||
|
||||
@ -54,6 +54,7 @@ export class WorkflowComponent<T extends IListable, K extends string> extends Au
|
||||
@Input() noDataButtonIcon?: string;
|
||||
@Input() noDataButtonLabel?: string;
|
||||
@Input() showNoDataButton = false;
|
||||
@Input() bulkActions?: TemplateRef<unknown>;
|
||||
@Output() readonly noDataAction = new EventEmitter<void>();
|
||||
@Output() readonly addElement = new EventEmitter<void>();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user