@alfadocs/ui-kit 1.139.0 → 1.141.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 (155) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-BgfBnjp0.js → anamnesis-summary-rows-YJGs2uWD.js} +2 -2
  2. package/dist/_chunks/{appointment-card-CaxFXtSn.js → appointment-card-r0OZm77v.js} +170 -168
  3. package/dist/_chunks/appointment-timeline-Bs-rTMzi.js +689 -0
  4. package/dist/_chunks/{appointment-tray-DPpeR9JT.js → appointment-tray-t_ltp-Yi.js} +2 -2
  5. package/dist/_chunks/{balance-badge-cell-CRrIv2hy.js → balance-badge-cell-CRStPNDd.js} +2 -2
  6. package/dist/_chunks/{bill-line-table-DCqxhode.js → bill-line-table-DTqXdBED.js} +2 -2
  7. package/dist/_chunks/{bmi-calculator-rri5vvMt.js → bmi-calculator-rq3ZsKp0.js} +2 -2
  8. package/dist/_chunks/{calendar-appointment-editor-dialog-GdnaPIOV.js → calendar-appointment-editor-dialog-CuXpgLCw.js} +5 -5
  9. package/dist/_chunks/{calendar-waiting-list-panel-CkZBAv_E.js → calendar-waiting-list-panel-BNQrUndD.js} +2 -2
  10. package/dist/_chunks/{calendar.sheets-B0jP2Yt0.js → calendar.sheets-DcW8A3DI.js} +3 -3
  11. package/dist/_chunks/calls-panel-CJNQm7r8.js +1446 -0
  12. package/dist/_chunks/{cycle-calculator-WFhMfJHt.js → cycle-calculator-Cb66X2Pf.js} +2 -2
  13. package/dist/_chunks/{data-grid-bQ6iFm10.js → data-grid-CRUSZcVT.js} +2 -2
  14. package/dist/_chunks/{default-tabs-Dm_vk6hd.js → default-tabs-CRbVCDSU.js} +3 -3
  15. package/dist/_chunks/{due-date-calculator-CALlODZe.js → due-date-calculator-Dlqegxx9.js} +2 -2
  16. package/dist/_chunks/{fetal-weight-D0KofJJw.js → fetal-weight-DWj-_ME8.js} +2 -2
  17. package/dist/_chunks/{hcg-doubling-Dhdt3Jyd.js → hcg-doubling-Dqbj6PQj.js} +2 -2
  18. package/dist/_chunks/{invoice-upload-list-Dz3CXHPP.js → invoice-upload-list-BR6vycF7.js} +3 -3
  19. package/dist/_chunks/{kit-extensions-BB_ksnVl.js → kit-extensions-QddOSnIq.js} +6 -6
  20. package/dist/_chunks/{link-cell-renderer-CSA0KKPe.js → link-cell-renderer-hAJplRFF.js} +2 -2
  21. package/dist/_chunks/medication-line-BohqbCYD.js +238 -0
  22. package/dist/_chunks/{notes-panel-CnmQqhwq.js → notes-panel-C4HSUudf.js} +2 -2
  23. package/dist/_chunks/{number-input-DUSvP7Dq.js → number-input-Bi5Yk6PX.js} +135 -133
  24. package/dist/_chunks/{optical-prescription-C4jpDFOE.js → optical-prescription-GzeK_2cf.js} +2 -2
  25. package/dist/_chunks/{patient-account-settings-DfEPHmCh.js → patient-account-settings-nSvNKKOL.js} +2 -2
  26. package/dist/_chunks/{patient-check-in-resume-TWs8CPQr.js → patient-check-in-resume-Cj2wg_NQ.js} +4 -4
  27. package/dist/_chunks/{patient-details-DQTxSWY4.js → patient-details-D0PjzALT.js} +2 -2
  28. package/dist/_chunks/{patient-field-row-CXuWQeQJ.js → patient-field-row-DlpIModg.js} +2 -2
  29. package/dist/_chunks/{patient-summary-card-j5u7c5Us.js → patient-summary-card-BP_K7g_q.js} +2 -2
  30. package/dist/_chunks/{portal-details-VfeOI4PB.js → portal-details-Cnyqf9kY.js} +2 -2
  31. package/dist/_chunks/{portal-documents-hGHlwmbv.js → portal-documents-g109Dl0O.js} +2 -2
  32. package/dist/_chunks/{portal-parts-C99CreYO.js → portal-parts-DgDFuED8.js} +2 -2
  33. package/dist/_chunks/{pregnancy-dating-C-3NLI6K.js → pregnancy-dating-a6WIg4oy.js} +2 -2
  34. package/dist/_chunks/{pregnancy-weight-gain-DkGcEc_l.js → pregnancy-weight-gain-DmrVHk9y.js} +2 -2
  35. package/dist/_chunks/prescription-history-Bp_JHhdF.js +1719 -0
  36. package/dist/_chunks/{print-sheet-CSeqkM3_.js → print-sheet-gaxObGcm.js} +110 -100
  37. package/dist/_chunks/{rich-text-editor-DFsH5RAj.js → rich-text-editor-orJ-hPgm.js} +1323 -1308
  38. package/dist/_chunks/{toolbar-Dz_hAUIZ.js → toolbar-B7UHCMSr.js} +2 -2
  39. package/dist/_chunks/{unit-converter-CBy7S4Tl.js → unit-converter-OBhSDXee.js} +2 -2
  40. package/dist/_chunks/{use-appointment-details-read-CBSpX4DI.js → use-appointment-details-read-DeQnmmZw.js} +2 -2
  41. package/dist/agent-catalog.json +141 -16
  42. package/dist/agent-i18n/en.json +11 -5
  43. package/dist/appointment-editor-panel/index.js +1 -1
  44. package/dist/browser-support.js +1 -1
  45. package/dist/components/appointment-card/appointment-card.d.ts +4 -0
  46. package/dist/components/appointment-card/index.js +2 -2
  47. package/dist/components/appointment-details-panel/index.js +1 -1
  48. package/dist/components/appointment-timeline/appointment-timeline.d.ts +51 -0
  49. package/dist/components/appointment-timeline/index.d.ts +1 -1
  50. package/dist/components/appointment-timeline/index.js +1 -1
  51. package/dist/components/bill-line-table/index.js +1 -1
  52. package/dist/components/bill-table/index.js +1 -1
  53. package/dist/components/bmi-calculator/index.js +1 -1
  54. package/dist/components/calls-panel/calls-panel.d.ts +91 -0
  55. package/dist/components/calls-panel/index.d.ts +1 -1
  56. package/dist/components/calls-panel/index.js +1 -1
  57. package/dist/components/cycle-calculator/index.js +1 -1
  58. package/dist/components/data-grid/index.js +2 -2
  59. package/dist/components/data-table/index.js +1 -1
  60. package/dist/components/due-date-calculator/index.js +1 -1
  61. package/dist/components/fetal-weight/index.js +1 -1
  62. package/dist/components/hcg-doubling/index.js +1 -1
  63. package/dist/components/invoice-upload-list/index.js +1 -1
  64. package/dist/components/medication-line/index.js +1 -1
  65. package/dist/components/medication-line/medication-line.d.ts +6 -0
  66. package/dist/components/notes-panel/index.js +1 -1
  67. package/dist/components/number-input/index.js +1 -1
  68. package/dist/components/optical-prescription/index.js +1 -1
  69. package/dist/components/patient-details/index.js +1 -1
  70. package/dist/components/patient-summary-card/index.js +1 -1
  71. package/dist/components/patient-table/index.js +1 -1
  72. package/dist/components/pregnancy-dating/index.js +1 -1
  73. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  74. package/dist/components/print-sheet/index.js +1 -1
  75. package/dist/components/print-sheet/print-sheet.d.ts +7 -0
  76. package/dist/components/rich-text-editor/index.js +2 -2
  77. package/dist/components/unit-converter/index.js +1 -1
  78. package/dist/core.css +1 -1
  79. package/dist/find-free-slots-panel/index.js +1 -1
  80. package/dist/host-compat.css +18 -1
  81. package/dist/i18n/locales/ar.d.ts +72 -10
  82. package/dist/i18n/locales/ar.js +76 -17
  83. package/dist/i18n/locales/de.d.ts +72 -10
  84. package/dist/i18n/locales/de.js +76 -17
  85. package/dist/i18n/locales/el.d.ts +72 -10
  86. package/dist/i18n/locales/el.js +79 -17
  87. package/dist/i18n/locales/en.d.ts +64 -10
  88. package/dist/i18n/locales/en.js +71 -17
  89. package/dist/i18n/locales/es.d.ts +72 -10
  90. package/dist/i18n/locales/es.js +76 -17
  91. package/dist/i18n/locales/fr.d.ts +72 -10
  92. package/dist/i18n/locales/fr.js +76 -17
  93. package/dist/i18n/locales/hi.d.ts +72 -10
  94. package/dist/i18n/locales/hi.js +79 -17
  95. package/dist/i18n/locales/it.d.ts +72 -10
  96. package/dist/i18n/locales/it.js +76 -17
  97. package/dist/i18n/locales/ja.d.ts +72 -10
  98. package/dist/i18n/locales/ja.js +79 -17
  99. package/dist/i18n/locales/nl.d.ts +72 -10
  100. package/dist/i18n/locales/nl.js +76 -17
  101. package/dist/i18n/locales/pl.d.ts +72 -10
  102. package/dist/i18n/locales/pl.js +79 -17
  103. package/dist/i18n/locales/pt.d.ts +72 -10
  104. package/dist/i18n/locales/pt.js +76 -17
  105. package/dist/i18n/locales/ro.d.ts +72 -10
  106. package/dist/i18n/locales/ro.js +76 -17
  107. package/dist/i18n/locales/ru.d.ts +72 -10
  108. package/dist/i18n/locales/ru.js +76 -17
  109. package/dist/i18n/locales/sq.d.ts +72 -10
  110. package/dist/i18n/locales/sq.js +79 -17
  111. package/dist/i18n/locales/sv.d.ts +72 -10
  112. package/dist/i18n/locales/sv.js +76 -17
  113. package/dist/i18n/locales/tr.d.ts +72 -10
  114. package/dist/i18n/locales/tr.js +76 -17
  115. package/dist/i18n/locales/zh.d.ts +72 -10
  116. package/dist/i18n/locales/zh.js +76 -17
  117. package/dist/index.js +37 -37
  118. package/dist/locales/ar.json +79 -17
  119. package/dist/locales/de.json +79 -17
  120. package/dist/locales/el.json +79 -17
  121. package/dist/locales/en.json +71 -17
  122. package/dist/locales/es.json +79 -17
  123. package/dist/locales/fr.json +79 -17
  124. package/dist/locales/hi.json +79 -17
  125. package/dist/locales/it.json +79 -17
  126. package/dist/locales/ja.json +79 -17
  127. package/dist/locales/nl.json +79 -17
  128. package/dist/locales/pl.json +79 -17
  129. package/dist/locales/pt.json +79 -17
  130. package/dist/locales/ro.json +79 -17
  131. package/dist/locales/ru.json +79 -17
  132. package/dist/locales/sq.json +79 -17
  133. package/dist/locales/sv.json +79 -17
  134. package/dist/locales/tr.json +79 -17
  135. package/dist/locales/zh.json +79 -17
  136. package/dist/online-bookings-panel/index.js +1 -1
  137. package/dist/patterns/anamnesis/index.js +1 -1
  138. package/dist/patterns/calendar/index.js +2 -2
  139. package/dist/patterns/patient-account-settings/index.js +1 -1
  140. package/dist/patterns/patient-check-in/index.js +1 -1
  141. package/dist/patterns/patient-portal/index.js +2 -2
  142. package/dist/patterns/prescription/index.d.ts +1 -1
  143. package/dist/patterns/prescription/index.js +1 -1
  144. package/dist/patterns/prescription/prescription-composer-item.d.ts +8 -1
  145. package/dist/patterns/prescription/prescription-composer.d.ts +14 -9
  146. package/dist/patterns/prescription/prescription-sheet.d.ts +23 -4
  147. package/dist/patterns/prescription/prescription-types.d.ts +35 -10
  148. package/dist/patterns/prescription/prescription-validation.d.ts +17 -11
  149. package/dist/tokens.css +1 -1
  150. package/dist/waiting-list-panel/index.js +2 -2
  151. package/package.json +1 -1
  152. package/dist/_chunks/appointment-timeline-BEwgbYyG.js +0 -455
  153. package/dist/_chunks/calls-panel-CtxJAzkJ.js +0 -1094
  154. package/dist/_chunks/medication-line-CHdlh-F7.js +0 -222
  155. package/dist/_chunks/prescription-history-748qDVwZ.js +0 -1544
@@ -1,35 +1,41 @@
1
- import type { PrescriptionDraft, PrescriptionItem, PrescriptionLinkOption } from './prescription-types';
2
- /** Why a field was refused. `invalid` is a link that is malformed or is not
3
- * one of the patient's treatments or care plans. */
1
+ import type { PrescriptionDraft, PrescriptionItem, PrescriptionTreatmentOption } from './prescription-types';
2
+ /** Why a field was refused. `invalid` is a treatment that is not one of the
3
+ * patient's treatments. */
4
4
  export type PrescriptionFieldError = 'required' | 'invalid';
5
5
  export interface PrescriptionItemErrors {
6
6
  medicationId?: 'required';
7
7
  dosage?: 'required';
8
+ /** `required`: empty or not a number. `invalid`: below 1 or not whole. */
9
+ quantity?: PrescriptionFieldError;
8
10
  }
9
11
  export interface PrescriptionDraftErrors {
10
12
  patientId?: 'required';
11
13
  prescriberId?: 'required';
12
- link?: PrescriptionFieldError;
14
+ treatmentId?: PrescriptionFieldError;
13
15
  /** No line names a medication. */
14
16
  items?: 'required';
15
17
  /** One entry per draft line, in order; `undefined` for a valid line. */
16
18
  itemErrors?: (PrescriptionItemErrors | undefined)[];
17
19
  }
18
20
  export interface PrescriptionValidationOptions {
19
- /** A treatment or a care plan must be chosen. Default true. */
20
- requireLink?: boolean;
21
- /** The chosen patient's treatments and care plans. When given, a link
22
- * that is not in the list is `invalid`. */
23
- linkOptions?: readonly PrescriptionLinkOption[];
21
+ /** The chosen patient's treatments. When given, a treatment that is not in
22
+ * the list is `invalid`. */
23
+ treatmentOptions?: readonly PrescriptionTreatmentOption[];
24
+ /**
25
+ * The patient `treatmentOptions` belongs to. While the host reloads the list
26
+ * after a patient change, the list is still the previous patient's: when this
27
+ * differs from the draft's `patientId`, a non-empty treatment is `invalid`.
28
+ */
29
+ treatmentOptionsPatientId?: string;
24
30
  }
25
31
  /** True for a line the user has not touched: nothing to validate or save. */
26
32
  export declare function isBlankPrescriptionItem(item: PrescriptionItem): boolean;
27
33
  /**
28
34
  * Checks a draft. Returns an empty object when it can be saved.
29
35
  *
30
- * Rules: a patient, a prescriber, a link (unless `requireLink` is false) and
36
+ * Rules: a patient, a prescriber, a treatment of the patient and
31
37
  * at least one medication line. Every line that is not blank needs a
32
- * medication and a dosage. Blank lines are ignored, except that a draft of
38
+ * medication, a dosage and a whole number of packs of 1 or more. Blank lines are ignored, except that a draft of
33
39
  * only blank lines has no medication at all, and its first line is marked.
34
40
  */
35
41
  export declare function validatePrescriptionDraft(draft: PrescriptionDraft, options?: PrescriptionValidationOptions): PrescriptionDraftErrors;