@alfadocs/ui-kit 1.30.0 → 1.32.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/{address-fields-CZ0pEdEI.js → address-fields-jFfjxOQR.js} +3 -3
- package/dist/_chunks/{agenda-card-pdN49pMu.js → agenda-card-DVz3jwTf.js} +2 -2
- package/dist/_chunks/{agenda-tray-BweO8pDo.js → agenda-tray-1oDWCJdB.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-CrHr-5H8.js → ai-prompt-input-Dt7tpCBh.js} +2 -2
- package/dist/_chunks/{alia-sidebar-BWcWZivN.js → alia-sidebar-D18kp3p9.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-DMO3MWSt.js → anamnesis-summary-rows-BYgyp_i2.js} +6 -6
- package/dist/_chunks/{appointment-card-Dzr3GeVz.js → appointment-card-D-oj_ugh.js} +9 -7
- package/dist/_chunks/{appointment-timeline-DhHwmHo1.js → appointment-timeline-CymGHyIP.js} +2 -2
- package/dist/_chunks/{appointment-tray-4FUu_5NX.js → appointment-tray-DCk8gHod.js} +2 -2
- package/dist/_chunks/{audio-recorder-DXG6LTtO.js → audio-recorder-11wClczr.js} +2 -2
- package/dist/_chunks/{avatar-BNQNhoyL.js → avatar-CkDeQOSI.js} +37 -37
- package/dist/_chunks/{balance-badge-cell-CX6b0ML4.js → balance-badge-cell-DhBtFRoW.js} +4 -4
- package/dist/_chunks/{bishop-score-CJUVBfAu.js → bishop-score-CAl7C5hm.js} +2 -2
- package/dist/_chunks/{bmi-calculator-CcH6upht.js → bmi-calculator-Dwkih9a4.js} +3 -3
- package/dist/_chunks/{booking-AabCk7CI.js → booking-l6UGNiE1.js} +3 -3
- package/dist/_chunks/{calculator-dialog-12d3Sxaz.js → calculator-dialog-C0ixc3SU.js} +2 -2
- package/dist/_chunks/{calendar-CI9MINcR.js → calendar-Dgvl5L4T.js} +494 -438
- package/dist/_chunks/{calendar-event-card-66CEEWU6.js → calendar-event-card-DSh-69HT.js} +130 -122
- package/dist/_chunks/calendar-workspace-BX-zDyVR.js +9392 -0
- package/dist/_chunks/{care-plan-card-CQVboTn1.js → care-plan-card-CZW476Kg.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-jxHkzez5.js → care-plan-entry-card-BMUYagEw.js} +2 -2
- package/dist/_chunks/{chat-message-DBQu10rs.js → chat-message-C-8UU2av.js} +2 -2
- package/dist/_chunks/{clinical-note-card-BBgFd2nB.js → clinical-note-card-D2WTV2CO.js} +185 -188
- package/dist/_chunks/{color-picker-CU303VjY.js → color-picker-Bl5f0iK1.js} +28 -25
- package/dist/_chunks/{combobox-D7_NLE2Z.js → combobox-DnSdYssy.js} +216 -215
- package/dist/_chunks/{country-select-DzbPFktV.js → country-select-CfDNFG5c.js} +2 -2
- package/dist/_chunks/{data-table-DB5BiVQ0.js → data-table-DC96JJIq.js} +2 -2
- package/dist/_chunks/{dependent-selector-cJlJFAKD.js → dependent-selector-yTKKsuc9.js} +2 -2
- package/dist/_chunks/{dialog-UbKJCi1X.js → dialog-BJiLqhx6.js} +54 -46
- package/dist/_chunks/{document-preview-CDb-n_W7.js → document-preview-BrhMHNh8.js} +2 -2
- package/dist/_chunks/{due-date-calculator-BtgWeFqp.js → due-date-calculator-CxgK8vzt.js} +3 -3
- package/dist/_chunks/{entity-summary-B_vO5Ur4.js → entity-summary-5o768XLU.js} +2 -2
- package/dist/_chunks/{face-scheme-DA2vjqaM.js → face-scheme-l-CQyLs-.js} +2 -2
- package/dist/_chunks/{file-manager-Cd8V9IcZ.js → file-manager-CI2Qn8qW.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-KdMg9z9H.js → gestational-age-calculator-CZHVrERT.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-tWEOv3Sc.js → link-cell-renderer-BEpMNtAa.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-C4AjQmvz.js → marketplace-app-shell-CK_ND8Tr.js} +2 -2
- package/dist/_chunks/{message-card-D8GB4FdF.js → message-card-BUMv16un.js} +2 -2
- package/dist/_chunks/{message-tray-CGIRQjx5.js → message-tray-0zsv27xX.js} +2 -2
- package/dist/_chunks/{muscle-scheme-BSJsI4-I.js → muscle-scheme-UVz_x4iE.js} +2 -2
- package/dist/_chunks/notes-panel-C4G-mhZ9.js +380 -0
- package/dist/_chunks/{operator-hero-BnFv-Uef.js → operator-hero-D7-iiFQ9.js} +2 -2
- package/dist/_chunks/{optical-prescription-BvwuqTpl.js → optical-prescription-DUJOhKz_.js} +2 -2
- package/dist/_chunks/{patient-details-DYAmq76G.js → patient-details-BGiawUHd.js} +5 -5
- package/dist/_chunks/{patient-summary-card-C9WBwct-.js → patient-summary-card--CT_gbaQ.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-HrFsVi-C.js → periodontal-diagnosis-lEwA8wqX.js} +3 -3
- package/dist/_chunks/{practice-profile-hero-YQ7h2K4o.js → practice-profile-hero-DQyDvpJL.js} +2 -2
- package/dist/_chunks/{practice-results-CxIsU2YO.js → practice-results-DjEzPgAK.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-m-c05DOI.js → pregnancy-dating-n5j5dAKy.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-CJwbs9W-.js → pregnancy-weight-gain-D5A8vPjj.js} +3 -3
- package/dist/_chunks/{province-select-BBc7s7vR.js → province-select-BaUnkg4S.js} +2 -2
- package/dist/_chunks/qr-code-DOJs4suh.js +750 -0
- package/dist/_chunks/radio-DNRe6H_8.js +193 -0
- package/dist/_chunks/radio-group-DyVBgnA3.js +297 -0
- package/dist/_chunks/{radiograph-panel.agent-ByM9M3qm.js → radiograph-panel.agent-o4jwEJPC.js} +2 -2
- package/dist/_chunks/{rich-text-editor-lSCiE0Zz.js → rich-text-editor-CQ7yZdG3.js} +3 -3
- package/dist/_chunks/select-CLSUnKjF.js +520 -0
- package/dist/_chunks/signature-request-vihDT8On.js +2232 -0
- package/dist/_chunks/{tabs-DqKtTIjZ.js → tabs-BnRaLT0y.js} +2 -2
- package/dist/_chunks/{tasks-panel-DPCNaRko.js → tasks-panel-DQuaVvl5.js} +2 -2
- package/dist/_chunks/{timeline-r-8IUoBS.js → timeline-Bs9Erxlo.js} +38 -36
- package/dist/_chunks/{tooth-scheme-C9jssOmy.js → tooth-scheme-Qe7LO5Di.js} +2 -2
- package/dist/_chunks/{unit-converter-C6jMjqL9.js → unit-converter-BTgU50gk.js} +2 -2
- package/dist/_chunks/{widget-picker-em4xGgv0.js → widget-picker-DvUkBemi.js} +2 -2
- package/dist/agent-catalog.json +366 -29
- package/dist/agent-i18n/en.json +27 -15
- package/dist/components/_shared/get-error-message.d.ts +3 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts +2 -0
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts +26 -2
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +9 -0
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +16 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts +5 -0
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +9 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.d.ts +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +24 -5
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/qr-code/qr-encode.d.ts +14 -16
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radio-group/radio-group-context.d.ts +4 -1
- package/dist/components/radio-group/radio-group.d.ts +13 -1
- package/dist/components/radio-group/radio.d.ts +24 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +33 -0
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timeline/timeline.d.ts +2 -0
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +118 -0
- package/dist/i18n/locales/ar.js +123 -5
- package/dist/i18n/locales/de.d.ts +128 -10
- package/dist/i18n/locales/de.js +135 -15
- package/dist/i18n/locales/el.d.ts +118 -0
- package/dist/i18n/locales/el.js +123 -5
- package/dist/i18n/locales/en.d.ts +118 -0
- package/dist/i18n/locales/en.js +123 -5
- package/dist/i18n/locales/es.d.ts +118 -0
- package/dist/i18n/locales/es.js +123 -5
- package/dist/i18n/locales/fr.d.ts +118 -0
- package/dist/i18n/locales/fr.js +122 -4
- package/dist/i18n/locales/hi.d.ts +118 -0
- package/dist/i18n/locales/hi.js +123 -5
- package/dist/i18n/locales/it.d.ts +128 -10
- package/dist/i18n/locales/it.js +133 -15
- package/dist/i18n/locales/ja.d.ts +118 -0
- package/dist/i18n/locales/ja.js +123 -5
- package/dist/i18n/locales/nl.d.ts +118 -0
- package/dist/i18n/locales/nl.js +123 -5
- package/dist/i18n/locales/pl.d.ts +118 -0
- package/dist/i18n/locales/pl.js +123 -5
- package/dist/i18n/locales/pt.d.ts +118 -0
- package/dist/i18n/locales/pt.js +123 -5
- package/dist/i18n/locales/ro.d.ts +118 -0
- package/dist/i18n/locales/ro.js +122 -4
- package/dist/i18n/locales/ru.d.ts +118 -0
- package/dist/i18n/locales/ru.js +123 -5
- package/dist/i18n/locales/sq.d.ts +118 -0
- package/dist/i18n/locales/sq.js +123 -5
- package/dist/i18n/locales/sv.d.ts +118 -0
- package/dist/i18n/locales/sv.js +123 -5
- package/dist/i18n/locales/tr.d.ts +118 -0
- package/dist/i18n/locales/tr.js +123 -5
- package/dist/i18n/locales/zh.d.ts +118 -0
- package/dist/i18n/locales/zh.js +123 -5
- package/dist/index.js +131 -130
- package/dist/locales/ar.json +123 -5
- package/dist/locales/de.json +133 -15
- package/dist/locales/el.json +123 -5
- package/dist/locales/en.json +123 -5
- package/dist/locales/es.json +123 -5
- package/dist/locales/fr.json +122 -4
- package/dist/locales/hi.json +123 -5
- package/dist/locales/it.json +133 -15
- package/dist/locales/ja.json +123 -5
- package/dist/locales/nl.json +123 -5
- package/dist/locales/pl.json +123 -5
- package/dist/locales/pt.json +123 -5
- package/dist/locales/ro.json +122 -4
- package/dist/locales/ru.json +123 -5
- package/dist/locales/sq.json +123 -5
- package/dist/locales/sv.json +123 -5
- package/dist/locales/tr.json +123 -5
- package/dist/locales/zh.json +123 -5
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +145 -0
- package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +32 -0
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts +59 -0
- package/dist/patterns/calendar/calendar-notes-tool.d.ts +14 -0
- package/dist/patterns/calendar/calendar-patient-picker.d.ts +11 -0
- package/dist/patterns/calendar/calendar-series-scope-chooser.d.ts +18 -0
- package/dist/patterns/calendar/calendar-workspace.d.ts +26 -1
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +8 -5
- package/dist/patterns/calendar/calendar.data.d.ts +66 -1
- package/dist/patterns/calendar/calendar.host.d.ts +2 -0
- package/dist/patterns/calendar/calendar.journey.d.ts +42 -7
- package/dist/patterns/calendar/calendar.model.d.ts +54 -5
- package/dist/patterns/calendar/calendar.sheets.d.ts +68 -15
- package/dist/patterns/calendar/calendar.surface.d.ts +12 -2
- package/dist/patterns/calendar/calendar.types.d.ts +29 -1
- package/dist/patterns/calendar/index.d.ts +9 -6
- package/dist/patterns/calendar/index.js +15 -14
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/channel-meta.d.ts +27 -0
- package/dist/patterns/signature-request/index.d.ts +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signature-request/load-status.d.ts +13 -0
- package/dist/patterns/signature-request/person-grid.d.ts +32 -0
- package/dist/patterns/signature-request/required-documents.d.ts +127 -0
- package/dist/patterns/signature-request/signature-history.d.ts +57 -0
- package/dist/patterns/signature-request/signature-outcome.d.ts +29 -0
- package/dist/patterns/signature-request/signature-request.d.ts +390 -26
- package/dist/tokens.css +10 -2
- package/package.json +3 -1
- package/dist/_chunks/calendar-workspace-a84AHQwj.js +0 -7506
- package/dist/_chunks/notes-panel-CTNpsByN.js +0 -353
- package/dist/_chunks/qr-code-CPkEs5mG.js +0 -574
- package/dist/_chunks/radio-TWf9Q-mp.js +0 -108
- package/dist/_chunks/radio-group-rXDJADzW.js +0 -175
- package/dist/_chunks/select-Bi8zril7.js +0 -471
- package/dist/_chunks/signature-request-C-IsbkPf.js +0 -417
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { CalendarEditorCapabilities, CalendarRow, EditorPrefill, RecurrenceFrequency } from './calendar.model';
|
|
3
|
+
import { type RecurringScope } from './calendar-workspace.model';
|
|
4
|
+
/** The host's recurring occurrence. Rows never carry `CalendarRow.series`
|
|
5
|
+
* for such a host: the scope question is asked from this snapshot. */
|
|
6
|
+
export interface CalendarEditorSeries {
|
|
7
|
+
/** The occurrence being edited, as a local Date on the host's wall clock. */
|
|
8
|
+
occurrence: Date;
|
|
9
|
+
/** Scopes the host can honour, in display order. Non-empty; the kit
|
|
10
|
+
* renders exactly this list and never adds a scope. */
|
|
11
|
+
scopes: readonly RecurringScope[];
|
|
12
|
+
/** Merged over snapshot.capabilities once a scope is chosen. */
|
|
13
|
+
capabilitiesByScope?: Partial<Record<RecurringScope, CalendarEditorCapabilities>>;
|
|
14
|
+
/** Offer the care-plan clean-up question in the delete dialog. */
|
|
15
|
+
offersCarePlanCleanup?: boolean;
|
|
16
|
+
/** Reserved for summary lines; the editor does not require it. */
|
|
17
|
+
summary?: {
|
|
18
|
+
frequency?: RecurrenceFrequency;
|
|
19
|
+
index?: number;
|
|
20
|
+
total?: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export type CalendarAppointmentEditorSnapshot = {
|
|
24
|
+
status: 'ready';
|
|
25
|
+
prefill: EditorPrefill & {
|
|
26
|
+
editEventId: string;
|
|
27
|
+
date: Date;
|
|
28
|
+
time: {
|
|
29
|
+
hours: number;
|
|
30
|
+
minutes: number;
|
|
31
|
+
};
|
|
32
|
+
durationMin: number;
|
|
33
|
+
};
|
|
34
|
+
capabilities?: CalendarEditorCapabilities;
|
|
35
|
+
series?: CalendarEditorSeries;
|
|
36
|
+
} | {
|
|
37
|
+
status: 'refused';
|
|
38
|
+
reason: string;
|
|
39
|
+
retryable?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type CalendarAppointmentEditorLoader = (eventId: string, options: {
|
|
42
|
+
signal: AbortSignal;
|
|
43
|
+
}) => Promise<CalendarAppointmentEditorSnapshot>;
|
|
44
|
+
type ReadySnapshot = Extract<CalendarAppointmentEditorSnapshot, {
|
|
45
|
+
status: 'ready';
|
|
46
|
+
}>;
|
|
47
|
+
/** The editor is not mounted until the host returns its canonical data.
|
|
48
|
+
* Mounting this boundary per open also reloads a previously closed editor. */
|
|
49
|
+
export declare function CalendarEditorHydration({ eventId, load, onCancel, children, }: {
|
|
50
|
+
eventId?: string;
|
|
51
|
+
load?: CalendarAppointmentEditorLoader;
|
|
52
|
+
/** Return to the host while loading or when the editor read fails. */
|
|
53
|
+
onCancel?: () => void;
|
|
54
|
+
children: (snapshot?: ReadySnapshot) => ReactNode;
|
|
55
|
+
}): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
56
|
+
/** Display-only projection. It never reaches journey.setRows. */
|
|
57
|
+
export declare function rowWithCanonicalEditor(row: CalendarRow, snapshot: ReadySnapshot, patientName: string): CalendarRow;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=calendar-editor-hydration.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Keep the editor draft mounted while visiting Notes, and vice versa. */
|
|
3
|
+
export declare function CalendarNotesDock({ editor, notes, active, request, }: {
|
|
4
|
+
editor: ReactNode;
|
|
5
|
+
notes: ReactNode;
|
|
6
|
+
active: boolean;
|
|
7
|
+
request: number;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
/** A canonical details read may resolve a patient before the grid's names do. */
|
|
10
|
+
export declare function CalendarPatientContext({ patientId, onChange, }: {
|
|
11
|
+
patientId?: string;
|
|
12
|
+
onChange: (patientId?: string) => void;
|
|
13
|
+
}): null;
|
|
14
|
+
//# sourceMappingURL=calendar-notes-tool.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface PatientPickerProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onValueChange: (value: string) => void;
|
|
4
|
+
selectedLabel?: string;
|
|
5
|
+
size?: 'sm' | 'md';
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** One id-valued patient control for the editor and waiting surfaces. */
|
|
9
|
+
export declare function CalendarPatientPicker(props: PatientPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=calendar-patient-picker.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type RecurringScope } from './calendar-workspace.model';
|
|
2
|
+
export interface CalendarSeriesScopeChooserProps {
|
|
3
|
+
/** The host's scopes in display order, rendered exactly as given. */
|
|
4
|
+
scopes: readonly RecurringScope[];
|
|
5
|
+
/** The occurrence being edited, named in the body for `locale`. */
|
|
6
|
+
occurrence: Date;
|
|
7
|
+
locale: string;
|
|
8
|
+
/** Starts checked; defaults to, and falls back on, `scopes[0]`. */
|
|
9
|
+
defaultScope?: RecurringScope;
|
|
10
|
+
/** Warn for a moved start; editors suppress this until date or time changes. */
|
|
11
|
+
warnOnWholeSeries?: boolean;
|
|
12
|
+
onContinue: (scope: RecurringScope) => void;
|
|
13
|
+
onCancel: () => void;
|
|
14
|
+
}
|
|
15
|
+
/** Asks which appointments of a series an edit applies to. The host's
|
|
16
|
+
* list is the only source of scopes: the kit never adds one. */
|
|
17
|
+
export declare function CalendarSeriesScopeChooser(props: CalendarSeriesScopeChooserProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=calendar-series-scope-chooser.d.ts.map
|
|
@@ -1,14 +1,39 @@
|
|
|
1
|
+
import { type CalendarAppointmentEditorLoader } from './calendar-editor-hydration';
|
|
2
|
+
import { type CalendarAppointmentDetailsLoader } from './calendar-appointment-details';
|
|
1
3
|
import { type CalendarData } from './calendar.data';
|
|
2
4
|
import type { CalendarJourney } from './calendar.journey';
|
|
3
5
|
import { type CalendarPreferenceAdapter } from './calendar.preferences';
|
|
4
|
-
import { type EditorPrefill } from './calendar.model';
|
|
6
|
+
import { type CalendarRow, type EditorPrefill } from './calendar.model';
|
|
5
7
|
import { type CalendarWorkspaceToolId, type WorkspaceDisplaySettings } from './calendar-workspace.model';
|
|
6
8
|
export { WORKSPACE_TOOL, type CalendarWorkspaceToolId, } from './calendar-workspace.model';
|
|
9
|
+
/** Host-owned queue membership, independent of the visible calendar range. */
|
|
10
|
+
export interface CalendarOnlineBookings {
|
|
11
|
+
rows: readonly CalendarRow[];
|
|
12
|
+
status: 'loading' | 'ready' | 'error';
|
|
13
|
+
/** Opt in only when the host can load and persist canonical editor data. */
|
|
14
|
+
canComplete?: boolean;
|
|
15
|
+
/** Unknown or invalid means no booking receives a New marker. */
|
|
16
|
+
lastSeenIso?: string | null;
|
|
17
|
+
/** Creation timestamps when the booking has no contact payload. */
|
|
18
|
+
createdAtById?: Readonly<Record<string, string>>;
|
|
19
|
+
onRetry?: () => void;
|
|
20
|
+
}
|
|
7
21
|
export interface CalendarWorkspaceProps {
|
|
22
|
+
/** Optional canonical read for every existing-appointment editor route.
|
|
23
|
+
* The form waits for this response; failures/refusals expose no editable
|
|
24
|
+
* grid-derived prefill. Keep the callback stable and cache patient data
|
|
25
|
+
* before resolving. Required for host online-booking completion. */
|
|
26
|
+
loadAppointmentEditor?: CalendarAppointmentEditorLoader;
|
|
27
|
+
/** The host's read for the read-only appointment details panel (P-C3).
|
|
28
|
+
* With it a selection docks that panel, Edit opens the editor and a save
|
|
29
|
+
* re-reads the details; without it details stays the editor form. */
|
|
30
|
+
loadAppointmentDetails?: CalendarAppointmentDetailsLoader;
|
|
8
31
|
/** The domain state and its handlers — the host implements them. */
|
|
9
32
|
journey: CalendarJourney;
|
|
10
33
|
/** The practice's read model, stable for a page load. */
|
|
11
34
|
data: CalendarData;
|
|
35
|
+
/** Supplied rows are authoritative, including an explicitly empty queue. */
|
|
36
|
+
onlineBookings?: CalendarOnlineBookings;
|
|
12
37
|
locale?: string;
|
|
13
38
|
/** Host-level cog overrides. */
|
|
14
39
|
initialDisplay?: Partial<WorkspaceDisplaySettings>;
|
|
@@ -16,10 +16,11 @@ export declare const WORKSPACE_TOOL: {
|
|
|
16
16
|
readonly appointments: "appointments";
|
|
17
17
|
readonly editor: "appointment-editor";
|
|
18
18
|
readonly waitingList: "waiting-list";
|
|
19
|
+
readonly notes: "patient-notes";
|
|
19
20
|
readonly bookings: "online-bookings";
|
|
20
21
|
readonly findSlots: "find-slots";
|
|
21
22
|
};
|
|
22
|
-
/** One of the workspace rail's
|
|
23
|
+
/** One of the workspace rail's six tools. Notes requires patient context. */
|
|
23
24
|
export type CalendarWorkspaceToolId = (typeof WORKSPACE_TOOL)[keyof typeof WORKSPACE_TOOL];
|
|
24
25
|
/** Strip order — the order the rail registers the tools in, and the
|
|
25
26
|
* order a host's `availableTools` is normalised back to. */
|
|
@@ -328,7 +329,11 @@ export declare function upcomingAppointmentRows(rows: CalendarRow[], bounds: {
|
|
|
328
329
|
*/
|
|
329
330
|
export declare function upcomingAppointmentItem(row: CalendarRow, privacy: boolean, data: CalendarData,
|
|
330
331
|
/** Localised name-of-last-resort for an unresolvable patient id. */
|
|
331
|
-
unresolvedPatientLabel: string
|
|
332
|
+
unresolvedPatientLabel: string,
|
|
333
|
+
/** Localised stand-in for a row whose details the host is still
|
|
334
|
+
* fetching (`detailsPending`). Such a row carries no patient id and
|
|
335
|
+
* no title, so without it the feed would print a nameless line. */
|
|
336
|
+
pendingDetailsLabel?: string): AppointmentItem;
|
|
332
337
|
/** How far back the platform's booking query looks, on `createdAt`. */
|
|
333
338
|
export declare const ONLINE_BOOKINGS_WINDOW_DAYS = 30;
|
|
334
339
|
/**
|
|
@@ -362,9 +367,7 @@ export interface BookingRowView {
|
|
|
362
367
|
/** Booked after the user last opened the page — the "(Nuovo)" marker. */
|
|
363
368
|
isNew: boolean;
|
|
364
369
|
}
|
|
365
|
-
|
|
366
|
-
export declare const DEFAULT_BOOKINGS_LAST_SEEN_ISO = "2026-06-23T00:00:00";
|
|
367
|
-
export declare function bookingRowView(row: CalendarRow, data: CalendarData, lastSeenMs?: number): BookingRowView;
|
|
370
|
+
export declare function bookingRowView(row: CalendarRow, data: CalendarData, lastSeenMs?: number | null, createdAtIso?: string): BookingRowView;
|
|
368
371
|
/** The nine advanced inputs, all optional. Empty = the input is unset;
|
|
369
372
|
* `operatorId` also accepts `NONE`, the platform's "no operator". */
|
|
370
373
|
export interface WaitingListFilters {
|
|
@@ -22,10 +22,14 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { type ReactNode } from 'react';
|
|
24
24
|
import type { CalendarResource } from '../../components/calendar';
|
|
25
|
+
import type { PaletteSwatch } from '../../components/color-picker';
|
|
25
26
|
import type { AppointmentItem } from '../../components/appointment-card';
|
|
26
27
|
import type { NotesPanelNote } from '../../components/notes-panel';
|
|
27
28
|
import type { TasksPanelItem } from '../../components/tasks-panel';
|
|
28
|
-
import type { CalendarAppointmentMeta, CalendarBaseEvent, CalendarBookingContact, CalendarBranch, CalendarBusinessHours, CalendarCare, CalendarCareEntry, CalendarCareLink, CalendarCarePlan, CalendarClosure, CalendarHistoryEntry, CalendarHoliday, CalendarOperatorGroup, CalendarPatient, CalendarPracticeFeatures, CalendarPriceList, CalendarTaskDetail, CalendarWaitingEntry } from './calendar.types';
|
|
29
|
+
import type { CalendarAppointmentMeta, CalendarBaseEvent, CalendarBookingContact, CalendarBranch, CalendarBusinessHours, CalendarDayHours, CalendarCare, CalendarCareEntry, CalendarCareLink, CalendarCarePlan, CalendarClosure, CalendarHistoryEntry, CalendarHoliday, CalendarOperatorGroup, CalendarPatient, CalendarPracticeFeatures, CalendarPriceList, CalendarTaskDetail, CalendarWaitingEntry, FreeSlotQuery } from './calendar.types';
|
|
30
|
+
import type { CalendarFreeSlot } from './calendar.model';
|
|
31
|
+
/** What the host has loaded for one local `Y-m-d`. */
|
|
32
|
+
export type DayLoadState = 'loading' | 'ready' | 'error';
|
|
29
33
|
export interface CalendarData {
|
|
30
34
|
chairs: readonly CalendarResource[];
|
|
31
35
|
operators: readonly CalendarResource[];
|
|
@@ -37,6 +41,13 @@ export interface CalendarData {
|
|
|
37
41
|
operatorAbsences: Record<string, readonly string[]>;
|
|
38
42
|
/** Operator id → absence display title (a sibling map, optional per operator). */
|
|
39
43
|
operatorAbsenceTitles: Record<string, string>;
|
|
44
|
+
/**
|
|
45
|
+
* Appointment colours the host accepts. When omitted, the workspace uses
|
|
46
|
+
* its documented Google-style fallback palette for demos and legacy hosts.
|
|
47
|
+
* A platform host should provide its configured DoctorColor values so a
|
|
48
|
+
* colour selected in the editor always maps back to a writable colour id.
|
|
49
|
+
*/
|
|
50
|
+
appointmentPalette?: readonly PaletteSwatch[];
|
|
40
51
|
holidays: readonly CalendarHoliday[];
|
|
41
52
|
/** Practice-closed local ISO dates. */
|
|
42
53
|
closedDates: readonly string[];
|
|
@@ -45,6 +56,29 @@ export interface CalendarData {
|
|
|
45
56
|
* the weekend toggle; only the Final State demo reads this. */
|
|
46
57
|
nonWorkingDays?: readonly number[];
|
|
47
58
|
businessHours: CalendarBusinessHours;
|
|
59
|
+
/**
|
|
60
|
+
* Per-DATE closed periods — the one member that can say "shut 13:00–14:00".
|
|
61
|
+
* `businessHours` holds one range per weekday, so a split shift arrives as
|
|
62
|
+
* its envelope and the lunch closure inside it would read as bookable.
|
|
63
|
+
* Keyed by local `Y-m-d`; each window is minutes from local midnight,
|
|
64
|
+
* `1440` the following midnight, disjoint and ascending. The finder never
|
|
65
|
+
* offers a slot that overlaps one, and the grid washes it on every column
|
|
66
|
+
* of that date. A date without a key is one the host said nothing about:
|
|
67
|
+
* it adds no closure and takes nothing away from `businessHours`.
|
|
68
|
+
* Optional — the demos and hosts without per-date hours leave it out.
|
|
69
|
+
*/
|
|
70
|
+
closedIntervals?: Readonly<Record<string, ReadonlyArray<CalendarDayHours>>>;
|
|
71
|
+
/**
|
|
72
|
+
* Per-DATE load state, keyed by local `Y-m-d` — for a host that fills
|
|
73
|
+
* the grid one range at a time. The grid washes every cell of a day
|
|
74
|
+
* that is not `'ready'` and the finder refuses to answer from one,
|
|
75
|
+
* because "no row here" and "no row here YET" are different answers.
|
|
76
|
+
* ABSENCE and presence differ: omit it and every rendered day is taken
|
|
77
|
+
* as loaded (the shape every host had before this existed); provide it
|
|
78
|
+
* and a date it does not name is NOT ready, so a host that knows its
|
|
79
|
+
* own days must name them all. Optional.
|
|
80
|
+
*/
|
|
81
|
+
dayLoadState?: Readonly<Record<string, DayLoadState>>;
|
|
48
82
|
/** The clock every relative label and ledger stamp is pinned to. */
|
|
49
83
|
nowIso: string;
|
|
50
84
|
/** The date the calendar opens on. */
|
|
@@ -61,6 +95,37 @@ export interface CalendarData {
|
|
|
61
95
|
* through `carePlanById` / `openCarePlansForPatient`. */
|
|
62
96
|
carePlans?: readonly CalendarCarePlan[];
|
|
63
97
|
patients: readonly CalendarPatient[];
|
|
98
|
+
/** Optional host typeahead. Omit for client filtering of `patients`.
|
|
99
|
+
* The picker debounces nonblank queries, aborts superseded requests and
|
|
100
|
+
* keeps the host's result order, including matches by phone or number.
|
|
101
|
+
* Before resolving, make returned records available through `patientById`
|
|
102
|
+
* so other patient-dependent fields can resolve the chosen id. Reject
|
|
103
|
+
* failures; an empty array means a successful search with no matches. */
|
|
104
|
+
searchPatients?(query: string, options: {
|
|
105
|
+
signal: AbortSignal;
|
|
106
|
+
}): Promise<readonly CalendarPatient[]>;
|
|
107
|
+
/**
|
|
108
|
+
* Optional host free-slot search. Omit it and the finder keeps its
|
|
109
|
+
* in-memory search over the loaded rows; provide it and the panel asks
|
|
110
|
+
* the practice's own finder instead.
|
|
111
|
+
*
|
|
112
|
+
* Called on Search and after every busy-set change — at most one call
|
|
113
|
+
* in flight, and one per background refresh tick while the panel is
|
|
114
|
+
* open. Abort a superseded call through `options.signal`; reject on
|
|
115
|
+
* failure (the panel says so and offers a retry); `[]` is a successful
|
|
116
|
+
* search with nothing free. Slots arrive floored at `nowIso` on
|
|
117
|
+
* whatever step the host's calendar interval implies — the kit names
|
|
118
|
+
* none. `medicalDeviceIds` are the host's own strings, round-tripped
|
|
119
|
+
* untouched, and `operatorIds` / `chairIds` are never empty: the panel
|
|
120
|
+
* publishes the empty answer itself rather than ask about nothing.
|
|
121
|
+
*/
|
|
122
|
+
searchFreeSlots?(query: FreeSlotQuery, options: {
|
|
123
|
+
signal: AbortSignal;
|
|
124
|
+
}): Promise<readonly CalendarFreeSlot[]>;
|
|
125
|
+
/** The host's LOAD STAMP — a change re-runs the last server search (the
|
|
126
|
+
* platform island hands in `loadedAt.getTime()`). Omit it and the busy
|
|
127
|
+
* set alone triggers the re-search. */
|
|
128
|
+
revision?: number;
|
|
64
129
|
/** The appointments and tasks as the host loaded them, no resource axis. */
|
|
65
130
|
baseEvents: readonly CalendarBaseEvent[];
|
|
66
131
|
/** Event id → appointment extras (patient, operator, chair, care, billing). */
|
|
@@ -2,6 +2,8 @@ export type SheetId = 'appointment-editor' | 'appointment-details' | 'find-slots
|
|
|
2
2
|
export interface SheetHostContext {
|
|
3
3
|
open(id: SheetId): void;
|
|
4
4
|
close(): void;
|
|
5
|
+
/** Optional patient-context rail tool. Standalone panel hosts may omit it. */
|
|
6
|
+
openNotes?: (patientId: string, noteId?: string) => void;
|
|
5
7
|
}
|
|
6
8
|
/** Wrap whatever renders the panels and the surface — one provider per
|
|
7
9
|
* subtree is fine (a rail renders its panels outside the page tree). */
|
|
@@ -13,7 +13,28 @@
|
|
|
13
13
|
import type { Dispatch, SetStateAction } from 'react';
|
|
14
14
|
import type { NotesPanelNote, NotesPanelProps, NotesPanelSubmission } from '../../components/notes-panel';
|
|
15
15
|
import type { AvailabilityContext, BacklogFilter, BacklogItem, CalendarFreeSlot, CalendarRow, DisplaySettings, DraftSlot, EditorDraft, EditorPrefill, FindSlotsSeed, HistoryInput, RailFocus, SlotPatch, WaitingEntryDraft } from './calendar.model';
|
|
16
|
+
import type { DeleteOptions, EditorDraftExtras, RecurringScope } from './calendar-workspace.model';
|
|
16
17
|
import type { CalendarHistoryEntry, CalendarSignChannel, CalendarWaitingEntry } from './calendar.types';
|
|
18
|
+
/** The host's notes read for one patient (N-C3); `writable` follows the
|
|
19
|
+
* notes, not the appointment-edit right. */
|
|
20
|
+
export type PatientNotesLoad = {
|
|
21
|
+
status: 'loading' | 'ready' | 'error';
|
|
22
|
+
total: number | null;
|
|
23
|
+
complete: boolean;
|
|
24
|
+
canAddClinicalNote: boolean;
|
|
25
|
+
writable: boolean;
|
|
26
|
+
error?: string;
|
|
27
|
+
};
|
|
28
|
+
/** A grid move of a host recurring parent's occurrence beyond itself (S-C8). */
|
|
29
|
+
export interface CalendarOccurrenceMove {
|
|
30
|
+
eventId: string;
|
|
31
|
+
scope: Exclude<RecurringScope, 'this'>;
|
|
32
|
+
oldStart: Date;
|
|
33
|
+
newStart: Date;
|
|
34
|
+
newEnd?: Date;
|
|
35
|
+
chairId?: string;
|
|
36
|
+
operatorId?: string;
|
|
37
|
+
}
|
|
17
38
|
export interface CalendarJourney {
|
|
18
39
|
rows: CalendarRow[];
|
|
19
40
|
setRows: Dispatch<SetStateAction<CalendarRow[]>>;
|
|
@@ -35,6 +56,8 @@ export interface CalendarJourney {
|
|
|
35
56
|
* of being silently dropped.
|
|
36
57
|
*/
|
|
37
58
|
notesByPatient: Record<string, NotesPanelNote[]>;
|
|
59
|
+
/** Each patient's notes read; absent, the notes count as loaded. */
|
|
60
|
+
notesLoadByPatient?: Record<string, PatientNotesLoad>;
|
|
38
61
|
signRequests: Record<string, CalendarSignChannel>;
|
|
39
62
|
editorSeed: {
|
|
40
63
|
tick: number;
|
|
@@ -71,7 +94,13 @@ export interface CalendarJourney {
|
|
|
71
94
|
start: number;
|
|
72
95
|
end: number;
|
|
73
96
|
}) => void;
|
|
74
|
-
|
|
97
|
+
/** `options` carry the delete dialog's scope and care-plan choice;
|
|
98
|
+
* absent options mean 'this'. */
|
|
99
|
+
handleDeleteAppointment: (eventId: string, options?: DeleteOptions) => void;
|
|
100
|
+
/** Called before the kit moves the one dragged row through `setRows`.
|
|
101
|
+
* Reject with a user-facing Error and the kit puts that row back.
|
|
102
|
+
* Omit it and every move of a recurring parent stays 'this'. */
|
|
103
|
+
handleMoveOccurrence?: (move: CalendarOccurrenceMove) => Promise<void>;
|
|
75
104
|
handleDuplicateAppointment: (prefill: EditorPrefill) => void;
|
|
76
105
|
handleDraftMoved: (next: {
|
|
77
106
|
date: Date;
|
|
@@ -90,7 +119,10 @@ export interface CalendarJourney {
|
|
|
90
119
|
handleFindSlotsForWaiting: (entry: CalendarWaitingEntry) => void;
|
|
91
120
|
clearFindSlotsSeed: () => void;
|
|
92
121
|
handleBookSlotFromFinder: (prefill: EditorPrefill) => void;
|
|
93
|
-
|
|
122
|
+
/** Resolve only after the write is accepted. Reject with a safe,
|
|
123
|
+
* user-facing Error message to keep the editor open with its draft.
|
|
124
|
+
* `extras` arrive untouched unless the kit expands a demo series row. */
|
|
125
|
+
handleCreateAppointment: (draft: EditorDraft, extras?: EditorDraftExtras) => void | Promise<void>;
|
|
94
126
|
/**
|
|
95
127
|
* Commit a new note on the patient's record. The HOST builds the
|
|
96
128
|
* stored note — its id, its timestamp and its AUTHOR, who is the
|
|
@@ -98,11 +130,14 @@ export interface CalendarJourney {
|
|
|
98
130
|
* hands over only what was typed, so no name the kit invented can
|
|
99
131
|
* ever be attributed to a clinical note.
|
|
100
132
|
*/
|
|
101
|
-
handleAddNote: (patientId: string, submission: NotesPanelSubmission) => void
|
|
102
|
-
/** Replace a note's body
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
133
|
+
handleAddNote: (patientId: string, submission: NotesPanelSubmission) => void | Promise<void>;
|
|
134
|
+
/** Replace a note's body: HTML for an HTML note, else plain text. A
|
|
135
|
+
* rejected write keeps the draft or dialog open with its message. */
|
|
136
|
+
handleEditNote: (patientId: string, noteId: string, content: string) => void | Promise<void>;
|
|
137
|
+
handleDeleteNote: (patientId: string, noteId: string) => void | Promise<void>;
|
|
138
|
+
handleToggleNotePin: (patientId: string, noteId: string) => void | Promise<void>;
|
|
139
|
+
/** Read a patient's notes: the latest few, or every note. */
|
|
140
|
+
handleLoadNotes?: (patientId: string, scope: 'preview' | 'all') => void;
|
|
106
141
|
/**
|
|
107
142
|
* The practice's OWN drafting endpoint, behind the composer's AI
|
|
108
143
|
* affordance. Omit it and the affordance is not offered: the kit
|
|
@@ -136,6 +136,17 @@ export declare function formatDay(locale: string, value: Date | string): string;
|
|
|
136
136
|
* the platform popover's "(NN anni)" beside the patient's name. Pinned
|
|
137
137
|
* to `data.nowIso` so the figure never drifts under a test. */
|
|
138
138
|
export declare function patientAgeYears(dobIso: string, data: CalendarData): number;
|
|
139
|
+
/** Per-appointment capabilities from the host's canonical read. Omitted
|
|
140
|
+
* capabilities preserve the existing editor behaviour. Locked fields
|
|
141
|
+
* are omitted from drafts, so the host must preserve their stored values. */
|
|
142
|
+
export interface CalendarEditorCapabilities {
|
|
143
|
+
editCare?: boolean;
|
|
144
|
+
editPatient?: boolean;
|
|
145
|
+
editDescription?: boolean;
|
|
146
|
+
editRecurrence?: boolean;
|
|
147
|
+
/** False disables the status control and omits status from the draft. */
|
|
148
|
+
editStatus?: boolean;
|
|
149
|
+
}
|
|
139
150
|
export interface EditorPrefill {
|
|
140
151
|
/** Set = the editor EDITS this existing event; unset = create. */
|
|
141
152
|
editEventId?: string;
|
|
@@ -442,7 +453,10 @@ export declare function backlogPatientRef(item: BacklogItem, data: CalendarData)
|
|
|
442
453
|
export declare function backlogPatient(item: BacklogItem, data: CalendarData): CalendarPatient | undefined;
|
|
443
454
|
/** The row's headline — patient name, the booker's typed name, or the
|
|
444
455
|
* free-text hold. */
|
|
445
|
-
export declare function backlogName(item: BacklogItem, data: CalendarData
|
|
456
|
+
export declare function backlogName(item: BacklogItem, data: CalendarData,
|
|
457
|
+
/** Localised stand-in while the host is still fetching the row's
|
|
458
|
+
* details — such a row carries no title of its own. */
|
|
459
|
+
pendingDetailsLabel?: string): string | undefined;
|
|
446
460
|
/**
|
|
447
461
|
* Text search over what the ROW renders: the patient's name (own, or the
|
|
448
462
|
* linked appointment's) and the description (own, or the linked
|
|
@@ -526,6 +540,8 @@ export interface CalendarFreeSlot {
|
|
|
526
540
|
/** The care the search was scoped to — carries name/colour into the
|
|
527
541
|
* prefill when a projected slot is clicked on the grid. */
|
|
528
542
|
careId?: string;
|
|
543
|
+
/** The device a SERVER answer allocated: the host's own string. */
|
|
544
|
+
medicalDeviceId?: string;
|
|
529
545
|
}
|
|
530
546
|
/** Local ISO date (YYYY-MM-DD) — the fixtures' local-wall-clock idiom;
|
|
531
547
|
* absence lookups and shading ids key on local days, never UTC. */
|
|
@@ -690,11 +706,44 @@ export interface FindSlotsSeed {
|
|
|
690
706
|
/** Booking context that rides ALONG with a projection — so booking by
|
|
691
707
|
* clicking a green range on the GRID prefills the same patient/care
|
|
692
708
|
* the panel's own Book button would. */
|
|
693
|
-
export type AvailabilityContext = Pick<FindSlotsSeed, 'patientId' | 'care' | 'cares' | 'colorHex'
|
|
709
|
+
export type AvailabilityContext = Pick<FindSlotsSeed, 'patientId' | 'care' | 'cares' | 'colorHex'> & {
|
|
710
|
+
/** Optional search scope, retained for resource-axis consumers. */
|
|
711
|
+
scopeOperatorId?: string;
|
|
712
|
+
scopeChairId?: string;
|
|
713
|
+
};
|
|
714
|
+
/** One painted free range — see `mergeAvailabilityRanges`. */
|
|
715
|
+
export interface AvailabilityRange {
|
|
716
|
+
/** Stable per range: `<resource or day>:<start ms>`. */
|
|
717
|
+
key: string;
|
|
718
|
+
start: Date;
|
|
719
|
+
end: Date;
|
|
720
|
+
/** The column the range belongs to on a resource axis. */
|
|
721
|
+
resourceId?: string;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Found slots as CONTIGUOUS ranges: one per resource on the chair and
|
|
725
|
+
* operator axes, one per day on the plain grid. Touching or overlapping
|
|
726
|
+
* slots collapse into a single range with a single label. The search
|
|
727
|
+
* emits one slot per chair x operator pair at every step, so painting
|
|
728
|
+
* them one by one stacks chips at the same minute and lights every step
|
|
729
|
+
* of the day where any pair is free.
|
|
730
|
+
*/
|
|
731
|
+
export declare function mergeAvailabilityRanges(slots: readonly CalendarFreeSlot[], axisKind: 'none' | 'chair' | 'operator'): AvailabilityRange[];
|
|
732
|
+
export interface CalendarFreeBand extends AvailabilityRange {
|
|
733
|
+
/** Original bookable answers, in finder order, never a fabricated union slot. */
|
|
734
|
+
options: readonly CalendarFreeSlot[];
|
|
735
|
+
/** Distinct chair x operator combinations, not the number of start times. */
|
|
736
|
+
optionCount: number;
|
|
737
|
+
}
|
|
738
|
+
/** Union free time per local day while retaining the original booking choices. */
|
|
739
|
+
export declare function buildFreeBands(slots: readonly CalendarFreeSlot[]): CalendarFreeBand[];
|
|
694
740
|
/**
|
|
695
|
-
* The in-memory free-slot search over the
|
|
696
|
-
* holidays yield nothing, an operator away that day drops out of it,
|
|
697
|
-
*
|
|
741
|
+
* The in-memory free-slot search over the loaded rows: closed dates and
|
|
742
|
+
* holidays yield nothing, an operator away that day drops out of it, an
|
|
743
|
+
* operator with hours of their own is held to them, a per-date closure
|
|
744
|
+
* (`closedIntervals`) is never offered over, a day the host is still
|
|
745
|
+
* loading (`dayLoadState`) is not answered from at all, and a slot clashes
|
|
746
|
+
* with any row on its chair or a non-task row's operator.
|
|
698
747
|
*/
|
|
699
748
|
export declare function searchFreeSlots(args: {
|
|
700
749
|
rows: CalendarRow[];
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
* the demos or the shared story shell.
|
|
23
23
|
*/
|
|
24
24
|
import { type ReactNode } from 'react';
|
|
25
|
+
import type { CalendarEditorCapabilities } from './calendar.model';
|
|
26
|
+
import type { CalendarEditorSeries } from './calendar-editor-hydration';
|
|
25
27
|
import { type CalendarEvent } from '../../components/calendar';
|
|
26
28
|
import { type NotesPanelNote, type NotesPanelProps, type NotesPanelSubmission } from '../../components/notes-panel';
|
|
27
29
|
import { type ColorAssociation, type CalendarCarePlan, type CalendarAnamnesisAnswer, type CalendarOperatorGroup, type CalendarPatient, type CalendarWaitingEntry, type CalendarHistoryEntry, type CalendarSignChannel, type PatientRef } from './calendar.types';
|
|
@@ -46,17 +48,28 @@ export interface PatientNotesSeam {
|
|
|
46
48
|
/** The patient's notes as the HOST holds them, newest first. */
|
|
47
49
|
notes: NotesPanelNote[];
|
|
48
50
|
/** Commit what was typed. The host stamps the id, date and author. */
|
|
49
|
-
onAddNote: (submission: NotesPanelSubmission) => void
|
|
50
|
-
/** Replace a note's body
|
|
51
|
-
onEditNote: (noteId: string, content: string) => void
|
|
52
|
-
onDeleteNote: (noteId: string) => void
|
|
53
|
-
onTogglePin: (noteId: string) => void
|
|
51
|
+
onAddNote: (submission: NotesPanelSubmission) => void | Promise<void>;
|
|
52
|
+
/** Replace a note's body: HTML for an HTML note, else plain text. */
|
|
53
|
+
onEditNote: (noteId: string, content: string) => void | Promise<void>;
|
|
54
|
+
onDeleteNote: (noteId: string) => void | Promise<void>;
|
|
55
|
+
onTogglePin: (noteId: string) => void | Promise<void>;
|
|
54
56
|
/** The practice's own drafting endpoint. Omitted → no AI affordance. */
|
|
55
57
|
onRequestAiDraft?: NotesPanelProps['onRequestAiDraft'];
|
|
56
58
|
/** The host's live transcription. Omitted → no microphone. */
|
|
57
59
|
onDictate?: NotesPanelProps['onDictate'];
|
|
60
|
+
/** The host's read. Absent while `onLoad` is present reads as loading. */
|
|
61
|
+
status?: 'loading' | 'ready' | 'error';
|
|
62
|
+
total?: number | null;
|
|
63
|
+
/** True once `notes` is the full list rather than a preview. */
|
|
64
|
+
complete?: boolean;
|
|
65
|
+
canAddClinicalNote?: boolean;
|
|
66
|
+
/** Whether this reader may write notes. Beats the panel's `editable`. */
|
|
67
|
+
writable?: boolean;
|
|
68
|
+
onLoad?: (scope: 'preview' | 'all') => void;
|
|
69
|
+
onRetry?: () => void;
|
|
58
70
|
}
|
|
59
|
-
export declare function PatientNotesPanel(
|
|
71
|
+
export declare function PatientNotesPanel(props: Parameters<typeof PatientNotesPanelContent>[0]): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
declare function PatientNotesPanelContent({ patientId, seam, editable, currentNoteId, currentNoteKey, }: {
|
|
60
73
|
patientId: string;
|
|
61
74
|
/**
|
|
62
75
|
* Where every write goes. WITHOUT one the panel is a read-only
|
|
@@ -65,17 +78,39 @@ export declare function PatientNotesPanel({ patientId, seam, editable, }: {
|
|
|
65
78
|
*/
|
|
66
79
|
seam?: PatientNotesSeam;
|
|
67
80
|
/**
|
|
68
|
-
* Whether this reader may write
|
|
69
|
-
*
|
|
81
|
+
* Whether this reader may write when `seam.writable` is absent: note
|
|
82
|
+
* writes follow the notes, not `practice_appointment_edit`. False (or
|
|
70
83
|
* no `seam`) leaves the composer, the pin and the per-note edit /
|
|
71
84
|
* delete dialogs unmounted.
|
|
72
85
|
*/
|
|
73
86
|
editable?: boolean;
|
|
87
|
+
/** Address one note, exactly as `NotesPanel` does. */
|
|
88
|
+
currentNoteId?: string;
|
|
89
|
+
currentNoteKey?: string | number;
|
|
90
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
/**
|
|
92
|
+
* The latest few notes for the appointment details panel (N-C3, N-C5), in
|
|
93
|
+
* the notes tool's order and read-only. See more or a click on a note
|
|
94
|
+
* hands over to the host's Notes tool on the same seam.
|
|
95
|
+
*/
|
|
96
|
+
export declare function PatientNotesPreview({ patientId, seam, onOpenNotes, limit, }: {
|
|
97
|
+
patientId: string;
|
|
98
|
+
seam: PatientNotesSeam;
|
|
99
|
+
/** Open the notes tool, addressed to one note when an id is given. */
|
|
100
|
+
onOpenNotes?: (noteId?: string) => void;
|
|
101
|
+
limit?: number;
|
|
74
102
|
}): import("react/jsx-runtime").JSX.Element;
|
|
75
103
|
export declare function PatientAppointmentsTimeline({ patientId, locale, }: {
|
|
76
104
|
patientId: string;
|
|
77
105
|
locale?: string;
|
|
78
106
|
}): import("react/jsx-runtime").JSX.Element;
|
|
107
|
+
/** The appointment's modification ledger as a kit Timeline, newest first,
|
|
108
|
+
* shared by the editor's History sub-view and the read-only details panel.
|
|
109
|
+
* An empty ledger shows the "No changes recorded" empty state. */
|
|
110
|
+
export declare function AppointmentHistoryTimeline({ history, locale, }: {
|
|
111
|
+
history: readonly CalendarHistoryEntry[];
|
|
112
|
+
locale?: string;
|
|
113
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
79
114
|
export declare function PatientTasksPanel({ patientId }: {
|
|
80
115
|
patientId: string;
|
|
81
116
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -145,13 +180,20 @@ export interface EditorPlatformOptions {
|
|
|
145
180
|
* reached from a prefill with `simpleSave: false` (audit C13). */
|
|
146
181
|
onSaveAndReturn?: () => void;
|
|
147
182
|
}
|
|
148
|
-
export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDuplicate, panelTitle, headerIcon, identity, after, closeOnSave, onDraftChange, slotPatch, colorAssociation, locale, scheduleByEntry, history,
|
|
183
|
+
export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDuplicate, panelTitle, headerIcon, identity, after, closeOnSave, returnsOnCancel, onDraftChange, onPatientContextChange, slotPatch, colorAssociation, locale, scheduleByEntry, history, onMove, onCopy, onWhatsApp, readOnly, capabilities: hostCapabilities, series, platform, className, }: {
|
|
149
184
|
prefill?: EditorPrefill;
|
|
150
|
-
|
|
185
|
+
capabilities?: CalendarEditorCapabilities;
|
|
186
|
+
/** A host-read occurrence: its scope is asked before the form. */
|
|
187
|
+
series?: CalendarEditorSeries;
|
|
188
|
+
/** The editor closes only after acceptance. A rejection leaves the
|
|
189
|
+
* draft intact and displays its safe, user-facing Error message. */
|
|
190
|
+
onSave: (draft: EditorDraft, extras?: EditorDraftExtras) => void | Promise<void>;
|
|
151
191
|
/** Live composition feed — the grid mirrors the slot being filled as a
|
|
152
192
|
* draft placeholder while this panel is open. Emits `null` on unmount
|
|
153
193
|
* so the placeholder clears with the panel. */
|
|
154
194
|
onDraftChange?: (draft: DraftSlot | null) => void;
|
|
195
|
+
/** Reports the current patient to an optional workspace Notes rail tool. */
|
|
196
|
+
onPatientContextChange?: (patientId?: string) => void;
|
|
155
197
|
/** Slot edits made on the grid (dragging or resizing the draft mirror).
|
|
156
198
|
* Applied by `tick` and only to the slot fields, so everything else
|
|
157
199
|
* the user has typed survives. */
|
|
@@ -172,6 +214,9 @@ export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDu
|
|
|
172
214
|
/** Read-only extras (billing, patient contact) below the form. */
|
|
173
215
|
after?: ReactNode;
|
|
174
216
|
closeOnSave?: boolean;
|
|
217
|
+
/** Cancel returns somewhere (the details panel), so an unchanged edit
|
|
218
|
+
* may cancel too. */
|
|
219
|
+
returnsOnCancel?: boolean;
|
|
175
220
|
/** The cog's colour association: the default colour on create and the
|
|
176
221
|
* re-colour when the chair/operator select changes. */
|
|
177
222
|
colorAssociation: ColorAssociation;
|
|
@@ -184,8 +229,6 @@ export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDu
|
|
|
184
229
|
}>>;
|
|
185
230
|
/** Details only — the ledger behind the History sub-view (newest first). */
|
|
186
231
|
history?: CalendarHistoryEntry[];
|
|
187
|
-
/** Details only — the patient notes behind the Notes sub-view. */
|
|
188
|
-
notes?: ReactNode;
|
|
189
232
|
/** Edit only — arm the grid's move mode (the platform's "Sposta"). */
|
|
190
233
|
onMove?: () => void;
|
|
191
234
|
/** Edit only — arm the grid's copy mode; a linked appointment offers
|
|
@@ -297,15 +340,19 @@ export declare function BacklogPanel({ items, locale, seed, signRequests, onProc
|
|
|
297
340
|
* mode (create / move banner) instead of opening the editor at once. */
|
|
298
341
|
onPlaceWaiting?: (entry: CalendarWaitingEntry) => void;
|
|
299
342
|
}): import("react/jsx-runtime").JSX.Element;
|
|
300
|
-
export declare function BookingsPanel({ bookings, locale, privacy, onShowInCalendar, onComplete, }: {
|
|
343
|
+
export declare function BookingsPanel({ bookings, locale, privacy, status, lastSeenIso, createdAtById, onRetry, onShowInCalendar, onComplete, }: {
|
|
301
344
|
bookings: readonly CalendarRow[];
|
|
302
345
|
locale?: string;
|
|
303
346
|
/** Masks the patient names, in step with the grid. */
|
|
304
347
|
privacy?: boolean;
|
|
348
|
+
status?: 'loading' | 'ready' | 'error';
|
|
349
|
+
lastSeenIso?: string | null;
|
|
350
|
+
createdAtById?: Readonly<Record<string, string>>;
|
|
351
|
+
onRetry?: () => void;
|
|
305
352
|
/** Steers the grid to the booking and rings its card. */
|
|
306
353
|
onShowInCalendar: (eventId: string) => void;
|
|
307
354
|
/** Opens the editor to complete it (platform "Completa appuntamento"). */
|
|
308
|
-
onComplete
|
|
355
|
+
onComplete?: (row: CalendarRow) => void;
|
|
309
356
|
}): import("react/jsx-runtime").JSX.Element;
|
|
310
357
|
export declare function WaitingListPanel({ entries, rows, locale, onPlaceWaiting, onRemoveWaiting, onOpenEntryForm, onOpenPatient, onOpenAppointment, readOnly, }: {
|
|
311
358
|
entries: CalendarWaitingEntry[];
|
|
@@ -388,18 +435,23 @@ export interface FindSlotsPlatformOptions {
|
|
|
388
435
|
* `GetGroupedOperatorService`); absent = one flat list. */
|
|
389
436
|
operatorGroups?: readonly CalendarOperatorGroup[];
|
|
390
437
|
}
|
|
391
|
-
export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onShowInCalendar, onSearchRange, platform, }: {
|
|
438
|
+
export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onShowInCalendar, onSearchRange, platform, canBook, }: {
|
|
392
439
|
rows: CalendarRow[];
|
|
393
440
|
locale: string;
|
|
394
441
|
/** Prefill context (the tool keys its panel by seed.tick). */
|
|
395
442
|
seed?: FindSlotsSeed | null;
|
|
396
443
|
onBookSlot: (prefill: EditorPrefill) => void;
|
|
444
|
+
/** False for a viewer without the appointment-edit right: the slots
|
|
445
|
+
* still list and project, but no row offers Book. */
|
|
446
|
+
canBook?: boolean;
|
|
397
447
|
/** Platform depth the rail never needed — absent = rail behaviour. */
|
|
398
448
|
platform?: FindSlotsPlatformOptions;
|
|
399
449
|
/** Project the found free ranges onto the grid (null = clear) — the
|
|
400
450
|
* Calendar dims booked cards and glows the free ranges. The context
|
|
401
451
|
* carries the seeded patient/care into grid-click bookings. */
|
|
402
452
|
onShowInCalendar: (slots: CalendarFreeSlot[] | null, fromDate?: Date, context?: AvailabilityContext) => void;
|
|
453
|
+
/** Retained for host compatibility; projection supports every grid axis. */
|
|
454
|
+
gridAxis?: 'none' | 'chair' | 'operator';
|
|
403
455
|
/**
|
|
404
456
|
* The window a search is about to cover, raised BEFORE it runs.
|
|
405
457
|
*
|
|
@@ -414,4 +466,5 @@ export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onS
|
|
|
414
466
|
to: Date;
|
|
415
467
|
}) => void;
|
|
416
468
|
}): import("react/jsx-runtime").JSX.Element;
|
|
469
|
+
export {};
|
|
417
470
|
//# sourceMappingURL=calendar.sheets.d.ts.map
|