@trackunit/react-table 1.13.30 → 1.13.32
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 +5 -3
- package/index.esm.js +5 -3
- package/package.json +5 -5
- package/src/ActionSheet/ActionSheet.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 ?
|
|
172
|
+
return action.tip ? jsxRuntime.jsx(reactComponents.Tooltip, { label: action.tip, children: content }) : content;
|
|
173
173
|
};
|
|
174
174
|
/**
|
|
175
175
|
* Converts an action model to a MenuItem component.
|
|
@@ -356,9 +356,11 @@ const ActionContainerAndOverflow = ({ actions, dropdownActions, moreActions, "da
|
|
|
356
356
|
* @param {ActionSheetProps} props - The props for the ActionSheet component
|
|
357
357
|
* @returns {ReactElement} ActionSheet component
|
|
358
358
|
*/
|
|
359
|
-
const ActionSheet = ({ actions, dropdownActions, moreActions = [], selections, resetSelection
|
|
359
|
+
const ActionSheet = ({ actions, dropdownActions, moreActions = [], selections, resetSelection, className, "data-testid": dataTestId, }) => {
|
|
360
360
|
const [t] = useTranslation();
|
|
361
|
-
return (jsxRuntime.jsxs("div", { className: cvaActionSheet({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.Button, { className: "row-start-1", "data-testid": "XButton",
|
|
361
|
+
return (jsxRuntime.jsxs("div", { className: cvaActionSheet({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.Button, { className: "row-start-1", "data-testid": "XButton",
|
|
362
|
+
// eslint-disable-next-line local-rules/prefer-event-specific-callback-naming
|
|
363
|
+
onClick: resetSelection, prefix: jsxRuntime.jsx(reactComponents.Icon, { color: "white", "data-testid": "close-icon", name: "XMark", size: "small" }), children: t("table.actionsheet.selected", { count: selections.length }) }), jsxRuntime.jsx(reactComponents.Spacer, { border: true, className: cvaDivider() }), jsxRuntime.jsx(ActionContainerAndOverflow, { "data-testid": dataTestId,
|
|
362
364
|
actions,
|
|
363
365
|
dropdownActions,
|
|
364
366
|
moreActions: moreActions.map(action => actionDataToMenuItem(action, dataTestId)) })] }));
|
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 ?
|
|
171
|
+
return action.tip ? jsx(Tooltip, { label: action.tip, children: content }) : content;
|
|
172
172
|
};
|
|
173
173
|
/**
|
|
174
174
|
* Converts an action model to a MenuItem component.
|
|
@@ -355,9 +355,11 @@ const ActionContainerAndOverflow = ({ actions, dropdownActions, moreActions, "da
|
|
|
355
355
|
* @param {ActionSheetProps} props - The props for the ActionSheet component
|
|
356
356
|
* @returns {ReactElement} ActionSheet component
|
|
357
357
|
*/
|
|
358
|
-
const ActionSheet = ({ actions, dropdownActions, moreActions = [], selections, resetSelection
|
|
358
|
+
const ActionSheet = ({ actions, dropdownActions, moreActions = [], selections, resetSelection, className, "data-testid": dataTestId, }) => {
|
|
359
359
|
const [t] = useTranslation();
|
|
360
|
-
return (jsxs("div", { className: cvaActionSheet({ className }), "data-testid": dataTestId, children: [jsx(Button, { className: "row-start-1", "data-testid": "XButton",
|
|
360
|
+
return (jsxs("div", { className: cvaActionSheet({ className }), "data-testid": dataTestId, children: [jsx(Button, { className: "row-start-1", "data-testid": "XButton",
|
|
361
|
+
// eslint-disable-next-line local-rules/prefer-event-specific-callback-naming
|
|
362
|
+
onClick: resetSelection, prefix: jsx(Icon, { color: "white", "data-testid": "close-icon", name: "XMark", size: "small" }), children: t("table.actionsheet.selected", { count: selections.length }) }), jsx(Spacer, { border: true, className: cvaDivider() }), jsx(ActionContainerAndOverflow, { "data-testid": dataTestId,
|
|
361
363
|
actions,
|
|
362
364
|
dropdownActions,
|
|
363
365
|
moreActions: moreActions.map(action => actionDataToMenuItem(action, dataTestId)) })] }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.32",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -14,13 +14,13 @@
|
|
|
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.
|
|
17
|
+
"@trackunit/react-components": "1.17.28",
|
|
18
18
|
"@trackunit/shared-utils": "1.13.45",
|
|
19
19
|
"@trackunit/css-class-variance-utilities": "1.11.45",
|
|
20
20
|
"@trackunit/ui-icons": "1.11.44",
|
|
21
|
-
"@trackunit/react-table-base-components": "1.13.
|
|
22
|
-
"@trackunit/react-form-components": "1.14.
|
|
23
|
-
"@trackunit/i18n-library-translation": "1.12.
|
|
21
|
+
"@trackunit/react-table-base-components": "1.13.31",
|
|
22
|
+
"@trackunit/react-form-components": "1.14.31",
|
|
23
|
+
"@trackunit/i18n-library-translation": "1.12.31",
|
|
24
24
|
"@trackunit/iris-app-runtime-core-api": "1.12.26",
|
|
25
25
|
"graphql": "^16.10.0"
|
|
26
26
|
},
|
|
@@ -127,4 +127,4 @@ export interface ActionSheetProps extends CommonProps {
|
|
|
127
127
|
* @param {ActionSheetProps} props - The props for the ActionSheet component
|
|
128
128
|
* @returns {ReactElement} ActionSheet component
|
|
129
129
|
*/
|
|
130
|
-
export declare const ActionSheet: ({ actions, dropdownActions, moreActions, selections, resetSelection
|
|
130
|
+
export declare const ActionSheet: ({ actions, dropdownActions, moreActions, selections, resetSelection, className, "data-testid": dataTestId, }: ActionSheetProps) => import("react/jsx-runtime").JSX.Element;
|