@attraccess/plugin-shelly 0.1.0-nightly.1140.3 → 0.1.0-nightly.1166.1
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/frontend/{__federation_expose_Plugin-1PLBb5VH.js → __federation_expose_Plugin-CLiHEWPT.js}
RENAMED
|
@@ -512,7 +512,7 @@ var useShellyTranslations = () => useTranslations({
|
|
|
512
512
|
var { DrawerBody: DrawerBody$4, DrawerHeader: DrawerHeader$4, DrawerHeading: DrawerHeading$4, Form: Form$3 } = await importShared("@heroui/react");
|
|
513
513
|
var { PlusIcon: PlusIcon$1, XIcon: XIcon$4 } = await importShared("lucide-react");
|
|
514
514
|
var { useCallback: useCallback$5, useRef: useRef$2, useState: useState$5 } = await importShared("react");
|
|
515
|
-
var { Button: Button$
|
|
515
|
+
var { Button: Button$6, StandardDrawer: StandardDrawer$4, StatusAlert: StatusAlert$5 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
516
516
|
function AddDeviceDrawer({ isOpen, onOpenChange, onAdded }) {
|
|
517
517
|
const { t, tMessage } = useShellyTranslations();
|
|
518
518
|
const [ipAddress, setIpAddress] = useState$5("");
|
|
@@ -566,7 +566,7 @@ function AddDeviceDrawer({ isOpen, onOpenChange, onAdded }) {
|
|
|
566
566
|
className: "sh:text-sm sh:text-muted",
|
|
567
567
|
children: t("add.description")
|
|
568
568
|
})]
|
|
569
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
569
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$6, {
|
|
570
570
|
isIconOnly: true,
|
|
571
571
|
variant: "ghost",
|
|
572
572
|
"aria-label": t("common.close"),
|
|
@@ -600,11 +600,11 @@ function AddDeviceDrawer({ isOpen, onOpenChange, onAdded }) {
|
|
|
600
600
|
}),
|
|
601
601
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
602
602
|
className: "sh:flex sh:justify-end sh:gap-2 sh:pt-2",
|
|
603
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
603
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$6, {
|
|
604
604
|
variant: "secondary",
|
|
605
605
|
onPress: close,
|
|
606
606
|
children: t("common.cancel")
|
|
607
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$
|
|
607
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$6, {
|
|
608
608
|
variant: "primary",
|
|
609
609
|
type: "submit",
|
|
610
610
|
isPending: submitting,
|
|
@@ -630,7 +630,7 @@ function AddDeviceDrawer({ isOpen, onOpenChange, onAdded }) {
|
|
|
630
630
|
var { DrawerBody: DrawerBody$3, DrawerFooter: DrawerFooter$2, DrawerHeader: DrawerHeader$3, DrawerHeading: DrawerHeading$3, Form: Form$2 } = await importShared("@heroui/react");
|
|
631
631
|
var { KeyRoundIcon: KeyRoundIcon$1, XIcon: XIcon$3 } = await importShared("lucide-react");
|
|
632
632
|
var { useCallback: useCallback$4, useEffect: useEffect$3, useState: useState$4 } = await importShared("react");
|
|
633
|
-
var { Button: Button$
|
|
633
|
+
var { Button: Button$5, PasswordInput: PasswordInput$2, StandardDrawer: StandardDrawer$3, StatusAlert: StatusAlert$4 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
634
634
|
function AdminPasswordDrawer({ device, onOpenChange, onSaved }) {
|
|
635
635
|
const { t, tMessage } = useShellyTranslations();
|
|
636
636
|
const [currentPassword, setCurrentPassword] = useState$4("");
|
|
@@ -698,7 +698,7 @@ function AdminPasswordDrawer({ device, onOpenChange, onSaved }) {
|
|
|
698
698
|
address: device.ipAddress
|
|
699
699
|
})
|
|
700
700
|
})]
|
|
701
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
701
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$5, {
|
|
702
702
|
isIconOnly: true,
|
|
703
703
|
variant: "ghost",
|
|
704
704
|
"aria-label": t("common.close"),
|
|
@@ -739,11 +739,11 @@ function AdminPasswordDrawer({ device, onOpenChange, onSaved }) {
|
|
|
739
739
|
})
|
|
740
740
|
]
|
|
741
741
|
}) }),
|
|
742
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerFooter$2, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerFooter$2, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$5, {
|
|
743
743
|
variant: "secondary",
|
|
744
744
|
onPress: close,
|
|
745
745
|
children: t("common.cancel")
|
|
746
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$
|
|
746
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$5, {
|
|
747
747
|
variant: "primary",
|
|
748
748
|
isPending: submitting,
|
|
749
749
|
onPress: () => void submit(),
|
|
@@ -759,7 +759,7 @@ function AdminPasswordDrawer({ device, onOpenChange, onSaved }) {
|
|
|
759
759
|
}
|
|
760
760
|
//#endregion
|
|
761
761
|
//#region frontend/src/devices/info/DeviceInfoDrawer.tsx
|
|
762
|
-
var { Button: Button$
|
|
762
|
+
var { Button: Button$4, PasswordInput: PasswordInput$1, StandardDrawer: StandardDrawer$2, StatusAlert: StatusAlert$3, useDateTimeFormatter: useDateTimeFormatter$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
763
763
|
var { Card, DrawerBody: DrawerBody$2, DrawerFooter: DrawerFooter$1, DrawerHeader: DrawerHeader$2, DrawerHeading: DrawerHeading$2, Form: Form$1, Skeleton } = await importShared("@heroui/react");
|
|
764
764
|
var { InfoIcon: InfoIcon$1, RefreshCwIcon: RefreshCwIcon$2, XIcon: XIcon$2 } = await importShared("lucide-react");
|
|
765
765
|
var { useCallback: useCallback$3, useEffect: useEffect$2, useState: useState$3 } = await importShared("react");
|
|
@@ -933,7 +933,7 @@ function AuthProtectedForm({ authState, currentPassword, onChange, loading, onLo
|
|
|
933
933
|
}),
|
|
934
934
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
935
935
|
className: "sh:flex sh:justify-end",
|
|
936
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
936
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$4, {
|
|
937
937
|
variant: "primary",
|
|
938
938
|
size: "sm",
|
|
939
939
|
isPending: loading,
|
|
@@ -1001,7 +1001,7 @@ function DeviceInfoDrawer({ device, onOpenChange }) {
|
|
|
1001
1001
|
className: "sh:text-sm sh:text-muted",
|
|
1002
1002
|
children: device.ipAddress
|
|
1003
1003
|
})]
|
|
1004
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
1004
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$4, {
|
|
1005
1005
|
isIconOnly: true,
|
|
1006
1006
|
variant: "ghost",
|
|
1007
1007
|
"aria-label": t("common.close"),
|
|
@@ -1040,7 +1040,7 @@ function DeviceInfoDrawer({ device, onOpenChange }) {
|
|
|
1040
1040
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1041
1041
|
className: "sh:text-xs sh:text-default-500",
|
|
1042
1042
|
children: info ? t("info.updated", { time: formatDateTime(info.fetchedAt) }) : ""
|
|
1043
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$
|
|
1043
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$4, {
|
|
1044
1044
|
variant: "secondary",
|
|
1045
1045
|
onPress: () => void load(),
|
|
1046
1046
|
isPending: loading,
|
|
@@ -1057,7 +1057,7 @@ function DeviceInfoDrawer({ device, onOpenChange }) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
//#endregion
|
|
1059
1059
|
//#region frontend/src/DiscoverDrawer.tsx
|
|
1060
|
-
var { Button: Button$
|
|
1060
|
+
var { Button: Button$3, StandardDrawer: StandardDrawer$1, StatusAlert: StatusAlert$2 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1061
1061
|
var { Chip: Chip$2, DrawerBody: DrawerBody$1, DrawerHeader: DrawerHeader$1, DrawerHeading: DrawerHeading$1, Form, Spinner: Spinner$1 } = await importShared("@heroui/react");
|
|
1062
1062
|
var { SearchIcon: SearchIcon$1, XIcon: XIcon$1 } = await importShared("lucide-react");
|
|
1063
1063
|
var { useCallback: useCallback$2, useRef: useRef$1, useState: useState$2 } = await importShared("react");
|
|
@@ -1154,7 +1154,7 @@ function DiscoverDrawer({ isOpen, onOpenChange, onDiscovered }) {
|
|
|
1154
1154
|
className: "sh:text-sm sh:text-muted",
|
|
1155
1155
|
children: t("discovery.description")
|
|
1156
1156
|
})]
|
|
1157
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
1157
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$3, {
|
|
1158
1158
|
isIconOnly: true,
|
|
1159
1159
|
variant: "ghost",
|
|
1160
1160
|
"aria-label": t("common.close"),
|
|
@@ -1189,11 +1189,11 @@ function DiscoverDrawer({ isOpen, onOpenChange, onDiscovered }) {
|
|
|
1189
1189
|
result && !running && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResultSummary, { result }),
|
|
1190
1190
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1191
1191
|
className: "sh:flex sh:justify-end sh:gap-2 sh:pt-2",
|
|
1192
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
1192
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$3, {
|
|
1193
1193
|
variant: "secondary",
|
|
1194
1194
|
onPress: close,
|
|
1195
1195
|
children: t(result ? "common.done" : "common.cancel")
|
|
1196
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$
|
|
1196
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$3, {
|
|
1197
1197
|
variant: "primary",
|
|
1198
1198
|
type: "submit",
|
|
1199
1199
|
isPending: running,
|
|
@@ -1217,6 +1217,7 @@ function DiscoverDrawer({ isOpen, onOpenChange, onDiscovered }) {
|
|
|
1217
1217
|
//#endregion
|
|
1218
1218
|
//#region frontend/src/devices/firmware/useFirmwareDrawerState.tsx
|
|
1219
1219
|
var { useCallback: useCallback$1, useEffect: useEffect$1, useRef, useState: useState$1 } = await importShared("react");
|
|
1220
|
+
var UPDATE_TIMEOUT_MS = 3e5;
|
|
1220
1221
|
function useFirmwareDrawerState({ device, onOpenChange, onUpdated }) {
|
|
1221
1222
|
const { t, tMessage } = useShellyTranslations();
|
|
1222
1223
|
const [status, setStatus] = useState$1(null);
|
|
@@ -1317,7 +1318,7 @@ function useFirmwareDrawerState({ device, onOpenChange, onUpdated }) {
|
|
|
1317
1318
|
}
|
|
1318
1319
|
//#endregion
|
|
1319
1320
|
//#region frontend/src/devices/firmware/FirmwareDrawer.tsx
|
|
1320
|
-
var { Button: Button$
|
|
1321
|
+
var { Button: Button$2, EmptyState: EmptyState$1, PasswordInput, StandardDrawer, StatusAlert: StatusAlert$1, TableDataLoadingIndicator: TableDataLoadingIndicator$1, useDateTimeFormatter } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1321
1322
|
var { DrawerBody, DrawerFooter, DrawerHeader, DrawerHeading, Spinner, Tooltip: Tooltip$1 } = await importShared("@heroui/react");
|
|
1322
1323
|
var { ArrowUpCircleIcon, CpuIcon: CpuIcon$1, DownloadIcon, RefreshCwIcon: RefreshCwIcon$1, XIcon } = await importShared("lucide-react");
|
|
1323
1324
|
function shortVersion(version) {
|
|
@@ -1360,7 +1361,7 @@ function UpdateAvailableIndicator({ entry }) {
|
|
|
1360
1361
|
const version = entry?.status?.hasUpdate ? entry.status.available.stable : null;
|
|
1361
1362
|
if (!version) return null;
|
|
1362
1363
|
const label = t("firmware.updateAvailable", { version: shortVersion(version) });
|
|
1363
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip$1.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
1364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip$1.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$2, {
|
|
1364
1365
|
variant: "ghost",
|
|
1365
1366
|
size: "sm",
|
|
1366
1367
|
isIconOnly: true,
|
|
@@ -1383,7 +1384,6 @@ function VersionRow({ label, value }) {
|
|
|
1383
1384
|
})]
|
|
1384
1385
|
});
|
|
1385
1386
|
}
|
|
1386
|
-
var UPDATE_TIMEOUT_MS = 3e5;
|
|
1387
1387
|
function FirmwareDetails({ status }) {
|
|
1388
1388
|
const { t } = useShellyTranslations();
|
|
1389
1389
|
const formatDateTime = useDateTimeFormatter({ showSeconds: true });
|
|
@@ -1438,7 +1438,7 @@ function FirmwareDrawer({ device, onOpenChange, onUpdated }) {
|
|
|
1438
1438
|
address: device.ipAddress
|
|
1439
1439
|
})
|
|
1440
1440
|
})]
|
|
1441
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$
|
|
1441
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$2, {
|
|
1442
1442
|
isIconOnly: true,
|
|
1443
1443
|
variant: "ghost",
|
|
1444
1444
|
"aria-label": t("common.close"),
|
|
@@ -1489,7 +1489,7 @@ function FirmwareDrawer({ device, onOpenChange, onUpdated }) {
|
|
|
1489
1489
|
}) }),
|
|
1490
1490
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerFooter, {
|
|
1491
1491
|
className: "sh:flex-wrap",
|
|
1492
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$
|
|
1492
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$2, {
|
|
1493
1493
|
variant: "secondary",
|
|
1494
1494
|
onPress: load,
|
|
1495
1495
|
isPending: loading,
|
|
@@ -1503,7 +1503,7 @@ function FirmwareDrawer({ device, onOpenChange, onUpdated }) {
|
|
|
1503
1503
|
}), stages.map((stage) => {
|
|
1504
1504
|
const version = status?.available[stage];
|
|
1505
1505
|
if (!version) return null;
|
|
1506
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$2, {
|
|
1507
1507
|
variant: stage === "stable" ? "primary" : "secondary",
|
|
1508
1508
|
onPress: () => install(stage),
|
|
1509
1509
|
isPending: installing === stage,
|
|
@@ -1528,8 +1528,109 @@ function FirmwareDrawer({ device, onOpenChange, onUpdated }) {
|
|
|
1528
1528
|
});
|
|
1529
1529
|
}
|
|
1530
1530
|
//#endregion
|
|
1531
|
+
//#region frontend/src/devices/DeviceRowParts.tsx
|
|
1532
|
+
var { Button: Button$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1533
|
+
var { Chip: Chip$1, Dropdown, DropdownItem, DropdownMenu, DropdownPopover, DropdownTrigger, Tooltip } = await importShared("@heroui/react");
|
|
1534
|
+
var { CpuIcon, InfoIcon, KeyRoundIcon, MoreVerticalIcon, RefreshCwIcon, Trash2Icon, TriangleAlertIcon } = await importShared("lucide-react");
|
|
1535
|
+
function AuthChip({ state }) {
|
|
1536
|
+
const { t } = useShellyTranslations();
|
|
1537
|
+
const { color } = {
|
|
1538
|
+
none: { color: "success" },
|
|
1539
|
+
required: { color: "warning" },
|
|
1540
|
+
unknown: { color: "default" }
|
|
1541
|
+
}[state];
|
|
1542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip$1, {
|
|
1543
|
+
variant: "soft",
|
|
1544
|
+
color,
|
|
1545
|
+
size: "sm",
|
|
1546
|
+
className: "sh:whitespace-nowrap",
|
|
1547
|
+
children: t(`auth.${state}`)
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
function ProbeErrorIndicator({ message }) {
|
|
1551
|
+
const { t } = useShellyTranslations();
|
|
1552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
1553
|
+
variant: "ghost",
|
|
1554
|
+
size: "sm",
|
|
1555
|
+
isIconOnly: true,
|
|
1556
|
+
"aria-label": t("devices.probeError", { message }),
|
|
1557
|
+
className: "sh:h-6 sh:w-6 sh:min-w-6 sh:text-warning",
|
|
1558
|
+
"data-cy": "shelly-device-probe-error",
|
|
1559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlertIcon, { className: "sh:h-4 sh:w-4" })
|
|
1560
|
+
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Content, { children: t("devices.probeError", { message }) })] });
|
|
1561
|
+
}
|
|
1562
|
+
function RowActions({ deviceId, isBusy, onInfo, onFirmware, onAuth, onReprobe, onDelete }) {
|
|
1563
|
+
const { t } = useShellyTranslations();
|
|
1564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1565
|
+
className: "sh:flex sh:flex-row sh:items-center sh:justify-end sh:gap-1 sh:whitespace-nowrap",
|
|
1566
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
1567
|
+
variant: "ghost",
|
|
1568
|
+
size: "sm",
|
|
1569
|
+
isIconOnly: true,
|
|
1570
|
+
"aria-label": t("devices.info"),
|
|
1571
|
+
isDisabled: isBusy,
|
|
1572
|
+
onPress: onInfo,
|
|
1573
|
+
"data-cy": `shelly-device-info-${deviceId}`,
|
|
1574
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InfoIcon, { className: "sh:h-4 sh:w-4" })
|
|
1575
|
+
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Content, { children: t("devices.info") })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Dropdown, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
1576
|
+
variant: "ghost",
|
|
1577
|
+
size: "sm",
|
|
1578
|
+
isIconOnly: true,
|
|
1579
|
+
"aria-label": t("devices.more"),
|
|
1580
|
+
isPending: isBusy,
|
|
1581
|
+
"data-cy": `shelly-device-menu-${deviceId}`,
|
|
1582
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MoreVerticalIcon, { className: "sh:h-4 sh:w-4" })
|
|
1583
|
+
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownPopover, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, {
|
|
1584
|
+
"aria-label": t("devices.deviceActions"),
|
|
1585
|
+
children: [
|
|
1586
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1587
|
+
id: "firmware",
|
|
1588
|
+
onPress: onFirmware,
|
|
1589
|
+
"data-cy": `shelly-device-firmware-${deviceId}`,
|
|
1590
|
+
children: [
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CpuIcon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1592
|
+
" ",
|
|
1593
|
+
t("devices.manageFirmware")
|
|
1594
|
+
]
|
|
1595
|
+
}),
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1597
|
+
id: "auth",
|
|
1598
|
+
onPress: onAuth,
|
|
1599
|
+
"data-cy": `shelly-device-auth-${deviceId}`,
|
|
1600
|
+
children: [
|
|
1601
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyRoundIcon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1602
|
+
" ",
|
|
1603
|
+
t("devices.password")
|
|
1604
|
+
]
|
|
1605
|
+
}),
|
|
1606
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1607
|
+
id: "reprobe",
|
|
1608
|
+
onPress: onReprobe,
|
|
1609
|
+
"data-cy": `shelly-device-reprobe-${deviceId}`,
|
|
1610
|
+
children: [
|
|
1611
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCwIcon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1612
|
+
" ",
|
|
1613
|
+
t("devices.reprobe")
|
|
1614
|
+
]
|
|
1615
|
+
}),
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1617
|
+
id: "delete",
|
|
1618
|
+
onPress: onDelete,
|
|
1619
|
+
className: "sh:text-danger",
|
|
1620
|
+
"data-cy": `shelly-device-delete-${deviceId}`,
|
|
1621
|
+
children: [
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trash2Icon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1623
|
+
" ",
|
|
1624
|
+
t("devices.delete")
|
|
1625
|
+
]
|
|
1626
|
+
})
|
|
1627
|
+
]
|
|
1628
|
+
}) })] })]
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
//#endregion
|
|
1531
1632
|
//#region frontend/src/renderDevicesPageDevicesRows.tsx
|
|
1532
|
-
var { Chip
|
|
1633
|
+
var { Chip, TableCell, TableRow } = await importShared("@heroui/react");
|
|
1533
1634
|
function renderDevicesPageDevicesRows(device, { firmware, t, rowBusyId, setInfoDevice, setFirmwareDevice, setAuthDevice, withRowBusy, setDeleteTarget }) {
|
|
1534
1635
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableRow, {
|
|
1535
1636
|
id: device.id,
|
|
@@ -1565,7 +1666,7 @@ function renderDevicesPageDevicesRows(device, { firmware, t, rowBusyId, setInfoD
|
|
|
1565
1666
|
className: "sh:max-w-36 sh:truncate",
|
|
1566
1667
|
title: device.model ?? void 0,
|
|
1567
1668
|
children: device.model ?? "—"
|
|
1568
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip
|
|
1669
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip, {
|
|
1569
1670
|
variant: "soft",
|
|
1570
1671
|
size: "sm",
|
|
1571
1672
|
className: "sh:whitespace-nowrap",
|
|
@@ -1693,23 +1794,8 @@ function useDevicesPageState() {
|
|
|
1693
1794
|
//#endregion
|
|
1694
1795
|
//#region frontend/src/devices/DevicesPage.tsx
|
|
1695
1796
|
var { Button, EmptyState, PageHeader, StatusAlert, StatusDialog, TableDataLoadingIndicator } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1696
|
-
var {
|
|
1697
|
-
var {
|
|
1698
|
-
function AuthChip({ state }) {
|
|
1699
|
-
const { t } = useShellyTranslations();
|
|
1700
|
-
const { color } = {
|
|
1701
|
-
none: { color: "success" },
|
|
1702
|
-
required: { color: "warning" },
|
|
1703
|
-
unknown: { color: "default" }
|
|
1704
|
-
}[state];
|
|
1705
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Chip, {
|
|
1706
|
-
variant: "soft",
|
|
1707
|
-
color,
|
|
1708
|
-
size: "sm",
|
|
1709
|
-
className: "sh:whitespace-nowrap",
|
|
1710
|
-
children: t(`auth.${state}`)
|
|
1711
|
-
});
|
|
1712
|
-
}
|
|
1797
|
+
var { Table, TableBody, TableColumn, TableContent, TableHeader, TableScrollContainer } = await importShared("@heroui/react");
|
|
1798
|
+
var { PlusIcon, SearchIcon, WifiIcon: WifiIcon$1 } = await importShared("lucide-react");
|
|
1713
1799
|
function EmptyDevices({ onAdd }) {
|
|
1714
1800
|
const { t } = useShellyTranslations();
|
|
1715
1801
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -1727,87 +1813,6 @@ function EmptyDevices({ onAdd }) {
|
|
|
1727
1813
|
})]
|
|
1728
1814
|
});
|
|
1729
1815
|
}
|
|
1730
|
-
function ProbeErrorIndicator({ message }) {
|
|
1731
|
-
const { t } = useShellyTranslations();
|
|
1732
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
1733
|
-
variant: "ghost",
|
|
1734
|
-
size: "sm",
|
|
1735
|
-
isIconOnly: true,
|
|
1736
|
-
"aria-label": t("devices.probeError", { message }),
|
|
1737
|
-
className: "sh:h-6 sh:w-6 sh:min-w-6 sh:text-warning",
|
|
1738
|
-
"data-cy": "shelly-device-probe-error",
|
|
1739
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TriangleAlertIcon, { className: "sh:h-4 sh:w-4" })
|
|
1740
|
-
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Content, { children: t("devices.probeError", { message }) })] });
|
|
1741
|
-
}
|
|
1742
|
-
function RowActions({ deviceId, isBusy, onInfo, onFirmware, onAuth, onReprobe, onDelete }) {
|
|
1743
|
-
const { t } = useShellyTranslations();
|
|
1744
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1745
|
-
className: "sh:flex sh:flex-row sh:items-center sh:justify-end sh:gap-1 sh:whitespace-nowrap",
|
|
1746
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
1747
|
-
variant: "ghost",
|
|
1748
|
-
size: "sm",
|
|
1749
|
-
isIconOnly: true,
|
|
1750
|
-
"aria-label": t("devices.info"),
|
|
1751
|
-
isDisabled: isBusy,
|
|
1752
|
-
onPress: onInfo,
|
|
1753
|
-
"data-cy": `shelly-device-info-${deviceId}`,
|
|
1754
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InfoIcon, { className: "sh:h-4 sh:w-4" })
|
|
1755
|
-
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Content, { children: t("devices.info") })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Dropdown, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
1756
|
-
variant: "ghost",
|
|
1757
|
-
size: "sm",
|
|
1758
|
-
isIconOnly: true,
|
|
1759
|
-
"aria-label": t("devices.more"),
|
|
1760
|
-
isPending: isBusy,
|
|
1761
|
-
"data-cy": `shelly-device-menu-${deviceId}`,
|
|
1762
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MoreVerticalIcon, { className: "sh:h-4 sh:w-4" })
|
|
1763
|
-
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownPopover, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, {
|
|
1764
|
-
"aria-label": t("devices.deviceActions"),
|
|
1765
|
-
children: [
|
|
1766
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1767
|
-
id: "firmware",
|
|
1768
|
-
onPress: onFirmware,
|
|
1769
|
-
"data-cy": `shelly-device-firmware-${deviceId}`,
|
|
1770
|
-
children: [
|
|
1771
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CpuIcon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1772
|
-
" ",
|
|
1773
|
-
t("devices.manageFirmware")
|
|
1774
|
-
]
|
|
1775
|
-
}),
|
|
1776
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1777
|
-
id: "auth",
|
|
1778
|
-
onPress: onAuth,
|
|
1779
|
-
"data-cy": `shelly-device-auth-${deviceId}`,
|
|
1780
|
-
children: [
|
|
1781
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyRoundIcon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1782
|
-
" ",
|
|
1783
|
-
t("devices.password")
|
|
1784
|
-
]
|
|
1785
|
-
}),
|
|
1786
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1787
|
-
id: "reprobe",
|
|
1788
|
-
onPress: onReprobe,
|
|
1789
|
-
"data-cy": `shelly-device-reprobe-${deviceId}`,
|
|
1790
|
-
children: [
|
|
1791
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RefreshCwIcon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1792
|
-
" ",
|
|
1793
|
-
t("devices.reprobe")
|
|
1794
|
-
]
|
|
1795
|
-
}),
|
|
1796
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownItem, {
|
|
1797
|
-
id: "delete",
|
|
1798
|
-
onPress: onDelete,
|
|
1799
|
-
className: "sh:text-danger",
|
|
1800
|
-
"data-cy": `shelly-device-delete-${deviceId}`,
|
|
1801
|
-
children: [
|
|
1802
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Trash2Icon, { className: "sh:mr-2 sh:inline sh:h-4 sh:w-4" }),
|
|
1803
|
-
" ",
|
|
1804
|
-
t("devices.delete")
|
|
1805
|
-
]
|
|
1806
|
-
})
|
|
1807
|
-
]
|
|
1808
|
-
}) })] })]
|
|
1809
|
-
});
|
|
1810
|
-
}
|
|
1811
1816
|
function DevicesPage() {
|
|
1812
1817
|
const { t, language, devices, loading, pageError, rowBusyId, infoDevice, setInfoDevice, authDevice, setAuthDevice, firmwareDevice, setFirmwareDevice, firmware, deleteTarget, setDeleteTarget, deleting, addDrawer, discoverDrawer, refreshFirmware, refresh, withRowBusy, confirmDelete } = useDevicesPageState();
|
|
1813
1818
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
package/frontend/remoteEntry.js
CHANGED
|
@@ -75,7 +75,7 @@ var exportSet = /* @__PURE__ */ new Set([
|
|
|
75
75
|
]);
|
|
76
76
|
var moduleMap = { "./plugin": () => {
|
|
77
77
|
dynamicLoadingCss(["style.css"], false, "./plugin");
|
|
78
|
-
return __federation_import("./__federation_expose_Plugin-
|
|
78
|
+
return __federation_import("./__federation_expose_Plugin-CLiHEWPT.js").then((module) => Object.keys(module).every((item) => exportSet.has(item)) ? () => module.default : () => module);
|
|
79
79
|
} };
|
|
80
80
|
var seen = {};
|
|
81
81
|
var dynamicLoadingCss = (cssFilePaths, dontAppendStylesToHead, exposeItemName) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attraccess/plugin-shelly",
|
|
3
|
-
"version": "0.1.0-nightly.
|
|
3
|
+
"version": "0.1.0-nightly.1166.1",
|
|
4
4
|
"description": "Official Attraccess integration for Shelly devices.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@attraccess/plugins-backend-sdk": "^1.9.0",
|
|
26
26
|
"@attraccess/plugins-frontend-sdk": "^1.9.0",
|
|
27
|
-
"@attraccess/plugins-frontend-ui": "^1.11.0"
|
|
27
|
+
"@attraccess/plugins-frontend-ui": "^1.11.0-0"
|
|
28
28
|
},
|
|
29
29
|
"attraccess": {
|
|
30
30
|
"displayName": "Shelly",
|
|
31
31
|
"description": "Control and monitor Shelly devices from Attraccess.",
|
|
32
|
-
"host": "^1.11.0",
|
|
32
|
+
"host": "^1.11.0-0",
|
|
33
33
|
"backend": "dist/index.js",
|
|
34
34
|
"frontend": "frontend/remoteEntry.js",
|
|
35
35
|
"migrations": "dist/migrations.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"backend": "^1.9.0",
|
|
42
42
|
"frontend": "^1.9.0"
|
|
43
43
|
},
|
|
44
|
-
"publishedCommit": "
|
|
44
|
+
"publishedCommit": "ad0616ec36e5b48848bc7ba7f7ec794550424dd8"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ad0616ec36e5b48848bc7ba7f7ec794550424dd8"
|
|
47
47
|
}
|