@seamapi/react 1.13.0 → 1.14.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/dist/elements.js +30 -28
- package/dist/elements.js.map +1 -1
- package/lib/seam/components/DeviceTable/DeviceTable.d.ts +2 -1
- package/lib/seam/components/DeviceTable/DeviceTable.js +9 -3
- package/lib/seam/components/DeviceTable/DeviceTable.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/components/DeviceTable/DeviceTable.element.ts +1 -0
- package/src/lib/seam/components/DeviceTable/DeviceTable.tsx +14 -6
- package/src/lib/version.ts +1 -1
package/dist/elements.js
CHANGED
|
@@ -8077,7 +8077,7 @@ const mm = "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;60
|
|
|
8077
8077
|
const n = globalThis.document.createElement("link");
|
|
8078
8078
|
n.rel = "stylesheet", n.type = "text/css", n.href = mm, globalThis.document.head.appendChild(n);
|
|
8079
8079
|
}, [t]);
|
|
8080
|
-
}, NE = "1.
|
|
8080
|
+
}, NE = "1.14.0", HE = "https://react.seam.co", DE = ({
|
|
8081
8081
|
disabled: t = !1,
|
|
8082
8082
|
unminified: e = !1
|
|
8083
8083
|
}) => {
|
|
@@ -24640,59 +24640,60 @@ function wT(t) {
|
|
|
24640
24640
|
}
|
|
24641
24641
|
function ET({
|
|
24642
24642
|
deviceIds: t,
|
|
24643
|
-
onDeviceClick: e
|
|
24644
|
-
|
|
24645
|
-
|
|
24643
|
+
onDeviceClick: e = () => {
|
|
24644
|
+
},
|
|
24645
|
+
preventDefaultOnDeviceClick: n = !1,
|
|
24646
|
+
onBack: r,
|
|
24647
|
+
className: i
|
|
24646
24648
|
} = {}) {
|
|
24647
|
-
const { devices:
|
|
24649
|
+
const { devices: o, isLoading: s, isError: l, error: c } = wT({
|
|
24648
24650
|
device_ids: t
|
|
24649
|
-
}), [
|
|
24650
|
-
|
|
24651
|
+
}), [a, u] = k.useState(null), [p, d] = k.useState(""), f = k.useCallback(
|
|
24652
|
+
(b) => {
|
|
24653
|
+
e(b), !n && u(b);
|
|
24654
|
+
},
|
|
24655
|
+
[e, n, u]
|
|
24656
|
+
);
|
|
24657
|
+
if (a != null)
|
|
24651
24658
|
return /* @__PURE__ */ v.jsx(
|
|
24652
24659
|
Wf,
|
|
24653
24660
|
{
|
|
24654
|
-
className:
|
|
24655
|
-
deviceId:
|
|
24661
|
+
className: i,
|
|
24662
|
+
deviceId: a,
|
|
24656
24663
|
onBack: () => {
|
|
24657
|
-
|
|
24664
|
+
u(null);
|
|
24658
24665
|
}
|
|
24659
24666
|
}
|
|
24660
24667
|
);
|
|
24661
|
-
if (o)
|
|
24662
|
-
return /* @__PURE__ */ v.jsx("p", { className: r, children: "..." });
|
|
24663
24668
|
if (s)
|
|
24664
|
-
return /* @__PURE__ */ v.jsx("p", { className:
|
|
24665
|
-
if (
|
|
24669
|
+
return /* @__PURE__ */ v.jsx("p", { className: i, children: "..." });
|
|
24670
|
+
if (l)
|
|
24671
|
+
return /* @__PURE__ */ v.jsx("p", { className: i, children: c == null ? void 0 : c.message });
|
|
24672
|
+
if (o == null)
|
|
24666
24673
|
return null;
|
|
24667
|
-
const
|
|
24668
|
-
return /* @__PURE__ */ v.jsxs("div", { className: Re("seam-device-table",
|
|
24669
|
-
/* @__PURE__ */ v.jsx(nd, { onBack:
|
|
24674
|
+
const h = o.length, g = o.filter((b) => p === "" ? !0 : new RegExp(p, "i").test(b.properties.name));
|
|
24675
|
+
return /* @__PURE__ */ v.jsxs("div", { className: Re("seam-device-table", i), children: [
|
|
24676
|
+
/* @__PURE__ */ v.jsx(nd, { onBack: r }),
|
|
24670
24677
|
/* @__PURE__ */ v.jsxs(M1, { children: [
|
|
24671
24678
|
/* @__PURE__ */ v.jsxs(j1, { children: [
|
|
24672
24679
|
H1.devices,
|
|
24673
24680
|
" ",
|
|
24674
24681
|
/* @__PURE__ */ v.jsxs(z1, { children: [
|
|
24675
24682
|
"(",
|
|
24676
|
-
|
|
24683
|
+
h,
|
|
24677
24684
|
")"
|
|
24678
24685
|
] })
|
|
24679
24686
|
] }),
|
|
24680
24687
|
/* @__PURE__ */ v.jsx(
|
|
24681
24688
|
Qf,
|
|
24682
24689
|
{
|
|
24683
|
-
value:
|
|
24684
|
-
onChange:
|
|
24685
|
-
disabled:
|
|
24690
|
+
value: p,
|
|
24691
|
+
onChange: d,
|
|
24692
|
+
disabled: h === 0
|
|
24686
24693
|
}
|
|
24687
24694
|
)
|
|
24688
24695
|
] }),
|
|
24689
|
-
/* @__PURE__ */ v.jsx(x1, { children: /* @__PURE__ */ v.jsx(
|
|
24690
|
-
OT,
|
|
24691
|
-
{
|
|
24692
|
-
devices: f,
|
|
24693
|
-
onDeviceClick: e ?? a
|
|
24694
|
-
}
|
|
24695
|
-
) })
|
|
24696
|
+
/* @__PURE__ */ v.jsx(x1, { children: /* @__PURE__ */ v.jsx(OT, { devices: g, onDeviceClick: f }) })
|
|
24696
24697
|
] });
|
|
24697
24698
|
}
|
|
24698
24699
|
function OT(t) {
|
|
@@ -24728,6 +24729,7 @@ const H1 = {
|
|
|
24728
24729
|
}, IT = "seam-device-table", CT = {
|
|
24729
24730
|
deviceIds: "json",
|
|
24730
24731
|
onDeviceClick: "function",
|
|
24732
|
+
preventDefaultOnDeviceClick: "boolean",
|
|
24731
24733
|
onBack: "function",
|
|
24732
24734
|
className: "string"
|
|
24733
24735
|
}, xT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|