npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

envoc-table

v5.0.4-0

Published

envoc-table

Downloads

584

Readme

envoc-table / Exports

envoc-table

[![Travis][build-badge]][build] npm package Coveralls

Describe envoc-table here.

Important naming conventions for our sanity while creating envoc-table types:

  • TSource = The data source of the table. e.g. an instance of DataSource<TRow, TParams, TData>, which is basically just a function returning data in a known shape
  • TRow = The shape of the data representing an individual row in the table. e.g. 'UserListItemDto' - can be referenced via GetRowType<TSource>
  • TParams = The extra parameters that can be sent to the server as part of the request for data, but not part of the DataTablePage request. e.g. UserFiltersDto - can be referenced via GetParamType<TSource>
  • TData = The entire data object that is returned by the DataSource, generally including all the data relevant to the request but may also include extra info for custom types. e.g. PagedUserListResultDto e.g. DataPageResult<UserListItemDto>

In general you create a TableContext and use the children to render whatever is needed.

It is important to note the usage of tanstack table is intended to be an implementation detail. The envoc-table types provide sufficient ways to deal with requirements. Should you need extra functionality for the table not included, it is recommended to make a custom TanstackTable equivalent to serve your needs. Specifically trying to keep the tanstack table types isolated to the tanstack specific components to avoid issues. In the past, breaking changes to react-table have been a pain so the minimizing the places to change should minimize headaches.

Interfaces

envoc-table / Exports / ApiResult

Interface: ApiResult<TResult>

The common shape of a mediated result returned from Envoc.Core

Type parameters

| Name | | :------ | | TResult |

Table of contents

Properties

Properties

result

Optional result: TResult

Defined in

TableProvider.tsx:31

envoc-table / Exports / CellProps

Interface: CellProps

Table of contents

Properties

Properties

className

Optional className: string

Defined in

Cells/Cell.tsx:6


style

Optional style: CSSProperties

Defined in

Cells/Cell.tsx:8


title

Optional title: string

Defined in

Cells/Cell.tsx:7


value

Optional value: ReactNode

Defined in

Cells/Cell.tsx:5

envoc-table / Exports / ColumnsBuilderProps

Interface: ColumnsBuilderProps<TSource, TRow, TParams, TData>

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Table of contents

Properties

Properties

Column

Column: SingleColumnBuilderType<TSource, TRow, TParams, TData>

A single column in the table, could represent some specific value via the 'accessorKey' prop

The 'Cell' prop should render the value for a particular column

Defined in

Columns/ColumnsBuilder.tsx:28


ServerColumns

ServerColumns: ServerColumnsBuilderType<TSource, TRow, TParams, TData>

Allows for server provided columns to be rendered with the default (server side) configurations

Defined in

Columns/ColumnsBuilder.tsx:33

envoc-table / Exports / CommaSeparatedCellProps

Interface: CommaSeparatedCellProps

Hierarchy

  • Omit<CellProps, "value">

    CommaSeparatedCellProps

Table of contents

Properties

Properties

className

Optional className: string

Inherited from

Omit.className

Defined in

Cells/Cell.tsx:6


style

Optional style: CSSProperties

Inherited from

Omit.style

Defined in

Cells/Cell.tsx:8


title

Optional title: string

Inherited from

Omit.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string[] | number[]

Defined in

Cells/CommaSeparatedCell.tsx:5

envoc-table / Exports / CommonColumnConfigProps

Interface: CommonColumnConfigProps<TSource, TRow, TParams, TData>

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Table of contents

Properties

Properties

Footer

Optional Footer: string | ElementType<FooterComponentProps<TSource, TRow, TParams, TData>>

footer for the column

Defined in

Columns/CommonColumnConfigProps.ts:24


Header

Optional Header: string | ElementType<HeaderComponentProps<TSource, TRow, TParams, TData>>

header for the column

Defined in

Columns/CommonColumnConfigProps.ts:18


width

Optional width: number

width for this column in pixels

Defined in

Columns/CommonColumnConfigProps.ts:29

envoc-table / Exports / CommonTableFilterProps

Interface: CommonTableFilterProps

Table of contents

Properties

Properties

keepPage

Optional keepPage: boolean

Defined in

Filters/TableFilterBuilder.tsx:46

envoc-table / Exports / DataTableColumnDefinition

Interface: DataTableColumnDefinition

The common shape of a column config returned from our Envoc.Core table response

Table of contents

Properties

Properties

accessor

Optional accessor: string

Defined in

TableProvider.tsx:51


componentAttribute

Optional componentAttribute: Object

Type declaration

| Name | Type | | :------ | :------ | | name | string |

Defined in

TableProvider.tsx:56


filterable

Optional filterable: boolean

Defined in

TableProvider.tsx:54


header

Optional header: string

Defined in

TableProvider.tsx:52


sortable

Optional sortable: boolean

Defined in

TableProvider.tsx:53


type

Optional type: string

Defined in

TableProvider.tsx:55

envoc-table / Exports / DateCellProps

Interface: DateCellProps

Hierarchy

Table of contents

Properties

Properties

className

Optional className: string

Inherited from

Omit.className

Defined in

Cells/Cell.tsx:6


displayFormat

Optional displayFormat: DisplayFormats

Defined in

Cells/DateCell.tsx:9


style

Optional style: CSSProperties

Inherited from

Omit.style

Defined in

Cells/Cell.tsx:8


title

Optional title: string

Inherited from

Omit.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string

Defined in

Cells/DateCell.tsx:8

envoc-table / Exports / DateTimeZoneCellProps

Interface: DateTimeZoneCellProps

Hierarchy

Table of contents

Properties

Properties

className

Optional className: string

Inherited from

Omit.className

Defined in

Cells/Cell.tsx:6


dateDisplayFormat

Optional dateDisplayFormat: DateDisplayFormats

Defined in

Cells/DateTimeZoneCell.tsx:32


style

Optional style: CSSProperties

Inherited from

Omit.style

Defined in

Cells/Cell.tsx:8


timeDisplayFormat

Optional timeDisplayFormat: "short"

Defined in

Cells/DateTimeZoneCell.tsx:33


timeZoneNameDisplayFormat

Optional timeZoneNameDisplayFormat: DimeZoneNameDisplayFormats

Defined in

Cells/DateTimeZoneCell.tsx:34


title

Optional title: string

Inherited from

Omit.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string

Defined in

Cells/DateTimeZoneCell.tsx:31

envoc-table / Exports / DollarCellProps

Interface: DollarCellProps

Hierarchy

Table of contents

Properties

Properties

className

Optional className: string

Inherited from

Omit.className

Defined in

Cells/Cell.tsx:6


style

Optional style: CSSProperties

Inherited from

Omit.style

Defined in

Cells/Cell.tsx:8


title

Optional title: string

Inherited from

Omit.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string | number

Defined in

Cells/DollarCell.tsx:11

envoc-table / Exports / FormattedPhoneNumberCellProps

Interface: FormattedPhoneNumberCellProps

Hierarchy

  • Omit<CellProps, "value">

    FormattedPhoneNumberCellProps

Table of contents

Properties

Properties

className

Optional className: string

Inherited from

Omit.className

Defined in

Cells/Cell.tsx:6


style

Optional style: CSSProperties

Inherited from

Omit.style

Defined in

Cells/Cell.tsx:8


title

Optional title: string

Inherited from

Omit.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string

Defined in

Cells/FormattedPhoneNumberCell.tsx:6

envoc-table / Exports / NaCellProps

Interface: NaCellProps

Table of contents

Properties

Properties

allowEmptyString

Optional allowEmptyString: boolean

Defined in

Cells/NaCell.tsx:9


className

Optional className: string

Defined in

Cells/NaCell.tsx:6


style

Optional style: CSSProperties

Defined in

Cells/NaCell.tsx:8


title

Optional title: string

Defined in

Cells/NaCell.tsx:7


value

Optional value: ReactNode

Defined in

Cells/NaCell.tsx:5

envoc-table / Exports / NaDateCellProps

Interface: NaDateCellProps

Hierarchy

Table of contents

Properties

Properties

allowEmptyString

Optional allowEmptyString: boolean

Defined in

Cells/NaDateCell.tsx:5


className

Optional className: string

Inherited from

DateCellProps.className

Defined in

Cells/Cell.tsx:6


displayFormat

Optional displayFormat: DisplayFormats

Inherited from

DateCellProps.displayFormat

Defined in

Cells/DateCell.tsx:9


style

Optional style: CSSProperties

Inherited from

DateCellProps.style

Defined in

Cells/Cell.tsx:8


title

Optional title: string

Inherited from

DateCellProps.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string

Inherited from

DateCellProps.value

Defined in

Cells/DateCell.tsx:8

envoc-table / Exports / NaDateTimeZoneCellProps

Interface: NaDateTimeZoneCellProps

Hierarchy

Table of contents

Properties

Properties

allowEmptyString

Optional allowEmptyString: boolean

Defined in

Cells/NaDateTimeZoneCell.tsx:6


className

Optional className: string

Inherited from

DateTimeZoneCellProps.className

Defined in

Cells/Cell.tsx:6


dateDisplayFormat

Optional dateDisplayFormat: DateDisplayFormats

Inherited from

DateTimeZoneCellProps.dateDisplayFormat

Defined in

Cells/DateTimeZoneCell.tsx:32


style

Optional style: CSSProperties

Inherited from

DateTimeZoneCellProps.style

Defined in

Cells/Cell.tsx:8


timeDisplayFormat

Optional timeDisplayFormat: "short"

Inherited from

DateTimeZoneCellProps.timeDisplayFormat

Defined in

Cells/DateTimeZoneCell.tsx:33


timeZoneNameDisplayFormat

Optional timeZoneNameDisplayFormat: DimeZoneNameDisplayFormats

Inherited from

DateTimeZoneCellProps.timeZoneNameDisplayFormat

Defined in

Cells/DateTimeZoneCell.tsx:34


title

Optional title: string

Inherited from

DateTimeZoneCellProps.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string

Inherited from

DateTimeZoneCellProps.value

Defined in

Cells/DateTimeZoneCell.tsx:31

envoc-table / Exports / RenderCellProps

Interface: RenderCellProps<TSource, TRow, TParams, TData>

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Table of contents

Properties

Properties

Cell

Cell: ElementType<any>

Arbitrary component that is expected to take either a RowCellComponentProps or ValueCellComponentProps

Usage of RenderCell cannot know which case is true so we assume it is one of those - hopefully that remains a library code concern

Defined in

Cells/RenderCell.tsx:23


cellProps

cellProps: RowCellComponentProps<TSource, TRow, TParams, TData>

we use the less specific RowCellComponentProps here because RenderCell will interrogate the configuration of the column to determine the proper setup

Defined in

Cells/RenderCell.tsx:28

envoc-table / Exports / RenderFooterProps

Interface: RenderFooterProps<TSource, TRow, TParams, TData>

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Table of contents

Properties

Properties

Footer

Footer: ElementType<any>

Defined in

Footers/RenderFooter.tsx:17


footerProps

footerProps: FooterComponentProps<TSource, TRow, TParams, TData>

Defined in

Footers/RenderFooter.tsx:18

envoc-table / Exports / RenderHeaderProps

Interface: RenderHeaderProps<TSource, TRow, TParams, TData>

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Table of contents

Properties

Properties

Header

Header: ElementType<any>

Defined in

Headers/RenderHeader.tsx:17


headerProps

headerProps: HeaderComponentProps<TSource, TRow, TParams, TData>

Defined in

Headers/RenderHeader.tsx:18

envoc-table / Exports / ServerColumnsBuilderProps

Interface: ServerColumnsBuilderProps<TSource, TRow, TParams, TData>

Defines the columns configured

note: not all columns may have a ColumnDefinition on the server or they may be ignored

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Table of contents

Properties

Properties

except

Optional except: keyof TRow[]

exclude the given columns

Defined in

Columns/ServerColumnsBuilder.tsx:43

envoc-table / Exports / SimplePagerProps

Interface: SimplePagerProps

Table of contents

Properties

Properties

className

Optional className: string

Defined in

Paging/SimplePager.tsx:16


defaultSize

Optional defaultSize: number

Defined in

Paging/SimplePager.tsx:14


defaultSizes

Optional defaultSizes: number[]

Defined in

Paging/SimplePager.tsx:15

envoc-table / Exports / TableContextProp

Interface: TableContextProp<TSource, TRow, TParams, TData>

represents any prop that should get the 'context' of the wrapping table provider

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Table of contents

Properties

Properties

context

context: TableContextType<TSource, TRow, TParams, TData>

Defined in

TableContextProp.tsx:18

envoc-table / Exports / TableFilterComponentProps

Interface: TableFilterComponentProps<TParams, TValue>

The actual 'input' that has the controlling values to a table filter. duck-types to 'InjectedFieldProps' in envoc-form

Type parameters

| Name | | :------ | | TParams | | TValue |

Table of contents

Properties

Properties

input

input: TableFilterInputComponentProps<undefined | null | TValue>

Defined in

Filters/TableFilterComponentProps.tsx:7


meta

Optional meta: any

Defined in

Filters/TableFilterComponentProps.tsx:8


params

Optional params: null | TParams

Defined in

Filters/TableFilterComponentProps.tsx:6

envoc-table / Exports / TableFilterInputComponentProps

Interface: TableFilterInputComponentProps<TValue>

Effectively, just a fancy way of what a normal 'input' element might accept. Conveniently duck-types to 'CustomFieldInputProps' in envoc-form Has lesser features than what's in envoc-form

Type parameters

| Name | | :------ | | TValue |

Table of contents

Properties

Properties

onChange

onChange: (newValue: TValue) => void

Type declaration

▸ (newValue): void

Parameters

| Name | Type | | :------ | :------ | | newValue | TValue |

Returns

void

Defined in

Filters/TableFilterComponentProps.tsx:18


value

value: TValue

Defined in

Filters/TableFilterComponentProps.tsx:17

envoc-table / Exports / TanstackTableCellProps

Interface: TanstackTableCellProps

Table of contents

Properties

Properties

cellProps

cellProps: CellContext<any, any>

Defined in

Tables/TanstackTableCell.tsx:12


columnId

columnId: string

Defined in

Tables/TanstackTableCell.tsx:11

envoc-table / Exports / TanstackTableFooterProps

Interface: TanstackTableFooterProps

Table of contents

Properties

Properties

columnId

columnId: string

Defined in

Tables/TanstackTableFooter.tsx:10

envoc-table / Exports / TanstackTableHeaderProps

Interface: TanstackTableHeaderProps

Table of contents

Properties

Properties

columnId

columnId: string

Defined in

Tables/TanstackTableHeader.tsx:10

envoc-table / Exports / YesNoCellProps

Interface: YesNoCellProps

Hierarchy

Table of contents

Properties

Properties

className

Optional className: string

Inherited from

Omit.className

Defined in

Cells/Cell.tsx:6


style

Optional style: CSSProperties

Inherited from

Omit.style

Defined in

Cells/Cell.tsx:8


title

Optional title: string

Inherited from

Omit.title

Defined in

Cells/Cell.tsx:7


value

Optional value: null | string | boolean

Defined in

Cells/YesNoCell.tsx:5

envoc-table / Exports

envoc-table

Table of contents

Interfaces

Type Aliases

Variables

Functions

Type Aliases

BuilderComponentHelperProps

Ƭ BuilderComponentHelperProps<componentName, TBaseProps, TRenderComponent, TRenderComponentProps, TConsumerCommonProps>: { [P in componentName]: PartialInheritance<TBaseProps, TRenderComponent, TRenderComponentProps, TConsumerCommonProps> } & Omit<TRenderComponentProps, keyof TBaseProps> & TConsumerCommonProps

Allows some 'Component' to be given as a prop and have it rendered with some set of TBaseProps and TConsumerCommonProps be enforced by type

Type parameters

| Name | Type | Description | | :------ | :------ | :------ | | componentName | extends string | The prop name to be used by the builder to identify 'Component' | | TBaseProps | TBaseProps | props shared between any instance of 'Component' within the builder | | TRenderComponent | extends ElementType | the type of the react component that should be doing the actual rendering | | TRenderComponentProps | ComponentPropsWithRef<TRenderComponent> | if provided, allows for a custom value for the expected TRenderComponent props type | | TConsumerCommonProps | unknown | the shared props that any instance of this component that should be provided by the consumer |

Defined in

Builders.tsx:21


ColumnConfiguration

Ƭ ColumnConfiguration<TSource, TRow, TParams, TData>: Object

the specific configuration of a column by it's id

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | Description | | :------ | :------ | :------ | | accessorKey? | keyof TRow | - | | cellComponent | FunctionComponent<RowCellComponentProps<TSource, TRow, TParams, TData>> | - | | columnId | string | - | | columnValueFunction | (row: TRow) => any | - | | footerComponent? | FunctionComponent<FooterComponentProps<TSource, TRow, TParams, TData>> | - | | headerComponent? | FunctionComponent<HeaderComponentProps<TSource, TRow, TParams, TData>> | - | | sortBy? | string | keyof TRow | what this column should sort by - might be a property of TRow or a property expression like "foo.bar" | | width? | number | desired width of the column in pixels |

Defined in

TableProvider.tsx:170


ColumnConfigurationLookup

Ƭ ColumnConfigurationLookup<TSource, TRow, TParams, TData>: Object

The configuration for some column by a column id

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Index signature

▪ [columnId: string]: ColumnConfiguration<TSource, TRow, TParams, TData>

Defined in

TableProvider.tsx:207


ColumnOrderLookup

Ƭ ColumnOrderLookup: Object

Numeric ordering of columns by id. Generally expected to be ascending order.

This is kept distinct from column configuration as columns may be conditionally rendered. Keeping it in the same state object caused more unmounts / remounts than desired

Index signature

▪ [columnId: string]: number

Defined in

TableProvider.tsx:223


ColumnsBuilderType

Ƭ ColumnsBuilderType<TSource, TRow, TParams, TData>: (x: ColumnsBuilderProps<TSource, TRow, TParams, TData>) => JSX.Element

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

▸ (x): JSX.Element

Parameters

| Name | Type | | :------ | :------ | | x | ColumnsBuilderProps<TSource, TRow, TParams, TData> |

Returns

JSX.Element

Defined in

Columns/ColumnsBuilder.tsx:10


DataSource

Ƭ DataSource<TRow, TParams, TData>: (value: DataSourceRequestParams<TParams>) => Promise<TData> & (value: DataSourceRequestParams<TParams>) => Promise<ApiResult<DataTablePage<TRow>>>

A source of data represented by a function accepting a set of useful parameters that returns a promise to the commonly used api result + paged data

Type parameters

| Name | | :------ | | TRow | | TParams | | TData |

Defined in

TableProvider.tsx:136


DataSourceRequestParams

Ƭ DataSourceRequestParams<TParams>: Object

Common parameters passed to a data source

Type parameters

| Name | | :------ | | TParams |

Type declaration

| Name | Type | | :------ | :------ | | params? | TParams | | signal | AbortSignal | | state | TableState |

Defined in

TableProvider.tsx:84


DataTablePage

Ƭ DataTablePage<TRow>: Object

The common shape of a "paged" source of data returned from our Envoc.Core table response

Represents DataTableFuzzyPage + DataTablePage + DataTablePageWithColumns from Envoc.Core (namespace Envoc.Core.Queries.Datatables.Client)

Type parameters

| Name | | :------ | | TRow |

Type declaration

| Name | Type | | :------ | :------ | | columns? | DataTableColumnDefinition[] | | hasMoreData? | boolean | | rows? | TRow[] | | totalFilteredRecords? | number | | totalRecords? | number |

Defined in

TableProvider.tsx:39


DateDisplayFormats

Ƭ DateDisplayFormats: "short" | "full" | "medium" | "long"

Defined in

Cells/DateTimeZoneCell.tsx:20


DimeDisplayFormats

Ƭ DimeDisplayFormats: "short"

Defined in

Cells/DateTimeZoneCell.tsx:24


DimeZoneNameDisplayFormats

Ƭ DimeZoneNameDisplayFormats: "long" | "short"

Defined in

Cells/DateTimeZoneCell.tsx:28


DisplayFormats

Ƭ DisplayFormats: "short" | "full" | "medium" | "long"

Defined in

Cells/DateCell.tsx:5


FooterComponentProps

Ƭ FooterComponentProps<TSource, TRow, TParams, TData>: Object

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | | :------ | :------ | | columnId | string | | data | TData | undefined | | params | TParams | undefined |

Defined in

Columns/CommonColumnConfigProps.ts:43


GetParamType

Ƭ GetParamType<TSource>: TSource extends DataSource<infer _TRow, infer TParams, infer _TData> ? TParams : never

Gets the parameter type from a data source

Type parameters

| Name | | :------ | | TSource |

Defined in

TableProvider.tsx:108


GetRowType

Ƭ GetRowType<TSource>: TSource extends DataSource<infer TRow, infer _TParams, infer _TData> ? TRow : never

Gets the actual "row" type from a data source

Type parameters

| Name | | :------ | | TSource |

Defined in

TableProvider.tsx:93


GetServiceResultType

Ƭ GetServiceResultType<TSource>: TSource extends DataSource<infer TRow, infer _TParams, infer TData> ? TData & ApiResult<DataTablePage<TRow>> : never

Gets the type of data from a data source

Type parameters

| Name | | :------ | | TSource |

Defined in

TableProvider.tsx:123


HeaderComponentProps

Ƭ HeaderComponentProps<TSource, TRow, TParams, TData>: Object

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | | :------ | :------ | | columnId | string | | data | TData | undefined | | params | TParams | undefined |

Defined in

Columns/CommonColumnConfigProps.ts:32


Mix

Ƭ Mix<A, B>: { [K in keyof B | keyof A]: K extends keyof A ? A[K] : K extends keyof B ? B[K] : never }

used to combine A and B, with keys of A taking priority over keys of B

Type parameters

| Name | | :------ | | A | | B |

Defined in

Builders.tsx:156


PartialInheritance

Ƭ PartialInheritance<TBaseProps, TRenderComponent, TRenderComponentProps, TConsumerCommonProps>: Partial<TRenderComponentProps> extends Partial<Mix<TBaseProps, TConsumerCommonProps>> ? TRenderComponent : ComponentType<Mix<Mix<TBaseProps, TConsumerCommonProps>, ComponentProps<TRenderComponent>>>

We want to support both generic and inheritance type relationships between components passed in to builders e.g. we have some components with generic parameters - those should allow the generics to be set correctly e.g. other cases we have base component (props) that cover our cases

This mess of a utility type allows for either situation behave in a way that is intuitive to consuming developers

Type parameters

| Name | Type | | :------ | :------ | | TBaseProps | TBaseProps | | TRenderComponent | extends ElementType | | TRenderComponentProps | TRenderComponentProps | | TConsumerCommonProps | TConsumerCommonProps |

Defined in

Builders.tsx:138


RowCellComponentProps

Ƭ RowCellComponentProps<TSource, TRow, TParams, TData>: Object

Props given to some cell without a particular target 'value' in mind

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | | :------ | :------ | | columnId | string | | data | TData | undefined | null | | params | TParams | undefined | null | | row | TRow |

Defined in

Cells/RowCellComponentProps.tsx:11


ServerColumnsBuilderType

Ƭ ServerColumnsBuilderType<TSource, TRow, TParams, TData>: (props: ServerColumnsBuilderProps<TSource, TRow, TParams, TData>) => JSX.Element

Renders many columns dependent on the server based configuration

The configuration of those columns comes from Envoc.Core ColumnDefinition (namespace Envoc.Core.Queries.Datatables.Client)

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

▸ (props): JSX.Element

Parameters

| Name | Type | | :------ | :------ | | props | ServerColumnsBuilderProps<TSource, TRow, TParams, TData> |

Returns

JSX.Element

Defined in

Columns/ServerColumnsBuilder.tsx:20


SingleColumnBuilderProps

Ƭ SingleColumnBuilderProps<TProp, TRenderComponent, TSource, TRow, TParams, TData>: TProp extends keyof TRow ? SinglePropBuilderComponentHelperProps<"accessorKey", "Cell", ValueCellComponentProps<TRow[TProp], TSource, TRow, TParams, TData>, TRow, TProp, TRenderComponent, ComponentPropsWithoutRef<TRenderComponent>, CommonColumnConfigProps<TSource, TRow, TParams, TData>> & { accessorKey: TProp } & { enableSorting?: false ; sortExpression?: undefined ; sortProperty?: undefined } | { enableSorting: true ; sortExpression?: string ; sortProperty?: keyof TRow } : BuilderComponentHelperProps<"Cell", RowCellComponentProps<TSource, TRow, TParams, TData>, TRenderComponent, ComponentPropsWithoutRef<TRenderComponent>, CommonColumnConfigProps<TSource, TRow, TParams, TData>> & { accessorKey?: never } & { accessorKey?: never ; enableSorting?: false ; sortProperty?: undefined } | { enableSorting: true ; sortProperty: keyof TRow }

Type parameters

| Name | Type | | :------ | :------ | | TProp | extends keyof TRow | undefined | | TRenderComponent | extends ElementType | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Defined in

Columns/SingleColumnBuilder.tsx:55


SingleColumnBuilderType

Ƭ SingleColumnBuilderType<TSource, TRow, TParams, TData>: <TProp, TRenderComponent>(props: SingleColumnBuilderProps<TProp, TRenderComponent, TSource, TRow, TParams, TData>) => JSX.Element

A single column in the table

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

▸ <TProp, TRenderComponent>(props): JSX.Element

Type parameters

| Name | Type | | :------ | :------ | | TProp | extends keyof TRow | undefined | | TRenderComponent | extends ElementType |

Parameters

| Name | Type | | :------ | :------ | | props | SingleColumnBuilderProps<TProp, TRenderComponent, TSource, TRow, TParams, TData> |

Returns

JSX.Element

Defined in

Columns/SingleColumnBuilder.tsx:36


SinglePropBuilderComponentHelperProps

Ƭ SinglePropBuilderComponentHelperProps<keyName, componentName, TBaseProps, TData, TProp, TRenderComponent, TRenderComponentProps, TConsumerCommonProps>: { [P in componentName]: PartialInheritance<TBaseProps, TRenderComponent, TRenderComponentProps, TConsumerCommonProps> } & { [P in keyName]: TProp } & Omit<TRenderComponentProps, keyof TBaseProps> & TConsumerCommonProps

Generically define a type-safe, constrained builder's props This is a generic set of props that allows for a helper to be called like a react component For use in the children as function pattern. Examples being envoc-form and envoc-table

Type parameters

| Name | Type | Description | | :------ | :------ | :------ | | keyName | extends string | The prop name to be used by the builder to identify which TProp | | componentName | extends string | The prop name to be used by the builder to identify 'Component' | | TBaseProps | TBaseProps | props shared between any instance of 'Component' within the builder | | TData | TData | the underlying type that should be inspected | | TProp | extends keyof TData | the property key of the TData that should be 'bound to' | | TRenderComponent | extends ElementType | the type of the react component that should be doing the actual rendering | | TRenderComponentProps | ComponentPropsWithRef<TRenderComponent> | if provided, allows for a custom value for the expected TRenderComponent props type | | TConsumerCommonProps | unknown | the shared props that any instance of this component that should be provided by the consumer |

Defined in

Builders.tsx:58


TableBuilderProps

Ƭ TableBuilderProps<TRenderComponent, TSource, TRow, TParams, TData>: TRenderComponent extends ElementType ? BuilderComponentHelperProps<"Component", TableContextProp<TSource, TRow, TParams, TData>, TRenderComponent, ComponentPropsWithoutRef<TRenderComponent>> & { children: ColumnsBuilderType<TSource, TRow, TParams, TData> } : { Component?: undefined ; children: ColumnsBuilderType<TSource, TRow, TParams, TData> ; debugTable?: boolean }

Type parameters

| Name | Type | | :------ | :------ | | TRenderComponent | extends ElementType | undefined | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Defined in

Tables/TableBuilder.tsx:25


TableBuilderType

Ƭ TableBuilderType<TSource, TRow, TParams, TData>: <TRenderComponent>(props: TableBuilderProps<TRenderComponent, TSource, TRow, TParams, TData>) => JSX.Element

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

▸ <TRenderComponent>(props): JSX.Element

Type parameters

| Name | Type | | :------ | :------ | | TRenderComponent | extends ElementType | undefined |

Parameters

| Name | Type | | :------ | :------ | | props | TableBuilderProps<TRenderComponent, TSource, TRow, TParams, TData> |

Returns

JSX.Element

Defined in

Tables/TableBuilder.tsx:16


TableCellLookup

Ƭ TableCellLookup: Object

Index signature

▪ [key: string]: ElementType

Defined in

configureTableCells.tsx:13


TableContextType

Ƭ TableContextType<TSource, TRow, TParams, TData>: Object

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | | :------ | :------ | | columnConfiguration | ColumnConfigurationLookup<TSource, TRow, TParams, TData> | | columnIds | string[] | | columnOrder | ColumnOrderLookup | | data? | TData | | getRowId? | (row: TRow, index: number) => string | | loading | boolean | | params | TParams | undefined | | setColumnConfiguration | Dispatch<SetStateAction<ColumnConfigurationLookup<TSource, TRow, TParams, TData>>> | | setColumnIds | Dispatch<SetStateAction<string[]>> | | setColumnOrder | Dispatch<SetStateAction<ColumnOrderLookup>> | | setParams | Dispatch<SetStateAction<TParams | undefined>> | | setTableState | Dispatch<SetStateAction<TableState>> | | tableState | TableState |

Defined in

TableProvider.tsx:227


TableFilterBuilderProps

Ƭ TableFilterBuilderProps<TParams, TProp, TRenderComponent>: TProp extends keyof TParams ? SinglePropBuilderComponentHelperProps<"name", "Component", TableFilterComponentProps<TParams, TParams[TProp]>, TParams, TProp, TRenderComponent> & CommonTableFilterProps : BuilderComponentHelperProps<"Component", TableFilterComponentProps<TParams, TParams>, TRenderComponent> & CommonTableFilterProps

Type parameters

| Name | Type | | :------ | :------ | | TParams | TParams | | TProp | extends keyof TParams | undefined | | TRenderComponent | extends ElementType |

Defined in

Filters/TableFilterBuilder.tsx:24


TableFilterBuilderType

Ƭ TableFilterBuilderType<TParams>: <TProp, TRenderComponent>(props: TableFilterBuilderProps<TParams, TProp, TRenderComponent>) => JSX.Element

Builds a table filter for either a single prop of TParams or the entire value

Type parameters

| Name | | :------ | | TParams |

Type declaration

▸ <TProp, TRenderComponent>(props): JSX.Element

Type parameters

| Name | Type | | :------ | :------ | | TProp | extends keyof TParams | undefined | | TRenderComponent | extends ElementType |

Parameters

| Name | Type | | :------ | :------ | | props | TableFilterBuilderProps<TParams, TProp, TRenderComponent> |

Returns

JSX.Element

Defined in

Filters/TableFilterBuilder.tsx:17


TablePaginationBuilderProps

Ƭ TablePaginationBuilderProps<TRenderComponent, TSource, TRow, TParams, TData>: TRenderComponent extends ElementType ? BuilderComponentHelperProps<"Component", TableContextProp<TSource, TRow, TParams, TData>, TRenderComponent, ComponentPropsWithoutRef<TRenderComponent>> : { Component?: undefined } & SimplePagerProps

Type parameters

| Name | Type | | :------ | :------ | | TRenderComponent | TRenderComponent | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Defined in

Paging/TablePaginationBuilder.tsx:33


TablePaginationBuilderType

Ƭ TablePaginationBuilderType<TSource, TRow, TParams, TData>: <TRenderComponent>(props: TablePaginationBuilderProps<TRenderComponent, TSource, TRow, TParams, TData>) => JSX.Element

Table pagination with optional Component override

Defaults to "SimplePager"

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

▸ <TRenderComponent>(props): JSX.Element

Type parameters

| Name | | :------ | | TRenderComponent |

Parameters

| Name | Type | | :------ | :------ | | props | TablePaginationBuilderProps<TRenderComponent, TSource, TRow, TParams, TData> |

Returns

JSX.Element

Defined in

Paging/TablePaginationBuilder.tsx:18


TableProviderBuilder

Ƭ TableProviderBuilder<TSource, TRow, TParams, TData>: (props: TableProviderBuilderProps<TSource, TRow, TParams, TData>) => JSX.Element

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | TRow | | TParams | TParams | | TData | TData |

Type declaration

▸ (props): JSX.Element

Parameters

| Name | Type | | :------ | :------ | | props | TableProviderBuilderProps<TSource, TRow, TParams, TData> |

Returns

JSX.Element

Defined in

TableProvider.tsx:143


TableProviderBuilderProps

Ƭ TableProviderBuilderProps<TSource, TRow, TParams, TData>: Object

allows for a tables, filters, pagers, etc to be built in a type safe manner from this provider (context) instance

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | | :------ | :------ | | Table | TableBuilderType<TSource, TRow, TParams, TData> | | TableFilter | TableFilterBuilderType<TParams> | | TablePagination | TablePaginationBuilderType<TSource, TRow, TParams, TData> |

Defined in

TableProvider.tsx:287


TableProviderProps

Ƭ TableProviderProps<TSource, TRow, TParams, TData>: Object

The provider of table context. Can take options that will be used to define a strongly typed object that will be given to the query and can easily be hooked into filter objects

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | | :------ | :------ | | children | TableProviderBuilder<TSource, TRow, TParams, TData> | | dataSource | TSource | | getRowId? | (row: TRow, index: number) => string |

Defined in

TableProvider.tsx:156


TableState

Ƭ TableState: Object

Table state passed to a data source

Type declaration

| Name | Type | | :------ | :------ | | columns | TableStateColumn[] | | includeColumns | boolean | | skip? | number | | take? | number |

Defined in

TableProvider.tsx:74


TableStateColumn

Ƭ TableStateColumn: Object

A single column's state as provided to a data source

Type declaration

| Name | Type | | :------ | :------ | | columnId | string | | propertyName | string | | searchTerm? | string | | sortDirection? | "asc" | "desc" |

Defined in

TableProvider.tsx:64


ValueCellComponentProps

Ƭ ValueCellComponentProps<TValue, TSource, TRow, TParams, TData>: Object

Props given to some cell intending to render a particular value *

Type parameters

| Name | Type | | :------ | :------ | | TValue | TValue | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Type declaration

| Name | Type | | :------ | :------ | | columnId | string | | data | TData | undefined | null | | params | TParams | undefined | null | | row | TRow | | value | TValue | undefined | null |

Defined in

Cells/ValueCellComponentProps.tsx:11

Variables

TableContext

Const TableContext: Context<undefined | TableContextType<any, any, any, any>>

Table context the provide various builder elements with needed information / current table state.

Prefer useTableContext

Defined in

TableProvider.tsx:261


tableCellLookups

Const tableCellLookups: TableCellLookup

Defined in

configureTableCells.tsx:15

Functions

BuilderComponentHelper

BuilderComponentHelper<ComponentName, TBaseProps, TRenderComponent, TRenderComponentProps, TConsumerCommonProps>(props): Element

Renders a builder component and ensures full assignment of passed props

Type parameters

| Name | Type | | :------ | :------ | | ComponentName | extends string | | TBaseProps | TBaseProps | | TRenderComponent | extends ElementType | | TRenderComponentProps | ComponentPropsWithRef<TRenderComponent> | | TConsumerCommonProps | unknown |

Parameters

| Name | Type | | :------ | :------ | | props | { [P in string]: PartialInheritance<TBaseProps, TRenderComponent, TRenderComponentProps, TConsumerCommonProps> } & Omit<TRenderComponentProps, keyof TBaseProps> & TConsumerCommonProps & TBaseProps & { componentName: ComponentName } |

Returns

Element

Defined in

Builders.tsx:110


Cell

Cell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | CellProps |

Returns

Element

Defined in

Cells/Cell.tsx:11


CommaSeparatedCell

CommaSeparatedCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | CommaSeparatedCellProps |

Returns

Element

Defined in

Cells/CommaSeparatedCell.tsx:8


DateCell

DateCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | DateCellProps |

Returns

Element

Defined in

Cells/DateCell.tsx:12


DateTimeZoneCell

DateTimeZoneCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | DateTimeZoneCellProps |

Returns

Element

Defined in

Cells/DateTimeZoneCell.tsx:37


DollarCell

DollarCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | DollarCellProps |

Returns

Element

Defined in

Cells/DollarCell.tsx:14


FormattedPhoneNumberCell

FormattedPhoneNumberCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | FormattedPhoneNumberCellProps |

Returns

Element

Defined in

Cells/FormattedPhoneNumberCell.tsx:9


NaCell

NaCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | NaCellProps |

Returns

Element

Defined in

Cells/NaCell.tsx:12


NaDateCell

NaDateCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | NaDateCellProps |

Returns

Element

Defined in

Cells/NaDateCell.tsx:8


NaDateTimeZoneCell

NaDateTimeZoneCell(«destructured»): Element

Parameters

| Name | Type | | :------ | :------ | | «destructured» | NaDateTimeZoneCellProps |

Returns

Element

Defined in

Cells/NaDateTimeZoneCell.tsx:9


RenderCell

RenderCell<TSource, TRow, TParams, TData>(«destructured»): null | Element

Generally used internally to render a particular cell type for a particular row in a table

In the standard case, this is setup by the SingleColumnBuilder and then actually rendered by a TanstackTableCell

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Parameters

| Name | Type | | :------ | :------ | | «destructured» | RenderCellProps<TSource, TRow, TParams, TData> |

Returns

null | Element

Defined in

Cells/RenderCell.tsx:36


RenderFooter

RenderFooter<TSource, TRow, TParams, TData>(«destructured»): null | Element

Type parameters

| Name | Type | | :------ | :------ | | TSource | extends DataSource<TRow, TParams, TData> | | TRow | GetRowType<TSource> | | TParams | GetParamType<TSource> | | TData | GetServiceResultType<TSource> |

Parameters

| Name | Type | | :------ | :------ | | «destructured» | RenderFooterProps<TSource, TRow, TParams, TData> |

Returns

null | Element

Defined in

Footers/RenderFooter.tsx:21