@alfadocs/ui-kit-debug 1.11.0 → 1.12.4
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.
- package/dist/_chunks/{actions-cell-renderer-xfSYiTXQ.js → actions-cell-renderer-BCEjn3-f.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-xfSYiTXQ.js.map → actions-cell-renderer-BCEjn3-f.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-d44s_whc.js → anamnesis-summary-rows-BfhxWPO3.js} +1421 -1418
- package/dist/_chunks/anamnesis-summary-rows-BfhxWPO3.js.map +1 -0
- package/dist/_chunks/appointment-card-Dzr3GeVz.js.map +1 -1
- package/dist/_chunks/appointment-timeline-DCn0Jx55.js +403 -0
- package/dist/_chunks/appointment-timeline-DCn0Jx55.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-C_Qz76x7.js → balance-badge-cell-BrlikHfT.js} +317 -290
- package/dist/_chunks/balance-badge-cell-BrlikHfT.js.map +1 -0
- package/dist/_chunks/{chart-Bkr1Sh4o.js → chart-C6eHTxkO.js} +2 -2
- package/dist/_chunks/{chart-Bkr1Sh4o.js.map → chart-C6eHTxkO.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-Cj2iX9h_.js → control-room-rail-iO_BCaq1.js} +2 -2
- package/dist/_chunks/{control-room-rail-Cj2iX9h_.js.map → control-room-rail-iO_BCaq1.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-zLf_bXvL.js → editable-currency-cell-renderer-B7TVZ5ZJ.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-zLf_bXvL.js.map → editable-currency-cell-renderer-B7TVZ5ZJ.js.map} +1 -1
- package/dist/_chunks/{face-scheme-BfDi4YkW.js → face-scheme-CZaKm6fG.js} +2 -2
- package/dist/_chunks/{face-scheme-BfDi4YkW.js.map → face-scheme-CZaKm6fG.js.map} +1 -1
- package/dist/_chunks/{file-manager-Df6hyUYg.js → file-manager-Moc7sUFj.js} +3 -3
- package/dist/_chunks/{file-manager-Df6hyUYg.js.map → file-manager-Moc7sUFj.js.map} +1 -1
- package/dist/_chunks/{header-settings-CVC_davE.js → header-settings-J-ZCAfir.js} +2 -2
- package/dist/_chunks/{header-settings-CVC_davE.js.map → header-settings-J-ZCAfir.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-D6SVMteH.js → icon-button-group-VCCod3Hz.js} +154 -145
- package/dist/_chunks/icon-button-group-VCCod3Hz.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-Cp2MSlJl.js → link-cell-renderer-CenJx-_7.js} +197 -181
- package/dist/_chunks/link-cell-renderer-CenJx-_7.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-Chfdia7m.js → marketplace-app-shell-DDQXQ8hX.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-Chfdia7m.js.map → marketplace-app-shell-DDQXQ8hX.js.map} +1 -1
- package/dist/_chunks/{notes-panel-e9cJWVRg.js → notes-panel-CymneXtl.js} +93 -91
- package/dist/_chunks/notes-panel-CymneXtl.js.map +1 -0
- package/dist/_chunks/{signature-request-CW30B77U.js → signature-request-DVDTKLjM.js} +2 -2
- package/dist/_chunks/{signature-request-CW30B77U.js.map → signature-request-DVDTKLjM.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-DuMhQNFS.js → theme-toggle-uEwoKjl3.js} +2 -2
- package/dist/_chunks/{theme-toggle-DuMhQNFS.js.map → theme-toggle-uEwoKjl3.js.map} +1 -1
- package/dist/_chunks/{tool-rail-CHyUmulN.js → tool-rail-8Scslq3X.js} +2 -2
- package/dist/_chunks/tool-rail-8Scslq3X.js.map +1 -0
- package/dist/_chunks/{whatsapp-button-Ca9towA4.js → whatsapp-button-CuFIHJzG.js} +27 -19
- package/dist/_chunks/{whatsapp-button-Ca9towA4.js.map → whatsapp-button-CuFIHJzG.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
- package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts.map +1 -1
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +8 -0
- package/dist/components/appointment-timeline/appointment-timeline.d.ts.map +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-table/filters/date-range-filter.d.ts +22 -0
- package/dist/components/data-table/filters/date-range-filter.d.ts.map +1 -1
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts.map +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.agent.d.ts.map +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +6 -0
- package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
- package/dist/components/patient-table/columns.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/components/whatsapp-button/whatsapp-button.d.ts.map +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/index.js +16 -16
- package/dist/patterns/anamnesis/anamnesis-catalogue.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-compile.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-config.d.ts +18 -7
- package/dist/patterns/anamnesis/anamnesis-config.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +8 -0
- package/dist/patterns/anamnesis/anamnesis-types.d.ts.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/anamnesis-summary-rows-d44s_whc.js.map +0 -1
- package/dist/_chunks/appointment-timeline-0mwtpErq.js +0 -388
- package/dist/_chunks/appointment-timeline-0mwtpErq.js.map +0 -1
- package/dist/_chunks/balance-badge-cell-C_Qz76x7.js.map +0 -1
- package/dist/_chunks/icon-button-group-D6SVMteH.js.map +0 -1
- package/dist/_chunks/link-cell-renderer-Cp2MSlJl.js.map +0 -1
- package/dist/_chunks/notes-panel-e9cJWVRg.js.map +0 -1
- package/dist/_chunks/tool-rail-CHyUmulN.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { u as
|
|
6
|
-
import { C as
|
|
7
|
-
import { R as
|
|
2
|
+
import { forwardRef as oe, useRef as a, useState as M, useId as le, useCallback as ce, useEffect as de, useImperativeHandle as ue, useMemo as pe } from "react";
|
|
3
|
+
import { c as fe } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as me } from "react-i18next";
|
|
5
|
+
import { u as ge } from "./registry-DvAUVLHh.js";
|
|
6
|
+
import { C as he } from "./clinical-note-card-BBgFd2nB.js";
|
|
7
|
+
import { R as ve } from "./rich-text-editor-BDfFtK4H.js";
|
|
8
8
|
import { T as be } from "./text-area-Bt3p7Pt0.js";
|
|
9
|
-
import { B as
|
|
10
|
-
import { C as
|
|
11
|
-
import { P as
|
|
12
|
-
import { N as
|
|
13
|
-
const
|
|
9
|
+
import { B as ye } from "./button-nJaPh_HC.js";
|
|
10
|
+
import { C as xe } from "./checkbox-BuZ1u__2.js";
|
|
11
|
+
import { P as Pe } from "./panel-header-D313n_9-.js";
|
|
12
|
+
import { N as Ce } from "./notebook-pen-CO7HoM-W.js";
|
|
13
|
+
const Ne = {
|
|
14
14
|
id: "notes-panel",
|
|
15
15
|
// 'submit' backs add_note (compose + commit a note). pin / flag are toggles
|
|
16
16
|
// with no dedicated capability in the closed vocabulary.
|
|
@@ -111,7 +111,7 @@ const Ce = {
|
|
|
111
111
|
description: "Sourced from the id prop. Required to address a specific notes panel from the agent."
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, we = fe(
|
|
115
115
|
"ds:flex ds:flex-col ds:rounded-[var(--radius-md)] ds:border-s-2 ds:ps-[var(--spacing-sm)]",
|
|
116
116
|
{
|
|
117
117
|
variants: {
|
|
@@ -123,81 +123,82 @@ const Ce = {
|
|
|
123
123
|
defaultVariants: { current: !1 }
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
|
-
function
|
|
126
|
+
function z(n) {
|
|
127
127
|
return n ? /<img\b/i.test(n) ? !0 : n.replace(/<[^>]*>/g, "").replace(/ /gi, " ").trim().length > 0 : !1;
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const Me = oe(
|
|
130
130
|
function({
|
|
131
131
|
id: s,
|
|
132
132
|
notes: x,
|
|
133
133
|
onAddNote: l,
|
|
134
134
|
currentNoteId: c,
|
|
135
|
-
currentNoteKey:
|
|
135
|
+
currentNoteKey: B,
|
|
136
136
|
composer: f = "rich",
|
|
137
|
-
editorToolbar:
|
|
138
|
-
redactor:
|
|
139
|
-
imageUploadUrl:
|
|
137
|
+
editorToolbar: L = "standard",
|
|
138
|
+
redactor: W,
|
|
139
|
+
imageUploadUrl: E,
|
|
140
140
|
showClinicalToggle: I = !0,
|
|
141
141
|
canAddClinicalNote: m = !0,
|
|
142
|
-
clinicalGatedReason:
|
|
142
|
+
clinicalGatedReason: D,
|
|
143
143
|
defaultClinical: P = !1,
|
|
144
|
-
onRequestAiDraft:
|
|
145
|
-
aiDraftFormat:
|
|
146
|
-
aiPrivacyNotice:
|
|
147
|
-
onDictate:
|
|
148
|
-
onProofread:
|
|
149
|
-
onAutoFormat:
|
|
144
|
+
onRequestAiDraft: G,
|
|
145
|
+
aiDraftFormat: Y,
|
|
146
|
+
aiPrivacyNotice: F,
|
|
147
|
+
onDictate: J,
|
|
148
|
+
onProofread: O,
|
|
149
|
+
onAutoFormat: Q,
|
|
150
150
|
onTogglePin: g,
|
|
151
151
|
onToggleFlag: h,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
noteActions: V,
|
|
153
|
+
title: U,
|
|
154
|
+
composerPlaceholder: X,
|
|
155
|
+
addNoteLabel: Z,
|
|
156
|
+
emptyState: $,
|
|
157
|
+
className: ee,
|
|
157
158
|
"aria-label": C,
|
|
158
|
-
...
|
|
159
|
-
},
|
|
160
|
-
const { t: o } =
|
|
159
|
+
...te
|
|
160
|
+
}, ne) {
|
|
161
|
+
const { t: o } = me(), N = a(null), [d, w] = M(""), [v, j] = M(P), ie = U ?? o("notesPanel.title", { defaultValue: "Notes" }), H = le(), q = X ?? o("notesPanel.placeholder", { defaultValue: "Add a note…" }), K = o("notesPanel.composerLabel", {
|
|
161
162
|
defaultValue: "New note"
|
|
162
|
-
}),
|
|
163
|
+
}), re = f === "rich" ? z(d) : d.trim().length > 0, ae = ce(() => {
|
|
163
164
|
var e, t;
|
|
164
165
|
if (l) {
|
|
165
166
|
if (f === "rich") {
|
|
166
167
|
const i = ((e = N.current) == null ? void 0 : e.getHTML()) ?? d;
|
|
167
|
-
if (!
|
|
168
|
-
l({ content: i, clinical:
|
|
168
|
+
if (!z(i)) return;
|
|
169
|
+
l({ content: i, clinical: v }), (t = N.current) == null || t.clear();
|
|
169
170
|
} else {
|
|
170
171
|
const i = d.trim();
|
|
171
172
|
if (!i) return;
|
|
172
|
-
l({ content: i, clinical:
|
|
173
|
+
l({ content: i, clinical: v });
|
|
173
174
|
}
|
|
174
|
-
w(""),
|
|
175
|
+
w(""), j(P);
|
|
175
176
|
}
|
|
176
|
-
}, [f, d,
|
|
177
|
+
}, [f, d, v, P, l]), T = [...x].sort(
|
|
177
178
|
(e, t) => Number(t.pinned ?? !1) - Number(e.pinned ?? !1)
|
|
178
179
|
), R = a(null);
|
|
179
|
-
|
|
180
|
+
de(() => {
|
|
180
181
|
var e, t;
|
|
181
182
|
c && ((e = R.current) == null || e.scrollIntoView({ block: "center" }), (t = R.current) == null || t.focus());
|
|
182
|
-
}, [c,
|
|
183
|
-
const
|
|
184
|
-
|
|
183
|
+
}, [c, B]);
|
|
184
|
+
const _ = a(x);
|
|
185
|
+
_.current = x;
|
|
185
186
|
const u = a(l);
|
|
186
187
|
u.current = l;
|
|
187
|
-
const
|
|
188
|
-
|
|
188
|
+
const b = a(g);
|
|
189
|
+
b.current = g;
|
|
189
190
|
const y = a(h);
|
|
190
191
|
y.current = h;
|
|
191
192
|
const k = a(m);
|
|
192
193
|
k.current = m;
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
const
|
|
194
|
+
const A = a(c);
|
|
195
|
+
A.current = c;
|
|
196
|
+
const S = a(null);
|
|
197
|
+
ue(ne, () => S.current, []);
|
|
198
|
+
const se = pe(
|
|
198
199
|
() => ({
|
|
199
200
|
// Ids + flags only — never the note body or author (both PHI).
|
|
200
|
-
getNotes: () =>
|
|
201
|
+
getNotes: () => _.current.map((e) => ({
|
|
201
202
|
id: e.id,
|
|
202
203
|
pinned: !!e.pinned,
|
|
203
204
|
flagged: !!e.flagged,
|
|
@@ -205,14 +206,14 @@ const Se = se(
|
|
|
205
206
|
})),
|
|
206
207
|
canAddNote: () => !!u.current,
|
|
207
208
|
canAddClinical: () => k.current,
|
|
208
|
-
getCurrentNoteId: () =>
|
|
209
|
+
getCurrentNoteId: () => A.current ?? null,
|
|
209
210
|
addNote: (e) => {
|
|
210
211
|
var t;
|
|
211
212
|
e.clinical && !k.current || (t = u.current) == null || t.call(u, e);
|
|
212
213
|
},
|
|
213
214
|
togglePin: (e) => {
|
|
214
215
|
var t;
|
|
215
|
-
return (t =
|
|
216
|
+
return (t = b.current) == null ? void 0 : t.call(b, e);
|
|
216
217
|
},
|
|
217
218
|
toggleFlag: (e) => {
|
|
218
219
|
var t;
|
|
@@ -221,23 +222,23 @@ const Se = se(
|
|
|
221
222
|
}),
|
|
222
223
|
[]
|
|
223
224
|
);
|
|
224
|
-
return
|
|
225
|
+
return ge(Ne, se, s), /* @__PURE__ */ p(
|
|
225
226
|
"section",
|
|
226
227
|
{
|
|
227
|
-
ref:
|
|
228
|
+
ref: S,
|
|
228
229
|
"data-component": "notes-panel",
|
|
229
230
|
"data-component-id": s,
|
|
230
|
-
"aria-labelledby": C ? void 0 :
|
|
231
|
+
"aria-labelledby": C ? void 0 : H,
|
|
231
232
|
"aria-label": C,
|
|
232
|
-
className: ["ds:flex ds:flex-col",
|
|
233
|
-
...
|
|
233
|
+
className: ["ds:flex ds:flex-col", ee].filter(Boolean).join(" "),
|
|
234
|
+
...te,
|
|
234
235
|
children: [
|
|
235
236
|
/* @__PURE__ */ r(
|
|
236
|
-
|
|
237
|
+
Pe,
|
|
237
238
|
{
|
|
238
|
-
title:
|
|
239
|
-
icon: /* @__PURE__ */ r(
|
|
240
|
-
headingId: C ? void 0 :
|
|
239
|
+
title: ie,
|
|
240
|
+
icon: /* @__PURE__ */ r(Ce, { "aria-hidden": "true" }),
|
|
241
|
+
headingId: C ? void 0 : H,
|
|
241
242
|
sticky: !0,
|
|
242
243
|
divider: !0
|
|
243
244
|
}
|
|
@@ -245,33 +246,33 @@ const Se = se(
|
|
|
245
246
|
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
246
247
|
l ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
247
248
|
f === "rich" ? /* @__PURE__ */ r(
|
|
248
|
-
|
|
249
|
+
ve,
|
|
249
250
|
{
|
|
250
251
|
ref: N,
|
|
251
|
-
ariaLabel:
|
|
252
|
-
placeholder:
|
|
253
|
-
toolbar:
|
|
252
|
+
ariaLabel: K,
|
|
253
|
+
placeholder: q,
|
|
254
|
+
toolbar: L,
|
|
254
255
|
minHeight: "sm",
|
|
255
|
-
redactor:
|
|
256
|
-
imageUploadUrl:
|
|
256
|
+
redactor: W,
|
|
257
|
+
imageUploadUrl: E,
|
|
257
258
|
onChange: ({ html: e }) => w(e),
|
|
258
|
-
onRequestAiDraft:
|
|
259
|
-
aiDraftFormat:
|
|
260
|
-
aiPrivacyNotice:
|
|
261
|
-
onDictate:
|
|
262
|
-
onProofread:
|
|
263
|
-
onAutoFormat:
|
|
259
|
+
onRequestAiDraft: G,
|
|
260
|
+
aiDraftFormat: Y,
|
|
261
|
+
aiPrivacyNotice: F,
|
|
262
|
+
onDictate: J,
|
|
263
|
+
onProofread: O,
|
|
264
|
+
onAutoFormat: Q
|
|
264
265
|
}
|
|
265
266
|
) : /* @__PURE__ */ r(
|
|
266
267
|
be,
|
|
267
268
|
{
|
|
268
269
|
value: d,
|
|
269
270
|
onChange: (e) => w(e.target.value),
|
|
270
|
-
placeholder:
|
|
271
|
+
placeholder: q,
|
|
271
272
|
autoResize: !0,
|
|
272
273
|
minRows: 2,
|
|
273
274
|
maxRows: 6,
|
|
274
|
-
"aria-label":
|
|
275
|
+
"aria-label": K
|
|
275
276
|
}
|
|
276
277
|
),
|
|
277
278
|
/* @__PURE__ */ p(
|
|
@@ -283,35 +284,35 @@ const Se = se(
|
|
|
283
284
|
].join(" "),
|
|
284
285
|
children: [
|
|
285
286
|
I ? /* @__PURE__ */ r(
|
|
286
|
-
|
|
287
|
+
xe,
|
|
287
288
|
{
|
|
288
289
|
size: "sm",
|
|
289
290
|
label: o("notesPanel.clinicalToggle", {
|
|
290
291
|
defaultValue: "Clinical note"
|
|
291
292
|
}),
|
|
292
|
-
checked:
|
|
293
|
-
onCheckedChange: (e) =>
|
|
293
|
+
checked: v,
|
|
294
|
+
onCheckedChange: (e) => j(e === !0),
|
|
294
295
|
disabled: !m,
|
|
295
|
-
disabledReason: m ? void 0 :
|
|
296
|
+
disabledReason: m ? void 0 : D ?? o("notesPanel.clinicalGated", {
|
|
296
297
|
defaultValue: "You do not have permission to write clinical notes."
|
|
297
298
|
})
|
|
298
299
|
}
|
|
299
300
|
) : null,
|
|
300
301
|
/* @__PURE__ */ r(
|
|
301
|
-
|
|
302
|
+
ye,
|
|
302
303
|
{
|
|
303
304
|
type: "button",
|
|
304
305
|
size: "sm",
|
|
305
|
-
onClick:
|
|
306
|
-
disabled: !
|
|
307
|
-
children:
|
|
306
|
+
onClick: ae,
|
|
307
|
+
disabled: !re,
|
|
308
|
+
children: Z ?? o("notesPanel.add", { defaultValue: "Add note" })
|
|
308
309
|
}
|
|
309
310
|
)
|
|
310
311
|
]
|
|
311
312
|
}
|
|
312
313
|
)
|
|
313
314
|
] }) : null,
|
|
314
|
-
|
|
315
|
+
T.length > 0 ? /* @__PURE__ */ r("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: T.map((e, t) => {
|
|
315
316
|
const i = c != null && e.id === c;
|
|
316
317
|
return /* @__PURE__ */ p(
|
|
317
318
|
"li",
|
|
@@ -319,13 +320,13 @@ const Se = se(
|
|
|
319
320
|
ref: i ? R : void 0,
|
|
320
321
|
tabIndex: i ? -1 : void 0,
|
|
321
322
|
"aria-current": i ? "true" : void 0,
|
|
322
|
-
className:
|
|
323
|
+
className: we({ current: i }),
|
|
323
324
|
children: [
|
|
324
325
|
i ? /* @__PURE__ */ r("span", { className: "ds:sr-only", children: o("notesPanel.current", {
|
|
325
326
|
defaultValue: "Current note"
|
|
326
327
|
}) }) : null,
|
|
327
328
|
/* @__PURE__ */ r(
|
|
328
|
-
|
|
329
|
+
he,
|
|
329
330
|
{
|
|
330
331
|
surface: "elevated",
|
|
331
332
|
truncate: !i,
|
|
@@ -333,12 +334,13 @@ const Se = se(
|
|
|
333
334
|
onTogglePin: g && e.id ? () => g(e.id) : void 0,
|
|
334
335
|
onToggleFlag: h && e.id ? () => h(e.id) : void 0
|
|
335
336
|
}
|
|
336
|
-
)
|
|
337
|
+
),
|
|
338
|
+
V ? /* @__PURE__ */ r("div", { className: "ds:flex ds:justify-end ds:gap-[var(--spacing-2xs)] ds:pt-[var(--spacing-2xs)]", children: V(e) }) : null
|
|
337
339
|
]
|
|
338
340
|
},
|
|
339
341
|
e.id ?? t
|
|
340
342
|
);
|
|
341
|
-
}) }) :
|
|
343
|
+
}) }) : $ ?? /* @__PURE__ */ r("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: o("notesPanel.empty", { defaultValue: "No notes yet." }) })
|
|
342
344
|
] })
|
|
343
345
|
]
|
|
344
346
|
}
|
|
@@ -346,6 +348,6 @@ const Se = se(
|
|
|
346
348
|
}
|
|
347
349
|
);
|
|
348
350
|
export {
|
|
349
|
-
|
|
351
|
+
Me as N
|
|
350
352
|
};
|
|
351
|
-
//# sourceMappingURL=notes-panel-
|
|
353
|
+
//# sourceMappingURL=notes-panel-CymneXtl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notes-panel-CymneXtl.js","sources":["../../src/components/notes-panel/notes-panel.agent.ts","../../src/components/notes-panel/notes-panel.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — NotesPanel. */\n/* */\n/* The Notes tool: a composer over a note timeline. The agent reads the */\n/* timeline STRUCTURE (note ids + pinned / flagged / clinical flags — */\n/* never the note body or author, both PHI), composes and commits a new */\n/* note, and toggles a note's pinned / flagged state. `add_note` carries */\n/* the `phi` safety class: a note body is patient-identifiable clinical */\n/* content, so the host gates it behind the same confirm-before-act as a */\n/* destructive write and never auto-confirms. A clinical submission also */\n/* requires the host's `practice_add_clinical_note` permission (the */\n/* handle drops it when the gate is closed). Host-owned per-note */\n/* `noteActions` (edit, delete…) sit outside this handle — an agent */\n/* reaches them through the host's own adapters. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { NotesPanelHandle } from './notes-panel';\n\nexport const notesPanelAgent: AgentAdapter<NotesPanelHandle> = {\n id: 'notes-panel',\n // 'submit' backs add_note (compose + commit a note). pin / flag are toggles\n // with no dedicated capability in the closed vocabulary.\n capabilities: ['submit'],\n state: {\n notes: {\n type: 'Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean }>',\n descriptionKey: 'ui.agent.notesPanel.state.notes',\n description:\n 'Timeline note ids + pinned / flagged / clinical flags. Never the note body or author (both PHI).',\n read: (handle) => handle.getNotes(),\n },\n canAddClinical: {\n type: 'boolean',\n descriptionKey: 'ui.agent.notesPanel.state.canAddClinical',\n description:\n 'Whether the current user may write clinical notes (the practice_add_clinical_note permission gate).',\n read: (handle) => handle.canAddClinical(),\n },\n currentNoteId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.notesPanel.state.currentNoteId',\n description:\n 'Id of the note the host has addressed — the one marked, scrolled to and focused. Null when none is. An id only, never note content.',\n read: (handle) => handle.getCurrentNoteId(),\n },\n },\n actions: {\n add_note: {\n // Writes a clinical/admin note body — patient-identifiable content. PHI.\n safety: 'phi',\n argsType: '{ content: string; clinical: boolean }',\n argsSchema: {\n type: 'object',\n properties: {\n content: {\n type: 'string',\n description:\n 'Note body. Rich HTML for the rich composer, else plain text.',\n },\n clinical: {\n type: 'boolean',\n description:\n 'Whether the note is clinical. Requires the clinical-note permission; the submission is dropped when the gate is closed.',\n },\n },\n required: ['content', 'clinical'],\n },\n openWorld: true,\n descriptionKey: 'ui.agent.notesPanel.actions.addNote',\n description:\n 'Compose and commit a new note. A clinical note requires the clinical-note permission (read canAddClinical first).',\n examples: [\n {\n args: { content: 'Patient reported improvement.', clinical: true },\n note: 'Add a clinical note.',\n },\n ],\n invoke: (handle, args: { content: string; clinical: boolean }) => {\n handle.addNote(args);\n },\n },\n toggle_pin: {\n // Re-orders the timeline (pinned notes lead) — reversible view write.\n safety: 'write',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: false,\n descriptionKey: 'ui.agent.notesPanel.actions.togglePin',\n description: 'Toggle the pinned state of the note with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.togglePin(args.id);\n },\n },\n toggle_flag: {\n safety: 'write',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: false,\n descriptionKey: 'ui.agent.notesPanel.actions.toggleFlag',\n description: 'Toggle the flagged state of the note with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.toggleFlag(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'notes-panel',\n description: 'Marks the NotesPanel region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific notes panel from the agent.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { notesPanelAgent } from './notes-panel.agent';\nimport { ClinicalNoteCard } from '../clinical-note-card';\nimport type { ClinicalNoteCardProps } from '../clinical-note-card';\nimport { RichTextEditor } from '../rich-text-editor';\nimport type {\n RichTextEditorHandle,\n RichTextEditorProps,\n RichTextEditorToolbar,\n RedactorFactory,\n} from '../rich-text-editor';\nimport { TextArea } from '../text-area';\nimport { Button } from '../button';\nimport { Checkbox } from '../checkbox';\nimport { NotebookPen } from 'lucide-react';\nimport { PanelHeader } from '../panel-header';\n\n/* ------------------------------------------------------------------ */\n/* NotesPanel — the Notes tool for the Control Room rail. */\n/* */\n/* A composer over an elevated ClinicalNoteCard timeline. Drops */\n/* into a ControlRoomRail tool `panel`, the patient profile, or the */\n/* care-plan editor — anywhere notes about the open entity belong. */\n/* The composer is the kit RichTextEditor by default (degrades to a */\n/* textarea where Redactor is absent), carries a permission-gated */\n/* \"clinical note\" toggle, and forwards the editor's AI affordances. */\n/* The note attaches to whatever entity the host is showing — the */\n/* host owns the attachment; the panel only emits content + clinical. */\n/* Pinned notes lead; pin / flag are inline per-note toggles. */\n/* ------------------------------------------------------------------ */\n\n/**\n * One note in the panel — the data subset of `ClinicalNoteCard`.\n *\n * `aria-label` names the card for assistive tech. Set it whenever a row is not\n * a clinical note: the card's fallback name is \"Clinical note\", so an entry\n * that is something else (a dated event, an import) is announced as one.\n */\nexport type NotesPanelNote = Pick<\n ClinicalNoteCardProps,\n | 'id'\n | 'dateIso'\n | 'createdAtIso'\n | 'author'\n | 'clinical'\n | 'attachedTo'\n | 'content'\n | 'contentFormat'\n | 'pinned'\n | 'flagged'\n | 'aria-label'\n>;\n\n/**\n * Curated agent handle for NotesPanel. Reads the note timeline's STRUCTURE\n * (ids + pinned / flagged / clinical flags — never the note body or author,\n * both PHI) and drives the composer + per-note toggles. See\n * `notes-panel.agent.ts`.\n */\nexport interface NotesPanelHandle {\n /** Timeline snapshot — ids + flags only, never note content (PHI). */\n getNotes: () => Array<{\n id?: string;\n pinned: boolean;\n flagged: boolean;\n clinical: boolean;\n }>;\n /** Whether the composer is mounted (onAddNote is wired). */\n canAddNote: () => boolean;\n /** Whether clinical notes may be written (the permission gate). */\n canAddClinical: () => boolean;\n /** Id of the note the host has addressed, or null when none is. */\n getCurrentNoteId: () => string | null;\n /** Commit a new note with explicit content (mirrors the composer's submit). */\n addNote: (submission: NotesPanelSubmission) => void;\n /** Toggle a note's pinned state (mirrors onTogglePin). */\n togglePin: (id: string) => void;\n /** Toggle a note's flagged state (mirrors onToggleFlag). */\n toggleFlag: (id: string) => void;\n}\n\n/** Payload handed to `onAddNote` when the composer commits. */\nexport interface NotesPanelSubmission {\n /** The note body — rich HTML (`composer='rich'`) or plain text. */\n content: string;\n /** Whether the \"clinical note\" toggle was set. */\n clinical: boolean;\n}\n\nexport interface NotesPanelProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific notes panel.\n */\n id?: string;\n /** Notes to render, newest-first by convention. Pinned notes lead. */\n notes: NotesPanelNote[];\n /** Commit a new note. Omit to hide the composer (read-only timeline). */\n onAddNote?: (submission: NotesPanelSubmission) => void;\n /**\n * The note the reader ASKED for, addressed by id from somewhere else in the\n * record — a marker in a chart, a row in a grid, an agent. The panel marks\n * it, scrolls it to the middle of its own scroll region and moves focus to\n * it, and renders it unclamped so the thing that was asked for is readable\n * in full without a second click.\n *\n * Opening a panel is not the same as answering a question: a rail's\n * `setActiveTool` moves no focus and announces nothing, so a control whose\n * name promises \"in the notes panel\" produces no perceivable change for a\n * keyboard or screen-reader reader unless the panel lands them on the note.\n * That is what this prop is for; without it, a host has to reach into the\n * panel's DOM to do the same job.\n *\n * Marked on three channels, never colour alone (WCAG 1.4.1): a solid\n * inline-start bar the other notes do not have, a tinted gutter, and\n * `aria-current` plus a visually-hidden sentence naming the mark.\n *\n * Ids that match no note are ignored. To address the SAME note twice — the\n * reader pressing the same marker again after scrolling away — bump\n * `currentNoteKey` alongside it; this prop alone is a value, not a request.\n */\n currentNoteId?: string;\n /**\n * Bump on every address to re-scroll and re-focus the note in `currentNoteId`\n * even when the id has not changed.\n *\n * Addressing is a request, not a value: a reader who presses the same marker\n * a second time (having scrolled away, or having moved focus off the note) is\n * asking to be taken back, and a control whose name promises the notes panel\n * must do something perceivable every time it is pressed. Without this the\n * second press is inert — the panel is already showing that note, so nothing\n * re-runs. Hosts increment a counter in the same handler that opens the tool.\n */\n currentNoteKey?: string | number;\n\n /* ----- Composer ----- */\n /**\n * `'rich'` (default) mounts the kit `RichTextEditor` (Redactor; degrades to a\n * textarea where Redactor is absent). `'plain'` keeps a simple `TextArea` for\n * lightweight surfaces / deterministic tests.\n */\n composer?: 'rich' | 'plain';\n /** Toolbar preset for the rich composer. Defaults to `'standard'`. */\n editorToolbar?: RichTextEditorToolbar;\n /** Inject the Redactor factory for the rich composer (else `window.$R`). */\n redactor?: RedactorFactory;\n /** Consumer image-upload endpoint for the rich composer. */\n imageUploadUrl?: string;\n\n /* ----- Clinical flag (permission-gated) ----- */\n /** Show the \"clinical note\" toggle in the composer. Default `true`. */\n showClinicalToggle?: boolean;\n /**\n * Permission gate — when `false` the clinical toggle is disabled and shows\n * `clinicalGatedReason` on hover/focus. Mirrors platform's\n * `practice_add_clinical_note` permission. Default `true`.\n */\n canAddClinicalNote?: boolean;\n /** Tooltip shown when the clinical toggle is gated off. */\n clinicalGatedReason?: string;\n /** Initial state of the clinical toggle. Default `false`. */\n defaultClinical?: boolean;\n\n /* ----- AI assistance (forwarded to RichTextEditor) ----- */\n onRequestAiDraft?: RichTextEditorProps['onRequestAiDraft'];\n aiDraftFormat?: RichTextEditorProps['aiDraftFormat'];\n aiPrivacyNotice?: RichTextEditorProps['aiPrivacyNotice'];\n onDictate?: RichTextEditorProps['onDictate'];\n onProofread?: RichTextEditorProps['onProofread'];\n onAutoFormat?: RichTextEditorProps['onAutoFormat'];\n\n /* ----- Per-note actions ----- */\n /** Toggle a note's pinned state — renders an inline pin button per note. */\n onTogglePin?: (id: string) => void;\n /** Toggle a note's flagged state — renders an inline flag button per note. */\n onToggleFlag?: (id: string) => void;\n /**\n * Host-owned actions rendered under each note (edit, delete, share…),\n * aligned to the inline end. The host supplies labelled controls and owns\n * what they do — the panel stays a timeline and never edits a note itself.\n */\n noteActions?: (note: NotesPanelNote) => ReactNode;\n\n /* ----- Labels / chrome ----- */\n /** Panel heading. Defaults to the localised \"Notes\". */\n title?: string;\n /** Composer placeholder. */\n composerPlaceholder?: string;\n /** Save-button label. */\n addNoteLabel?: string;\n /** Rendered when there are no notes. */\n emptyState?: ReactNode;\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n}\n\n/* The timeline row. The addressed note wears a solid inline-start bar the\n others do not — a shape channel, so the mark is not colour alone. Every row\n reserves the bar's width in `transparent`, so marking one shifts nothing. */\nconst noteItemVariants = cva(\n 'ds:flex ds:flex-col ds:rounded-[var(--radius-md)] ds:border-s-2 ds:ps-[var(--spacing-sm)]',\n {\n variants: {\n current: {\n true: 'ds:border-[color:var(--info)] ds:bg-[color:var(--info)]/10 ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]',\n false: 'ds:border-transparent',\n },\n },\n defaultVariants: { current: false },\n },\n);\n\n/** Strip tags / entities to test whether a rich draft holds real content. */\nfunction hasRichContent(html: string): boolean {\n if (!html) return false;\n if (/<img\\b/i.test(html)) return true;\n return (\n html\n .replace(/<[^>]*>/g, '')\n .replace(/ /gi, ' ')\n .trim().length > 0\n );\n}\n\nexport const NotesPanel = forwardRef<HTMLElement, NotesPanelProps>(\n function NotesPanel(\n {\n id,\n notes,\n onAddNote,\n currentNoteId,\n currentNoteKey,\n composer = 'rich',\n editorToolbar = 'standard',\n redactor,\n imageUploadUrl,\n showClinicalToggle = true,\n canAddClinicalNote = true,\n clinicalGatedReason,\n defaultClinical = false,\n onRequestAiDraft,\n aiDraftFormat,\n aiPrivacyNotice,\n onDictate,\n onProofread,\n onAutoFormat,\n onTogglePin,\n onToggleFlag,\n noteActions,\n title,\n composerPlaceholder,\n addNoteLabel,\n emptyState,\n className,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) {\n const { t } = useTranslation();\n const editorRef = useRef<RichTextEditorHandle>(null);\n const [draft, setDraft] = useState('');\n const [clinical, setClinical] = useState(defaultClinical);\n\n const heading = title ?? t('notesPanel.title', { defaultValue: 'Notes' });\n const headingId = useId();\n const placeholder =\n composerPlaceholder ??\n t('notesPanel.placeholder', { defaultValue: 'Add a note…' });\n const composerLabel = t('notesPanel.composerLabel', {\n defaultValue: 'New note',\n });\n\n // Live content check: plain reads the draft directly; rich strips the draft\n // (debounced) for the disabled state but commits from the editor handle.\n const hasContent =\n composer === 'rich' ? hasRichContent(draft) : draft.trim().length > 0;\n\n const commit = useCallback(() => {\n if (!onAddNote) return;\n if (composer === 'rich') {\n const html = editorRef.current?.getHTML() ?? draft;\n if (!hasRichContent(html)) return;\n onAddNote({ content: html, clinical });\n editorRef.current?.clear();\n } else {\n const text = draft.trim();\n if (!text) return;\n onAddNote({ content: text, clinical });\n }\n setDraft('');\n setClinical(defaultClinical);\n }, [composer, draft, clinical, defaultClinical, onAddNote]);\n\n // Pinned notes lead; order within each group is preserved.\n const ordered = [...notes].sort(\n (a, b) => Number(b.pinned ?? false) - Number(a.pinned ?? false),\n );\n\n /* ----- The addressed note (see `currentNoteId`) ----- */\n const currentItemRef = useRef<HTMLLIElement>(null);\n useEffect(() => {\n if (!currentNoteId) return;\n // `center`, not `nearest`: nearest parks the note flush against the edge\n // of the scroll region, which is the least readable place to land.\n currentItemRef.current?.scrollIntoView({ block: 'center' });\n currentItemRef.current?.focus();\n // `currentNoteKey` is in the deps so a REPEAT address of the same note\n // re-runs — see the prop doc. Addressing is a request, not a value.\n }, [currentNoteId, currentNoteKey]);\n\n /* ----- Agent handle (structural reads + composer / toggles) ----- */\n const notesRef = useRef(notes);\n notesRef.current = notes;\n const onAddNoteRef = useRef(onAddNote);\n onAddNoteRef.current = onAddNote;\n const onTogglePinRef = useRef(onTogglePin);\n onTogglePinRef.current = onTogglePin;\n const onToggleFlagRef = useRef(onToggleFlag);\n onToggleFlagRef.current = onToggleFlag;\n const canAddClinicalRef = useRef(canAddClinicalNote);\n canAddClinicalRef.current = canAddClinicalNote;\n const currentNoteIdRef = useRef(currentNoteId);\n currentNoteIdRef.current = currentNoteId;\n\n const rootRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLElement, []);\n\n const handle = useMemo<NotesPanelHandle>(\n () => ({\n // Ids + flags only — never the note body or author (both PHI).\n getNotes: () =>\n notesRef.current.map((n) => ({\n id: n.id,\n pinned: !!n.pinned,\n flagged: !!n.flagged,\n clinical: !!n.clinical,\n })),\n canAddNote: () => !!onAddNoteRef.current,\n canAddClinical: () => canAddClinicalRef.current,\n getCurrentNoteId: () => currentNoteIdRef.current ?? null,\n addNote: (submission) => {\n // A clinical submission requires the permission gate to be open.\n if (submission.clinical && !canAddClinicalRef.current) return;\n onAddNoteRef.current?.(submission);\n },\n togglePin: (noteId) => onTogglePinRef.current?.(noteId),\n toggleFlag: (noteId) => onToggleFlagRef.current?.(noteId),\n }),\n [],\n );\n useAgentRegistration(notesPanelAgent, handle, id);\n\n return (\n <section\n ref={rootRef}\n data-component=\"notes-panel\"\n data-component-id={id}\n aria-labelledby={ariaLabel ? undefined : headingId}\n aria-label={ariaLabel}\n className={['ds:flex ds:flex-col', className].filter(Boolean).join(' ')}\n {...rest}\n >\n {/* Shared rail header — pins to the top of the panel's scroll region\n while the composer + note timeline scroll beneath it. The rail\n injects the favourite / close actions via PanelHeaderActionsProvider. */}\n <PanelHeader\n title={heading}\n icon={<NotebookPen aria-hidden=\"true\" />}\n headingId={ariaLabel ? undefined : headingId}\n sticky\n divider\n />\n\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]\">\n {onAddNote ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {composer === 'rich' ? (\n <RichTextEditor\n ref={editorRef}\n ariaLabel={composerLabel}\n placeholder={placeholder}\n toolbar={editorToolbar}\n minHeight=\"sm\"\n redactor={redactor}\n imageUploadUrl={imageUploadUrl}\n onChange={({ html }) => setDraft(html)}\n onRequestAiDraft={onRequestAiDraft}\n aiDraftFormat={aiDraftFormat}\n aiPrivacyNotice={aiPrivacyNotice}\n onDictate={onDictate}\n onProofread={onProofread}\n onAutoFormat={onAutoFormat}\n />\n ) : (\n <TextArea\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n placeholder={placeholder}\n autoResize\n minRows={2}\n maxRows={6}\n aria-label={composerLabel}\n />\n )}\n <div\n className={[\n 'ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]',\n showClinicalToggle ? 'ds:justify-between' : 'ds:justify-end',\n ].join(' ')}\n >\n {showClinicalToggle ? (\n <Checkbox\n size=\"sm\"\n label={t('notesPanel.clinicalToggle', {\n defaultValue: 'Clinical note',\n })}\n checked={clinical}\n onCheckedChange={(next) => setClinical(next === true)}\n disabled={!canAddClinicalNote}\n disabledReason={\n canAddClinicalNote\n ? undefined\n : (clinicalGatedReason ??\n t('notesPanel.clinicalGated', {\n defaultValue:\n 'You do not have permission to write clinical notes.',\n }))\n }\n />\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n onClick={commit}\n disabled={!hasContent}\n >\n {addNoteLabel ??\n t('notesPanel.add', { defaultValue: 'Add note' })}\n </Button>\n </div>\n </div>\n ) : null}\n\n {ordered.length > 0 ? (\n <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\">\n {ordered.map((note, index) => {\n const isCurrent =\n currentNoteId != null && note.id === currentNoteId;\n return (\n <li\n key={note.id ?? index}\n ref={isCurrent ? currentItemRef : undefined}\n // Focus lands on the row, not inside the card, so the\n // sentence below and `aria-current` are read out before the\n // note — and the rail's own Escape still bubbles.\n tabIndex={isCurrent ? -1 : undefined}\n aria-current={isCurrent ? 'true' : undefined}\n className={noteItemVariants({ current: isCurrent })}\n >\n {isCurrent ? (\n <span className=\"ds:sr-only\">\n {t('notesPanel.current', {\n defaultValue: 'Current note',\n })}\n </span>\n ) : null}\n {/* Elevated card per note; the list gap (not a separator)\n spaces them. Bodies clamp to five lines with read-more —\n except the addressed one, which is what the reader came\n for and opens in full. */}\n <ClinicalNoteCard\n surface=\"elevated\"\n truncate={!isCurrent}\n {...note}\n onTogglePin={\n onTogglePin && note.id\n ? () => onTogglePin(note.id as string)\n : undefined\n }\n onToggleFlag={\n onToggleFlag && note.id\n ? () => onToggleFlag(note.id as string)\n : undefined\n }\n />\n {noteActions ? (\n <div className=\"ds:flex ds:justify-end ds:gap-[var(--spacing-2xs)] ds:pt-[var(--spacing-2xs)]\">\n {noteActions(note)}\n </div>\n ) : null}\n </li>\n );\n })}\n </ul>\n ) : (\n (emptyState ?? (\n <p className=\"ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {t('notesPanel.empty', { defaultValue: 'No notes yet.' })}\n </p>\n ))\n )}\n </div>\n </section>\n );\n },\n);\n"],"names":["notesPanelAgent","handle","args","noteItemVariants","cva","hasRichContent","html","NotesPanel","forwardRef","id","notes","onAddNote","currentNoteId","currentNoteKey","composer","editorToolbar","redactor","imageUploadUrl","showClinicalToggle","canAddClinicalNote","clinicalGatedReason","defaultClinical","onRequestAiDraft","aiDraftFormat","aiPrivacyNotice","onDictate","onProofread","onAutoFormat","onTogglePin","onToggleFlag","noteActions","title","composerPlaceholder","addNoteLabel","emptyState","className","ariaLabel","rest","ref","t","useTranslation","editorRef","useRef","draft","setDraft","useState","clinical","setClinical","heading","headingId","useId","placeholder","composerLabel","hasContent","commit","useCallback","_a","_b","text","ordered","a","b","currentItemRef","useEffect","notesRef","onAddNoteRef","onTogglePinRef","onToggleFlagRef","canAddClinicalRef","currentNoteIdRef","rootRef","useImperativeHandle","useMemo","n","submission","noteId","useAgentRegistration","jsxs","jsx","PanelHeader","NotebookPen","RichTextEditor","TextArea","event","Checkbox","next","Button","note","index","isCurrent","ClinicalNoteCard"],"mappings":";;;;;;;;;;;;AAmBO,MAAMA,KAAkD;AAAA,EAC7D,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,QAAQ;AAAA,EACvB,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AA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 import { D as m } from "./dialog-UbKJCi1X.js";
|
|
|
5
5
|
import { B as z } from "./button-nJaPh_HC.js";
|
|
6
6
|
import { I as xe } from "./icon-button-DA2CAGHZ.js";
|
|
7
7
|
import { C as Y } from "./checkbox-BuZ1u__2.js";
|
|
8
|
-
import { a as Re } from "./whatsapp-button-
|
|
8
|
+
import { a as Re } from "./whatsapp-button-CuFIHJzG.js";
|
|
9
9
|
import { S as Z } from "./select-BW5ecXlX.js";
|
|
10
10
|
import { S as be } from "./switch-OILsBLWo.js";
|
|
11
11
|
import { A as _ } from "./alert-CiJT540z.js";
|
|
@@ -414,4 +414,4 @@ Me.displayName = "SignatureRequestModal";
|
|
|
414
414
|
export {
|
|
415
415
|
Me as S
|
|
416
416
|
};
|
|
417
|
-
//# sourceMappingURL=signature-request-
|
|
417
|
+
//# sourceMappingURL=signature-request-DVDTKLjM.js.map
|