@alfadocs/ui-kit 1.149.0 → 1.150.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 (183) hide show
  1. package/dist/_chunks/{ai-summary-panel-Cdsve-XN.js → ai-summary-panel-D-RNe-_n.js} +3 -3
  2. package/dist/_chunks/{anamnesis-summary-rows-QCv6zW-J.js → anamnesis-summary-rows-CE-i9j-s.js} +2 -2
  3. package/dist/_chunks/{appointment-card-HOZrABrQ.js → appointment-card-BPZggqck.js} +2 -2
  4. package/dist/_chunks/{appointment-details-panel.history-BxNqcA-r.js → appointment-details-panel.history-BO31ZFQp.js} +2 -2
  5. package/dist/_chunks/{appointment-details-panel.identity--_j07UG1.js → appointment-details-panel.identity-C9kWtC6m.js} +90 -78
  6. package/dist/_chunks/appointment-peek-CGJ6kUvM.js +213 -0
  7. package/dist/_chunks/{appointment-timeline-CuZW-CGT.js → appointment-timeline-ynFqcw0S.js} +3 -3
  8. package/dist/_chunks/{appointment-tray-CFCxukwq.js → appointment-tray-Dx5VDREk.js} +2 -2
  9. package/dist/_chunks/{balance-badge-cell-BPz9bQAB.js → balance-badge-cell-DiyJQcmA.js} +2 -2
  10. package/dist/_chunks/{calendar-appointment-editor-dialog-Dx9_KIWA.js → calendar-appointment-editor-dialog-BfoEpFVx.js} +360 -356
  11. package/dist/_chunks/{calendar-editor-discard-host-DWS_kM-a.js → calendar-editor-discard-host-DO506cJu.js} +4 -4
  12. package/dist/_chunks/{calendar-waiting-list-panel-BKBHfBpn.js → calendar-waiting-list-panel-CyMTv2y3.js} +7 -7
  13. package/dist/_chunks/{calendar-workspace.model-4zmA3BFE.js → calendar-workspace.model-X3aXbDTo.js} +2 -2
  14. package/dist/_chunks/{calendar.sheets-lgAqJB34.js → calendar.sheets-C8x8kPb4.js} +10 -10
  15. package/dist/_chunks/{calls-panel-BTTfHnPD.js → calls-panel-Bpemmnpd.js} +4 -4
  16. package/dist/_chunks/{care-plan-card-2U2LuIJD.js → care-plan-card-DJXNWjKB.js} +3 -3
  17. package/dist/_chunks/{care-plan-entry-card-CUAlQv1c.js → care-plan-entry-card-W5QvNv8m.js} +2 -2
  18. package/dist/_chunks/{communications-panel-DDzUyoHi.js → communications-panel-Cd0TBEhL.js} +2 -2
  19. package/dist/_chunks/{control-room-rail-BQvaYowi.js → control-room-rail-4W1MFY-g.js} +3 -3
  20. package/dist/_chunks/{document-preview-oSuJsJ3k.js → document-preview-Zws6CHhK.js} +3 -3
  21. package/dist/_chunks/{editable-description-BsSjLnSx.js → editable-description-B2F54K4T.js} +34 -33
  22. package/dist/_chunks/{entity-summary-CZmGcWi2.js → entity-summary-BNnTP1F6.js} +62 -50
  23. package/dist/_chunks/feature-preview-switch-PKeLaFry.js +75 -0
  24. package/dist/_chunks/{file-manager-Cp3Z4VvM.js → file-manager-DzOCQBAO.js} +163 -178
  25. package/dist/_chunks/folder-CH9PJHou.js +36 -0
  26. package/dist/_chunks/{help-me-write-templates-DlA54nu5.js → help-me-write-templates-B_wMJ82X.js} +2 -2
  27. package/dist/_chunks/message-square-warning-DsGGfd0K.js +22 -0
  28. package/dist/_chunks/{notes-panel-Cw06dLDm.js → notes-panel-BguRX8VC.js} +374 -341
  29. package/dist/_chunks/{optical-prescription-DZvauMiM.js → optical-prescription-BzGnlIjq.js} +2 -2
  30. package/dist/_chunks/{panel-header-CbtlTe85.js → panel-header-DTc5OFUg.js} +78 -66
  31. package/dist/_chunks/{panel-subview-DjBwNV16.js → panel-subview-Om_yZvFG.js} +2 -2
  32. package/dist/_chunks/{patient-account-settings-Do0QbDJe.js → patient-account-settings-YKnBzmwE.js} +3 -3
  33. package/dist/_chunks/{patient-check-in-resume-Bxy1_Pfo.js → patient-check-in-resume-DERfQbp5.js} +5 -5
  34. package/dist/_chunks/{patient-details-Cj3dp9GB.js → patient-details-BUD0UbmT.js} +3 -3
  35. package/dist/_chunks/{patient-field-row-DDjsUsc_.js → patient-field-row-DytaHdGw.js} +201 -200
  36. package/dist/_chunks/{patient-summary-card-roM9Esfb.js → patient-summary-card-7Werxl48.js} +126 -139
  37. package/dist/_chunks/{payment-request-card-C9VglWsV.js → payment-request-card-BF3rakTQ.js} +2 -2
  38. package/dist/_chunks/{portal-details-CKF4yFHs.js → portal-details-C1QQGPQf.js} +3 -3
  39. package/dist/_chunks/{portal-documents-DvpAwmSI.js → portal-documents-CzEuCaqv.js} +3 -3
  40. package/dist/_chunks/{portal-parts-Cvu4PfIY.js → portal-parts-BMW4t57s.js} +2 -2
  41. package/dist/_chunks/{privacy-mask-zVh0ntm0.js → privacy-mask-CrjD5PYW.js} +2 -2
  42. package/dist/_chunks/{radiograph-panel.agent-BUZPsuSP.js → radiograph-panel.agent-Kl1M0dtT.js} +3 -3
  43. package/dist/_chunks/{registry-connection-panel-ACOsXu3F.js → registry-connection-panel-kdKbGQE6.js} +3 -3
  44. package/dist/_chunks/{reserved.agent-DjvapRF1.js → reserved.agent-CW0frsMv.js} +2 -2
  45. package/dist/_chunks/{reviews-panel-Cw5ygAxs.js → reviews-panel-54AFY6uy.js} +2 -2
  46. package/dist/_chunks/{rich-text-editor-eGdYDPK2.js → rich-text-editor-DCQEpaIv.js} +1398 -1280
  47. package/dist/_chunks/{task-editor-4zFL10oM.js → task-editor-CIHQQRtP.js} +219 -210
  48. package/dist/_chunks/{tasks-panel-BDPQPOP6.js → tasks-panel-Bc_odkQN.js} +2 -2
  49. package/dist/_chunks/text-area-DbxGkpzE.js +269 -0
  50. package/dist/_chunks/{tool-rail-DjPEiBa2.js → tool-rail-CJBtqzMs.js} +337 -320
  51. package/dist/_chunks/{transaction-chip-CkYd-3ky.js → transaction-chip-6jToArJn.js} +45 -43
  52. package/dist/_chunks/{transcript-panel-Wr8e4Zgi.js → transcript-panel-Dc0fK4WO.js} +2 -2
  53. package/dist/_chunks/{treatment-receipt-BZzwvsnY.js → treatment-receipt-B6m47Jie.js} +44 -46
  54. package/dist/_chunks/{use-appointment-details-read-Bl1DHXQ2.js → use-appointment-details-read-HVHbR0Zl.js} +769 -745
  55. package/dist/agent-catalog.json +15 -1
  56. package/dist/appointment-editor-panel/index.js +4 -4
  57. package/dist/booking-tools-data/index.js +1 -1
  58. package/dist/browser-support.js +1 -1
  59. package/dist/calendar-action-buttons/index.js +1 -1
  60. package/dist/components/_shared/appointment-format.d.ts +4 -0
  61. package/dist/components/_shared/patient-field-row.d.ts +5 -1
  62. package/dist/components/ai-summary-panel/index.js +1 -1
  63. package/dist/components/appointment-card/index.js +2 -2
  64. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +5 -2
  65. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +3 -1
  66. package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +3 -0
  67. package/dist/components/appointment-details-panel/index.js +2 -2
  68. package/dist/components/appointment-peek/appointment-peek.d.ts +45 -1
  69. package/dist/components/appointment-peek/index.js +1 -1
  70. package/dist/components/appointment-timeline/index.js +1 -1
  71. package/dist/components/booking/index.js +1 -1
  72. package/dist/components/calls-panel/index.js +1 -1
  73. package/dist/components/care-plan-card/index.js +1 -1
  74. package/dist/components/care-plan-entry-card/index.js +1 -1
  75. package/dist/components/communications-panel/index.js +1 -1
  76. package/dist/components/control-room-rail/index.js +1 -1
  77. package/dist/components/document-preview/index.js +1 -1
  78. package/dist/components/editable-description/editable-description.d.ts +7 -0
  79. package/dist/components/editable-description/index.js +1 -1
  80. package/dist/components/entity-summary/index.js +1 -1
  81. package/dist/components/feature-preview-switch/feature-preview-switch.d.ts +55 -0
  82. package/dist/components/feature-preview-switch/index.d.ts +2 -0
  83. package/dist/components/feature-preview-switch/index.js +5 -0
  84. package/dist/components/file-manager/index.js +1 -1
  85. package/dist/components/index.d.ts +1 -0
  86. package/dist/components/notes-panel/index.js +1 -1
  87. package/dist/components/notes-panel/notes-panel.d.ts +20 -0
  88. package/dist/components/optical-prescription/index.js +1 -1
  89. package/dist/components/panel-header/index.js +1 -1
  90. package/dist/components/panel-header/panel-header.d.ts +8 -0
  91. package/dist/components/panel-subview/index.js +1 -1
  92. package/dist/components/patient-details/index.js +1 -1
  93. package/dist/components/patient-summary-card/index.js +1 -1
  94. package/dist/components/patient-summary-card/patient-summary-card.d.ts +9 -0
  95. package/dist/components/patient-table/index.js +1 -1
  96. package/dist/components/payment-card/index.js +1 -1
  97. package/dist/components/radiograph-panel/index.js +1 -1
  98. package/dist/components/registry-connection-panel/index.js +1 -1
  99. package/dist/components/reviews-panel/index.js +1 -1
  100. package/dist/components/rich-text-editor/editor-toolbar.d.ts +4 -1
  101. package/dist/components/rich-text-editor/index.js +1 -1
  102. package/dist/components/task-editor/index.js +1 -1
  103. package/dist/components/tasks-panel/index.js +1 -1
  104. package/dist/components/text-area/index.js +1 -1
  105. package/dist/components/text-area/text-area.d.ts +15 -0
  106. package/dist/components/tool-rail/index.js +1 -1
  107. package/dist/components/tool-rail/tool-rail.d.ts +12 -1
  108. package/dist/components/transaction-chip/index.js +1 -1
  109. package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
  110. package/dist/components/transcript-panel/index.js +1 -1
  111. package/dist/components/treatment-receipt/index.js +1 -1
  112. package/dist/core.css +1 -1
  113. package/dist/find-free-slots-panel/index.js +1 -1
  114. package/dist/host-legacy.css +51 -4
  115. package/dist/i18n/locales/ar.d.ts +9 -0
  116. package/dist/i18n/locales/ar.js +8 -2
  117. package/dist/i18n/locales/de.d.ts +9 -0
  118. package/dist/i18n/locales/de.js +8 -2
  119. package/dist/i18n/locales/el.d.ts +9 -0
  120. package/dist/i18n/locales/el.js +10 -1
  121. package/dist/i18n/locales/en.d.ts +9 -0
  122. package/dist/i18n/locales/en.js +11 -2
  123. package/dist/i18n/locales/es.d.ts +9 -0
  124. package/dist/i18n/locales/es.js +10 -1
  125. package/dist/i18n/locales/fr.d.ts +9 -0
  126. package/dist/i18n/locales/fr.js +10 -1
  127. package/dist/i18n/locales/hi.d.ts +9 -0
  128. package/dist/i18n/locales/hi.js +8 -2
  129. package/dist/i18n/locales/it.d.ts +19 -10
  130. package/dist/i18n/locales/it.js +20 -11
  131. package/dist/i18n/locales/ja.d.ts +9 -0
  132. package/dist/i18n/locales/ja.js +8 -2
  133. package/dist/i18n/locales/nl.d.ts +9 -0
  134. package/dist/i18n/locales/nl.js +8 -2
  135. package/dist/i18n/locales/pl.d.ts +9 -0
  136. package/dist/i18n/locales/pl.js +10 -1
  137. package/dist/i18n/locales/pt.d.ts +9 -0
  138. package/dist/i18n/locales/pt.js +10 -1
  139. package/dist/i18n/locales/ro.d.ts +9 -0
  140. package/dist/i18n/locales/ro.js +10 -1
  141. package/dist/i18n/locales/ru.d.ts +9 -0
  142. package/dist/i18n/locales/ru.js +8 -2
  143. package/dist/i18n/locales/sq.d.ts +9 -0
  144. package/dist/i18n/locales/sq.js +10 -1
  145. package/dist/i18n/locales/sv.d.ts +9 -0
  146. package/dist/i18n/locales/sv.js +8 -2
  147. package/dist/i18n/locales/tr.d.ts +9 -0
  148. package/dist/i18n/locales/tr.js +8 -2
  149. package/dist/i18n/locales/zh.d.ts +9 -0
  150. package/dist/i18n/locales/zh.js +8 -2
  151. package/dist/index.js +775 -773
  152. package/dist/locales/ar.json +10 -1
  153. package/dist/locales/de.json +10 -1
  154. package/dist/locales/el.json +10 -1
  155. package/dist/locales/en.json +11 -2
  156. package/dist/locales/es.json +10 -1
  157. package/dist/locales/fr.json +10 -1
  158. package/dist/locales/hi.json +10 -1
  159. package/dist/locales/it.json +20 -11
  160. package/dist/locales/ja.json +10 -1
  161. package/dist/locales/nl.json +10 -1
  162. package/dist/locales/pl.json +10 -1
  163. package/dist/locales/pt.json +10 -1
  164. package/dist/locales/ro.json +10 -1
  165. package/dist/locales/ru.json +10 -1
  166. package/dist/locales/sq.json +10 -1
  167. package/dist/locales/sv.json +10 -1
  168. package/dist/locales/tr.json +10 -1
  169. package/dist/locales/zh.json +10 -1
  170. package/dist/online-bookings-panel/index.js +2 -2
  171. package/dist/patterns/anamnesis/index.js +1 -1
  172. package/dist/patterns/calendar/index.js +4 -4
  173. package/dist/patterns/help-me-write-templates/index.js +1 -1
  174. package/dist/patterns/patient-account-settings/index.js +1 -1
  175. package/dist/patterns/patient-check-in/index.js +1 -1
  176. package/dist/patterns/patient-portal/index.js +2 -2
  177. package/dist/tokens.css +1 -1
  178. package/dist/waiting-list-panel/index.js +3 -3
  179. package/package.json +5 -1
  180. package/dist/_chunks/appointment-peek-B3raO90X.js +0 -123
  181. package/dist/_chunks/contact-round-DiSvB3LP.js +0 -18
  182. package/dist/_chunks/folder-BghC8_S2.js +0 -20
  183. package/dist/_chunks/text-area-COMVJ1yE.js +0 -258
@@ -1,6 +1,6 @@
1
- import { useMemo as B, useCallback as V, useState as P, cloneElement as W, useId as Y } from "react";
1
+ import { useMemo as B, useCallback as N, useState as T, cloneElement as W, useId as Y } from "react";
2
2
  import { u as Z } from "./use-controllable-state-BiY4xTzM.js";
3
- import { jsxs as N, jsx as t, Fragment as $ } from "react/jsx-runtime";
3
+ import { jsxs as w, jsx as t, Fragment as $ } from "react/jsx-runtime";
4
4
  import { useTranslation as E } from "react-i18next";
5
5
  import { B as ee } from "./button-Dp4j9ygh.js";
6
6
  import { I } from "./icon-button-u9VMQn3x.js";
@@ -12,7 +12,7 @@ import { G as re } from "./grip-vertical-onSb1JXO.js";
12
12
  import { D as j } from "./description-list-DA4TgL_I.js";
13
13
  import { B as q } from "./badge-BUk4RjTS.js";
14
14
  import { L as se } from "./link-CeV7FoI6.js";
15
- import { T as ne } from "./transaction-chip-CkYd-3ky.js";
15
+ import { T as ne } from "./transaction-chip-6jToArJn.js";
16
16
  import { H as ie } from "./hash-CSQ9SChR.js";
17
17
  import { C as oe } from "./calendar-days-BGWklvE-.js";
18
18
  import { H as le } from "./hourglass-BEAzW1wE.js";
@@ -29,7 +29,7 @@ import { P as ye } from "./postal-code-input-dJdSAVkP.js";
29
29
  import { P as be } from "./province-select-D-iY9bQG.js";
30
30
  import { S as ve } from "./select-Bw5FvGJ7.js";
31
31
  import { S as xe } from "./switch-DO6uC4HJ.js";
32
- import { T as Ce } from "./text-area-COMVJ1yE.js";
32
+ import { T as Ce } from "./text-area-DbxGkpzE.js";
33
33
  import { T as ke } from "./text-input-B6iAgCr3.js";
34
34
  import { u as Ve } from "./use-state-backed-input-DhRQo6gM.js";
35
35
  import { C as K } from "./check-DrFSN__t.js";
@@ -63,11 +63,11 @@ function X(e) {
63
63
  return e.flatMap((r) => r.fields.map((a) => a.id));
64
64
  }
65
65
  function Dt(e, r) {
66
- const a = r ?? X(e), s = new Map(a.map((n, h) => [n, h]));
66
+ const a = r ?? X(e), s = new Map(a.map((n, v) => [n, v]));
67
67
  return e.map((n) => ({
68
68
  section: n,
69
- fields: n.fields.filter((h) => s.has(h.id)).sort(
70
- (h, l) => s.get(h.id) - s.get(l.id)
69
+ fields: n.fields.filter((v) => s.has(v.id)).sort(
70
+ (v, l) => s.get(v.id) - s.get(l.id)
71
71
  )
72
72
  }));
73
73
  }
@@ -75,70 +75,70 @@ function St(e, { value: r, defaultValue: a, onChange: s } = {}) {
75
75
  const n = B(
76
76
  () => X(e),
77
77
  [e]
78
- ), [h, l] = Z({
78
+ ), [v, l] = Z({
79
79
  value: r,
80
80
  defaultValue: a ?? n,
81
81
  onChange: s
82
- }), c = h ?? a ?? n, m = B(() => {
83
- const g = /* @__PURE__ */ new Map();
84
- for (const b of e)
85
- for (const C of b.fields)
86
- g.set(C.id, { field: C, sectionId: b.id });
87
- return g;
88
- }, [e]), d = V(
89
- (g) => {
90
- l(g.filter((b) => m.has(b)));
82
+ }), c = v ?? a ?? n, u = B(() => {
83
+ const d = /* @__PURE__ */ new Map();
84
+ for (const h of e)
85
+ for (const x of h.fields)
86
+ d.set(x.id, { field: x, sectionId: h.id });
87
+ return d;
88
+ }, [e]), m = N(
89
+ (d) => {
90
+ l(d.filter((h) => u.has(h)));
91
91
  },
92
- [l, m]
93
- ), y = V(
94
- (g) => {
95
- d(
96
- c.includes(g) ? c.filter((b) => b !== g) : [...c, g]
92
+ [l, u]
93
+ ), b = N(
94
+ (d) => {
95
+ m(
96
+ c.includes(d) ? c.filter((h) => h !== d) : [...c, d]
97
97
  );
98
98
  },
99
- [c, d]
100
- ), o = V(
101
- (g, b) => {
99
+ [c, m]
100
+ ), i = N(
101
+ (d, h) => {
102
102
  var D;
103
- const C = ((D = e.find((p) => p.id === g)) == null ? void 0 : D.fields.map((p) => p.id)) ?? [], F = new Set(C);
104
- if (b) {
105
- const p = C.filter((u) => !c.includes(u));
106
- d([...c, ...p]);
103
+ const x = ((D = e.find((p) => p.id === d)) == null ? void 0 : D.fields.map((p) => p.id)) ?? [], F = new Set(x);
104
+ if (h) {
105
+ const p = x.filter((f) => !c.includes(f));
106
+ m([...c, ...p]);
107
107
  } else
108
- d(c.filter((p) => !F.has(p)));
108
+ m(c.filter((p) => !F.has(p)));
109
109
  },
110
- [e, c, d]
111
- ), w = V(
112
- (g, b) => {
113
- var L, i, A;
114
- if (g === b) return;
115
- const C = (L = m.get(g)) == null ? void 0 : L.sectionId, F = (i = m.get(b)) == null ? void 0 : i.sectionId;
116
- if (!C || C !== F) return;
110
+ [e, c, m]
111
+ ), z = N(
112
+ (d, h) => {
113
+ var L, o, A;
114
+ if (d === h) return;
115
+ const x = (L = u.get(d)) == null ? void 0 : L.sectionId, F = (o = u.get(h)) == null ? void 0 : o.sectionId;
116
+ if (!x || x !== F) return;
117
117
  const D = new Set(
118
- ((A = e.find((v) => v.id === C)) == null ? void 0 : A.fields.map((v) => v.id)) ?? []
119
- ), p = c.filter((v) => D.has(v)), u = p.indexOf(g), x = p.indexOf(b);
120
- if (u < 0 || x < 0) return;
121
- const [T] = p.splice(u, 1);
122
- p.splice(x, 0, T);
123
- let k = 0;
118
+ ((A = e.find((y) => y.id === x)) == null ? void 0 : A.fields.map((y) => y.id)) ?? []
119
+ ), p = c.filter((y) => D.has(y)), f = p.indexOf(d), C = p.indexOf(h);
120
+ if (f < 0 || C < 0) return;
121
+ const [k] = p.splice(f, 1);
122
+ p.splice(C, 0, k);
123
+ let V = 0;
124
124
  const H = c.map(
125
- (v) => D.has(v) ? p[k++] : v
125
+ (y) => D.has(y) ? p[V++] : y
126
126
  );
127
- d(H);
127
+ m(H);
128
128
  },
129
- [m, e, c, d]
130
- ), S = V(() => {
131
- d(a ?? n);
132
- }, [a, n, d]);
129
+ [u, e, c, m]
130
+ ), P = N(() => {
131
+ m(a ?? n);
132
+ }, [a, n, m]);
133
133
  return {
134
134
  visible: c,
135
135
  catalogueIds: n,
136
- fieldById: m,
137
- setOrder: d,
138
- toggleField: y,
139
- toggleSection: o,
140
- moveFieldOnto: w,
141
- reset: S
136
+ fieldById: u,
137
+ setOrder: m,
138
+ toggleField: b,
139
+ toggleSection: i,
140
+ moveFieldOnto: z,
141
+ reset: P
142
142
  };
143
143
  }
144
144
  function Tt({
@@ -147,31 +147,31 @@ function Tt({
147
147
  onToggleField: a,
148
148
  onToggleSection: s,
149
149
  onMoveFieldOnto: n,
150
- onReset: h,
150
+ onReset: v,
151
151
  label: l
152
152
  }) {
153
- const { t: c } = E("ui"), m = B(() => new Set(r), [r]), [d, y] = P(null), [o, w] = P(null), [S, g] = P(""), { sectionOfField: b, labelOfField: C } = B(() => {
154
- const u = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
155
- for (const T of e)
156
- for (const k of T.fields)
157
- u.set(k.id, T.id), x.set(k.id, k.label);
158
- return { sectionOfField: u, labelOfField: x };
159
- }, [e]), F = d ? b.get(d) : void 0, D = V(() => {
160
- y(null), w(null);
161
- }, []), p = V(
162
- (u, x, T) => {
163
- g(
153
+ const { t: c } = E("ui"), u = B(() => new Set(r), [r]), [m, b] = T(null), [i, z] = T(null), [P, d] = T(""), { sectionOfField: h, labelOfField: x } = B(() => {
154
+ const f = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map();
155
+ for (const k of e)
156
+ for (const V of k.fields)
157
+ f.set(V.id, k.id), C.set(V.id, V.label);
158
+ return { sectionOfField: f, labelOfField: C };
159
+ }, [e]), F = m ? h.get(m) : void 0, D = N(() => {
160
+ b(null), z(null);
161
+ }, []), p = N(
162
+ (f, C, k) => {
163
+ d(
164
164
  c("fieldPicker.moved", {
165
- field: C.get(u) ?? "",
166
- position: x + 1,
167
- count: T,
165
+ field: x.get(f) ?? "",
166
+ position: C + 1,
167
+ count: k,
168
168
  defaultValue: "Moved {{field}} to position {{position}} of {{count}}"
169
169
  })
170
170
  );
171
171
  },
172
- [c, C]
172
+ [c, x]
173
173
  );
174
- return /* @__PURE__ */ N(O.Root, { children: [
174
+ return /* @__PURE__ */ w(O.Root, { children: [
175
175
  /* @__PURE__ */ t(O.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
176
176
  I,
177
177
  {
@@ -182,7 +182,7 @@ function Tt({
182
182
  className: "ds:shrink-0"
183
183
  }
184
184
  ) }),
185
- /* @__PURE__ */ N(
185
+ /* @__PURE__ */ w(
186
186
  O.Content,
187
187
  {
188
188
  align: "end",
@@ -200,13 +200,13 @@ function Tt({
200
200
  "ds:py-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
201
201
  "ds:mt-[calc(var(--spacing-xs)-var(--focus-ring-width)-var(--focus-ring-offset))]"
202
202
  ].join(" "),
203
- children: e.map((u) => {
204
- const x = u.fields.map((i) => i.id), T = x.filter(
205
- (i) => m.has(i)
206
- ).length, k = r.filter(
207
- (i) => x.includes(i)
208
- ), H = T === 0 ? !1 : T === x.length ? !0 : "indeterminate", L = !!u.heading;
209
- return /* @__PURE__ */ N(
203
+ children: e.map((f) => {
204
+ const C = f.fields.map((o) => o.id), k = C.filter(
205
+ (o) => u.has(o)
206
+ ).length, V = r.filter(
207
+ (o) => C.includes(o)
208
+ ), H = k === 0 ? !1 : k === C.length ? !0 : "indeterminate", L = !!f.heading;
209
+ return /* @__PURE__ */ w(
210
210
  "div",
211
211
  {
212
212
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
@@ -215,9 +215,9 @@ function Tt({
215
215
  R,
216
216
  {
217
217
  size: "sm",
218
- label: u.heading,
218
+ label: f.heading,
219
219
  checked: H,
220
- onCheckedChange: (i) => s(u.id, i === !0)
220
+ onCheckedChange: (o) => s(f.id, o === !0)
221
221
  }
222
222
  ) : null,
223
223
  /* @__PURE__ */ t(
@@ -227,26 +227,26 @@ function Tt({
227
227
  "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)]",
228
228
  L ? "ds:ps-[var(--spacing-md)]" : "ds:ps-0"
229
229
  ].join(" "),
230
- children: u.fields.map((i) => {
231
- const A = m.has(i.id), v = k.indexOf(i.id), z = k.length, J = d === i.id, Q = o === i.id && d !== null && d !== i.id && F === u.id;
232
- return /* @__PURE__ */ N(
230
+ children: f.fields.map((o) => {
231
+ const A = u.has(o.id), y = V.indexOf(o.id), S = V.length, J = m === o.id, Q = i === o.id && m !== null && m !== o.id && F === f.id;
232
+ return /* @__PURE__ */ w(
233
233
  "li",
234
234
  {
235
235
  ...A ? {
236
236
  draggable: !0,
237
- onDragStart: (f) => {
238
- y(i.id), f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", i.id);
237
+ onDragStart: (g) => {
238
+ b(o.id), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", o.id);
239
239
  },
240
- onDragOver: (f) => {
241
- d === null || F !== u.id || (f.preventDefault(), f.dataTransfer.dropEffect = "move", w(i.id));
240
+ onDragOver: (g) => {
241
+ m === null || F !== f.id || (g.preventDefault(), g.dataTransfer.dropEffect = "move", z(o.id));
242
242
  },
243
- onDragLeave: () => w(
244
- (f) => f === i.id ? null : f
243
+ onDragLeave: () => z(
244
+ (g) => g === o.id ? null : g
245
245
  ),
246
- onDrop: (f) => {
247
- f.preventDefault();
248
- const M = f.dataTransfer.getData("text/plain");
249
- M && M !== i.id && b.get(M) === u.id && (n(M, i.id), p(M, v, z)), D();
246
+ onDrop: (g) => {
247
+ g.preventDefault();
248
+ const M = g.dataTransfer.getData("text/plain");
249
+ M && M !== o.id && h.get(M) === f.id && (n(M, o.id), p(M, y, S)), D();
250
250
  },
251
251
  onDragEnd: D
252
252
  } : {},
@@ -260,9 +260,9 @@ function Tt({
260
260
  R,
261
261
  {
262
262
  size: "sm",
263
- label: i.label,
263
+ label: o.label,
264
264
  checked: A,
265
- onCheckedChange: () => a(i.id)
265
+ onCheckedChange: () => a(o.id)
266
266
  }
267
267
  ),
268
268
  A ? /* @__PURE__ */ t(
@@ -272,34 +272,34 @@ function Tt({
272
272
  intent: "ghost",
273
273
  icon: /* @__PURE__ */ t(re, { "aria-hidden": "true" }),
274
274
  "aria-label": c("fieldPicker.reorder", {
275
- field: i.label,
275
+ field: o.label,
276
276
  defaultValue: "Reorder {{field}}. Press Alt + Up or Alt + Down to move."
277
277
  }),
278
278
  "aria-keyshortcuts": "Alt+ArrowUp Alt+ArrowDown Alt+Home Alt+End",
279
279
  className: "ds:shrink-0 ds:cursor-grab ds:active:cursor-grabbing",
280
- onKeyDown: (f) => {
281
- if (f.altKey) {
282
- if (f.key === "ArrowUp") {
283
- if (v <= 0) return;
284
- f.preventDefault(), n(
285
- i.id,
286
- k[v - 1]
287
- ), p(i.id, v - 1, z);
288
- } else if (f.key === "ArrowDown") {
289
- if (v >= z - 1) return;
290
- f.preventDefault(), n(
291
- i.id,
292
- k[v + 1]
293
- ), p(i.id, v + 1, z);
294
- } else if (f.key === "Home") {
295
- if (v <= 0) return;
296
- f.preventDefault(), n(i.id, k[0]), p(i.id, 0, z);
297
- } else if (f.key === "End") {
298
- if (v >= z - 1) return;
299
- f.preventDefault(), n(
300
- i.id,
301
- k[z - 1]
302
- ), p(i.id, z - 1, z);
280
+ onKeyDown: (g) => {
281
+ if (g.altKey) {
282
+ if (g.key === "ArrowUp") {
283
+ if (y <= 0) return;
284
+ g.preventDefault(), n(
285
+ o.id,
286
+ V[y - 1]
287
+ ), p(o.id, y - 1, S);
288
+ } else if (g.key === "ArrowDown") {
289
+ if (y >= S - 1) return;
290
+ g.preventDefault(), n(
291
+ o.id,
292
+ V[y + 1]
293
+ ), p(o.id, y + 1, S);
294
+ } else if (g.key === "Home") {
295
+ if (y <= 0) return;
296
+ g.preventDefault(), n(o.id, V[0]), p(o.id, 0, S);
297
+ } else if (g.key === "End") {
298
+ if (y >= S - 1) return;
299
+ g.preventDefault(), n(
300
+ o.id,
301
+ V[S - 1]
302
+ ), p(o.id, S - 1, S);
303
303
  }
304
304
  }
305
305
  }
@@ -307,23 +307,23 @@ function Tt({
307
307
  ) : null
308
308
  ]
309
309
  },
310
- i.id
310
+ o.id
311
311
  );
312
312
  })
313
313
  }
314
314
  )
315
315
  ]
316
316
  },
317
- u.id
317
+ f.id
318
318
  );
319
319
  })
320
320
  }
321
321
  ),
322
- /* @__PURE__ */ N("div", { className: "ds:flex ds:shrink-0 ds:flex-col ds:gap-[var(--spacing-sm)] ds:pt-[calc(var(--spacing-sm)-var(--focus-ring-width)-var(--focus-ring-offset))]", children: [
322
+ /* @__PURE__ */ w("div", { className: "ds:flex ds:shrink-0 ds:flex-col ds:gap-[var(--spacing-sm)] ds:pt-[calc(var(--spacing-sm)-var(--focus-ring-width)-var(--focus-ring-offset))]", children: [
323
323
  /* @__PURE__ */ t(te, { orientation: "horizontal" }),
324
- /* @__PURE__ */ t(ee, { type: "button", size: "sm", intent: "ghost", onClick: h, children: c("fieldPicker.reset", { defaultValue: "Reset to defaults" }) })
324
+ /* @__PURE__ */ t(ee, { type: "button", size: "sm", intent: "ghost", onClick: v, children: c("fieldPicker.reset", { defaultValue: "Reset to defaults" }) })
325
325
  ] }),
326
- /* @__PURE__ */ t("span", { role: "status", className: "ds:sr-only", children: S })
326
+ /* @__PURE__ */ t("span", { role: "status", className: "ds:sr-only", children: P })
327
327
  ]
328
328
  }
329
329
  )
@@ -416,7 +416,7 @@ function Me({
416
416
  field: e
417
417
  }) {
418
418
  const { t: r } = E("ui");
419
- return /* @__PURE__ */ N("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
419
+ return /* @__PURE__ */ w("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
420
420
  e.label,
421
421
  e.sensitive ? /* @__PURE__ */ t(
422
422
  De,
@@ -434,44 +434,45 @@ function Oe({
434
434
  editable: r,
435
435
  onFieldSave: a,
436
436
  validate: s,
437
- locale: n
437
+ locale: n,
438
+ wrap: v = !1
438
439
  }) {
439
- const { t: h } = E("ui"), l = Y(), c = r && !!e.editable && !!a, [m, d] = P(!1), [y, o] = P(e.editValue), [w, S] = P(null), [g, b] = P(!1), C = V(() => {
440
- o(e.editValue), S(null), d(!0);
441
- }, [e.editValue]), F = V(() => {
442
- d(!1), S(null);
443
- }, []), D = V(async () => {
440
+ const { t: l } = E("ui"), c = Y(), u = r && !!e.editable && !!a, [m, b] = T(!1), [i, z] = T(e.editValue), [P, d] = T(null), [h, x] = T(!1), F = N(() => {
441
+ z(e.editValue), d(null), b(!0);
442
+ }, [e.editValue]), D = N(() => {
443
+ b(!1), d(null);
444
+ }, []), p = N(async () => {
444
445
  if (!a) return;
445
- const u = (s == null ? void 0 : s(e.id, y)) ?? null;
446
- if (u) {
447
- S(u);
446
+ const C = (s == null ? void 0 : s(e.id, i)) ?? null;
447
+ if (C) {
448
+ d(C);
448
449
  return;
449
450
  }
450
- b(!0), S(null);
451
+ x(!0), d(null);
451
452
  try {
452
- await a(e.id, y), d(!1);
453
- } catch (x) {
454
- S(
455
- x instanceof Error && x.message ? x.message : h("patientDetails.edit.saveFailed", {
453
+ await a(e.id, i), b(!1);
454
+ } catch (k) {
455
+ d(
456
+ k instanceof Error && k.message ? k.message : l("patientDetails.edit.saveFailed", {
456
457
  defaultValue: "Could not save. Try again."
457
458
  })
458
459
  );
459
460
  } finally {
460
- b(!1);
461
+ x(!1);
461
462
  }
462
- }, [a, s, e.id, y, h]), p = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : void 0);
463
- return m ? /* @__PURE__ */ N("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
464
- /* @__PURE__ */ N("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
463
+ }, [a, s, e.id, i, l]), f = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : void 0);
464
+ return m ? /* @__PURE__ */ w("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
465
+ /* @__PURE__ */ w("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
465
466
  /* @__PURE__ */ t(
466
467
  Be,
467
468
  {
468
469
  field: e,
469
- value: y,
470
- onChange: o,
471
- invalid: !!w,
472
- errorId: w ? l : void 0,
470
+ value: i,
471
+ onChange: z,
472
+ invalid: !!P,
473
+ errorId: P ? c : void 0,
473
474
  locale: n,
474
- disabled: g
475
+ disabled: h
475
476
  }
476
477
  ),
477
478
  /* @__PURE__ */ t(
@@ -480,9 +481,9 @@ function Oe({
480
481
  size: "sm",
481
482
  intent: "primary",
482
483
  icon: /* @__PURE__ */ t(K, { "aria-hidden": "true" }),
483
- "aria-label": h("patientDetails.edit.save", { defaultValue: "Save" }),
484
- loading: g,
485
- onClick: D
484
+ "aria-label": l("patientDetails.edit.save", { defaultValue: "Save" }),
485
+ loading: h,
486
+ onClick: p
486
487
  }
487
488
  ),
488
489
  /* @__PURE__ */ t(
@@ -491,45 +492,45 @@ function Oe({
491
492
  size: "sm",
492
493
  intent: "ghost",
493
494
  icon: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }),
494
- "aria-label": h("patientDetails.edit.cancel", {
495
+ "aria-label": l("patientDetails.edit.cancel", {
495
496
  defaultValue: "Cancel"
496
497
  }),
497
- disabled: g,
498
- onClick: F
498
+ disabled: h,
499
+ onClick: D
499
500
  }
500
501
  )
501
502
  ] }),
502
- w ? /* @__PURE__ */ t(
503
+ P ? /* @__PURE__ */ t(
503
504
  "span",
504
505
  {
505
- id: l,
506
+ id: c,
506
507
  role: "alert",
507
508
  className: "type-meta ds:text-[color:var(--destructive)]",
508
- children: w
509
+ children: P
509
510
  }
510
511
  ) : null
511
- ] }) : /* @__PURE__ */ N("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
512
+ ] }) : /* @__PURE__ */ w("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
512
513
  /* @__PURE__ */ t(
513
514
  "span",
514
515
  {
515
- className: `ds:min-w-0 ${e.editType === "textarea" ? "" : "ds:truncate"}${e.mono ? " ds:font-mono" : ""}`,
516
- title: p,
516
+ className: `ds:min-w-0 ${v ? "ds:[overflow-wrap:anywhere]" : e.editType === "textarea" ? "" : "ds:truncate"}${e.mono ? " ds:font-mono" : ""}`,
517
+ title: f,
517
518
  children: /* @__PURE__ */ t(Le, { field: e })
518
519
  }
519
520
  ),
520
521
  e.copyable && e.copyText ? /* @__PURE__ */ t(_e, { text: e.copyText, label: e.label }) : null,
521
- c ? /* @__PURE__ */ t(
522
+ u ? /* @__PURE__ */ t(
522
523
  I,
523
524
  {
524
525
  size: "sm",
525
526
  intent: "ghost",
526
527
  className: "ds:shrink-0 ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:focus-visible:opacity-100",
527
528
  icon: /* @__PURE__ */ t(we, { "aria-hidden": "true" }),
528
- "aria-label": h("patientDetails.edit.editField", {
529
+ "aria-label": l("patientDetails.edit.editField", {
529
530
  field: e.label,
530
531
  defaultValue: "Edit {{field}}"
531
532
  }),
532
- onClick: C
533
+ onClick: F
533
534
  }
534
535
  ) : null
535
536
  ] });
@@ -539,7 +540,7 @@ function zt({
539
540
  icon: r,
540
541
  ...a
541
542
  }) {
542
- return /* @__PURE__ */ N(
543
+ return /* @__PURE__ */ w(
543
544
  j.Row,
544
545
  {
545
546
  icon: r ?? null,
@@ -558,19 +559,19 @@ function Be({
558
559
  onChange: a,
559
560
  invalid: s,
560
561
  errorId: n,
561
- locale: h,
562
+ locale: v,
562
563
  disabled: l
563
564
  }) {
564
- const { t: c } = E("ui"), m = s ? "error" : "default", d = e.editType ?? "text", y = Ve(typeof r == "string" ? r : "");
565
- switch (d) {
565
+ const { t: c } = E("ui"), u = s ? "error" : "default", m = e.editType ?? "text", b = Ve(typeof r == "string" ? r : "");
566
+ switch (m) {
566
567
  case "textarea":
567
568
  return /* @__PURE__ */ t(
568
569
  Ce,
569
570
  {
570
571
  size: "sm",
571
572
  value: typeof r == "string" ? r : "",
572
- onChange: (o) => a(o.target.value),
573
- tone: m,
573
+ onChange: (i) => a(i.target.value),
574
+ tone: u,
574
575
  "aria-label": e.label,
575
576
  "aria-invalid": s || void 0,
576
577
  "aria-describedby": n,
@@ -585,8 +586,8 @@ function Be({
585
586
  size: "sm",
586
587
  options: e.options ?? [],
587
588
  value: typeof r == "string" ? r : "",
588
- onValueChange: (o) => a(o),
589
- tone: m,
589
+ onValueChange: (i) => a(i),
590
+ tone: u,
590
591
  disabled: l,
591
592
  "aria-label": e.label,
592
593
  "aria-invalid": s || void 0,
@@ -599,7 +600,7 @@ function Be({
599
600
  {
600
601
  label: e.label,
601
602
  checked: r === !0,
602
- onCheckedChange: (o) => a(o),
603
+ onCheckedChange: (i) => a(i),
603
604
  disabled: l
604
605
  }
605
606
  );
@@ -609,7 +610,7 @@ function Be({
609
610
  {
610
611
  size: "sm",
611
612
  value: r instanceof Date ? r : void 0,
612
- onChange: (o) => a(o ?? null),
613
+ onChange: (i) => a(i ?? null),
613
614
  disabled: l,
614
615
  "aria-label": e.label
615
616
  }
@@ -620,11 +621,11 @@ function Be({
620
621
  {
621
622
  size: "sm",
622
623
  value: typeof r == "number" ? r : null,
623
- onChange: (o) => a(o),
624
+ onChange: (i) => a(i),
624
625
  mode: e.currency ? "currency" : "decimal",
625
626
  currency: e.currency,
626
- locale: h,
627
- tone: m,
627
+ locale: v,
628
+ tone: u,
628
629
  disabled: l,
629
630
  "aria-label": e.label,
630
631
  "aria-invalid": s || void 0,
@@ -636,8 +637,8 @@ function Be({
636
637
  pe,
637
638
  {
638
639
  size: "sm",
639
- ref: y.ref,
640
- onChange: y.quiet((o) => a(o.target.value)),
640
+ ref: b.ref,
641
+ onChange: b.quiet((i) => a(i.target.value)),
641
642
  "aria-label": e.label,
642
643
  "aria-invalid": s || void 0,
643
644
  "aria-describedby": n,
@@ -651,8 +652,8 @@ function Be({
651
652
  {
652
653
  size: "sm",
653
654
  value: typeof r == "string" ? r : "",
654
- onChange: (o) => a(o),
655
- tone: m,
655
+ onChange: (i) => a(i),
656
+ tone: u,
656
657
  "aria-label": e.label,
657
658
  "aria-invalid": s || void 0,
658
659
  "aria-describedby": n,
@@ -666,8 +667,8 @@ function Be({
666
667
  {
667
668
  size: "sm",
668
669
  value: typeof r == "string" ? r : "",
669
- onChange: (o) => a(o),
670
- tone: m,
670
+ onChange: (i) => a(i),
671
+ tone: u,
671
672
  "aria-label": e.label,
672
673
  "aria-invalid": s || void 0,
673
674
  "aria-describedby": n,
@@ -686,8 +687,8 @@ function Be({
686
687
  size: "sm",
687
688
  country: "it",
688
689
  value: typeof r == "string" ? r : "",
689
- onValueChange: (o) => a(o),
690
- tone: m,
690
+ onValueChange: (i) => a(i),
691
+ tone: u,
691
692
  disabled: l,
692
693
  "aria-label": e.label,
693
694
  "aria-invalid": s || void 0,
@@ -701,8 +702,8 @@ function Be({
701
702
  {
702
703
  size: "sm",
703
704
  value: typeof r == "string" ? r : "",
704
- onValueChange: (o) => a(o),
705
- tone: m,
705
+ onValueChange: (i) => a(i),
706
+ tone: u,
706
707
  disabled: l,
707
708
  "aria-label": e.label,
708
709
  "aria-invalid": s || void 0,
@@ -716,8 +717,8 @@ function Be({
716
717
  {
717
718
  size: "sm",
718
719
  country: "it",
719
- ref: y.ref,
720
- onValueChange: y.quiet((o) => a(o)),
720
+ ref: b.ref,
721
+ onValueChange: b.quiet((i) => a(i)),
721
722
  "aria-label": e.label,
722
723
  "aria-invalid": s || void 0,
723
724
  "aria-describedby": n,
@@ -730,9 +731,9 @@ function Be({
730
731
  de,
731
732
  {
732
733
  size: "sm",
733
- ref: y.ref,
734
- onValueChange: y.quiet((o) => a(o)),
735
- tone: m,
734
+ ref: b.ref,
735
+ onValueChange: b.quiet((i) => a(i)),
736
+ tone: u,
736
737
  disabled: l,
737
738
  "aria-label": e.label,
738
739
  "aria-invalid": s || void 0,
@@ -746,9 +747,9 @@ function Be({
746
747
  ke,
747
748
  {
748
749
  size: "sm",
749
- ref: y.ref,
750
- onChange: y.quiet((o) => a(o.target.value)),
751
- tone: m,
750
+ ref: b.ref,
751
+ onChange: b.quiet((i) => a(i.target.value)),
752
+ tone: u,
752
753
  "aria-label": e.label,
753
754
  "aria-invalid": s || void 0,
754
755
  "aria-describedby": n,
@@ -766,7 +767,7 @@ function _e({
766
767
  text: e,
767
768
  label: r
768
769
  }) {
769
- const { t: a } = E("ui"), [s, n] = P(!1), [h, l] = P(""), c = V(async () => {
770
+ const { t: a } = E("ui"), [s, n] = T(!1), [v, l] = T(""), c = N(async () => {
770
771
  try {
771
772
  await navigator.clipboard.writeText(e), n(!0), l(a("keyValuePair.copied", { defaultValue: "Copied" })), setTimeout(() => {
772
773
  n(!1), l("");
@@ -777,7 +778,7 @@ function _e({
777
778
  ), setTimeout(() => l(""), 3e3);
778
779
  }
779
780
  }, [e, a]);
780
- return /* @__PURE__ */ N($, { children: [
781
+ return /* @__PURE__ */ w($, { children: [
781
782
  /* @__PURE__ */ t(
782
783
  I,
783
784
  {
@@ -791,7 +792,7 @@ function _e({
791
792
  onClick: c
792
793
  }
793
794
  ),
794
- /* @__PURE__ */ t("span", { role: "status", className: "ds:sr-only", children: h })
795
+ /* @__PURE__ */ t("span", { role: "status", className: "ds:sr-only", children: v })
795
796
  ] });
796
797
  }
797
798
  export {
@@ -805,4 +806,4 @@ export {
805
806
  Dt as r,
806
807
  St as u
807
808
  };
808
- //# sourceMappingURL=patient-field-row-DDjsUsc_.js.map
809
+ //# sourceMappingURL=patient-field-row-DytaHdGw.js.map