@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 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.7.0/dist/elements.js"
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 rel="stylesheet" href="https://react.seam.co/v/1.7.0/index.min.css" />
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.9.1", HE = "https://react.seam.co", DE = ({
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
- onBack: t,
24595
- className: e
24594
+ deviceIds: t,
24595
+ onBack: e,
24596
+ className: n
24596
24597
  } = {}) {
24597
- const { devices: n, isLoading: r, isError: i, error: o } = yT(), [s, l] = k.useState(null), [c, a] = k.useState("");
24598
- if (s != null)
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: e,
24603
- deviceId: s,
24605
+ className: n,
24606
+ deviceId: l,
24604
24607
  onBack: () => {
24605
- l(null);
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: e, children: o == null ? void 0 : o.message });
24613
- if (n == null)
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 u = n.length, p = n.filter((d) => c === "" ? !0 : new RegExp(c, "i").test(d.properties.name));
24616
- return /* @__PURE__ */ v.jsxs("div", { className: Re("seam-device-table", e), children: [
24617
- /* @__PURE__ */ v.jsx(nd, { onBack: t }),
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
- u,
24627
+ p,
24625
24628
  ")"
24626
24629
  ] })
24627
24630
  ] }),
24628
24631
  /* @__PURE__ */ v.jsx(
24629
24632
  Qf,
24630
24633
  {
24631
- value: c,
24632
- onChange: a,
24633
- disabled: u === 0
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: p, selectDevice: l }) })
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