@seamapi/react 1.44.0 → 1.45.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/README.md +1 -1
- package/dist/elements.js +79 -75
- 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 +12 -11
- 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 +11 -6
- 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 +18 -13
- 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 +11 -8
- 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.1/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.1", xO = "https://react.seam.co", CO = ({
|
|
8102
8102
|
disabled: t = !1,
|
|
8103
8103
|
unminified: e = !1
|
|
8104
8104
|
}) => {
|
|
@@ -26371,33 +26371,34 @@ 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
|
|
26381
|
-
...
|
|
26382
|
-
deviceModels: (
|
|
26383
|
-
(s) => n.includes(s.brand)
|
|
26384
|
-
)
|
|
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 {
|
|
26382
|
+
...o,
|
|
26383
|
+
deviceModels: (s = o.deviceModels) == null ? void 0 : s.filter(({ brand: l }) => n === null ? !0 : n.includes(l)).filter(({ brand: l }) => !r.includes(l))
|
|
26385
26384
|
};
|
|
26386
26385
|
};
|
|
26387
26386
|
function pz({
|
|
26388
26387
|
resetFilterValue: t,
|
|
26389
26388
|
filterValue: e,
|
|
26390
26389
|
filters: n,
|
|
26391
|
-
brands: r
|
|
26390
|
+
brands: r,
|
|
26391
|
+
excludedBrands: i
|
|
26392
26392
|
}) {
|
|
26393
|
-
const { deviceModels:
|
|
26393
|
+
const { deviceModels: o, isLoading: s, isError: l, refetch: c } = cz(
|
|
26394
26394
|
{
|
|
26395
26395
|
filterValue: e,
|
|
26396
26396
|
filters: n,
|
|
26397
|
-
brands: r
|
|
26397
|
+
brands: r,
|
|
26398
|
+
excludedBrands: i
|
|
26398
26399
|
}
|
|
26399
26400
|
);
|
|
26400
|
-
return
|
|
26401
|
+
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
26402
|
/* @__PURE__ */ f.jsx("p", { children: si.error }),
|
|
26402
26403
|
/* @__PURE__ */ f.jsx(
|
|
26403
26404
|
Dt,
|
|
@@ -26405,37 +26406,37 @@ function pz({
|
|
|
26405
26406
|
variant: "solid",
|
|
26406
26407
|
size: "small",
|
|
26407
26408
|
onClick: () => {
|
|
26408
|
-
|
|
26409
|
+
c();
|
|
26409
26410
|
},
|
|
26410
26411
|
children: si.retry
|
|
26411
26412
|
}
|
|
26412
26413
|
)
|
|
26413
|
-
] }) :
|
|
26414
|
+
] }) : o == null ? null : o.length === 0 ? /* @__PURE__ */ f.jsx("div", { className: "seam-supported-device-table-content", children: /* @__PURE__ */ f.jsx(
|
|
26414
26415
|
fz,
|
|
26415
26416
|
{
|
|
26416
26417
|
filterValue: e,
|
|
26417
26418
|
resetFilterValue: t
|
|
26418
26419
|
}
|
|
26419
|
-
) }) : e.trim() !== "" || n.brand !== null ? /* @__PURE__ */ f.jsx("div", { className: "seam-supported-device-table-content", children:
|
|
26420
|
+
) }) : e.trim() !== "" || n.brand !== null ? /* @__PURE__ */ f.jsx("div", { className: "seam-supported-device-table-content", children: o.map((p, d) => /* @__PURE__ */ f.jsx(
|
|
26420
26421
|
uz,
|
|
26421
26422
|
{
|
|
26422
|
-
deviceModel:
|
|
26423
|
+
deviceModel: p
|
|
26423
26424
|
},
|
|
26424
26425
|
[
|
|
26425
|
-
|
|
26426
|
-
|
|
26427
|
-
|
|
26428
|
-
|
|
26429
|
-
|
|
26426
|
+
p.main_category,
|
|
26427
|
+
p.brand,
|
|
26428
|
+
p.model_name,
|
|
26429
|
+
p.manufacturer_model_id,
|
|
26430
|
+
d
|
|
26430
26431
|
].join(":")
|
|
26431
|
-
)) }) : /* @__PURE__ */ f.jsx(f.Fragment, { children: Object.entries(hz(
|
|
26432
|
-
([
|
|
26432
|
+
)) }) : /* @__PURE__ */ f.jsx(f.Fragment, { children: Object.entries(hz(o)).map(
|
|
26433
|
+
([p, d]) => /* @__PURE__ */ f.jsx(
|
|
26433
26434
|
sz,
|
|
26434
26435
|
{
|
|
26435
|
-
brand:
|
|
26436
|
-
deviceModels:
|
|
26436
|
+
brand: p,
|
|
26437
|
+
deviceModels: d
|
|
26437
26438
|
},
|
|
26438
|
-
|
|
26439
|
+
p
|
|
26439
26440
|
)
|
|
26440
26441
|
) });
|
|
26441
26442
|
}
|
|
@@ -26537,52 +26538,53 @@ function bz({
|
|
|
26537
26538
|
setFilterValue: e,
|
|
26538
26539
|
filters: n,
|
|
26539
26540
|
setFilters: r,
|
|
26540
|
-
brands: i
|
|
26541
|
+
brands: i,
|
|
26542
|
+
excludedBrands: o
|
|
26541
26543
|
}) {
|
|
26542
|
-
const
|
|
26543
|
-
r((
|
|
26544
|
-
...
|
|
26545
|
-
[
|
|
26544
|
+
const s = Sz(n), l = Az(i, o), c = (p) => {
|
|
26545
|
+
r((d) => ({
|
|
26546
|
+
...d,
|
|
26547
|
+
[p]: null
|
|
26546
26548
|
}));
|
|
26547
|
-
},
|
|
26549
|
+
}, a = s > 0 ? `${ea.filters} (${s})` : ea.filter, u = ea.all;
|
|
26548
26550
|
return /* @__PURE__ */ f.jsxs("div", { className: "seam-supported-device-table-filter-area", children: [
|
|
26549
26551
|
/* @__PURE__ */ f.jsx("div", { className: "seam-deliberate-block" }),
|
|
26550
26552
|
/* @__PURE__ */ f.jsxs("div", { className: "seam-filters-wrap", children: [
|
|
26551
26553
|
/* @__PURE__ */ f.jsx(
|
|
26552
26554
|
vh,
|
|
26553
26555
|
{
|
|
26554
|
-
renderButton: ({ onOpen:
|
|
26556
|
+
renderButton: ({ onOpen: p }) => /* @__PURE__ */ f.jsx(
|
|
26555
26557
|
Dt,
|
|
26556
26558
|
{
|
|
26557
26559
|
variant: "outline",
|
|
26558
26560
|
className: "seam-filters-button",
|
|
26559
|
-
onClick:
|
|
26560
|
-
children:
|
|
26561
|
+
onClick: p,
|
|
26562
|
+
children: a
|
|
26561
26563
|
}
|
|
26562
26564
|
),
|
|
26563
26565
|
children: /* @__PURE__ */ f.jsxs(
|
|
26564
26566
|
"div",
|
|
26565
26567
|
{
|
|
26566
26568
|
className: "seam-supported-device-table-filter-menu",
|
|
26567
|
-
onClick: (
|
|
26568
|
-
|
|
26569
|
+
onClick: (p) => {
|
|
26570
|
+
p.stopPropagation();
|
|
26569
26571
|
},
|
|
26570
26572
|
children: [
|
|
26571
26573
|
/* @__PURE__ */ f.jsx("div", { className: "seam-filter-menu-row", children: /* @__PURE__ */ f.jsx(
|
|
26572
26574
|
yz,
|
|
26573
26575
|
{
|
|
26574
26576
|
label: ea.brand,
|
|
26575
|
-
allLabel:
|
|
26576
|
-
options:
|
|
26577
|
-
onSelect: (
|
|
26578
|
-
r((
|
|
26579
|
-
...
|
|
26580
|
-
brand:
|
|
26577
|
+
allLabel: u,
|
|
26578
|
+
options: l,
|
|
26579
|
+
onSelect: (p) => {
|
|
26580
|
+
r((d) => ({
|
|
26581
|
+
...d,
|
|
26582
|
+
brand: p
|
|
26581
26583
|
}));
|
|
26582
26584
|
},
|
|
26583
|
-
buttonLabel: n.brand ??
|
|
26585
|
+
buttonLabel: n.brand ?? u,
|
|
26584
26586
|
onAllOptionSelect: () => {
|
|
26585
|
-
|
|
26587
|
+
c("brand");
|
|
26586
26588
|
}
|
|
26587
26589
|
}
|
|
26588
26590
|
) }),
|
|
@@ -26601,10 +26603,10 @@ function bz({
|
|
|
26601
26603
|
type: "checkbox",
|
|
26602
26604
|
className: "seam-filter-checkbox",
|
|
26603
26605
|
checked: n.supportedOnly,
|
|
26604
|
-
onChange: (
|
|
26605
|
-
r((
|
|
26606
|
-
...
|
|
26607
|
-
supportedOnly:
|
|
26606
|
+
onChange: (p) => {
|
|
26607
|
+
r((d) => ({
|
|
26608
|
+
...d,
|
|
26609
|
+
supportedOnly: p.target.checked
|
|
26608
26610
|
}));
|
|
26609
26611
|
}
|
|
26610
26612
|
}
|
|
@@ -26621,8 +26623,8 @@ function bz({
|
|
|
26621
26623
|
bh,
|
|
26622
26624
|
{
|
|
26623
26625
|
value: t,
|
|
26624
|
-
onChange: (
|
|
26625
|
-
e(
|
|
26626
|
+
onChange: (p) => {
|
|
26627
|
+
e(p);
|
|
26626
26628
|
},
|
|
26627
26629
|
className: "seam-supported-device-table-filter-area-search-bar"
|
|
26628
26630
|
}
|
|
@@ -26633,14 +26635,12 @@ function bz({
|
|
|
26633
26635
|
const Sz = (t) => {
|
|
26634
26636
|
let e = 0;
|
|
26635
26637
|
return t.brand !== null && e++, t.supportedOnly || e++, e;
|
|
26636
|
-
}, Az = (t) => {
|
|
26637
|
-
const { deviceModels:
|
|
26638
|
-
if (
|
|
26638
|
+
}, Az = (t, e) => {
|
|
26639
|
+
const { deviceModels: n } = OS();
|
|
26640
|
+
if (n == null)
|
|
26639
26641
|
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));
|
|
26642
|
+
const r = n.map(({ brand: i }) => i.trim()).filter((i) => i !== "").filter((i) => t === null ? !0 : t.includes(i)).filter((i) => !e.includes(i)).map((i) => vz(i));
|
|
26643
|
+
return Array.from(new Set(r));
|
|
26644
26644
|
}, ea = {
|
|
26645
26645
|
all: "All",
|
|
26646
26646
|
brand: "Brand",
|
|
@@ -26652,39 +26652,42 @@ function wz({
|
|
|
26652
26652
|
disableFilter: t = !1,
|
|
26653
26653
|
cannotFilter: e,
|
|
26654
26654
|
brands: n = null,
|
|
26655
|
-
|
|
26655
|
+
excludedBrands: r = [],
|
|
26656
|
+
className: i
|
|
26656
26657
|
} = {}) {
|
|
26657
|
-
const [
|
|
26658
|
+
const [o, s] = P.useState(""), [l, c] = P.useState({
|
|
26658
26659
|
supportedOnly: !0,
|
|
26659
26660
|
brand: null
|
|
26660
|
-
}),
|
|
26661
|
+
}), a = e ?? t;
|
|
26661
26662
|
return /* @__PURE__ */ f.jsxs(
|
|
26662
26663
|
"div",
|
|
26663
26664
|
{
|
|
26664
26665
|
className: J(
|
|
26665
26666
|
"seam-supported-device-table-content-wrap",
|
|
26666
|
-
|
|
26667
|
+
i
|
|
26667
26668
|
),
|
|
26668
26669
|
children: [
|
|
26669
|
-
!
|
|
26670
|
+
!a && /* @__PURE__ */ f.jsx(
|
|
26670
26671
|
bz,
|
|
26671
26672
|
{
|
|
26672
|
-
filterValue:
|
|
26673
|
-
setFilterValue:
|
|
26674
|
-
filters:
|
|
26675
|
-
setFilters:
|
|
26676
|
-
brands: n
|
|
26673
|
+
filterValue: o,
|
|
26674
|
+
setFilterValue: s,
|
|
26675
|
+
filters: l,
|
|
26676
|
+
setFilters: c,
|
|
26677
|
+
brands: n,
|
|
26678
|
+
excludedBrands: r
|
|
26677
26679
|
}
|
|
26678
26680
|
),
|
|
26679
26681
|
/* @__PURE__ */ f.jsx(
|
|
26680
26682
|
pz,
|
|
26681
26683
|
{
|
|
26682
26684
|
resetFilterValue: () => {
|
|
26683
|
-
|
|
26685
|
+
s("");
|
|
26684
26686
|
},
|
|
26685
|
-
filterValue:
|
|
26686
|
-
filters:
|
|
26687
|
-
brands: n
|
|
26687
|
+
filterValue: o,
|
|
26688
|
+
filters: l,
|
|
26689
|
+
brands: n,
|
|
26690
|
+
excludedBrands: r
|
|
26688
26691
|
}
|
|
26689
26692
|
)
|
|
26690
26693
|
]
|
|
@@ -26695,6 +26698,7 @@ const Ez = "seam-supported-device-table", Oz = {
|
|
|
26695
26698
|
cannotFilter: "boolean",
|
|
26696
26699
|
disableFilter: "boolean",
|
|
26697
26700
|
brands: "array",
|
|
26701
|
+
excludedBrands: "array",
|
|
26698
26702
|
className: "string"
|
|
26699
26703
|
}, xz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26700
26704
|
__proto__: null,
|