@trackunit/react-table 2.1.44-alpha-6a85feaada3.0 → 2.1.44
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 +13 -0
- package/index.esm.js +14 -2
- package/package.json +9 -9
- package/src/types.d.ts +16 -0
package/index.cjs.js
CHANGED
|
@@ -1380,6 +1380,18 @@ const cvaTd = cssClassVarianceUtilities.cvaMerge(["relative"], {
|
|
|
1380
1380
|
},
|
|
1381
1381
|
});
|
|
1382
1382
|
|
|
1383
|
+
/**
|
|
1384
|
+
* Events — each with a name, and eventType.
|
|
1385
|
+
* Adding a Description is encouraged.
|
|
1386
|
+
* Each entry must be made with createEvent to get typed events
|
|
1387
|
+
*
|
|
1388
|
+
* Pass an event type to createEvent to specify the interface e.g. specify
|
|
1389
|
+
* which properties are required/recommended when using logEvent() on said event
|
|
1390
|
+
*/
|
|
1391
|
+
const TableEvents = {
|
|
1392
|
+
Table: irisAppRuntimeCoreApi.createEvent({}),
|
|
1393
|
+
};
|
|
1394
|
+
|
|
1383
1395
|
/**
|
|
1384
1396
|
* Creates and returns a memoized instance of a columnHelper
|
|
1385
1397
|
*/
|
|
@@ -1757,6 +1769,7 @@ exports.ColumnFilter = ColumnFilter;
|
|
|
1757
1769
|
exports.SelectAllBanner = SelectAllBanner;
|
|
1758
1770
|
exports.Sorting = Sorting;
|
|
1759
1771
|
exports.Table = Table;
|
|
1772
|
+
exports.TableEvents = TableEvents;
|
|
1760
1773
|
exports.fromTUSortToTanStack = fromTUSortToTanStack;
|
|
1761
1774
|
exports.fromTanStackToTUSort = fromTanStackToTUSort;
|
|
1762
1775
|
exports.useColumnHelper = useColumnHelper;
|
package/index.esm.js
CHANGED
|
@@ -13,7 +13,7 @@ import { flexRender, createColumnHelper, defaultColumnSizing, useReactTable, get
|
|
|
13
13
|
export { createColumnHelper } from '@tanstack/react-table';
|
|
14
14
|
import { TableRoot, Thead, Tr, Th, ResizeHandle, Tbody, Td } from '@trackunit/react-table-base-components';
|
|
15
15
|
import { twMerge } from 'tailwind-merge';
|
|
16
|
-
import { SortOrder, validateStringAsAssetSortByProperty } from '@trackunit/iris-app-runtime-core-api';
|
|
16
|
+
import { createEvent, SortOrder, validateStringAsAssetSortByProperty } from '@trackunit/iris-app-runtime-core-api';
|
|
17
17
|
|
|
18
18
|
var defaultTranslations = {
|
|
19
19
|
"layout.actions.reset": "Reset",
|
|
@@ -1379,6 +1379,18 @@ const cvaTd = cvaMerge(["relative"], {
|
|
|
1379
1379
|
},
|
|
1380
1380
|
});
|
|
1381
1381
|
|
|
1382
|
+
/**
|
|
1383
|
+
* Events — each with a name, and eventType.
|
|
1384
|
+
* Adding a Description is encouraged.
|
|
1385
|
+
* Each entry must be made with createEvent to get typed events
|
|
1386
|
+
*
|
|
1387
|
+
* Pass an event type to createEvent to specify the interface e.g. specify
|
|
1388
|
+
* which properties are required/recommended when using logEvent() on said event
|
|
1389
|
+
*/
|
|
1390
|
+
const TableEvents = {
|
|
1391
|
+
Table: createEvent({}),
|
|
1392
|
+
};
|
|
1393
|
+
|
|
1382
1394
|
/**
|
|
1383
1395
|
* Creates and returns a memoized instance of a columnHelper
|
|
1384
1396
|
*/
|
|
@@ -1747,4 +1759,4 @@ const fromTanStackToTUSort = (input) => {
|
|
|
1747
1759
|
*/
|
|
1748
1760
|
setupLibraryTranslations();
|
|
1749
1761
|
|
|
1750
|
-
export { ActionSheet, ColumnFilter, SelectAllBanner, Sorting, Table, fromTUSortToTanStack, fromTanStackToTUSort, useColumnHelper, useTable, useTableSelection };
|
|
1762
|
+
export { ActionSheet, ColumnFilter, SelectAllBanner, Sorting, Table, TableEvents, fromTUSortToTanStack, fromTanStackToTUSort, useColumnHelper, useTable, useTableSelection };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table",
|
|
3
|
-
"version": "2.1.44
|
|
3
|
+
"version": "2.1.44",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"react-dnd": "16.0.1",
|
|
12
12
|
"react-dnd-html5-backend": "16.0.1",
|
|
13
13
|
"tailwind-merge": "^2.0.0",
|
|
14
|
-
"@trackunit/react-components": "2.1.40
|
|
15
|
-
"@trackunit/shared-utils": "1.15.
|
|
16
|
-
"@trackunit/css-class-variance-utilities": "1.13.
|
|
17
|
-
"@trackunit/ui-icons": "1.13.
|
|
18
|
-
"@trackunit/react-table-base-components": "2.1.43
|
|
19
|
-
"@trackunit/react-form-components": "2.1.42
|
|
20
|
-
"@trackunit/i18n-library-translation": "2.0.41
|
|
21
|
-
"@trackunit/iris-app-runtime-core-api": "1.16.48
|
|
14
|
+
"@trackunit/react-components": "2.1.40",
|
|
15
|
+
"@trackunit/shared-utils": "1.15.43",
|
|
16
|
+
"@trackunit/css-class-variance-utilities": "1.13.43",
|
|
17
|
+
"@trackunit/ui-icons": "1.13.45",
|
|
18
|
+
"@trackunit/react-table-base-components": "2.1.43",
|
|
19
|
+
"@trackunit/react-form-components": "2.1.42",
|
|
20
|
+
"@trackunit/i18n-library-translation": "2.0.41",
|
|
21
|
+
"@trackunit/iris-app-runtime-core-api": "1.16.48"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@tanstack/react-router": "^1.114.29",
|
package/src/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RowData } from "@tanstack/react-table";
|
|
2
|
+
import { BaseEvent } from "@trackunit/iris-app-runtime-core-api";
|
|
2
3
|
import { DateTimeFormatType, Maybe } from "@trackunit/shared-utils";
|
|
3
4
|
import type { DocumentNode } from "graphql";
|
|
4
5
|
export { createColumnHelper, type ColumnDef, type VisibilityState } from "@tanstack/react-table";
|
|
@@ -76,3 +77,18 @@ declare module "@tanstack/react-table" {
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
export type Alignment = "left" | "center" | "right";
|
|
80
|
+
interface TableEvent extends BaseEvent {
|
|
81
|
+
tableName: string;
|
|
82
|
+
type: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Events — each with a name, and eventType.
|
|
86
|
+
* Adding a Description is encouraged.
|
|
87
|
+
* Each entry must be made with createEvent to get typed events
|
|
88
|
+
*
|
|
89
|
+
* Pass an event type to createEvent to specify the interface e.g. specify
|
|
90
|
+
* which properties are required/recommended when using logEvent() on said event
|
|
91
|
+
*/
|
|
92
|
+
export declare const TableEvents: {
|
|
93
|
+
Table: import("@trackunit/iris-app-runtime-core-api").Event<TableEvent>;
|
|
94
|
+
};
|