@m4l/gclick 0.7.0 → 0.8.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/components/indicators/IndicatorBattery/IndicatorBattery.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/IndicatorBattery.js +94 -62
- package/components/indicators/IndicatorBattery/IndicatorBattery.styles.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/IndicatorBattery.styles.js +25 -10
- package/components/indicators/IndicatorBattery/constants.d.ts +1 -1
- package/components/indicators/IndicatorBattery/constants.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/dictionary.d.ts +2 -0
- package/components/indicators/IndicatorBattery/dictionary.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/dictionary.js +4 -2
- package/components/indicators/IndicatorBattery/hooks/useBatteryStatus/constants.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/hooks/useBatteryStatus/constants.js +6 -3
- package/components/indicators/IndicatorBattery/hooks/useBatteryStatus/types.d.ts +3 -1
- package/components/indicators/IndicatorBattery/hooks/useBatteryStatus/types.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/hooks/useBatteryStatus/useBatteryStatus.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/hooks/useBatteryStatus/useBatteryStatus.js +89 -36
- package/components/indicators/IndicatorBattery/index.d.ts +1 -0
- package/components/indicators/IndicatorBattery/index.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/slots/IndicatorBaterySlots.d.ts +12 -9
- package/components/indicators/IndicatorBattery/slots/IndicatorBaterySlots.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/slots/IndicatorBaterySlots.js +43 -39
- package/components/indicators/IndicatorBattery/slots/IndicatorBatteryEnum.d.ts +1 -0
- package/components/indicators/IndicatorBattery/slots/IndicatorBatteryEnum.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/slots/IndicatorBatteryEnum.js +1 -1
- package/components/indicators/IndicatorBattery/types.d.ts +23 -0
- package/components/indicators/IndicatorBattery/types.d.ts.map +1 -1
- package/components/indicators/IndicatorBattery/types.js +8 -0
- package/index.js +74 -72
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndicatorBattery.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/IndicatorBattery.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8B,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAc5E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,
|
|
1
|
+
{"version":3,"file":"IndicatorBattery.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/IndicatorBattery.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8B,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAc5E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,qDAwJ5D,CAAC"}
|
|
@@ -1,85 +1,117 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { IndicatorBatteryRootStyled as
|
|
3
|
-
import { useModuleDictionary as
|
|
4
|
-
import { INDICATOR_BATTERY_DICTIONARY as
|
|
5
|
-
import { Chip as
|
|
6
|
-
import {
|
|
7
|
-
import { useBatteryStatus as
|
|
8
|
-
import { INDICATOR_BATTERY_CLASSES as
|
|
9
|
-
import
|
|
10
|
-
import { IndicatorBatterySlots as
|
|
11
|
-
import { getPropDataTestId as
|
|
12
|
-
import { INDICATOR_BATTERY_ICONS as
|
|
13
|
-
import { useMemo as
|
|
14
|
-
import { GaugeCircular as
|
|
15
|
-
const
|
|
16
|
-
const { getLabel:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
1
|
+
import { jsx as t, jsxs as a, Fragment as S } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { IndicatorBatteryRootStyled as E, TitleStyled as f, ContentStyled as M, IconStyled as C, StatusVoltageContainerStyled as R, StatusContainerStyled as b, VoltageContainerStyled as I, ContainerTitleBatteryPorcentageStyled as V, ContainerIconPercentageStyled as O, ContainerStatusVoltageStyled as $ } from "./slots/IndicatorBaterySlots.js";
|
|
3
|
+
import { useModuleDictionary as L, useEnvironment as F } from "@m4l/core";
|
|
4
|
+
import { INDICATOR_BATTERY_DICTIONARY as n } from "./dictionary.js";
|
|
5
|
+
import { Chip as T } from "@m4l/components";
|
|
6
|
+
import { Typography as r } from "@m4l/base";
|
|
7
|
+
import { useBatteryStatus as Y } from "./hooks/useBatteryStatus/useBatteryStatus.js";
|
|
8
|
+
import { INDICATOR_BATTERY_CLASSES as h, INDICATOR_BATTERY_KEY_COMPONENT as P } from "./constants.js";
|
|
9
|
+
import w from "clsx";
|
|
10
|
+
import { IndicatorBatterySlots as j } from "./slots/IndicatorBatteryEnum.js";
|
|
11
|
+
import { getPropDataTestId as G } from "../../../utils/testIds.js";
|
|
12
|
+
import { INDICATOR_BATTERY_ICONS as k } from "./icons.js";
|
|
13
|
+
import { useMemo as W } from "react";
|
|
14
|
+
import { GaugeCircular as J } from "../../GaugeCircular/GaugeCircular.js";
|
|
15
|
+
const ot = (e) => {
|
|
16
|
+
const { getLabel: o } = L(), { host_static_assets: v, environment_assets: x } = F(), {
|
|
17
|
+
batteryType: g = "main",
|
|
18
|
+
charging: d = !1,
|
|
19
|
+
className: A,
|
|
20
|
+
dataTestId: D,
|
|
21
|
+
level: l,
|
|
22
|
+
value: i,
|
|
23
|
+
variant: N = "standard"
|
|
24
|
+
} = e, _ = W(() => "type" in e ? { status: e.status, value: e.value, type: e.type } : {
|
|
25
|
+
status: e.status,
|
|
26
|
+
value: e.value,
|
|
27
|
+
maxVoltage: e.maxVoltage,
|
|
28
|
+
minVoltage: e.minVoltage,
|
|
29
|
+
valueLoss: e.valueLoss,
|
|
30
|
+
valueWeak: e.valueWeak,
|
|
31
|
+
valueAcceptable: e.valueAcceptable,
|
|
32
|
+
valueGood: e.valueGood,
|
|
33
|
+
valueExcellent: e.valueExcellent
|
|
34
|
+
}, [e]), {
|
|
35
|
+
color: y,
|
|
36
|
+
label: p,
|
|
37
|
+
maxVoltage: c
|
|
38
|
+
} = Y(_), s = { color: y, isCharging: d }, m = d ? o(n.statusCharging) : void 0, u = W(() => {
|
|
39
|
+
if (l != null && l >= 0)
|
|
40
|
+
return Math.min(100, Math.ceil(l));
|
|
41
|
+
if (i == null || i < 0)
|
|
26
42
|
return 0;
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
return Math.ceil(
|
|
43
|
+
if (c && c > 0) {
|
|
44
|
+
const B = i * 100 / c;
|
|
45
|
+
return Math.ceil(B);
|
|
30
46
|
}
|
|
31
|
-
return Math.ceil(
|
|
32
|
-
}, [
|
|
47
|
+
return Math.ceil(i);
|
|
48
|
+
}, [l, i, c]);
|
|
33
49
|
return /* @__PURE__ */ t(
|
|
34
|
-
|
|
50
|
+
E,
|
|
35
51
|
{
|
|
36
|
-
className:
|
|
52
|
+
className: w(h.root, A),
|
|
37
53
|
variant: "text",
|
|
38
54
|
role: "progressbar",
|
|
39
55
|
"aria-label": "indicator-battery",
|
|
40
|
-
"aria-valuenow":
|
|
56
|
+
"aria-valuenow": u,
|
|
41
57
|
"aria-valuemin": 0,
|
|
42
58
|
"aria-valuemax": 100,
|
|
43
59
|
direction: "column",
|
|
44
60
|
padding: "standard",
|
|
45
|
-
...
|
|
46
|
-
children:
|
|
47
|
-
/* @__PURE__ */ t(
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */ t(
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
...G(P, j.root, D),
|
|
62
|
+
children: N === "standard" ? /* @__PURE__ */ a(S, { children: [
|
|
63
|
+
/* @__PURE__ */ t(f, { variant: "captionDens", skeletonWidth: "80px", children: o(g === "main" ? n.titleMain : n.titleBackup) }),
|
|
64
|
+
/* @__PURE__ */ a(M, { ownerState: s, children: [
|
|
65
|
+
/* @__PURE__ */ a(J, { value: u, children: [
|
|
66
|
+
d && /* @__PURE__ */ t(
|
|
67
|
+
C,
|
|
68
|
+
{
|
|
69
|
+
src: `${v}/${x}/${k.batteryStandard}`,
|
|
70
|
+
ownerState: s,
|
|
71
|
+
ariaLabel: m,
|
|
72
|
+
tooltipContent: m
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "flex-end", justifyContent: "center", gap: "2px" }, children: [
|
|
76
|
+
/* @__PURE__ */ t(r, { variant: "subtitleStandard", fontFamily: "Jura", color: "text.primary", skeletonWidth: "20px", children: `${u ?? 0}` }),
|
|
53
77
|
/* @__PURE__ */ t(r, { variant: "bodyStandard", fontFamily: "Jura", color: "text.primary", skeletonWidth: "10px", children: "%" })
|
|
54
78
|
] })
|
|
55
79
|
] }),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children:
|
|
59
|
-
/* @__PURE__ */ t(
|
|
80
|
+
/* @__PURE__ */ a(R, { children: [
|
|
81
|
+
/* @__PURE__ */ a(b, { direction: "row", children: [
|
|
82
|
+
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children: o(n.status) }),
|
|
83
|
+
/* @__PURE__ */ t(T, { label: p, color: y, variant: "contained", skeletonWidth: "70px" })
|
|
60
84
|
] }),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children:
|
|
63
|
-
/* @__PURE__ */ t(r, { variant: "bodyDens", fontFamily: "Inter", color: "text.primary", skeletonWidth: "20px", children:
|
|
85
|
+
/* @__PURE__ */ a(I, { direction: "row", children: [
|
|
86
|
+
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children: o(n.voltage) }),
|
|
87
|
+
/* @__PURE__ */ t(r, { variant: "bodyDens", fontFamily: "Inter", color: "text.primary", skeletonWidth: "20px", children: i })
|
|
64
88
|
] })
|
|
65
89
|
] })
|
|
66
90
|
] })
|
|
67
|
-
] }) : /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */ t(
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */ t(
|
|
72
|
-
|
|
91
|
+
] }) : /* @__PURE__ */ a(S, { children: [
|
|
92
|
+
/* @__PURE__ */ a(V, { ownerState: s, children: [
|
|
93
|
+
/* @__PURE__ */ t(f, { variant: "captionDens", skeletonWidth: "80px", children: o(g === "main" ? n.titleMain : n.titleBackup) }),
|
|
94
|
+
/* @__PURE__ */ a(O, { children: [
|
|
95
|
+
d && /* @__PURE__ */ t(
|
|
96
|
+
C,
|
|
97
|
+
{
|
|
98
|
+
src: `${v}/${x}/${k.batteryCompact}`,
|
|
99
|
+
ownerState: s,
|
|
100
|
+
ariaLabel: m,
|
|
101
|
+
tooltipContent: m
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ t(r, { variant: "subtitleDens", fontFamily: "Jura", color: "text.primary", skeletonWidth: "20px", children: `${u ?? 0}%` })
|
|
73
105
|
] })
|
|
74
106
|
] }),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children:
|
|
78
|
-
/* @__PURE__ */ t(
|
|
107
|
+
/* @__PURE__ */ a($, { children: [
|
|
108
|
+
/* @__PURE__ */ a(b, { className: h.statusContainer, children: [
|
|
109
|
+
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children: o(n.status) }),
|
|
110
|
+
/* @__PURE__ */ t(T, { label: p, color: y, variant: "contained", skeletonWidth: "70px" })
|
|
79
111
|
] }),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children:
|
|
82
|
-
/* @__PURE__ */ t(r, { variant: "bodyDens", fontFamily: "Inter", color: "text.primary", skeletonWidth: "20px", children:
|
|
112
|
+
/* @__PURE__ */ a(I, { className: h.voltageContainer, children: [
|
|
113
|
+
/* @__PURE__ */ t(r, { variant: "bodyStandard", color: "text.secondary", skeletonWidth: "70px", children: o(n.voltage) }),
|
|
114
|
+
/* @__PURE__ */ t(r, { variant: "bodyDens", fontFamily: "Inter", color: "text.primary", skeletonWidth: "20px", children: i })
|
|
83
115
|
] })
|
|
84
116
|
] })
|
|
85
117
|
] })
|
|
@@ -87,5 +119,5 @@ const rt = (a) => {
|
|
|
87
119
|
);
|
|
88
120
|
};
|
|
89
121
|
export {
|
|
90
|
-
|
|
122
|
+
ot as IndicatorBattery
|
|
91
123
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndicatorBattery.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/IndicatorBattery.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"IndicatorBattery.styles.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/IndicatorBattery.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAgBjD,eAAO,MAAM,sBAAsB,EAAE,sBAqHpC,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { INDICATOR_BATTERY_CLASSES as a } from "./constants.js";
|
|
2
|
-
const
|
|
2
|
+
const s = {
|
|
3
|
+
"@keyframes indicatorBatteryChargingPulse": {
|
|
4
|
+
"0%, 100%": {
|
|
5
|
+
opacity: 1,
|
|
6
|
+
transform: "scale(1)"
|
|
7
|
+
},
|
|
8
|
+
"50%": {
|
|
9
|
+
opacity: 0.55,
|
|
10
|
+
transform: "scale(0.96)"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
animation: "indicatorBatteryChargingPulse 1.6s ease-in-out infinite"
|
|
14
|
+
}, i = {
|
|
3
15
|
/**
|
|
4
16
|
* Contenedor del indicador de batería
|
|
5
17
|
*/
|
|
@@ -18,15 +30,21 @@ const n = {
|
|
|
18
30
|
justifyContent: "center",
|
|
19
31
|
display: "flex"
|
|
20
32
|
}),
|
|
33
|
+
/**
|
|
34
|
+
* Battery icon styles, including the charging pulse when active.
|
|
35
|
+
*/
|
|
36
|
+
icon: ({ theme: e, ownerState: t }) => ({
|
|
37
|
+
"& .M4LIcon-icon": {
|
|
38
|
+
backgroundColor: e.vars.palette.chips[t?.color ?? "default"].outlined.colorTone,
|
|
39
|
+
...t?.isCharging ? s : {}
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
21
42
|
/**
|
|
22
43
|
* Contenedor del gauge y los datos de la batería
|
|
23
44
|
*/
|
|
24
45
|
content: ({ theme: e, ownerState: t }) => ({
|
|
25
46
|
display: "flex",
|
|
26
47
|
gap: e.vars.size.baseSpacings.sp5,
|
|
27
|
-
"& .M4LIcon-icon": {
|
|
28
|
-
backgroundColor: e.vars.palette.chips[t?.color ?? "default"].outlined.colorTone
|
|
29
|
-
},
|
|
30
48
|
"&&& .circular-progress-circle": {
|
|
31
49
|
stroke: `${e.vars.palette.chips[t?.color ?? "default"].outlined.colorTone}!important`
|
|
32
50
|
}
|
|
@@ -64,15 +82,12 @@ const n = {
|
|
|
64
82
|
/**
|
|
65
83
|
* Contenedor del título de la batería y el porcentaje
|
|
66
84
|
*/
|
|
67
|
-
containerTitleBatteryPorcentage: ({ theme: e
|
|
85
|
+
containerTitleBatteryPorcentage: ({ theme: e }) => ({
|
|
68
86
|
width: "100%",
|
|
69
87
|
display: "flex",
|
|
70
88
|
justifyContent: "space-between",
|
|
71
89
|
alignItems: "center",
|
|
72
|
-
gap: e.vars.size.baseSpacings.sp4
|
|
73
|
-
"& .M4LIcon-icon": {
|
|
74
|
-
backgroundColor: e.vars.palette.chips[t?.color ?? "default"].outlined.colorTone
|
|
75
|
-
}
|
|
90
|
+
gap: e.vars.size.baseSpacings.sp4
|
|
76
91
|
}),
|
|
77
92
|
/**
|
|
78
93
|
* Contenedor del estado de la batería y el voltaje
|
|
@@ -106,5 +121,5 @@ const n = {
|
|
|
106
121
|
})
|
|
107
122
|
};
|
|
108
123
|
export {
|
|
109
|
-
|
|
124
|
+
i as indicatorBatteryStyles
|
|
110
125
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const INDICATOR_BATTERY_KEY_COMPONENT = "M4LIndicatorBattery";
|
|
2
|
-
export declare const INDICATOR_BATTERY_CLASSES: Record<"root" | "title" | "content" | "voltageStatusContainer" | "statusContainer" | "voltageContainer" | "containerTitleBatteryPorcentage" | "containerStatusVoltage" | "containerIconPercentage", string>;
|
|
2
|
+
export declare const INDICATOR_BATTERY_CLASSES: Record<"root" | "title" | "content" | "icon" | "voltageStatusContainer" | "statusContainer" | "voltageContainer" | "containerTitleBatteryPorcentage" | "containerStatusVoltage" | "containerIconPercentage", string>;
|
|
3
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,+BAA+B,wBAAwB,CAAC;AAErE,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,+BAA+B,wBAAwB,CAAC;AAErE,eAAO,MAAM,yBAAyB,sNAA8E,CAAC"}
|
|
@@ -5,10 +5,12 @@ export declare const INDICATOR_BATTERY_DICTIONARY: {
|
|
|
5
5
|
titleBackup: string;
|
|
6
6
|
status: string;
|
|
7
7
|
voltage: string;
|
|
8
|
+
statusLoss: string;
|
|
8
9
|
statusWeak: string;
|
|
9
10
|
statusAcceptable: string;
|
|
10
11
|
statusGood: string;
|
|
11
12
|
statusExcellent: string;
|
|
13
|
+
statusCharging: string;
|
|
12
14
|
statusNotDetectable: string;
|
|
13
15
|
statusOverVoltage: string;
|
|
14
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/dictionary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAEpE,eAAO,MAAM,uCAAuC,gBAEnD,CAAC;AAGF,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/dictionary.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAEpE,eAAO,MAAM,uCAAuC,gBAEnD,CAAC;AAGF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;CAaxC,CAAC"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
const t = "indicator_battery", a = () => [t],
|
|
1
|
+
const t = "indicator_battery", a = () => [t], s = {
|
|
2
2
|
titleMain: `${t}.title_main`,
|
|
3
3
|
titleBackup: `${t}.title_backup`,
|
|
4
4
|
status: `${t}.label_status`,
|
|
5
5
|
voltage: `${t}.label_voltage`,
|
|
6
|
+
statusLoss: `${t}.label_status_loss`,
|
|
6
7
|
statusWeak: `${t}.label_status_weak`,
|
|
7
8
|
statusAcceptable: `${t}.label_status_acceptable`,
|
|
8
9
|
statusGood: `${t}.label_status_good`,
|
|
9
10
|
statusExcellent: `${t}.label_status_excellent`,
|
|
11
|
+
statusCharging: `${t}.label_status_charging`,
|
|
10
12
|
statusNotDetectable: `${t}.label_status_not_detectable`,
|
|
11
13
|
statusOverVoltage: `${t}.label_status_over_voltage`
|
|
12
14
|
};
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
s as INDICATOR_BATTERY_DICTIONARY,
|
|
15
17
|
t as INDICATOR_BATTERY_DICTIONARY_KEY,
|
|
16
18
|
a as getIndicatorBatteryComponentsDictionary
|
|
17
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/hooks/useBatteryStatus/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAAE,CAAC;CACpD,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/hooks/useBatteryStatus/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAAE,CAAC;CACpD,CAkCA,CAAC"}
|
|
@@ -5,7 +5,8 @@ const a = {
|
|
|
5
5
|
{ min: 25.2, max: 27.9, label: "statusExcellent", color: "persianGreen" },
|
|
6
6
|
{ min: 24.8, max: 25.1, label: "statusGood", color: "info" },
|
|
7
7
|
{ min: 24.4, max: 24.7, label: "statusAcceptable", color: "warning" },
|
|
8
|
-
{ min:
|
|
8
|
+
{ min: 23, max: 24.3, label: "statusWeak", color: "error" },
|
|
9
|
+
{ min: 0, max: 23, label: "statusLoss", color: "error" }
|
|
9
10
|
/* { min: 28.0, max: 29.0, label: 'statusOverVoltage', color: 'candy' }, */
|
|
10
11
|
]
|
|
11
12
|
},
|
|
@@ -15,7 +16,8 @@ const a = {
|
|
|
15
16
|
{ min: 12.6, max: 13.9, label: "statusExcellent", color: "persianGreen" },
|
|
16
17
|
{ min: 12.4, max: 12.5, label: "statusGood", color: "info" },
|
|
17
18
|
{ min: 12.2, max: 12.3, label: "statusAcceptable", color: "warning" },
|
|
18
|
-
{ min:
|
|
19
|
+
{ min: 11.5, max: 12.1, label: "statusWeak", color: "error" },
|
|
20
|
+
{ min: 0, max: 11.5, label: "statusLoss", color: "error" }
|
|
19
21
|
/* { min: 14.0, max: 14.5, label: 'statusOverVoltage', color: 'candy' }, */
|
|
20
22
|
]
|
|
21
23
|
},
|
|
@@ -25,7 +27,8 @@ const a = {
|
|
|
25
27
|
{ min: 4.2, max: 5.1, label: "statusExcellent", color: "persianGreen" },
|
|
26
28
|
{ min: 4.1, max: 4.1, label: "statusGood", color: "info" },
|
|
27
29
|
{ min: 3.9, max: 4, label: "statusAcceptable", color: "warning" },
|
|
28
|
-
{ min:
|
|
30
|
+
{ min: 3.6, max: 3.8, label: "statusWeak", color: "error" },
|
|
31
|
+
{ min: 0, max: 3.6, label: "statusLoss", color: "error" }
|
|
29
32
|
/* { min: 5.2, max: 5.5, label: 'statusOverVoltage', color: 'candy' }, */
|
|
30
33
|
]
|
|
31
34
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { ChipColorOptions } from '@m4l/styles';
|
|
2
2
|
import { INDICATOR_BATTERY_DICTIONARY } from '../../dictionary';
|
|
3
|
-
import { IndicatorBatteryProps } from '../../types';
|
|
3
|
+
import { IndicatorBatteryProps, IndicatorBatteryPropsWithoutType } from '../../types';
|
|
4
4
|
export interface UseBatteryStatusProps {
|
|
5
5
|
value?: IndicatorBatteryProps['value'];
|
|
6
|
+
status?: IndicatorBatteryProps['status'];
|
|
6
7
|
maxVoltage?: Extract<IndicatorBatteryProps, {
|
|
7
8
|
maxVoltage: number;
|
|
8
9
|
}>['maxVoltage'];
|
|
9
10
|
minVoltage?: Extract<IndicatorBatteryProps, {
|
|
10
11
|
minVoltage: number;
|
|
11
12
|
}>['minVoltage'];
|
|
13
|
+
valueLoss?: IndicatorBatteryPropsWithoutType['valueLoss'];
|
|
12
14
|
valueWeak?: Extract<IndicatorBatteryProps, {
|
|
13
15
|
valueWeak: number;
|
|
14
16
|
}>['valueWeak'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/hooks/useBatteryStatus/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/hooks/useBatteryStatus/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAEtF,MAAM,WAAW,qBAAqB;IAEpC,KAAK,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC,qBAAqB,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,YAAY,CAAC,CAAC;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC,qBAAqB,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,YAAY,CAAC,CAAC;IAClF,SAAS,CAAC,EAAE,gCAAgC,CAAC,WAAW,CAAC,CAAC;IAC1D,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,WAAW,CAAC,CAAC;IAC/E,eAAe,CAAC,EAAE,OAAO,CAAC,qBAAqB,EAAE;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACjG,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,WAAW,CAAC,CAAC;IAC/E,cAAc,CAAC,EAAE,OAAO,CAAC,qBAAqB,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC9F,IAAI,CAAC,EAAE,OAAO,CAAC,qBAAqB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,MAAM,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,OAAO,4BAA4B,CAAC;IACjD,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAGD,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,gBAAgB,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA"}
|
package/components/indicators/IndicatorBattery/hooks/useBatteryStatus/useBatteryStatus.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBatteryStatus.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/hooks/useBatteryStatus/useBatteryStatus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBatteryStatus.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/hooks/useBatteryStatus/useBatteryStatus.ts"],"names":[],"mappings":"AAQA,OAAO,EAAoB,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAoD1F;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,KAAG,sBAmG/D,CAAC"}
|
|
@@ -1,53 +1,106 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { useMemo as h } from "react";
|
|
2
|
+
import { useModuleDictionary as S } from "@m4l/core";
|
|
3
|
+
import { INDICATOR_BATTERY_DICTIONARY as n } from "../../dictionary.js";
|
|
4
|
+
import { INDICATOR_BATTERY_SEMANTIC_STATUS as x } from "../../types.js";
|
|
5
|
+
import { BATTERY_THRESHOLDS as v } from "./constants.js";
|
|
6
|
+
const A = 100;
|
|
7
|
+
function E(s, t) {
|
|
8
|
+
return s.find(({ min: l, max: e }) => l === 0 ? t >= l && t <= e : t > l && t <= e);
|
|
9
|
+
}
|
|
10
|
+
function V(s) {
|
|
11
|
+
switch (s) {
|
|
12
|
+
case x.BATTERY_LOSS:
|
|
9
13
|
return {
|
|
10
|
-
|
|
14
|
+
color: "error",
|
|
15
|
+
label: "statusLoss"
|
|
16
|
+
};
|
|
17
|
+
case x.BATTERY_LOW:
|
|
18
|
+
return {
|
|
19
|
+
color: "error",
|
|
20
|
+
label: "statusWeak"
|
|
21
|
+
};
|
|
22
|
+
case x.BATTERY_NORMAL:
|
|
23
|
+
return {
|
|
24
|
+
color: "persianGreen",
|
|
25
|
+
label: "statusExcellent"
|
|
26
|
+
};
|
|
27
|
+
default:
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const D = (s) => {
|
|
32
|
+
const { getLabel: t } = S(), {
|
|
33
|
+
status: l,
|
|
34
|
+
value: e,
|
|
35
|
+
maxVoltage: a,
|
|
36
|
+
minVoltage: g,
|
|
37
|
+
valueLoss: c,
|
|
38
|
+
valueWeak: u,
|
|
39
|
+
valueAcceptable: i,
|
|
40
|
+
valueGood: m,
|
|
41
|
+
valueExcellent: b,
|
|
42
|
+
type: d
|
|
43
|
+
} = s, o = d && d in v ? v[d] : void 0;
|
|
44
|
+
return h(() => {
|
|
45
|
+
const f = V(l);
|
|
46
|
+
if (f)
|
|
47
|
+
return {
|
|
48
|
+
label: t(n[f.label]),
|
|
49
|
+
color: f.color,
|
|
50
|
+
maxVoltage: o?.maxVoltage ?? a ?? A
|
|
51
|
+
};
|
|
52
|
+
if (e == null || e < 0)
|
|
53
|
+
return {
|
|
54
|
+
label: t(n.statusNotDetectable),
|
|
11
55
|
color: "default",
|
|
12
|
-
maxVoltage:
|
|
56
|
+
maxVoltage: o?.maxVoltage ?? a ?? A
|
|
13
57
|
};
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
);
|
|
18
|
-
if (e)
|
|
58
|
+
if (o) {
|
|
59
|
+
const r = E(o.thresholds, e);
|
|
60
|
+
if (r)
|
|
19
61
|
return {
|
|
20
|
-
label:
|
|
21
|
-
color:
|
|
22
|
-
maxVoltage:
|
|
62
|
+
label: t(n[r.label]),
|
|
63
|
+
color: r.color,
|
|
64
|
+
maxVoltage: o.maxVoltage
|
|
23
65
|
};
|
|
24
|
-
} else if (
|
|
25
|
-
const
|
|
26
|
-
maxVoltage:
|
|
66
|
+
} else if (a !== void 0 && g !== void 0 && c !== void 0 && u !== void 0 && i !== void 0 && m !== void 0 && b !== void 0) {
|
|
67
|
+
const r = {
|
|
68
|
+
maxVoltage: a,
|
|
27
69
|
thresholds: [
|
|
28
|
-
{ min: 0, max:
|
|
29
|
-
{ min:
|
|
30
|
-
{ min:
|
|
31
|
-
{ min:
|
|
32
|
-
{ min:
|
|
70
|
+
{ min: 0, max: c, label: "statusLoss", color: "error" },
|
|
71
|
+
{ min: c, max: u, label: "statusWeak", color: "error" },
|
|
72
|
+
{ min: u, max: i, label: "statusAcceptable", color: "warning" },
|
|
73
|
+
{ min: i, max: m, label: "statusGood", color: "info" },
|
|
74
|
+
{ min: m, max: b, label: "statusExcellent", color: "persianGreen" },
|
|
75
|
+
{ min: b, max: 999, label: "statusExcellent", color: "persianGreen" }
|
|
33
76
|
/* { min: maxVoltage, max: 999, label: 'statusOverVoltage' as keyof typeof INDICATOR_BATTERY_DICTIONARY, color: 'candy' as ChipColorOptions }, */
|
|
34
77
|
]
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
);
|
|
38
|
-
if (e)
|
|
78
|
+
}, T = E(r.thresholds, e);
|
|
79
|
+
if (T)
|
|
39
80
|
return {
|
|
40
|
-
label:
|
|
41
|
-
color:
|
|
42
|
-
maxVoltage:
|
|
81
|
+
label: t(n[T.label]),
|
|
82
|
+
color: T.color,
|
|
83
|
+
maxVoltage: r.maxVoltage
|
|
43
84
|
};
|
|
44
85
|
}
|
|
45
86
|
return {
|
|
46
|
-
label:
|
|
87
|
+
label: t(n.statusNotDetectable),
|
|
47
88
|
color: "default",
|
|
48
|
-
maxVoltage:
|
|
89
|
+
maxVoltage: o?.maxVoltage ?? a ?? A
|
|
49
90
|
};
|
|
50
|
-
}, [
|
|
91
|
+
}, [
|
|
92
|
+
t,
|
|
93
|
+
a,
|
|
94
|
+
g,
|
|
95
|
+
o,
|
|
96
|
+
l,
|
|
97
|
+
e,
|
|
98
|
+
i,
|
|
99
|
+
b,
|
|
100
|
+
m,
|
|
101
|
+
c,
|
|
102
|
+
u
|
|
103
|
+
]);
|
|
51
104
|
};
|
|
52
105
|
export {
|
|
53
106
|
D as useBatteryStatus
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,uCAAuC,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,uCAAuC,EAAE,MAAM,cAAc,CAAC;AACvE,cAAc,SAAS,CAAC"}
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
export declare const IndicatorBatteryRootStyled: import('@emotion/styled').StyledComponent<Pick<import('@m4l/components').CardProps, keyof import('@m4l/components').CardProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
-
ownerState?: (Partial<import('
|
|
2
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
3
3
|
}, {}, {}>;
|
|
4
4
|
export declare const TitleStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../../../../../../dist/packages/@m4l/base/index.d.ts').TypographyProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "border" | "disabled" | "color" | "variant" | "size" | "sx" | "classes" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "ellipsis" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY" | "typography" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "component" | "skeletonWidth" | "skeletonRows" | "dataTestid" | "htmlFor" | keyof import('react').RefAttributes<HTMLSpanElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
-
ownerState?: (Partial<import('
|
|
5
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
+
}, {}, {}>;
|
|
7
|
+
export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../../../../../dist/packages/@m4l/base/index.d.ts').IconProps, keyof import('../../../../../../../dist/packages/@m4l/base/index.d.ts').IconBaseProps | "src" | "icon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
6
9
|
}, {}, {}>;
|
|
7
10
|
export declare const ContentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
|
-
ownerState?: (Partial<import('
|
|
11
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
9
12
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
10
13
|
export declare const StatusVoltageContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
11
|
-
ownerState?: (Partial<import('
|
|
14
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
12
15
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
13
16
|
export declare const StatusContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
14
|
-
ownerState?: (Partial<import('
|
|
17
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
15
18
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
16
19
|
export declare const VoltageContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
17
|
-
ownerState?: (Partial<import('
|
|
20
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
18
21
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
19
22
|
export declare const ContainerTitleBatteryPorcentageStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
20
|
-
ownerState?: (Partial<import('
|
|
23
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
21
24
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
22
25
|
export declare const ContainerStatusVoltageStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
23
|
-
ownerState?: (Partial<import('
|
|
26
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
24
27
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
25
28
|
export declare const ContainerIconPercentageStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
26
|
-
ownerState?: (Partial<import('
|
|
29
|
+
ownerState?: (Partial<import('..').IndicatorBatteryOwnerState> & Record<string, unknown>) | undefined;
|
|
27
30
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
28
31
|
//# sourceMappingURL=IndicatorBaterySlots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndicatorBaterySlots.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/slots/IndicatorBaterySlots.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B;;UAGP,CAAC;AAEjC,eAAO,MAAM,WAAW;;UAGS,CAAC;AAElC,eAAO,MAAM,aAAa;;6NAGS,CAAC;AAEpC,eAAO,MAAM,4BAA4B;;6NAGS,CAAC;AAEnD,eAAO,MAAM,qBAAqB;;6NAGS,CAAC;AAE5C,eAAO,MAAM,sBAAsB;;6NAGS,CAAC;AAG7C,eAAO,MAAM,qCAAqC;;6NAGS,CAAC;AAE5D,eAAO,MAAM,4BAA4B;;6NAGS,CAAC;AAEnD,eAAO,MAAM,6BAA6B;;6NAGS,CAAC"}
|
|
1
|
+
{"version":3,"file":"IndicatorBaterySlots.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/slots/IndicatorBaterySlots.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B;;UAGP,CAAC;AAEjC,eAAO,MAAM,WAAW;;UAGS,CAAC;AAElC,eAAO,MAAM,UAAU;;UAGS,CAAC;AAEjC,eAAO,MAAM,aAAa;;6NAGS,CAAC;AAEpC,eAAO,MAAM,4BAA4B;;6NAGS,CAAC;AAEnD,eAAO,MAAM,qBAAqB;;6NAGS,CAAC;AAE5C,eAAO,MAAM,sBAAsB;;6NAGS,CAAC;AAG7C,eAAO,MAAM,qCAAqC;;6NAGS,CAAC;AAE5D,eAAO,MAAM,4BAA4B;;6NAGS,CAAC;AAEnD,eAAO,MAAM,6BAA6B;;6NAGS,CAAC"}
|
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
import { styled as t } from "@mui/material/styles";
|
|
2
2
|
import { Card as a } from "@m4l/components";
|
|
3
|
-
import { Typography as r } from "@m4l/base";
|
|
4
|
-
import { IndicatorBatterySlots as
|
|
5
|
-
import { INDICATOR_BATTERY_KEY_COMPONENT as
|
|
3
|
+
import { Typography as r, Icon as i } from "@m4l/base";
|
|
4
|
+
import { IndicatorBatterySlots as o } from "./IndicatorBatteryEnum.js";
|
|
5
|
+
import { INDICATOR_BATTERY_KEY_COMPONENT as e } from "../constants.js";
|
|
6
6
|
import { indicatorBatteryStyles as n } from "../IndicatorBattery.styles.js";
|
|
7
|
-
const
|
|
8
|
-
name:
|
|
9
|
-
slot:
|
|
10
|
-
})(n?.root),
|
|
11
|
-
name:
|
|
12
|
-
slot:
|
|
13
|
-
})(n?.title),
|
|
14
|
-
name:
|
|
15
|
-
slot:
|
|
16
|
-
})(n?.
|
|
17
|
-
name:
|
|
18
|
-
slot:
|
|
19
|
-
})(n?.
|
|
20
|
-
name:
|
|
21
|
-
slot:
|
|
22
|
-
})(n?.
|
|
23
|
-
name:
|
|
24
|
-
slot:
|
|
25
|
-
})(n?.
|
|
26
|
-
name:
|
|
27
|
-
slot:
|
|
28
|
-
})(n?.
|
|
29
|
-
name:
|
|
30
|
-
slot:
|
|
31
|
-
})(n?.
|
|
32
|
-
name:
|
|
33
|
-
slot:
|
|
7
|
+
const S = t(a, {
|
|
8
|
+
name: e,
|
|
9
|
+
slot: o.root
|
|
10
|
+
})(n?.root), g = t(r, {
|
|
11
|
+
name: e,
|
|
12
|
+
slot: o.title
|
|
13
|
+
})(n?.title), C = t(i, {
|
|
14
|
+
name: e,
|
|
15
|
+
slot: o.icon
|
|
16
|
+
})(n?.icon), v = t("div", {
|
|
17
|
+
name: e,
|
|
18
|
+
slot: o.content
|
|
19
|
+
})(n?.content), p = t("div", {
|
|
20
|
+
name: e,
|
|
21
|
+
slot: o.voltageStatusContainer
|
|
22
|
+
})(n?.voltageStatusContainer), u = t("div", {
|
|
23
|
+
name: e,
|
|
24
|
+
slot: o.statusContainer
|
|
25
|
+
})(n?.statusContainer), I = t("div", {
|
|
26
|
+
name: e,
|
|
27
|
+
slot: o.voltageContainer
|
|
28
|
+
})(n?.voltageContainer), T = t("div", {
|
|
29
|
+
name: e,
|
|
30
|
+
slot: o.containerTitleBatteryPorcentage
|
|
31
|
+
})(n?.containerTitleBatteryPorcentage), B = t("div", {
|
|
32
|
+
name: e,
|
|
33
|
+
slot: o.containerStatusVoltage
|
|
34
|
+
})(n?.containerStatusVoltage), P = t("div", {
|
|
35
|
+
name: e,
|
|
36
|
+
slot: o.containerIconPercentage
|
|
34
37
|
})(n?.containerIconPercentage);
|
|
35
38
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
P as ContainerIconPercentageStyled,
|
|
40
|
+
B as ContainerStatusVoltageStyled,
|
|
41
|
+
T as ContainerTitleBatteryPorcentageStyled,
|
|
42
|
+
v as ContentStyled,
|
|
43
|
+
C as IconStyled,
|
|
44
|
+
S as IndicatorBatteryRootStyled,
|
|
45
|
+
u as StatusContainerStyled,
|
|
46
|
+
p as StatusVoltageContainerStyled,
|
|
47
|
+
g as TitleStyled,
|
|
48
|
+
I as VoltageContainerStyled
|
|
45
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndicatorBatteryEnum.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/slots/IndicatorBatteryEnum.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,sBAAsB,2BAA2B;IACjD,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,+BAA+B,oCAAoC;IACnE,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;CACpD"}
|
|
1
|
+
{"version":3,"file":"IndicatorBatteryEnum.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/slots/IndicatorBatteryEnum.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,sBAAsB,2BAA2B;IACjD,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,+BAA+B,oCAAoC;IACnE,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;CACpD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var n = /* @__PURE__ */ ((e) => (e.root = "root", e.title = "title", e.content = "content", e.voltageStatusContainer = "voltageStatusContainer", e.statusContainer = "statusContainer", e.voltageContainer = "voltageContainer", e.containerTitleBatteryPorcentage = "containerTitleBatteryPorcentage", e.containerStatusVoltage = "containerStatusVoltage", e.containerIconPercentage = "containerIconPercentage", e))(n || {});
|
|
1
|
+
var n = /* @__PURE__ */ ((e) => (e.root = "root", e.title = "title", e.icon = "icon", e.content = "content", e.voltageStatusContainer = "voltageStatusContainer", e.statusContainer = "statusContainer", e.voltageContainer = "voltageContainer", e.containerTitleBatteryPorcentage = "containerTitleBatteryPorcentage", e.containerStatusVoltage = "containerStatusVoltage", e.containerIconPercentage = "containerIconPercentage", e))(n || {});
|
|
2
2
|
export {
|
|
3
3
|
n as IndicatorBatterySlots
|
|
4
4
|
};
|
|
@@ -4,11 +4,29 @@ import { INDICATOR_BATTERY_KEY_COMPONENT } from './constants';
|
|
|
4
4
|
import { Theme } from '@mui/material';
|
|
5
5
|
import { ChipColorOptions } from '@m4l/styles';
|
|
6
6
|
export type IndicatorBatteryType = string;
|
|
7
|
+
export declare const INDICATOR_BATTERY_SEMANTIC_STATUS: {
|
|
8
|
+
readonly BATTERY_NORMAL: 0;
|
|
9
|
+
readonly BATTERY_LOW: 1;
|
|
10
|
+
readonly BATTERY_LOSS: 2;
|
|
11
|
+
};
|
|
12
|
+
export type IndicatorBatterySemanticStatus = typeof INDICATOR_BATTERY_SEMANTIC_STATUS[keyof typeof INDICATOR_BATTERY_SEMANTIC_STATUS];
|
|
7
13
|
export interface IndicatorBatteryBaseProps {
|
|
8
14
|
/**
|
|
9
15
|
* Valor actual de voltaje de la batería
|
|
10
16
|
*/
|
|
11
17
|
value?: number | null;
|
|
18
|
+
/**
|
|
19
|
+
* Nivel actual de batería expresado como porcentaje directo
|
|
20
|
+
*/
|
|
21
|
+
level?: number | null;
|
|
22
|
+
/**
|
|
23
|
+
* Estado semántico directo entregado por el backend
|
|
24
|
+
*/
|
|
25
|
+
status?: IndicatorBatterySemanticStatus | null;
|
|
26
|
+
/**
|
|
27
|
+
* Señal de carga activa independiente del estado semántico de salud
|
|
28
|
+
*/
|
|
29
|
+
charging?: boolean;
|
|
12
30
|
/**
|
|
13
31
|
* Clase del componente
|
|
14
32
|
*/
|
|
@@ -36,6 +54,10 @@ export interface IndicatorBatteryWithTypeProps extends IndicatorBatteryBaseProps
|
|
|
36
54
|
type: IndicatorBatteryType;
|
|
37
55
|
}
|
|
38
56
|
export interface IndicatorBatteryPropsWithoutType extends IndicatorBatteryBaseProps {
|
|
57
|
+
/**
|
|
58
|
+
* Valor máximo para considerar la batería en pérdida
|
|
59
|
+
*/
|
|
60
|
+
valueLoss: number;
|
|
39
61
|
/**
|
|
40
62
|
* Valor de estado para considerarlo como débil
|
|
41
63
|
*/
|
|
@@ -64,6 +86,7 @@ export interface IndicatorBatteryPropsWithoutType extends IndicatorBatteryBasePr
|
|
|
64
86
|
export type IndicatorBatteryProps = IndicatorBatteryWithTypeProps | IndicatorBatteryPropsWithoutType;
|
|
65
87
|
export type IndicatorBatteryOwnerState = {
|
|
66
88
|
color: ChipColorOptions;
|
|
89
|
+
isCharging?: boolean;
|
|
67
90
|
};
|
|
68
91
|
export type IndicatorBatterySlotsType = keyof typeof IndicatorBatterySlots;
|
|
69
92
|
export type IndicatorBatteryStyles = M4LOverridesStyleRules<IndicatorBatterySlotsType, typeof INDICATOR_BATTERY_KEY_COMPONENT, Theme>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/indicators/IndicatorBattery/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,eAAO,MAAM,iCAAiC;;;;CAIpC,CAAC;AAEX,MAAM,MAAM,8BAA8B,GAAG,OAAO,iCAAiC,CAAC,MAAM,OAAO,iCAAiC,CAAC,CAAC;AAEtI,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAChC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC7B;AAED,MAAM,WAAW,6BAA8B,SAAQ,yBAAyB;IAC9E;;;;OAIG;IACH,IAAI,EAAE,oBAAoB,CAAC;CAE5B;AAED,MAAM,WAAW,gCAAiC,SAAQ,yBAAyB;IACjF;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACJ,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,GAAG,gCAAgC,CAAC;AAGrG,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,gBAAgB,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,yBAAyB,EAAE,OAAO,+BAA+B,EAAE,KAAK,CAAC,CAAA"}
|
package/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { isObservableFeatureEventCaptured as r, useObservableFeatureEventHandlers as t } from "./components/maps/components/GpsMap/hooks/useObservableFeatureEventHandlers.js";
|
|
2
2
|
import { getDeviceComponentsDictionary as a } from "./components/Device/dictionary.js";
|
|
3
3
|
import { getDeviceByData as i } from "./components/Device/helpers.js";
|
|
4
|
-
import { getDeviceStatusByData as
|
|
4
|
+
import { getDeviceStatusByData as x } from "./components/Device/helpers/helperDeviceStatus.js";
|
|
5
5
|
import { DEVICE_STATUSES_CONFIG as f } from "./components/Device/hooks/constants.js";
|
|
6
6
|
import { useDeviceStatus as l } from "./components/Device/hooks/useDeviceStatus.js";
|
|
7
7
|
import { Device as C } from "./components/Device/Device.js";
|
|
8
|
-
import { getDeviceStatusComponentsDictionary as
|
|
9
|
-
import { DeviceStatus as
|
|
8
|
+
import { getDeviceStatusComponentsDictionary as T } from "./components/DeviceStatus/dictionary.js";
|
|
9
|
+
import { DeviceStatus as g } from "./components/DeviceStatus/DeviceStatus.js";
|
|
10
10
|
import { DeviceLabel as d } from "./components/DeviceLabel/DeviceLabel.js";
|
|
11
11
|
import { GaugeCircular as E } from "./components/GaugeCircular/GaugeCircular.js";
|
|
12
|
-
import { getCourseDirection as
|
|
12
|
+
import { getCourseDirection as _ } from "./components/formatters/CourseFormatter/helper.js";
|
|
13
13
|
import { getCourseFormatterComponentsDictionary as M } from "./components/formatters/CourseFormatter/dictionary.js";
|
|
14
|
-
import { CourseFormatter as
|
|
15
|
-
import { courseToCssAngle as
|
|
14
|
+
import { CourseFormatter as A } from "./components/formatters/CourseFormatter/CourseFormatter.js";
|
|
15
|
+
import { courseToCssAngle as P } from "./components/maps/utils/courseToCssAngle.js";
|
|
16
16
|
import { GpsMap as G } from "./components/maps/components/GpsMap/GpsMap.js";
|
|
17
17
|
import { MapContext as b, MapProvider as V } from "./components/maps/components/GpsMap/contexts/MapContext/MapContext.js";
|
|
18
|
-
import { getMapComponentsDictionary as
|
|
18
|
+
import { getMapComponentsDictionary as H } from "./components/maps/components/GpsMap/dictionary.js";
|
|
19
19
|
import { LAT_LON_FIXED_DIGITS as h } from "./components/maps/components/GpsMap/constants.js";
|
|
20
|
-
import { createFeatureIndexKey as
|
|
21
|
-
import { INTERACTION_CHANNELS as
|
|
20
|
+
import { createFeatureIndexKey as K, getFeatureFromLayer as Y } from "./components/maps/components/GpsMap/contexts/MapContext/helpers/featureLookup.js";
|
|
21
|
+
import { INTERACTION_CHANNELS as z } from "./components/maps/components/GpsMap/contexts/MapContext/types.js";
|
|
22
22
|
import { MarkerFeatureRender as k } from "./components/maps/components/GpsMap/featureRenders/MarkerFeatureRender/index.js";
|
|
23
23
|
import { PolylineWithArrows as X } from "./components/maps/components/GpsMap/pluginLayers/PolylineWithArrows/index.js";
|
|
24
24
|
import { useFilterDecimation as J } from "./components/maps/components/GpsMap/hooks/useFilterDecimation/useFilterDecimation.js";
|
|
@@ -27,107 +27,109 @@ import { useDisableMapEventsOnMouseOver as oe } from "./components/maps/componen
|
|
|
27
27
|
import { useDisableMapEventsOnFlag as te } from "./components/maps/components/GpsMap/hooks/useDisableMapEventsOnFlag/index.js";
|
|
28
28
|
import { useMapInteractionCapture as ae } from "./components/maps/components/GpsMap/hooks/useMapInteractionCapture.js";
|
|
29
29
|
import { useScopedMapInteractionCapture as ie } from "./components/maps/components/GpsMap/hooks/useScopedMapInteractionCapture.js";
|
|
30
|
-
import { useMapStore as
|
|
30
|
+
import { useMapStore as xe } from "./components/maps/components/GpsMap/hooks/useMapStore/index.js";
|
|
31
31
|
import { useRegisterMapToolController as fe } from "./components/maps/components/GpsMap/hooks/useRegisterMapToolController.js";
|
|
32
32
|
import { coordsToQuadKey as le } from "./components/maps/utils/coordsToQuadKey.js";
|
|
33
33
|
import { courseToCartesianAngle as Ce } from "./components/maps/utils/courseToCartesianAngle.js";
|
|
34
|
-
import { isFeature as
|
|
35
|
-
import { isFeatureCollection as
|
|
34
|
+
import { isFeature as Te } from "./components/maps/utils/isFeature.js";
|
|
35
|
+
import { isFeatureCollection as ge } from "./components/maps/utils/isFeatureCollection.js";
|
|
36
36
|
import { isFeatureCollectionDraft as de } from "./components/maps/utils/isFeatureCollectionDraft.js";
|
|
37
37
|
import { isGeometry as Ee } from "./components/maps/utils/isGeometry.js";
|
|
38
|
-
import { GeofencesTool as
|
|
38
|
+
import { GeofencesTool as _e } from "./components/maps/components/GpsMapTools/subcomponents/GeofencesTool/GeofencesTool.js";
|
|
39
39
|
import { GEOFENCES_TOOL as Me } from "./components/maps/components/GpsMapTools/subcomponents/GeofencesTool/constants.js";
|
|
40
|
-
import { getGpsMapToolsComponentsDictionary as
|
|
41
|
-
import { GpsMapToolsContext as
|
|
40
|
+
import { getGpsMapToolsComponentsDictionary as Ae } from "./components/maps/components/GpsMapTools/dictionary.js";
|
|
41
|
+
import { GpsMapToolsContext as Pe, GpsMapToolsProvider as Le } from "./components/maps/components/GpsMapTools/contexts/GpsMapToolsContext/GpsMapToolsContext.js";
|
|
42
42
|
import { IndicatorBattery as Re } from "./components/indicators/IndicatorBattery/IndicatorBattery.js";
|
|
43
43
|
import { getIndicatorBatteryComponentsDictionary as Ve } from "./components/indicators/IndicatorBattery/dictionary.js";
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
44
|
+
import { INDICATOR_BATTERY_SEMANTIC_STATUS as He } from "./components/indicators/IndicatorBattery/types.js";
|
|
45
|
+
import { IndicatorCSQ as he } from "./components/indicators/IndicatorCSQ/IndicatorCSQ.js";
|
|
46
|
+
import { getIndicatorCSQComponentsDictionary as Ke } from "./components/indicators/IndicatorCSQ/dictionary.js";
|
|
47
|
+
import { IndicatorValueStatus as we } from "./components/indicators/IndicatorValueStatus/IndicatorValueStatus.js";
|
|
48
|
+
import { IndicatorValueAndMagnitude as je } from "./components/indicators/IndicatorValueAndMagnitude/IndicatorValueAndMagnitude.js";
|
|
49
|
+
import { VideoTimeLineSelector as We } from "./components/VideoTimeLineSelector/VideoTimeLineSelector.js";
|
|
50
|
+
import { getVideoTimeLineSelectorComponentDictionary as qe } from "./components/VideoTimeLineSelector/dictionary.js";
|
|
51
|
+
import { TIME_VISIBLE_OPTIONS_KEYS as Ze } from "./components/VideoTimeLineSelector/constants.js";
|
|
52
|
+
import { ReportsViewer as eo } from "./components/ReportsViewer/ReportsViewer.js";
|
|
53
|
+
import { capitalizeFirstLetter as ro } from "./utils/capitalizeFirstLetter.js";
|
|
54
|
+
import { isValidDate as po } from "./utils/isValidDate.js";
|
|
55
|
+
import { getComponentUtilityClass as mo } from "./utils/getComponentUtilityClass.js";
|
|
56
|
+
import { getPaletteColor as no } from "./utils/getPaletteColor.js";
|
|
57
|
+
import { getTypographyStyles as so } from "./utils/getTypographyStyles.js";
|
|
58
|
+
import { getHeightSizeStyles as co } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
59
|
+
import { ObjectQueue as uo } from "./utils/ObjectQueue.js";
|
|
60
|
+
import { getComponentClasses as Do, getComponentSlotRoot as To } from "./utils/getComponentSlotRoot.js";
|
|
60
61
|
import { getHdopPresentation as go } from "./utils/getHdopPresentation/getHdopPresentation.js";
|
|
61
|
-
import { HDOP_PRESENTATION_RANGES as
|
|
62
|
-
import { TEST_PROP_ID as
|
|
62
|
+
import { HDOP_PRESENTATION_RANGES as yo, HDOP_QUALITY_COLORS as Eo } from "./utils/getHdopPresentation/constants.js";
|
|
63
|
+
import { TEST_PROP_ID as _o, getNameDataTestId as Fo, getPropDataTestId as Mo } from "./utils/testIds.js";
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
A as CourseFormatter,
|
|
65
66
|
f as DEVICE_STATUSES_CONFIG,
|
|
66
67
|
C as Device,
|
|
67
68
|
d as DeviceLabel,
|
|
68
|
-
|
|
69
|
+
g as DeviceStatus,
|
|
69
70
|
Me as GEOFENCES_TOOL,
|
|
70
71
|
E as GaugeCircular,
|
|
71
|
-
|
|
72
|
+
_e as GeofencesTool,
|
|
72
73
|
G as GpsMap,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
Pe as GpsMapToolsContext,
|
|
75
|
+
Le as GpsMapToolsProvider,
|
|
76
|
+
yo as HDOP_PRESENTATION_RANGES,
|
|
77
|
+
Eo as HDOP_QUALITY_COLORS,
|
|
78
|
+
He as INDICATOR_BATTERY_SEMANTIC_STATUS,
|
|
79
|
+
z as INTERACTION_CHANNELS,
|
|
78
80
|
Re as IndicatorBattery,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
he as IndicatorCSQ,
|
|
82
|
+
je as IndicatorValueAndMagnitude,
|
|
83
|
+
we as IndicatorValueStatus,
|
|
82
84
|
h as LAT_LON_FIXED_DIGITS,
|
|
83
85
|
b as MapContext,
|
|
84
86
|
V as MapProvider,
|
|
85
87
|
k as MarkerFeatureRender,
|
|
86
|
-
|
|
88
|
+
uo as ObjectQueue,
|
|
87
89
|
X as PolylineWithArrows,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
eo as ReportsViewer,
|
|
91
|
+
_o as TEST_PROP_ID,
|
|
92
|
+
Ze as TIME_VISIBLE_OPTIONS_KEYS,
|
|
93
|
+
We as VideoTimeLineSelector,
|
|
94
|
+
ro as capitalizeFirstLetter,
|
|
93
95
|
le as coordsToQuadKey,
|
|
94
96
|
Ce as courseToCartesianAngle,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
P as courseToCssAngle,
|
|
98
|
+
K as createFeatureIndexKey,
|
|
97
99
|
$ as createPixelPathDecimationFilter,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
Do as getComponentClasses,
|
|
101
|
+
To as getComponentSlotRoot,
|
|
102
|
+
mo as getComponentUtilityClass,
|
|
103
|
+
_ as getCourseDirection,
|
|
102
104
|
M as getCourseFormatterComponentsDictionary,
|
|
103
105
|
i as getDeviceByData,
|
|
104
106
|
a as getDeviceComponentsDictionary,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
x as getDeviceStatusByData,
|
|
108
|
+
T as getDeviceStatusComponentsDictionary,
|
|
109
|
+
Y as getFeatureFromLayer,
|
|
110
|
+
Ae as getGpsMapToolsComponentsDictionary,
|
|
109
111
|
go as getHdopPresentation,
|
|
110
|
-
|
|
112
|
+
co as getHeightSizeStyles,
|
|
111
113
|
Ve as getIndicatorBatteryComponentsDictionary,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
Ke as getIndicatorCSQComponentsDictionary,
|
|
115
|
+
H as getMapComponentsDictionary,
|
|
116
|
+
Fo as getNameDataTestId,
|
|
117
|
+
no as getPaletteColor,
|
|
118
|
+
Mo as getPropDataTestId,
|
|
119
|
+
so as getTypographyStyles,
|
|
120
|
+
qe as getVideoTimeLineSelectorComponentDictionary,
|
|
121
|
+
Te as isFeature,
|
|
122
|
+
ge as isFeatureCollection,
|
|
121
123
|
de as isFeatureCollectionDraft,
|
|
122
124
|
Ee as isGeometry,
|
|
123
125
|
r as isObservableFeatureEventCaptured,
|
|
124
|
-
|
|
126
|
+
po as isValidDate,
|
|
125
127
|
l as useDeviceStatus,
|
|
126
128
|
te as useDisableMapEventsOnFlag,
|
|
127
129
|
oe as useDisableMapEventsOnMouseOver,
|
|
128
130
|
J as useFilterDecimation,
|
|
129
131
|
ae as useMapInteractionCapture,
|
|
130
|
-
|
|
132
|
+
xe as useMapStore,
|
|
131
133
|
t as useObservableFeatureEventHandlers,
|
|
132
134
|
fe as useRegisterMapToolController,
|
|
133
135
|
ie as useScopedMapInteractionCapture
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/gclick",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"leaflet-polylinedecorator": "1.6.0",
|
|
40
40
|
"lodash-es": "4.17.23",
|
|
41
41
|
"kdbush": "4.0.2",
|
|
42
|
-
"@mui/material": "5.16.7",
|
|
42
|
+
"@mui/material": "patch:@mui/material@npm%3A5.16.7#~/.yarn/patches/@mui-material-npm-5.16.7-7070122752.patch",
|
|
43
43
|
"react-dom": "19.2.4",
|
|
44
44
|
"immer": "9.0.21",
|
|
45
45
|
"react-hook-form": "7.71.1",
|
|
46
|
-
"leaflet.markercluster": "1.5.3",
|
|
47
46
|
"@googlemaps/js-api-loader": "1.16.10",
|
|
47
|
+
"leaflet.markercluster": "1.5.3",
|
|
48
48
|
"yup": "0.32.11"
|
|
49
49
|
}
|
|
50
50
|
}
|