@alfadocs/ui-kit 1.41.0 → 1.42.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 (68) hide show
  1. package/dist/_chunks/{calendar-workspace-UllCER2k.js → calendar-workspace-qlxrxCqm.js} +1980 -1967
  2. package/dist/_chunks/{help-me-write-templates-GB70jnV9.js → help-me-write-templates-B-m7zgJa.js} +242 -231
  3. package/dist/_chunks/{notes-panel-_diLt8Cj.js → notes-panel-CRAovkjx.js} +84 -68
  4. package/dist/_chunks/{rich-text-editor-D7AKKAQ2.js → rich-text-editor-DUMeifwc.js} +1195 -1138
  5. package/dist/agent-catalog.json +1 -1
  6. package/dist/components/notes-panel/index.js +1 -1
  7. package/dist/components/notes-panel/notes-panel.d.ts +32 -0
  8. package/dist/components/rich-text-editor/index.js +1 -1
  9. package/dist/i18n/locales/ar.d.ts +1 -0
  10. package/dist/i18n/locales/ar.js +2 -1
  11. package/dist/i18n/locales/de.d.ts +1 -0
  12. package/dist/i18n/locales/de.js +2 -1
  13. package/dist/i18n/locales/el.d.ts +1 -0
  14. package/dist/i18n/locales/el.js +2 -1
  15. package/dist/i18n/locales/en.d.ts +1 -0
  16. package/dist/i18n/locales/en.js +2 -1
  17. package/dist/i18n/locales/es.d.ts +1 -0
  18. package/dist/i18n/locales/es.js +2 -1
  19. package/dist/i18n/locales/fr.d.ts +1 -0
  20. package/dist/i18n/locales/fr.js +2 -1
  21. package/dist/i18n/locales/hi.d.ts +1 -0
  22. package/dist/i18n/locales/hi.js +2 -1
  23. package/dist/i18n/locales/it.d.ts +1 -0
  24. package/dist/i18n/locales/it.js +2 -1
  25. package/dist/i18n/locales/ja.d.ts +1 -0
  26. package/dist/i18n/locales/ja.js +2 -1
  27. package/dist/i18n/locales/nl.d.ts +1 -0
  28. package/dist/i18n/locales/nl.js +2 -1
  29. package/dist/i18n/locales/pl.d.ts +1 -0
  30. package/dist/i18n/locales/pl.js +2 -1
  31. package/dist/i18n/locales/pt.d.ts +1 -0
  32. package/dist/i18n/locales/pt.js +2 -1
  33. package/dist/i18n/locales/ro.d.ts +1 -0
  34. package/dist/i18n/locales/ro.js +2 -1
  35. package/dist/i18n/locales/ru.d.ts +1 -0
  36. package/dist/i18n/locales/ru.js +2 -1
  37. package/dist/i18n/locales/sq.d.ts +1 -0
  38. package/dist/i18n/locales/sq.js +2 -1
  39. package/dist/i18n/locales/sv.d.ts +1 -0
  40. package/dist/i18n/locales/sv.js +2 -1
  41. package/dist/i18n/locales/tr.d.ts +1 -0
  42. package/dist/i18n/locales/tr.js +2 -1
  43. package/dist/i18n/locales/zh.d.ts +1 -0
  44. package/dist/i18n/locales/zh.js +2 -1
  45. package/dist/index.js +4 -4
  46. package/dist/locales/ar.json +2 -1
  47. package/dist/locales/de.json +2 -1
  48. package/dist/locales/el.json +2 -1
  49. package/dist/locales/en.json +2 -1
  50. package/dist/locales/es.json +2 -1
  51. package/dist/locales/fr.json +2 -1
  52. package/dist/locales/hi.json +2 -1
  53. package/dist/locales/it.json +2 -1
  54. package/dist/locales/ja.json +2 -1
  55. package/dist/locales/nl.json +2 -1
  56. package/dist/locales/pl.json +2 -1
  57. package/dist/locales/pt.json +2 -1
  58. package/dist/locales/ro.json +2 -1
  59. package/dist/locales/ru.json +2 -1
  60. package/dist/locales/sq.json +2 -1
  61. package/dist/locales/sv.json +2 -1
  62. package/dist/locales/tr.json +2 -1
  63. package/dist/locales/zh.json +2 -1
  64. package/dist/patterns/calendar/calendar.journey.d.ts +11 -0
  65. package/dist/patterns/calendar/calendar.sheets.d.ts +20 -0
  66. package/dist/patterns/calendar/index.js +1 -1
  67. package/dist/patterns/help-me-write-templates/index.js +1 -1
  68. package/package.json +1 -1
@@ -3206,7 +3206,8 @@
3206
3206
  "promptRequired": "Введите инструкции.",
3207
3207
  "deleteTitle": "Удалить «{{name}}»?",
3208
3208
  "deleteDescription": "Вся клиника потеряет этот шаблон. Уже написанные заметки не изменятся.",
3209
- "deleteConfirm": "Удалить шаблон"
3209
+ "deleteConfirm": "Удалить шаблон",
3210
+ "deleteError": "Не удалось удалить шаблон. Попробуйте ещё раз."
3210
3211
  }
3211
3212
  },
3212
3213
  "signatureRequest": {
@@ -3206,7 +3206,8 @@
3206
3206
  "promptRequired": "Shkruaj udhëzimet.",
3207
3207
  "deleteTitle": "Të fshihet “{{name}}”?",
3208
3208
  "deleteDescription": "Gjithë klinika e humb këtë shabllon. Shënimet e shkruara nuk ndryshojnë.",
3209
- "deleteConfirm": "Fshi shabllonin"
3209
+ "deleteConfirm": "Fshi shabllonin",
3210
+ "deleteError": "Shablloni nuk u fshi. Provo përsëri."
3210
3211
  }
3211
3212
  },
3212
3213
  "signatureRequest": {
@@ -3206,7 +3206,8 @@
3206
3206
  "promptRequired": "Ange instruktionerna.",
3207
3207
  "deleteTitle": "Ta bort ”{{name}}”?",
3208
3208
  "deleteDescription": "Hela kliniken förlorar den här mallen. Anteckningar som redan skrivits ändras inte.",
3209
- "deleteConfirm": "Ta bort mall"
3209
+ "deleteConfirm": "Ta bort mall",
3210
+ "deleteError": "Mallen kunde inte tas bort. Försök igen."
3210
3211
  }
3211
3212
  },
3212
3213
  "signatureRequest": {
@@ -3206,7 +3206,8 @@
3206
3206
  "promptRequired": "Talimatları gir.",
3207
3207
  "deleteTitle": "“{{name}}” silinsin mi?",
3208
3208
  "deleteDescription": "Tüm klinik bu şablonu kaybeder. Yazılmış notlar değişmez.",
3209
- "deleteConfirm": "Şablonu sil"
3209
+ "deleteConfirm": "Şablonu sil",
3210
+ "deleteError": "Şablon silinemedi. Tekrar dene."
3210
3211
  }
3211
3212
  },
3212
3213
  "signatureRequest": {
@@ -3206,7 +3206,8 @@
3206
3206
  "promptRequired": "请输入指令。",
3207
3207
  "deleteTitle": "删除“{{name}}”?",
3208
3208
  "deleteDescription": "整个诊所都将失去此模板。已写好的记录不会改变。",
3209
- "deleteConfirm": "删除模板"
3209
+ "deleteConfirm": "删除模板",
3210
+ "deleteError": "无法删除模板,请重试。"
3210
3211
  }
3211
3212
  },
3212
3213
  "signatureRequest": {
@@ -13,6 +13,7 @@
13
13
  import type { CalendarEventStatus } from '../../components/calendar';
14
14
  import type { Dispatch, SetStateAction } from 'react';
15
15
  import type { NotesPanelNote, NotesPanelProps, NotesPanelSubmission, AiConsentGate } from '../../components/notes-panel';
16
+ import type { PatientNotesSeam } from './calendar.sheets';
16
17
  import type { AvailabilityContext, BacklogFilter, BacklogItem, CalendarFreeSlot, CalendarRow, DisplaySettings, DraftSlot, EditorDraft, EditorPrefill, FindSlotsSeed, HistoryInput, RailFocus, SlotPatch, WaitingEntryDraft } from './calendar.model';
17
18
  import type { DeleteOptions, EditorDraftExtras, RecurringScope } from './calendar-workspace.model';
18
19
  import type { CalendarHistoryEntry, CalendarSignChannel, CalendarWaitingEntry } from './calendar.types';
@@ -168,5 +169,15 @@ export interface CalendarJourney {
168
169
  * `ic_internal_api_post_patient_ai_consent` grant route.
169
170
  */
170
171
  noteAiConsentFor?: (patientId: string) => AiConsentGate | undefined;
172
+ /**
173
+ * The notes composer's template-variable, Help-me-write and image-upload
174
+ * seams for one patient, read as the details panel opens them — one hook
175
+ * instead of six props, mirroring `noteAiConsentFor`. Omit any key (or the
176
+ * whole hook) and that affordance is not offered: the kit ships no
177
+ * variables, no bring-your-own Help-me-write surface and no image upload
178
+ * of its own. Typically backed by the host's own `useHelpMeWriteTemplates`
179
+ * call, built once per patient and passed straight through.
180
+ */
181
+ noteComposerExtrasFor?: (patientId: string) => Partial<Pick<PatientNotesSeam, 'variables' | 'validateVariable' | 'onVariableValidityChange' | 'renderHelpMeWrite' | 'onUploadImage' | 'onAiCreditsExhausted' | 'composerBefore' | 'composerAfter'>> | undefined;
171
182
  }
172
183
  //# sourceMappingURL=calendar.journey.d.ts.map
@@ -82,6 +82,26 @@ export interface PatientNotesSeam {
82
82
  * mics. Omitted → today's ungated behaviour (matches `NotesPanel`).
83
83
  */
84
84
  aiConsent?: AiConsentGate;
85
+ /** Template variables for the composer's "Insert variable" menu. See
86
+ * `RichTextEditor`. */
87
+ variables?: NotesPanelProps['variables'];
88
+ /** Decide whether a `[[TOKEN]]` is valid. See `RichTextEditor`. */
89
+ validateVariable?: NotesPanelProps['validateVariable'];
90
+ /** The invalid `[[TOKEN]]`s in the draft. See `RichTextEditor`. */
91
+ onVariableValidityChange?: NotesPanelProps['onVariableValidityChange'];
92
+ /** Bring your own Help-me-write surface (e.g. practice templates). See
93
+ * `RichTextEditor`. */
94
+ renderHelpMeWrite?: NotesPanelProps['renderHelpMeWrite'];
95
+ /** Upload an image yourself and resolve its URL. See `RichTextEditor`. */
96
+ onUploadImage?: NotesPanelProps['onUploadImage'];
97
+ /** An AI call ran out of credits. See `RichTextEditor`. */
98
+ onAiCreditsExhausted?: NotesPanelProps['onAiCreditsExhausted'];
99
+ /** Rendered just above the composer — e.g. the templates pattern's
100
+ * `undoNotice`. See `NotesPanel`. */
101
+ composerBefore?: NotesPanelProps['composerBefore'];
102
+ /** Rendered just after the composer — e.g. the templates pattern's
103
+ * `manager`. See `NotesPanel`. */
104
+ composerAfter?: NotesPanelProps['composerAfter'];
85
105
  /** The host's read. Absent while `onLoad` is present reads as loading. */
86
106
  status?: 'loading' | 'ready' | 'error';
87
107
  total?: number | null;
@@ -1,4 +1,4 @@
1
- import { C as s, a as r, b as E, c as P, D as S, d as o, S as C, V as t, W as d, e as A, i, m as n, r as D, u as W, f as _, g as c } from "../../_chunks/calendar-workspace-UllCER2k.js";
1
+ import { C as s, a as r, b as E, c as P, D as S, d as o, S as C, V as t, W as d, e as A, i, m as n, r as D, u as W, f as _, g as c } from "../../_chunks/calendar-workspace-qlxrxCqm.js";
2
2
  export {
3
3
  s as CALENDAR_PREFERENCE_KEYS,
4
4
  r as CalendarDataProvider,
@@ -1,4 +1,4 @@
1
- import { A as s, a as t, b as r, H as i, c as p, u as l } from "../../_chunks/help-me-write-templates-GB70jnV9.js";
1
+ import { A as s, a as t, b as r, H as i, c as p, u as l } from "../../_chunks/help-me-write-templates-B-m7zgJa.js";
2
2
  export {
3
3
  s as AiCreditsExhaustedError,
4
4
  t as AiCreditsExhaustedNotice,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.41.0",
3
+ "version": "1.42.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",