@patientos/website-kit 0.2.2 → 0.2.3

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.
@@ -10909,6 +10909,10 @@ async function savePortalProfileAndReload(patch, fetchImpl) {
10909
10909
  if (!next.ok) return { ok: false, error: PROFILE_SAVE_FAILED_COPY };
10910
10910
  return { ok: true, data: next.data ?? {} };
10911
10911
  }
10912
+ function refetchedGivenName(data) {
10913
+ if (!hasPortalIdentity(data)) return void 0;
10914
+ return data.givenName ?? null;
10915
+ }
10912
10916
  function PortalAccountClient(props) {
10913
10917
  const client = React21.useMemo(
10914
10918
  () => createPortalClient({
@@ -10990,7 +10994,10 @@ function PortalAccountSurfaceClient({
10990
10994
  commit(next);
10991
10995
  }
10992
10996
  function replaceData(data) {
10993
- setState((prev) => prev.kind === "signed-in" ? { ...prev, data } : prev);
10997
+ const refetched = refetchedGivenName(data);
10998
+ setState(
10999
+ (prev) => prev.kind === "signed-in" ? { ...prev, data, givenName: refetched === void 0 ? prev.givenName : refetched } : prev
11000
+ );
10994
11001
  }
10995
11002
  return /* @__PURE__ */ jsxs24("section", { className: "sk-portal-account__body", "aria-busy": state.kind === "loading", children: [
10996
11003
  /* @__PURE__ */ jsx27("h2", { className: "sk-portal-account__heading", children: heading2 }),
@@ -6,7 +6,7 @@ import {
6
6
  PortalAccountClient,
7
7
  PortalPanelClient,
8
8
  StoreClient
9
- } from "./chunk-UTCKIWE7.js";
9
+ } from "./chunk-LHP4RZ3N.js";
10
10
  import {
11
11
  mountIslandsWith
12
12
  } from "./chunk-THMT43MV.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ISLANDS,
3
3
  mountIslands
4
- } from "./chunk-N6IGS47W.js";
4
+ } from "./chunk-MTOKBMBG.js";
5
5
  import {
6
6
  PortalAccount,
7
7
  PortalPanel,
@@ -13,7 +13,7 @@ import {
13
13
  getThemeTokens,
14
14
  usePortalClient,
15
15
  usePortalSession
16
- } from "./chunk-UTCKIWE7.js";
16
+ } from "./chunk-LHP4RZ3N.js";
17
17
  import {
18
18
  BPOINT_SCRIPT_ORIGIN,
19
19
  BPOINT_SCRIPT_URL,
@@ -6,7 +6,7 @@ import {
6
6
  PortalAccountClient,
7
7
  PortalPanelClient,
8
8
  StoreClient
9
- } from "./chunk-UTCKIWE7.js";
9
+ } from "./chunk-LHP4RZ3N.js";
10
10
  import "./chunk-ZOF22TJA.js";
11
11
  import "./chunk-QDO3SJWR.js";
12
12
  import "./chunk-THMT43MV.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ISLANDS,
3
3
  mountIslands
4
- } from "./chunk-N6IGS47W.js";
5
- import "./chunk-UTCKIWE7.js";
4
+ } from "./chunk-MTOKBMBG.js";
5
+ import "./chunk-LHP4RZ3N.js";
6
6
  import "./chunk-ZOF22TJA.js";
7
7
  import "./chunk-QDO3SJWR.js";
8
8
  import "./chunk-THMT43MV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patientos/website-kit",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "PatientOS clinic website components and patient-facing interactive islands.",
5
5
  "type": "module",
6
6
  "sideEffects": [