@alfadocs/ui-kit-debug 1.1.0 → 1.2.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.
- package/dist/_chunks/notes-panel-CCz0J140.js +370 -0
- package/dist/_chunks/notes-panel-CCz0J140.js.map +1 -0
- package/dist/_chunks/sparkline-DJtZBe7O.js +501 -0
- package/dist/_chunks/sparkline-DJtZBe7O.js.map +1 -0
- package/dist/agent-catalog.json +27 -1
- package/dist/agent-i18n/en.json +4 -2
- 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 +45 -2
- package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.agent.d.ts.map +1 -1
- package/dist/components/sparkline/sparkline.d.ts +24 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +2 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +2 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +2 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +2 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +2 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +2 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +2 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +2 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +2 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +2 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +2 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +2 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +2 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +2 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +2 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +2 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +2 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +2 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +2 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +2 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +2 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +2 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +2 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +2 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +2 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +2 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +2 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +2 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +2 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +2 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +2 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +2 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +2 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +2 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +2 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +2 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/locales/ar.json +2 -0
- package/dist/locales/de.json +2 -0
- package/dist/locales/el.json +2 -0
- package/dist/locales/en.json +2 -0
- package/dist/locales/es.json +2 -0
- package/dist/locales/fr.json +2 -0
- package/dist/locales/hi.json +2 -0
- package/dist/locales/it.json +2 -0
- package/dist/locales/ja.json +2 -0
- package/dist/locales/nl.json +2 -0
- package/dist/locales/pl.json +2 -0
- package/dist/locales/pt.json +2 -0
- package/dist/locales/ro.json +2 -0
- package/dist/locales/ru.json +2 -0
- package/dist/locales/sq.json +2 -0
- package/dist/locales/sv.json +2 -0
- package/dist/locales/tr.json +2 -0
- package/dist/locales/zh.json +2 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/notes-panel-CTcOLLVo.js +0 -324
- package/dist/_chunks/notes-panel-CTcOLLVo.js.map +0 -1
- package/dist/_chunks/sparkline-DLq7xwic.js +0 -394
- package/dist/_chunks/sparkline-DLq7xwic.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfadocs/ui-kit-debug",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe. (debug build — identical runtime to @alfadocs/ui-kit, ships source maps for symbolication).",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import { jsxs as y, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as ne, useRef as o, useState as V, useId as ie, useCallback as ae, useImperativeHandle as re, useMemo as se } from "react";
|
|
3
|
-
import { useTranslation as oe } from "react-i18next";
|
|
4
|
-
import { u as le } from "./registry-DvAUVLHh.js";
|
|
5
|
-
import { C as ce } from "./clinical-note-card-D63x_AkK.js";
|
|
6
|
-
import { R as de } from "./rich-text-editor-CfeXPPWs.js";
|
|
7
|
-
import { T as pe } from "./text-area-Bt3p7Pt0.js";
|
|
8
|
-
import { B as ue } from "./button-CPGiR_bH.js";
|
|
9
|
-
import { C as me } from "./checkbox-BuZ1u__2.js";
|
|
10
|
-
import { P as ge } from "./panel-header-D313n_9-.js";
|
|
11
|
-
import { c as he } from "./createLucideIcon-DhHxpK9K.js";
|
|
12
|
-
/**
|
|
13
|
-
* @license lucide-react v1.22.0 - ISC
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the ISC license.
|
|
16
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
const fe = [
|
|
19
|
-
["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4", key: "re6nr2" }],
|
|
20
|
-
["path", { d: "M2 6h4", key: "aawbzj" }],
|
|
21
|
-
["path", { d: "M2 10h4", key: "l0bgd4" }],
|
|
22
|
-
["path", { d: "M2 14h4", key: "1gsvsf" }],
|
|
23
|
-
["path", { d: "M2 18h4", key: "1bu2t1" }],
|
|
24
|
-
[
|
|
25
|
-
"path",
|
|
26
|
-
{
|
|
27
|
-
d: "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",
|
|
28
|
-
key: "pqwjuv"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
], be = he("notebook-pen", fe), ye = {
|
|
32
|
-
id: "notes-panel",
|
|
33
|
-
// 'submit' backs add_note (compose + commit a note). pin / flag are toggles
|
|
34
|
-
// with no dedicated capability in the closed vocabulary.
|
|
35
|
-
capabilities: ["submit"],
|
|
36
|
-
state: {
|
|
37
|
-
notes: {
|
|
38
|
-
type: "Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean }>",
|
|
39
|
-
descriptionKey: "ui.agent.notesPanel.state.notes",
|
|
40
|
-
description: "Timeline note ids + pinned / flagged / clinical flags. Never the note body or author (both PHI).",
|
|
41
|
-
read: (n) => n.getNotes()
|
|
42
|
-
},
|
|
43
|
-
canAddClinical: {
|
|
44
|
-
type: "boolean",
|
|
45
|
-
descriptionKey: "ui.agent.notesPanel.state.canAddClinical",
|
|
46
|
-
description: "Whether the current user may write clinical notes (the practice_add_clinical_note permission gate).",
|
|
47
|
-
read: (n) => n.canAddClinical()
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
actions: {
|
|
51
|
-
add_note: {
|
|
52
|
-
// Writes a clinical/admin note body — patient-identifiable content. PHI.
|
|
53
|
-
safety: "phi",
|
|
54
|
-
argsType: "{ content: string; clinical: boolean }",
|
|
55
|
-
argsSchema: {
|
|
56
|
-
type: "object",
|
|
57
|
-
properties: {
|
|
58
|
-
content: {
|
|
59
|
-
type: "string",
|
|
60
|
-
description: "Note body. Rich HTML for the rich composer, else plain text."
|
|
61
|
-
},
|
|
62
|
-
clinical: {
|
|
63
|
-
type: "boolean",
|
|
64
|
-
description: "Whether the note is clinical. Requires the clinical-note permission; the submission is dropped when the gate is closed."
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
required: ["content", "clinical"]
|
|
68
|
-
},
|
|
69
|
-
openWorld: !0,
|
|
70
|
-
descriptionKey: "ui.agent.notesPanel.actions.addNote",
|
|
71
|
-
description: "Compose and commit a new note. A clinical note requires the clinical-note permission (read canAddClinical first).",
|
|
72
|
-
examples: [
|
|
73
|
-
{
|
|
74
|
-
args: { content: "Patient reported improvement.", clinical: !0 },
|
|
75
|
-
note: "Add a clinical note."
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
invoke: (n, a) => {
|
|
79
|
-
n.addNote(a);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
toggle_pin: {
|
|
83
|
-
// Re-orders the timeline (pinned notes lead) — reversible view write.
|
|
84
|
-
safety: "write",
|
|
85
|
-
argsType: "{ id: string }",
|
|
86
|
-
argsSchema: {
|
|
87
|
-
type: "object",
|
|
88
|
-
properties: { id: { type: "string" } },
|
|
89
|
-
required: ["id"]
|
|
90
|
-
},
|
|
91
|
-
idempotent: !1,
|
|
92
|
-
descriptionKey: "ui.agent.notesPanel.actions.togglePin",
|
|
93
|
-
description: "Toggle the pinned state of the note with the given id.",
|
|
94
|
-
invoke: (n, a) => {
|
|
95
|
-
n.togglePin(a.id);
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
toggle_flag: {
|
|
99
|
-
safety: "write",
|
|
100
|
-
argsType: "{ id: string }",
|
|
101
|
-
argsSchema: {
|
|
102
|
-
type: "object",
|
|
103
|
-
properties: { id: { type: "string" } },
|
|
104
|
-
required: ["id"]
|
|
105
|
-
},
|
|
106
|
-
idempotent: !1,
|
|
107
|
-
descriptionKey: "ui.agent.notesPanel.actions.toggleFlag",
|
|
108
|
-
description: "Toggle the flagged state of the note with the given id.",
|
|
109
|
-
invoke: (n, a) => {
|
|
110
|
-
n.toggleFlag(a.id);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
domHooks: {
|
|
115
|
-
root: {
|
|
116
|
-
attr: "data-component",
|
|
117
|
-
value: "notes-panel",
|
|
118
|
-
description: "Marks the NotesPanel region."
|
|
119
|
-
},
|
|
120
|
-
instanceId: {
|
|
121
|
-
attr: "data-component-id",
|
|
122
|
-
sourceProp: "id",
|
|
123
|
-
description: "Sourced from the id prop. Required to address a specific notes panel from the agent."
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
function T(n) {
|
|
128
|
-
return n ? /<img\b/i.test(n) ? !0 : n.replace(/<[^>]*>/g, "").replace(/ /gi, " ").trim().length > 0 : !1;
|
|
129
|
-
}
|
|
130
|
-
const _e = ne(
|
|
131
|
-
function({
|
|
132
|
-
id: a,
|
|
133
|
-
notes: v,
|
|
134
|
-
onAddNote: r,
|
|
135
|
-
composer: p = "rich",
|
|
136
|
-
editorToolbar: z = "standard",
|
|
137
|
-
redactor: A,
|
|
138
|
-
imageUploadUrl: K,
|
|
139
|
-
showClinicalToggle: w = !0,
|
|
140
|
-
canAddClinicalNote: u = !0,
|
|
141
|
-
clinicalGatedReason: S,
|
|
142
|
-
defaultClinical: x = !1,
|
|
143
|
-
onRequestAiDraft: L,
|
|
144
|
-
aiDraftFormat: B,
|
|
145
|
-
aiPrivacyNotice: W,
|
|
146
|
-
onDictate: D,
|
|
147
|
-
onProofread: E,
|
|
148
|
-
onAutoFormat: G,
|
|
149
|
-
onTogglePin: m,
|
|
150
|
-
onToggleFlag: g,
|
|
151
|
-
title: Y,
|
|
152
|
-
composerPlaceholder: F,
|
|
153
|
-
addNoteLabel: J,
|
|
154
|
-
emptyState: O,
|
|
155
|
-
className: Q,
|
|
156
|
-
"aria-label": P,
|
|
157
|
-
...U
|
|
158
|
-
}, X) {
|
|
159
|
-
const { t: s } = oe(), k = o(null), [l, N] = V(""), [h, R] = V(x), Z = Y ?? s("notesPanel.title", { defaultValue: "Notes" }), j = ie(), M = F ?? s("notesPanel.placeholder", { defaultValue: "Add a note…" }), H = s("notesPanel.composerLabel", {
|
|
160
|
-
defaultValue: "New note"
|
|
161
|
-
}), $ = p === "rich" ? T(l) : l.trim().length > 0, ee = ae(() => {
|
|
162
|
-
var e, t;
|
|
163
|
-
if (r) {
|
|
164
|
-
if (p === "rich") {
|
|
165
|
-
const d = ((e = k.current) == null ? void 0 : e.getHTML()) ?? l;
|
|
166
|
-
if (!T(d)) return;
|
|
167
|
-
r({ content: d, clinical: h }), (t = k.current) == null || t.clear();
|
|
168
|
-
} else {
|
|
169
|
-
const d = l.trim();
|
|
170
|
-
if (!d) return;
|
|
171
|
-
r({ content: d, clinical: h });
|
|
172
|
-
}
|
|
173
|
-
N(""), R(x);
|
|
174
|
-
}
|
|
175
|
-
}, [p, l, h, x, r]), _ = [...v].sort(
|
|
176
|
-
(e, t) => Number(t.pinned ?? !1) - Number(e.pinned ?? !1)
|
|
177
|
-
), q = o(v);
|
|
178
|
-
q.current = v;
|
|
179
|
-
const c = o(r);
|
|
180
|
-
c.current = r;
|
|
181
|
-
const f = o(m);
|
|
182
|
-
f.current = m;
|
|
183
|
-
const b = o(g);
|
|
184
|
-
b.current = g;
|
|
185
|
-
const C = o(u);
|
|
186
|
-
C.current = u;
|
|
187
|
-
const I = o(null);
|
|
188
|
-
re(X, () => I.current, []);
|
|
189
|
-
const te = se(
|
|
190
|
-
() => ({
|
|
191
|
-
// Ids + flags only — never the note body or author (both PHI).
|
|
192
|
-
getNotes: () => q.current.map((e) => ({
|
|
193
|
-
id: e.id,
|
|
194
|
-
pinned: !!e.pinned,
|
|
195
|
-
flagged: !!e.flagged,
|
|
196
|
-
clinical: !!e.clinical
|
|
197
|
-
})),
|
|
198
|
-
canAddNote: () => !!c.current,
|
|
199
|
-
canAddClinical: () => C.current,
|
|
200
|
-
addNote: (e) => {
|
|
201
|
-
var t;
|
|
202
|
-
e.clinical && !C.current || (t = c.current) == null || t.call(c, e);
|
|
203
|
-
},
|
|
204
|
-
togglePin: (e) => {
|
|
205
|
-
var t;
|
|
206
|
-
return (t = f.current) == null ? void 0 : t.call(f, e);
|
|
207
|
-
},
|
|
208
|
-
toggleFlag: (e) => {
|
|
209
|
-
var t;
|
|
210
|
-
return (t = b.current) == null ? void 0 : t.call(b, e);
|
|
211
|
-
}
|
|
212
|
-
}),
|
|
213
|
-
[]
|
|
214
|
-
);
|
|
215
|
-
return le(ye, te, a), /* @__PURE__ */ y(
|
|
216
|
-
"section",
|
|
217
|
-
{
|
|
218
|
-
ref: I,
|
|
219
|
-
"data-component": "notes-panel",
|
|
220
|
-
"data-component-id": a,
|
|
221
|
-
"aria-labelledby": P ? void 0 : j,
|
|
222
|
-
"aria-label": P,
|
|
223
|
-
className: ["ds:flex ds:flex-col", Q].filter(Boolean).join(" "),
|
|
224
|
-
...U,
|
|
225
|
-
children: [
|
|
226
|
-
/* @__PURE__ */ i(
|
|
227
|
-
ge,
|
|
228
|
-
{
|
|
229
|
-
title: Z,
|
|
230
|
-
icon: /* @__PURE__ */ i(be, { "aria-hidden": "true" }),
|
|
231
|
-
headingId: P ? void 0 : j,
|
|
232
|
-
sticky: !0,
|
|
233
|
-
divider: !0
|
|
234
|
-
}
|
|
235
|
-
),
|
|
236
|
-
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
237
|
-
r ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
238
|
-
p === "rich" ? /* @__PURE__ */ i(
|
|
239
|
-
de,
|
|
240
|
-
{
|
|
241
|
-
ref: k,
|
|
242
|
-
ariaLabel: H,
|
|
243
|
-
placeholder: M,
|
|
244
|
-
toolbar: z,
|
|
245
|
-
minHeight: "sm",
|
|
246
|
-
redactor: A,
|
|
247
|
-
imageUploadUrl: K,
|
|
248
|
-
onChange: ({ html: e }) => N(e),
|
|
249
|
-
onRequestAiDraft: L,
|
|
250
|
-
aiDraftFormat: B,
|
|
251
|
-
aiPrivacyNotice: W,
|
|
252
|
-
onDictate: D,
|
|
253
|
-
onProofread: E,
|
|
254
|
-
onAutoFormat: G
|
|
255
|
-
}
|
|
256
|
-
) : /* @__PURE__ */ i(
|
|
257
|
-
pe,
|
|
258
|
-
{
|
|
259
|
-
value: l,
|
|
260
|
-
onChange: (e) => N(e.target.value),
|
|
261
|
-
placeholder: M,
|
|
262
|
-
autoResize: !0,
|
|
263
|
-
minRows: 2,
|
|
264
|
-
maxRows: 6,
|
|
265
|
-
"aria-label": H
|
|
266
|
-
}
|
|
267
|
-
),
|
|
268
|
-
/* @__PURE__ */ y(
|
|
269
|
-
"div",
|
|
270
|
-
{
|
|
271
|
-
className: [
|
|
272
|
-
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
273
|
-
w ? "ds:justify-between" : "ds:justify-end"
|
|
274
|
-
].join(" "),
|
|
275
|
-
children: [
|
|
276
|
-
w ? /* @__PURE__ */ i(
|
|
277
|
-
me,
|
|
278
|
-
{
|
|
279
|
-
size: "sm",
|
|
280
|
-
label: s("notesPanel.clinicalToggle", {
|
|
281
|
-
defaultValue: "Clinical note"
|
|
282
|
-
}),
|
|
283
|
-
checked: h,
|
|
284
|
-
onCheckedChange: (e) => R(e === !0),
|
|
285
|
-
disabled: !u,
|
|
286
|
-
disabledReason: u ? void 0 : S ?? s("notesPanel.clinicalGated", {
|
|
287
|
-
defaultValue: "You do not have permission to write clinical notes."
|
|
288
|
-
})
|
|
289
|
-
}
|
|
290
|
-
) : null,
|
|
291
|
-
/* @__PURE__ */ i(
|
|
292
|
-
ue,
|
|
293
|
-
{
|
|
294
|
-
type: "button",
|
|
295
|
-
size: "sm",
|
|
296
|
-
onClick: ee,
|
|
297
|
-
disabled: !$,
|
|
298
|
-
children: J ?? s("notesPanel.add", { defaultValue: "Add note" })
|
|
299
|
-
}
|
|
300
|
-
)
|
|
301
|
-
]
|
|
302
|
-
}
|
|
303
|
-
)
|
|
304
|
-
] }) : null,
|
|
305
|
-
_.length > 0 ? /* @__PURE__ */ i("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: _.map((e, t) => /* @__PURE__ */ i("li", { className: "ds:flex ds:flex-col", children: /* @__PURE__ */ i(
|
|
306
|
-
ce,
|
|
307
|
-
{
|
|
308
|
-
surface: "elevated",
|
|
309
|
-
truncate: !0,
|
|
310
|
-
...e,
|
|
311
|
-
onTogglePin: m && e.id ? () => m(e.id) : void 0,
|
|
312
|
-
onToggleFlag: g && e.id ? () => g(e.id) : void 0
|
|
313
|
-
}
|
|
314
|
-
) }, e.id ?? t)) }) : O ?? /* @__PURE__ */ i("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: s("notesPanel.empty", { defaultValue: "No notes yet." }) })
|
|
315
|
-
] })
|
|
316
|
-
]
|
|
317
|
-
}
|
|
318
|
-
);
|
|
319
|
-
}
|
|
320
|
-
);
|
|
321
|
-
export {
|
|
322
|
-
_e as N
|
|
323
|
-
};
|
|
324
|
-
//# sourceMappingURL=notes-panel-CTcOLLVo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notes-panel-CTcOLLVo.js","sources":["../../node_modules/lucide-react/dist/esm/icons/notebook-pen.mjs","../../src/components/notes-panel/notes-panel.agent.ts","../../src/components/notes-panel/notes-panel.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4\", key: \"re6nr2\" }],\n [\"path\", { d: \"M2 6h4\", key: \"aawbzj\" }],\n [\"path\", { d: \"M2 10h4\", key: \"l0bgd4\" }],\n [\"path\", { d: \"M2 14h4\", key: \"1gsvsf\" }],\n [\"path\", { d: \"M2 18h4\", key: \"1bu2t1\" }],\n [\n \"path\",\n {\n d: \"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z\",\n key: \"pqwjuv\"\n }\n ]\n];\nconst NotebookPen = createLucideIcon(\"notebook-pen\", __iconNode);\n\nexport { __iconNode, NotebookPen as default };\n//# sourceMappingURL=notebook-pen.mjs.map\n","/* -------------------------------------------------------------------- */\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). */\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 },\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 useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\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/** One note in the panel — the data subset of `ClinicalNoteCard`. */\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>;\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 /** 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 /* ----- 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 /* ----- 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/** 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 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 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 /* ----- 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\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 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 <li key={note.id ?? index} className=\"ds:flex ds:flex-col\">\n {/* Elevated card per note; the list gap (not a separator)\n spaces them. Bodies clamp to five lines with read-more —\n the timeline is a read-only display surface. */}\n <ClinicalNoteCard\n surface=\"elevated\"\n truncate\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 </li>\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":["__iconNode","NotebookPen","createLucideIcon","notesPanelAgent","handle","args","hasRichContent","html","NotesPanel","forwardRef","id","notes","onAddNote","composer","editorToolbar","redactor","imageUploadUrl","showClinicalToggle","canAddClinicalNote","clinicalGatedReason","defaultClinical","onRequestAiDraft","aiDraftFormat","aiPrivacyNotice","onDictate","onProofread","onAutoFormat","onTogglePin","onToggleFlag","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","notesRef","onAddNoteRef","onTogglePinRef","onToggleFlagRef","canAddClinicalRef","rootRef","useImperativeHandle","useMemo","n","submission","noteId","useAgentRegistration","jsxs","jsx","PanelHeader","RichTextEditor","TextArea","event","Checkb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