@trackunit/react-widgets 2.20.10 → 2.21.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 +4 -1
- package/index.esm.js +5 -2
- package/package.json +8 -8
package/index.cjs.js
CHANGED
|
@@ -336,7 +336,10 @@ const cvaWidgetEditBodyContainer = cssClassVarianceUtilities.cvaMerge(["absolute
|
|
|
336
336
|
const WidgetEditBody = ({ children, "data-testid": dataTestId, className, onCancel, onSave, saveEditModeDisabled = false, title, ref, style, }) => {
|
|
337
337
|
const [t] = useTranslation();
|
|
338
338
|
const [saving, setSaving] = react.useState(false);
|
|
339
|
-
|
|
339
|
+
const onClickCancel = () => {
|
|
340
|
+
onCancel();
|
|
341
|
+
};
|
|
342
|
+
return (jsxRuntime.jsxs(reactComponents.Card, { className: cvaWidgetEditBodyContainer({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [jsxRuntime.jsx(reactComponents.CardHeader, { actions: jsxRuntime.jsx(reactComponents.IconButton, { "data-testid": "card-header-close-button", icon: jsxRuntime.jsx(reactComponents.Icon, { name: "XMark", size: "small" }), onClick: onClickCancel, title: t("widget.edit.cancel"), variant: "ghost-neutral" }), heading: title || t("widget.edit.title") }), jsxRuntime.jsx(reactComponents.CardBody, { children: children }), jsxRuntime.jsxs(reactComponents.CardFooter, { children: [jsxRuntime.jsx(reactComponents.Button, { onClick: onClickCancel, variant: "ghost-neutral", children: t("widget.edit.cancel") }), jsxRuntime.jsx(reactComponents.Button, { disabled: saveEditModeDisabled || saving, loading: saving, onClick: async () => {
|
|
340
343
|
setSaving(true);
|
|
341
344
|
try {
|
|
342
345
|
await onSave();
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { registerTranslations, useNamespaceTranslation } from '@trackunit/i18n-library-translation';
|
|
3
|
-
import { EmptyState, Card, CardHeader, CardBody, CardFooter, Button, cvaInteractableItem, SkeletonLines,
|
|
3
|
+
import { EmptyState, Card, CardHeader, IconButton, Icon, CardBody, CardFooter, Button, cvaInteractableItem, SkeletonLines, Tooltip, Text, TrendIndicators, Notice } from '@trackunit/react-components';
|
|
4
4
|
import { WidgetConfigRuntime, createEvent } from '@trackunit/iris-app-runtime-core';
|
|
5
5
|
import { useAnalytics } from '@trackunit/react-core-hooks';
|
|
6
6
|
import { useMemo, useCallback, useState } from 'react';
|
|
@@ -334,7 +334,10 @@ const cvaWidgetEditBodyContainer = cvaMerge(["absolute", "left-1/2", "top-1/2",
|
|
|
334
334
|
const WidgetEditBody = ({ children, "data-testid": dataTestId, className, onCancel, onSave, saveEditModeDisabled = false, title, ref, style, }) => {
|
|
335
335
|
const [t] = useTranslation();
|
|
336
336
|
const [saving, setSaving] = useState(false);
|
|
337
|
-
|
|
337
|
+
const onClickCancel = () => {
|
|
338
|
+
onCancel();
|
|
339
|
+
};
|
|
340
|
+
return (jsxs(Card, { className: cvaWidgetEditBodyContainer({ className }), "data-testid": dataTestId, ref: ref, style: style, children: [jsx(CardHeader, { actions: jsx(IconButton, { "data-testid": "card-header-close-button", icon: jsx(Icon, { name: "XMark", size: "small" }), onClick: onClickCancel, title: t("widget.edit.cancel"), variant: "ghost-neutral" }), heading: title || t("widget.edit.title") }), jsx(CardBody, { children: children }), jsxs(CardFooter, { children: [jsx(Button, { onClick: onClickCancel, variant: "ghost-neutral", children: t("widget.edit.cancel") }), jsx(Button, { disabled: saveEditModeDisabled || saving, loading: saving, onClick: async () => {
|
|
338
341
|
setSaving(true);
|
|
339
342
|
try {
|
|
340
343
|
await onSave();
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-widgets",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/react-components": "1.
|
|
11
|
-
"@trackunit/react-core-hooks": "1.17.
|
|
12
|
-
"@trackunit/iris-app-runtime-core": "1.17.
|
|
13
|
-
"@trackunit/css-class-variance-utilities": "1.13.
|
|
14
|
-
"@trackunit/ui-design-tokens": "1.13.
|
|
15
|
-
"@trackunit/ui-icons": "1.13.
|
|
16
|
-
"@trackunit/i18n-library-translation": "1.
|
|
10
|
+
"@trackunit/react-components": "1.25.0",
|
|
11
|
+
"@trackunit/react-core-hooks": "1.17.9",
|
|
12
|
+
"@trackunit/iris-app-runtime-core": "1.17.5",
|
|
13
|
+
"@trackunit/css-class-variance-utilities": "1.13.5",
|
|
14
|
+
"@trackunit/ui-design-tokens": "1.13.5",
|
|
15
|
+
"@trackunit/ui-icons": "1.13.5",
|
|
16
|
+
"@trackunit/i18n-library-translation": "1.22.0",
|
|
17
17
|
"tailwind-merge": "^2.0.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|