diff --git a/src/lib/listing/listing-component.directive.ts b/src/lib/listing/listing-component.directive.ts index 5d734de..9d5e45b 100644 --- a/src/lib/listing/listing-component.directive.ts +++ b/src/lib/listing/listing-component.directive.ts @@ -6,7 +6,7 @@ import { SortingService } from '../sorting'; import { AutoUnsubscribe } from '../utils'; import { SearchService } from '../search'; import { EntitiesService } from './services'; -import { IListable, TableColumnConfig } from './models'; +import { IListable, ListingMode, ListingModes, TableColumnConfig } from './models'; export const DefaultListingServices = [FilterService, SearchService, EntitiesService, SortingService] as const; @@ -30,6 +30,7 @@ export abstract class ListingComponent extends AutoUnsubscr abstract readonly tableHeaderLabel: string; private readonly _listingMode$ = new BehaviorSubject(ListingModes.table); + protected constructor(protected readonly _injector: Injector) { super(); this.listingMode$ = this._listingMode$.asObservable(); diff --git a/src/lib/listing/table-header/table-header.component.ts b/src/lib/listing/table-header/table-header.component.ts index e89166a..241ace1 100644 --- a/src/lib/listing/table-header/table-header.component.ts +++ b/src/lib/listing/table-header/table-header.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, Input, TemplateRef } from '@angular import { Required } from '../../utils'; import { FilterService } from '../../filtering'; import { EntitiesService } from '../services'; -import { Listable, ListingMode, ListingModes, TableColumnConfig } from '../models'; +import { IListable, ListingMode, ListingModes, TableColumnConfig } from '../models'; @Component({ selector: 'iqser-table-header', @@ -10,7 +10,7 @@ import { Listable, ListingMode, ListingModes, TableColumnConfig } from '../model styleUrls: ['./table-header.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) -export class TableHeaderComponent { +export class TableHeaderComponent { readonly listingModes = ListingModes; @Input() @Required() tableHeaderLabel!: string; diff --git a/src/lib/listing/table/table.component.ts b/src/lib/listing/table/table.component.ts index 53c6a01..b2890a9 100644 --- a/src/lib/listing/table/table.component.ts +++ b/src/lib/listing/table/table.component.ts @@ -13,7 +13,7 @@ import { } from '@angular/core'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { Required } from '../../utils'; -import { Listable, ListingModes, TableColumnConfig } from '../models'; +import { IListable, ListingModes, TableColumnConfig } from '../models'; import { ListingComponent } from '../listing-component.directive'; const SCROLLBAR_WIDTH = 11; @@ -24,7 +24,7 @@ const SCROLLBAR_WIDTH = 11; styleUrls: ['./table.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) -export class TableComponent implements OnInit { +export class TableComponent implements OnInit { readonly listingModes = ListingModes; @Input() bulkActions?: TemplateRef; diff --git a/src/lib/listing/workflow/workflow.component.ts b/src/lib/listing/workflow/workflow.component.ts index 5675c6a..f4d4985 100644 --- a/src/lib/listing/workflow/workflow.component.ts +++ b/src/lib/listing/workflow/workflow.component.ts @@ -12,10 +12,10 @@ import { ViewChildren } from '@angular/core'; import { ListingComponent } from '../listing-component.directive'; -import { Listable } from '../models'; import { CdkDrag, CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop'; import { Required } from '../../utils'; import { LoadingService } from '../../loading'; +import { IListable } from '../models'; interface WorkflowColumn { key: K; @@ -38,7 +38,7 @@ export interface WorkflowConfig { styleUrls: ['./workflow.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) -export class WorkflowComponent implements OnInit { +export class WorkflowComponent implements OnInit { @Input() headerTemplate?: TemplateRef; @Input() @Required() itemTemplate!: TemplateRef; @Input() @Required() config!: WorkflowConfig;