@trackunit/react-table-helpers 1.14.46 → 1.15.0
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/index.cjs.js +2 -1
- package/index.esm.js +2 -1
- package/package.json +13 -13
- package/src/ExportTableButton/ExportTableButton.d.ts +2 -1
package/index.cjs.js
CHANGED
|
@@ -61,7 +61,7 @@ const setupLibraryTranslations = () => {
|
|
|
61
61
|
/**
|
|
62
62
|
* This component is used to export the table data to an Excel file.
|
|
63
63
|
*/
|
|
64
|
-
const ExportTableButton = ({ columnVisibility, rowCount, allTableColumns, variables, document, name, headers, }) => {
|
|
64
|
+
const ExportTableButton = ({ columnVisibility, rowCount, allTableColumns, variables, document, name, headers, onExport, }) => {
|
|
65
65
|
const [t] = useTranslation();
|
|
66
66
|
const { exportData } = reactCoreHooks.useExportDataContext();
|
|
67
67
|
const exportColumns = react.useMemo(() => {
|
|
@@ -99,6 +99,7 @@ const ExportTableButton = ({ columnVisibility, rowCount, allTableColumns, variab
|
|
|
99
99
|
return null;
|
|
100
100
|
}
|
|
101
101
|
return (jsxRuntime.jsx(reactComponents.Button, { "data-testid": "export-table-button", disabled: rowCount === 0, onClick: () => {
|
|
102
|
+
onExport?.();
|
|
102
103
|
void exportData({
|
|
103
104
|
document,
|
|
104
105
|
variables: variables,
|
package/index.esm.js
CHANGED
|
@@ -59,7 +59,7 @@ const setupLibraryTranslations = () => {
|
|
|
59
59
|
/**
|
|
60
60
|
* This component is used to export the table data to an Excel file.
|
|
61
61
|
*/
|
|
62
|
-
const ExportTableButton = ({ columnVisibility, rowCount, allTableColumns, variables, document, name, headers, }) => {
|
|
62
|
+
const ExportTableButton = ({ columnVisibility, rowCount, allTableColumns, variables, document, name, headers, onExport, }) => {
|
|
63
63
|
const [t] = useTranslation();
|
|
64
64
|
const { exportData } = useExportDataContext();
|
|
65
65
|
const exportColumns = useMemo(() => {
|
|
@@ -97,6 +97,7 @@ const ExportTableButton = ({ columnVisibility, rowCount, allTableColumns, variab
|
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
99
99
|
return (jsx(Button, { "data-testid": "export-table-button", disabled: rowCount === 0, onClick: () => {
|
|
100
|
+
onExport?.();
|
|
100
101
|
void exportData({
|
|
101
102
|
document,
|
|
102
103
|
variables: variables,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table-helpers",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/filters-filter-bar": "1.14.
|
|
12
|
-
"@trackunit/filters-graphql-hook": "1.17.
|
|
13
|
-
"@trackunit/i18n-library-translation": "1.12.
|
|
14
|
-
"@trackunit/custom-field-components": "1.13.
|
|
15
|
-
"@trackunit/iris-app-runtime-core": "1.13.
|
|
16
|
-
"@trackunit/iris-app-runtime-core-api": "1.12.
|
|
17
|
-
"@trackunit/react-table-base-components": "1.13.
|
|
18
|
-
"@trackunit/react-table": "1.13.
|
|
11
|
+
"@trackunit/filters-filter-bar": "1.14.43",
|
|
12
|
+
"@trackunit/filters-graphql-hook": "1.17.44",
|
|
13
|
+
"@trackunit/i18n-library-translation": "1.12.35",
|
|
14
|
+
"@trackunit/custom-field-components": "1.13.43",
|
|
15
|
+
"@trackunit/iris-app-runtime-core": "1.13.32",
|
|
16
|
+
"@trackunit/iris-app-runtime-core-api": "1.12.30",
|
|
17
|
+
"@trackunit/react-table-base-components": "1.13.37",
|
|
18
|
+
"@trackunit/react-table": "1.13.38",
|
|
19
19
|
"@js-temporal/polyfill": "^0.5.1",
|
|
20
20
|
"@tanstack/react-table": "^8.20.6",
|
|
21
|
-
"@trackunit/react-components": "1.17.
|
|
22
|
-
"@trackunit/react-core-hooks": "1.12.
|
|
23
|
-
"@trackunit/react-graphql-hooks": "1.14.
|
|
24
|
-
"@trackunit/iris-app-api": "1.14.
|
|
21
|
+
"@trackunit/react-components": "1.17.34",
|
|
22
|
+
"@trackunit/react-core-hooks": "1.12.34",
|
|
23
|
+
"@trackunit/react-graphql-hooks": "1.14.37",
|
|
24
|
+
"@trackunit/iris-app-api": "1.14.50",
|
|
25
25
|
"@graphql-codegen/cli": "^5.0.3",
|
|
26
26
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
27
27
|
"graphql": "^16.10.0"
|
|
@@ -9,9 +9,10 @@ interface ExportTableButtonProps<TData, TVariables> {
|
|
|
9
9
|
rowCount: number;
|
|
10
10
|
name: string;
|
|
11
11
|
headers?: Record<string, string>;
|
|
12
|
+
onExport?: () => void;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* This component is used to export the table data to an Excel file.
|
|
15
16
|
*/
|
|
16
|
-
export declare const ExportTableButton: <TData, TVariables>({ columnVisibility, rowCount, allTableColumns, variables, document, name, headers, }: ExportTableButtonProps<TData, TVariables>) => ReactElement | null;
|
|
17
|
+
export declare const ExportTableButton: <TData, TVariables>({ columnVisibility, rowCount, allTableColumns, variables, document, name, headers, onExport, }: ExportTableButtonProps<TData, TVariables>) => ReactElement | null;
|
|
17
18
|
export {};
|