Skip to content

DataDataProcessor

Defined in: core/processors/data-processor.svelte.ts:22

Class responsible for processing and transforming data for a datagrid component. It handles various operations such as filtering, sorting, grouping, and pagination, providing an efficient way to transform raw data into a format suitable for the grid.

Type Parameters

TOriginalRow

The type of the original row data in the datagrid.

Constructors

new DataDataProcessor()

new DataDataProcessor<TOriginalRow>(datagrid): DataDataProcessor<TOriginalRow>

Defined in: core/processors/data-processor.svelte.ts:31

Constructs an instance of the DataDataProcessor.

Parameters

datagrid

DatagridCore<TOriginalRow>

The core datagrid instance to which this processor belongs.

Returns

DataDataProcessor<TOriginalRow>

Properties

PropertyModifierTypeDefined in
metricsreadonlyPerformanceMetricscore/processors/data-processor.svelte.ts:23

Methods

applyColumnFilters()

applyColumnFilters(data): TOriginalRow[]

Defined in: core/processors/data-processor.svelte.ts:167

Applies column filters to the data. Filters are evaluated on a per-column basis.

Parameters

data

TOriginalRow[]

The raw data to be filtered.

Returns

TOriginalRow[]

The data after applying column filters.


applyFilters()

applyFilters(data): TOriginalRow[]

Defined in: core/processors/data-processor.svelte.ts:76

Applies filters to the dataset. This includes both global search and column filters.

Parameters

data

TOriginalRow[]

The raw data to be filtered.

Returns

TOriginalRow[]

The filtered data.


applyGlobalSearch()

applyGlobalSearch(data): TOriginalRow[]

Defined in: core/processors/data-processor.svelte.ts:114

Applies global search to the data, using either fuzzy search or a simple substring match.

Parameters

data

TOriginalRow[]

The raw data to be searched.

Returns

TOriginalRow[]

The data after applying global search.


createHierarchicalData()

createHierarchicalData(data): GridRow<TOriginalRow>[]

Defined in: core/processors/data-processor.svelte.ts:344

Creates hierarchical data by recursively grouping rows based on the defined grouping columns. Each group can contain child groups, and aggregation functions are applied to each group.

Parameters

data

TOriginalRow[]

The raw data to be grouped.

Returns

GridRow<TOriginalRow>[]

The hierarchical structure of grouped rows.


executeFullDataTransformation()

executeFullDataTransformation(): void

Defined in: core/processors/data-processor.svelte.ts:43

Executes the full data transformation pipeline including filtering, sorting, and grouping, preparing the data for display in the datagrid. This function processes the data, stores intermediate results in cache, and manages pagination.

Returns

void


handleGroupExpansion()

handleGroupExpansion(): void

Defined in: core/processors/data-processor.svelte.ts:474

Handles group expansion and updates the visible rows, pagination, and cached rows accordingly.

If hierarchical rows exist, the visible rows are determined by the expanded group state, otherwise the sorted data is processed. Afterward, the rows are paginated and cached.

Returns

void


handlePaginationChange()

handlePaginationChange(): void

Defined in: core/processors/data-processor.svelte.ts:495

Handles the change in pagination and updates the cached paginated rows accordingly.

This method gets the visible rows based on the current state and then updates the cached paginated rows for the current page.

Returns

void


processGroupedData()

processGroupedData(data): void

Defined in: core/processors/data-processor.svelte.ts:205

Processes grouped data by organizing it into hierarchical structures based on grouping columns, applying any necessary aggregations and handling visibility based on group expansion state.

Parameters

data

TOriginalRow[]

The raw data to be processed into groups.

Returns

void


registerAggregationFn()

registerAggregationFn(name, fn): void

Defined in: core/processors/data-processor.svelte.ts:271

Registers a custom aggregation function for use in the datagrid.

Parameters

name

string

The name of the aggregation function.

fn

AggregationFn

The aggregation function to register.

Returns

void