vue-chrts 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/components/Base/Area/AreaChart.vue.d.ts +36 -0
- package/dist/components/Base/Area/index.d.ts +3 -0
- package/dist/components/Base/AreaStacked/AreaStackedChart.vue.d.ts +17 -0
- package/dist/components/Base/AreaStacked/index.d.ts +3 -0
- package/dist/components/Base/Bar/BarChart.vue.d.ts +29 -0
- package/dist/components/Base/Bar/index.d.ts +3 -0
- package/dist/components/Base/Crosshair.vue.d.ts +38 -0
- package/dist/components/Base/Donut/DonutChart.vue.d.ts +40 -0
- package/dist/components/Base/Donut/index.d.ts +3 -0
- package/dist/components/Base/Line/LineChart.vue.d.ts +27 -0
- package/dist/components/Base/Line/index.d.ts +4 -0
- package/dist/components/Base/Line/types.d.ts +4 -0
- package/dist/components/Base/Progress.vue.d.ts +19 -0
- package/dist/components/Base/Status.vue.d.ts +2 -0
- package/dist/components/Base/Tooltip.vue.d.ts +17 -0
- package/dist/components/Base/index.d.ts +10 -0
- package/dist/components/Elements/Table/Table.d.ts +56 -0
- package/dist/index.js +9546 -0
- package/dist/index.umd.cjs +468 -0
- package/dist/main.d.ts +3 -0
- package/dist/vite.svg +1 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BulletLegendItemInterface, CurveType } from '@unovis/ts';
|
|
2
|
+
import { PaginationPosition } from '..';
|
|
3
|
+
|
|
4
|
+
declare const _default: <T>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps, never>) & {
|
|
6
|
+
data: T[];
|
|
7
|
+
height: number;
|
|
8
|
+
xLabel?: string;
|
|
9
|
+
yLabel?: string;
|
|
10
|
+
categories: Record<string, BulletLegendItemInterface>;
|
|
11
|
+
xFormatter: (i: number, idx: number) => string;
|
|
12
|
+
yFormatter?: (i: number, idx?: number) => string | number;
|
|
13
|
+
curveType?: CurveType;
|
|
14
|
+
xNumTicks?: number;
|
|
15
|
+
yNumTicks?: number;
|
|
16
|
+
hideLegend?: boolean;
|
|
17
|
+
hideTooltip?: boolean;
|
|
18
|
+
gridLineX?: boolean;
|
|
19
|
+
domainLineX?: boolean;
|
|
20
|
+
gridLineY?: boolean;
|
|
21
|
+
domainLineY?: boolean;
|
|
22
|
+
paginationPoisition?: PaginationPosition;
|
|
23
|
+
}, keyof import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps | keyof import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps>> & {} & (import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps);
|
|
24
|
+
expose(exposed: import('../../../../vue/dist/vue.esm-bundler.js').ShallowUnwrapRef<{}>): void;
|
|
25
|
+
attrs: any;
|
|
26
|
+
slots: ReturnType<() => {}>;
|
|
27
|
+
emit: typeof __VLS_emit;
|
|
28
|
+
}>) => import('../../../../vue/dist/vue.esm-bundler.js').VNode<import('../../../../vue/dist/vue.esm-bundler.js').RendererNode, import('../../../../vue/dist/vue.esm-bundler.js').RendererElement, {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}> & {
|
|
31
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_Prettify<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BulletLegendItemInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
declare const _default: <T>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps, never>) & {
|
|
5
|
+
data: T[];
|
|
6
|
+
categories: Record<string, BulletLegendItemInterface>;
|
|
7
|
+
}, keyof import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps | keyof import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps>> & {} & (import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps);
|
|
8
|
+
expose(exposed: import('../../../../vue/dist/vue.esm-bundler.js').ShallowUnwrapRef<{}>): void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: ReturnType<() => {}>;
|
|
11
|
+
emit: typeof __VLS_emit;
|
|
12
|
+
}>) => import('../../../../vue/dist/vue.esm-bundler.js').VNode<import('../../../../vue/dist/vue.esm-bundler.js').RendererNode, import('../../../../vue/dist/vue.esm-bundler.js').RendererElement, {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}> & {
|
|
15
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BulletLegendItemInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
declare const _default: <T>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps, never>) & {
|
|
5
|
+
data: T[];
|
|
6
|
+
height: number;
|
|
7
|
+
xLabel?: string;
|
|
8
|
+
yLabel?: string;
|
|
9
|
+
categories: Record<string, BulletLegendItemInterface>;
|
|
10
|
+
xFormatter: (i: number, idx: number) => string;
|
|
11
|
+
yFormatter?: (i: number, idx?: number) => string | number;
|
|
12
|
+
yNumTicks?: number;
|
|
13
|
+
xNumTicks?: number;
|
|
14
|
+
yAxis: string[];
|
|
15
|
+
groupPadding?: number;
|
|
16
|
+
barPadding?: number;
|
|
17
|
+
radius?: number;
|
|
18
|
+
hideLegend?: boolean;
|
|
19
|
+
}, keyof import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps | keyof import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps>> & {} & (import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps);
|
|
20
|
+
expose(exposed: import('../../../../vue/dist/vue.esm-bundler.js').ShallowUnwrapRef<{}>): void;
|
|
21
|
+
attrs: any;
|
|
22
|
+
slots: ReturnType<() => {}>;
|
|
23
|
+
emit: typeof __VLS_emit;
|
|
24
|
+
}>) => import('../../../../vue/dist/vue.esm-bundler.js').VNode<import('../../../../vue/dist/vue.esm-bundler.js').RendererNode, import('../../../../vue/dist/vue.esm-bundler.js').RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}> & {
|
|
27
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BulletLegendItemInterface } from '@unovis/ts';
|
|
2
|
+
import { Component } from '../../../vue/dist/vue.esm-bundler.js';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('../../../vue/dist/vue.esm-bundler.js').DefineComponent<import('../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
colors: string[];
|
|
6
|
+
index: string;
|
|
7
|
+
items: BulletLegendItemInterface[];
|
|
8
|
+
customTooltip?: Component;
|
|
9
|
+
}>, {
|
|
10
|
+
colors: () => never[];
|
|
11
|
+
}>>, {}, {}, {}, {}, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {}, string, import('../../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<import('../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
colors: string[];
|
|
13
|
+
index: string;
|
|
14
|
+
items: BulletLegendItemInterface[];
|
|
15
|
+
customTooltip?: Component;
|
|
16
|
+
}>, {
|
|
17
|
+
colors: () => never[];
|
|
18
|
+
}>>> & Readonly<{}>, {
|
|
19
|
+
colors: string[];
|
|
20
|
+
}, {}, {}, {}, string, import('../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
24
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
25
|
+
type: import('../../../vue/dist/vue.esm-bundler.js').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
26
|
+
} : {
|
|
27
|
+
type: import('../../../vue/dist/vue.esm-bundler.js').PropType<T[K]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type __VLS_WithDefaults<P, D> = {
|
|
32
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
33
|
+
default: D[K];
|
|
34
|
+
}> : P[K];
|
|
35
|
+
};
|
|
36
|
+
type __VLS_Prettify<T> = {
|
|
37
|
+
[K in keyof T]: T[K];
|
|
38
|
+
} & {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js').DefineComponent<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
type?: string;
|
|
6
|
+
data: number[];
|
|
7
|
+
height: number;
|
|
8
|
+
radius: number;
|
|
9
|
+
hidePagination?: boolean;
|
|
10
|
+
labels: {
|
|
11
|
+
name: string;
|
|
12
|
+
color: string;
|
|
13
|
+
}[];
|
|
14
|
+
}>>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
15
|
+
type?: string;
|
|
16
|
+
data: number[];
|
|
17
|
+
height: number;
|
|
18
|
+
radius: number;
|
|
19
|
+
hidePagination?: boolean;
|
|
20
|
+
labels: {
|
|
21
|
+
name: string;
|
|
22
|
+
color: string;
|
|
23
|
+
}[];
|
|
24
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
28
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
29
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
30
|
+
type: import('../../../../vue/dist/vue.esm-bundler.js').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
31
|
+
} : {
|
|
32
|
+
type: import('../../../../vue/dist/vue.esm-bundler.js').PropType<T[K]>;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BulletLegendItemInterface, CurveType } from '@unovis/ts';
|
|
2
|
+
import { PaginationPosition } from './../../Base';
|
|
3
|
+
|
|
4
|
+
declare const _default: <T>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps, never>) & {
|
|
6
|
+
data: T[];
|
|
7
|
+
height: number;
|
|
8
|
+
xLabel?: string;
|
|
9
|
+
yLabel?: string;
|
|
10
|
+
categories: Record<string, BulletLegendItemInterface>;
|
|
11
|
+
xFormatter: (i: number, idx: number) => string;
|
|
12
|
+
yFormatter?: (i: number, idx: number) => string;
|
|
13
|
+
curveType?: CurveType;
|
|
14
|
+
yNumTicks?: number;
|
|
15
|
+
xNumTicks?: number;
|
|
16
|
+
paginationPoisition?: PaginationPosition;
|
|
17
|
+
}, keyof import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps | keyof import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps>> & {} & (import('../../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps);
|
|
18
|
+
expose(exposed: import('../../../../vue/dist/vue.esm-bundler.js').ShallowUnwrapRef<{}>): void;
|
|
19
|
+
attrs: any;
|
|
20
|
+
slots: ReturnType<() => {}>;
|
|
21
|
+
emit: typeof __VLS_emit;
|
|
22
|
+
}>) => import('../../../../vue/dist/vue.esm-bundler.js').VNode<import('../../../../vue/dist/vue.esm-bundler.js').RendererNode, import('../../../../vue/dist/vue.esm-bundler.js').RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}> & {
|
|
25
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface StorageProps {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
unit?: string;
|
|
5
|
+
progress: number;
|
|
6
|
+
total: number;
|
|
7
|
+
color: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('../../../vue/dist/vue.esm-bundler.js').DefineComponent<import('../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<StorageProps>>, {}, {}, {}, {}, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {}, string, import('../../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<import('../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<StorageProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
13
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
+
type: import('../../../vue/dist/vue.esm-bundler.js').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
+
} : {
|
|
16
|
+
type: import('../../../vue/dist/vue.esm-bundler.js').PropType<T[K]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('../../../vue/dist/vue.esm-bundler.js').DefineComponent<{}, {}, {}, {}, {}, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {}, string, import('../../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BulletLegendItemInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
declare const _default: <T extends {}>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps, never>) & {
|
|
5
|
+
data: T;
|
|
6
|
+
categories: Record<string, BulletLegendItemInterface>;
|
|
7
|
+
}, keyof import('../../../vue/dist/vue.esm-bundler.js').VNodeProps | keyof import('../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps>> & {} & (import('../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps);
|
|
8
|
+
expose(exposed: import('../../../vue/dist/vue.esm-bundler.js').ShallowUnwrapRef<{}>): void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: ReturnType<() => {}>;
|
|
11
|
+
emit: typeof __VLS_emit;
|
|
12
|
+
}>) => import('../../../vue/dist/vue.esm-bundler.js').VNode<import('../../../vue/dist/vue.esm-bundler.js').RendererNode, import('../../../vue/dist/vue.esm-bundler.js').RendererElement, {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}> & {
|
|
15
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as Crosshair } from './Crosshair.vue';
|
|
2
|
+
import { default as Progress } from './Progress.vue';
|
|
3
|
+
import { default as Status } from './Status.vue';
|
|
4
|
+
import { default as Tooltip } from './Tooltip.vue';
|
|
5
|
+
export * from './Area';
|
|
6
|
+
export * from './AreaStacked';
|
|
7
|
+
export * from './Bar';
|
|
8
|
+
export * from './Donut';
|
|
9
|
+
export * from './Line';
|
|
10
|
+
export { Crosshair, Progress, Status, Tooltip };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ColumnDef, Row, CellContext } from '@tanstack/vue-table';
|
|
2
|
+
|
|
3
|
+
export declare function createTypedColumnHelper<T>(): import('@tanstack/vue-table').ColumnHelper<T>;
|
|
4
|
+
export type CellRenderer<T> = (context: CellContext<T, unknown>) => any;
|
|
5
|
+
export type HeaderRenderer<T> = (context: {
|
|
6
|
+
column: T | any;
|
|
7
|
+
}) => any;
|
|
8
|
+
export declare function createColumn<T>(options: {
|
|
9
|
+
accessorKey: keyof T | string;
|
|
10
|
+
header: string | HeaderRenderer<T>;
|
|
11
|
+
cell?: CellRenderer<T>;
|
|
12
|
+
enableSorting?: boolean;
|
|
13
|
+
enableFiltering?: boolean;
|
|
14
|
+
size?: number;
|
|
15
|
+
minSize?: number;
|
|
16
|
+
maxSize?: number;
|
|
17
|
+
meta?: Record<string, any>;
|
|
18
|
+
}): ColumnDef<T>;
|
|
19
|
+
export declare function createCustomColumn<T, TValue>(options: {
|
|
20
|
+
id: string;
|
|
21
|
+
header: string | HeaderRenderer<T>;
|
|
22
|
+
accessorFn: (row: T) => TValue;
|
|
23
|
+
cell?: CellRenderer<T>;
|
|
24
|
+
enableSorting?: boolean;
|
|
25
|
+
enableFiltering?: boolean;
|
|
26
|
+
size?: number;
|
|
27
|
+
meta?: Record<string, any>;
|
|
28
|
+
}): ColumnDef<T>;
|
|
29
|
+
export declare function createPaginationState(pageIndex?: number, pageSize?: number): {
|
|
30
|
+
pageIndex: number;
|
|
31
|
+
pageSize: number;
|
|
32
|
+
};
|
|
33
|
+
export declare function createSortingState<T>(columnId: keyof T | string, direction?: 'asc' | 'desc'): {
|
|
34
|
+
id: string;
|
|
35
|
+
desc: boolean;
|
|
36
|
+
}[];
|
|
37
|
+
export declare function getSelectedRows<T>(rows: Row<T>[], rowSelection: Record<string, boolean>): T[];
|
|
38
|
+
export interface TableConfig<T> {
|
|
39
|
+
data: T[];
|
|
40
|
+
columns: ColumnDef<T>[];
|
|
41
|
+
enableSorting?: boolean;
|
|
42
|
+
enableMultiSort?: boolean;
|
|
43
|
+
enablePagination?: boolean;
|
|
44
|
+
enableFiltering?: boolean;
|
|
45
|
+
enableRowSelection?: boolean;
|
|
46
|
+
tableSize?: 'sm' | 'md' | 'lg';
|
|
47
|
+
striped?: boolean;
|
|
48
|
+
hover?: boolean;
|
|
49
|
+
bordered?: boolean;
|
|
50
|
+
paginationPosition?: 'top' | 'bottom' | 'both' | 'none';
|
|
51
|
+
pageSizeOptions?: number[];
|
|
52
|
+
initialPageSize?: number;
|
|
53
|
+
onRowClick?: (row: Row<T>) => void;
|
|
54
|
+
getRowClass?: (row: Row<T>) => string;
|
|
55
|
+
}
|
|
56
|
+
export declare function getDefaultTableConfig<T>(): Partial<TableConfig<T>>;
|