devicesStore
Module-level singleton tracking selected devices, containers, sockets, and the device-tag map across the UI. Drives bulk-action toolbars, filtering, and the …
Module-level singleton tracking selected devices, containers, sockets, and the device-tag map across the UI. Drives bulk-action toolbars, filtering, and the device explorer.
import { createDevicesStore } from "@tetherto/mdk-ui-core";State
| Name | Signature |
|---|---|
filterTags | string[] |
selectedContainers | Record<string, DevicePayload> |
selectedDevices | DevicePayload[] |
selectedDevicesTags | Record<string, Record<string, DeviceTag>> |
selectedLvCabinets | Record<string, DevicePayload> |
selectedSockets | Record<string, { sockets: SocketData[] }> |
Actions
| Name | Signature |
|---|---|
removeDeviceTag | (payload: DeviceTagPayload) => void |
removeFilterTag | (tag: string) => void |
removeMultipleContainers | (devices: DevicePayload[]) => void |
removeMultipleSelectedDevices | (deviceIds: string[]) => void |
removeMultipleSelectedSockets | (sockets: SocketData[]) => void |
removeSelectedContainer | (device: DevicePayload) => void |
removeSelectedDevice | (deviceId: string) => void |
removeSelectedLVCabinet | (device: DevicePayload) => void |
removeSelectedSocket | (payload: RemoveSocketPayload) => void |
resetSelectedDevicesTags | () => void |
selectContainer | (device: DevicePayload) => void |
selectDeviceTag | (payload: DeviceTagPayload) => void |
selectLVCabinet | (device: DevicePayload) => void |
selectMultipleContainers | (devices: DevicePayload[]) => void |
setFilterTags | (tags: string[]) => void |
setMultipleSelectedDevices | (devices: DevicePayload[]) => void |
setMultipleSelectedSockets | (sockets: SocketData[]) => void |
setResetSelections | () => void |
setSelectDevice | (device: DevicePayload) => void |
setSelectedDevices | (devices: DevicePayload[]) => void |
setSelectedLvCabinets | (devices: Record<string, DevicePayload>) => void |
setSelectedSockets | (sockets: Record<string, { sockets: SocketData[] }>) => void |
setSelectSocket | (socket: SocketData) => void |