ehscan-react-table 0.0.34 → 0.0.36
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.
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
type ClickRowArgs = {
|
|
3
|
+
id: string | number;
|
|
4
|
+
col: string | number;
|
|
5
|
+
type: 'duedate';
|
|
6
|
+
e: React.MouseEvent<HTMLDivElement>;
|
|
7
|
+
};
|
|
2
8
|
type Props = {
|
|
3
9
|
content: string;
|
|
4
10
|
id: string | number;
|
|
5
11
|
col: string | number;
|
|
6
12
|
small?: boolean;
|
|
7
|
-
clickRow: (args:
|
|
8
|
-
id: string | number;
|
|
9
|
-
col: string | number;
|
|
10
|
-
type: 'default';
|
|
11
|
-
}) => void;
|
|
13
|
+
clickRow: (args: ClickRowArgs) => void;
|
|
12
14
|
};
|
|
13
15
|
export declare const TableCellDueDate: React.FC<Props>;
|
|
14
16
|
export {};
|
|
@@ -8,5 +8,5 @@ export const TableCellDueDate = ({ content, id, col, small, clickRow }) => {
|
|
|
8
8
|
? '-'
|
|
9
9
|
: _jsx("span", { className: `${styles.dateTag} ${styles[calcDateDiff(valDate)]}${small ? ` ${styles.dateTagSmall}` : ''}`, children: small ? '' : formatToDDMMYYYY(valDate) });
|
|
10
10
|
};
|
|
11
|
-
return (_jsx("div", { className: styles.dueDateColWrapper, onClick: () => clickRow({ id, col, type: '
|
|
11
|
+
return (_jsx("div", { className: styles.dueDateColWrapper, onClick: (e) => clickRow({ id, col, type: 'duedate', e }), children: _jsx(DateContent, { value: content }) }));
|
|
12
12
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
type ClickRowArgs = {
|
|
3
|
+
id: string | number;
|
|
4
|
+
col: string | number;
|
|
5
|
+
type: 'default';
|
|
6
|
+
e: React.MouseEvent<HTMLDivElement>;
|
|
7
|
+
};
|
|
2
8
|
type TableDefCellProps = {
|
|
3
9
|
content: ReactNode;
|
|
4
10
|
id: string | number;
|
|
5
11
|
col: string | number;
|
|
6
12
|
small?: boolean;
|
|
7
|
-
clickRow: (args:
|
|
8
|
-
id: string | number;
|
|
9
|
-
col: string | number;
|
|
10
|
-
type: 'default';
|
|
11
|
-
}) => void;
|
|
13
|
+
clickRow: (args: ClickRowArgs) => void;
|
|
12
14
|
};
|
|
13
15
|
export declare const TableDefCell: React.FC<TableDefCellProps>;
|
|
14
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export const TableDefCell = ({ content, id, col, small, clickRow }) => {
|
|
3
|
-
return (_jsxs("div", { onClick: () => clickRow({ id, col, type: 'default' }), children: [small ? 'Small' : '', " ", content] }));
|
|
3
|
+
return (_jsxs("div", { onClick: (e) => clickRow({ id, col, type: 'default', e }), children: [small ? 'Small' : '', " ", content] }));
|
|
4
4
|
};
|