A CDK DataSource that optionally integrates with CngxSort,
CngxFilter, CngxSearch, and CngxPaginate present in the injection
tree. Each directive is injected optionally - if absent, that processing
step is skipped.
Accepts either a plain Signal<T[]> or a CngxAsyncState<T[]>.
When a CngxAsyncState is provided, the data source exposes the full
UX state (isLoading, isRefreshing, error, isEmpty) so the
table can show skeleton rows, error states, and loading indicators.
// Plain signalreadonly dataSource = injectSmartDataSource(this.items);// With async state - full UX lifecyclereadonly residents = injectAsyncState(() => this.api.getAll(this.filter()));readonly dataSource = injectSmartDataSource(this.residents);// dataSource.isLoading(), dataSource.error(), dataSource.isRefreshing()