@alfadocs/ui-kit 1.10.0 → 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/dist/_chunks/{actions-cell-renderer-BbzCqcld.js → actions-cell-renderer-xfSYiTXQ.js} +147 -147
- package/dist/_chunks/{balance-badge-cell-DK9wxCxW.js → balance-badge-cell-C_Qz76x7.js} +2 -2
- package/dist/_chunks/booking-CBHKdsZl.js +2906 -0
- package/dist/_chunks/{contact-profile-card-CE9OJKcl.js → contact-profile-card-BMIBr5s9.js} +104 -125
- package/dist/_chunks/{file-manager-CRxq0UIl.js → file-manager-Df6hyUYg.js} +2 -2
- package/dist/_chunks/format-price-DNqXPa_q.js +61 -0
- package/dist/_chunks/{practice-results-BEsAdW-B.js → practice-results-D7ygCj_W.js} +333 -291
- package/dist/_chunks/{stepper-accordion-BeVMZPuG.js → stepper-accordion-DmVykr5F.js} +91 -88
- package/dist/agent-catalog.json +11 -4
- package/dist/agent-i18n/en.json +3 -2
- package/dist/components/_shared/format-price.d.ts +21 -0
- package/dist/components/_shared/index.d.ts +1 -0
- package/dist/components/_shared/stepper.d.ts +28 -2
- package/dist/components/booking/booking-types.d.ts +15 -2
- package/dist/components/booking/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +18 -0
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.js +5 -1
- package/dist/i18n/locales/de.d.ts +5 -1
- package/dist/i18n/locales/de.js +6 -2
- package/dist/i18n/locales/el.d.ts +4 -0
- package/dist/i18n/locales/el.js +5 -1
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/en.js +5 -1
- package/dist/i18n/locales/es.d.ts +5 -1
- package/dist/i18n/locales/es.js +6 -2
- package/dist/i18n/locales/fr.d.ts +5 -1
- package/dist/i18n/locales/fr.js +6 -2
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.js +5 -1
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.js +5 -1
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.js +5 -1
- package/dist/i18n/locales/nl.d.ts +5 -1
- package/dist/i18n/locales/nl.js +6 -2
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.js +5 -1
- package/dist/i18n/locales/pt.d.ts +5 -1
- package/dist/i18n/locales/pt.js +6 -2
- package/dist/i18n/locales/ro.d.ts +4 -0
- package/dist/i18n/locales/ro.js +5 -1
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.js +5 -1
- package/dist/i18n/locales/sq.d.ts +4 -0
- package/dist/i18n/locales/sq.js +5 -1
- package/dist/i18n/locales/sv.d.ts +4 -0
- package/dist/i18n/locales/sv.js +5 -1
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.js +5 -1
- package/dist/i18n/locales/zh.d.ts +4 -0
- package/dist/i18n/locales/zh.js +5 -1
- package/dist/index.js +7 -7
- package/dist/locales/ar.json +5 -1
- package/dist/locales/de.json +6 -2
- package/dist/locales/el.json +5 -1
- package/dist/locales/en.json +5 -1
- package/dist/locales/es.json +6 -2
- package/dist/locales/fr.json +6 -2
- package/dist/locales/hi.json +5 -1
- package/dist/locales/it.json +5 -1
- package/dist/locales/ja.json +5 -1
- package/dist/locales/nl.json +6 -2
- package/dist/locales/pl.json +5 -1
- package/dist/locales/pt.json +6 -2
- package/dist/locales/ro.json +5 -1
- package/dist/locales/ru.json +5 -1
- package/dist/locales/sq.json +5 -1
- package/dist/locales/sv.json +5 -1
- package/dist/locales/tr.json +5 -1
- package/dist/locales/zh.json +5 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-DHkKcUIl.js +0 -2713
- package/dist/_chunks/languages-CGLX6Qpe.js +0 -19
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P, useMemo as B, useImperativeHandle as D } from "react";
|
|
3
3
|
import * as m from "@radix-ui/react-accordion";
|
|
4
|
-
import { c as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { C as
|
|
7
|
-
import { L as
|
|
8
|
-
function
|
|
9
|
-
return r === "error" ? "error" :
|
|
4
|
+
import { c as b } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { useTranslation as G } from "react-i18next";
|
|
6
|
+
import { C as H } from "./chevron-down-DWE7GSq9.js";
|
|
7
|
+
import { L as U } from "./lock-ClAFG1gy.js";
|
|
8
|
+
function W(s, i, r) {
|
|
9
|
+
return r === "error" ? "error" : s === i ? "current" : r === "completed" || s < i ? "completed" : "upcoming";
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
function O(s, i, r) {
|
|
12
|
+
return r !== void 0 ? !0 : s <= i;
|
|
13
|
+
}
|
|
14
|
+
const C = "step-", w = (s) => `${C}${s}`, X = (s) => Number(s.slice(C.length)), h = [
|
|
12
15
|
"ds:[stroke-dasharray:1] ds:[stroke-dashoffset:1]",
|
|
13
16
|
"ds:animate-[stepper-icon-draw_var(--animation-duration)_var(--ease-out)_forwards]",
|
|
14
17
|
"ds:motion-reduce:animate-none ds:motion-reduce:[stroke-dashoffset:0]"
|
|
15
18
|
].join(" ");
|
|
16
|
-
function
|
|
19
|
+
function q() {
|
|
17
20
|
return /* @__PURE__ */ e(
|
|
18
21
|
"svg",
|
|
19
22
|
{
|
|
@@ -25,12 +28,12 @@ function W() {
|
|
|
25
28
|
strokeLinejoin: "round",
|
|
26
29
|
"aria-hidden": "true",
|
|
27
30
|
className: "ds:size-4",
|
|
28
|
-
children: /* @__PURE__ */ e("path", { pathLength: "1", d: "M5 12l5 5L20 7", className:
|
|
31
|
+
children: /* @__PURE__ */ e("path", { pathLength: "1", d: "M5 12l5 5L20 7", className: h })
|
|
29
32
|
}
|
|
30
33
|
);
|
|
31
34
|
}
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */
|
|
35
|
+
function J() {
|
|
36
|
+
return /* @__PURE__ */ c(
|
|
34
37
|
"svg",
|
|
35
38
|
{
|
|
36
39
|
viewBox: "0 0 24 24",
|
|
@@ -42,13 +45,13 @@ function O() {
|
|
|
42
45
|
"aria-hidden": "true",
|
|
43
46
|
className: "ds:size-4",
|
|
44
47
|
children: [
|
|
45
|
-
/* @__PURE__ */ e("path", { pathLength: "1", d: "M6 6l12 12", className:
|
|
46
|
-
/* @__PURE__ */ e("path", { pathLength: "1", d: "M18 6l-12 12", className:
|
|
48
|
+
/* @__PURE__ */ e("path", { pathLength: "1", d: "M6 6l12 12", className: h }),
|
|
49
|
+
/* @__PURE__ */ e("path", { pathLength: "1", d: "M18 6l-12 12", className: h })
|
|
47
50
|
]
|
|
48
51
|
}
|
|
49
52
|
);
|
|
50
53
|
}
|
|
51
|
-
const
|
|
54
|
+
const K = [
|
|
52
55
|
"ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
|
|
53
56
|
"ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
|
|
54
57
|
"ds:size-[var(--min-target-size)]",
|
|
@@ -58,7 +61,7 @@ const X = [
|
|
|
58
61
|
"ds:transition-[background-color,border-color,color]",
|
|
59
62
|
"ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
|
|
60
63
|
"ds:motion-reduce:transition-none"
|
|
61
|
-
].join(" "),
|
|
64
|
+
].join(" "), Q = b(K, {
|
|
62
65
|
variants: {
|
|
63
66
|
state: {
|
|
64
67
|
upcoming: "ds:bg-[var(--background)] ds:text-[var(--muted-foreground)]",
|
|
@@ -75,7 +78,7 @@ const X = [
|
|
|
75
78
|
].join(" ")
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
|
-
}),
|
|
81
|
+
}), Y = b(
|
|
79
82
|
[
|
|
80
83
|
"ds:group/item ds:overflow-hidden ds:rounded-[var(--radius-md)]",
|
|
81
84
|
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2 ds:bg-[var(--card)]",
|
|
@@ -92,7 +95,7 @@ const X = [
|
|
|
92
95
|
},
|
|
93
96
|
defaultVariants: { tone: "neutral" }
|
|
94
97
|
}
|
|
95
|
-
),
|
|
98
|
+
), Z = [
|
|
96
99
|
"ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
97
100
|
"ds:min-h-[var(--min-target-size)]",
|
|
98
101
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
@@ -104,144 +107,144 @@ const X = [
|
|
|
104
107
|
"ds:transition-[background-color] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
|
|
105
108
|
"ds:motion-reduce:transition-none",
|
|
106
109
|
"ds:hover:enabled:bg-[var(--muted)]/40"
|
|
107
|
-
].join(" "),
|
|
110
|
+
].join(" "), S = (s) => [
|
|
108
111
|
"type-body-sm",
|
|
109
|
-
|
|
110
|
-
].join(" "),
|
|
112
|
+
s === "current" || s === "error" ? "ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]" : s === "completed" ? "ds:text-[var(--foreground)]" : "ds:text-[var(--muted-foreground)]"
|
|
113
|
+
].join(" "), ee = [
|
|
111
114
|
"type-meta ds:text-[var(--muted-foreground)]",
|
|
112
115
|
"ds:mt-[var(--spacing-xs)]"
|
|
113
|
-
].join(" "),
|
|
116
|
+
].join(" "), g = [
|
|
114
117
|
"type-meta",
|
|
115
118
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
116
119
|
"ds:text-[var(--muted-foreground)]"
|
|
117
|
-
].join(" "),
|
|
120
|
+
].join(" "), re = [
|
|
118
121
|
"ds:size-4 ds:shrink-0 ds:text-[var(--muted-foreground)]",
|
|
119
122
|
"ds:transition-transform ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
|
|
120
123
|
"ds:motion-reduce:transition-none",
|
|
121
124
|
"ds:group-data-[state=open]/item:rotate-180"
|
|
122
|
-
].join(" "),
|
|
125
|
+
].join(" "), se = [
|
|
123
126
|
"type-meta ds:text-[var(--muted-foreground)]",
|
|
124
127
|
"ds:ps-[calc(var(--min-target-size)+var(--spacing-md)+var(--spacing-sm))]",
|
|
125
128
|
"ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-sm)]",
|
|
126
129
|
"ds:group-data-[state=open]/item:hidden"
|
|
127
|
-
].join(" "),
|
|
130
|
+
].join(" "), ae = [
|
|
128
131
|
"ds:overflow-hidden",
|
|
129
132
|
"ds:data-[state=open]:animate-[accordion-down_var(--animation-duration)_var(--ease-out)]",
|
|
130
133
|
"ds:data-[state=closed]:animate-[accordion-up_var(--animation-duration)_var(--ease-in)]"
|
|
131
|
-
].join(" "),
|
|
134
|
+
].join(" "), te = [
|
|
132
135
|
"ds:ps-[calc(var(--min-target-size)+var(--spacing-md)+var(--spacing-sm))]",
|
|
133
136
|
"ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-md)]"
|
|
134
|
-
].join(" "),
|
|
137
|
+
].join(" "), ne = b("ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", {
|
|
135
138
|
variants: {}
|
|
136
|
-
}),
|
|
139
|
+
}), oe = P(
|
|
137
140
|
({
|
|
138
|
-
activeStep:
|
|
139
|
-
steps:
|
|
141
|
+
activeStep: s,
|
|
142
|
+
steps: i,
|
|
140
143
|
onStepChange: r,
|
|
141
|
-
"aria-label":
|
|
142
|
-
id:
|
|
143
|
-
className:
|
|
144
|
-
...
|
|
145
|
-
},
|
|
146
|
-
const { t: d } =
|
|
144
|
+
"aria-label": _,
|
|
145
|
+
id: x,
|
|
146
|
+
className: z,
|
|
147
|
+
...L
|
|
148
|
+
}, M) => {
|
|
149
|
+
const { t: d } = G(), l = i.length, n = Math.max(0, Math.min(s, l - 1)), V = _ ?? d("navigation.stepper.label"), y = d("navigation.stepper.edit"), N = d("navigation.stepper.open"), $ = d("navigation.stepper.locked"), A = d("navigation.stepper.completed"), F = d("navigation.stepper.error"), I = (t) => {
|
|
147
150
|
if (!t) return;
|
|
148
|
-
const
|
|
149
|
-
Number.isFinite(
|
|
150
|
-
},
|
|
151
|
+
const a = X(t);
|
|
152
|
+
Number.isFinite(a) && a !== n && (r == null || r(a));
|
|
153
|
+
}, k = B(
|
|
151
154
|
() => ({
|
|
152
|
-
getCurrentStep: () =>
|
|
155
|
+
getCurrentStep: () => n,
|
|
153
156
|
getTotalSteps: () => l,
|
|
154
|
-
getOpenSteps: () => [
|
|
157
|
+
getOpenSteps: () => [n],
|
|
155
158
|
gotoStep: (t) => {
|
|
156
159
|
if (!r) return;
|
|
157
|
-
const
|
|
158
|
-
|
|
160
|
+
const a = Math.max(0, Math.min(t, Math.max(l - 1, 0)));
|
|
161
|
+
a !== n && r(a);
|
|
159
162
|
},
|
|
160
163
|
next: () => {
|
|
161
|
-
r &&
|
|
164
|
+
r && n < l - 1 && r(n + 1);
|
|
162
165
|
},
|
|
163
166
|
previous: () => {
|
|
164
|
-
r &&
|
|
167
|
+
r && n > 0 && r(n - 1);
|
|
165
168
|
}
|
|
166
169
|
}),
|
|
167
|
-
[
|
|
170
|
+
[n, l, r]
|
|
168
171
|
);
|
|
169
|
-
return
|
|
172
|
+
return D(M, () => k, [k]), /* @__PURE__ */ e(
|
|
170
173
|
m.Root,
|
|
171
174
|
{
|
|
172
175
|
type: "single",
|
|
173
|
-
value:
|
|
174
|
-
onValueChange:
|
|
176
|
+
value: w(n),
|
|
177
|
+
onValueChange: I,
|
|
175
178
|
collapsible: !1,
|
|
176
|
-
"aria-label":
|
|
177
|
-
id:
|
|
179
|
+
"aria-label": V,
|
|
180
|
+
id: x,
|
|
178
181
|
"data-component": "stepper-accordion",
|
|
179
|
-
"data-component-id":
|
|
180
|
-
className:
|
|
181
|
-
...
|
|
182
|
-
children:
|
|
183
|
-
const
|
|
184
|
-
/* @__PURE__ */ e(
|
|
185
|
-
/* @__PURE__ */ e("span", { className: "ds:sr-only", children:
|
|
186
|
-
] }) :
|
|
187
|
-
/* @__PURE__ */ e(
|
|
188
|
-
/* @__PURE__ */ e("span", { className: "ds:sr-only", children:
|
|
189
|
-
] }) : /* @__PURE__ */ e("span", { children:
|
|
190
|
-
/* @__PURE__ */ e(
|
|
191
|
-
|
|
192
|
-
] }) : null;
|
|
193
|
-
return /* @__PURE__ */
|
|
182
|
+
"data-component-id": x,
|
|
183
|
+
className: ne({ className: z }),
|
|
184
|
+
...L,
|
|
185
|
+
children: i.map((t, a) => {
|
|
186
|
+
const o = W(a, n, t.status), u = o === "current" || o === "error", p = o === "upcoming", v = p && !O(a, n, t.status), T = o === "error" ? "error" : "neutral", f = d("navigation.stepper.stepN", { n: a + 1 }), R = o === "completed" ? /* @__PURE__ */ c(j, { children: [
|
|
187
|
+
/* @__PURE__ */ e(q, {}),
|
|
188
|
+
/* @__PURE__ */ e("span", { className: "ds:sr-only", children: A })
|
|
189
|
+
] }) : o === "error" ? /* @__PURE__ */ c(j, { children: [
|
|
190
|
+
/* @__PURE__ */ e(J, {}),
|
|
191
|
+
/* @__PURE__ */ e("span", { className: "ds:sr-only", children: F })
|
|
192
|
+
] }) : /* @__PURE__ */ e("span", { children: a + 1 }), E = o === "completed" ? /* @__PURE__ */ e("span", { className: g, children: y }) : v ? /* @__PURE__ */ c("span", { className: g, children: [
|
|
193
|
+
/* @__PURE__ */ e(U, { "aria-hidden": "true", className: "ds:size-3" }),
|
|
194
|
+
$
|
|
195
|
+
] }) : p ? /* @__PURE__ */ e("span", { className: g, children: N }) : null;
|
|
196
|
+
return /* @__PURE__ */ c(
|
|
194
197
|
m.Item,
|
|
195
198
|
{
|
|
196
|
-
value:
|
|
197
|
-
"data-step-id": String(
|
|
198
|
-
className:
|
|
199
|
+
value: w(a),
|
|
200
|
+
"data-step-id": String(a),
|
|
201
|
+
className: Y({ tone: T }),
|
|
199
202
|
children: [
|
|
200
|
-
/* @__PURE__ */ e(m.Header, { className: "ds:flex", children: /* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ e(m.Header, { className: "ds:flex", children: /* @__PURE__ */ c(
|
|
201
204
|
m.Trigger,
|
|
202
205
|
{
|
|
203
|
-
disabled:
|
|
206
|
+
disabled: v,
|
|
204
207
|
"aria-disabled": u || void 0,
|
|
205
|
-
"aria-label":
|
|
208
|
+
"aria-label": o === "completed" ? `${f}, ${y}` : p && !v ? `${f}, ${N}` : f,
|
|
206
209
|
"aria-current": u ? "step" : void 0,
|
|
207
|
-
className:
|
|
210
|
+
className: Z,
|
|
208
211
|
children: [
|
|
209
212
|
/* @__PURE__ */ e(
|
|
210
213
|
"span",
|
|
211
214
|
{
|
|
212
215
|
"aria-hidden": "true",
|
|
213
|
-
className:
|
|
214
|
-
children:
|
|
216
|
+
className: Q({ state: o }),
|
|
217
|
+
children: R
|
|
215
218
|
}
|
|
216
219
|
),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */ e("span", { className:
|
|
219
|
-
t.description ? /* @__PURE__ */ e("span", { className:
|
|
220
|
+
/* @__PURE__ */ c("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
|
|
221
|
+
/* @__PURE__ */ e("span", { className: S(o), children: t.label }),
|
|
222
|
+
t.description ? /* @__PURE__ */ e("span", { className: ee, children: t.description }) : null
|
|
220
223
|
] }),
|
|
221
|
-
|
|
224
|
+
E,
|
|
222
225
|
u ? null : /* @__PURE__ */ e(
|
|
223
|
-
|
|
226
|
+
H,
|
|
224
227
|
{
|
|
225
228
|
"aria-hidden": "true",
|
|
226
|
-
className:
|
|
229
|
+
className: re
|
|
227
230
|
}
|
|
228
231
|
)
|
|
229
232
|
]
|
|
230
233
|
}
|
|
231
234
|
) }),
|
|
232
|
-
t.summary &&
|
|
233
|
-
/* @__PURE__ */ e(m.Content, { className:
|
|
235
|
+
t.summary && o === "completed" ? /* @__PURE__ */ e("div", { className: se, children: t.summary }) : null,
|
|
236
|
+
/* @__PURE__ */ e(m.Content, { className: ae, children: /* @__PURE__ */ e("div", { className: te, children: t.content }) })
|
|
234
237
|
]
|
|
235
238
|
},
|
|
236
|
-
|
|
239
|
+
a
|
|
237
240
|
);
|
|
238
241
|
})
|
|
239
242
|
}
|
|
240
243
|
);
|
|
241
244
|
}
|
|
242
245
|
);
|
|
243
|
-
|
|
246
|
+
oe.displayName = "StepperAccordion";
|
|
244
247
|
export {
|
|
245
|
-
|
|
248
|
+
oe as S
|
|
246
249
|
};
|
|
247
|
-
//# sourceMappingURL=stepper-accordion-
|
|
250
|
+
//# sourceMappingURL=stepper-accordion-DmVykr5F.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "1.
|
|
3
|
+
"packageVersion": "1.11.0",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -1253,6 +1253,12 @@
|
|
|
1253
1253
|
"type": "string",
|
|
1254
1254
|
"description": "Active variant — one of `inline-list`, `accordion`, `calendar`, `flexible`, `progress`.",
|
|
1255
1255
|
"descriptionKey": "ui.agent.booking.state.variant"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"name": "currentStep",
|
|
1259
|
+
"type": "number",
|
|
1260
|
+
"description": "The step the flow is on — 1 insurance, 2 specialty, 3 service, 4 provider, 5 date, 6 time, 7 patient details, 8 confirmation (after a successful submit). Read this back after `goto_step` to see where the clamp landed.",
|
|
1261
|
+
"descriptionKey": "ui.agent.booking.state.currentStep"
|
|
1256
1262
|
}
|
|
1257
1263
|
],
|
|
1258
1264
|
"actions": [
|
|
@@ -1293,7 +1299,8 @@
|
|
|
1293
1299
|
},
|
|
1294
1300
|
"idempotent": true,
|
|
1295
1301
|
"errors": [
|
|
1296
|
-
"Requested step is not yet reachable — clamped to the first incomplete step."
|
|
1302
|
+
"Requested step is not yet reachable — clamped to the first incomplete step.",
|
|
1303
|
+
"Requested step is hidden for this practice (e.g. insurance outside Germany, or provider choice turned off) — clamped to the first incomplete step."
|
|
1297
1304
|
],
|
|
1298
1305
|
"examples": [
|
|
1299
1306
|
{
|
|
@@ -1303,7 +1310,7 @@
|
|
|
1303
1310
|
"note": "Return to the first step."
|
|
1304
1311
|
}
|
|
1305
1312
|
],
|
|
1306
|
-
"description": "Jump to the given step.
|
|
1313
|
+
"description": "Jump to the given step. A step that is hidden for this practice, or that sits ahead of the first incomplete step, clamps to that first incomplete step — read `currentStep` back to see where it landed.",
|
|
1307
1314
|
"descriptionKey": "ui.agent.booking.actions.gotoStep"
|
|
1308
1315
|
}
|
|
1309
1316
|
],
|
|
@@ -10199,7 +10206,7 @@
|
|
|
10199
10206
|
},
|
|
10200
10207
|
"item": {
|
|
10201
10208
|
"attr": "data-result-id",
|
|
10202
|
-
"description": "Stable result id emitted on each rendered result card. Used by scroll_to_result / focus_pin to address a single result. Each card also carries two anchors: data-component=\"practice-result-open-cta\" (practice page) and data-component=\"practice-result-book-cta\" (booking flow; data-slot-aware=\"true\" when it deep-links to a next slot)."
|
|
10209
|
+
"description": "Stable result id emitted on each rendered result card. Used by scroll_to_result / focus_pin to address a single result. Each card also carries two anchors: data-component=\"practice-result-open-cta\" (practice page) and data-component=\"practice-result-book-cta\" (booking flow; data-slot-aware=\"true\" when it deep-links to a next slot). Card content carries its own read-only hooks: data-component=\"practice-result-tagline\", data-component=\"practice-result-description\", and data-component=\"practice-result-price\" (the kit-formatted first-visit cost — present only when the practice set one)."
|
|
10203
10210
|
}
|
|
10204
10211
|
}
|
|
10205
10212
|
},
|
package/dist/agent-i18n/en.json
CHANGED
|
@@ -135,11 +135,12 @@
|
|
|
135
135
|
},
|
|
136
136
|
"booking": {
|
|
137
137
|
"state": {
|
|
138
|
-
"variant": "Active variant — one of `inline-list`, `accordion`, `calendar`, `flexible`, `progress`."
|
|
138
|
+
"variant": "Active variant — one of `inline-list`, `accordion`, `calendar`, `flexible`, `progress`.",
|
|
139
|
+
"currentStep": "The step the flow is on — 1 insurance, 2 specialty, 3 service, 4 provider, 5 date, 6 time, 7 patient details, 8 confirmation (after a successful submit). Read this back after `goto_step` to see where the clamp landed."
|
|
139
140
|
},
|
|
140
141
|
"actions": {
|
|
141
142
|
"reset": "Clear the booking value back to an empty state. Use to abandon an in-progress flow.",
|
|
142
|
-
"gotoStep": "Jump to the given step.
|
|
143
|
+
"gotoStep": "Jump to the given step. A step that is hidden for this practice, or that sits ahead of the first incomplete step, clamps to that first incomplete step — read `currentStep` back to see where it landed."
|
|
143
144
|
}
|
|
144
145
|
},
|
|
145
146
|
"breadcrumb": {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared money formatter for the kit's "price in minor units" convention.
|
|
3
|
+
*
|
|
4
|
+
* Every component that renders a price takes the amount as an integer in
|
|
5
|
+
* the smallest currency unit (cents / centesimi) plus an ISO-4217
|
|
6
|
+
* `currencyCode`, and the KIT does the formatting — the consumer never
|
|
7
|
+
* hands the kit a pre-rendered string. Lifted from the file-local
|
|
8
|
+
* duplicate in `contact-profile-card.tsx` when PracticeResults adopted
|
|
9
|
+
* the same convention, so both surfaces render an identical price for
|
|
10
|
+
* identical input.
|
|
11
|
+
*
|
|
12
|
+
* Not to be confused with `formatPaymentAmount` (payment-form): that one
|
|
13
|
+
* is the checkout formatter and falls back to an `en` currency string so
|
|
14
|
+
* a raw integer can never leak into a payment UI. This is the lightweight
|
|
15
|
+
* leaf helper for read-only price captions — it lives in `_shared` so a
|
|
16
|
+
* SERP card can use it without pulling the payment-form module graph in.
|
|
17
|
+
* Both apply the same zero-decimal divisor rule; only the failure
|
|
18
|
+
* behaviour differs.
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatPrice(minorUnits: number, currency: string, locale: string): string;
|
|
21
|
+
//# sourceMappingURL=format-price.d.ts.map
|
|
@@ -8,6 +8,7 @@ export { computeDueDate, trimesterForWeeks, gestationalMilestones, trimesterHigh
|
|
|
8
8
|
export { computeAntenatalSchedule, type AntenatalEvent, type ResolvedAntenatalEvent, type AntenatalScheduleOptions, type AntenatalCategory, type AntenatalStatus, type AntenatalCondition, type ScheduleLocale, type GdmRisk, } from './antenatal-schedule';
|
|
9
9
|
export { AntenatalScheduleTimeline, type AntenatalScheduleTimelineProps, } from './antenatal-schedule-timeline';
|
|
10
10
|
export { InsertButton, buildResultText, buildResultHtml, buildResultCardSvg, svgCardToPngDataUri, svgCardToPng, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertPngResult, type InsertMode, type InsertCardData, type InsertCardField, type InsertCardGauge, type SvgCardToPngOptions, } from './insert-result';
|
|
11
|
+
export { formatPrice } from './format-price';
|
|
11
12
|
export { normalizeDiacritics } from './normalize-diacritics';
|
|
12
13
|
export { useDebouncedCallback } from './use-debounced-callback';
|
|
13
14
|
export { useFocusTrap, type UseFocusTrapOptions } from './use-focus-trap';
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Consumer-supplied override for a step.
|
|
3
|
+
*
|
|
4
|
+
* - `completed` — the step holds a value; render the tick and let the user
|
|
5
|
+
* back in to change it.
|
|
6
|
+
* - `error` — the step's own validation failed; always wins.
|
|
7
|
+
* - `unlocked` (1.11.0) — the step has been *reached* but holds no value of
|
|
8
|
+
* its own. It renders exactly like an upcoming step, but the user may open
|
|
9
|
+
* it. Added for flows whose final step can never report itself "completed"
|
|
10
|
+
* because its validity belongs to a form inside it: without this, moving
|
|
11
|
+
* the cursor backwards left that step HTML-`disabled` and unreachable.
|
|
12
|
+
*
|
|
13
|
+
* `'completed'` and `'error'` behave exactly as before, so consumers passing
|
|
14
|
+
* either (or nothing) are unaffected. A consumer that reads this union back
|
|
15
|
+
* in an exhaustive `switch` needs a case for `'unlocked'`; `StepState` — the
|
|
16
|
+
* union such a switch usually runs on — is deliberately untouched.
|
|
17
|
+
*/
|
|
18
|
+
export type StepStatus = 'completed' | 'error' | 'unlocked';
|
|
2
19
|
export type StepState = 'upcoming' | 'current' | 'completed' | 'error';
|
|
3
20
|
export interface StepSpec {
|
|
4
21
|
/** Visible step label — comes from the consumer, already translated. */
|
|
@@ -9,9 +26,18 @@ export interface StepSpec {
|
|
|
9
26
|
* Consumer-explicit status override. `error` always wins; `completed` is
|
|
10
27
|
* honoured only for steps at or beyond the active index so the active step
|
|
11
28
|
* always keeps `current` (otherwise a consumer pre-setting `completed` on
|
|
12
|
-
* every step would silently mask the current position).
|
|
29
|
+
* every step would silently mask the current position). `unlocked` changes
|
|
30
|
+
* reachability only — see `stepIsReachable` — and never the rendered state.
|
|
13
31
|
*/
|
|
14
32
|
status?: StepStatus;
|
|
15
33
|
}
|
|
16
34
|
export declare function stateForStep(index: number, activeStep: number, status?: StepStatus): StepState;
|
|
35
|
+
/**
|
|
36
|
+
* May the user open this step?
|
|
37
|
+
*
|
|
38
|
+
* Everything at or before the cursor is reachable, as is any step the
|
|
39
|
+
* consumer has explicitly marked `completed`, `error` or `unlocked`.
|
|
40
|
+
* Steps ahead of the cursor with no status stay locked, exactly as before.
|
|
41
|
+
*/
|
|
42
|
+
export declare function stepIsReachable(index: number, activeStep: number, status?: StepStatus): boolean;
|
|
17
43
|
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -116,11 +116,24 @@ export interface BookingValidationResult {
|
|
|
116
116
|
export type BookingValidator = (value: string) => Promise<BookingValidationResult>;
|
|
117
117
|
export interface BookingHandle {
|
|
118
118
|
getVariant: () => BookingVariant;
|
|
119
|
+
/**
|
|
120
|
+
* The step the flow is on — 1-7 while the cascade is in progress, and 8
|
|
121
|
+
* once `onSubmit` has resolved and the confirmation view is showing.
|
|
122
|
+
*
|
|
123
|
+
* This is the read-back for `goToStep`: it reports the **cursor**, which
|
|
124
|
+
* can sit behind the cascade's frontier after a backwards edit. It is
|
|
125
|
+
* therefore NOT always the number `onStepChange` emits — that callback
|
|
126
|
+
* reports the frontier (the first incomplete step), so moving the cursor
|
|
127
|
+
* back to step 3 with everything filled makes this return `3` while
|
|
128
|
+
* `onStepChange` stays silent on `7`.
|
|
129
|
+
*/
|
|
130
|
+
getCurrentStep: () => 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
119
131
|
/** Clear `value` back to an empty state via `onChange`. */
|
|
120
132
|
reset: () => void;
|
|
121
133
|
/**
|
|
122
|
-
* Jump to a specific step.
|
|
123
|
-
*
|
|
134
|
+
* Jump to a specific step. A step that is not in the visible ladder, or
|
|
135
|
+
* that sits ahead of the first incomplete step, clamps to that first
|
|
136
|
+
* incomplete step rather than stranding the cursor.
|
|
124
137
|
*/
|
|
125
138
|
goToStep: (step: 1 | 2 | 3 | 4 | 5 | 6 | 7) => void;
|
|
126
139
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as _, a as O, b as o, c as r } from "../../_chunks/contact-profile-card-
|
|
1
|
+
import { C as _, a as O, b as o, c as r } from "../../_chunks/contact-profile-card-BMIBr5s9.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as CONTACT_PROFILE_CARD_ROW_ICONS,
|
|
4
4
|
O as CONTACT_PROFILE_CARD_ROW_KEYS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as r, D as l, E as t, T as s, a as d, b as n, c as o, d as i, e as R, f as C, g as T, i as F, h as g } from "../../_chunks/actions-cell-renderer-
|
|
1
|
+
import { A as r, D as l, E as t, T as s, a as d, b as n, c as o, d as i, e as R, f as C, g as T, i as F, h as g } from "../../_chunks/actions-cell-renderer-xfSYiTXQ.js";
|
|
2
2
|
import { B as b, C as c, a as u, E as x, b as p, R as E, T as m, c as f, r as h, u as S } from "../../_chunks/editable-currency-cell-renderer-zLf_bXvL.js";
|
|
3
3
|
import { D as w, a as y, b as I, I as L, L as N, N as P, c as W, S as B, d as U, e as _, T as k, f as v, g as O, U as X } from "../../_chunks/link-cell-renderer-Cp2MSlJl.js";
|
|
4
4
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, C as l, N as n, P as t, a as C, T as i, b as o, g as T, u as p } from "../../_chunks/balance-badge-cell-
|
|
1
|
+
import { B as s, C as l, N as n, P as t, a as C, T as i, b as o, g as T, u as p } from "../../_chunks/balance-badge-cell-C_Qz76x7.js";
|
|
2
2
|
export {
|
|
3
3
|
s as BalanceBadgeCell,
|
|
4
4
|
l as CarePlanStatusCell,
|
|
@@ -77,6 +77,24 @@ export interface PracticeResult {
|
|
|
77
77
|
insurances?: string[];
|
|
78
78
|
/** Anxious-patient friendly — renders an icon chip on rich-cards. */
|
|
79
79
|
specializedInFearPatients?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* First-visit price in the smallest currency unit (cents / centesimi).
|
|
82
|
+
* Rendered as a labelled "First visit cost" row on every card in both
|
|
83
|
+
* densities (booking-website maps the practice's long-standing
|
|
84
|
+
* first-visit price setting here). Same convention as
|
|
85
|
+
* `ContactProfileCard.firstVisitPriceCents` — the KIT formats, the
|
|
86
|
+
* consumer never hands over a pre-rendered string.
|
|
87
|
+
*
|
|
88
|
+
* `0` is a real value meaning "free" and renders as such. Omit the
|
|
89
|
+
* field (or pass `undefined`) when the practice has not set a price —
|
|
90
|
+
* the row then disappears completely. Added for HTP-6136.
|
|
91
|
+
*/
|
|
92
|
+
firstVisitPriceCents?: number;
|
|
93
|
+
/**
|
|
94
|
+
* ISO-4217 currency code for `firstVisitPriceCents`. Defaults to
|
|
95
|
+
* `EUR`. Added for HTP-6136.
|
|
96
|
+
*/
|
|
97
|
+
currencyCode?: string;
|
|
80
98
|
/**
|
|
81
99
|
* Next available slot — rendered as a "Next available …" caption on
|
|
82
100
|
* every card. When present, the card's Book CTA deep-links to
|
|
@@ -1423,6 +1423,7 @@ export declare const arUi: {
|
|
|
1423
1423
|
readonly completed: "مكتمل";
|
|
1424
1424
|
readonly error: "خطأ";
|
|
1425
1425
|
readonly edit: "تعديل";
|
|
1426
|
+
readonly open: "فتح";
|
|
1426
1427
|
readonly locked: "مقفل";
|
|
1427
1428
|
};
|
|
1428
1429
|
readonly stepperCalendar: {
|
|
@@ -1700,6 +1701,8 @@ export declare const arUi: {
|
|
|
1700
1701
|
};
|
|
1701
1702
|
readonly booking: {
|
|
1702
1703
|
readonly regionLabel: "حجز موعد";
|
|
1704
|
+
readonly stepAnnouncement: "الخطوة {{current}} من {{total}}: {{label}}";
|
|
1705
|
+
readonly filtersLabel: "اختياراتك";
|
|
1703
1706
|
readonly inlineList: {
|
|
1704
1707
|
readonly title: "احجز موعدك عبر الإنترنت";
|
|
1705
1708
|
readonly subtitle: "ابحث حسب التخصص أو الخدمة أو التاريخ والوقت";
|
|
@@ -1978,6 +1981,7 @@ export declare const arUi: {
|
|
|
1978
1981
|
readonly card: {
|
|
1979
1982
|
readonly open: "Open";
|
|
1980
1983
|
readonly book: "Book";
|
|
1984
|
+
readonly firstVisitPrice: "First visit cost";
|
|
1981
1985
|
};
|
|
1982
1986
|
readonly sheet: {
|
|
1983
1987
|
readonly title_one: "{{count}} practice";
|
package/dist/i18n/locales/ar.js
CHANGED
|
@@ -1420,6 +1420,7 @@ const e = {
|
|
|
1420
1420
|
completed: "مكتمل",
|
|
1421
1421
|
error: "خطأ",
|
|
1422
1422
|
edit: "تعديل",
|
|
1423
|
+
open: "فتح",
|
|
1423
1424
|
locked: "مقفل"
|
|
1424
1425
|
},
|
|
1425
1426
|
stepperCalendar: {
|
|
@@ -1697,6 +1698,8 @@ const e = {
|
|
|
1697
1698
|
},
|
|
1698
1699
|
booking: {
|
|
1699
1700
|
regionLabel: "حجز موعد",
|
|
1701
|
+
stepAnnouncement: "الخطوة {{current}} من {{total}}: {{label}}",
|
|
1702
|
+
filtersLabel: "اختياراتك",
|
|
1700
1703
|
inlineList: {
|
|
1701
1704
|
title: "احجز موعدك عبر الإنترنت",
|
|
1702
1705
|
subtitle: "ابحث حسب التخصص أو الخدمة أو التاريخ والوقت"
|
|
@@ -1964,7 +1967,8 @@ const e = {
|
|
|
1964
1967
|
fearPatient: { label: "Anxious-patient friendly" },
|
|
1965
1968
|
card: {
|
|
1966
1969
|
open: "Open",
|
|
1967
|
-
book: "Book"
|
|
1970
|
+
book: "Book",
|
|
1971
|
+
firstVisitPrice: "First visit cost"
|
|
1968
1972
|
},
|
|
1969
1973
|
sheet: {
|
|
1970
1974
|
title_one: "{{count}} practice",
|