@trackunit/react-table 1.13.19 → 1.13.23
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 +3 -3
- package/index.esm.js +3 -3
- package/package.json +9 -9
- package/src/ActionSheet/Actions.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -169,7 +169,7 @@ const ActionButton = ({ action, id, ...rest }) => {
|
|
|
169
169
|
return (jsxRuntime.jsx(reactComponents.Button, { asChild: true, id: id, loading: action.loading, prefix: jsxRuntime.jsx(ActionIcon, { action: action }), ...rest, children: jsxRuntime.jsx(reactRouter.Link, { to: action.url, children: action.label }) }));
|
|
170
170
|
}
|
|
171
171
|
const content = (jsxRuntime.jsx(reactComponents.Button, { id: id, loading: action.loading, onClick: e => action.method(e), prefix: jsxRuntime.jsx(ActionIcon, { action: action }), ...rest, children: action.label }));
|
|
172
|
-
return action.tip ? jsxRuntime.jsx(reactComponents.Tooltip, { asChild: false, label: action.tip, children: content }) : content;
|
|
172
|
+
return action.tip ? (jsxRuntime.jsx(reactComponents.Tooltip, { asChild: false, label: action.tip, children: content })) : (content);
|
|
173
173
|
};
|
|
174
174
|
/**
|
|
175
175
|
* Converts an action model to a MenuItem component.
|
|
@@ -190,7 +190,7 @@ const actionDataToMenuItem = (action, dataTestId) => {
|
|
|
190
190
|
key: action.label,
|
|
191
191
|
"data-testid": dataTestId,
|
|
192
192
|
};
|
|
193
|
-
const item = (jsxRuntime.jsx(reactComponents.MenuItem, { props, className: "flex justify-center", "data-testid": `${dataTestId}-action-menu-item`, label: action.label, onClick: "method" in action ? action.method : undefined, prefix: action.icon ? (jsxRuntime.jsx(reactComponents.Icon, { "data-testid": "action-icon",
|
|
193
|
+
const item = (jsxRuntime.jsx(reactComponents.MenuItem, { props, className: "flex justify-center", "data-testid": `${dataTestId}-action-menu-item`, label: action.label, onClick: "method" in action ? action.method : undefined, prefix: action.icon ? (jsxRuntime.jsx(reactComponents.Icon, { "data-testid": "action-icon", name: action.icon, ref: action.ref, size: "medium", style: action.style })) : null, stopPropagation: false }, action.label));
|
|
194
194
|
if ("url" in action) {
|
|
195
195
|
return (jsxRuntime.jsx(reactRouter.Link, { id: action.id, to: action.url, children: item }, action.label));
|
|
196
196
|
}
|
|
@@ -214,7 +214,7 @@ const actionDataToActionButton = (action) => (jsxRuntime.jsx(ActionButton, { act
|
|
|
214
214
|
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
215
215
|
*/
|
|
216
216
|
const ActionIcon = ({ action }) => {
|
|
217
|
-
return action.icon ? (jsxRuntime.jsx(reactComponents.Icon, { color: "white", "data-testid": "action-icon",
|
|
217
|
+
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;
|
|
218
218
|
};
|
|
219
219
|
|
|
220
220
|
/**
|
package/index.esm.js
CHANGED
|
@@ -168,7 +168,7 @@ const ActionButton = ({ action, id, ...rest }) => {
|
|
|
168
168
|
return (jsx(Button, { asChild: true, id: id, loading: action.loading, prefix: jsx(ActionIcon, { action: action }), ...rest, children: jsx(Link, { to: action.url, children: action.label }) }));
|
|
169
169
|
}
|
|
170
170
|
const content = (jsx(Button, { id: id, loading: action.loading, onClick: e => action.method(e), prefix: jsx(ActionIcon, { action: action }), ...rest, children: action.label }));
|
|
171
|
-
return action.tip ? jsx(Tooltip, { asChild: false, label: action.tip, children: content }) : content;
|
|
171
|
+
return action.tip ? (jsx(Tooltip, { asChild: false, label: action.tip, children: content })) : (content);
|
|
172
172
|
};
|
|
173
173
|
/**
|
|
174
174
|
* Converts an action model to a MenuItem component.
|
|
@@ -189,7 +189,7 @@ const actionDataToMenuItem = (action, dataTestId) => {
|
|
|
189
189
|
key: action.label,
|
|
190
190
|
"data-testid": dataTestId,
|
|
191
191
|
};
|
|
192
|
-
const item = (jsx(MenuItem, { props, className: "flex justify-center", "data-testid": `${dataTestId}-action-menu-item`, label: action.label, onClick: "method" in action ? action.method : undefined, prefix: action.icon ? (jsx(Icon, { "data-testid": "action-icon",
|
|
192
|
+
const item = (jsx(MenuItem, { props, className: "flex justify-center", "data-testid": `${dataTestId}-action-menu-item`, label: action.label, onClick: "method" in action ? action.method : undefined, prefix: action.icon ? (jsx(Icon, { "data-testid": "action-icon", name: action.icon, ref: action.ref, size: "medium", style: action.style })) : null, stopPropagation: false }, action.label));
|
|
193
193
|
if ("url" in action) {
|
|
194
194
|
return (jsx(Link, { id: action.id, to: action.url, children: item }, action.label));
|
|
195
195
|
}
|
|
@@ -213,7 +213,7 @@ const actionDataToActionButton = (action) => (jsx(ActionButton, { action: action
|
|
|
213
213
|
* @returns {ReactElement | null} - The icon for the action button, or null if no icon is defined.
|
|
214
214
|
*/
|
|
215
215
|
const ActionIcon = ({ action }) => {
|
|
216
|
-
return action.icon ? (jsx(Icon, { color: "white", "data-testid": "action-icon",
|
|
216
|
+
return action.icon ? (jsx(Icon, { color: "white", "data-testid": "action-icon", name: action.icon, ref: action.ref, size: "small", style: action.style })) : null;
|
|
217
217
|
};
|
|
218
218
|
|
|
219
219
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.23",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"react-dnd-html5-backend": "16.0.1",
|
|
15
15
|
"@tanstack/react-router": "1.114.29",
|
|
16
16
|
"tailwind-merge": "^2.0.0",
|
|
17
|
-
"@trackunit/react-components": "1.17.
|
|
18
|
-
"@trackunit/shared-utils": "1.13.
|
|
19
|
-
"@trackunit/css-class-variance-utilities": "1.11.
|
|
20
|
-
"@trackunit/ui-icons": "1.11.
|
|
21
|
-
"@trackunit/react-table-base-components": "1.13.
|
|
22
|
-
"@trackunit/react-form-components": "1.14.
|
|
23
|
-
"@trackunit/i18n-library-translation": "1.12.
|
|
24
|
-
"@trackunit/iris-app-runtime-core-api": "1.12.
|
|
17
|
+
"@trackunit/react-components": "1.17.21",
|
|
18
|
+
"@trackunit/shared-utils": "1.13.43",
|
|
19
|
+
"@trackunit/css-class-variance-utilities": "1.11.43",
|
|
20
|
+
"@trackunit/ui-icons": "1.11.42",
|
|
21
|
+
"@trackunit/react-table-base-components": "1.13.23",
|
|
22
|
+
"@trackunit/react-form-components": "1.14.23",
|
|
23
|
+
"@trackunit/i18n-library-translation": "1.12.27",
|
|
24
|
+
"@trackunit/iris-app-runtime-core-api": "1.12.24",
|
|
25
25
|
"graphql": "^16.10.0"
|
|
26
26
|
},
|
|
27
27
|
"module": "./index.esm.js",
|
|
@@ -19,7 +19,7 @@ export interface CommonAction extends IconExposedProp {
|
|
|
19
19
|
id: string;
|
|
20
20
|
label: string;
|
|
21
21
|
icon?: IconName;
|
|
22
|
-
|
|
22
|
+
ref?: RefObject<HTMLSpanElement>;
|
|
23
23
|
style?: Record<string, string>;
|
|
24
24
|
loading?: boolean;
|
|
25
25
|
disabled?: boolean;
|