@seamapi/react 1.44.0 → 1.45.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 +1 -1
- package/dist/elements.js +80 -74
- package/dist/elements.js.map +1 -1
- package/dist/index.css +16 -0
- 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/components/SupportedDeviceTable/SupportedDeviceContent.d.ts +2 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.js +2 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.d.ts +2 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js +10 -12
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.d.ts +2 -1
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.js +3 -3
- package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.js.map +1 -1
- package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.d.ts +2 -1
- package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js +3 -3
- package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js.map +1 -1
- package/lib/ui/thermostat/ClimateSettingStatus.d.ts +9 -0
- package/lib/ui/thermostat/ClimateSettingStatus.js +33 -0
- package/lib/ui/thermostat/ClimateSettingStatus.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx +3 -0
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.tsx +16 -14
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.element.ts +1 -0
- package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.tsx +4 -0
- package/src/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.ts +5 -3
- package/src/lib/ui/thermostat/ClimateSettingStatus.tsx +88 -0
- package/src/lib/version.ts +1 -1
- package/src/styles/_main.scss +2 -0
- package/src/styles/_thermostat.scss +21 -0
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ export function App() {
|
|
|
78
78
|
<seam-device-table publishable-key="your_publishable_key"></seam-device-table>
|
|
79
79
|
<script
|
|
80
80
|
type="module"
|
|
81
|
-
src="https://react.seam.co/v/1.
|
|
81
|
+
src="https://react.seam.co/v/1.45.0/dist/elements.js"
|
|
82
82
|
></script>
|
|
83
83
|
</body>
|
|
84
84
|
```
|
package/dist/elements.js
CHANGED
|
@@ -8098,7 +8098,7 @@ const Fm = "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;60
|
|
|
8098
8098
|
const n = globalThis.document.createElement("link");
|
|
8099
8099
|
n.rel = "stylesheet", n.type = "text/css", n.href = Fm, globalThis.document.head.appendChild(n);
|
|
8100
8100
|
}, [t]);
|
|
8101
|
-
}, OO = "1.
|
|
8101
|
+
}, OO = "1.45.0", xO = "https://react.seam.co", CO = ({
|
|
8102
8102
|
disabled: t = !1,
|
|
8103
8103
|
unminified: e = !1
|
|
8104
8104
|
}) => {
|
|
@@ -26371,16 +26371,17 @@ function OS(t) {
|
|
|
26371
26371
|
const cz = ({
|
|
26372
26372
|
filterValue: t,
|
|
26373
26373
|
filters: e,
|
|
26374
|
-
brands: n
|
|
26374
|
+
brands: n,
|
|
26375
|
+
excludedBrands: r
|
|
26375
26376
|
}) => {
|
|
26376
|
-
var
|
|
26377
|
-
const
|
|
26378
|
-
t.trim() !== "" && (
|
|
26379
|
-
const
|
|
26380
|
-
return n === null ?
|
|
26381
|
-
...
|
|
26382
|
-
deviceModels: (
|
|
26383
|
-
(
|
|
26377
|
+
var s;
|
|
26378
|
+
const i = {};
|
|
26379
|
+
t.trim() !== "" && (i.text_search = t.trim()), e.supportedOnly && (i.support_level = "live"), e.brand !== null && (i.brand = e.brand);
|
|
26380
|
+
const o = OS(i);
|
|
26381
|
+
return n === null ? o : {
|
|
26382
|
+
...o,
|
|
26383
|
+
deviceModels: (s = o.deviceModels) == null ? void 0 : s.filter(
|
|
26384
|
+
({ brand: l }) => n.includes(l) && !r.includes(l)
|
|
26384
26385
|
)
|
|
26385
26386
|
};
|
|
26386
26387
|
};
|
|
@@ -26388,16 +26389,18 @@ function pz({
|
|
|
26388
26389
|
resetFilterValue: t,
|
|
26389
26390
|
filterValue: e,
|
|
26390
26391
|
filters: n,
|
|
26391
|
-
brands: r
|
|
26392
|
+
brands: r,
|
|
26393
|
+
excludedBrands: i
|
|
26392
26394
|
}) {
|
|
26393
|
-
const { deviceModels:
|
|
26395
|
+
const { deviceModels: o, isLoading: s, isError: l, refetch: c } = cz(
|
|
26394
26396
|
{
|
|
26395
26397
|
filterValue: e,
|
|
26396
26398
|
filters: n,
|
|
26397
|
-
brands: r
|
|
26399
|
+
brands: r,
|
|
26400
|
+
excludedBrands: i
|
|
26398
26401
|
}
|
|
26399
26402
|
);
|
|
26400
|
-
return
|
|
26403
|
+
return s ? /* @__PURE__ */ f.jsx("div", { className: "seam-supported-device-table-content-state-block", children: /* @__PURE__ */ f.jsx("p", { children: si.loading }) }) : l ? /* @__PURE__ */ f.jsxs("div", { className: "seam-supported-device-table-content-state-block", children: [
|
|
26401
26404
|
/* @__PURE__ */ f.jsx("p", { children: si.error }),
|
|
26402
26405
|
/* @__PURE__ */ f.jsx(
|
|
26403
26406
|
Dt,
|
|
@@ -26405,37 +26408,37 @@ function pz({
|
|
|
26405
26408
|
variant: "solid",
|
|
26406
26409
|
size: "small",
|
|
26407
26410
|
onClick: () => {
|
|
26408
|
-
|
|
26411
|
+
c();
|
|
26409
26412
|
},
|
|
26410
26413
|
children: si.retry
|
|
26411
26414
|
}
|
|
26412
26415
|
)
|
|
26413
|
-
] }) :
|
|
26416
|
+
] }) : o == null ? null : o.length === 0 ? /* @__PURE__ */ f.jsx("div", { className: "seam-supported-device-table-content", children: /* @__PURE__ */ f.jsx(
|
|
26414
26417
|
fz,
|
|
26415
26418
|
{
|
|
26416
26419
|
filterValue: e,
|
|
26417
26420
|
resetFilterValue: t
|
|
26418
26421
|
}
|
|
26419
|
-
) }) : e.trim() !== "" || n.brand !== null ? /* @__PURE__ */ f.jsx("div", { className: "seam-supported-device-table-content", children:
|
|
26422
|
+
) }) : e.trim() !== "" || n.brand !== null ? /* @__PURE__ */ f.jsx("div", { className: "seam-supported-device-table-content", children: o.map((p, d) => /* @__PURE__ */ f.jsx(
|
|
26420
26423
|
uz,
|
|
26421
26424
|
{
|
|
26422
|
-
deviceModel:
|
|
26425
|
+
deviceModel: p
|
|
26423
26426
|
},
|
|
26424
26427
|
[
|
|
26425
|
-
|
|
26426
|
-
|
|
26427
|
-
|
|
26428
|
-
|
|
26429
|
-
|
|
26428
|
+
p.main_category,
|
|
26429
|
+
p.brand,
|
|
26430
|
+
p.model_name,
|
|
26431
|
+
p.manufacturer_model_id,
|
|
26432
|
+
d
|
|
26430
26433
|
].join(":")
|
|
26431
|
-
)) }) : /* @__PURE__ */ f.jsx(f.Fragment, { children: Object.entries(hz(
|
|
26432
|
-
([
|
|
26434
|
+
)) }) : /* @__PURE__ */ f.jsx(f.Fragment, { children: Object.entries(hz(o)).map(
|
|
26435
|
+
([p, d]) => /* @__PURE__ */ f.jsx(
|
|
26433
26436
|
sz,
|
|
26434
26437
|
{
|
|
26435
|
-
brand:
|
|
26436
|
-
deviceModels:
|
|
26438
|
+
brand: p,
|
|
26439
|
+
deviceModels: d
|
|
26437
26440
|
},
|
|
26438
|
-
|
|
26441
|
+
p
|
|
26439
26442
|
)
|
|
26440
26443
|
) });
|
|
26441
26444
|
}
|
|
@@ -26537,52 +26540,53 @@ function bz({
|
|
|
26537
26540
|
setFilterValue: e,
|
|
26538
26541
|
filters: n,
|
|
26539
26542
|
setFilters: r,
|
|
26540
|
-
brands: i
|
|
26543
|
+
brands: i,
|
|
26544
|
+
excludedBrands: o
|
|
26541
26545
|
}) {
|
|
26542
|
-
const
|
|
26543
|
-
r((
|
|
26544
|
-
...
|
|
26545
|
-
[
|
|
26546
|
+
const s = Sz(n), l = Az(i, o), c = (p) => {
|
|
26547
|
+
r((d) => ({
|
|
26548
|
+
...d,
|
|
26549
|
+
[p]: null
|
|
26546
26550
|
}));
|
|
26547
|
-
},
|
|
26551
|
+
}, a = s > 0 ? `${ea.filters} (${s})` : ea.filter, u = ea.all;
|
|
26548
26552
|
return /* @__PURE__ */ f.jsxs("div", { className: "seam-supported-device-table-filter-area", children: [
|
|
26549
26553
|
/* @__PURE__ */ f.jsx("div", { className: "seam-deliberate-block" }),
|
|
26550
26554
|
/* @__PURE__ */ f.jsxs("div", { className: "seam-filters-wrap", children: [
|
|
26551
26555
|
/* @__PURE__ */ f.jsx(
|
|
26552
26556
|
vh,
|
|
26553
26557
|
{
|
|
26554
|
-
renderButton: ({ onOpen:
|
|
26558
|
+
renderButton: ({ onOpen: p }) => /* @__PURE__ */ f.jsx(
|
|
26555
26559
|
Dt,
|
|
26556
26560
|
{
|
|
26557
26561
|
variant: "outline",
|
|
26558
26562
|
className: "seam-filters-button",
|
|
26559
|
-
onClick:
|
|
26560
|
-
children:
|
|
26563
|
+
onClick: p,
|
|
26564
|
+
children: a
|
|
26561
26565
|
}
|
|
26562
26566
|
),
|
|
26563
26567
|
children: /* @__PURE__ */ f.jsxs(
|
|
26564
26568
|
"div",
|
|
26565
26569
|
{
|
|
26566
26570
|
className: "seam-supported-device-table-filter-menu",
|
|
26567
|
-
onClick: (
|
|
26568
|
-
|
|
26571
|
+
onClick: (p) => {
|
|
26572
|
+
p.stopPropagation();
|
|
26569
26573
|
},
|
|
26570
26574
|
children: [
|
|
26571
26575
|
/* @__PURE__ */ f.jsx("div", { className: "seam-filter-menu-row", children: /* @__PURE__ */ f.jsx(
|
|
26572
26576
|
yz,
|
|
26573
26577
|
{
|
|
26574
26578
|
label: ea.brand,
|
|
26575
|
-
allLabel:
|
|
26576
|
-
options:
|
|
26577
|
-
onSelect: (
|
|
26578
|
-
r((
|
|
26579
|
-
...
|
|
26580
|
-
brand:
|
|
26579
|
+
allLabel: u,
|
|
26580
|
+
options: l,
|
|
26581
|
+
onSelect: (p) => {
|
|
26582
|
+
r((d) => ({
|
|
26583
|
+
...d,
|
|
26584
|
+
brand: p
|
|
26581
26585
|
}));
|
|
26582
26586
|
},
|
|
26583
|
-
buttonLabel: n.brand ??
|
|
26587
|
+
buttonLabel: n.brand ?? u,
|
|
26584
26588
|
onAllOptionSelect: () => {
|
|
26585
|
-
|
|
26589
|
+
c("brand");
|
|
26586
26590
|
}
|
|
26587
26591
|
}
|
|
26588
26592
|
) }),
|
|
@@ -26601,10 +26605,10 @@ function bz({
|
|
|
26601
26605
|
type: "checkbox",
|
|
26602
26606
|
className: "seam-filter-checkbox",
|
|
26603
26607
|
checked: n.supportedOnly,
|
|
26604
|
-
onChange: (
|
|
26605
|
-
r((
|
|
26606
|
-
...
|
|
26607
|
-
supportedOnly:
|
|
26608
|
+
onChange: (p) => {
|
|
26609
|
+
r((d) => ({
|
|
26610
|
+
...d,
|
|
26611
|
+
supportedOnly: p.target.checked
|
|
26608
26612
|
}));
|
|
26609
26613
|
}
|
|
26610
26614
|
}
|
|
@@ -26621,8 +26625,8 @@ function bz({
|
|
|
26621
26625
|
bh,
|
|
26622
26626
|
{
|
|
26623
26627
|
value: t,
|
|
26624
|
-
onChange: (
|
|
26625
|
-
e(
|
|
26628
|
+
onChange: (p) => {
|
|
26629
|
+
e(p);
|
|
26626
26630
|
},
|
|
26627
26631
|
className: "seam-supported-device-table-filter-area-search-bar"
|
|
26628
26632
|
}
|
|
@@ -26633,14 +26637,12 @@ function bz({
|
|
|
26633
26637
|
const Sz = (t) => {
|
|
26634
26638
|
let e = 0;
|
|
26635
26639
|
return t.brand !== null && e++, t.supportedOnly || e++, e;
|
|
26636
|
-
}, Az = (t) => {
|
|
26637
|
-
const { deviceModels:
|
|
26638
|
-
if (
|
|
26640
|
+
}, Az = (t, e) => {
|
|
26641
|
+
const { deviceModels: n } = OS();
|
|
26642
|
+
if (n == null)
|
|
26639
26643
|
return [];
|
|
26640
|
-
const
|
|
26641
|
-
|
|
26642
|
-
r.brand.trim() !== "" && n.add(r.brand);
|
|
26643
|
-
return Array.from(n).filter((r) => t === null ? !0 : t.includes(r)).map((r) => vz(r));
|
|
26644
|
+
const r = n.map(({ brand: i }) => i.trim()).filter((i) => i !== "").filter((i) => t === null ? !0 : t.includes(i) && !e.includes(i)).map((i) => vz(i));
|
|
26645
|
+
return Array.from(new Set(r));
|
|
26644
26646
|
}, ea = {
|
|
26645
26647
|
all: "All",
|
|
26646
26648
|
brand: "Brand",
|
|
@@ -26652,39 +26654,42 @@ function wz({
|
|
|
26652
26654
|
disableFilter: t = !1,
|
|
26653
26655
|
cannotFilter: e,
|
|
26654
26656
|
brands: n = null,
|
|
26655
|
-
|
|
26657
|
+
excludedBrands: r = [],
|
|
26658
|
+
className: i
|
|
26656
26659
|
} = {}) {
|
|
26657
|
-
const [
|
|
26660
|
+
const [o, s] = P.useState(""), [l, c] = P.useState({
|
|
26658
26661
|
supportedOnly: !0,
|
|
26659
26662
|
brand: null
|
|
26660
|
-
}),
|
|
26663
|
+
}), a = e ?? t;
|
|
26661
26664
|
return /* @__PURE__ */ f.jsxs(
|
|
26662
26665
|
"div",
|
|
26663
26666
|
{
|
|
26664
26667
|
className: J(
|
|
26665
26668
|
"seam-supported-device-table-content-wrap",
|
|
26666
|
-
|
|
26669
|
+
i
|
|
26667
26670
|
),
|
|
26668
26671
|
children: [
|
|
26669
|
-
!
|
|
26672
|
+
!a && /* @__PURE__ */ f.jsx(
|
|
26670
26673
|
bz,
|
|
26671
26674
|
{
|
|
26672
|
-
filterValue:
|
|
26673
|
-
setFilterValue:
|
|
26674
|
-
filters:
|
|
26675
|
-
setFilters:
|
|
26676
|
-
brands: n
|
|
26675
|
+
filterValue: o,
|
|
26676
|
+
setFilterValue: s,
|
|
26677
|
+
filters: l,
|
|
26678
|
+
setFilters: c,
|
|
26679
|
+
brands: n,
|
|
26680
|
+
excludedBrands: r
|
|
26677
26681
|
}
|
|
26678
26682
|
),
|
|
26679
26683
|
/* @__PURE__ */ f.jsx(
|
|
26680
26684
|
pz,
|
|
26681
26685
|
{
|
|
26682
26686
|
resetFilterValue: () => {
|
|
26683
|
-
|
|
26687
|
+
s("");
|
|
26684
26688
|
},
|
|
26685
|
-
filterValue:
|
|
26686
|
-
filters:
|
|
26687
|
-
brands: n
|
|
26689
|
+
filterValue: o,
|
|
26690
|
+
filters: l,
|
|
26691
|
+
brands: n,
|
|
26692
|
+
excludedBrands: r
|
|
26688
26693
|
}
|
|
26689
26694
|
)
|
|
26690
26695
|
]
|
|
@@ -26695,6 +26700,7 @@ const Ez = "seam-supported-device-table", Oz = {
|
|
|
26695
26700
|
cannotFilter: "boolean",
|
|
26696
26701
|
disableFilter: "boolean",
|
|
26697
26702
|
brands: "array",
|
|
26703
|
+
excludedBrands: "array",
|
|
26698
26704
|
className: "string"
|
|
26699
26705
|
}, xz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26700
26706
|
__proto__: null,
|