@patientos/website-kit 0.2.3 → 0.2.4
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
|
@@ -26,5 +26,8 @@ export function CertificateFunnel() {
|
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
`clinicPhone` is shown to the patient exactly as you pass it and dialled in E.164 — pass
|
|
30
|
+
`1300 362 555` and every escape link renders `tel:+611300362555`.
|
|
31
|
+
|
|
29
32
|
`publicApi.publishableKey` is public by design and is validated against the consuming
|
|
30
33
|
site's origin by PatientOS. Never put server credentials or patient data in these props.
|
|
@@ -403,6 +403,7 @@ function normalizeAuPhone(input) {
|
|
|
403
403
|
const cleaned = input.replace(/[\s()-]/g, "");
|
|
404
404
|
if (cleaned.startsWith("+")) return cleaned;
|
|
405
405
|
if (cleaned.startsWith("0")) return `+61${cleaned.slice(1)}`;
|
|
406
|
+
if (/^(?:13\d{4}|1300\d{6}|1800\d{6})$/.test(cleaned)) return `+61${cleaned}`;
|
|
406
407
|
if (cleaned.startsWith("61")) return `+${cleaned}`;
|
|
407
408
|
return cleaned;
|
|
408
409
|
}
|
|
@@ -1938,7 +1939,7 @@ function PaymentStep({
|
|
|
1938
1939
|
phase === "init_failed" && clinicPhone && /* @__PURE__ */ jsxs5("p", { className: "sk-cf__body", children: [
|
|
1939
1940
|
"Still not working?",
|
|
1940
1941
|
" ",
|
|
1941
|
-
/* @__PURE__ */ jsxs5("a", { className: "sk-cf__link", href: `tel:${clinicPhone
|
|
1942
|
+
/* @__PURE__ */ jsxs5("a", { className: "sk-cf__link", href: `tel:${normalizeAuPhone(clinicPhone)}`, children: [
|
|
1942
1943
|
"Call the clinic on ",
|
|
1943
1944
|
clinicPhone
|
|
1944
1945
|
] })
|
|
@@ -3479,7 +3480,7 @@ function SlotStep({
|
|
|
3479
3480
|
/* @__PURE__ */ jsxs13("p", { className: "sk-slots__empty-note", children: [
|
|
3480
3481
|
"Can\u2019t find a time that suits?",
|
|
3481
3482
|
" ",
|
|
3482
|
-
/* @__PURE__ */ jsxs13("a", { className: "sk-cf__link", href: `tel:${clinicPhone
|
|
3483
|
+
/* @__PURE__ */ jsxs13("a", { className: "sk-cf__link", href: `tel:${normalizeAuPhone(clinicPhone)}`, children: [
|
|
3483
3484
|
"Call the clinic on ",
|
|
3484
3485
|
clinicPhone
|
|
3485
3486
|
] })
|
|
@@ -3907,7 +3908,7 @@ function BlockedStep({
|
|
|
3907
3908
|
EMERGENCY2
|
|
3908
3909
|
] }) }),
|
|
3909
3910
|
/* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsx18("a", { className: "sk-cf__link", href: "tel:1800022222", children: "Health advice, 24 hours \u2014 healthdirect on 1800 022 222" }) }),
|
|
3910
|
-
clinicPhone && /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs16("a", { className: "sk-cf__link", href: `tel:${clinicPhone
|
|
3911
|
+
clinicPhone && /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs16("a", { className: "sk-cf__link", href: `tel:${normalizeAuPhone(clinicPhone)}`, children: [
|
|
3911
3912
|
"Call the clinic on ",
|
|
3912
3913
|
clinicPhone
|
|
3913
3914
|
] }) }),
|
|
@@ -3945,7 +3946,7 @@ function PaymentFailedStep({
|
|
|
3945
3946
|
clinicPhone && /* @__PURE__ */ jsxs16("p", { className: "sk-cf__body", children: [
|
|
3946
3947
|
"Still not working?",
|
|
3947
3948
|
" ",
|
|
3948
|
-
/* @__PURE__ */ jsxs16("a", { className: "sk-cf__link", href: `tel:${clinicPhone
|
|
3949
|
+
/* @__PURE__ */ jsxs16("a", { className: "sk-cf__link", href: `tel:${normalizeAuPhone(clinicPhone)}`, children: [
|
|
3949
3950
|
"Call the clinic on ",
|
|
3950
3951
|
clinicPhone
|
|
3951
3952
|
] })
|
|
@@ -3987,7 +3988,7 @@ function UnavailableStep({
|
|
|
3987
3988
|
children: "Find a GP near you"
|
|
3988
3989
|
}
|
|
3989
3990
|
) }),
|
|
3990
|
-
clinicPhone && /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs16("a", { className: "sk-cf__link", href: `tel:${clinicPhone
|
|
3991
|
+
clinicPhone && /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs16("a", { className: "sk-cf__link", href: `tel:${normalizeAuPhone(clinicPhone)}`, children: [
|
|
3991
3992
|
"Call the clinic on ",
|
|
3992
3993
|
clinicPhone
|
|
3993
3994
|
] }) }),
|
|
@@ -4462,7 +4463,7 @@ function Funnel({
|
|
|
4462
4463
|
clinicPhone && /* @__PURE__ */ jsxs17("p", { className: "sk-slots__empty-note", children: [
|
|
4463
4464
|
"Can\u2019t find a time that suits?",
|
|
4464
4465
|
" ",
|
|
4465
|
-
/* @__PURE__ */ jsxs17("a", { className: "sk-cf__link", href: `tel:${clinicPhone
|
|
4466
|
+
/* @__PURE__ */ jsxs17("a", { className: "sk-cf__link", href: `tel:${normalizeAuPhone(clinicPhone)}`, children: [
|
|
4466
4467
|
"Call the clinic on ",
|
|
4467
4468
|
clinicPhone
|
|
4468
4469
|
] })
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ISLANDS,
|
|
3
3
|
mountIslands
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y67WZPV5.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-
|
|
16
|
+
} from "./chunk-S7U2HOV7.js";
|
|
17
17
|
import {
|
|
18
18
|
BPOINT_SCRIPT_ORIGIN,
|
|
19
19
|
BPOINT_SCRIPT_URL,
|
package/dist/islands-impl.js
CHANGED
package/dist/islands-registry.js
CHANGED