@seamapi/react 1.9.1 → 1.11.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 +5 -2
- package/dist/elements.js +29 -23
- package/dist/elements.js.map +1 -1
- package/dist/index.css.map +1 -0
- package/dist/index.min.css.map +1 -0
- package/lib/seam/components/DeviceTable/DeviceTable.d.ts +3 -5
- package/lib/seam/components/DeviceTable/DeviceTable.js +4 -2
- package/lib/seam/components/DeviceTable/DeviceTable.js.map +1 -1
- package/lib/seam/use-seam-styles.js +1 -1
- package/lib/seam/use-seam-styles.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +19 -16
- package/src/elements.d.ts +2 -0
- package/src/elements.ts +5 -0
- package/src/lib/seam/components/DeviceTable/DeviceTable.tsx +6 -5
- package/src/lib/seam/use-seam-styles.ts +1 -1
- package/src/lib/version.ts +1 -1
- package/index.css.map +0 -1
- package/index.min.css.map +0 -1
- /package/{index.css → dist/index.css} +0 -0
- /package/{index.min.css → dist/index.min.css} +0 -0
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ export const App = () => {
|
|
|
72
72
|
<seam-device-table publishable-key="your_publishable_key"></seam-device-table>
|
|
73
73
|
<script
|
|
74
74
|
type="module"
|
|
75
|
-
src="https://react.seam.co/v/1.
|
|
75
|
+
src="https://react.seam.co/v/1.8.0/dist/elements.js"
|
|
76
76
|
></script>
|
|
77
77
|
</body>
|
|
78
78
|
```
|
|
@@ -102,7 +102,10 @@ or place the following in the `<head>` tag:
|
|
|
102
102
|
> You must match the version string below with the exact version of this package used by your application.
|
|
103
103
|
|
|
104
104
|
```html
|
|
105
|
-
<link
|
|
105
|
+
<link
|
|
106
|
+
rel="stylesheet"
|
|
107
|
+
href="https://react.seam.co/v/1.8.0/dist/index.min.css"
|
|
108
|
+
/>
|
|
106
109
|
```
|
|
107
110
|
|
|
108
111
|
#### Customizing Styles
|
package/dist/elements.js
CHANGED
|
@@ -8077,11 +8077,11 @@ 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.11.0", HE = "https://react.seam.co", DE = ({
|
|
8081
8081
|
disabled: t = !1,
|
|
8082
8082
|
unminified: e = !1
|
|
8083
8083
|
}) => {
|
|
8084
|
-
const r = `${HE}/v/${NE}/index.${`${e ? "" : "min."}css`}`;
|
|
8084
|
+
const r = `${HE}/v/dist/${NE}/index.${`${e ? "" : "min."}css`}`;
|
|
8085
8085
|
k.useEffect(() => {
|
|
8086
8086
|
if (t || globalThis.document == null || globalThis.document.querySelector(`link[href="${r}"]`) != null)
|
|
8087
8087
|
return;
|
|
@@ -24591,50 +24591,53 @@ function yT(t) {
|
|
|
24591
24591
|
return { ...i, devices: r };
|
|
24592
24592
|
}
|
|
24593
24593
|
function gT({
|
|
24594
|
-
|
|
24595
|
-
|
|
24594
|
+
deviceIds: t,
|
|
24595
|
+
onBack: e,
|
|
24596
|
+
className: n
|
|
24596
24597
|
} = {}) {
|
|
24597
|
-
const { devices:
|
|
24598
|
-
|
|
24598
|
+
const { devices: r, isLoading: i, isError: o, error: s } = yT({
|
|
24599
|
+
device_ids: t
|
|
24600
|
+
}), [l, c] = k.useState(null), [a, u] = k.useState("");
|
|
24601
|
+
if (l != null)
|
|
24599
24602
|
return /* @__PURE__ */ v.jsx(
|
|
24600
24603
|
Wf,
|
|
24601
24604
|
{
|
|
24602
|
-
className:
|
|
24603
|
-
deviceId:
|
|
24605
|
+
className: n,
|
|
24606
|
+
deviceId: l,
|
|
24604
24607
|
onBack: () => {
|
|
24605
|
-
|
|
24608
|
+
c(null);
|
|
24606
24609
|
}
|
|
24607
24610
|
}
|
|
24608
24611
|
);
|
|
24609
|
-
if (r)
|
|
24610
|
-
return /* @__PURE__ */ v.jsx("p", { className: e, children: "..." });
|
|
24611
24612
|
if (i)
|
|
24612
|
-
return /* @__PURE__ */ v.jsx("p", { className:
|
|
24613
|
-
if (
|
|
24613
|
+
return /* @__PURE__ */ v.jsx("p", { className: n, children: "..." });
|
|
24614
|
+
if (o)
|
|
24615
|
+
return /* @__PURE__ */ v.jsx("p", { className: n, children: s == null ? void 0 : s.message });
|
|
24616
|
+
if (r == null)
|
|
24614
24617
|
return null;
|
|
24615
|
-
const
|
|
24616
|
-
return /* @__PURE__ */ v.jsxs("div", { className: Re("seam-device-table",
|
|
24617
|
-
/* @__PURE__ */ v.jsx(nd, { onBack:
|
|
24618
|
+
const p = r.length, d = r.filter((f) => a === "" ? !0 : new RegExp(a, "i").test(f.properties.name));
|
|
24619
|
+
return /* @__PURE__ */ v.jsxs("div", { className: Re("seam-device-table", n), children: [
|
|
24620
|
+
/* @__PURE__ */ v.jsx(nd, { onBack: e }),
|
|
24618
24621
|
/* @__PURE__ */ v.jsxs(x1, { children: [
|
|
24619
24622
|
/* @__PURE__ */ v.jsxs(T1, { children: [
|
|
24620
24623
|
N1.devices,
|
|
24621
24624
|
" ",
|
|
24622
24625
|
/* @__PURE__ */ v.jsxs(j1, { children: [
|
|
24623
24626
|
"(",
|
|
24624
|
-
|
|
24627
|
+
p,
|
|
24625
24628
|
")"
|
|
24626
24629
|
] })
|
|
24627
24630
|
] }),
|
|
24628
24631
|
/* @__PURE__ */ v.jsx(
|
|
24629
24632
|
Qf,
|
|
24630
24633
|
{
|
|
24631
|
-
value:
|
|
24632
|
-
onChange:
|
|
24633
|
-
disabled:
|
|
24634
|
+
value: a,
|
|
24635
|
+
onChange: u,
|
|
24636
|
+
disabled: p === 0
|
|
24634
24637
|
}
|
|
24635
24638
|
)
|
|
24636
24639
|
] }),
|
|
24637
|
-
/* @__PURE__ */ v.jsx(C1, { children: /* @__PURE__ */ v.jsx(vT, { devices:
|
|
24640
|
+
/* @__PURE__ */ v.jsx(C1, { children: /* @__PURE__ */ v.jsx(vT, { devices: d, selectDevice: c }) })
|
|
24638
24641
|
] });
|
|
24639
24642
|
}
|
|
24640
24643
|
function vT(t) {
|
|
@@ -25033,7 +25036,7 @@ const kT = "seam-supported-device-table", NT = {
|
|
|
25033
25036
|
DeviceDetails: oT,
|
|
25034
25037
|
DeviceTable: AT,
|
|
25035
25038
|
SupportedDeviceTable: HT
|
|
25036
|
-
}, Symbol.toStringTag, { value: "Module" })), Xy = DT;
|
|
25039
|
+
}, Symbol.toStringTag, { value: "Module" })), Xy = DT, VT = [];
|
|
25037
25040
|
for (const t of Object.keys(Xy)) {
|
|
25038
25041
|
const e = Xy[t];
|
|
25039
25042
|
if (e == null)
|
|
@@ -25043,6 +25046,9 @@ for (const t of Object.keys(Xy)) {
|
|
|
25043
25046
|
throw new Error(`Missing element name for ${t}`);
|
|
25044
25047
|
if (r == null)
|
|
25045
25048
|
throw new Error(`Missing element Component for ${t}`);
|
|
25046
|
-
QE({ name: n, Component: r, props: i });
|
|
25049
|
+
VT.push(n), QE({ name: n, Component: r, props: i });
|
|
25047
25050
|
}
|
|
25051
|
+
export {
|
|
25052
|
+
VT as default
|
|
25053
|
+
};
|
|
25048
25054
|
//# sourceMappingURL=elements.js.map
|