@trackunit/react-widgets 2.9.33 → 2.9.35
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
CHANGED
|
@@ -299,10 +299,10 @@ const cvaWidgetEditBodyContainer = cssClassVarianceUtilities.cvaMerge(["absolute
|
|
|
299
299
|
* @param {WidgetEditBodyProps} props - The props for the WidgetEditBody component
|
|
300
300
|
* @returns {ReactNode} WidgetEditBody component
|
|
301
301
|
*/
|
|
302
|
-
const WidgetEditBody = ({ children, "data-testid": dataTestId, className, onCancel
|
|
302
|
+
const WidgetEditBody = ({ children, "data-testid": dataTestId, className, onCancel, onSave, saveEditModeDisabled = false, title, ref, }) => {
|
|
303
303
|
const [t] = useTranslation();
|
|
304
304
|
const [saving, setSaving] = react.useState(false);
|
|
305
|
-
return (jsxRuntime.jsxs(reactComponents.Card, { className: cvaWidgetEditBodyContainer({ className }), "data-testid": dataTestId, ref: ref, children: [jsxRuntime.jsx(reactComponents.CardHeader, { heading: title || t("widget.edit.title"), onClickClose:
|
|
305
|
+
return (jsxRuntime.jsxs(reactComponents.Card, { className: cvaWidgetEditBodyContainer({ className }), "data-testid": dataTestId, ref: ref, children: [jsxRuntime.jsx(reactComponents.CardHeader, { heading: title || t("widget.edit.title"), onClickClose: onCancel }), jsxRuntime.jsx(reactComponents.CardBody, { children: children }), jsxRuntime.jsxs(reactComponents.CardFooter, { children: [jsxRuntime.jsx(reactComponents.Button, { onClick: onCancel, variant: "ghost-neutral", children: t("widget.edit.cancel") }), jsxRuntime.jsx(reactComponents.Button, { disabled: saveEditModeDisabled || saving, loading: saving, onClick: async () => {
|
|
306
306
|
setSaving(true);
|
|
307
307
|
try {
|
|
308
308
|
await onSave();
|
package/index.esm.js
CHANGED
|
@@ -297,10 +297,10 @@ const cvaWidgetEditBodyContainer = cvaMerge(["absolute", "left-1/2", "top-1/2",
|
|
|
297
297
|
* @param {WidgetEditBodyProps} props - The props for the WidgetEditBody component
|
|
298
298
|
* @returns {ReactNode} WidgetEditBody component
|
|
299
299
|
*/
|
|
300
|
-
const WidgetEditBody = ({ children, "data-testid": dataTestId, className, onCancel
|
|
300
|
+
const WidgetEditBody = ({ children, "data-testid": dataTestId, className, onCancel, onSave, saveEditModeDisabled = false, title, ref, }) => {
|
|
301
301
|
const [t] = useTranslation();
|
|
302
302
|
const [saving, setSaving] = useState(false);
|
|
303
|
-
return (jsxs(Card, { className: cvaWidgetEditBodyContainer({ className }), "data-testid": dataTestId, ref: ref, children: [jsx(CardHeader, { heading: title || t("widget.edit.title"), onClickClose:
|
|
303
|
+
return (jsxs(Card, { className: cvaWidgetEditBodyContainer({ className }), "data-testid": dataTestId, ref: ref, children: [jsx(CardHeader, { heading: title || t("widget.edit.title"), onClickClose: onCancel }), jsx(CardBody, { children: children }), jsxs(CardFooter, { children: [jsx(Button, { onClick: onCancel, variant: "ghost-neutral", children: t("widget.edit.cancel") }), jsx(Button, { disabled: saveEditModeDisabled || saving, loading: saving, onClick: async () => {
|
|
304
304
|
setSaving(true);
|
|
305
305
|
try {
|
|
306
306
|
await onSave();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-widgets",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.35",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/react-components": "1.17.
|
|
11
|
+
"@trackunit/react-components": "1.17.28",
|
|
12
12
|
"@trackunit/iris-app-runtime-core": "1.13.28",
|
|
13
13
|
"@trackunit/css-class-variance-utilities": "1.11.45",
|
|
14
14
|
"@trackunit/ui-design-tokens": "1.11.45",
|
|
15
15
|
"@trackunit/ui-icons": "1.11.44",
|
|
16
|
-
"@trackunit/i18n-library-translation": "1.12.
|
|
16
|
+
"@trackunit/i18n-library-translation": "1.12.31"
|
|
17
17
|
},
|
|
18
18
|
"module": "./index.esm.js",
|
|
19
19
|
"main": "./index.cjs.js",
|
|
@@ -30,4 +30,4 @@ export interface WidgetEditBodyProps extends CommonProps, Refable<HTMLDivElement
|
|
|
30
30
|
* @param {WidgetEditBodyProps} props - The props for the WidgetEditBody component
|
|
31
31
|
* @returns {ReactNode} WidgetEditBody component
|
|
32
32
|
*/
|
|
33
|
-
export declare const WidgetEditBody: ({ children, "data-testid": dataTestId, className, onCancel
|
|
33
|
+
export declare const WidgetEditBody: ({ children, "data-testid": dataTestId, className, onCancel, onSave, saveEditModeDisabled, title, ref, }: WidgetEditBodyProps) => ReactElement;
|
|
@@ -4,8 +4,3 @@ export declare const cvaWidgetKPI: (props?: ({
|
|
|
4
4
|
export declare const cvaWidgetKPIHeader: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
5
5
|
export declare const cvaWidgetKPITitleText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
6
6
|
export declare const cvaWidgetKPIvalueText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
7
|
-
export declare const cvaWidgetKPITrendValueText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
8
|
-
export declare const cvaWidgetKPITrendPercentage: (props?: ({
|
|
9
|
-
color?: "success" | "danger" | "neutral" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
|
-
export declare const cvaWidgetKPINotice: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|