@alfadocs/ui-kit-debug 0.30.0 → 0.30.2
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/_chunks/{booking-BYuc_8HV.js → booking-CBaSujVP.js} +803 -729
- package/dist/_chunks/booking-CBaSujVP.js.map +1 -0
- package/dist/_chunks/{patient-search-BhlxYAI3.js → patient-search-ZpHN-pgJ.js} +566 -510
- package/dist/_chunks/patient-search-ZpHN-pgJ.js.map +1 -0
- package/dist/_chunks/{public-footer.agent-CA29gxHJ.js → public-footer.agent-DivkKdG4.js} +188 -167
- package/dist/_chunks/public-footer.agent-DivkKdG4.js.map +1 -0
- package/dist/_chunks/{reviews-panel-CFttsfuC.js → reviews-panel-D-zjPKFL.js} +198 -178
- package/dist/_chunks/reviews-panel-D-zjPKFL.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/booking/booking-types.d.ts +38 -0
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts +7 -0
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-search/patient-search.d.ts +9 -0
- package/dist/components/patient-search/patient-search.d.ts.map +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-footer/public-footer.d.ts +7 -0
- package/dist/components/public-footer/public-footer.d.ts.map +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts +8 -0
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/i18n/config.js +146 -20
- package/dist/i18n/config.js.map +1 -1
- package/dist/i18n/locales/ar.d.ts +7 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/de.d.ts +7 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/el.d.ts +7 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/es.d.ts +7 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/fr.d.ts +7 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/hi.d.ts +7 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/ja.d.ts +7 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/nl.d.ts +7 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.d.ts +7 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pt.d.ts +7 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/ro.d.ts +7 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ru.d.ts +7 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/sq.d.ts +7 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sv.d.ts +7 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/tr.d.ts +7 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/zh.d.ts +7 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/resources.d.ts +14 -0
- package/dist/i18n/resources.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/locales/ar.json +8 -1
- package/dist/locales/de.json +8 -1
- package/dist/locales/el.json +8 -1
- package/dist/locales/en.json +8 -1
- package/dist/locales/es.json +8 -1
- package/dist/locales/fr.json +8 -1
- package/dist/locales/hi.json +8 -1
- package/dist/locales/it.json +8 -1
- package/dist/locales/ja.json +8 -1
- package/dist/locales/nl.json +8 -1
- package/dist/locales/pl.json +8 -1
- package/dist/locales/pt.json +8 -1
- package/dist/locales/ro.json +8 -1
- package/dist/locales/ru.json +8 -1
- package/dist/locales/sq.json +8 -1
- package/dist/locales/sv.json +8 -1
- package/dist/locales/tr.json +8 -1
- package/dist/locales/zh.json +8 -1
- package/package.json +5 -1
- package/dist/_chunks/booking-BYuc_8HV.js.map +0 -1
- package/dist/_chunks/patient-search-BhlxYAI3.js.map +0 -1
- package/dist/_chunks/public-footer.agent-CA29gxHJ.js.map +0 -1
- package/dist/_chunks/reviews-panel-CFttsfuC.js.map +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { A as
|
|
6
|
-
import { B as
|
|
7
|
-
import { C as
|
|
8
|
-
import { S as
|
|
9
|
-
import { A as
|
|
10
|
-
import { D as
|
|
11
|
-
import { u as
|
|
12
|
-
import { S as
|
|
13
|
-
import { X as
|
|
14
|
-
import { c as
|
|
15
|
-
import { M as
|
|
16
|
-
import { S as
|
|
17
|
-
import { C as
|
|
1
|
+
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as de, useRef as N, useEffect as V, useMemo as X, useImperativeHandle as ce, useState as W, useCallback as z, useId as le } from "react";
|
|
3
|
+
import { c as T } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as j } from "react-i18next";
|
|
5
|
+
import { A as se } from "./autocomplete-CUh0f7Dj.js";
|
|
6
|
+
import { B as ue } from "./button-DD_0Xdmr.js";
|
|
7
|
+
import { C as M } from "./card-DKTMLVrw.js";
|
|
8
|
+
import { S as fe } from "./slider-CfEzeseL.js";
|
|
9
|
+
import { A as Z } from "./alert-ywPR59NE.js";
|
|
10
|
+
import { D as F } from "./dropdown-menu-DZxwF23X.js";
|
|
11
|
+
import { u as pe } from "./registry-C9nwlNyL.js";
|
|
12
|
+
import { S as re } from "./search-BonnQsHv.js";
|
|
13
|
+
import { X as ne } from "./x-CCcI3eJp.js";
|
|
14
|
+
import { c as me } from "./createLucideIcon-CrFbzy84.js";
|
|
15
|
+
import { M as he } from "./map-pin-B8STOPMJ.js";
|
|
16
|
+
import { S as ve } from "./stethoscope-DT5qCW8Y.js";
|
|
17
|
+
import { C as ge } from "./chevron-down-BX_NP2Yh.js";
|
|
18
18
|
/**
|
|
19
19
|
* @license lucide-react v1.8.0 - ISC
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the ISC license.
|
|
22
22
|
* See the LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
|
-
const
|
|
24
|
+
const be = [
|
|
25
25
|
["line", { x1: "2", x2: "5", y1: "12", y2: "12", key: "bvdh0s" }],
|
|
26
26
|
["line", { x1: "19", x2: "22", y1: "12", y2: "12", key: "1tbv5k" }],
|
|
27
27
|
["line", { x1: "12", x2: "12", y1: "2", y2: "5", key: "11lu5j" }],
|
|
28
28
|
["line", { x1: "12", x2: "12", y1: "19", y2: "22", key: "x3vr5v" }],
|
|
29
29
|
["circle", { cx: "12", cy: "12", r: "7", key: "fim9np" }],
|
|
30
30
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
31
|
-
],
|
|
31
|
+
], xe = me("locate-fixed", be), ye = {
|
|
32
32
|
id: "patient-search",
|
|
33
33
|
capabilities: ["navigate", "view_change"],
|
|
34
34
|
state: {
|
|
@@ -70,7 +70,7 @@ const ye = [
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
function
|
|
73
|
+
function _(e, s) {
|
|
74
74
|
if (typeof window > "u") return;
|
|
75
75
|
const t = window.track;
|
|
76
76
|
try {
|
|
@@ -83,15 +83,15 @@ const A = [
|
|
|
83
83
|
"tomorrow",
|
|
84
84
|
"this_week",
|
|
85
85
|
"anytime"
|
|
86
|
-
],
|
|
87
|
-
function
|
|
86
|
+
], O = [1, 5, 10, 25, 50], Y = 5, ie = 200;
|
|
87
|
+
function we(e) {
|
|
88
88
|
let s = 0, t = Number.POSITIVE_INFINITY;
|
|
89
|
-
return
|
|
90
|
-
const
|
|
91
|
-
|
|
89
|
+
return O.forEach((i, p) => {
|
|
90
|
+
const v = Math.abs(i - e);
|
|
91
|
+
v < t && (t = v, s = p);
|
|
92
92
|
}), s;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const _e = T(
|
|
95
95
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
|
|
96
96
|
{
|
|
97
97
|
variants: {
|
|
@@ -105,65 +105,65 @@ const Ne = P(
|
|
|
105
105
|
defaultVariants: { variant: "who-where" }
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
function
|
|
108
|
+
function H({
|
|
109
109
|
value: e,
|
|
110
110
|
onChange: s,
|
|
111
111
|
loadObjects: t,
|
|
112
|
-
onObjectSelect:
|
|
113
|
-
inputRef:
|
|
112
|
+
onObjectSelect: i,
|
|
113
|
+
inputRef: p
|
|
114
114
|
}) {
|
|
115
|
-
var
|
|
116
|
-
const { t:
|
|
117
|
-
|
|
118
|
-
var
|
|
119
|
-
((
|
|
120
|
-
}, [(
|
|
121
|
-
const
|
|
122
|
-
async (
|
|
115
|
+
var d, f, m, b;
|
|
116
|
+
const { t: v } = j(), [g, u] = W(((d = e.object) == null ? void 0 : d.label) ?? ""), c = N((f = e.object) == null ? void 0 : f.value);
|
|
117
|
+
V(() => {
|
|
118
|
+
var h, o, S;
|
|
119
|
+
((h = e.object) == null ? void 0 : h.value) !== c.current && (c.current = (o = e.object) == null ? void 0 : o.value, u(((S = e.object) == null ? void 0 : S.label) ?? ""));
|
|
120
|
+
}, [(m = e.object) == null ? void 0 : m.value, (b = e.object) == null ? void 0 : b.label]);
|
|
121
|
+
const r = z(
|
|
122
|
+
async (h, { signal: o }) => await t(h, { signal: o }),
|
|
123
123
|
[t]
|
|
124
|
-
),
|
|
124
|
+
), l = (h) => {
|
|
125
125
|
const o = {
|
|
126
|
-
value:
|
|
127
|
-
label:
|
|
128
|
-
description:
|
|
129
|
-
__payload:
|
|
126
|
+
value: h.value,
|
|
127
|
+
label: h.label,
|
|
128
|
+
description: h.description,
|
|
129
|
+
__payload: h.__payload
|
|
130
130
|
};
|
|
131
|
-
u(o.label),
|
|
131
|
+
u(o.label), c.current = o.value, s({ ...e, object: o }), _("patient_search_object_selected", {
|
|
132
132
|
value: o.value,
|
|
133
133
|
type: o.__payload && typeof o.__payload == "object" ? o.__payload.type : void 0
|
|
134
|
-
}),
|
|
135
|
-
},
|
|
134
|
+
}), i == null || i(o);
|
|
135
|
+
}, n = N(!1);
|
|
136
136
|
return /* @__PURE__ */ a(
|
|
137
137
|
"div",
|
|
138
138
|
{
|
|
139
139
|
"data-component": "patient-search-field",
|
|
140
140
|
"data-field": "who",
|
|
141
141
|
onFocus: () => {
|
|
142
|
-
|
|
142
|
+
n.current || (n.current = !0, _("patient_search_object_focused"));
|
|
143
143
|
},
|
|
144
|
-
onBlur: (
|
|
145
|
-
|
|
144
|
+
onBlur: (h) => {
|
|
145
|
+
h.currentTarget && !h.currentTarget.contains(h.relatedTarget) && (n.current = !1);
|
|
146
146
|
},
|
|
147
147
|
children: /* @__PURE__ */ a(
|
|
148
|
-
|
|
148
|
+
se,
|
|
149
149
|
{
|
|
150
|
-
ref:
|
|
151
|
-
value:
|
|
152
|
-
onChange: (
|
|
153
|
-
u(
|
|
150
|
+
ref: p,
|
|
151
|
+
value: g,
|
|
152
|
+
onChange: (h) => {
|
|
153
|
+
u(h), e.object && h !== e.object.label && (c.current = void 0, s({ ...e, object: void 0 }));
|
|
154
154
|
},
|
|
155
|
-
onSelect:
|
|
156
|
-
loadOptions:
|
|
157
|
-
debounceMs:
|
|
158
|
-
placeholder:
|
|
159
|
-
"aria-label":
|
|
160
|
-
startAdornment: /* @__PURE__ */ a(
|
|
155
|
+
onSelect: l,
|
|
156
|
+
loadOptions: r,
|
|
157
|
+
debounceMs: ie,
|
|
158
|
+
placeholder: v("patientSearch.who.placeholder"),
|
|
159
|
+
"aria-label": v("patientSearch.who.label"),
|
|
160
|
+
startAdornment: /* @__PURE__ */ a(re, { "aria-hidden": "true" })
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
}
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
|
-
const
|
|
166
|
+
const ee = [
|
|
167
167
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
168
168
|
"ds:size-8 ds:rounded-[var(--radius-sm)]",
|
|
169
169
|
"ds:text-[color:var(--muted-foreground)] ds:hover:text-[color:var(--primary)]",
|
|
@@ -175,90 +175,79 @@ const ae = [
|
|
|
175
175
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
176
176
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
177
177
|
].join(" ");
|
|
178
|
-
function
|
|
178
|
+
function $({
|
|
179
179
|
value: e,
|
|
180
180
|
onChange: s,
|
|
181
181
|
loadPlaces: t,
|
|
182
|
-
onPlaceSelect:
|
|
183
|
-
inputRef:
|
|
184
|
-
defaultRadiusKm:
|
|
185
|
-
reverseGeocode:
|
|
182
|
+
onPlaceSelect: i,
|
|
183
|
+
inputRef: p,
|
|
184
|
+
defaultRadiusKm: v = Y,
|
|
185
|
+
reverseGeocode: g
|
|
186
186
|
}) {
|
|
187
|
-
var
|
|
188
|
-
const { t: u } =
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
var l, g, j;
|
|
196
|
-
((l = e.place) == null ? void 0 : l.value) !== c.current && (c.current = (g = e.place) == null ? void 0 : g.value, n(((j = e.place) == null ? void 0 : j.label) ?? ""));
|
|
197
|
-
}, [(E = e.place) == null ? void 0 : E.value, (R = e.place) == null ? void 0 : R.label]);
|
|
198
|
-
const v = M(
|
|
199
|
-
async (l, { signal: g }) => await t(l, { signal: g }),
|
|
187
|
+
var P, B, C, E;
|
|
188
|
+
const { t: u } = j(), [c, r] = W(((P = e.place) == null ? void 0 : P.label) ?? ""), l = N((B = e.place) == null ? void 0 : B.value), n = e.geo ? "granted" : "pristine", [d, f] = W(n);
|
|
189
|
+
V(() => {
|
|
190
|
+
var x, w, k;
|
|
191
|
+
((x = e.place) == null ? void 0 : x.value) !== l.current && (l.current = (w = e.place) == null ? void 0 : w.value, r(((k = e.place) == null ? void 0 : k.label) ?? ""));
|
|
192
|
+
}, [(C = e.place) == null ? void 0 : C.value, (E = e.place) == null ? void 0 : E.label]);
|
|
193
|
+
const m = z(
|
|
194
|
+
async (x, { signal: w }) => await t(x, { signal: w }),
|
|
200
195
|
[t]
|
|
201
|
-
),
|
|
202
|
-
const
|
|
203
|
-
value:
|
|
204
|
-
label:
|
|
205
|
-
lat:
|
|
206
|
-
lng:
|
|
196
|
+
), b = (x) => {
|
|
197
|
+
const w = {
|
|
198
|
+
value: x.value,
|
|
199
|
+
label: x.label,
|
|
200
|
+
lat: x.lat,
|
|
201
|
+
lng: x.lng
|
|
207
202
|
};
|
|
208
|
-
|
|
209
|
-
},
|
|
203
|
+
r(w.label), l.current = w.value, s({ ...e, place: w, geo: void 0 }), d === "granted" && f("pristine"), _("patient_search_place_selected", { value: w.value }), i == null || i(w);
|
|
204
|
+
}, h = () => {
|
|
210
205
|
if (typeof window > "u" || !(navigator != null && navigator.geolocation)) {
|
|
211
|
-
f("denied"),
|
|
206
|
+
f("denied"), _("patient_search_geo_denied", { reason: "unsupported" });
|
|
212
207
|
return;
|
|
213
208
|
}
|
|
214
|
-
f("requesting"),
|
|
215
|
-
async (
|
|
216
|
-
const { latitude:
|
|
217
|
-
let
|
|
209
|
+
f("requesting"), _("patient_search_place_focused"), navigator.geolocation.getCurrentPosition(
|
|
210
|
+
async (x) => {
|
|
211
|
+
const { latitude: w, longitude: k } = x.coords;
|
|
212
|
+
let R;
|
|
218
213
|
try {
|
|
219
|
-
|
|
214
|
+
R = await (g == null ? void 0 : g(w, k));
|
|
220
215
|
} catch {
|
|
221
|
-
|
|
216
|
+
R = void 0;
|
|
222
217
|
}
|
|
223
|
-
const
|
|
224
|
-
value: `geo:${
|
|
225
|
-
label:
|
|
226
|
-
lat:
|
|
227
|
-
lng:
|
|
218
|
+
const K = v, I = R ?? u("patientSearch.geo.fallbackLabel"), oe = {
|
|
219
|
+
value: `geo:${w.toFixed(4)},${k.toFixed(4)}`,
|
|
220
|
+
label: I,
|
|
221
|
+
lat: w,
|
|
222
|
+
lng: k
|
|
228
223
|
};
|
|
229
224
|
s({
|
|
230
225
|
...e,
|
|
231
|
-
place:
|
|
226
|
+
place: oe,
|
|
232
227
|
geo: {
|
|
233
|
-
lat:
|
|
234
|
-
lng:
|
|
235
|
-
radiusKm:
|
|
236
|
-
label:
|
|
228
|
+
lat: w,
|
|
229
|
+
lng: k,
|
|
230
|
+
radiusKm: K,
|
|
231
|
+
label: I
|
|
237
232
|
}
|
|
238
|
-
}), f("granted"),
|
|
233
|
+
}), f("granted"), _("patient_search_geo_granted", { radiusKm: K });
|
|
239
234
|
},
|
|
240
235
|
() => {
|
|
241
|
-
f("denied"),
|
|
236
|
+
f("denied"), _("patient_search_geo_denied", { reason: "user" });
|
|
242
237
|
},
|
|
243
238
|
{ enableHighAccuracy: !1, maximumAge: 6e4, timeout: 1e4 }
|
|
244
239
|
);
|
|
245
|
-
},
|
|
246
|
-
s({ ...e, geo: void 0, place: void 0 }),
|
|
247
|
-
}, G = (
|
|
248
|
-
|
|
249
|
-
e.geo && s({ ...e, geo: { ...e.geo, radiusKm: g } }), w("patient_search_radius_changed", { radiusKm: g });
|
|
250
|
-
}, Q = (l) => {
|
|
251
|
-
const g = D[Math.round(l)] ?? m;
|
|
252
|
-
return u("patientSearch.geo.radiusFormat", { km: g });
|
|
253
|
-
}, N = i === "granted" && !!e.geo, K = i === "requesting", I = i === "denied", k = S(!1), O = I ? null : /* @__PURE__ */ _("span", { className: "ds:absolute ds:end-[var(--spacing-xs)] ds:top-1/2 ds:-translate-y-1/2 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
254
|
-
N ? /* @__PURE__ */ a(
|
|
240
|
+
}, o = () => {
|
|
241
|
+
s({ ...e, geo: void 0, place: void 0 }), r(""), l.current = void 0, f("pristine");
|
|
242
|
+
}, S = d === "granted" && !!e.geo, G = d === "requesting", L = d === "denied", D = N(!1), Q = L || !!!g ? null : /* @__PURE__ */ y("span", { className: "ds:absolute ds:end-[var(--spacing-xs)] ds:top-1/2 ds:-translate-y-1/2 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
243
|
+
S ? /* @__PURE__ */ a(
|
|
255
244
|
"button",
|
|
256
245
|
{
|
|
257
246
|
type: "button",
|
|
258
247
|
"aria-label": u("patientSearch.geo.clear"),
|
|
259
|
-
onClick:
|
|
260
|
-
className:
|
|
261
|
-
children: /* @__PURE__ */ a(
|
|
248
|
+
onClick: o,
|
|
249
|
+
className: ee,
|
|
250
|
+
children: /* @__PURE__ */ a(ne, { "aria-hidden": "true", className: "ds:size-4" })
|
|
262
251
|
}
|
|
263
252
|
) : null,
|
|
264
253
|
/* @__PURE__ */ a(
|
|
@@ -266,43 +255,43 @@ function q({
|
|
|
266
255
|
{
|
|
267
256
|
type: "button",
|
|
268
257
|
"aria-label": u("patientSearch.geo.cta"),
|
|
269
|
-
"aria-pressed":
|
|
270
|
-
disabled:
|
|
271
|
-
onClick:
|
|
272
|
-
className:
|
|
273
|
-
children: /* @__PURE__ */ a(
|
|
258
|
+
"aria-pressed": S || void 0,
|
|
259
|
+
disabled: G,
|
|
260
|
+
onClick: S ? o : h,
|
|
261
|
+
className: ee,
|
|
262
|
+
children: /* @__PURE__ */ a(xe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
274
263
|
}
|
|
275
264
|
)
|
|
276
265
|
] });
|
|
277
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ y(
|
|
278
267
|
"div",
|
|
279
268
|
{
|
|
280
269
|
"data-component": "patient-search-field",
|
|
281
270
|
"data-field": "where",
|
|
282
271
|
onFocus: () => {
|
|
283
|
-
|
|
272
|
+
D.current || (D.current = !0, _("patient_search_place_focused"));
|
|
284
273
|
},
|
|
285
|
-
onBlur: (
|
|
286
|
-
|
|
274
|
+
onBlur: (x) => {
|
|
275
|
+
x.currentTarget && !x.currentTarget.contains(x.relatedTarget) && (D.current = !1);
|
|
287
276
|
},
|
|
288
277
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
289
278
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ y("div", { className: "ds:relative", children: [
|
|
291
280
|
/* @__PURE__ */ a(
|
|
292
|
-
|
|
281
|
+
se,
|
|
293
282
|
{
|
|
294
|
-
ref:
|
|
295
|
-
value:
|
|
296
|
-
onChange: (
|
|
297
|
-
|
|
283
|
+
ref: p,
|
|
284
|
+
value: c,
|
|
285
|
+
onChange: (x) => {
|
|
286
|
+
r(x), e.place && x !== e.place.label && (l.current = void 0, s({ ...e, place: void 0, geo: void 0 }), d === "granted" && f("pristine"));
|
|
298
287
|
},
|
|
299
|
-
onSelect:
|
|
300
|
-
loadOptions:
|
|
301
|
-
debounceMs:
|
|
288
|
+
onSelect: b,
|
|
289
|
+
loadOptions: m,
|
|
290
|
+
debounceMs: ie,
|
|
302
291
|
placeholder: u("patientSearch.where.placeholder"),
|
|
303
292
|
"aria-label": u("patientSearch.where.label"),
|
|
304
|
-
startAdornment: /* @__PURE__ */ a(
|
|
305
|
-
endAdornment:
|
|
293
|
+
startAdornment: /* @__PURE__ */ a(he, { "aria-hidden": "true" }),
|
|
294
|
+
endAdornment: L ? void 0 : (
|
|
306
295
|
// Decorative spacer — reserves inline-end room so the typed
|
|
307
296
|
// text doesn't run under the absolutely-positioned overlay.
|
|
308
297
|
// Autocomplete wraps endAdornment in `aria-hidden`, which is
|
|
@@ -312,60 +301,80 @@ function q({
|
|
|
312
301
|
"span",
|
|
313
302
|
{
|
|
314
303
|
"aria-hidden": "true",
|
|
315
|
-
className:
|
|
304
|
+
className: S ? "ds:inline-block ds:size-[4.5rem]" : "ds:inline-block ds:size-8"
|
|
316
305
|
}
|
|
317
306
|
)
|
|
318
307
|
)
|
|
319
308
|
}
|
|
320
309
|
),
|
|
321
|
-
|
|
310
|
+
Q
|
|
322
311
|
] }),
|
|
323
|
-
|
|
324
|
-
// Slider marks render with `translate(-50%)` so half of each
|
|
325
|
-
// end-mark ("1" and "50" labels) sits outside the slider's
|
|
326
|
-
// bounding box. The parent Card uses `overflow: hidden`, which
|
|
327
|
-
// would clip them — the inline padding pulls the rail inset by
|
|
328
|
-
// half a label width so the overhang lands inside the card.
|
|
329
|
-
/* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)]", children: [
|
|
330
|
-
/* @__PURE__ */ a(
|
|
331
|
-
"span",
|
|
332
|
-
{
|
|
333
|
-
id: "patient-search-radius-label",
|
|
334
|
-
className: "type-meta ds:text-[color:var(--muted-foreground)]",
|
|
335
|
-
children: u("patientSearch.geo.radius")
|
|
336
|
-
}
|
|
337
|
-
),
|
|
338
|
-
/* @__PURE__ */ a(
|
|
339
|
-
he,
|
|
340
|
-
{
|
|
341
|
-
value: [p],
|
|
342
|
-
min: 0,
|
|
343
|
-
max: D.length - 1,
|
|
344
|
-
step: 1,
|
|
345
|
-
marks: D.map((l, g) => ({
|
|
346
|
-
value: g,
|
|
347
|
-
label: `${l}`
|
|
348
|
-
})),
|
|
349
|
-
formatValue: Q,
|
|
350
|
-
alwaysShowValue: !0,
|
|
351
|
-
"aria-labelledby": "patient-search-radius-label",
|
|
352
|
-
onValueChange: (l) => x(l[0] ?? 0),
|
|
353
|
-
onValueCommit: (l) => G(l[0] ?? 0)
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
] })
|
|
357
|
-
) : null,
|
|
358
|
-
I ? (
|
|
312
|
+
L ? (
|
|
359
313
|
// Alert defaults to `role="status"` + `aria-live="polite"` for the
|
|
360
314
|
// `info` variant — the user hears why the field reverted to plain
|
|
361
315
|
// text when their browser blocked the geolocation prompt.
|
|
362
|
-
/* @__PURE__ */ a(
|
|
316
|
+
/* @__PURE__ */ a(Z, { variant: "info", children: /* @__PURE__ */ a(Z.Description, { children: u("patientSearch.geo.denied") }) })
|
|
363
317
|
) : null
|
|
364
318
|
]
|
|
365
319
|
}
|
|
366
320
|
);
|
|
367
321
|
}
|
|
368
|
-
|
|
322
|
+
function q({
|
|
323
|
+
value: e,
|
|
324
|
+
onChange: s,
|
|
325
|
+
defaultRadiusKm: t = Y
|
|
326
|
+
}) {
|
|
327
|
+
const { t: i } = j(), [p, v] = W(
|
|
328
|
+
() => {
|
|
329
|
+
var c;
|
|
330
|
+
return we(((c = e.geo) == null ? void 0 : c.radiusKm) ?? t);
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
if (!e.geo) return null;
|
|
334
|
+
const g = (c) => {
|
|
335
|
+
const r = O[c] ?? t;
|
|
336
|
+
s({ ...e, geo: { ...e.geo, radiusKm: r } }), _("patient_search_radius_changed", { radiusKm: r });
|
|
337
|
+
}, u = (c) => {
|
|
338
|
+
const r = O[Math.round(c)] ?? t;
|
|
339
|
+
return i("patientSearch.geo.radiusFormat", { km: r });
|
|
340
|
+
};
|
|
341
|
+
return /* @__PURE__ */ y(
|
|
342
|
+
"div",
|
|
343
|
+
{
|
|
344
|
+
"data-component": "patient-search-geo-radius-bar",
|
|
345
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
|
|
346
|
+
children: [
|
|
347
|
+
/* @__PURE__ */ a(
|
|
348
|
+
"span",
|
|
349
|
+
{
|
|
350
|
+
id: "patient-search-radius-label",
|
|
351
|
+
className: "type-meta ds:text-[color:var(--muted-foreground)]",
|
|
352
|
+
children: i("patientSearch.geo.radius")
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ a(
|
|
356
|
+
fe,
|
|
357
|
+
{
|
|
358
|
+
value: [p],
|
|
359
|
+
min: 0,
|
|
360
|
+
max: O.length - 1,
|
|
361
|
+
step: 1,
|
|
362
|
+
marks: O.map((c, r) => ({
|
|
363
|
+
value: r,
|
|
364
|
+
label: `${c}`
|
|
365
|
+
})),
|
|
366
|
+
formatValue: u,
|
|
367
|
+
alwaysShowValue: !0,
|
|
368
|
+
"aria-labelledby": "patient-search-radius-label",
|
|
369
|
+
onValueChange: (c) => v(c[0] ?? 0),
|
|
370
|
+
onValueCommit: (c) => g(c[0] ?? 0)
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
const Se = T(
|
|
369
378
|
[
|
|
370
379
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
371
380
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -388,44 +397,44 @@ const ke = P(
|
|
|
388
397
|
defaultVariants: { state: "idle" }
|
|
389
398
|
}
|
|
390
399
|
);
|
|
391
|
-
function
|
|
392
|
-
const { t, i18n:
|
|
393
|
-
var
|
|
394
|
-
(
|
|
395
|
-
}, []),
|
|
396
|
-
(
|
|
397
|
-
const f = A.indexOf(
|
|
398
|
-
switch (
|
|
399
|
-
case
|
|
400
|
+
function Ne({ value: e, onChange: s }) {
|
|
401
|
+
const { t, i18n: i } = j(), p = le(), v = i.dir() === "rtl", g = N(/* @__PURE__ */ new Map()), u = z((n) => {
|
|
402
|
+
var d;
|
|
403
|
+
(d = g.current.get(n)) == null || d.focus();
|
|
404
|
+
}, []), c = z(
|
|
405
|
+
(n, d) => {
|
|
406
|
+
const f = A.indexOf(d), m = A.length, b = v ? "ArrowLeft" : "ArrowRight", h = v ? "ArrowRight" : "ArrowLeft";
|
|
407
|
+
switch (n.key) {
|
|
408
|
+
case b:
|
|
400
409
|
case "ArrowDown": {
|
|
401
|
-
|
|
402
|
-
const o = A[(f + 1) %
|
|
403
|
-
s(o),
|
|
410
|
+
n.preventDefault();
|
|
411
|
+
const o = A[(f + 1) % m];
|
|
412
|
+
s(o), _("patient_search_when_selected", { when: o }), u(o);
|
|
404
413
|
break;
|
|
405
414
|
}
|
|
406
|
-
case
|
|
415
|
+
case h:
|
|
407
416
|
case "ArrowUp": {
|
|
408
|
-
|
|
409
|
-
const o = A[(f - 1 +
|
|
410
|
-
s(o),
|
|
417
|
+
n.preventDefault();
|
|
418
|
+
const o = A[(f - 1 + m) % m];
|
|
419
|
+
s(o), _("patient_search_when_selected", { when: o }), u(o);
|
|
411
420
|
break;
|
|
412
421
|
}
|
|
413
422
|
case "Home": {
|
|
414
|
-
|
|
423
|
+
n.preventDefault();
|
|
415
424
|
const o = A[0];
|
|
416
|
-
s(o),
|
|
425
|
+
s(o), _("patient_search_when_selected", { when: o }), u(o);
|
|
417
426
|
break;
|
|
418
427
|
}
|
|
419
428
|
case "End": {
|
|
420
|
-
|
|
421
|
-
const o = A[
|
|
422
|
-
s(o),
|
|
429
|
+
n.preventDefault();
|
|
430
|
+
const o = A[m - 1];
|
|
431
|
+
s(o), _("patient_search_when_selected", { when: o }), u(o);
|
|
423
432
|
break;
|
|
424
433
|
}
|
|
425
434
|
}
|
|
426
435
|
},
|
|
427
|
-
[u,
|
|
428
|
-
),
|
|
436
|
+
[u, v, s]
|
|
437
|
+
), r = e ?? "anytime", l = {
|
|
429
438
|
today: "patientSearch.when.today",
|
|
430
439
|
tomorrow: "patientSearch.when.tomorrow",
|
|
431
440
|
this_week: "patientSearch.when.thisWeek",
|
|
@@ -436,37 +445,37 @@ function Re({ value: e, onChange: s }) {
|
|
|
436
445
|
{
|
|
437
446
|
role: "radiogroup",
|
|
438
447
|
"aria-label": t("patientSearch.when.label"),
|
|
439
|
-
id:
|
|
448
|
+
id: p,
|
|
440
449
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
441
|
-
children: A.map((
|
|
442
|
-
const
|
|
450
|
+
children: A.map((n) => {
|
|
451
|
+
const d = e === n, f = r === n, m = t(l[n]);
|
|
443
452
|
return /* @__PURE__ */ a(
|
|
444
453
|
"button",
|
|
445
454
|
{
|
|
446
455
|
type: "button",
|
|
447
456
|
role: "radio",
|
|
448
|
-
"aria-checked":
|
|
449
|
-
"aria-label":
|
|
457
|
+
"aria-checked": d,
|
|
458
|
+
"aria-label": m,
|
|
450
459
|
tabIndex: f ? 0 : -1,
|
|
451
|
-
ref: (
|
|
452
|
-
|
|
460
|
+
ref: (b) => {
|
|
461
|
+
b ? g.current.set(n, b) : g.current.delete(n);
|
|
453
462
|
},
|
|
454
463
|
onClick: () => {
|
|
455
|
-
s(
|
|
464
|
+
s(n), _("patient_search_when_selected", { when: n });
|
|
456
465
|
},
|
|
457
|
-
onKeyDown: (
|
|
458
|
-
className:
|
|
459
|
-
state:
|
|
466
|
+
onKeyDown: (b) => c(b, n),
|
|
467
|
+
className: Se({
|
|
468
|
+
state: d ? "selected" : "idle"
|
|
460
469
|
}),
|
|
461
|
-
children:
|
|
470
|
+
children: m
|
|
462
471
|
},
|
|
463
|
-
|
|
472
|
+
n
|
|
464
473
|
);
|
|
465
474
|
})
|
|
466
475
|
}
|
|
467
476
|
);
|
|
468
477
|
}
|
|
469
|
-
const
|
|
478
|
+
const ae = T(
|
|
470
479
|
[
|
|
471
480
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
472
481
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -496,63 +505,63 @@ const te = P(
|
|
|
496
505
|
defaultVariants: { state: "idle" }
|
|
497
506
|
}
|
|
498
507
|
);
|
|
499
|
-
function
|
|
500
|
-
const { t:
|
|
501
|
-
() => Object.values(
|
|
502
|
-
[
|
|
503
|
-
),
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
}, u = (
|
|
507
|
-
var
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
const
|
|
508
|
+
function ke({ facets: e, value: s, onChange: t }) {
|
|
509
|
+
const { t: i } = j(), p = X(() => s ?? {}, [s]), v = X(
|
|
510
|
+
() => Object.values(p).some((r) => r && r.length > 0),
|
|
511
|
+
[p]
|
|
512
|
+
), g = (r, l) => {
|
|
513
|
+
const n = { ...p };
|
|
514
|
+
l.length === 0 ? delete n[r] : n[r] = l, t(n), _("patient_search_facet_changed", { key: r, values: l });
|
|
515
|
+
}, u = (r) => {
|
|
516
|
+
var n;
|
|
517
|
+
const l = (((n = p[r]) == null ? void 0 : n.length) ?? 0) > 0;
|
|
518
|
+
g(r, l ? [] : ["true"]);
|
|
519
|
+
}, c = (r, l) => {
|
|
520
|
+
const n = p[r.key] ?? [], d = n.includes(l);
|
|
512
521
|
let f;
|
|
513
|
-
|
|
522
|
+
r.multi ? f = d ? n.filter((m) => m !== l) : [...n, l] : f = d ? [] : [l], g(r.key, f);
|
|
514
523
|
};
|
|
515
|
-
return /* @__PURE__ */
|
|
524
|
+
return /* @__PURE__ */ y(
|
|
516
525
|
"div",
|
|
517
526
|
{
|
|
518
527
|
role: "group",
|
|
519
|
-
"aria-label":
|
|
528
|
+
"aria-label": i("patientSearch.facets.label"),
|
|
520
529
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
521
530
|
children: [
|
|
522
|
-
e.map((
|
|
523
|
-
const
|
|
524
|
-
if (
|
|
531
|
+
e.map((r) => {
|
|
532
|
+
const l = r.options.length === 0, n = p[r.key] ?? [], d = n.length > 0;
|
|
533
|
+
if (l)
|
|
525
534
|
return /* @__PURE__ */ a(
|
|
526
535
|
"button",
|
|
527
536
|
{
|
|
528
537
|
type: "button",
|
|
529
|
-
"aria-pressed":
|
|
530
|
-
"aria-label":
|
|
531
|
-
onClick: () => u(
|
|
532
|
-
className:
|
|
533
|
-
state:
|
|
538
|
+
"aria-pressed": d,
|
|
539
|
+
"aria-label": r.label,
|
|
540
|
+
onClick: () => u(r.key),
|
|
541
|
+
className: ae({
|
|
542
|
+
state: d ? "active" : "idle"
|
|
534
543
|
}),
|
|
535
|
-
children: /* @__PURE__ */ a("span", { children:
|
|
544
|
+
children: /* @__PURE__ */ a("span", { children: r.label })
|
|
536
545
|
},
|
|
537
|
-
|
|
546
|
+
r.key
|
|
538
547
|
);
|
|
539
|
-
const f =
|
|
540
|
-
return /* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */ a(
|
|
548
|
+
const f = d ? ` (${n.length})` : "";
|
|
549
|
+
return /* @__PURE__ */ y(F.Root, { children: [
|
|
550
|
+
/* @__PURE__ */ a(F.Trigger, { asChild: !0, children: /* @__PURE__ */ y(
|
|
542
551
|
"button",
|
|
543
552
|
{
|
|
544
553
|
type: "button",
|
|
545
|
-
"aria-label": `${
|
|
546
|
-
className:
|
|
547
|
-
state:
|
|
554
|
+
"aria-label": `${r.label}${f}`,
|
|
555
|
+
className: ae({
|
|
556
|
+
state: d ? "active" : "idle"
|
|
548
557
|
}),
|
|
549
558
|
children: [
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
|
|
559
|
+
/* @__PURE__ */ y("span", { children: [
|
|
560
|
+
r.label,
|
|
552
561
|
f
|
|
553
562
|
] }),
|
|
554
563
|
/* @__PURE__ */ a(
|
|
555
|
-
|
|
564
|
+
ge,
|
|
556
565
|
{
|
|
557
566
|
"aria-hidden": "true",
|
|
558
567
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -561,25 +570,25 @@ function je({ facets: e, value: s, onChange: t }) {
|
|
|
561
570
|
]
|
|
562
571
|
}
|
|
563
572
|
) }),
|
|
564
|
-
/* @__PURE__ */ a(
|
|
565
|
-
|
|
573
|
+
/* @__PURE__ */ a(F.Content, { sideOffset: 8, align: "start", children: r.options.map((m) => /* @__PURE__ */ a(
|
|
574
|
+
F.CheckboxItem,
|
|
566
575
|
{
|
|
567
|
-
checked:
|
|
568
|
-
onSelect: (
|
|
569
|
-
|
|
576
|
+
checked: n.includes(m.value),
|
|
577
|
+
onSelect: (b) => {
|
|
578
|
+
r.multi && b.preventDefault(), c(r, m.value);
|
|
570
579
|
},
|
|
571
|
-
children:
|
|
580
|
+
children: m.label
|
|
572
581
|
},
|
|
573
|
-
|
|
582
|
+
m.value
|
|
574
583
|
)) })
|
|
575
|
-
] },
|
|
584
|
+
] }, r.key);
|
|
576
585
|
}),
|
|
577
|
-
|
|
586
|
+
v ? /* @__PURE__ */ y(
|
|
578
587
|
"button",
|
|
579
588
|
{
|
|
580
589
|
type: "button",
|
|
581
590
|
onClick: () => {
|
|
582
|
-
t({}),
|
|
591
|
+
t({}), _("patient_search_facet_changed", { key: "*", values: [] });
|
|
583
592
|
},
|
|
584
593
|
className: [
|
|
585
594
|
"ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
@@ -591,8 +600,8 @@ function je({ facets: e, value: s, onChange: t }) {
|
|
|
591
600
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
592
601
|
].join(" "),
|
|
593
602
|
children: [
|
|
594
|
-
/* @__PURE__ */ a(
|
|
595
|
-
|
|
603
|
+
/* @__PURE__ */ a(ne, { "aria-hidden": "true", className: "ds:size-3.5" }),
|
|
604
|
+
i("patientSearch.facets.clear")
|
|
596
605
|
]
|
|
597
606
|
}
|
|
598
607
|
) : null
|
|
@@ -600,7 +609,7 @@ function je({ facets: e, value: s, onChange: t }) {
|
|
|
600
609
|
}
|
|
601
610
|
);
|
|
602
611
|
}
|
|
603
|
-
const
|
|
612
|
+
const te = ["violet", "purple", "magenta", "blue"], Re = T(
|
|
604
613
|
[
|
|
605
614
|
"ds:relative ds:flex ds:h-full ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
606
615
|
"ds:rounded-[var(--radius-lg)] ds:overflow-hidden",
|
|
@@ -616,7 +625,7 @@ const se = ["violet", "purple", "magenta", "blue"], Ae = P(
|
|
|
616
625
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
617
626
|
"ds:no-underline"
|
|
618
627
|
].join(" ")
|
|
619
|
-
),
|
|
628
|
+
), je = T(
|
|
620
629
|
"ds:absolute ds:inset-inline-0 ds:top-0 ds:h-[3px] ds:pointer-events-none",
|
|
621
630
|
{
|
|
622
631
|
variants: {
|
|
@@ -629,7 +638,7 @@ const se = ["violet", "purple", "magenta", "blue"], Ae = P(
|
|
|
629
638
|
},
|
|
630
639
|
defaultVariants: { accent: "violet" }
|
|
631
640
|
}
|
|
632
|
-
),
|
|
641
|
+
), Ae = T(
|
|
633
642
|
"ds:inline-flex ds:size-9 ds:items-center ds:justify-center ds:rounded-[var(--radius-md)]",
|
|
634
643
|
{
|
|
635
644
|
variants: {
|
|
@@ -643,12 +652,12 @@ const se = ["violet", "purple", "magenta", "blue"], Ae = P(
|
|
|
643
652
|
defaultVariants: { accent: "violet" }
|
|
644
653
|
}
|
|
645
654
|
);
|
|
646
|
-
function
|
|
647
|
-
return e && e !== "auto" ? e :
|
|
655
|
+
function Ce(e, s) {
|
|
656
|
+
return e && e !== "auto" ? e : te[s % te.length];
|
|
648
657
|
}
|
|
649
|
-
function
|
|
650
|
-
const { t: s } =
|
|
651
|
-
return e.length === 0 ? /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:m-0", children: s("patientSearch.discovery.empty") }) : /* @__PURE__ */
|
|
658
|
+
function Ee({ cards: e }) {
|
|
659
|
+
const { t: s } = j();
|
|
660
|
+
return e.length === 0 ? /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:m-0", children: s("patientSearch.discovery.empty") }) : /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
652
661
|
/* @__PURE__ */ a("h3", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: s("patientSearch.discovery.heading") }),
|
|
653
662
|
/* @__PURE__ */ a(
|
|
654
663
|
"ul",
|
|
@@ -658,34 +667,34 @@ function De({ cards: e }) {
|
|
|
658
667
|
"ds:md:grid-cols-2 ds:lg:grid-cols-3",
|
|
659
668
|
"ds:m-0 ds:p-0 ds:list-none"
|
|
660
669
|
].join(" "),
|
|
661
|
-
children: e.map((t,
|
|
662
|
-
const
|
|
663
|
-
return /* @__PURE__ */ a("li", { children: /* @__PURE__ */
|
|
670
|
+
children: e.map((t, i) => {
|
|
671
|
+
const p = Ce(t.accent, i);
|
|
672
|
+
return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ y(
|
|
664
673
|
"a",
|
|
665
674
|
{
|
|
666
675
|
href: t.href,
|
|
667
676
|
"data-component": "patient-search-card",
|
|
668
677
|
"data-card-id": t.id,
|
|
669
678
|
"aria-label": t.description ? `${t.label} — ${t.description}` : t.label,
|
|
670
|
-
onClick: () =>
|
|
679
|
+
onClick: () => _("patient_search_discovery_card_clicked", {
|
|
671
680
|
cardId: t.id
|
|
672
681
|
}),
|
|
673
|
-
className:
|
|
682
|
+
className: Re(),
|
|
674
683
|
children: [
|
|
675
684
|
/* @__PURE__ */ a(
|
|
676
685
|
"span",
|
|
677
686
|
{
|
|
678
687
|
"aria-hidden": "true",
|
|
679
|
-
className:
|
|
688
|
+
className: je({ accent: p })
|
|
680
689
|
}
|
|
681
690
|
),
|
|
682
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ y("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
683
692
|
/* @__PURE__ */ a(
|
|
684
693
|
"span",
|
|
685
694
|
{
|
|
686
695
|
"aria-hidden": "true",
|
|
687
|
-
className:
|
|
688
|
-
children: t.icon ?? /* @__PURE__ */ a(
|
|
696
|
+
className: Ae({ accent: p }),
|
|
697
|
+
children: t.icon ?? /* @__PURE__ */ a(ve, { className: "ds:size-4", "aria-hidden": "true" })
|
|
689
698
|
}
|
|
690
699
|
),
|
|
691
700
|
t.badge ? (
|
|
@@ -709,7 +718,7 @@ function De({ cards: e }) {
|
|
|
709
718
|
)
|
|
710
719
|
] });
|
|
711
720
|
}
|
|
712
|
-
function
|
|
721
|
+
function Te(e) {
|
|
713
722
|
if (e.object || e.place || e.geo || e.when && e.when !== "anytime") return !0;
|
|
714
723
|
if (e.facets) {
|
|
715
724
|
for (const s of Object.values(e.facets))
|
|
@@ -721,126 +730,75 @@ function U({
|
|
|
721
730
|
value: e,
|
|
722
731
|
variant: s,
|
|
723
732
|
submitting: t,
|
|
724
|
-
submitLabel:
|
|
725
|
-
|
|
733
|
+
submitLabel: i,
|
|
734
|
+
allowEmptySubmit: p,
|
|
735
|
+
onSubmit: v
|
|
726
736
|
}) {
|
|
727
|
-
const { t:
|
|
737
|
+
const { t: g } = j(), u = t || !p && !Te(e), c = i ?? g("patientSearch.submit.cta");
|
|
728
738
|
return /* @__PURE__ */ a(
|
|
729
|
-
|
|
739
|
+
ue,
|
|
730
740
|
{
|
|
731
741
|
type: "button",
|
|
732
742
|
intent: "primary",
|
|
733
743
|
size: "lg",
|
|
734
|
-
startIcon: /* @__PURE__ */ a(
|
|
744
|
+
startIcon: /* @__PURE__ */ a(re, { "aria-hidden": "true" }),
|
|
735
745
|
loading: t,
|
|
736
|
-
disabled:
|
|
746
|
+
disabled: u,
|
|
737
747
|
onClick: () => {
|
|
738
|
-
|
|
748
|
+
_("patient_search_submitted", {
|
|
739
749
|
variant: s,
|
|
740
750
|
hasObject: !!e.object,
|
|
741
751
|
hasPlace: !!e.place,
|
|
742
752
|
hasGeo: !!e.geo,
|
|
743
753
|
when: e.when,
|
|
744
754
|
facetKeys: e.facets ? Object.keys(e.facets) : []
|
|
745
|
-
}),
|
|
755
|
+
}), v(e);
|
|
746
756
|
},
|
|
747
|
-
children:
|
|
757
|
+
children: c
|
|
748
758
|
}
|
|
749
759
|
);
|
|
750
760
|
}
|
|
751
|
-
function
|
|
761
|
+
function Le(e) {
|
|
752
762
|
const {
|
|
753
763
|
variant: s,
|
|
754
764
|
value: t,
|
|
755
|
-
onChange:
|
|
756
|
-
onSubmit:
|
|
757
|
-
loadObjects:
|
|
758
|
-
loadPlaces:
|
|
759
|
-
onObjectSelect: u,
|
|
760
|
-
onPlaceSelect: y,
|
|
761
|
-
submitting: n,
|
|
762
|
-
submitLabel: c,
|
|
763
|
-
whoRef: r,
|
|
764
|
-
whereRef: i,
|
|
765
|
-
defaultRadiusKm: f,
|
|
766
|
-
reverseGeocode: p,
|
|
767
|
-
cardLabel: x
|
|
768
|
-
} = e;
|
|
769
|
-
return /* @__PURE__ */ a(H, { variant: "elevated", "aria-label": x, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:md:flex-row ds:md:items-center", children: [
|
|
770
|
-
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
771
|
-
$,
|
|
772
|
-
{
|
|
773
|
-
value: t,
|
|
774
|
-
onChange: d,
|
|
775
|
-
loadObjects: m,
|
|
776
|
-
onObjectSelect: u,
|
|
777
|
-
inputRef: r
|
|
778
|
-
}
|
|
779
|
-
) }),
|
|
780
|
-
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
781
|
-
q,
|
|
782
|
-
{
|
|
783
|
-
value: t,
|
|
784
|
-
onChange: d,
|
|
785
|
-
loadPlaces: b,
|
|
786
|
-
onPlaceSelect: y,
|
|
787
|
-
defaultRadiusKm: f,
|
|
788
|
-
reverseGeocode: p,
|
|
789
|
-
inputRef: i
|
|
790
|
-
}
|
|
791
|
-
) }),
|
|
792
|
-
/* @__PURE__ */ a(
|
|
793
|
-
U,
|
|
794
|
-
{
|
|
795
|
-
value: t,
|
|
796
|
-
variant: s,
|
|
797
|
-
submitting: n,
|
|
798
|
-
submitLabel: c,
|
|
799
|
-
onSubmit: h
|
|
800
|
-
}
|
|
801
|
-
)
|
|
802
|
-
] }) });
|
|
803
|
-
}
|
|
804
|
-
function Oe(e) {
|
|
805
|
-
const {
|
|
806
|
-
variant: s,
|
|
807
|
-
value: t,
|
|
808
|
-
onChange: d,
|
|
809
|
-
onSubmit: h,
|
|
810
|
-
loadObjects: m,
|
|
811
|
-
loadPlaces: b,
|
|
765
|
+
onChange: i,
|
|
766
|
+
onSubmit: p,
|
|
767
|
+
loadObjects: v,
|
|
768
|
+
loadPlaces: g,
|
|
812
769
|
onObjectSelect: u,
|
|
813
|
-
onPlaceSelect:
|
|
814
|
-
submitting:
|
|
815
|
-
submitLabel:
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
770
|
+
onPlaceSelect: c,
|
|
771
|
+
submitting: r,
|
|
772
|
+
submitLabel: l,
|
|
773
|
+
allowEmptySubmit: n,
|
|
774
|
+
whoRef: d,
|
|
775
|
+
whereRef: f,
|
|
776
|
+
defaultRadiusKm: m,
|
|
777
|
+
reverseGeocode: b,
|
|
778
|
+
cardLabel: h
|
|
821
779
|
} = e;
|
|
822
|
-
return /* @__PURE__ */ a(
|
|
823
|
-
/* @__PURE__ */
|
|
780
|
+
return /* @__PURE__ */ a(M, { variant: "elevated", "aria-label": h, children: /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
781
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:md:flex-row ds:md:items-center", children: [
|
|
824
782
|
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
825
|
-
|
|
783
|
+
H,
|
|
826
784
|
{
|
|
827
785
|
value: t,
|
|
828
|
-
onChange:
|
|
829
|
-
loadObjects:
|
|
786
|
+
onChange: i,
|
|
787
|
+
loadObjects: v,
|
|
830
788
|
onObjectSelect: u,
|
|
831
|
-
inputRef:
|
|
789
|
+
inputRef: d
|
|
832
790
|
}
|
|
833
791
|
) }),
|
|
834
792
|
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
835
|
-
|
|
793
|
+
$,
|
|
836
794
|
{
|
|
837
795
|
value: t,
|
|
838
|
-
onChange:
|
|
839
|
-
loadPlaces:
|
|
840
|
-
onPlaceSelect:
|
|
841
|
-
defaultRadiusKm:
|
|
842
|
-
reverseGeocode:
|
|
843
|
-
inputRef:
|
|
796
|
+
onChange: i,
|
|
797
|
+
loadPlaces: g,
|
|
798
|
+
onPlaceSelect: c,
|
|
799
|
+
defaultRadiusKm: m,
|
|
800
|
+
reverseGeocode: b,
|
|
801
|
+
inputRef: f
|
|
844
802
|
}
|
|
845
803
|
) }),
|
|
846
804
|
/* @__PURE__ */ a(
|
|
@@ -848,61 +806,63 @@ function Oe(e) {
|
|
|
848
806
|
{
|
|
849
807
|
value: t,
|
|
850
808
|
variant: s,
|
|
851
|
-
submitting:
|
|
852
|
-
submitLabel:
|
|
853
|
-
|
|
809
|
+
submitting: r,
|
|
810
|
+
submitLabel: l,
|
|
811
|
+
allowEmptySubmit: n,
|
|
812
|
+
onSubmit: p
|
|
854
813
|
}
|
|
855
814
|
)
|
|
856
815
|
] }),
|
|
857
816
|
/* @__PURE__ */ a(
|
|
858
|
-
|
|
817
|
+
q,
|
|
859
818
|
{
|
|
860
|
-
value: t
|
|
861
|
-
onChange:
|
|
819
|
+
value: t,
|
|
820
|
+
onChange: i,
|
|
821
|
+
defaultRadiusKm: m
|
|
862
822
|
}
|
|
863
823
|
)
|
|
864
824
|
] }) });
|
|
865
825
|
}
|
|
866
|
-
function
|
|
826
|
+
function De(e) {
|
|
867
827
|
const {
|
|
868
828
|
variant: s,
|
|
869
829
|
value: t,
|
|
870
|
-
onChange:
|
|
871
|
-
onSubmit:
|
|
872
|
-
loadObjects:
|
|
873
|
-
loadPlaces:
|
|
830
|
+
onChange: i,
|
|
831
|
+
onSubmit: p,
|
|
832
|
+
loadObjects: v,
|
|
833
|
+
loadPlaces: g,
|
|
874
834
|
onObjectSelect: u,
|
|
875
|
-
onPlaceSelect:
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
whoRef:
|
|
835
|
+
onPlaceSelect: c,
|
|
836
|
+
submitting: r,
|
|
837
|
+
submitLabel: l,
|
|
838
|
+
allowEmptySubmit: n,
|
|
839
|
+
whoRef: d,
|
|
880
840
|
whereRef: f,
|
|
881
|
-
defaultRadiusKm:
|
|
882
|
-
reverseGeocode:
|
|
883
|
-
cardLabel:
|
|
841
|
+
defaultRadiusKm: m,
|
|
842
|
+
reverseGeocode: b,
|
|
843
|
+
cardLabel: h
|
|
884
844
|
} = e;
|
|
885
|
-
return /* @__PURE__ */ a(
|
|
886
|
-
/* @__PURE__ */
|
|
845
|
+
return /* @__PURE__ */ a(M, { variant: "elevated", "aria-label": h, children: /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
846
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:md:flex-row ds:md:items-center", children: [
|
|
887
847
|
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
888
|
-
|
|
848
|
+
H,
|
|
889
849
|
{
|
|
890
850
|
value: t,
|
|
891
|
-
onChange:
|
|
892
|
-
loadObjects:
|
|
851
|
+
onChange: i,
|
|
852
|
+
loadObjects: v,
|
|
893
853
|
onObjectSelect: u,
|
|
894
|
-
inputRef:
|
|
854
|
+
inputRef: d
|
|
895
855
|
}
|
|
896
856
|
) }),
|
|
897
857
|
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
898
|
-
|
|
858
|
+
$,
|
|
899
859
|
{
|
|
900
860
|
value: t,
|
|
901
|
-
onChange:
|
|
902
|
-
loadPlaces:
|
|
903
|
-
onPlaceSelect:
|
|
904
|
-
defaultRadiusKm:
|
|
905
|
-
reverseGeocode:
|
|
861
|
+
onChange: i,
|
|
862
|
+
loadPlaces: g,
|
|
863
|
+
onPlaceSelect: c,
|
|
864
|
+
defaultRadiusKm: m,
|
|
865
|
+
reverseGeocode: b,
|
|
906
866
|
inputRef: f
|
|
907
867
|
}
|
|
908
868
|
) }),
|
|
@@ -911,63 +871,72 @@ function Ve(e) {
|
|
|
911
871
|
{
|
|
912
872
|
value: t,
|
|
913
873
|
variant: s,
|
|
914
|
-
submitting:
|
|
915
|
-
submitLabel:
|
|
916
|
-
|
|
874
|
+
submitting: r,
|
|
875
|
+
submitLabel: l,
|
|
876
|
+
allowEmptySubmit: n,
|
|
877
|
+
onSubmit: p
|
|
917
878
|
}
|
|
918
879
|
)
|
|
919
880
|
] }),
|
|
920
|
-
|
|
921
|
-
|
|
881
|
+
/* @__PURE__ */ a(
|
|
882
|
+
q,
|
|
922
883
|
{
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
884
|
+
value: t,
|
|
885
|
+
onChange: i,
|
|
886
|
+
defaultRadiusKm: m
|
|
926
887
|
}
|
|
927
|
-
)
|
|
888
|
+
),
|
|
889
|
+
/* @__PURE__ */ a(
|
|
890
|
+
Ne,
|
|
891
|
+
{
|
|
892
|
+
value: t.when,
|
|
893
|
+
onChange: (o) => i({ ...t, when: o })
|
|
894
|
+
}
|
|
895
|
+
)
|
|
928
896
|
] }) });
|
|
929
897
|
}
|
|
930
|
-
function
|
|
898
|
+
function Pe(e) {
|
|
931
899
|
const {
|
|
932
900
|
variant: s,
|
|
933
901
|
value: t,
|
|
934
|
-
onChange:
|
|
935
|
-
onSubmit:
|
|
936
|
-
loadObjects:
|
|
937
|
-
loadPlaces:
|
|
902
|
+
onChange: i,
|
|
903
|
+
onSubmit: p,
|
|
904
|
+
loadObjects: v,
|
|
905
|
+
loadPlaces: g,
|
|
938
906
|
onObjectSelect: u,
|
|
939
|
-
onPlaceSelect:
|
|
940
|
-
|
|
941
|
-
submitting:
|
|
942
|
-
submitLabel:
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
907
|
+
onPlaceSelect: c,
|
|
908
|
+
facets: r,
|
|
909
|
+
submitting: l,
|
|
910
|
+
submitLabel: n,
|
|
911
|
+
allowEmptySubmit: d,
|
|
912
|
+
whoRef: f,
|
|
913
|
+
whereRef: m,
|
|
914
|
+
defaultRadiusKm: b,
|
|
915
|
+
reverseGeocode: h,
|
|
916
|
+
cardLabel: o
|
|
948
917
|
} = e;
|
|
949
|
-
return /* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ a(M, { variant: "elevated", "aria-label": o, children: /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
919
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:md:flex-row ds:md:items-center", children: [
|
|
951
920
|
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
952
|
-
|
|
921
|
+
H,
|
|
953
922
|
{
|
|
954
923
|
value: t,
|
|
955
|
-
onChange:
|
|
956
|
-
loadObjects:
|
|
924
|
+
onChange: i,
|
|
925
|
+
loadObjects: v,
|
|
957
926
|
onObjectSelect: u,
|
|
958
|
-
inputRef:
|
|
927
|
+
inputRef: f
|
|
959
928
|
}
|
|
960
929
|
) }),
|
|
961
930
|
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
962
|
-
|
|
931
|
+
$,
|
|
963
932
|
{
|
|
964
933
|
value: t,
|
|
965
|
-
onChange:
|
|
966
|
-
loadPlaces:
|
|
967
|
-
onPlaceSelect:
|
|
968
|
-
defaultRadiusKm:
|
|
969
|
-
reverseGeocode:
|
|
970
|
-
inputRef:
|
|
934
|
+
onChange: i,
|
|
935
|
+
loadPlaces: g,
|
|
936
|
+
onPlaceSelect: c,
|
|
937
|
+
defaultRadiusKm: b,
|
|
938
|
+
reverseGeocode: h,
|
|
939
|
+
inputRef: m
|
|
971
940
|
}
|
|
972
941
|
) }),
|
|
973
942
|
/* @__PURE__ */ a(
|
|
@@ -975,104 +944,191 @@ function Ee(e) {
|
|
|
975
944
|
{
|
|
976
945
|
value: t,
|
|
977
946
|
variant: s,
|
|
978
|
-
submitting:
|
|
979
|
-
submitLabel:
|
|
980
|
-
|
|
947
|
+
submitting: l,
|
|
948
|
+
submitLabel: n,
|
|
949
|
+
allowEmptySubmit: d,
|
|
950
|
+
onSubmit: p
|
|
951
|
+
}
|
|
952
|
+
)
|
|
953
|
+
] }),
|
|
954
|
+
/* @__PURE__ */ a(
|
|
955
|
+
q,
|
|
956
|
+
{
|
|
957
|
+
value: t,
|
|
958
|
+
onChange: i,
|
|
959
|
+
defaultRadiusKm: b
|
|
960
|
+
}
|
|
961
|
+
),
|
|
962
|
+
r && r.length > 0 ? /* @__PURE__ */ a(
|
|
963
|
+
ke,
|
|
964
|
+
{
|
|
965
|
+
facets: r,
|
|
966
|
+
value: t.facets,
|
|
967
|
+
onChange: (S) => i({ ...t, facets: S })
|
|
968
|
+
}
|
|
969
|
+
) : null
|
|
970
|
+
] }) });
|
|
971
|
+
}
|
|
972
|
+
function Ie(e) {
|
|
973
|
+
const {
|
|
974
|
+
variant: s,
|
|
975
|
+
value: t,
|
|
976
|
+
onChange: i,
|
|
977
|
+
onSubmit: p,
|
|
978
|
+
loadObjects: v,
|
|
979
|
+
loadPlaces: g,
|
|
980
|
+
onObjectSelect: u,
|
|
981
|
+
onPlaceSelect: c,
|
|
982
|
+
discoveryCards: r,
|
|
983
|
+
submitting: l,
|
|
984
|
+
submitLabel: n,
|
|
985
|
+
allowEmptySubmit: d,
|
|
986
|
+
whoRef: f,
|
|
987
|
+
whereRef: m,
|
|
988
|
+
defaultRadiusKm: b,
|
|
989
|
+
reverseGeocode: h,
|
|
990
|
+
cardLabel: o
|
|
991
|
+
} = e;
|
|
992
|
+
return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
|
|
993
|
+
/* @__PURE__ */ y(M, { variant: "elevated", "aria-label": o, children: [
|
|
994
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:md:flex-row ds:md:items-stretch", children: [
|
|
995
|
+
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
996
|
+
H,
|
|
997
|
+
{
|
|
998
|
+
value: t,
|
|
999
|
+
onChange: i,
|
|
1000
|
+
loadObjects: v,
|
|
1001
|
+
onObjectSelect: u,
|
|
1002
|
+
inputRef: f
|
|
1003
|
+
}
|
|
1004
|
+
) }),
|
|
1005
|
+
/* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
|
|
1006
|
+
$,
|
|
1007
|
+
{
|
|
1008
|
+
value: t,
|
|
1009
|
+
onChange: i,
|
|
1010
|
+
loadPlaces: g,
|
|
1011
|
+
onPlaceSelect: c,
|
|
1012
|
+
defaultRadiusKm: b,
|
|
1013
|
+
reverseGeocode: h,
|
|
1014
|
+
inputRef: m
|
|
1015
|
+
}
|
|
1016
|
+
) }),
|
|
1017
|
+
/* @__PURE__ */ a(
|
|
1018
|
+
U,
|
|
1019
|
+
{
|
|
1020
|
+
value: t,
|
|
1021
|
+
variant: s,
|
|
1022
|
+
submitting: l,
|
|
1023
|
+
submitLabel: n,
|
|
1024
|
+
allowEmptySubmit: d,
|
|
1025
|
+
onSubmit: p
|
|
1026
|
+
}
|
|
1027
|
+
)
|
|
1028
|
+
] }),
|
|
1029
|
+
/* @__PURE__ */ a(
|
|
1030
|
+
q,
|
|
1031
|
+
{
|
|
1032
|
+
value: t,
|
|
1033
|
+
onChange: i,
|
|
1034
|
+
defaultRadiusKm: b
|
|
981
1035
|
}
|
|
982
1036
|
)
|
|
983
|
-
] })
|
|
984
|
-
/* @__PURE__ */ a(
|
|
1037
|
+
] }),
|
|
1038
|
+
/* @__PURE__ */ a(Ee, { cards: r })
|
|
985
1039
|
] });
|
|
986
1040
|
}
|
|
987
|
-
const
|
|
1041
|
+
const Oe = de(function({
|
|
988
1042
|
variant: s,
|
|
989
1043
|
loadObjects: t,
|
|
990
|
-
loadPlaces:
|
|
991
|
-
onObjectSelect:
|
|
992
|
-
onPlaceSelect:
|
|
993
|
-
facets:
|
|
994
|
-
defaultRadiusKm: u =
|
|
995
|
-
reverseGeocode:
|
|
996
|
-
discoveryCards:
|
|
997
|
-
countryCode:
|
|
998
|
-
value:
|
|
999
|
-
onChange:
|
|
1044
|
+
loadPlaces: i,
|
|
1045
|
+
onObjectSelect: p,
|
|
1046
|
+
onPlaceSelect: v,
|
|
1047
|
+
facets: g,
|
|
1048
|
+
defaultRadiusKm: u = Y,
|
|
1049
|
+
reverseGeocode: c,
|
|
1050
|
+
discoveryCards: r,
|
|
1051
|
+
countryCode: l,
|
|
1052
|
+
value: n,
|
|
1053
|
+
onChange: d,
|
|
1000
1054
|
onSubmit: f,
|
|
1001
|
-
submitting:
|
|
1002
|
-
submitLabel:
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1055
|
+
submitting: m,
|
|
1056
|
+
submitLabel: b,
|
|
1057
|
+
allowEmptySubmit: h,
|
|
1058
|
+
"aria-label": o,
|
|
1059
|
+
id: S,
|
|
1060
|
+
className: G,
|
|
1061
|
+
...L
|
|
1062
|
+
}, D) {
|
|
1063
|
+
const { t: J } = j(), Q = N(null), P = N(null), B = N(null), C = N(!1);
|
|
1064
|
+
V(() => {
|
|
1065
|
+
if (!C.current && s === "who-where-when") {
|
|
1066
|
+
if (n.when !== void 0) {
|
|
1067
|
+
C.current = !0;
|
|
1013
1068
|
return;
|
|
1014
1069
|
}
|
|
1015
|
-
|
|
1070
|
+
C.current = !0, d({ ...n, when: "anytime" });
|
|
1016
1071
|
}
|
|
1017
1072
|
}, [s]);
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1020
|
-
if (!
|
|
1021
|
-
if (
|
|
1022
|
-
|
|
1073
|
+
const E = N(!1);
|
|
1074
|
+
V(() => {
|
|
1075
|
+
if (!E.current && s === "faceted") {
|
|
1076
|
+
if (n.facets !== void 0) {
|
|
1077
|
+
E.current = !0;
|
|
1023
1078
|
return;
|
|
1024
1079
|
}
|
|
1025
|
-
|
|
1080
|
+
E.current = !0, d({ ...n, facets: {} });
|
|
1026
1081
|
}
|
|
1027
1082
|
}, [s]);
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
}, [s,
|
|
1032
|
-
const
|
|
1083
|
+
const x = N(null);
|
|
1084
|
+
V(() => {
|
|
1085
|
+
x.current !== s && (x.current = s, _("patient_search_variant_exposed", { variant: s, country: l }));
|
|
1086
|
+
}, [s, l]);
|
|
1087
|
+
const w = X(
|
|
1033
1088
|
() => ({
|
|
1034
1089
|
getVariant: () => s,
|
|
1035
1090
|
reset: () => {
|
|
1036
|
-
|
|
1091
|
+
d({});
|
|
1037
1092
|
},
|
|
1038
1093
|
focusPrimary: () => {
|
|
1039
1094
|
requestAnimationFrame(() => {
|
|
1040
|
-
var
|
|
1041
|
-
(
|
|
1095
|
+
var I;
|
|
1096
|
+
(I = P.current) == null || I.focus();
|
|
1042
1097
|
});
|
|
1043
1098
|
}
|
|
1044
1099
|
}),
|
|
1045
|
-
[s,
|
|
1100
|
+
[s, d]
|
|
1046
1101
|
);
|
|
1047
|
-
|
|
1048
|
-
const
|
|
1102
|
+
ce(D, () => w, [w]), pe(ye, w, S);
|
|
1103
|
+
const k = o ?? J("patientSearch.regionLabel"), R = {
|
|
1049
1104
|
variant: s,
|
|
1050
|
-
value:
|
|
1051
|
-
onChange:
|
|
1105
|
+
value: n,
|
|
1106
|
+
onChange: d,
|
|
1052
1107
|
onSubmit: f,
|
|
1053
1108
|
loadObjects: t,
|
|
1054
|
-
loadPlaces:
|
|
1055
|
-
onObjectSelect:
|
|
1056
|
-
onPlaceSelect:
|
|
1057
|
-
facets:
|
|
1109
|
+
loadPlaces: i,
|
|
1110
|
+
onObjectSelect: p,
|
|
1111
|
+
onPlaceSelect: v,
|
|
1112
|
+
facets: g,
|
|
1058
1113
|
defaultRadiusKm: u,
|
|
1059
|
-
reverseGeocode:
|
|
1060
|
-
discoveryCards:
|
|
1061
|
-
submitting:
|
|
1062
|
-
submitLabel:
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1114
|
+
reverseGeocode: c,
|
|
1115
|
+
discoveryCards: r ?? [],
|
|
1116
|
+
submitting: m,
|
|
1117
|
+
submitLabel: b,
|
|
1118
|
+
allowEmptySubmit: h,
|
|
1119
|
+
whoRef: P,
|
|
1120
|
+
whereRef: B,
|
|
1121
|
+
cardLabel: k
|
|
1122
|
+
}, K = (() => {
|
|
1067
1123
|
switch (s) {
|
|
1068
1124
|
case "who-where":
|
|
1069
|
-
return /* @__PURE__ */ a(
|
|
1125
|
+
return /* @__PURE__ */ a(Le, { ...R });
|
|
1070
1126
|
case "who-where-when":
|
|
1071
|
-
return /* @__PURE__ */ a(
|
|
1127
|
+
return /* @__PURE__ */ a(De, { ...R });
|
|
1072
1128
|
case "faceted":
|
|
1073
|
-
return /* @__PURE__ */ a(
|
|
1129
|
+
return /* @__PURE__ */ a(Pe, { ...R });
|
|
1074
1130
|
case "discovery":
|
|
1075
|
-
return /* @__PURE__ */ a(
|
|
1131
|
+
return /* @__PURE__ */ a(Ie, { ...R });
|
|
1076
1132
|
/* c8 ignore next 2 */
|
|
1077
1133
|
default:
|
|
1078
1134
|
return null;
|
|
@@ -1081,22 +1137,22 @@ const Be = le(function({
|
|
|
1081
1137
|
return /* @__PURE__ */ a(
|
|
1082
1138
|
"div",
|
|
1083
1139
|
{
|
|
1084
|
-
ref:
|
|
1140
|
+
ref: Q,
|
|
1085
1141
|
role: "region",
|
|
1086
|
-
"aria-label":
|
|
1087
|
-
id:
|
|
1142
|
+
"aria-label": k,
|
|
1143
|
+
id: S,
|
|
1088
1144
|
"data-component": "patient-search",
|
|
1089
|
-
"data-component-id":
|
|
1145
|
+
"data-component-id": S,
|
|
1090
1146
|
"data-variant": s,
|
|
1091
|
-
className:
|
|
1092
|
-
...
|
|
1093
|
-
children:
|
|
1147
|
+
className: _e({ variant: s, className: G }),
|
|
1148
|
+
...L,
|
|
1149
|
+
children: K
|
|
1094
1150
|
}
|
|
1095
1151
|
);
|
|
1096
1152
|
});
|
|
1097
|
-
|
|
1153
|
+
Oe.displayName = "PatientSearch";
|
|
1098
1154
|
export {
|
|
1099
|
-
|
|
1100
|
-
|
|
1155
|
+
Oe as P,
|
|
1156
|
+
ye as p
|
|
1101
1157
|
};
|
|
1102
|
-
//# sourceMappingURL=patient-search-
|
|
1158
|
+
//# sourceMappingURL=patient-search-ZpHN-pgJ.js.map
|