remove workflow template inputs
This commit is contained in:
parent
894405be8a
commit
61ae1e8bac
@ -32,6 +32,10 @@ export class CircleButtonComponent implements OnInit {
|
||||
|
||||
constructor(private readonly _elementRef: ElementRef) {}
|
||||
|
||||
get buttonId(): string {
|
||||
return `${Math.random().toString(36).substring(2, 9)}-button`;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
(this._elementRef.nativeElement as HTMLElement).style.setProperty('--size', `${this.size}px`);
|
||||
(this._elementRef.nativeElement as HTMLElement).style.setProperty('--iconSize', `${this.iconSize}px`);
|
||||
@ -51,8 +55,4 @@ export class CircleButtonComponent implements OnInit {
|
||||
this.action.emit($event);
|
||||
}
|
||||
}
|
||||
|
||||
get buttonId(): string {
|
||||
return `${Math.random().toString(36).substring(2, 9)}-button`;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
<ng-container *ngIf="componentContext$ | async">
|
||||
<iqser-table-header [tableHeaderLabel]="listingComponent.tableHeaderLabel" listingMode="workflow">
|
||||
<ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
|
||||
</iqser-table-header>
|
||||
<iqser-table-header [tableHeaderLabel]="listingComponent.tableHeaderLabel" listingMode="workflow"> </iqser-table-header>
|
||||
|
||||
<iqser-empty-state
|
||||
(action)="noDataAction.emit()"
|
||||
|
||||
@ -2,6 +2,7 @@ import {
|
||||
ChangeDetectionStrategy,
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
ContentChild,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
forwardRef,
|
||||
@ -30,14 +31,12 @@ interface WorkflowContext {
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'iqser-workflow [itemTemplate] [config] [addElementIcon]',
|
||||
selector: 'iqser-workflow [config] [addElementIcon]',
|
||||
templateUrl: './workflow.component.html',
|
||||
styleUrls: ['./workflow.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class WorkflowComponent<T extends IListable, K extends string> extends ContextComponent<WorkflowContext> implements OnInit {
|
||||
@Input() headerTemplate?: TemplateRef<unknown>;
|
||||
@Input() itemTemplate!: TemplateRef<T>;
|
||||
@Input() config!: WorkflowConfig<T, K>;
|
||||
@Input() itemClasses!: Record<string, (e: T) => boolean>;
|
||||
@Input() addElementIcon!: string;
|
||||
@ -51,6 +50,8 @@ export class WorkflowComponent<T extends IListable, K extends string> extends Co
|
||||
@Output() readonly noDataAction = new EventEmitter<void>();
|
||||
@Output() readonly addElement = new EventEmitter<void>();
|
||||
|
||||
@ContentChild('workflowItemTemplate') readonly itemTemplate!: TemplateRef<T>;
|
||||
|
||||
readonly trackBy = trackByFactory<T>();
|
||||
itemHeight?: number;
|
||||
itemWidth?: number;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user