@seamapi/react 4.8.0 → 4.8.2
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/README.md +2 -2
- package/dist/elements.js +9250 -9338
- package/dist/elements.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/FilterCategoryMenu.js +1 -1
- package/lib/seam/components/SupportedDeviceTable/FilterCategoryMenu.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js +1 -1
- package/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js.map +1 -1
- package/lib/seam/filters.js +3 -1
- package/lib/seam/filters.js.map +1 -1
- package/lib/seam/thermostats/use-create-thermostat-climate-preset.js +1 -0
- package/lib/seam/thermostats/use-create-thermostat-climate-preset.js.map +1 -1
- package/lib/seam/thermostats/use-update-thermostat-climate-preset.d.ts +1 -1
- package/lib/seam/thermostats/use-update-thermostat-climate-preset.js +2 -1
- package/lib/seam/thermostats/use-update-thermostat-climate-preset.js.map +1 -1
- package/lib/ui/Alert/Alert.js +1 -1
- package/lib/ui/Alert/Alert.js.map +1 -1
- package/lib/ui/IconButton.js +1 -1
- package/lib/ui/IconButton.js.map +1 -1
- package/lib/ui/Snackbar/Snackbar.js +1 -1
- package/lib/ui/Snackbar/Snackbar.js.map +1 -1
- package/lib/ui/TabSet.js +1 -1
- package/lib/ui/TabSet.js.map +1 -1
- package/lib/ui/TextButton.js +1 -1
- package/lib/ui/TextButton.js.map +1 -1
- package/lib/ui/TextField/TextField.js +1 -1
- package/lib/ui/TextField/TextField.js.map +1 -1
- package/lib/ui/Tooltip/Tooltip.js +1 -1
- package/lib/ui/Tooltip/Tooltip.js.map +1 -1
- package/lib/ui/device/EditableDeviceName.js +1 -1
- package/lib/ui/device/EditableDeviceName.js.map +1 -1
- package/lib/ui/layout/AccordionRow.js +1 -1
- package/lib/ui/layout/AccordionRow.js.map +1 -1
- package/lib/ui/thermostat/ClimateModeMenu.js +1 -1
- package/lib/ui/thermostat/ClimateModeMenu.js.map +1 -1
- package/lib/ui/thermostat/ClimatePreset.js +1 -0
- package/lib/ui/thermostat/ClimatePreset.js.map +1 -1
- package/lib/ui/thermostat/FanModeMenu.js +1 -1
- package/lib/ui/thermostat/FanModeMenu.js.map +1 -1
- package/lib/ui/thermostat/TemperatureControl.js +2 -2
- package/lib/ui/thermostat/TemperatureControl.js.map +1 -1
- package/lib/ui/thermostat/ThermostatCard.js +1 -1
- package/lib/ui/thermostat/ThermostatCard.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/src/lib/seam/components/SupportedDeviceTable/FilterCategoryMenu.tsx +1 -1
- package/src/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.tsx +1 -1
- package/src/lib/seam/filters.ts +3 -1
- package/src/lib/seam/thermostats/use-create-thermostat-climate-preset.ts +1 -0
- package/src/lib/seam/thermostats/use-update-thermostat-climate-preset.ts +4 -5
- package/src/lib/ui/Alert/Alert.tsx +1 -1
- package/src/lib/ui/IconButton.tsx +1 -0
- package/src/lib/ui/Snackbar/Snackbar.tsx +2 -0
- package/src/lib/ui/TabSet.tsx +1 -0
- package/src/lib/ui/TextButton.tsx +5 -1
- package/src/lib/ui/TextField/TextField.tsx +1 -0
- package/src/lib/ui/Tooltip/Tooltip.tsx +5 -1
- package/src/lib/ui/device/EditableDeviceName.tsx +1 -0
- package/src/lib/ui/layout/AccordionRow.tsx +5 -1
- package/src/lib/ui/thermostat/ClimateModeMenu.tsx +1 -0
- package/src/lib/ui/thermostat/ClimatePreset.tsx +1 -0
- package/src/lib/ui/thermostat/FanModeMenu.tsx +1 -0
- package/src/lib/ui/thermostat/TemperatureControl.tsx +10 -2
- package/src/lib/ui/thermostat/ThermostatCard.tsx +1 -0
- package/src/lib/version.ts +1 -1
|
@@ -18,10 +18,8 @@ import { NullSeamClientError, useSeamClient } from 'lib/seam/use-seam-client.js'
|
|
|
18
18
|
export type UseUpdateThermostatClimatePresetParams = never
|
|
19
19
|
export type UseUpdateThermostatClimatePresetData = undefined
|
|
20
20
|
|
|
21
|
-
export type UseUpdateThermostatClimatePresetVariables =
|
|
22
|
-
ThermostatsUpdateClimatePresetBody
|
|
23
|
-
'manual_override_allowed'
|
|
24
|
-
>
|
|
21
|
+
export type UseUpdateThermostatClimatePresetVariables =
|
|
22
|
+
ThermostatsUpdateClimatePresetBody
|
|
25
23
|
|
|
26
24
|
export function useUpdateThermostatClimatePreset(): UseMutationResult<
|
|
27
25
|
UseUpdateThermostatClimatePresetData,
|
|
@@ -38,7 +36,7 @@ export function useUpdateThermostatClimatePreset(): UseMutationResult<
|
|
|
38
36
|
>({
|
|
39
37
|
mutationFn: async (variables) => {
|
|
40
38
|
if (client === null) throw new NullSeamClientError()
|
|
41
|
-
await client.thermostats.
|
|
39
|
+
await client.thermostats.updateClimatePreset(variables)
|
|
42
40
|
},
|
|
43
41
|
onSuccess: (_data, variables) => {
|
|
44
42
|
queryClient.setQueryData<ThermostatDevice | null>(
|
|
@@ -87,6 +85,7 @@ function getUpdatedDevice(
|
|
|
87
85
|
display_name: variables.name ?? variables.climate_preset_key,
|
|
88
86
|
can_delete: true,
|
|
89
87
|
can_edit: true,
|
|
88
|
+
can_program: true,
|
|
90
89
|
manual_override_allowed: true,
|
|
91
90
|
}
|
|
92
91
|
|
|
@@ -49,7 +49,7 @@ function Action(props: ActionProps): JSX.Element | null {
|
|
|
49
49
|
|
|
50
50
|
return (
|
|
51
51
|
<div className='seam-alert-action-wrap'>
|
|
52
|
-
<button onClick={handleClick} className='seam-alert-action'>
|
|
52
|
+
<button type='button' onClick={handleClick} className='seam-alert-action'>
|
|
53
53
|
{props.label}
|
|
54
54
|
</button>
|
|
55
55
|
</div>
|
|
@@ -77,6 +77,7 @@ export function Snackbar({
|
|
|
77
77
|
<div className='seam-snackbar-actions-wrap'>
|
|
78
78
|
{action != null && (
|
|
79
79
|
<button
|
|
80
|
+
type='button'
|
|
80
81
|
className='seam-snackbar-action'
|
|
81
82
|
onClick={handleActionClick}
|
|
82
83
|
>
|
|
@@ -85,6 +86,7 @@ export function Snackbar({
|
|
|
85
86
|
)}
|
|
86
87
|
{!disableCloseButton && (
|
|
87
88
|
<button
|
|
89
|
+
type='button'
|
|
88
90
|
className='seam-snackbar-close-button'
|
|
89
91
|
onClick={() => {
|
|
90
92
|
handleClose()
|
package/src/lib/ui/TabSet.tsx
CHANGED
|
@@ -10,6 +10,10 @@ export function TextButton({
|
|
|
10
10
|
...buttonProps
|
|
11
11
|
}: TextButtonProps): JSX.Element {
|
|
12
12
|
return (
|
|
13
|
-
<button
|
|
13
|
+
<button
|
|
14
|
+
type='button'
|
|
15
|
+
className={`seam-text-btn seam-color-${color}`}
|
|
16
|
+
{...buttonProps}
|
|
17
|
+
/>
|
|
14
18
|
)
|
|
15
19
|
}
|
|
@@ -40,7 +40,11 @@ export function Tooltip({ children }: PropsWithChildren): JSX.Element {
|
|
|
40
40
|
return (
|
|
41
41
|
<div className='seam-tooltip'>
|
|
42
42
|
<div className='seam-tooltip-trigger-wrap'>
|
|
43
|
-
<button
|
|
43
|
+
<button
|
|
44
|
+
type='button'
|
|
45
|
+
onClick={handleToggle}
|
|
46
|
+
className='seam-tooltip-button'
|
|
47
|
+
>
|
|
44
48
|
<div className='seam-tooltip-button-icon seam-tooltip-button-icon-default'>
|
|
45
49
|
<InfoIcon />
|
|
46
50
|
</div>
|
|
@@ -19,7 +19,11 @@ export function AccordionRow({
|
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<div className='seam-accordion-row' aria-expanded={isExpanded}>
|
|
22
|
-
<button
|
|
22
|
+
<button
|
|
23
|
+
type='button'
|
|
24
|
+
className='seam-accordion-row-trigger'
|
|
25
|
+
onClick={toggle}
|
|
26
|
+
>
|
|
23
27
|
<div className='seam-row-inner-wrap'>
|
|
24
28
|
<p className='seam-row-label'>{label}</p>
|
|
25
29
|
<div className='seam-row-trigger-left-content'>{leftContent}</div>
|
|
@@ -359,6 +359,7 @@ function UpdateForm({
|
|
|
359
359
|
cooling_set_point_celsius: fahrenheitToCelsius(values.coolPoint),
|
|
360
360
|
heating_set_point_celsius: fahrenheitToCelsius(values.heatPoint),
|
|
361
361
|
hvac_mode_setting: values.hvacMode,
|
|
362
|
+
manual_override_allowed: false, // deprecated but type still wants it.
|
|
362
363
|
},
|
|
363
364
|
{ onSuccess: onComplete }
|
|
364
365
|
)
|
|
@@ -30,7 +30,11 @@ export function TemperatureControl({
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<div className='seam-temperature-control'>
|
|
33
|
-
<button
|
|
33
|
+
<button
|
|
34
|
+
type='button'
|
|
35
|
+
className='seam-temperature-stepper-button'
|
|
36
|
+
onClick={decrement}
|
|
37
|
+
>
|
|
34
38
|
<TemperatureSubtractIcon />
|
|
35
39
|
</button>
|
|
36
40
|
<RangeSlider
|
|
@@ -43,7 +47,11 @@ export function TemperatureControl({
|
|
|
43
47
|
}}
|
|
44
48
|
unit={unit}
|
|
45
49
|
/>
|
|
46
|
-
<button
|
|
50
|
+
<button
|
|
51
|
+
type='button'
|
|
52
|
+
className='seam-temperature-stepper-button'
|
|
53
|
+
onClick={increment}
|
|
54
|
+
>
|
|
47
55
|
<TemperatureAddIcon />
|
|
48
56
|
</button>
|
|
49
57
|
</div>
|
package/src/lib/version.ts
CHANGED