@seamapi/react 1.58.0 → 1.59.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/README.md +50 -1
- package/dist/elements.js +1716 -1716
- package/dist/elements.js.map +1 -1
- package/dist/index.css +17 -3
- package/dist/index.css.map +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.min.css.map +1 -1
- package/lib/seam/SeamProvider.d.ts +1 -0
- package/lib/seam/SeamProvider.js +2 -1
- package/lib/seam/SeamProvider.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.js +1 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.d.ts +0 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js +2 -7
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js.map +1 -1
- package/lib/ui/Menu/Menu.js +2 -1
- package/lib/ui/Menu/Menu.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/seam/SeamProvider.tsx +3 -1
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.tsx +6 -4
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.tsx +9 -14
- package/src/lib/ui/Menu/Menu.tsx +5 -1
- package/src/lib/version.ts +1 -1
- package/src/styles/_supported-device-table.scss +20 -3
package/lib/ui/Menu/Menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/lib/ui/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EACL,aAAa,EAGb,WAAW,EACX,UAAU,EACV,SAAS,EACT,eAAe,EACf,QAAQ,GACT,MAAM,OAAO,CAAA;AACd,OAAO,E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AU,CACnB,cAAc,EACd,eAAe,EAAE,SAAS,EAC1B,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,kBAAkB,CACnD,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;oBACjB,KAAK,CAAC,eAAe,EAAE,CAAA;oBACvB,WAAW,EAAE,CAAA;gBACf,CAAC,YAED,cACE,SAAS,EAAC,mBAAmB,EAC7B,KAAK,EAAE;wBACL,GAAG;wBACH,IAAI;qBACL,YAEA,QAAQ,GACL,GACF,EACN,UAAU,CACX,EAMD,cAAK,SAAS,EAAC,kBAAkB,YAC/B,cAAK,SAAS,EAAC,mBAAmB,EAAC,GAAG,EAAE,YAAY,YACjD,QAAQ,GACL,GACF,IACG,CACZ,CAAA;AACH,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,OAAO,UAAU,CAAC,WAAW,CAAC,CAAA;AAChC,CAAC"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const seamapiReactVersion = "1.
|
|
1
|
+
declare const seamapiReactVersion = "1.59.0";
|
|
2
2
|
export default seamapiReactVersion;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -68,6 +68,8 @@ export type SeamProviderClientOptions = Pick<SeamClientOptions, 'endpoint'>
|
|
|
68
68
|
|
|
69
69
|
const defaultQueryClient = new QueryClient()
|
|
70
70
|
|
|
71
|
+
export const seamComponentsClassName = 'seam-components'
|
|
72
|
+
|
|
71
73
|
export function SeamProvider({
|
|
72
74
|
children,
|
|
73
75
|
disableTelemetry = false,
|
|
@@ -108,7 +110,7 @@ export function SeamProvider({
|
|
|
108
110
|
const endpoint = 'endpoint' in props ? props.endpoint : undefined
|
|
109
111
|
|
|
110
112
|
return (
|
|
111
|
-
<div className=
|
|
113
|
+
<div className={seamComponentsClassName}>
|
|
112
114
|
<TelemetryProvider
|
|
113
115
|
client={telemetryClient ?? globalThis.seamTelemetryClient}
|
|
114
116
|
disabled={disableTelemetry}
|
|
@@ -37,12 +37,14 @@ export function ModelColumn({
|
|
|
37
37
|
alt={deviceModel.brand}
|
|
38
38
|
className='seam-brand-image'
|
|
39
39
|
/>{' '}
|
|
40
|
-
{deviceModel.model_name}
|
|
40
|
+
<div className='seam-truncated-text'>{deviceModel.model_name}</div>
|
|
41
41
|
</div>
|
|
42
42
|
<div className='seam-model-id'>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
<div className='seam-truncated-text'>
|
|
44
|
+
{deviceModel.manufacturer_model_id}
|
|
45
|
+
<DotDivider />
|
|
46
|
+
{connectionTypeNames[deviceModel.connection_type]}
|
|
47
|
+
</div>
|
|
46
48
|
</div>
|
|
47
49
|
</div>
|
|
48
50
|
)
|
|
@@ -36,11 +36,15 @@ export function ModelColumn({
|
|
|
36
36
|
}: SupportedDeviceRowProps): JSX.Element {
|
|
37
37
|
return (
|
|
38
38
|
<div className='seam-col seam-model-col'>
|
|
39
|
-
<div className='seam-model-name'>
|
|
39
|
+
<div className='seam-model-name'>
|
|
40
|
+
<div className='seam-truncated-text'>{deviceModel.model_name}</div>
|
|
41
|
+
</div>
|
|
40
42
|
<div className='seam-model-id'>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
<div className='seam-truncated-text'>
|
|
44
|
+
{deviceModel.manufacturer_model_id}
|
|
45
|
+
<DotDivider />
|
|
46
|
+
{connectionTypeNames[deviceModel.connection_type]}
|
|
47
|
+
</div>
|
|
44
48
|
</div>
|
|
45
49
|
</div>
|
|
46
50
|
)
|
|
@@ -54,12 +58,7 @@ export function StatusColumn({
|
|
|
54
58
|
return (
|
|
55
59
|
<div className='seam-col seam-status-col'>
|
|
56
60
|
<div className={classNames('seam-status-pill', `status-${statusColor}`)}>
|
|
57
|
-
<span>
|
|
58
|
-
{/* TODO devicedb should support this eventually, hardcoded for now */}
|
|
59
|
-
{deviceModel.brand === 'lockly'
|
|
60
|
-
? brandStatus[deviceModel.brand]
|
|
61
|
-
: status[deviceModel.support_level]}
|
|
62
|
-
</span>
|
|
61
|
+
<span>{status[deviceModel.support_level]}</span>
|
|
63
62
|
</div>
|
|
64
63
|
</div>
|
|
65
64
|
)
|
|
@@ -89,7 +88,3 @@ export const connectionTypeNames: Record<
|
|
|
89
88
|
zigbee: 'Zigbee',
|
|
90
89
|
unknown: 'Unknown',
|
|
91
90
|
}
|
|
92
|
-
|
|
93
|
-
export const brandStatus: Record<DeviceModel['brand'], string> = {
|
|
94
|
-
lockly: 'LIVE/CONTACT SUPPORT',
|
|
95
|
-
}
|
package/src/lib/ui/Menu/Menu.tsx
CHANGED
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
} from 'react'
|
|
12
12
|
import { createPortal } from 'react-dom'
|
|
13
13
|
|
|
14
|
+
import { seamComponentsClassName } from 'lib/seam/SeamProvider.js'
|
|
15
|
+
|
|
14
16
|
export interface MenuProps extends PropsWithChildren {
|
|
15
17
|
verticalOffset?: number
|
|
16
18
|
horizontalOffset?: number
|
|
@@ -47,7 +49,9 @@ export function Menu({
|
|
|
47
49
|
const [left, setLeft] = useState(0)
|
|
48
50
|
|
|
49
51
|
useEffect(() => {
|
|
50
|
-
const containers = globalThis.document?.querySelectorAll(
|
|
52
|
+
const containers = globalThis.document?.querySelectorAll(
|
|
53
|
+
seamComponentsClassName
|
|
54
|
+
)
|
|
51
55
|
if (containers == null) return
|
|
52
56
|
const el = containers[containers.length - 1]
|
|
53
57
|
if (el != null) {
|
package/src/lib/version.ts
CHANGED
|
@@ -313,12 +313,20 @@ $row-padding: 8px;
|
|
|
313
313
|
|
|
314
314
|
.seam-model-name {
|
|
315
315
|
font-size: 14px;
|
|
316
|
+
|
|
317
|
+
.seam-truncated-text {
|
|
318
|
+
width: 270px;
|
|
319
|
+
}
|
|
316
320
|
}
|
|
317
321
|
|
|
318
322
|
.seam-model-id {
|
|
319
323
|
color: colors.$text-gray-2;
|
|
320
324
|
font-size: 12px;
|
|
321
325
|
|
|
326
|
+
.seam-truncated-text {
|
|
327
|
+
width: 220px;
|
|
328
|
+
}
|
|
329
|
+
|
|
322
330
|
.seam-dot-divider {
|
|
323
331
|
margin: 0 4px;
|
|
324
332
|
color: colors.$text-gray-3;
|
|
@@ -335,22 +343,31 @@ $row-padding: 8px;
|
|
|
335
343
|
}
|
|
336
344
|
}
|
|
337
345
|
|
|
338
|
-
@media only screen and (width >=
|
|
346
|
+
@media only screen and (width >= 768px) {
|
|
339
347
|
flex-direction: row;
|
|
340
348
|
align-items: center;
|
|
341
349
|
justify-content: flex-start;
|
|
342
350
|
|
|
343
351
|
.seam-model-name {
|
|
344
|
-
flex:
|
|
352
|
+
flex: 1;
|
|
353
|
+
font-size: 14px;
|
|
345
354
|
}
|
|
346
355
|
|
|
347
356
|
.seam-model-id {
|
|
348
|
-
|
|
357
|
+
flex: 0 0 40%;
|
|
358
|
+
font-size: 14px;
|
|
359
|
+
display: flex;
|
|
360
|
+
justify-content: flex-end;
|
|
361
|
+
|
|
362
|
+
.seam-truncated-text {
|
|
363
|
+
text-align: right;
|
|
364
|
+
}
|
|
349
365
|
}
|
|
350
366
|
}
|
|
351
367
|
}
|
|
352
368
|
|
|
353
369
|
.seam-status-col {
|
|
370
|
+
width: 70px;
|
|
354
371
|
text-align: center;
|
|
355
372
|
align-items: center;
|
|
356
373
|
}
|