@alfadocs/ui-kit 1.129.0 → 1.130.1

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 (88) hide show
  1. package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js +13663 -0
  2. package/dist/_chunks/contact-round-DiSvB3LP.js +18 -0
  3. package/dist/_chunks/{entity-summary-Dzk54yom.js → entity-summary-KHM0PnSI.js} +55 -67
  4. package/dist/_chunks/{header-settings-DsvheAOt.js → header-settings-ZGvYAuKF.js} +101 -97
  5. package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js → marketplace-app-shell-D_HA8CKx.js} +2 -2
  6. package/dist/_chunks/{muscle-scheme-CHrjv7p2.js → muscle-scheme-DdIdm8Gw.js} +2 -1
  7. package/dist/_chunks/{patient-search-D_S7joff.js → patient-search-OAwFgOW3.js} +2 -2
  8. package/dist/_chunks/{toast-BNoN8Qjh.js → toast-DQ1Zu1kk.js} +264 -251
  9. package/dist/_chunks/use-appointment-details-read-BrykoTOR.js +2475 -0
  10. package/dist/agent-catalog.json +1 -1
  11. package/dist/browser-support.js +1 -1
  12. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +7 -0
  13. package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts +2 -0
  14. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +5 -1
  15. package/dist/components/appointment-details-panel/index.js +1 -1
  16. package/dist/components/entity-summary/index.js +1 -1
  17. package/dist/components/header-settings/index.js +1 -1
  18. package/dist/components/muscle-scheme/index.js +1 -1
  19. package/dist/components/patient-search/index.js +1 -1
  20. package/dist/components/toast/index.js +1 -1
  21. package/dist/core.css +1 -1
  22. package/dist/i18n/locales/ar.d.ts +13 -4
  23. package/dist/i18n/locales/ar.js +16 -7
  24. package/dist/i18n/locales/de.d.ts +13 -4
  25. package/dist/i18n/locales/de.js +16 -7
  26. package/dist/i18n/locales/el.d.ts +13 -4
  27. package/dist/i18n/locales/el.js +16 -7
  28. package/dist/i18n/locales/en.d.ts +13 -4
  29. package/dist/i18n/locales/en.js +13 -4
  30. package/dist/i18n/locales/es.d.ts +13 -4
  31. package/dist/i18n/locales/es.js +16 -7
  32. package/dist/i18n/locales/fr.d.ts +13 -4
  33. package/dist/i18n/locales/fr.js +16 -7
  34. package/dist/i18n/locales/hi.d.ts +13 -4
  35. package/dist/i18n/locales/hi.js +16 -7
  36. package/dist/i18n/locales/it.d.ts +13 -4
  37. package/dist/i18n/locales/it.js +16 -7
  38. package/dist/i18n/locales/ja.d.ts +13 -4
  39. package/dist/i18n/locales/ja.js +16 -7
  40. package/dist/i18n/locales/nl.d.ts +13 -4
  41. package/dist/i18n/locales/nl.js +16 -7
  42. package/dist/i18n/locales/pl.d.ts +13 -4
  43. package/dist/i18n/locales/pl.js +16 -7
  44. package/dist/i18n/locales/pt.d.ts +13 -4
  45. package/dist/i18n/locales/pt.js +16 -7
  46. package/dist/i18n/locales/ro.d.ts +13 -4
  47. package/dist/i18n/locales/ro.js +16 -7
  48. package/dist/i18n/locales/ru.d.ts +13 -4
  49. package/dist/i18n/locales/ru.js +16 -7
  50. package/dist/i18n/locales/sq.d.ts +13 -4
  51. package/dist/i18n/locales/sq.js +16 -7
  52. package/dist/i18n/locales/sv.d.ts +13 -4
  53. package/dist/i18n/locales/sv.js +16 -7
  54. package/dist/i18n/locales/tr.d.ts +13 -4
  55. package/dist/i18n/locales/tr.js +16 -7
  56. package/dist/i18n/locales/zh.d.ts +13 -4
  57. package/dist/i18n/locales/zh.js +16 -7
  58. package/dist/index.js +7 -7
  59. package/dist/locales/ar.json +16 -7
  60. package/dist/locales/de.json +16 -7
  61. package/dist/locales/el.json +16 -7
  62. package/dist/locales/en.json +13 -4
  63. package/dist/locales/es.json +16 -7
  64. package/dist/locales/fr.json +16 -7
  65. package/dist/locales/hi.json +16 -7
  66. package/dist/locales/it.json +16 -7
  67. package/dist/locales/ja.json +16 -7
  68. package/dist/locales/nl.json +16 -7
  69. package/dist/locales/pl.json +16 -7
  70. package/dist/locales/pt.json +16 -7
  71. package/dist/locales/ro.json +16 -7
  72. package/dist/locales/ru.json +16 -7
  73. package/dist/locales/sq.json +16 -7
  74. package/dist/locales/sv.json +16 -7
  75. package/dist/locales/tr.json +16 -7
  76. package/dist/locales/zh.json +16 -7
  77. package/dist/patterns/calendar/calendar-appointment-details.d.ts +10 -1
  78. package/dist/patterns/calendar/calendar-workspace.d.ts +27 -0
  79. package/dist/patterns/calendar/calendar-workspace.model.d.ts +5 -6
  80. package/dist/patterns/calendar/calendar.model.d.ts +57 -8
  81. package/dist/patterns/calendar/calendar.sheets.d.ts +46 -3
  82. package/dist/patterns/calendar/calendar.types.d.ts +13 -5
  83. package/dist/patterns/calendar/index.js +1 -1
  84. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  85. package/dist/tokens.css +1 -1
  86. package/package.json +1 -1
  87. package/dist/_chunks/calendar-appointment-editor-dialog-DnPADcj9.js +0 -13438
  88. package/dist/_chunks/use-appointment-details-read-n7kycxrm.js +0 -2439
@@ -24,7 +24,7 @@
24
24
  import { type ReactNode } from 'react';
25
25
  import { AppointmentHistoryTimeline } from '../../components/appointment-details-panel/appointment-details-panel.history';
26
26
  import { IndicatorChips } from '../../components/appointment-details-panel/appointment-details-panel.identity';
27
- import type { CalendarEditorCapabilities } from './calendar.model';
27
+ import type { CalendarEditorCapabilities, FirstVisitAnswer } from './calendar.model';
28
28
  import type { CalendarEditorSeries } from './calendar-editor-hydration';
29
29
  import { type CalendarResource } from '../../components/calendar';
30
30
  import { type NotesPanelNote, type NotesPanelProps, type NotesPanelSubmission, type AiConsentGate } from '../../components/notes-panel';
@@ -189,6 +189,11 @@ export declare function DurationCombobox({ value, onChange, }: {
189
189
  export type ReminderChannel = 'whatsapp' | 'sms' | 'email';
190
190
  /** The Final State's full set — the default when a host says nothing. */
191
191
  export declare const REMINDER_CHANNELS: readonly ReminderChannel[];
192
+ /** The earliest same-day reminder per channel (B8). */
193
+ export interface SameDayReminders {
194
+ sms?: Date | string;
195
+ email?: Date | string;
196
+ }
192
197
  /** The platform facts the Increment 1 editor adds — every field optional,
193
198
  * so a host that passes nothing gets the Final State form unchanged. */
194
199
  export interface EditorPlatformOptions {
@@ -294,12 +299,50 @@ export interface EditorPlatformOptions {
294
299
  * "(disabled)" suffix on the label (audit C10). */
295
300
  reminderCapability?: boolean;
296
301
  /** The practice's default reminder channels (Practice settings, patient
297
- * notices). The reminder boxes start from them: SMS off and email on
298
- * when absent. A patient who cannot take a channel still disables it. */
302
+ * notices). A new appointment and an online booking being completed
303
+ * start the reminder boxes from them; a channel the host does not pass
304
+ * starts OFF (the move confirm reads it the same way). An edit keeps
305
+ * the ticks saved with the appointment (`EditorPrefill.emailReminder`
306
+ * and `smsReminder`; one left out is not sent on a save the user did
307
+ * not change it in, so the host keeps its stored value). A patient who
308
+ * cannot take a channel still disables it. */
299
309
  defaultReminders?: {
300
310
  sms?: boolean;
301
311
  email?: boolean;
302
312
  };
313
+ /** B12: propose the first-visit answer on a NEW appointment once a
314
+ * patient is chosen, and again when the date changes, from the patient's
315
+ * history. Resolve `unknown` when the host cannot tell. A proposal never
316
+ * overrides an answer the user already picked, and a failure or a late
317
+ * answer for an earlier patient is ignored. Omit it and the answer
318
+ * starts, and stays, on unknown until the user answers. */
319
+ proposeFirstVisit?: (query: {
320
+ patientId: string;
321
+ date: Date;
322
+ }) => FirstVisitAnswer | Promise<FirstVisitAnswer>;
323
+ /** B8: when the chosen patient already has an appointment that day with
324
+ * a reminder, answer the time of the EARLIEST one per channel (a
325
+ * `Date` or an ISO string), or leave a channel out. Asked when the
326
+ * patient or the day changes, for a channel only if its practice
327
+ * default is on (`defaultReminders`). The editor then compares the
328
+ * form's own time: a LATER visit has that channel's tick removed with a
329
+ * message, an EARLIER one keeps it with a message. On an edit, leave
330
+ * the edited appointment (`eventId`) out of the answer. A failure
331
+ * shows nothing. Omit it and neither message appears. */
332
+ sameDayReminders?: (query: {
333
+ patientId: string;
334
+ date: Date;
335
+ eventId?: string;
336
+ }) => SameDayReminders | Promise<SameDayReminders>;
337
+ /** B10: the practice's signature credits. With none left, a NEW
338
+ * appointment whose patient has unsigned required documents says so and
339
+ * links to `buyHref` (opens in a new tab), and the sign-mode choice is withheld, since sending a
340
+ * request uses a credit. Omit it and the editor shows neither the
341
+ * message nor any limit on the sign mode. */
342
+ signatureCredits?: {
343
+ available: number;
344
+ buyHref: string;
345
+ };
303
346
  /** Show "First visit" only once a patient is chosen (audit C11). */
304
347
  firstVisitRequiresPatient?: boolean;
305
348
  /** Give each price-list row its catalogue phases, and lock a row the
@@ -110,22 +110,25 @@ export interface PracticeCalendarSettings {
110
110
  *
111
111
  * `moved` is the platform's ONE "appointment moved" switch (it replaces the
112
112
  * old per-channel pair). The move confirm's SMS and email ticks then follow
113
- * `reminderSms` and `reminderEmail`. Not offered yet (a later package owns
114
- * it): the confirmation SMS sent when an appointment is created.
113
+ * `reminderSms` and `reminderEmail`. `confirmationSms` is the SMS the
114
+ * platform sends when an appointment is created; the kit only edits the
115
+ * switch and sends nothing.
115
116
  */
116
117
  export interface PracticePatientNotices {
117
118
  reminderSms?: boolean;
118
119
  reminderEmail?: boolean;
120
+ confirmationSms?: boolean;
119
121
  moved?: boolean;
120
122
  }
121
123
  /**
122
- * Operator notices, sent when a PATIENT cancels or changes. A key left out
123
- * gets no switch. Not offered yet (a later package owns it): the notice
124
- * when a USER of the practice creates, changes or cancels.
124
+ * Operator notices. `onCancel` and `onChange` are sent when a PATIENT
125
+ * cancels or changes; `onUserChange` is the one notice sent when a USER of
126
+ * the practice creates, changes or cancels. A key left out gets no switch.
125
127
  */
126
128
  export interface PracticeOperatorNotices {
127
129
  onCancel?: boolean;
128
130
  onChange?: boolean;
131
+ onUserChange?: boolean;
129
132
  }
130
133
  /** The WhatsApp default message and what the host allows in it. */
131
134
  export interface PracticeWhatsappMessage {
@@ -280,6 +283,11 @@ export interface CalendarCare {
280
283
  /** Catalogue phases (platform `care.carePhases`) — a price-list row
281
284
  * books a subset of them, exactly as a plan line does. */
282
285
  phases?: string[];
286
+ /** Each phase's share of `durationMin`, in percent, keyed by the phase
287
+ * label (platform `phase.durationPercentage`). With it, an appointment
288
+ * that books some phases takes the sum of their shares as its length
289
+ * (B22); without it, the whole care length. */
290
+ phaseShares?: Record<string, number>;
283
291
  }
284
292
  /**
285
293
  * The card's care line (platform `getAppointmentNameSuffixAndPopoverName`):
@@ -1,4 +1,4 @@
1
- import { A as s, C as r, a as t, b as S, c as E, d as n, e as o, f as i, D as A, g as C, S as d, V as P, W as D, h as l, i as _, m as O, r as c, u as p, j as L, k as R } from "../../_chunks/calendar-appointment-editor-dialog-DnPADcj9.js";
1
+ import { A as s, C as r, a as t, b as S, c as E, d as n, e as o, f as i, D as A, g as C, S as d, V as P, W as D, h as l, i as _, m as O, r as c, u as p, j as L, k as R } from "../../_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js";
2
2
  export {
3
3
  s as AppointmentEditorDialog,
4
4
  r as CALENDAR_PREFERENCE_KEYS,
@@ -1,4 +1,4 @@
1
- import { C as l, M as o } from "../../_chunks/marketplace-app-shell-BOBWmzoT.js";
1
+ import { C as l, M as o } from "../../_chunks/marketplace-app-shell-D_HA8CKx.js";
2
2
  export {
3
3
  l as ConnectWithAlfadocs,
4
4
  o as MarketplaceAppShell