@alfadocs/ui-kit 1.134.0 → 1.135.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/ai-summary-panel-B70S2lgC.js +455 -0
- package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CtwhdASP.js} +3 -3
- package/dist/_chunks/{appointment-card-DG3m9yN-.js → appointment-card-BT1cMZIX.js} +2 -2
- package/dist/_chunks/{appointment-peek-BK0tDs4C.js → appointment-peek-BP_ACFz5.js} +2 -2
- package/dist/_chunks/{appointment-timeline-BiI2riRZ.js → appointment-timeline-Dy4YQJ17.js} +2 -2
- package/dist/_chunks/{appointment-tray-ClJCtYQj.js → appointment-tray-B3gSHL1j.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-BSkIYGlW.js → calendar-appointment-editor-dialog-I5PfWudy.js} +8 -8
- package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
- package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-CX4dxBq7.js} +85 -84
- package/dist/_chunks/communications-panel-BKPHCiMB.js +973 -0
- package/dist/_chunks/{entity-summary-KHM0PnSI.js → entity-summary-CpNk6ybN.js} +70 -69
- package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
- package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
- package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
- package/dist/_chunks/{notes-panel-BAyPOr8N.js → notes-panel-BvjAo4RQ.js} +5 -4
- package/dist/_chunks/{patient-account-settings-BkAtIxJW.js → patient-account-settings-B2XbN_Fe.js} +2 -2
- package/dist/_chunks/{patient-check-in-resume-xhqjC6gf.js → patient-check-in-resume-B7NY-6KI.js} +4 -4
- package/dist/_chunks/{portal-details-CTEsm705.js → portal-details-DCIiGkHA.js} +2 -2
- package/dist/_chunks/{portal-documents-D8skew0h.js → portal-documents-DJOH8pZx.js} +2 -2
- package/dist/_chunks/{portal-parts-BdR29P7z.js → portal-parts-Br8wuala.js} +2 -2
- package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
- package/dist/_chunks/{task-editor-g1AGfxhr.js → task-editor-DvwqPfFR.js} +3 -2
- package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-6EzdnwT8.js} +155 -171
- package/dist/_chunks/{use-appointment-details-read-Dzc6fEzG.js → use-appointment-details-read-6_OmOwUs.js} +110 -109
- package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
- package/dist/agent-catalog.json +251 -1
- package/dist/agent-i18n/en.json +28 -0
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/sms-segments.d.ts +43 -0
- package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
- package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +71 -0
- package/dist/components/ai-summary-panel/index.d.ts +4 -0
- package/dist/components/ai-summary-panel/index.js +6 -0
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +7 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/chat-input/chat-input.d.ts +3 -0
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
- package/dist/components/communications-panel/communications-panel.d.ts +136 -0
- package/dist/components/communications-panel/index.d.ts +6 -0
- package/dist/components/communications-panel/index.js +7 -0
- package/dist/components/entity-summary/entity-summary.d.ts +8 -0
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +10 -4
- package/dist/i18n/locales/ar.d.ts +93 -0
- package/dist/i18n/locales/ar.js +94 -0
- package/dist/i18n/locales/de.d.ts +93 -0
- package/dist/i18n/locales/de.js +94 -0
- package/dist/i18n/locales/el.d.ts +93 -0
- package/dist/i18n/locales/el.js +94 -0
- package/dist/i18n/locales/en.d.ts +93 -0
- package/dist/i18n/locales/en.js +94 -0
- package/dist/i18n/locales/es.d.ts +93 -0
- package/dist/i18n/locales/es.js +94 -0
- package/dist/i18n/locales/fr.d.ts +93 -0
- package/dist/i18n/locales/fr.js +94 -0
- package/dist/i18n/locales/hi.d.ts +93 -0
- package/dist/i18n/locales/hi.js +94 -0
- package/dist/i18n/locales/it.d.ts +93 -0
- package/dist/i18n/locales/it.js +94 -0
- package/dist/i18n/locales/ja.d.ts +93 -0
- package/dist/i18n/locales/ja.js +94 -0
- package/dist/i18n/locales/nl.d.ts +93 -0
- package/dist/i18n/locales/nl.js +94 -0
- package/dist/i18n/locales/pl.d.ts +93 -0
- package/dist/i18n/locales/pl.js +94 -0
- package/dist/i18n/locales/pt.d.ts +93 -0
- package/dist/i18n/locales/pt.js +94 -0
- package/dist/i18n/locales/ro.d.ts +93 -0
- package/dist/i18n/locales/ro.js +94 -0
- package/dist/i18n/locales/ru.d.ts +93 -0
- package/dist/i18n/locales/ru.js +94 -0
- package/dist/i18n/locales/sq.d.ts +93 -0
- package/dist/i18n/locales/sq.js +94 -0
- package/dist/i18n/locales/sv.d.ts +93 -0
- package/dist/i18n/locales/sv.js +94 -0
- package/dist/i18n/locales/tr.d.ts +93 -0
- package/dist/i18n/locales/tr.js +94 -0
- package/dist/i18n/locales/zh.d.ts +93 -0
- package/dist/i18n/locales/zh.js +94 -0
- package/dist/index.js +893 -886
- package/dist/locales/ar.json +93 -0
- package/dist/locales/de.json +93 -0
- package/dist/locales/el.json +93 -0
- package/dist/locales/en.json +93 -0
- package/dist/locales/es.json +93 -0
- package/dist/locales/fr.json +93 -0
- package/dist/locales/hi.json +93 -0
- package/dist/locales/it.json +93 -0
- package/dist/locales/ja.json +93 -0
- package/dist/locales/nl.json +93 -0
- package/dist/locales/pl.json +93 -0
- package/dist/locales/pt.json +93 -0
- package/dist/locales/ro.json +93 -0
- package/dist/locales/ru.json +93 -0
- package/dist/locales/sq.json +93 -0
- package/dist/locales/sv.json +93 -0
- package/dist/locales/tr.json +93 -0
- package/dist/locales/zh.json +93 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/patterns/signing/index.d.ts +1 -0
- package/dist/patterns/signing/index.js +1 -1
- package/dist/patterns/signing/multi-field-signer.d.ts +22 -1
- package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
- package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
- package/dist/patterns/signing/signing-document-screen.d.ts +18 -1
- package/dist/tokens.css +1 -1
- package/package.json +9 -1
- package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
- package/dist/_chunks/signing-end-screen-an9P8DOT.js +0 -1041
|
@@ -31,6 +31,9 @@ export interface ChatInputProps extends NativeTextareaProps, VariantProps<typeof
|
|
|
31
31
|
accept?: string;
|
|
32
32
|
/** Controls whether the textarea is disabled and submit is blocked. */
|
|
33
33
|
disabled?: boolean;
|
|
34
|
+
/** Disables only the Send button (the textarea stays editable), and blocks
|
|
35
|
+
* submit. Use it when the host owns a rule such as an over-long draft. */
|
|
36
|
+
submitDisabled?: boolean;
|
|
34
37
|
/** Optional slot placed between the textarea and the send button. */
|
|
35
38
|
toolbar?: ReactNode;
|
|
36
39
|
/** Visible label above the textarea. When omitted, a visually-hidden label is used. */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentAdapter } from '../../agent/types';
|
|
2
|
+
import type { CommunicationsPanelHandle } from './communications-panel';
|
|
3
|
+
export declare const communicationsPanelAgent: AgentAdapter<CommunicationsPanelHandle>;
|
|
4
|
+
//# sourceMappingURL=communications-panel.agent.d.ts.map
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
/** A channel a message travelled by. Platform: the logged message type. */
|
|
3
|
+
export type CommsChannel = 'app' | 'sms' | 'email' | 'whatsapp';
|
|
4
|
+
/** The channels the composer can send by. WhatsApp is a hand-off. */
|
|
5
|
+
export type CommsSendChannel = 'app' | 'sms' | 'email';
|
|
6
|
+
/** Delivery state of an SMS the practice sent. */
|
|
7
|
+
export type CommsSmsStatus = 'sending' | 'awaiting' | 'delivered' | 'not-delivered' | 'out-of-credit';
|
|
8
|
+
/** What caused a message the practice did not type by hand. */
|
|
9
|
+
export type CommsProvenanceKind = 'campaign' | 'workflow' | 'document-share';
|
|
10
|
+
/** One message in the thread. */
|
|
11
|
+
export interface CommsMessage {
|
|
12
|
+
id: string;
|
|
13
|
+
/** `out`: the practice wrote it. `in`: the patient wrote it. */
|
|
14
|
+
direction: 'out' | 'in';
|
|
15
|
+
channel: CommsChannel;
|
|
16
|
+
/** ISO-8601 instant the message was logged. */
|
|
17
|
+
createdAtIso: string;
|
|
18
|
+
/** Plain text. The only body an SMS shows, and the fallback for the rest. */
|
|
19
|
+
body: string;
|
|
20
|
+
/**
|
|
21
|
+
* HTML body (App, email, WhatsApp rows only). Sanitised by `SafeHtml`
|
|
22
|
+
* with the `email` profile. An SMS row ignores it.
|
|
23
|
+
*/
|
|
24
|
+
bodyHtml?: string;
|
|
25
|
+
/** Where an outgoing message went (a number or an address). */
|
|
26
|
+
recipient?: string;
|
|
27
|
+
/** Not seen yet. The panel marks it with a "New" badge on this view. */
|
|
28
|
+
isNew?: boolean;
|
|
29
|
+
/** Delivery state. Shown for outgoing SMS only. */
|
|
30
|
+
smsStatus?: CommsSmsStatus;
|
|
31
|
+
/** A campaign, workflow or shared document sent this message. */
|
|
32
|
+
provenance?: {
|
|
33
|
+
kind: CommsProvenanceKind;
|
|
34
|
+
id?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
};
|
|
37
|
+
/** A shared document, shown as a file tile. */
|
|
38
|
+
attachment?: {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Whether the practice can use one channel for this patient. */
|
|
44
|
+
export interface CommsChannelState {
|
|
45
|
+
available: boolean;
|
|
46
|
+
/** Where a message goes: the mobile number or the address. */
|
|
47
|
+
recipient?: string;
|
|
48
|
+
}
|
|
49
|
+
/** The practice's WhatsApp set-up for this patient. */
|
|
50
|
+
export type CommsWhatsAppState = 'off' | 'no-phone' | 'no-sms-phone' | 'ready';
|
|
51
|
+
export interface CommsSendRequest {
|
|
52
|
+
channel: CommsSendChannel;
|
|
53
|
+
body: string;
|
|
54
|
+
}
|
|
55
|
+
/** A write the host refused, as `onWriteError` hears it. */
|
|
56
|
+
export interface CommunicationsPanelWriteFailure {
|
|
57
|
+
/** `send` is the composer; `mark-seen` is the unread flag. */
|
|
58
|
+
kind: 'send' | 'mark-seen';
|
|
59
|
+
/** The channel written to. Absent for `mark-seen`. */
|
|
60
|
+
id?: string;
|
|
61
|
+
/** What the handler rejected or threw with. */
|
|
62
|
+
error: unknown;
|
|
63
|
+
/** Whether the panel told the reader. A failed `mark-seen` is silent. */
|
|
64
|
+
shown: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Curated agent handle. Structural state only: counts and flags, never a
|
|
68
|
+
* message body or recipient. The writes reject, without calling the host,
|
|
69
|
+
* on a read-only panel or under privacy.
|
|
70
|
+
*/
|
|
71
|
+
export interface CommunicationsPanelHandle {
|
|
72
|
+
getState: () => {
|
|
73
|
+
channel: CommsSendChannel | null;
|
|
74
|
+
messageCount: number;
|
|
75
|
+
unreadCount: number;
|
|
76
|
+
status: 'ready' | 'loading' | 'error';
|
|
77
|
+
limitReached: boolean;
|
|
78
|
+
privacy: boolean;
|
|
79
|
+
};
|
|
80
|
+
selectChannel: (channel: CommsSendChannel) => Promise<void>;
|
|
81
|
+
markSeen: () => Promise<void>;
|
|
82
|
+
sendMessage: (request: CommsSendRequest) => Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
export interface CommunicationsPanelProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {
|
|
85
|
+
/** Stable instance id, emitted as `data-component-id`. */
|
|
86
|
+
id?: string;
|
|
87
|
+
/** Panel title. Defaults to the localised "Communications". */
|
|
88
|
+
title?: string;
|
|
89
|
+
'aria-label'?: string;
|
|
90
|
+
/** "Now" as an ISO-8601 instant. Day separators drop the year this year. */
|
|
91
|
+
nowIso?: string;
|
|
92
|
+
/** BCP-47 locale for dates. Defaults to the active language. */
|
|
93
|
+
locale?: string;
|
|
94
|
+
/** The thread, in any order. The panel shows it oldest first. */
|
|
95
|
+
messages: CommsMessage[];
|
|
96
|
+
/** The host's read. `'loading'` and `'error'` replace the thread. */
|
|
97
|
+
status?: 'ready' | 'loading' | 'error';
|
|
98
|
+
/** Retry a failed read. Renders the retry button in the error face. */
|
|
99
|
+
onRetry?: () => void;
|
|
100
|
+
/** Which channels the practice can use for this patient. */
|
|
101
|
+
channels: Record<CommsSendChannel, CommsChannelState>;
|
|
102
|
+
/** The channel the composer opens on, when it is available. */
|
|
103
|
+
defaultChannel?: CommsSendChannel;
|
|
104
|
+
/** The practice sender name, added to the end of every SMS. */
|
|
105
|
+
senderName: string;
|
|
106
|
+
/** The staff user sent too many SMS or emails in 24 hours. App stays. */
|
|
107
|
+
limitReached?: boolean;
|
|
108
|
+
/** WhatsApp set-up. Omit to leave the WhatsApp action out. */
|
|
109
|
+
whatsApp?: CommsWhatsAppState;
|
|
110
|
+
/** Privacy mode: the thread and composer are withheld, not mounted. */
|
|
111
|
+
privacy?: boolean;
|
|
112
|
+
/** Hide the composer and the enable prompts. The handle writes reject. */
|
|
113
|
+
readOnly?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Send a message. Return a promise to keep the draft until the host has
|
|
116
|
+
* sent it: a rejection keeps the text and shows the error. A rejection
|
|
117
|
+
* with `status: 429` also marks the limit as reached.
|
|
118
|
+
*/
|
|
119
|
+
onSend?: (request: CommsSendRequest) => void | Promise<void>;
|
|
120
|
+
/** The reader saw these unread messages. The host clears its unread flag. */
|
|
121
|
+
onMessagesSeen?: (ids: string[]) => void | Promise<void>;
|
|
122
|
+
/** A write the host refused. Toast it when `shown` is false. */
|
|
123
|
+
onWriteError?: (failure: CommunicationsPanelWriteFailure) => void;
|
|
124
|
+
/** Open the host's way to enable a channel (patient edit, invitation). */
|
|
125
|
+
onEnableChannel?: (channel: CommsSendChannel) => void;
|
|
126
|
+
/** Open the host's WhatsApp message picker. */
|
|
127
|
+
onOpenWhatsApp?: () => void;
|
|
128
|
+
/** Open the host's WhatsApp purchase flow. */
|
|
129
|
+
onBuyWhatsApp?: () => void;
|
|
130
|
+
/** Open the campaign, workflow or document behind a message. */
|
|
131
|
+
onOpenProvenance?: (kind: CommsProvenanceKind, id?: string) => void;
|
|
132
|
+
/** Open a shared document. */
|
|
133
|
+
onOpenAttachment?: (id: string) => void;
|
|
134
|
+
}
|
|
135
|
+
export declare const CommunicationsPanel: import("react").ForwardRefExoticComponent<CommunicationsPanelProps & import("react").RefAttributes<HTMLElement>>;
|
|
136
|
+
//# sourceMappingURL=communications-panel.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CommunicationsPanel } from './communications-panel';
|
|
2
|
+
export type { CommunicationsPanelProps, CommunicationsPanelHandle, CommunicationsPanelWriteFailure, CommsChannel, CommsSendChannel, CommsSendRequest, CommsSmsStatus, CommsProvenanceKind, CommsMessage, CommsChannelState, CommsWhatsAppState, } from './communications-panel';
|
|
3
|
+
export { communicationsPanelAgent } from './communications-panel.agent';
|
|
4
|
+
export { smsMessageInfo } from '../_shared/sms-segments';
|
|
5
|
+
export type { SmsMessageInfo } from '../_shared/sms-segments';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -85,6 +85,14 @@ export interface EntitySummaryProps extends Omit<HTMLAttributes<HTMLElement>, 't
|
|
|
85
85
|
disclaimer?: ReactNode;
|
|
86
86
|
/** BCP-47 locale for the generated-at timestamp. */
|
|
87
87
|
locale?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Render the panel's own sticky header (title, regenerate, close).
|
|
90
|
+
* Default `true`. Pass `false` when the host draws one header for several
|
|
91
|
+
* faces, as `AiSummaryPanel` does. The regenerate and close affordances
|
|
92
|
+
* are not drawn, so the host owns them, and the section is a region only
|
|
93
|
+
* if you pass `aria-label`: the host's own region names the summary.
|
|
94
|
+
*/
|
|
95
|
+
showHeader?: boolean;
|
|
88
96
|
/** Accessible name for the panel region (defaults to `title`). */
|
|
89
97
|
'aria-label'?: string;
|
|
90
98
|
}
|
|
@@ -161,6 +161,7 @@ export * from './notification-card';
|
|
|
161
161
|
export * from './notification-tray';
|
|
162
162
|
export * from './notice-group';
|
|
163
163
|
export * from './notes-panel';
|
|
164
|
+
export * from './communications-panel';
|
|
164
165
|
export * from './popover';
|
|
165
166
|
export * from './radiograph-panel';
|
|
166
167
|
export * from './pregnancy-weight-gain';
|
|
@@ -196,6 +197,7 @@ export * from './chat-container';
|
|
|
196
197
|
export * from './chat-input';
|
|
197
198
|
export * from './chat-message';
|
|
198
199
|
export * from './entity-summary';
|
|
200
|
+
export * from './ai-summary-panel';
|
|
199
201
|
export * from './freemium-paywall';
|
|
200
202
|
export * from './streaming-text';
|
|
201
203
|
export * from './suggestion-chip';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as o, a as s, w as r } from "../../_chunks/workflow-status-
|
|
1
|
+
import { W as o, a as s, w as r } from "../../_chunks/workflow-status-CO0mxXs2.js";
|
|
2
2
|
import { A as T, a as e, i as l, u } from "../../_chunks/appointment-workflow-status-S-lx81Yz.js";
|
|
3
3
|
export {
|
|
4
4
|
T as APPOINTMENT_NO_STATUS,
|