Skip to main content

TypedBaseListComponent

TypedBaseListComponent

A version of the BaseListComponent which is designed to be used with a TypedDocumentNode.

Signature
class TypedBaseListComponent<T extends TypedDocumentNode<any, Vars>, Field extends keyof ResultOf<T>, Vars extends { options: { filter: any; sort: any } } = VariablesOf<T>> extends BaseListComponent<ResultOf<T>, ItemOf<ResultOf<T>, Field>, VariablesOf<T>> implements OnInit {
availableLanguages$: Observable<LanguageCode[]>;
contentLanguage$: Observable<LanguageCode>;
protected dataService = inject(DataService);
protected router = inject(Router);
protected serverConfigService = inject(ServerConfigService);
protected permissionsService = inject(PermissionsService);
constructor()
configure(config: {
document: T;
getItems: (data: ResultOf<T>) => { items: Array<ItemOf<ResultOf<T>, Field>>; totalItems: number };
setVariables?: (skip: number, take: number) => VariablesOf<T>;
refreshListOnChanges?: Array<Observable<any>>;
}) => ;
ngOnInit() => ;
createFilterCollection() => DataTableFilterCollection<NonNullable<NonNullable<Vars['options']>['filter']>>;
createSortCollection() => DataTableSortCollection<NonNullable<NonNullable<Vars['options']>['sort']>>;
setLanguage(code: LanguageCode) => ;
getCustomFieldConfig(key: Exclude<keyof CustomFields, '__typename'> | string) => CustomFieldConfig[];
}
  • Implements: OnInit

availableLanguages$

property
Observable<LanguageCode[]>

contentLanguage$

property
Observable<LanguageCode>

dataService

property

router

property

serverConfigService

property

permissionsService

property

constructor

method
() => TypedBaseListComponent

configure

method
(config: { document: T; getItems: (data: ResultOf<T>) => { items: Array<ItemOf<ResultOf<T>, Field>>; totalItems: number }; setVariables?: (skip: number, take: number) => VariablesOf<T>; refreshListOnChanges?: Array<Observable<any>>; }) =>

ngOnInit

method
() =>

createFilterCollection

method
() => DataTableFilterCollection<NonNullable<NonNullable<Vars['options']>['filter']>>

createSortCollection

method
() => DataTableSortCollection<NonNullable<NonNullable<Vars['options']>['sort']>>

setLanguage

method
(code: LanguageCode) =>

getCustomFieldConfig

method
(key: Exclude<keyof CustomFields, '__typename'> | string) => CustomFieldConfig[]