freemium-ui 1.0.256 → 1.0.259
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/lib/index.cjs.js +4 -4
- package/lib/index.esm.js +5 -5
- package/lib/types/components/ControlledTable/ControlledTable.d.ts +40 -41
- package/lib/types/components/DatePicker/DatePicker.d.ts +14 -0
- package/lib/types/components/DatePicker/index.d.ts +1 -0
- package/lib/types/components/DateRangePicker/DateRangePicker.d.ts +16 -0
- package/lib/types/components/DateRangePicker/index.d.ts +1 -0
- package/lib/types/components/Table/Table.d.ts +41 -40
- package/package.json +1 -1
- package/.env +0 -0
- package/yarn-error.log +0 -14329
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Column, Row, ColumnInstance, Cell, TableCommonProps } from 'react-table';
|
|
2
|
+
import { Column, TableState, Row, ColumnInstance, Cell, IdType, TableCommonProps } from 'react-table';
|
|
3
3
|
import FreemiumUIThemes from '../../theme';
|
|
4
|
-
import { MenuItemProps } from '../Menu';
|
|
5
4
|
declare type ControlledTableProps = {
|
|
6
|
-
data: any[];
|
|
7
|
-
columns: Array<Column<any>>;
|
|
8
|
-
count: number;
|
|
9
|
-
pageSize: number;
|
|
10
|
-
pageIndex?: number;
|
|
11
|
-
columnOrder?: string[];
|
|
12
|
-
hiddenColumns?: string[];
|
|
13
|
-
selectedRowIds?: Record<string, boolean>;
|
|
14
|
-
setPageIndex?: (pageIndex: number) => void | React.Dispatch<React.SetStateAction<number>>;
|
|
15
|
-
setSelectedRowIds?: (selectedRowIds: Record<string, boolean>) => void | React.Dispatch<React.SetStateAction<Record<string, boolean>>>;
|
|
16
|
-
onRowClick?: (row: Row, column: ColumnInstance) => void;
|
|
17
|
-
onNextPageClick?: () => void;
|
|
18
|
-
onPreviousPageClick?: () => void;
|
|
19
|
-
rowPropGetter?: (row: Row) => TableCommonProps;
|
|
20
5
|
cellPropGetter?: (cell: Cell) => TableCommonProps;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
onSelectAllPageRows?: (checked: boolean) => void;
|
|
6
|
+
rowPropGetter?: (row: Row) => TableCommonProps;
|
|
7
|
+
onSelectAll?: (checked: boolean) => void;
|
|
24
8
|
onMenuOptionSelect?: (optionId: string, row: any) => void;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
9
|
+
onPageClick?: (pageNumber: number) => void;
|
|
10
|
+
onFirstClick?: (pageNumber?: number) => void;
|
|
11
|
+
onLastClick?: (pageNumber?: number) => void;
|
|
12
|
+
onPrevious?: (pageNumber?: number) => void;
|
|
13
|
+
onNext?: (pageNumber?: number) => void;
|
|
14
|
+
onRowSelect?: (selectedRowIds: Record<IdType<{}>, boolean>, selectedFlatRows?: Array<Row<{}>>) => void;
|
|
15
|
+
onRowClick?: (row: Row<{}>, column: ColumnInstance<{}>) => void;
|
|
16
|
+
columns?: Array<Column<{}>>;
|
|
17
|
+
hideTableHeaderOnEmpty?: boolean;
|
|
18
|
+
emptyComponent?: React.ReactNode;
|
|
19
|
+
headerComponent?: React.ReactNode;
|
|
20
|
+
loadingComponent?: React.ReactNode;
|
|
21
|
+
filterComponent?: React.ReactNode;
|
|
22
|
+
data?: any[];
|
|
23
|
+
next?: string | boolean;
|
|
24
|
+
previous?: string | boolean;
|
|
25
|
+
count?: number;
|
|
36
26
|
indeterminateCount?: boolean;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
27
|
+
perPage?: number;
|
|
28
|
+
pageNumber?: number;
|
|
29
|
+
sortable?: boolean;
|
|
30
|
+
showSelectAllInTable?: boolean;
|
|
31
|
+
showSelections?: boolean;
|
|
32
|
+
showFilters?: boolean;
|
|
33
|
+
showActions?: boolean;
|
|
34
|
+
showOptions?: boolean;
|
|
35
|
+
showTopPagination?: boolean;
|
|
36
|
+
showBottomPagination?: boolean;
|
|
37
|
+
name?: string;
|
|
38
|
+
id?: string;
|
|
39
|
+
rowMenuOptions?: (rowData?: any) => any[];
|
|
40
|
+
paginationOptions?: Array<number>;
|
|
48
41
|
theme?: FreemiumUIThemes;
|
|
42
|
+
initialState?: {
|
|
43
|
+
selectedRowIds?: Record<string, boolean>;
|
|
44
|
+
hiddenColumns?: string[];
|
|
45
|
+
columnOrder?: string[];
|
|
46
|
+
};
|
|
47
|
+
state?: Partial<TableState>;
|
|
49
48
|
};
|
|
50
49
|
export declare const ControlledTable: (props: ControlledTableProps) => JSX.Element;
|
|
51
50
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import 'react-dates/initialize';
|
|
3
|
+
declare type DateRangePickerProps = {
|
|
4
|
+
anchorDirection?: 'right' | 'left';
|
|
5
|
+
initialDate?: number;
|
|
6
|
+
onDateChange: (arg0: any) => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
minMonths?: number;
|
|
9
|
+
autoFocus?: any;
|
|
10
|
+
autoFocusEndDate?: boolean;
|
|
11
|
+
minimumNights?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const DatePicker: (props: DateRangePickerProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DatePicker';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import 'react-dates/initialize';
|
|
3
|
+
import 'react-dates/lib/css/_datepicker.css';
|
|
4
|
+
declare type DateRangePickerProps = {
|
|
5
|
+
anchorDirection?: 'right' | 'left';
|
|
6
|
+
initialStartDate?: number;
|
|
7
|
+
initialEndDate?: number;
|
|
8
|
+
onRangeSelected: (arg0: any) => void;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
minMonths?: number;
|
|
11
|
+
autoFocus?: any;
|
|
12
|
+
autoFocusEndDate?: boolean;
|
|
13
|
+
minimumNights?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function DateRangePicker(props: DateRangePickerProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DateRangePicker';
|
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Column,
|
|
2
|
+
import { Column, Row, ColumnInstance, Cell, TableCommonProps } from 'react-table';
|
|
3
3
|
import FreemiumUIThemes from '../../theme';
|
|
4
|
+
import { MenuItemProps } from '../Menu';
|
|
4
5
|
declare type TableProps = {
|
|
5
|
-
|
|
6
|
+
data: any[];
|
|
7
|
+
columns: Array<Column<any>>;
|
|
8
|
+
count: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
pageIndex?: number;
|
|
11
|
+
columnOrder?: string[];
|
|
12
|
+
hiddenColumns?: string[];
|
|
13
|
+
selectedRowIds?: Record<string, boolean>;
|
|
14
|
+
setPageIndex?: (pageIndex: number) => void | React.Dispatch<React.SetStateAction<number>>;
|
|
15
|
+
setSelectedRowIds?: (selectedRowIds: Record<string, boolean>) => void | React.Dispatch<React.SetStateAction<Record<string, boolean>>>;
|
|
16
|
+
onRowClick?: (row: Row, column: ColumnInstance) => void;
|
|
17
|
+
onNextPageClick?: () => void;
|
|
18
|
+
onPreviousPageClick?: () => void;
|
|
6
19
|
rowPropGetter?: (row: Row) => TableCommonProps;
|
|
7
|
-
|
|
20
|
+
cellPropGetter?: (cell: Cell) => TableCommonProps;
|
|
21
|
+
rowMenuOptions?: (rowData?: any) => MenuItemProps[];
|
|
22
|
+
onSelectAllRows?: (checked: boolean) => void;
|
|
23
|
+
onSelectAllPageRows?: (checked: boolean) => void;
|
|
8
24
|
onMenuOptionSelect?: (optionId: string, row: any) => void;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
loadingComponent?: React.ReactNode;
|
|
21
|
-
filterComponent?: React.ReactNode;
|
|
22
|
-
data?: any[];
|
|
23
|
-
next?: string | boolean;
|
|
24
|
-
previous?: string | boolean;
|
|
25
|
-
count?: number;
|
|
25
|
+
enableNextPage?: boolean;
|
|
26
|
+
enablePreviousPage?: boolean;
|
|
27
|
+
autoReset?: boolean;
|
|
28
|
+
isLoading?: boolean;
|
|
29
|
+
isFetching?: boolean;
|
|
30
|
+
hideActions?: boolean;
|
|
31
|
+
hideFilters?: boolean;
|
|
32
|
+
hideTableOnEmpty?: boolean;
|
|
33
|
+
disableRowSelect?: boolean;
|
|
34
|
+
hideTopPagination?: boolean;
|
|
35
|
+
showTableOnLoading?: boolean;
|
|
26
36
|
indeterminateCount?: boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
id?: string;
|
|
39
|
-
rowMenuOptions?: (rowData?: any) => any[];
|
|
40
|
-
paginationOptions?: Array<number>;
|
|
37
|
+
hideSelectAllInTable?: boolean;
|
|
38
|
+
hideBottomPagination?: boolean;
|
|
39
|
+
hideLoaderOnTopPagination?: boolean;
|
|
40
|
+
dataKey?: string;
|
|
41
|
+
loaderStyles?: React.CSSProperties;
|
|
42
|
+
selectAllPageText?: string;
|
|
43
|
+
tableSelectAllBehaviour?: 'ALL_ROWS' | 'CURRENT_PAGE_ROWS';
|
|
44
|
+
filterComponent?: React.ReactElement;
|
|
45
|
+
headerComponent?: React.ReactElement;
|
|
46
|
+
emptyComponent?: React.ReactElement;
|
|
47
|
+
loadingComponent?: React.ReactElement;
|
|
41
48
|
theme?: FreemiumUIThemes;
|
|
42
|
-
initialState?: {
|
|
43
|
-
selectedRowIds?: Record<string, boolean>;
|
|
44
|
-
hiddenColumns?: string[];
|
|
45
|
-
columnOrder?: string[];
|
|
46
|
-
};
|
|
47
|
-
state?: Partial<TableState>;
|
|
48
49
|
};
|
|
49
50
|
export declare const Table: (props: TableProps) => JSX.Element;
|
|
50
51
|
export {};
|
package/package.json
CHANGED
package/.env
DELETED
|
File without changes
|