@m4l/widgets 0.5.0 → 0.6.0-beta-pkg-801-ajustes-mf-52.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/cards/WidgetBase/WidgetBase.d.ts +2 -1
- package/cards/WidgetBase/WidgetBase.d.ts.map +1 -1
- package/cards/WidgetBase/WidgetBase.js +19 -18
- package/cards/WidgetBase/types.d.ts +4 -2
- package/cards/WidgetBase/types.d.ts.map +1 -1
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.d.ts +2 -1
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.d.ts.map +1 -1
- package/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.js +12 -11
- package/cards/WidgetBaseThreeValues/types.d.ts +4 -2
- package/cards/WidgetBaseThreeValues/types.d.ts.map +1 -1
- package/cards/WidgetDigitalInput/WidgetDigitalInput.d.ts +2 -1
- package/cards/WidgetDigitalInput/WidgetDigitalInput.d.ts.map +1 -1
- package/cards/WidgetDigitalInput/WidgetDigitalInput.js +18 -16
- package/cards/WidgetDigitalInput/types.d.ts +5 -3
- package/cards/WidgetDigitalInput/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,9 @@ import { WidgetBaseProps } from './types';
|
|
|
7
7
|
* @param tooltip - Tooltip of the widget.
|
|
8
8
|
* @param isAlarm - Is alarm of the widget.
|
|
9
9
|
* @param menuActions - Menu actions of the widget.
|
|
10
|
+
* @param onMenuActionsOpen - Observe opening and closing of the actions menu.
|
|
10
11
|
* @param sx - System styles applied to the widget root container.
|
|
11
12
|
*/
|
|
12
|
-
export declare function WidgetBase({ title, children, size, tooltip, isAlarm, menuActions, sx }: WidgetBaseProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function WidgetBase({ title, children, size, tooltip, isAlarm, menuActions, onMenuActionsOpen, sx }: WidgetBaseProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default WidgetBase;
|
|
14
15
|
//# sourceMappingURL=WidgetBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetBase.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/WidgetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAWrE
|
|
1
|
+
{"version":3,"file":"WidgetBase.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/WidgetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAWrE;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,eAAe,oDA4D1H;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,44 +1,45 @@
|
|
|
1
1
|
import { jsxs as e, jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { WidgetBaseRootStyled as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { NotificationInformationOutlined as
|
|
5
|
-
function b({ title: r, children: a, size: o, tooltip:
|
|
6
|
-
return /* @__PURE__ */ e(
|
|
7
|
-
/* @__PURE__ */ e(
|
|
8
|
-
/* @__PURE__ */ t(
|
|
2
|
+
import { WidgetBaseRootStyled as m, WidgetBaseHeaderStyled as f, WidgetBaseHeaderTitleStyled as s, WidgetBaseHeaderActionsStyled as p, WidgetBaseContentStyled as g } from "./slots/WidgetBaseSlots.js";
|
|
3
|
+
import { Icon as u, IconButton as S, MenuActions as B } from "@m4l/components";
|
|
4
|
+
import { NotificationInformationOutlined as h, NotificationSirenOutlined as W } from "@m4l/icons";
|
|
5
|
+
function b({ title: r, children: a, size: o, tooltip: n, isAlarm: d, menuActions: i, onMenuActionsOpen: l, sx: c }) {
|
|
6
|
+
return /* @__PURE__ */ e(m, { variant: "outlined", direction: "column", gap: "compact", height: 104, sx: c, children: [
|
|
7
|
+
/* @__PURE__ */ e(f, { children: [
|
|
8
|
+
/* @__PURE__ */ t(s, { ownerState: {
|
|
9
9
|
size: o
|
|
10
10
|
}, children: r }),
|
|
11
|
-
/* @__PURE__ */ e(
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/* @__PURE__ */ e(p, { children: [
|
|
12
|
+
n && /* @__PURE__ */ t(
|
|
13
|
+
u,
|
|
14
14
|
{
|
|
15
|
-
src: /* @__PURE__ */ t(
|
|
16
|
-
tooltipContent:
|
|
15
|
+
src: /* @__PURE__ */ t(h, {}),
|
|
16
|
+
tooltipContent: n,
|
|
17
17
|
"aria-label": "Information",
|
|
18
18
|
size: o,
|
|
19
19
|
color: "info.enabled"
|
|
20
20
|
}
|
|
21
21
|
),
|
|
22
22
|
d && /* @__PURE__ */ t(
|
|
23
|
-
|
|
23
|
+
S,
|
|
24
24
|
{
|
|
25
25
|
tooltip: "Alarm",
|
|
26
|
-
icon: /* @__PURE__ */ t(
|
|
26
|
+
icon: /* @__PURE__ */ t(W, {}),
|
|
27
27
|
color: "error",
|
|
28
28
|
size: o
|
|
29
29
|
}
|
|
30
30
|
),
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
i && /* @__PURE__ */ t(
|
|
32
|
+
B,
|
|
33
33
|
{
|
|
34
|
-
menuActions:
|
|
34
|
+
menuActions: i,
|
|
35
|
+
onOpen: l,
|
|
35
36
|
toolTip: "More actions",
|
|
36
37
|
size: o
|
|
37
38
|
}
|
|
38
39
|
)
|
|
39
40
|
] })
|
|
40
41
|
] }),
|
|
41
|
-
/* @__PURE__ */ t(
|
|
42
|
+
/* @__PURE__ */ t(g, { children: a })
|
|
42
43
|
] });
|
|
43
44
|
}
|
|
44
45
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WidgetBaseSlots } from './slots/WidgetBaseEnum';
|
|
2
2
|
import { WIDGET_BASE_KEY_COMPONENT } from './constants';
|
|
3
|
-
import { M4LOverridesStyleRules, MenuAction } from '@m4l/components';
|
|
3
|
+
import { M4LOverridesStyleRules, MenuAction, MenuActions } from '@m4l/components';
|
|
4
4
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
5
|
+
import { ReactNode, ComponentProps } from 'react';
|
|
6
6
|
import { Sizes } from '@m4l/styles';
|
|
7
7
|
/**
|
|
8
8
|
* Props for the WidgetBase component.
|
|
@@ -14,6 +14,8 @@ export interface WidgetBaseProps {
|
|
|
14
14
|
tooltip?: string;
|
|
15
15
|
isAlarm?: boolean;
|
|
16
16
|
menuActions?: MenuAction[];
|
|
17
|
+
/** Observe the native menu lifecycle; consumers should handle repeated notifications. */
|
|
18
|
+
onMenuActionsOpen?: ComponentProps<typeof MenuActions>['onOpen'];
|
|
17
19
|
sx?: SxProps<Theme>;
|
|
18
20
|
}
|
|
19
21
|
export type WidgetBaseOwnerState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBase/types.ts"],"names":[],"mappings":"AAAA,O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
11
|
* @param isAlarm - Is alarm of the widget.
|
|
12
12
|
* @param menuActions - Menu actions of the widget.
|
|
13
|
+
* @param onMenuActionsOpen - Observe opening and closing of the actions menu.
|
|
13
14
|
* @param sx - System styles applied to the widget root container.
|
|
14
15
|
*/
|
|
15
|
-
export declare function WidgetBaseThreeValues({ title, leftValue, firstValue, secondValue, size, tooltip, isAlarm, menuActions, sx, }: WidgetBaseThreeValuesProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function WidgetBaseThreeValues({ title, leftValue, firstValue, secondValue, size, tooltip, isAlarm, menuActions, onMenuActionsOpen, sx, }: WidgetBaseThreeValuesProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default WidgetBaseThreeValues;
|
|
17
18
|
//# sourceMappingURL=WidgetBaseThreeValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetBaseThreeValues.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAW1D
|
|
1
|
+
{"version":3,"file":"WidgetBaseThreeValues.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/WidgetBaseThreeValues.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAW1D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,EAAE,GACH,EAAE,0BAA0B,oDA0B5B;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { WidgetBaseThreeValuesRootStyled as
|
|
3
|
-
import { WidgetBase as
|
|
4
|
-
function
|
|
2
|
+
import { WidgetBaseThreeValuesRootStyled as g, WidgetBaseThreeValuesContainerStyled as V, WidgetBaseThreeValuesLeftValueStyled as c, WidgetBaseThreeValuesRigthContainerStyled as B, WidgetBaseThreeValuesFirstValueStyled as W, WidgetBaseThreeValuesSecondValueStyled as S } from "./slots/WidgetBaseThreeValuesSlots.js";
|
|
3
|
+
import { WidgetBase as T } from "../WidgetBase/WidgetBase.js";
|
|
4
|
+
function p({
|
|
5
5
|
title: i,
|
|
6
6
|
leftValue: l,
|
|
7
7
|
firstValue: d,
|
|
@@ -10,17 +10,18 @@ function y({
|
|
|
10
10
|
tooltip: s,
|
|
11
11
|
isAlarm: h,
|
|
12
12
|
menuActions: n,
|
|
13
|
-
|
|
13
|
+
onMenuActionsOpen: o,
|
|
14
|
+
sx: u
|
|
14
15
|
}) {
|
|
15
|
-
return /* @__PURE__ */ e(
|
|
16
|
-
/* @__PURE__ */ e(
|
|
17
|
-
/* @__PURE__ */ r(
|
|
18
|
-
/* @__PURE__ */ e(
|
|
19
|
-
t && /* @__PURE__ */ e(
|
|
16
|
+
return /* @__PURE__ */ e(g, { sx: u, children: /* @__PURE__ */ e(T, { title: i, size: a, tooltip: s, isAlarm: h, menuActions: n, onMenuActionsOpen: o, children: /* @__PURE__ */ r(V, { children: [
|
|
17
|
+
/* @__PURE__ */ e(c, { children: l }),
|
|
18
|
+
/* @__PURE__ */ r(B, { children: [
|
|
19
|
+
/* @__PURE__ */ e(W, { children: d }),
|
|
20
|
+
t && /* @__PURE__ */ e(S, { children: t })
|
|
20
21
|
] })
|
|
21
22
|
] }) }) });
|
|
22
23
|
}
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
p as WidgetBaseThreeValues,
|
|
26
|
+
p as default
|
|
26
27
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WidgetBaseThreeValuesSlots } from './slots/WidgetBaseThreeValuesEnum';
|
|
2
2
|
import { WIDGET_BASE_THREE_VALUES_KEY_COMPONENT } from './constants';
|
|
3
|
-
import { M4LOverridesStyleRules, MenuAction } from '@m4l/components';
|
|
3
|
+
import { M4LOverridesStyleRules, MenuAction, MenuActions } from '@m4l/components';
|
|
4
4
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
5
|
+
import { ReactNode, ComponentProps } from 'react';
|
|
6
6
|
import { Sizes } from '@m4l/styles';
|
|
7
7
|
/**
|
|
8
8
|
* Props for the WidgetBaseThreeValues component.
|
|
@@ -16,6 +16,8 @@ export interface WidgetBaseThreeValuesProps {
|
|
|
16
16
|
tooltip?: string;
|
|
17
17
|
isAlarm?: boolean;
|
|
18
18
|
menuActions?: MenuAction[];
|
|
19
|
+
/** Observe the native menu lifecycle; consumers should handle repeated notifications. */
|
|
20
|
+
onMenuActionsOpen?: ComponentProps<typeof MenuActions>['onOpen'];
|
|
19
21
|
sx?: SxProps<Theme>;
|
|
20
22
|
}
|
|
21
23
|
export type WidgetBaseThreeValuesSlotsType = keyof typeof WidgetBaseThreeValuesSlots;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,sCAAsC,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetBaseThreeValues/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,sCAAsC,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED,MAAM,MAAM,8BAA8B,GAAG,MAAM,OAAO,0BAA0B,CAAC;AACrF,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,CAAC,8BAA8B,EAAE,OAAO,sCAAsC,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -14,8 +14,9 @@ import { WidgetDigitalInputProps } from './types';
|
|
|
14
14
|
* @param tooltip - Tooltip of the widget.
|
|
15
15
|
* @param isAlarm - Is alarm of the widget.
|
|
16
16
|
* @param menuActions - Menu actions of the widget.
|
|
17
|
+
* @param onMenuActionsOpen - Observe opening and closing of the actions menu.
|
|
17
18
|
* @param sx - System styles applied to the widget root container.
|
|
18
19
|
*/
|
|
19
|
-
export declare function WidgetDigitalInput({ title, isOpen, titleOpen, titleClosed, imageUrlOpen, imageUrlClosed, secondValue, chipColorOpen, size, tooltip, isAlarm, menuActions, sx, }: WidgetDigitalInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function WidgetDigitalInput({ title, isOpen, titleOpen, titleClosed, imageUrlOpen, imageUrlClosed, secondValue, chipColorOpen, size, tooltip, isAlarm, menuActions, onMenuActionsOpen, sx, }: WidgetDigitalInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
21
|
export default WidgetDigitalInput;
|
|
21
22
|
//# sourceMappingURL=WidgetDigitalInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetDigitalInput.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetDigitalInput/WidgetDigitalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAQrF
|
|
1
|
+
{"version":3,"file":"WidgetDigitalInput.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetDigitalInput/WidgetDigitalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAQrF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,MAAM,EACN,SAAS,EACT,WAAW,EACX,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAsB,EACtB,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,EAAE,GACH,EAAE,uBAAuB,oDA0CzB;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { WidgetDigitalInputRootStyled as
|
|
3
|
-
import { WidgetBaseThreeValues as
|
|
4
|
-
import { useGetValues as
|
|
5
|
-
function
|
|
2
|
+
import { WidgetDigitalInputRootStyled as V, WidgetDigitalInputSecondValueStyled as W } from "./slots/WidgetDigitalInputSlots.js";
|
|
3
|
+
import { WidgetBaseThreeValues as h } from "../WidgetBaseThreeValues/WidgetBaseThreeValues.js";
|
|
4
|
+
import { useGetValues as D } from "./hooks/useGetValues.js";
|
|
5
|
+
function B({
|
|
6
6
|
title: o,
|
|
7
7
|
isOpen: r,
|
|
8
8
|
titleOpen: a,
|
|
@@ -15,12 +15,13 @@ function j({
|
|
|
15
15
|
tooltip: f,
|
|
16
16
|
isAlarm: m,
|
|
17
17
|
menuActions: g,
|
|
18
|
-
|
|
18
|
+
onMenuActionsOpen: p,
|
|
19
|
+
sx: s
|
|
19
20
|
}) {
|
|
20
21
|
const [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
] =
|
|
22
|
+
c,
|
|
23
|
+
S
|
|
24
|
+
] = D({
|
|
24
25
|
isOpen: r,
|
|
25
26
|
titleOpen: a,
|
|
26
27
|
titleClosed: l,
|
|
@@ -29,23 +30,24 @@ function j({
|
|
|
29
30
|
imageUrlClosed: u,
|
|
30
31
|
size: t
|
|
31
32
|
});
|
|
32
|
-
return /* @__PURE__ */ e(
|
|
33
|
-
|
|
33
|
+
return /* @__PURE__ */ e(V, { sx: s, children: /* @__PURE__ */ e(
|
|
34
|
+
h,
|
|
34
35
|
{
|
|
35
36
|
title: o,
|
|
36
|
-
leftValue:
|
|
37
|
-
firstValue:
|
|
38
|
-
secondValue: i && /* @__PURE__ */ e(
|
|
37
|
+
leftValue: S,
|
|
38
|
+
firstValue: c,
|
|
39
|
+
secondValue: i && /* @__PURE__ */ e(W, { ownerState: {
|
|
39
40
|
size: t
|
|
40
41
|
}, children: i }),
|
|
41
42
|
size: t,
|
|
42
43
|
tooltip: f,
|
|
43
44
|
isAlarm: m,
|
|
44
|
-
menuActions: g
|
|
45
|
+
menuActions: g,
|
|
46
|
+
onMenuActionsOpen: p
|
|
45
47
|
}
|
|
46
48
|
) });
|
|
47
49
|
}
|
|
48
50
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
B as WidgetDigitalInput,
|
|
52
|
+
B as default
|
|
51
53
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { WidgetDigitalInputSlots } from './slots/WidgetDigitalInputEnum';
|
|
2
2
|
import { WIDGET_DIGITAL_INPUT_KEY_COMPONENT } from './constants';
|
|
3
|
-
import { M4LOverridesStyleRules, MenuAction } from '@m4l/components';
|
|
3
|
+
import { M4LOverridesStyleRules, MenuAction, MenuActions } from '@m4l/components';
|
|
4
4
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
5
5
|
import { Sizes, ChipColorOptions } from '@m4l/styles';
|
|
6
|
-
import { ReactElement } from 'react';
|
|
6
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Image resource accepted by the digital input card state.
|
|
9
9
|
*/
|
|
10
10
|
export type WidgetDigitalInputImageResource = string | ReactElement;
|
|
11
11
|
/**
|
|
@@ -24,6 +24,8 @@ export interface WidgetDigitalInputProps {
|
|
|
24
24
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
25
25
|
tooltip?: string;
|
|
26
26
|
menuActions?: MenuAction[];
|
|
27
|
+
/** Observe the native menu lifecycle; consumers should handle repeated notifications. */
|
|
28
|
+
onMenuActionsOpen?: ComponentProps<typeof MenuActions>['onOpen'];
|
|
27
29
|
sx?: SxProps<Theme>;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetDigitalInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/widgets/src/cards/WidgetDigitalInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,MAAM,GAAG,YAAY,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;I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