@trackunit/react-table 2.1.64 → 2.1.65
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 +12 -11
- package/index.esm.js +13 -12
- package/migrations/entry.js.map +1 -0
- package/package.json +3 -3
- package/src/ActionSheet/ActionIcon.d.ts +15 -0
- package/src/ActionSheet/ActionSheetElementUtils.d.ts +0 -12
package/index.cjs.js
CHANGED
|
@@ -165,6 +165,18 @@ const cvaMoreContainer = cssClassVarianceUtilities.cvaMerge([
|
|
|
165
165
|
},
|
|
166
166
|
});
|
|
167
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Renders the icon for an action button.
|
|
170
|
+
* Should not be used outside the ActionSheet component.
|
|
171
|
+
*
|
|
172
|
+
* @param {ActionIconProps} props - The properties for the action icon.
|
|
173
|
+
* @param {ActionModel} props.action - The action model defining what action to perform.
|
|
174
|
+
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
175
|
+
*/
|
|
176
|
+
const ActionIcon = ({ action }) => {
|
|
177
|
+
return action.icon ? (jsxRuntime.jsx(reactComponents.Icon, { color: "white", "data-testid": "action-icon", name: action.icon, ref: action.ref, size: "small", style: action.style })) : null;
|
|
178
|
+
};
|
|
179
|
+
|
|
168
180
|
/**
|
|
169
181
|
* The button to show in the ActionSheet.
|
|
170
182
|
* Should not be used outside the ActionSheet component.
|
|
@@ -216,17 +228,6 @@ const actionDataToMenuItem = (action, dataTestId) => {
|
|
|
216
228
|
* @returns {*} The ActionButton component for the given action.
|
|
217
229
|
*/
|
|
218
230
|
const actionDataToActionButton = (action) => (jsxRuntime.jsx(ActionButton, { action: action, className: "max-w-max flex-shrink-0", "data-testid": action["data-testid"] || action.id, disabled: action.loading || action.disabled, id: action.id, variant: action.disabled ? "ghost" : undefined }, action.id));
|
|
219
|
-
/**
|
|
220
|
-
* Renders the icon for an action button.
|
|
221
|
-
* Should not be used outside the ActionSheet component.
|
|
222
|
-
*
|
|
223
|
-
* @param {InnerActionButtonProps} props - The properties for the action icon.
|
|
224
|
-
* @param {ActionModel} props.action - The action model defining what action to perform.
|
|
225
|
-
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
226
|
-
*/
|
|
227
|
-
const ActionIcon = ({ action }) => {
|
|
228
|
-
return action.icon ? (jsxRuntime.jsx(reactComponents.Icon, { color: "white", "data-testid": "action-icon", name: action.icon, ref: action.ref, size: "small", style: action.style })) : null;
|
|
229
|
-
};
|
|
230
231
|
|
|
231
232
|
/**
|
|
232
233
|
* `ActionContainerAndOverflow` renders a set of actions and a MoreMenu for overflow.
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { registerTranslations, useNamespaceTranslation, NamespaceTrans } from '@trackunit/i18n-library-translation';
|
|
3
|
-
import {
|
|
3
|
+
import { Icon, MenuItem, Button, Tooltip, useOverflowItems, MoreMenu, MenuList, Spacer, usePersistedState, useDebounce, cvaInteractableItem, Text, Popover, PopoverTrigger, IconButton, PopoverContent, useBidirectionalScroll, noPagination, Card, Spinner, EmptyState } from '@trackunit/react-components';
|
|
4
4
|
import { objectValues, VISIBLE_ONLY_COLUMN_VISIBILITY_KEY, nonNullable, objectKeys, objectEntries } from '@trackunit/shared-utils';
|
|
5
5
|
import { useMemo, Children, cloneElement, useCallback, useState, useEffect, useRef, createElement } from 'react';
|
|
6
6
|
import { cvaMerge } from '@trackunit/css-class-variance-utilities';
|
|
@@ -164,6 +164,18 @@ const cvaMoreContainer = cvaMerge([
|
|
|
164
164
|
},
|
|
165
165
|
});
|
|
166
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Renders the icon for an action button.
|
|
169
|
+
* Should not be used outside the ActionSheet component.
|
|
170
|
+
*
|
|
171
|
+
* @param {ActionIconProps} props - The properties for the action icon.
|
|
172
|
+
* @param {ActionModel} props.action - The action model defining what action to perform.
|
|
173
|
+
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
174
|
+
*/
|
|
175
|
+
const ActionIcon = ({ action }) => {
|
|
176
|
+
return action.icon ? (jsx(Icon, { color: "white", "data-testid": "action-icon", name: action.icon, ref: action.ref, size: "small", style: action.style })) : null;
|
|
177
|
+
};
|
|
178
|
+
|
|
167
179
|
/**
|
|
168
180
|
* The button to show in the ActionSheet.
|
|
169
181
|
* Should not be used outside the ActionSheet component.
|
|
@@ -215,17 +227,6 @@ const actionDataToMenuItem = (action, dataTestId) => {
|
|
|
215
227
|
* @returns {*} The ActionButton component for the given action.
|
|
216
228
|
*/
|
|
217
229
|
const actionDataToActionButton = (action) => (jsx(ActionButton, { action: action, className: "max-w-max flex-shrink-0", "data-testid": action["data-testid"] || action.id, disabled: action.loading || action.disabled, id: action.id, variant: action.disabled ? "ghost" : undefined }, action.id));
|
|
218
|
-
/**
|
|
219
|
-
* Renders the icon for an action button.
|
|
220
|
-
* Should not be used outside the ActionSheet component.
|
|
221
|
-
*
|
|
222
|
-
* @param {InnerActionButtonProps} props - The properties for the action icon.
|
|
223
|
-
* @param {ActionModel} props.action - The action model defining what action to perform.
|
|
224
|
-
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
225
|
-
*/
|
|
226
|
-
const ActionIcon = ({ action }) => {
|
|
227
|
-
return action.icon ? (jsx(Icon, { color: "white", "data-testid": "action-icon", name: action.icon, ref: action.ref, size: "small", style: action.style })) : null;
|
|
228
|
-
};
|
|
229
230
|
|
|
230
231
|
/**
|
|
231
232
|
* `ActionContainerAndOverflow` renders a set of actions and a MoreMenu for overflow.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/table/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.65",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"@trackunit/shared-utils": "1.15.57",
|
|
17
17
|
"@trackunit/css-class-variance-utilities": "1.13.56",
|
|
18
18
|
"@trackunit/ui-icons": "1.13.57",
|
|
19
|
-
"@trackunit/react-table-base-components": "2.1.
|
|
20
|
-
"@trackunit/react-form-components": "2.1.
|
|
19
|
+
"@trackunit/react-table-base-components": "2.1.63",
|
|
20
|
+
"@trackunit/react-form-components": "2.1.62",
|
|
21
21
|
"@trackunit/i18n-library-translation": "2.0.58",
|
|
22
22
|
"@trackunit/iris-app-runtime-core-api": "1.16.63",
|
|
23
23
|
"zod": "^3.25.76"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { ActionModel } from "./Actions";
|
|
3
|
+
interface ActionIconProps {
|
|
4
|
+
action: ActionModel;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Renders the icon for an action button.
|
|
8
|
+
* Should not be used outside the ActionSheet component.
|
|
9
|
+
*
|
|
10
|
+
* @param {ActionIconProps} props - The properties for the action icon.
|
|
11
|
+
* @param {ActionModel} props.action - The action model defining what action to perform.
|
|
12
|
+
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ActionIcon: ({ action }: ActionIconProps) => ReactElement | null;
|
|
15
|
+
export {};
|
|
@@ -37,16 +37,4 @@ export declare const actionDataToMenuItem: (action: ActionModel, dataTestId?: st
|
|
|
37
37
|
* @returns {*} The ActionButton component for the given action.
|
|
38
38
|
*/
|
|
39
39
|
export declare const actionDataToActionButton: (action: ActionModel) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
interface InnerActionButtonProps {
|
|
41
|
-
action: ActionModel;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Renders the icon for an action button.
|
|
45
|
-
* Should not be used outside the ActionSheet component.
|
|
46
|
-
*
|
|
47
|
-
* @param {InnerActionButtonProps} props - The properties for the action icon.
|
|
48
|
-
* @param {ActionModel} props.action - The action model defining what action to perform.
|
|
49
|
-
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
50
|
-
*/
|
|
51
|
-
export declare const ActionIcon: ({ action }: InnerActionButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
52
40
|
export {};
|