@alfadocs/ui-kit 1.135.0 → 1.137.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.
Files changed (216) hide show
  1. package/dist/_chunks/{ai-prompt-input-JIPbrTF3.js → ai-prompt-input-CVNeusoW.js} +2 -2
  2. package/dist/_chunks/ai-summary-panel-BhCo2vZF.js +1045 -0
  3. package/dist/_chunks/{alia-sidebar-CtwhdASP.js → alia-sidebar-CVBlKur9.js} +3 -3
  4. package/dist/_chunks/{anamnesis-summary-rows-CCNmkq55.js → anamnesis-summary-rows-Dr2V1Rtf.js} +3 -3
  5. package/dist/_chunks/appointment-details-panel.history-DrIMDQYf.js +314 -0
  6. package/dist/_chunks/appointment-details-panel.identity-C20Y9xNC.js +223 -0
  7. package/dist/_chunks/{audio-recorder-CsnM_WDy.js → audio-recorder-BOF5YYoC.js} +2 -2
  8. package/dist/_chunks/{balance-badge-cell-DTiMdnCZ.js → balance-badge-cell-BSB02Bwo.js} +4 -4
  9. package/dist/_chunks/{bill-line-table-DHKb_O7c.js → bill-line-table-By-YL2ms.js} +2 -2
  10. package/dist/_chunks/{bishop-score-CKztphVz.js → bishop-score-DWGESRP9.js} +2 -2
  11. package/dist/_chunks/calendar-appointment-editor-dialog-D0n_bVsT.js +5518 -0
  12. package/dist/_chunks/calendar-editor-discard-host-1UfmMOEb.js +1336 -0
  13. package/dist/_chunks/calendar-editor-guard-9fShhNIA.js +31 -0
  14. package/dist/_chunks/calendar-waiting-list-panel-Ckd6tSeu.js +981 -0
  15. package/dist/_chunks/calendar-workspace.model-DrOoxY1b.js +1557 -0
  16. package/dist/_chunks/calendar.sheets-Datc0-IT.js +4585 -0
  17. package/dist/_chunks/call-status-chip-pajxN5eZ.js +180 -0
  18. package/dist/_chunks/calls-panel-BIfatK90.js +1094 -0
  19. package/dist/_chunks/{chat-input-CX4dxBq7.js → chat-input-BmvnuZqj.js} +114 -109
  20. package/dist/_chunks/{chat-message-CfIyXrxA.js → chat-message-B4TMeZ2m.js} +35 -30
  21. package/dist/_chunks/circle-x-W8Enq3i4.js +16 -0
  22. package/dist/_chunks/color-picker-CC8ZfntU.js +582 -0
  23. package/dist/_chunks/communications-panel-SQ-55e3V.js +1079 -0
  24. package/dist/_chunks/{data-grid-B2oaI7Lt.js → data-grid-CxKz8flO.js} +2 -2
  25. package/dist/_chunks/{data-table-FTV3uRjX.js → data-table-_tgj0C_T.js} +2 -2
  26. package/dist/_chunks/{default-tabs-DbebYO04.js → default-tabs-oDWQzbN7.js} +3 -3
  27. package/dist/_chunks/{document-preview-DLVIrOYV.js → document-preview-CirR3C_m.js} +3 -3
  28. package/dist/_chunks/entity-summary-CPUHzyil.js +297 -0
  29. package/dist/_chunks/{file-manager-Bzr5NK1t.js → file-manager-CEi4z2i0.js} +2 -2
  30. package/dist/_chunks/{fiscal-code-input-BBvU7sAo.js → fiscal-code-input-DZlpaMGg.js} +2 -2
  31. package/dist/_chunks/{gestational-age-calculator-mB6brTlp.js → gestational-age-calculator-CHbpC4vL.js} +2 -2
  32. package/dist/_chunks/{heatmap-C5gJin_F.js → heatmap-_546qI2V.js} +2 -2
  33. package/dist/_chunks/{iban-input-DuTwKok5.js → iban-input-CdSLRzQN.js} +2 -2
  34. package/dist/_chunks/{invoice-upload-list-B5aMffTy.js → invoice-upload-list-CQI9MUl6.js} +3 -3
  35. package/dist/_chunks/{kit-extensions-DUaIYyMD.js → kit-extensions-BNBf4m8O.js} +3 -3
  36. package/dist/_chunks/{link-cell-renderer-D3JLPURZ.js → link-cell-renderer-Xx5T8u5Q.js} +3 -3
  37. package/dist/_chunks/list-todo-KWvUhmT_.js +33 -0
  38. package/dist/_chunks/{muscle-scheme-BGJD62op.js → muscle-scheme-D_rSyGDj.js} +2 -2
  39. package/dist/_chunks/{notes-panel-BvjAo4RQ.js → notes-panel-DsEKNtsw.js} +2 -2
  40. package/dist/_chunks/{optical-prescription-Da_r8pMr.js → optical-prescription-DaSbsh4p.js} +2 -2
  41. package/dist/_chunks/palettes-CKVXYTzo.js +172 -0
  42. package/dist/_chunks/{patient-account-settings-B2XbN_Fe.js → patient-account-settings-COybehKx.js} +3 -3
  43. package/dist/_chunks/{patient-card-DTh3QTyS.js → patient-card-Cpr8iD19.js} +4 -4
  44. package/dist/_chunks/{patient-check-in-resume-B7NY-6KI.js → patient-check-in-resume-DZnyYDKH.js} +40 -40
  45. package/dist/_chunks/{patient-details-DBtEITfE.js → patient-details-Dv7EiTCo.js} +2 -2
  46. package/dist/_chunks/{patient-field-row-a5d4QijH.js → patient-field-row-DuHWGlLz.js} +3 -3
  47. package/dist/_chunks/patient-picker-BZJuOgMw.js +173 -0
  48. package/dist/_chunks/{patient-sign-in-pin-CDBqV254.js → patient-sign-in-pin-DmMBwWet.js} +2 -2
  49. package/dist/_chunks/{patient-sign-in-steps-C2JSqlok.js → patient-sign-in-steps-BKcxNkdY.js} +37 -59
  50. package/dist/_chunks/{patient-summary-card-Bl2NknPe.js → patient-summary-card-D-cDzOim.js} +2 -2
  51. package/dist/_chunks/phone-off-DQSTLz4l.js +28 -0
  52. package/dist/_chunks/{portal-details-DCIiGkHA.js → portal-details-DdzvroYP.js} +2 -2
  53. package/dist/_chunks/{portal-documents-DJOH8pZx.js → portal-documents-CNmoYWFc.js} +3 -3
  54. package/dist/_chunks/{pregnancy-dating-BNI32qNw.js → pregnancy-dating-lJbzai73.js} +2 -2
  55. package/dist/_chunks/{privacy-mask-C19dJFMk.js → privacy-mask-C2ZLKrMh.js} +5 -5
  56. package/dist/_chunks/{registration-form-DS3RuKHu.js → registration-form-CuLiTA52.js} +2 -2
  57. package/dist/_chunks/{reserved.agent-DOzOBUW7.js → reserved.agent-CabZHFJC.js} +2 -2
  58. package/dist/_chunks/{rich-text-editor-DjHL1b3E.js → rich-text-editor-C48omVjq.js} +2 -2
  59. package/dist/_chunks/{select-uESzXTX6.js → select-CIXKyUMw.js} +172 -149
  60. package/dist/_chunks/{session-countdown-DOx1IBUB.js → session-countdown-StcyUU5O.js} +56 -66
  61. package/dist/_chunks/{signature-request-CHsM_iWi.js → signature-request-vJDSHZld.js} +2 -2
  62. package/dist/_chunks/{tabs-CRIDBLP7.js → tabs-Czkmw5ou.js} +2 -2
  63. package/dist/_chunks/task-editor-wKbFbGqW.js +1093 -0
  64. package/dist/_chunks/{tasks-panel-6EzdnwT8.js → tasks-panel-DbtJS4QI.js} +2 -2
  65. package/dist/_chunks/{toolbar-CfdoJzMV.js → toolbar-DjG-cpD_.js} +2 -2
  66. package/dist/_chunks/{unit-converter-YKlHyUC2.js → unit-converter-CUAUTu2B.js} +2 -2
  67. package/dist/_chunks/use-appointment-details-read-jGkJalX8.js +1966 -0
  68. package/dist/_chunks/{voice-control-panel-Be_c0CQ0.js → voice-control-panel-Cp4vs1iy.js} +2 -2
  69. package/dist/agent-catalog.json +282 -6
  70. package/dist/agent-i18n/en.json +26 -4
  71. package/dist/appointment-editor-panel/index.js +100 -0
  72. package/dist/booking-tools-data/index.js +82 -0
  73. package/dist/browser-support.js +1 -1
  74. package/dist/calendar-action-buttons/index.js +178 -0
  75. package/dist/components/ai-prompt-input/index.js +1 -1
  76. package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +68 -5
  77. package/dist/components/ai-summary-panel/index.d.ts +1 -1
  78. package/dist/components/ai-summary-panel/index.js +1 -1
  79. package/dist/components/ai-summary-panel/summary-markdown.d.ts +15 -0
  80. package/dist/components/appointment-details-panel/index.js +6 -5
  81. package/dist/components/audio-recorder/index.js +1 -1
  82. package/dist/components/bill-line-table/index.js +1 -1
  83. package/dist/components/bill-table/index.js +1 -1
  84. package/dist/components/bishop-score/index.js +1 -1
  85. package/dist/components/booking/index.js +1 -1
  86. package/dist/components/call-status-chip/call-status-chip.d.ts +30 -0
  87. package/dist/components/call-status-chip/index.d.ts +3 -0
  88. package/dist/components/call-status-chip/index.js +5 -0
  89. package/dist/components/calls-panel/calls-panel.agent.d.ts +4 -0
  90. package/dist/components/calls-panel/calls-panel.d.ts +153 -0
  91. package/dist/components/calls-panel/index.d.ts +4 -0
  92. package/dist/components/calls-panel/index.js +6 -0
  93. package/dist/components/chat-input/chat-input.d.ts +17 -0
  94. package/dist/components/chat-input/index.js +1 -1
  95. package/dist/components/chat-message/index.js +1 -1
  96. package/dist/components/color-picker/index.js +5 -4
  97. package/dist/components/communications-panel/communications-panel.d.ts +15 -3
  98. package/dist/components/communications-panel/index.js +1 -1
  99. package/dist/components/data-grid/index.js +2 -2
  100. package/dist/components/data-table/index.js +2 -2
  101. package/dist/components/document-preview/index.js +1 -1
  102. package/dist/components/entity-summary/entity-summary.d.ts +29 -1
  103. package/dist/components/entity-summary/index.js +1 -1
  104. package/dist/components/file-manager/index.js +1 -1
  105. package/dist/components/fiscal-code-input/index.js +1 -1
  106. package/dist/components/gestational-age-calculator/index.js +1 -1
  107. package/dist/components/heatmap/index.js +1 -1
  108. package/dist/components/iban-input/index.js +1 -1
  109. package/dist/components/index.d.ts +2 -0
  110. package/dist/components/invoice-upload-list/index.js +1 -1
  111. package/dist/components/muscle-scheme/index.js +1 -1
  112. package/dist/components/notes-panel/index.js +1 -1
  113. package/dist/components/optical-prescription/index.js +1 -1
  114. package/dist/components/patient-details/index.js +1 -1
  115. package/dist/components/patient-summary-card/index.js +1 -1
  116. package/dist/components/patient-table/index.js +1 -1
  117. package/dist/components/pregnancy-dating/index.js +1 -1
  118. package/dist/components/rich-text-editor/index.js +2 -2
  119. package/dist/components/select/index.js +1 -1
  120. package/dist/components/select/select.d.ts +8 -0
  121. package/dist/components/session-countdown/index.js +1 -1
  122. package/dist/components/skeleton-scheme/index.js +1 -1
  123. package/dist/components/tabs/index.js +1 -1
  124. package/dist/components/task-editor/index.js +1 -1
  125. package/dist/components/tasks-panel/index.js +1 -1
  126. package/dist/components/unit-converter/index.js +1 -1
  127. package/dist/components/voice-control-panel/index.js +1 -1
  128. package/dist/core.css +1 -1
  129. package/dist/find-free-slots-panel/index.js +58 -0
  130. package/dist/host-compat.css +4 -1
  131. package/dist/i18n/locales/ar.d.ts +72 -3
  132. package/dist/i18n/locales/ar.js +74 -5
  133. package/dist/i18n/locales/de.d.ts +72 -3
  134. package/dist/i18n/locales/de.js +74 -5
  135. package/dist/i18n/locales/el.d.ts +72 -3
  136. package/dist/i18n/locales/el.js +74 -5
  137. package/dist/i18n/locales/en.d.ts +72 -3
  138. package/dist/i18n/locales/en.js +73 -4
  139. package/dist/i18n/locales/es.d.ts +72 -3
  140. package/dist/i18n/locales/es.js +74 -5
  141. package/dist/i18n/locales/fr.d.ts +72 -3
  142. package/dist/i18n/locales/fr.js +74 -5
  143. package/dist/i18n/locales/hi.d.ts +72 -3
  144. package/dist/i18n/locales/hi.js +74 -5
  145. package/dist/i18n/locales/it.d.ts +83 -14
  146. package/dist/i18n/locales/it.js +84 -15
  147. package/dist/i18n/locales/ja.d.ts +72 -3
  148. package/dist/i18n/locales/ja.js +74 -5
  149. package/dist/i18n/locales/nl.d.ts +72 -3
  150. package/dist/i18n/locales/nl.js +74 -5
  151. package/dist/i18n/locales/pl.d.ts +72 -3
  152. package/dist/i18n/locales/pl.js +74 -5
  153. package/dist/i18n/locales/pt.d.ts +72 -3
  154. package/dist/i18n/locales/pt.js +74 -5
  155. package/dist/i18n/locales/ro.d.ts +72 -3
  156. package/dist/i18n/locales/ro.js +74 -5
  157. package/dist/i18n/locales/ru.d.ts +72 -3
  158. package/dist/i18n/locales/ru.js +74 -5
  159. package/dist/i18n/locales/sq.d.ts +72 -3
  160. package/dist/i18n/locales/sq.js +74 -5
  161. package/dist/i18n/locales/sv.d.ts +72 -3
  162. package/dist/i18n/locales/sv.js +74 -5
  163. package/dist/i18n/locales/tr.d.ts +72 -3
  164. package/dist/i18n/locales/tr.js +74 -5
  165. package/dist/i18n/locales/zh.d.ts +72 -3
  166. package/dist/i18n/locales/zh.js +74 -5
  167. package/dist/index.js +1329 -1318
  168. package/dist/locales/ar.json +74 -5
  169. package/dist/locales/de.json +74 -5
  170. package/dist/locales/el.json +74 -5
  171. package/dist/locales/en.json +73 -4
  172. package/dist/locales/es.json +74 -5
  173. package/dist/locales/fr.json +74 -5
  174. package/dist/locales/hi.json +74 -5
  175. package/dist/locales/it.json +84 -15
  176. package/dist/locales/ja.json +74 -5
  177. package/dist/locales/nl.json +74 -5
  178. package/dist/locales/pl.json +74 -5
  179. package/dist/locales/pt.json +74 -5
  180. package/dist/locales/ro.json +74 -5
  181. package/dist/locales/ru.json +74 -5
  182. package/dist/locales/sq.json +74 -5
  183. package/dist/locales/sv.json +74 -5
  184. package/dist/locales/tr.json +74 -5
  185. package/dist/locales/zh.json +74 -5
  186. package/dist/online-bookings-panel/index.js +69 -0
  187. package/dist/patterns/alia-assistant/index.js +1 -1
  188. package/dist/patterns/anamnesis/index.js +1 -1
  189. package/dist/patterns/calendar/booking-tools/appointment-editor-panel.d.ts +46 -0
  190. package/dist/patterns/calendar/booking-tools/booking-tools-data.d.ts +48 -0
  191. package/dist/patterns/calendar/booking-tools/calendar-action-buttons.d.ts +55 -0
  192. package/dist/patterns/calendar/booking-tools/find-free-slots-panel.d.ts +35 -0
  193. package/dist/patterns/calendar/booking-tools/online-bookings-panel.d.ts +61 -0
  194. package/dist/patterns/calendar/booking-tools/waiting-list-panel.d.ts +58 -0
  195. package/dist/patterns/calendar/calendar-editor-discard-host.d.ts +20 -0
  196. package/dist/patterns/calendar/calendar-print-sheet.d.ts +16 -0
  197. package/dist/patterns/calendar/calendar-workspace.model.d.ts +7 -0
  198. package/dist/patterns/calendar/calendar.model.d.ts +9 -0
  199. package/dist/patterns/calendar/calendar.sheets.d.ts +59 -17
  200. package/dist/patterns/calendar/index.js +24 -20
  201. package/dist/patterns/patient-account-settings/index.js +1 -1
  202. package/dist/patterns/patient-check-in/index.js +1 -1
  203. package/dist/patterns/patient-portal/index.js +2 -2
  204. package/dist/patterns/patient-sign-in/index.js +2 -2
  205. package/dist/patterns/registration-form/index.js +1 -1
  206. package/dist/patterns/signature-request/index.js +1 -1
  207. package/dist/tokens.css +1 -1
  208. package/dist/waiting-list-panel/index.js +158 -0
  209. package/package.json +35 -2
  210. package/dist/_chunks/ai-summary-panel-B70S2lgC.js +0 -455
  211. package/dist/_chunks/calendar-appointment-editor-dialog-I5PfWudy.js +0 -13773
  212. package/dist/_chunks/color-picker-AcaWuKah.js +0 -745
  213. package/dist/_chunks/communications-panel-BKPHCiMB.js +0 -973
  214. package/dist/_chunks/entity-summary-CpNk6ybN.js +0 -266
  215. package/dist/_chunks/task-editor-DvwqPfFR.js +0 -1257
  216. package/dist/_chunks/use-appointment-details-read-6_OmOwUs.js +0 -2476
@@ -0,0 +1,158 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useRef as c, useState as J, useCallback as u, useEffect as F } from "react";
3
+ import { useTranslation as K } from "react-i18next";
4
+ import { d as s, b as L } from "../_chunks/toast-DQ1Zu1kk.js";
5
+ import { a as M } from "../_chunks/tooltip-uEBdD1-5.js";
6
+ import { C as Q } from "../_chunks/calendar-editor-guard-9fShhNIA.js";
7
+ import { S as V } from "../_chunks/calendar.sheets-Datc0-IT.js";
8
+ import { W as X } from "../_chunks/calendar-waiting-list-panel-Ckd6tSeu.js";
9
+ import { P as Y } from "../_chunks/privacy-mask-C2ZLKrMh.js";
10
+ import { H as Z } from "../_chunks/hourglass-BEAzW1wE.js";
11
+ const q = { open: () => {
12
+ }, close: () => {
13
+ } };
14
+ function ut({
15
+ data: C,
16
+ entries: d,
17
+ rows: H,
18
+ locale: N,
19
+ status: T,
20
+ onRetry: y,
21
+ privacy: v,
22
+ onPrivacyOff: B,
23
+ readOnly: i,
24
+ entryRequest: l,
25
+ onSchedule: I,
26
+ onFindSlots: O,
27
+ onOpenAppointment: R,
28
+ onSaveEntry: W,
29
+ onRemoveEntry: k,
30
+ onRestoreEntry: S,
31
+ onCreatePatient: j,
32
+ onOpenPatient: D,
33
+ onFilterUsed: U,
34
+ onAdvancedFilterToggled: _,
35
+ onWhatsAppClick: $
36
+ }) {
37
+ const { t: n } = K("ui"), P = c(null), [r, f] = J(null), m = c(null), g = u((e) => {
38
+ m.current = e ? e.id : "add", f({ entry: e });
39
+ }, []), w = c(null);
40
+ F(() => {
41
+ if (!(!l || w.current === l.nonce)) {
42
+ if (w.current = l.nonce, i) {
43
+ s(n("calendarWorkspace.inc1.readOnly.waitingBlocked"));
44
+ return;
45
+ }
46
+ g(l.entry);
47
+ }
48
+ }, [l, i, g, n]);
49
+ const p = c(!1), E = c(r);
50
+ E.current = r;
51
+ const z = u(() => f(null), []), x = c(r);
52
+ F(() => {
53
+ var b;
54
+ const e = x.current !== null;
55
+ if (x.current = r, !e || r !== null) return;
56
+ const o = m.current;
57
+ m.current = null;
58
+ const t = P.current, h = document.activeElement;
59
+ if (h && h !== document.body && (t != null && t.contains(h))) return;
60
+ (b = (o && o !== "add" ? t == null ? void 0 : t.querySelector(`[data-entry-edit="${o}"]`) : t == null ? void 0 : t.querySelector("[data-entry-add]")) ?? (t == null ? void 0 : t.querySelector('h2, [tabindex="-1"]'))) == null || b.focus();
61
+ }, [r]);
62
+ const A = u(
63
+ (e) => {
64
+ if (i) {
65
+ s(n("calendarWorkspace.inc1.readOnly.waitingBlocked"));
66
+ return;
67
+ }
68
+ if (p.current) return;
69
+ p.current = !0;
70
+ const o = E.current;
71
+ W(e).then(
72
+ () => f((t) => t === o ? null : t),
73
+ (t) => s(
74
+ t instanceof Error ? t.message : n("emptyState.error.title")
75
+ )
76
+ ).finally(() => {
77
+ p.current = !1;
78
+ });
79
+ },
80
+ [W, i, n]
81
+ ), G = u(
82
+ (e) => {
83
+ if (i) {
84
+ s(n("calendarWorkspace.inc1.readOnly.waitingBlocked"));
85
+ return;
86
+ }
87
+ const o = d.findIndex((t) => t.id === e.id);
88
+ k(e).then(
89
+ () => L(n("calendarWorkspace.inc1.waitingList.removed"), {
90
+ action: {
91
+ label: n("calendarWorkspace.inc1.waitingList.undo"),
92
+ onClick: () => {
93
+ S(e, o < 0 ? d.length : o).then(
94
+ () => L(
95
+ n("calendarWorkspace.inc1.waitingList.removeUndone")
96
+ ),
97
+ (t) => s(
98
+ t instanceof Error ? t.message : n("emptyState.error.title")
99
+ )
100
+ );
101
+ }
102
+ }
103
+ }),
104
+ (t) => s(
105
+ t instanceof Error ? t.message : n("emptyState.error.title")
106
+ )
107
+ );
108
+ },
109
+ [d, k, S, i, n]
110
+ );
111
+ return /* @__PURE__ */ a(M, { children: /* @__PURE__ */ a(Q, { value: C, children: /* @__PURE__ */ a(V, { value: q, children: /* @__PURE__ */ a(
112
+ "div",
113
+ {
114
+ ref: P,
115
+ "data-component": "waiting-list-rail-panel",
116
+ className: "ds:flex ds:h-full ds:min-h-0 ds:flex-col",
117
+ children: r != null && r.entry && v ? (
118
+ /* Editing an entry opens its patient and free text in fields. */
119
+ /* @__PURE__ */ a(
120
+ Y,
121
+ {
122
+ title: n("calendarWorkspace.waitingList.tool"),
123
+ icon: /* @__PURE__ */ a(Z, { "aria-hidden": "true" }),
124
+ onTurnOff: B
125
+ }
126
+ )
127
+ ) : /* @__PURE__ */ a(
128
+ X,
129
+ {
130
+ entries: d,
131
+ rows: H,
132
+ locale: N,
133
+ privacy: v,
134
+ status: T,
135
+ onRetry: y,
136
+ readOnly: i,
137
+ onPlaceWaiting: I,
138
+ onFindSlotsForWaiting: O,
139
+ onRemoveWaiting: G,
140
+ onOpenEntryForm: g,
141
+ entryForm: r,
142
+ onSaveEntry: A,
143
+ onCancelEntry: z,
144
+ onCreatePatient: j,
145
+ onOpenPatient: D,
146
+ onFilterUsed: U,
147
+ onAdvancedFilterToggled: _,
148
+ onWhatsAppClick: $,
149
+ onOpenAppointment: R
150
+ }
151
+ )
152
+ }
153
+ ) }) }) });
154
+ }
155
+ export {
156
+ ut as WaitingListRailPanel
157
+ };
158
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.135.0",
3
+ "version": "1.137.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -84,6 +84,30 @@
84
84
  "types": "./dist/patterns/alia-assistant/alia-asteroid-icon.d.ts",
85
85
  "import": "./dist/alia-asteroid-icon/index.js"
86
86
  },
87
+ "./booking-tools-data": {
88
+ "types": "./dist/patterns/calendar/booking-tools/booking-tools-data.d.ts",
89
+ "import": "./dist/booking-tools-data/index.js"
90
+ },
91
+ "./appointment-editor-panel": {
92
+ "types": "./dist/patterns/calendar/booking-tools/appointment-editor-panel.d.ts",
93
+ "import": "./dist/appointment-editor-panel/index.js"
94
+ },
95
+ "./find-free-slots-panel": {
96
+ "types": "./dist/patterns/calendar/booking-tools/find-free-slots-panel.d.ts",
97
+ "import": "./dist/find-free-slots-panel/index.js"
98
+ },
99
+ "./waiting-list-panel": {
100
+ "types": "./dist/patterns/calendar/booking-tools/waiting-list-panel.d.ts",
101
+ "import": "./dist/waiting-list-panel/index.js"
102
+ },
103
+ "./online-bookings-panel": {
104
+ "types": "./dist/patterns/calendar/booking-tools/online-bookings-panel.d.ts",
105
+ "import": "./dist/online-bookings-panel/index.js"
106
+ },
107
+ "./calendar-action-buttons": {
108
+ "types": "./dist/patterns/calendar/booking-tools/calendar-action-buttons.d.ts",
109
+ "import": "./dist/calendar-action-buttons/index.js"
110
+ },
87
111
  "./agent": {
88
112
  "types": "./dist/agent/index.d.ts",
89
113
  "import": "./dist/agent/index.js"
@@ -837,6 +861,14 @@
837
861
  "types": "./dist/components/communications-panel/index.d.ts",
838
862
  "import": "./dist/components/communications-panel/index.js"
839
863
  },
864
+ "./call-status-chip": {
865
+ "types": "./dist/components/call-status-chip/index.d.ts",
866
+ "import": "./dist/components/call-status-chip/index.js"
867
+ },
868
+ "./calls-panel": {
869
+ "types": "./dist/components/calls-panel/index.d.ts",
870
+ "import": "./dist/components/calls-panel/index.js"
871
+ },
840
872
  "./ai-summary-panel": {
841
873
  "types": "./dist/components/ai-summary-panel/index.d.ts",
842
874
  "import": "./dist/components/ai-summary-panel/index.js"
@@ -1156,7 +1188,7 @@
1156
1188
  },
1157
1189
  "scripts": {
1158
1190
  "dev": "vite",
1159
- "build": "vite build && npm run build:stylesheets && npm run build:theme-boot && npm run build:browser-support && npm run build:host-compat && npm run build:host-legacy && npm run build:types && npm run build:locales && npm run build:error-pages && npm run build:agent-catalog && npm run verify:build && npm run check:preflight-bleed && npm run check:exports && npm run check:blockable-names",
1191
+ "build": "vite build && npm run build:stylesheets && npm run build:theme-boot && npm run build:browser-support && npm run build:host-compat && npm run build:host-legacy && npm run build:types && npm run build:locales && npm run build:error-pages && npm run build:agent-catalog && npm run verify:build && npm run check:preflight-bleed && npm run check:exports && npm run check:blockable-names && npm run check:entry-weight -- --require-dist",
1160
1192
  "build:theme-boot": "node --experimental-strip-types scripts/build-theme-boot.mjs",
1161
1193
  "build:browser-support": "node scripts/build-browser-support.mjs",
1162
1194
  "build:stylesheets": "node scripts/build-stylesheets.mjs",
@@ -1164,6 +1196,7 @@
1164
1196
  "check:exports": "node scripts/check-exports-coverage.mjs",
1165
1197
  "build:error-pages": "node scripts/build-error-pages.mjs",
1166
1198
  "check:blockable-names": "node scripts/check-blockable-names.mjs",
1199
+ "check:entry-weight": "node scripts/check-entry-weight.mjs",
1167
1200
  "build:host-compat": "node scripts/build-host-compat.mjs",
1168
1201
  "build:host-legacy": "node -e \"require('node:fs').copyFileSync('src/tokens/host-legacy.css','dist/host-legacy.css')\"",
1169
1202
  "check:host-compat": "node scripts/build-host-compat.mjs --check",
@@ -1,455 +0,0 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as Pe, useId as xe, useRef as o, useImperativeHandle as Te, useState as M, useEffect as F, useCallback as O, useMemo as le } from "react";
3
- import { c as be } from "./index-D2ZczOXr.js";
4
- import { useTranslation as ce } from "react-i18next";
5
- import { u as Ne } from "./registry-DvAUVLHh.js";
6
- import { g as Ae } from "./get-error-message-DbFUzuja.js";
7
- import { A as Ce } from "./ai-permission-notice-C-xR2_iS.js";
8
- import { A as Ee } from "./ai-credits-exhausted-notice-Lws3113e.js";
9
- import { A as l } from "./alert-C4WKViaS.js";
10
- import { B as te } from "./button-DohK_Ak_.js";
11
- import { E as b } from "./empty-state-DwJ5YNzz.js";
12
- import { E as Re } from "./entity-summary-CpNk6ybN.js";
13
- import { P as ne } from "./panel-header-CbtlTe85.js";
14
- import { S as ie } from "./skeleton-tTWJpvAq.js";
15
- import { A as se } from "./astroid-BN4f5VXU.js";
16
- import { R as ke } from "./refresh-cw-DnI0cLFC.js";
17
- import { C as Be } from "./clock-Drd4Wtis.js";
18
- const De = {
19
- id: "ai-summary-panel",
20
- // 'confirm' backs grant_consent. generate and regenerate have no dedicated
21
- // capability in the closed vocabulary.
22
- capabilities: ["confirm"],
23
- state: {
24
- status: {
25
- type: "'consent-required' | 'loading' | 'ready' | 'stale' | 'insufficient-data' | 'credits-exhausted' | 'error'",
26
- descriptionKey: "ui.agent.aiSummaryPanel.state.status",
27
- description: "The face the panel shows.",
28
- read: (t) => t.getState().status
29
- },
30
- ageBand: {
31
- type: "'fresh' | 'old' | 'very-old' | null",
32
- descriptionKey: "ui.agent.aiSummaryPanel.state.ageBand",
33
- description: "How old the summary is: fresh (under 6 hours), old (6 to 24 hours) or very-old (over 24 hours). Null when there is no summary.",
34
- read: (t) => t.getState().ageBand
35
- },
36
- sectionCount: {
37
- type: "number",
38
- descriptionKey: "ui.agent.aiSummaryPanel.state.sectionCount",
39
- description: "How many sections the summary holds. A count only.",
40
- read: (t) => t.getState().sectionCount
41
- }
42
- },
43
- actions: {
44
- grant_consent: {
45
- safety: "write",
46
- openWorld: !0,
47
- idempotent: !0,
48
- errors: [
49
- "The panel is not asking for consent, is read-only or privacy mode is on.",
50
- "The host could not save the consent. The panel shows the host's message."
51
- ],
52
- descriptionKey: "ui.agent.aiSummaryPanel.actions.grantConsent",
53
- description: "Record that the patient was told and agrees, then ask for the first summary. The summary spends AI credits. Only call this when the user says the patient agreed. Settles with the host's answer.",
54
- invoke: (t) => t.grantConsent()
55
- },
56
- generate: {
57
- safety: "write",
58
- openWorld: !0,
59
- errors: [
60
- "The panel is not in the error or not-enough-data face, is read-only or privacy mode is on.",
61
- "A request is already in flight."
62
- ],
63
- descriptionKey: "ui.agent.aiSummaryPanel.actions.generate",
64
- description: "Ask for a summary again after an error or when data was added. Spends AI credits. Settles with the host's answer.",
65
- invoke: (t) => t.generate()
66
- },
67
- regenerate: {
68
- safety: "write",
69
- openWorld: !0,
70
- errors: [
71
- "The panel shows no summary, is read-only or privacy mode is on.",
72
- "A request is already in flight."
73
- ],
74
- descriptionKey: "ui.agent.aiSummaryPanel.actions.regenerate",
75
- description: "Replace the summary with a new one. Spends AI credits. Settles with the host's answer.",
76
- invoke: (t) => t.regenerate()
77
- }
78
- },
79
- domHooks: {
80
- root: {
81
- attr: "data-component",
82
- value: "ai-summary-panel",
83
- description: "Marks the AiSummaryPanel region."
84
- },
85
- instanceId: {
86
- attr: "data-component-id",
87
- sourceProp: "id",
88
- description: "Sourced from the id prop. Required to address a specific panel from the agent."
89
- }
90
- }
91
- }, qe = be(
92
- "ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:bg-[color:var(--card)]"
93
- ), W = "ds:px-[var(--spacing-md)] ds:pt-[var(--spacing-md)]", oe = 36e5, de = 6, ue = 24, He = {
94
- note: "aiSummaryPanel.minNote",
95
- "plan-entry": "aiSummaryPanel.minPlanEntry",
96
- appointment: "aiSummaryPanel.minAppointment",
97
- anamnesis: "aiSummaryPanel.minAnamnesis"
98
- };
99
- function Ie(t, s) {
100
- const d = new Date(s).getTime() - new Date(t).getTime();
101
- return Number.isFinite(d) ? d > ue * oe ? "very-old" : d > de * oe ? "old" : "fresh" : "fresh";
102
- }
103
- const Le = Pe(
104
- ({
105
- id: t,
106
- title: s,
107
- "aria-label": d,
108
- locale: y,
109
- nowIso: N,
110
- status: n,
111
- patientName: p,
112
- patientHref: A,
113
- generatedAtIso: g,
114
- stats: me,
115
- sections: C = [],
116
- minimumData: E,
117
- errorMessage: j,
118
- privacy: m = !1,
119
- readOnly: v = !1,
120
- onGrantConsent: R,
121
- onGenerate: k,
122
- onRetry: U,
123
- onOpenPatient: V,
124
- className: fe,
125
- ...he
126
- }, ye) => {
127
- const { t: a, i18n: pe } = ce("ui"), B = xe(), Y = s ?? a("aiSummaryPanel.title"), $ = y ?? pe.language, D = o(null);
128
- Te(ye, () => D.current, []);
129
- const [q, J] = M(!1), S = o(!1), [Q, X] = M(null), w = o(!0);
130
- F(() => (w.current = !0, () => {
131
- w.current = !1;
132
- }), []);
133
- const H = (n === "ready" || n === "stale") && g ? Ie(g, N) : null, P = o(R);
134
- P.current = R;
135
- const f = o(k);
136
- f.current = k;
137
- const x = O(
138
- async (r, i) => {
139
- if (!S.current) {
140
- S.current = !0, J(!0), X(null);
141
- try {
142
- await r();
143
- } catch (u) {
144
- throw w.current && X(Ae(u, i())), u;
145
- } finally {
146
- S.current = !1, w.current && J(!1);
147
- }
148
- }
149
- },
150
- []
151
- ), I = O(() => {
152
- let r = "grant";
153
- return x(
154
- async () => {
155
- var i, u;
156
- await ((i = P.current) == null ? void 0 : i.call(P)), r = "generate", await ((u = f.current) == null ? void 0 : u.call(f, { regenerate: !1 }));
157
- },
158
- () => a(r === "grant" ? "aiSummaryPanel.consentSaveFailed" : "aiSummaryPanel.errorTitle")
159
- );
160
- }, [x, a]), T = O(
161
- (r) => x(
162
- async () => {
163
- var i;
164
- await ((i = f.current) == null ? void 0 : i.call(f, { regenerate: r }));
165
- },
166
- () => a("aiSummaryPanel.errorTitle")
167
- ),
168
- [x, a]
169
- ), h = o({ status: n, ageBand: H, sectionCount: C.length });
170
- h.current = { status: n, ageBand: H, sectionCount: C.length };
171
- const L = o({ readOnly: v, privacy: m });
172
- L.current = { readOnly: v, privacy: m };
173
- const ge = le(() => {
174
- const r = async (i) => {
175
- if (L.current.privacy)
176
- throw new Error("The summary is hidden by privacy mode.");
177
- if (L.current.readOnly)
178
- throw new Error("The panel is read-only.");
179
- if (!i.includes(h.current.status))
180
- throw new Error(
181
- `The panel is in the ${h.current.status} face, which does not offer this.`
182
- );
183
- if (S.current) throw new Error("A request is already in flight.");
184
- };
185
- return {
186
- getState: () => ({
187
- status: h.current.status,
188
- ageBand: h.current.ageBand,
189
- sectionCount: h.current.sectionCount
190
- }),
191
- grantConsent: async () => {
192
- await r(["consent-required"]), await I();
193
- },
194
- generate: async () => {
195
- await r(["error", "insufficient-data"]), await T(!1);
196
- },
197
- regenerate: async () => {
198
- await r(["ready", "stale"]), await T(!0);
199
- }
200
- };
201
- }, [I, T]);
202
- Ne(De, ge, t);
203
- const Z = o(!1), z = o(!1);
204
- F(() => {
205
- const r = D.current;
206
- if (!r) return;
207
- const i = z.current && (!document.activeElement || document.activeElement === document.body);
208
- if (Z.current && !i) return;
209
- Z.current = !0;
210
- const u = m ? null : r.querySelector('[role="checkbox"]');
211
- if (n === "consent-required" && u && !i) {
212
- u.focus({ preventScroll: !0 });
213
- return;
214
- }
215
- const _ = r.querySelector("h2");
216
- _ && (_.setAttribute("tabindex", "-1"), _.focus({ preventScroll: !0, focusVisible: !1 }));
217
- }, [m, n]);
218
- const G = m ? a("aiSummaryPanel.privacyTitle") : q && (n === "ready" || n === "stale") ? a("aiSummaryPanel.loading") : {
219
- "consent-required": a("aiSummaryPanel.consentTitle"),
220
- loading: a("aiSummaryPanel.loading"),
221
- ready: a("aiSummaryPanel.statusReady"),
222
- stale: a("aiSummaryPanel.staleTitle"),
223
- "insufficient-data": a("aiSummaryPanel.insufficientTitle"),
224
- "credits-exhausted": a("aiSummaryPanel.creditsExhausted"),
225
- error: a("aiSummaryPanel.errorTitle")
226
- }[n], [ee, ve] = M("");
227
- F(() => {
228
- ve(G);
229
- }, [G]);
230
- const Se = (r) => {
231
- if (!V || !A) return;
232
- const i = r.target.closest("a");
233
- i && i.getAttribute("href") === A && (r.preventDefault(), V());
234
- }, ae = {
235
- ref: D,
236
- "data-component": "ai-summary-panel",
237
- "data-component-id": t,
238
- "data-status": m ? "privacy" : n,
239
- onFocusCapture: () => {
240
- z.current = !0;
241
- },
242
- onBlurCapture: (r) => {
243
- r.relatedTarget && (z.current = !1);
244
- },
245
- // The summary inside is its own region named by the title, so this
246
- // region carries the longer name: two regions may not share one.
247
- "aria-label": d ?? a("aiSummaryPanel.regionLabel"),
248
- className: [qe(), fe].filter(Boolean).join(" "),
249
- ...he
250
- };
251
- if (m)
252
- return /* @__PURE__ */ c("section", { ...ae, children: [
253
- /* @__PURE__ */ e(
254
- ne,
255
- {
256
- title: Y,
257
- icon: /* @__PURE__ */ e(se, { "aria-hidden": "true" }),
258
- headingId: B,
259
- divider: !0
260
- }
261
- ),
262
- /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: ee }),
263
- /* @__PURE__ */ e("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
264
- b,
265
- {
266
- variant: "first-use",
267
- size: "sm",
268
- title: a("aiSummaryPanel.privacyTitle"),
269
- description: a("aiSummaryPanel.privacyDescription")
270
- }
271
- ) })
272
- ] });
273
- const K = n === "ready" || n === "stale", we = K && !v && !!k, re = K && g ? /* @__PURE__ */ e(
274
- ze,
275
- {
276
- generatedAtIso: g,
277
- band: H ?? "fresh",
278
- lang: $
279
- }
280
- ) : null;
281
- return /* @__PURE__ */ c("section", { ...ae, children: [
282
- /* @__PURE__ */ e(
283
- ne,
284
- {
285
- title: Y,
286
- icon: /* @__PURE__ */ e(se, { "aria-hidden": "true" }),
287
- headingId: B,
288
- divider: !0,
289
- actions: we ? /* @__PURE__ */ e(
290
- te,
291
- {
292
- type: "button",
293
- size: "sm",
294
- intent: "ghost",
295
- startIcon: /* @__PURE__ */ e(ke, { "aria-hidden": "true" }),
296
- loading: q,
297
- onClick: () => {
298
- T(!0).catch(() => {
299
- });
300
- },
301
- children: a("aiSummaryPanel.regenerate")
302
- }
303
- ) : void 0
304
- }
305
- ),
306
- /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: ee }),
307
- /* @__PURE__ */ c(
308
- "div",
309
- {
310
- tabIndex: 0,
311
- role: "group",
312
- "aria-labelledby": B,
313
- onClick: Se,
314
- className: "ds:min-h-0 ds:flex-1 ds:overflow-y-auto ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
315
- children: [
316
- n === "consent-required" ? /* @__PURE__ */ e("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
317
- Ce,
318
- {
319
- granted: !1,
320
- canGrant: !v && !!R,
321
- pending: q,
322
- headingLevel: 3,
323
- className: "ds:[&_p:not(:last-child)]:mb-[var(--spacing-sm)]",
324
- copy: {
325
- title: a("aiSummaryPanel.consentTitle"),
326
- descriptionRequired: a("aiSummaryPanel.consentDescription"),
327
- confirmLabel: a("aiSummaryPanel.consentCheckbox"),
328
- grantButton: a("aiSummaryPanel.generate"),
329
- pendingLabel: a("aiSummaryPanel.loading")
330
- },
331
- onGrantConsent: () => {
332
- I().catch(() => {
333
- });
334
- }
335
- }
336
- ) }) : null,
337
- n === "loading" ? /* @__PURE__ */ e(
338
- "div",
339
- {
340
- "data-ai-summary-state": "loading",
341
- "aria-hidden": "true",
342
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]",
343
- children: ["a", "b", "c"].map((r, i) => /* @__PURE__ */ c(
344
- "div",
345
- {
346
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
347
- children: [
348
- /* @__PURE__ */ e(ie, { variant: "text", size: "sm", width: "40%", stagger: i }),
349
- /* @__PURE__ */ e(ie, { variant: "text", size: "sm", lines: 3, stagger: i })
350
- ]
351
- },
352
- r
353
- ))
354
- }
355
- ) : null,
356
- n === "stale" ? /* @__PURE__ */ e("div", { className: W, children: /* @__PURE__ */ c(l, { variant: "warning", announce: "off", "data-ai-summary-stale": "", children: [
357
- /* @__PURE__ */ e(l.Title, { as: "h3", children: a("aiSummaryPanel.staleTitle") }),
358
- /* @__PURE__ */ e(l.Description, { children: a("aiSummaryPanel.staleDescription") })
359
- ] }) }) : null,
360
- re ? /* @__PURE__ */ e("div", { className: W, children: re }) : null,
361
- K ? /* @__PURE__ */ e(
362
- Re,
363
- {
364
- showHeader: !1,
365
- entityName: p,
366
- entityHref: A,
367
- stats: me,
368
- sections: C,
369
- locale: $,
370
- disclaimer: a("aiSummaryPanel.disclaimer")
371
- }
372
- ) : null,
373
- n === "insufficient-data" ? /* @__PURE__ */ e(
374
- "div",
375
- {
376
- "data-ai-summary-state": "insufficient-data",
377
- className: "ds:p-[var(--spacing-md)]",
378
- children: /* @__PURE__ */ c(b, { variant: "first-use", size: "sm", headingLevel: 3, children: [
379
- /* @__PURE__ */ e(b.Title, { children: a("aiSummaryPanel.insufficientTitle") }),
380
- /* @__PURE__ */ e(b.Description, { children: a("aiSummaryPanel.insufficientDescription") }),
381
- E && E.length > 0 ? /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-disc ds:flex-col ds:gap-[var(--spacing-2xs)] ds:ps-[var(--spacing-md)] ds:text-start type-body-sm", children: E.map((r) => /* @__PURE__ */ e("li", { children: a(He[r]) }, r)) }) : null
382
- ] })
383
- }
384
- ) : null,
385
- n === "credits-exhausted" ? /* @__PURE__ */ e(
386
- "div",
387
- {
388
- "data-ai-summary-state": "credits-exhausted",
389
- className: "ds:p-[var(--spacing-md)]",
390
- children: /* @__PURE__ */ e(Ee, { headingLevel: 3, announce: "off" })
391
- }
392
- ) : null,
393
- n === "error" ? /* @__PURE__ */ e(
394
- "div",
395
- {
396
- "data-ai-summary-state": "error",
397
- className: "ds:p-[var(--spacing-md)]",
398
- children: /* @__PURE__ */ c(l, { variant: "error", announce: "off", children: [
399
- /* @__PURE__ */ e(l.Title, { as: "h3", children: a("aiSummaryPanel.errorTitle") }),
400
- j ? /* @__PURE__ */ e(l.Description, { children: j }) : null,
401
- U ? /* @__PURE__ */ e(l.Action, { children: /* @__PURE__ */ e(
402
- te,
403
- {
404
- type: "button",
405
- intent: "secondary",
406
- size: "sm",
407
- onClick: U,
408
- children: a("aiSummaryPanel.retry")
409
- }
410
- ) }) : null
411
- ] })
412
- }
413
- ) : null,
414
- Q ? /* @__PURE__ */ e("div", { className: W, children: /* @__PURE__ */ e(l, { variant: "error", "data-ai-summary-action-error": "", children: /* @__PURE__ */ e(l.Description, { children: Q }) }) }) : null
415
- ]
416
- }
417
- )
418
- ] });
419
- }
420
- );
421
- Le.displayName = "AiSummaryPanel";
422
- function ze({
423
- generatedAtIso: t,
424
- band: s,
425
- lang: d
426
- }) {
427
- const { t: y } = ce("ui"), N = le(() => {
428
- const p = new Date(t);
429
- return Number.isNaN(p.getTime()) ? "" : new Intl.DateTimeFormat(d, {
430
- dateStyle: "medium",
431
- timeStyle: "short"
432
- }).format(p);
433
- }, [t, d]);
434
- return /* @__PURE__ */ c(
435
- "div",
436
- {
437
- "data-ai-summary-age": s,
438
- className: `ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] type-meta ${s === "very-old" ? "ds:text-[color:var(--destructive)]" : s === "old" ? "ds:text-[color:var(--warning-foreground)]" : "ds:text-[color:var(--muted-foreground)]"}`,
439
- children: [
440
- /* @__PURE__ */ c("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
441
- /* @__PURE__ */ e(Be, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
442
- /* @__PURE__ */ e("span", { children: y("aiSummaryPanel.generatedAt", { date: N }) })
443
- ] }),
444
- s !== "fresh" ? /* @__PURE__ */ e("span", { children: y("aiSummaryPanel.ageNotice", {
445
- hours: s === "very-old" ? ue : de
446
- }) }) : null
447
- ]
448
- }
449
- );
450
- }
451
- export {
452
- Le as A,
453
- De as a
454
- };
455
- //# sourceMappingURL=ai-summary-panel-B70S2lgC.js.map