@scbt-ecom/ui 0.107.0 → 0.107.1
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/dist/lib/shared/ui/dropdownList/DropdownList.js +1 -1
- package/dist/lib/shared/ui/dropdownList/DropdownList.js.map +1 -1
- package/dist/lib/shared/ui/formElements/uncontrolled/combobox/combobox.js.map +1 -1
- package/dist/lib/shared/ui/table/Table.js +1 -1
- package/dist/lib/shared/ui/table/Table.js.map +1 -1
- package/dist/lib/widgets/table/Table.js +1 -1
- package/dist/lib/widgets/table/Table.js.map +1 -1
- package/dist/lib/widgets/table/model/index.js +2 -0
- package/dist/lib/widgets/table/model/index.js.map +1 -0
- package/dist/lib/widgets/table/model/types.js +2 -0
- package/dist/lib/widgets/table/model/types.js.map +1 -0
- package/dist/lib/widgets/table/model/utils.js +2 -0
- package/dist/lib/widgets/table/model/utils.js.map +1 -0
- package/dist/stats.html +1 -1
- package/dist/types/lib/shared/ui/table/Table.d.ts +1 -1
- package/dist/types/lib/widgets/table/Table.d.ts +2 -21
- package/dist/types/lib/widgets/table/index.d.ts +1 -0
- package/dist/types/lib/widgets/table/model/index.d.ts +2 -0
- package/dist/types/lib/widgets/table/model/types.d.ts +35 -0
- package/dist/types/lib/widgets/table/model/utils.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DataTableProps } from './model';
|
|
2
|
-
export declare const DataTable: <TData extends {}>({ columns, data, enableHeaders, mode, classes, pagination, empty, pageSize }: DataTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const DataTable: <TData extends {}>({ columns, data, enableHeaders, mode, classes, pagination, empty, horizontal, pageSize }: DataTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { DataTableClasses } from '../../../shared/ui/table/model/types';
|
|
4
|
-
export type TableClasses = {
|
|
5
|
-
root?: string;
|
|
6
|
-
container?: string;
|
|
7
|
-
textContainer?: string;
|
|
8
|
-
title?: string;
|
|
9
|
-
subtitle?: string;
|
|
10
|
-
tableContainer?: string;
|
|
11
|
-
helperText?: string;
|
|
12
|
-
tableClasses?: DataTableClasses;
|
|
13
|
-
};
|
|
14
|
-
export interface TableProps<TData extends {}> extends Omit<DataTableProps<TData>, 'classes'> {
|
|
15
|
-
title: ReactElement | string;
|
|
16
|
-
subtitle: ReactElement | string;
|
|
17
|
-
helperText: ReactElement | string;
|
|
18
|
-
horizontal?: boolean;
|
|
19
|
-
classes?: TableClasses;
|
|
20
|
-
}
|
|
21
|
-
export declare const Table: <TData extends {}>(props: TableProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { TableProps } from './model';
|
|
2
|
+
export declare const Table: <Key extends string, TData extends Record<Key, unknown>>(props: TableProps<Key, TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BuiltInSortingFn } from '@tanstack/react-table';
|
|
2
|
+
export type ColumnDefinition<Key extends string> = {
|
|
3
|
+
title: Key;
|
|
4
|
+
visibleTitle?: string;
|
|
5
|
+
enableSorting: boolean;
|
|
6
|
+
sortingFn: BuiltInSortingFn;
|
|
7
|
+
};
|
|
8
|
+
type OrientationEnabled = {
|
|
9
|
+
type: 'true';
|
|
10
|
+
};
|
|
11
|
+
type OrientationDisabled = {
|
|
12
|
+
type: 'false';
|
|
13
|
+
};
|
|
14
|
+
type OrientationCondition = {
|
|
15
|
+
type: 'condition';
|
|
16
|
+
condition: '<' | '<=' | '===' | '!==' | '>' | '>=';
|
|
17
|
+
operand: {
|
|
18
|
+
left: string;
|
|
19
|
+
right: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type OrientationOptions = OrientationEnabled | OrientationDisabled | OrientationCondition;
|
|
23
|
+
export interface TableProps<Key extends string, TData extends Record<Key, unknown>> {
|
|
24
|
+
title: string;
|
|
25
|
+
subtitle: string;
|
|
26
|
+
columns: ColumnDefinition<Key>[];
|
|
27
|
+
data: TData[];
|
|
28
|
+
enableHeaders: boolean;
|
|
29
|
+
helperText?: string;
|
|
30
|
+
horizontal: OrientationOptions;
|
|
31
|
+
mode: 'solid' | 'odd';
|
|
32
|
+
pagination: boolean;
|
|
33
|
+
pageSize?: number;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HeaderContext, SortingFnOption } from '@tanstack/react-table';
|
|
2
|
+
import { ColumnDefinition, OrientationOptions } from './types';
|
|
3
|
+
export declare const getHeaderAccessors: <Key extends string, TData extends Record<Key, unknown>>(columns: ColumnDefinition<Key>[]) => {
|
|
4
|
+
accessors: Record<keyof TData, (key: keyof TData, headerContext: HeaderContext<TData, TData[keyof TData]>) => React.ReactNode>;
|
|
5
|
+
sortingColumns: Key[];
|
|
6
|
+
sortingFn: Partial<Record<keyof TData, SortingFnOption<TData>>>;
|
|
7
|
+
};
|
|
8
|
+
export declare const isHorizontalTable: (orientation: OrientationOptions) => boolean;
|