@alfadocs/ui-kit 1.128.0 → 1.129.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/{appointment-card-0PebvrOS.js → appointment-card-vbUsDh70.js} +49 -72
- package/dist/_chunks/{appointment-timeline-Czd4PBkF.js → appointment-timeline-B5pfBl-b.js} +2 -2
- package/dist/_chunks/{appointment-tray-B04zKY7g.js → appointment-tray-BhiXetjs.js} +2 -2
- package/dist/_chunks/{calendar-_sgjuH3L.js → calendar-DzR-vdJ5.js} +614 -563
- package/dist/_chunks/calendar-appointment-editor-dialog-DnPADcj9.js +13438 -0
- package/dist/_chunks/{calendar-event-card-DXAYWH6k.js → calendar-event-card-BNEzkjm-.js} +142 -132
- package/dist/_chunks/{care-plan-card-bGTIliXc.js → care-plan-card-CwgkImOD.js} +2 -2
- package/dist/_chunks/{care-plan-header-k8FslxsU.js → care-plan-header-Dx5OMkc9.js} +2 -2
- package/dist/_chunks/{clinical-note-card-DHn5W_bv.js → clinical-note-card-pPaeWWnu.js} +2 -2
- package/dist/_chunks/{contact-card-CGpbYuxl.js → contact-card-BSY2YpLZ.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CCgf0Ntt.js → contact-profile-card-CsZNMlws.js} +2 -2
- package/dist/_chunks/{default-tabs-DOuHEKI5.js → default-tabs-BnB6FUEW.js} +2 -2
- package/dist/_chunks/{entity-summary-BanguTa6.js → entity-summary-Dzk54yom.js} +2 -2
- package/dist/_chunks/file-pen-line-k4uMBM3h.js +29 -0
- package/dist/_chunks/{info-tip-C-MPkShR.js → info-tip-B3cn3fY2.js} +2 -2
- package/dist/_chunks/{link-DtCfnLnF.js → link-CeV7FoI6.js} +2 -2
- package/dist/_chunks/{nav-grid-D2xVcHTO.js → nav-grid-dEgDAri3.js} +2 -2
- package/dist/_chunks/{note-attachment-cnj2JRrg.js → note-attachment-MNTIqdSz.js} +2 -2
- package/dist/_chunks/{note-timeline-BrjHBQfx.js → note-timeline-BQeW0VZY.js} +2 -2
- package/dist/_chunks/{notes-panel-n1JFNQ5u.js → notes-panel-DIY7eNsq.js} +2 -2
- package/dist/_chunks/{patient-details-Cba9HQj_.js → patient-details-DBtEITfE.js} +2 -2
- package/dist/_chunks/{patient-field-row-CtDihADs.js → patient-field-row-a5d4QijH.js} +2 -2
- package/dist/_chunks/{patient-summary-card-DnLdbtsw.js → patient-summary-card-BUcZ-gaL.js} +3 -3
- package/dist/_chunks/{payment-request-card-CEIalOtr.js → payment-request-card-Dv4WbRBe.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CqRJlmb7.js → product-hub-panel-a8wdVOUt.js} +2 -2
- package/dist/_chunks/{public-footer-C8UIzqLJ.js → public-footer-D0cqScpz.js} +2 -2
- package/dist/_chunks/{signature-request-Dzs0jZsd.js → signature-request-DW2PSp66.js} +3 -3
- package/dist/_chunks/{signed-out-frame-fUf7tqs3.js → signed-out-frame-Oa2e1yps.js} +2 -2
- package/dist/_chunks/task-editor-CVRrDqpe.js +1256 -0
- package/dist/_chunks/{treatment-receipt-1VnuinhY.js → treatment-receipt-BZzwvsnY.js} +73 -56
- package/dist/_chunks/use-appointment-details-read-n7kycxrm.js +2439 -0
- package/dist/_chunks/{whatsapp-button-DV9JFmtq.js → whatsapp-button-XbozeDl_.js} +32 -25
- package/dist/agent-catalog.json +49 -16
- package/dist/agent-i18n/en.json +5 -5
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/patient-picker.d.ts +10 -0
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +23 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts +13 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.recurrence.d.ts +9 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +8 -3
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +63 -1
- package/dist/components/appointment-details-panel/index.d.ts +2 -1
- package/dist/components/appointment-details-panel/index.js +5 -4
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts +22 -0
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +8 -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-header/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/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/payment-card/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/treatment-receipt/index.d.ts +2 -2
- package/dist/components/treatment-receipt/index.js +2 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +11 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/fullcalendar.css +5 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +111 -4
- package/dist/i18n/locales/ar.js +122 -15
- package/dist/i18n/locales/de.d.ts +111 -4
- package/dist/i18n/locales/de.js +122 -15
- package/dist/i18n/locales/el.d.ts +111 -4
- package/dist/i18n/locales/el.js +122 -15
- package/dist/i18n/locales/en.d.ts +111 -4
- package/dist/i18n/locales/en.js +114 -10
- package/dist/i18n/locales/es.d.ts +111 -4
- package/dist/i18n/locales/es.js +122 -15
- package/dist/i18n/locales/fr.d.ts +111 -4
- package/dist/i18n/locales/fr.js +122 -15
- package/dist/i18n/locales/hi.d.ts +111 -4
- package/dist/i18n/locales/hi.js +122 -15
- package/dist/i18n/locales/it.d.ts +111 -4
- package/dist/i18n/locales/it.js +122 -15
- package/dist/i18n/locales/ja.d.ts +111 -4
- package/dist/i18n/locales/ja.js +122 -15
- package/dist/i18n/locales/nl.d.ts +111 -4
- package/dist/i18n/locales/nl.js +122 -15
- package/dist/i18n/locales/pl.d.ts +111 -4
- package/dist/i18n/locales/pl.js +122 -15
- package/dist/i18n/locales/pt.d.ts +111 -4
- package/dist/i18n/locales/pt.js +122 -15
- package/dist/i18n/locales/ro.d.ts +111 -4
- package/dist/i18n/locales/ro.js +122 -15
- package/dist/i18n/locales/ru.d.ts +111 -4
- package/dist/i18n/locales/ru.js +122 -15
- package/dist/i18n/locales/sq.d.ts +111 -4
- package/dist/i18n/locales/sq.js +122 -15
- package/dist/i18n/locales/sv.d.ts +111 -4
- package/dist/i18n/locales/sv.js +122 -15
- package/dist/i18n/locales/tr.d.ts +111 -4
- package/dist/i18n/locales/tr.js +122 -15
- package/dist/i18n/locales/zh.d.ts +111 -4
- package/dist/i18n/locales/zh.js +122 -15
- package/dist/index.js +1112 -1107
- package/dist/locales/ar.json +122 -15
- package/dist/locales/de.json +122 -15
- package/dist/locales/el.json +122 -15
- package/dist/locales/en.json +114 -7
- package/dist/locales/es.json +122 -15
- package/dist/locales/fr.json +122 -15
- package/dist/locales/hi.json +122 -15
- package/dist/locales/it.json +122 -15
- package/dist/locales/ja.json +122 -15
- package/dist/locales/nl.json +122 -15
- package/dist/locales/pl.json +122 -15
- package/dist/locales/pt.json +122 -15
- package/dist/locales/ro.json +122 -15
- package/dist/locales/ru.json +122 -15
- package/dist/locales/sq.json +122 -15
- package/dist/locales/sv.json +122 -15
- package/dist/locales/tr.json +122 -15
- package/dist/locales/zh.json +122 -15
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +74 -2
- package/dist/patterns/calendar/calendar-archive.d.ts +12 -0
- package/dist/patterns/calendar/calendar-care-rules.d.ts +19 -23
- package/dist/patterns/calendar/calendar-delete-confirm.d.ts +18 -0
- package/dist/patterns/calendar/calendar-document-scope-confirm.d.ts +12 -0
- package/dist/patterns/calendar/calendar-editor-guard.d.ts +12 -0
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts +13 -2
- package/dist/patterns/calendar/calendar-load-error.d.ts +11 -0
- package/dist/patterns/calendar/calendar-patient-locked.d.ts +13 -0
- package/dist/patterns/calendar/calendar-patient-picker.d.ts +6 -1
- package/dist/patterns/calendar/calendar-prompts.d.ts +11 -0
- package/dist/patterns/calendar/calendar-settings-ical.d.ts +11 -0
- package/dist/patterns/calendar/calendar-settings-overlay.d.ts +73 -0
- package/dist/patterns/calendar/calendar-settings-panel.d.ts +62 -0
- package/dist/patterns/calendar/calendar-settings-practice.d.ts +20 -0
- package/dist/patterns/calendar/calendar-status-colours.d.ts +18 -0
- package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts +17 -2
- package/dist/patterns/calendar/calendar-workspace.d.ts +258 -6
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +98 -11
- package/dist/patterns/calendar/calendar.data.d.ts +9 -3
- package/dist/patterns/calendar/calendar.journey.d.ts +69 -5
- package/dist/patterns/calendar/calendar.model.d.ts +72 -14
- package/dist/patterns/calendar/calendar.preferences.d.ts +4 -0
- package/dist/patterns/calendar/calendar.sheets.d.ts +85 -17
- package/dist/patterns/calendar/calendar.surface.d.ts +64 -6
- package/dist/patterns/calendar/calendar.types.d.ts +223 -6
- package/dist/patterns/calendar/index.d.ts +9 -6
- package/dist/patterns/calendar/index.js +18 -15
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +5 -1
- package/package.json +1 -1
- package/dist/_chunks/calendar-appointment-editor-dialog-CGDDGMdo.js +0 -10974
- package/dist/_chunks/task-editor-C05yx7JJ.js +0 -1218
- package/dist/_chunks/use-appointment-details-read-Bm408XzX.js +0 -2198
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { TFunction } from 'i18next';
|
|
12
12
|
import { type CalendarEvent, type CalendarEventStatus, type CalendarResource } from '../../components/calendar';
|
|
13
|
+
import type { TreatmentBilling } from '../../components/treatment-receipt';
|
|
13
14
|
import type { WorkflowStatusTone } from '../../components/workflow-status';
|
|
14
15
|
import { APPOINTMENT_STATE_WORKFLOW } from '../../components/_shared/entity-card';
|
|
15
16
|
import { APPOINTMENT_STATUS_BADGE_VARIANT } from '../../components/appointment-details-panel/appointment-details-panel.identity';
|
|
16
17
|
import type { AppointmentRecurrenceFrequency } from '../../components/appointment-details-panel';
|
|
17
18
|
import type { CalendarData } from './calendar.data';
|
|
19
|
+
import type { StatusColours } from './calendar-status-colours';
|
|
18
20
|
import { type CareDescriptionMode, type ColorAssociation, type CalendarBaseEvent, type CalendarBookingContact, type CalendarCareEntry, type CalendarCareLink, type CalendarClosure, type CalendarDayHours, type CalendarHistoryEntry, type CalendarPatient, type CalendarPhoneNumber, type CalendarSignDocument, type CalendarWaitingEntry, type CatalogueState, type PatientRef } from './calendar.types';
|
|
19
21
|
export declare const STATUS_UI_KEY: Record<CalendarEventStatus, string>;
|
|
20
22
|
export interface CalendarRow {
|
|
@@ -29,6 +31,9 @@ export interface CalendarRow {
|
|
|
29
31
|
description?: string;
|
|
30
32
|
/** Where the cares came from — a care plan's lines or a price list. */
|
|
31
33
|
careLink?: CalendarCareLink;
|
|
34
|
+
/** The archive this appointment belongs to. Absent means the practice's
|
|
35
|
+
* global archive. Every host callback for an action on this row carries it. */
|
|
36
|
+
archiveId?: string;
|
|
32
37
|
}
|
|
33
38
|
/**
|
|
34
39
|
* A drag/resize of a PATIENT appointment awaiting confirmation (the
|
|
@@ -47,6 +52,9 @@ export interface PendingMove {
|
|
|
47
52
|
newEnd?: Date;
|
|
48
53
|
/** Post-drop column. `event.resourceId` still reports the OLD one. */
|
|
49
54
|
newResourceId?: string;
|
|
55
|
+
/** The closure, holiday or absence the move lands on. The confirm shows
|
|
56
|
+
* it as a warning line; it never blocks the move. */
|
|
57
|
+
closure?: CalendarClosure;
|
|
50
58
|
revert?: () => void;
|
|
51
59
|
}
|
|
52
60
|
export declare function movesSilently(event: CalendarEvent): boolean;
|
|
@@ -90,10 +98,8 @@ export declare const VIEW_OPTIONS: ViewOption[];
|
|
|
90
98
|
* On-the-fly DISPLAY settings — the platform buries these per-user knobs in
|
|
91
99
|
* Settings; the sketch surfaces them in a header cog so users adjust the
|
|
92
100
|
* view without leaving the agenda. The view knobs are display-only and
|
|
93
|
-
* instantly reversible.
|
|
94
|
-
*
|
|
95
|
-
* MOVED appointments get, never what is already painted. Default duration
|
|
96
|
-
* and the business hours themselves stay in Settings.
|
|
101
|
+
* instantly reversible. `colorAssociation` is a view choice too: it picks
|
|
102
|
+
* the colour each card is DRAWN with and never changes a stored colour.
|
|
97
103
|
*/
|
|
98
104
|
export interface DisplaySettings {
|
|
99
105
|
/** Which resource axis the columns/rows group by. */
|
|
@@ -108,11 +114,13 @@ export interface DisplaySettings {
|
|
|
108
114
|
eventColorStyle?: 'solid' | 'tinted';
|
|
109
115
|
/** Show the opposite resource on tall cards. @default false */
|
|
110
116
|
showCardContext?: boolean;
|
|
111
|
-
|
|
117
|
+
/** Grid interval: 10, 15, 20, 30 or 60 minutes. */
|
|
118
|
+
slotDuration: '00:10' | '00:15' | '00:20' | '00:30' | '01:00';
|
|
112
119
|
window: 'working' | 'extended' | 'full';
|
|
113
120
|
/** How the card describes its cares (platform care visualization). */
|
|
114
121
|
careDescription: CareDescriptionMode;
|
|
115
|
-
/**
|
|
122
|
+
/** What colours the cards for this user. A view choice, computed when the
|
|
123
|
+
* grid draws: it never writes a colour onto an appointment. */
|
|
116
124
|
colorAssociation: ColorAssociation;
|
|
117
125
|
}
|
|
118
126
|
export declare const DEFAULT_DISPLAY: DisplaySettings;
|
|
@@ -150,6 +158,9 @@ export declare function patientAgeYears(dobIso: string, data: CalendarData): num
|
|
|
150
158
|
export interface CalendarEditorCapabilities {
|
|
151
159
|
editCare?: boolean;
|
|
152
160
|
editPatient?: boolean;
|
|
161
|
+
/** Why the patient is locked, already translated. Without it the field
|
|
162
|
+
* says only that the patient cannot be changed here. */
|
|
163
|
+
patientLockedReason?: string;
|
|
153
164
|
editDescription?: boolean;
|
|
154
165
|
editRecurrence?: boolean;
|
|
155
166
|
/** False disables the status control and omits status from the draft. */
|
|
@@ -265,9 +276,21 @@ export declare const RECURRENCE_STEP: Record<RecurrenceFrequency, {
|
|
|
265
276
|
* Feb, not 2/3 March (what a naive `setMonth` would give). */
|
|
266
277
|
export declare function addMonthsClamped(base: Date, months: number): Date;
|
|
267
278
|
/**
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
279
|
+
* Whether the practice itself is closed on a date (`YYYY-MM-DD`): a closed
|
|
280
|
+
* weekday, a practice closure, or a public holiday the practice does not
|
|
281
|
+
* open on. One predicate for the series skip rule, so
|
|
282
|
+
* neither disagrees with the grid's closed wash. An operator's absence is
|
|
283
|
+
* not part of it.
|
|
284
|
+
*/
|
|
285
|
+
export declare function isPracticeClosedDay(dateIso: string, data: Pick<CalendarData, 'businessHours' | 'practiceClosedOn'>): boolean;
|
|
286
|
+
/**
|
|
287
|
+
* A closed day for "Skip closed days" (PRD 03, decision P12): a closed
|
|
288
|
+
* weekday (no business hours), a practice closure, a public holiday
|
|
289
|
+
* unless the practice stays open on holidays, or an absence of the
|
|
290
|
+
* chosen operator. The closure and holiday read is the host's own
|
|
291
|
+
* `practiceClosedOn`, the one the grid wash and the booking refusal use,
|
|
292
|
+
* so the series and the calendar never disagree. Chair-only bookings
|
|
293
|
+
* check the practice alone.
|
|
271
294
|
*/
|
|
272
295
|
export declare function isUnbookableDay(date: Date, operatorId: string | undefined, data: CalendarData): boolean;
|
|
273
296
|
/**
|
|
@@ -293,6 +316,10 @@ export interface CalendarSeries {
|
|
|
293
316
|
lastIso: string;
|
|
294
317
|
/** Candidates dropped as closed/absent days. */
|
|
295
318
|
skipped: number;
|
|
319
|
+
/** Changed on its own: the occurrence is a plain appointment for edit
|
|
320
|
+
* and move (no scope question, only it changes). Delete still offers
|
|
321
|
+
* the three scopes. The host sets it; the kit never infers it. */
|
|
322
|
+
detached?: boolean;
|
|
296
323
|
}
|
|
297
324
|
export interface EditorDraft {
|
|
298
325
|
editEventId?: string;
|
|
@@ -321,6 +348,9 @@ export interface EditorDraft {
|
|
|
321
348
|
/** Create only, matching platform (its recurrence inputs go disabled
|
|
322
349
|
the moment an appointment id exists). */
|
|
323
350
|
recurrence?: EditorRecurrence;
|
|
351
|
+
/** The archive the appointment is saved in. A new one gets the answer to
|
|
352
|
+
* "Global or Archive" (absent for Global); an edit gets the row's own. */
|
|
353
|
+
archiveId?: string;
|
|
324
354
|
}
|
|
325
355
|
/** Full-edit prefill for an existing grid event. */
|
|
326
356
|
export declare function editPrefillFromRow(row: CalendarRow): EditorPrefill;
|
|
@@ -360,16 +390,30 @@ export interface SlotPatch {
|
|
|
360
390
|
operatorId?: string;
|
|
361
391
|
}
|
|
362
392
|
export declare const DRAFT_SNAP = "00:15";
|
|
393
|
+
export declare const snapForSlot: (slotDuration: string) => string;
|
|
363
394
|
export declare const NONE = "none";
|
|
364
395
|
export declare const DURATION_PRESETS_MIN: number[];
|
|
365
396
|
export declare function durationDigitsFilter(candidate: string, search: string): number;
|
|
366
397
|
/**
|
|
367
|
-
* The editor's opening colour
|
|
368
|
-
* existing appointment keeps its stored colour
|
|
369
|
-
*
|
|
370
|
-
*
|
|
398
|
+
* The editor's opening colour. It starts empty ("none picked"): an
|
|
399
|
+
* existing appointment keeps its stored colour, a new one carries only a
|
|
400
|
+
* colour the hand-off already held. The care's colour is worked out at
|
|
401
|
+
* draw time (`drawnRowColors`), never written on create.
|
|
402
|
+
*/
|
|
403
|
+
export declare function initialEditorColor(prefill: EditorPrefill | undefined): string;
|
|
404
|
+
/** Legible ink for a mode banner tinted with an appointment colour. The
|
|
405
|
+
* Google palette ships no text colour, so the pair is settled by the
|
|
406
|
+
* kit's own contrast maths rather than by eye. */
|
|
407
|
+
export declare function bannerTextColor(backgroundHex?: string): string | undefined;
|
|
408
|
+
/**
|
|
409
|
+
* The colours a row is DRAWN with under "Colour by". Worked out per draw
|
|
410
|
+
* and never stored: an empty result leaves the card on its stored colour,
|
|
411
|
+
* which is also what a row falls back to when the association has no
|
|
412
|
+
* colour for it. `appointment` shows the stored colour, or the care's when
|
|
413
|
+
* none was picked. A colour that replaces the stored one takes its own
|
|
414
|
+
* ink, so a stale `textColor` never lands on the new surface.
|
|
371
415
|
*/
|
|
372
|
-
export declare function
|
|
416
|
+
export declare function drawnRowColors(row: Pick<CalendarRow, 'event' | 'operatorId' | 'chairId' | 'cares'>, association: ColorAssociation, data: CalendarData, statusColours?: StatusColours | null): Pick<CalendarEvent, 'backgroundColor' | 'textColor' | 'borderColor'>;
|
|
373
417
|
/** A plan line's booked appointments — entry id → [{ eventId, startIso }]
|
|
374
418
|
* in start order (the checklist's "scheduled" chips, the rail's links). */
|
|
375
419
|
export declare function scheduleByEntryId(rows: ReadonlyArray<{
|
|
@@ -418,6 +462,8 @@ export interface PriceRow {
|
|
|
418
462
|
/** Already invoiced — the whole row is read-only (platform "Azione
|
|
419
463
|
* non consentita: Prestazione già fatturata"). */
|
|
420
464
|
billed?: boolean;
|
|
465
|
+
/** Wins over `billed`; `'reversed'` is not locked. */
|
|
466
|
+
billing?: TreatmentBilling;
|
|
421
467
|
}
|
|
422
468
|
export declare const EMPTY_SCHEDULE: Record<string, Array<{
|
|
423
469
|
eventId: string;
|
|
@@ -596,6 +642,10 @@ export interface CalendarFreeSlot {
|
|
|
596
642
|
/** Local ISO date (YYYY-MM-DD) — the fixtures' local-wall-clock idiom;
|
|
597
643
|
* absence lookups and shading ids key on local days, never UTC. */
|
|
598
644
|
export declare function localIsoDate(d: Date): string;
|
|
645
|
+
/** A `YYYY-MM-DD` page-address day as a local midnight, or the day of
|
|
646
|
+
* `fallbackNowIso` when the text is not a real calendar day (a hand-edited
|
|
647
|
+
* or stale address such as `garbage` or `2026-02-31`). */
|
|
648
|
+
export declare function parseIsoDate(iso: string, fallbackNowIso: string): Date;
|
|
599
649
|
/** The closed complement of one day's working range — up to two
|
|
600
650
|
* segments (midnight→open, close→midnight); a closed day (undefined
|
|
601
651
|
* hours) is one full-day segment. Minutes from local midnight. */
|
|
@@ -664,6 +714,9 @@ export interface PrintRow {
|
|
|
664
714
|
patientName: string;
|
|
665
715
|
/** Every labelled number; empty under privacy. */
|
|
666
716
|
phones: CalendarPhoneNumber[];
|
|
717
|
+
/** The patient's yearly number; absent under privacy or when the host
|
|
718
|
+
* passes none. */
|
|
719
|
+
yearlyNumber?: string;
|
|
667
720
|
/** Free-text description (platform `name`) — unmasked, like the card. */
|
|
668
721
|
description?: string;
|
|
669
722
|
/** Care entries with their tooth elements — unmasked, like the card. */
|
|
@@ -722,6 +775,8 @@ export declare const PRINT_LINE_PX = 26;
|
|
|
722
775
|
export declare const PRINT_ROW_PAD_PX = 10;
|
|
723
776
|
/** Characters per wrapped line of free text in the cares column. */
|
|
724
777
|
export declare const PRINT_WRAP_CHARS = 22;
|
|
778
|
+
/** Characters per wrapped line of the name in the 192px patient column. */
|
|
779
|
+
export declare const PRINT_PATIENT_WRAP_CHARS = 20;
|
|
725
780
|
/** Cells and headers tighten to the small step — the sheet has to fit an
|
|
726
781
|
* A4 portrait; the var is read on the cell itself, so no cascade fight. */
|
|
727
782
|
export declare const PRINT_CELL_CLASS = "ds:[--ag-cell-horizontal-padding:var(--spacing-sm)]";
|
|
@@ -788,6 +843,9 @@ export interface AvailabilitySlotCell extends AvailabilityRange {
|
|
|
788
843
|
/** Distinct chair x operator combinations sharing this exact
|
|
789
844
|
* start + duration (+ resource column, on a resource axis). */
|
|
790
845
|
optionCount: number;
|
|
846
|
+
/** Distinct finder answers in this cell (chair, operator, care and device
|
|
847
|
+
* all counted), so a click books straight away only when it is 1. */
|
|
848
|
+
slotCount: number;
|
|
791
849
|
}
|
|
792
850
|
/**
|
|
793
851
|
* One cell per DISTINCT start + duration, not a merged band: the grid
|
|
@@ -49,7 +49,11 @@ export declare function resetCalendarPreferences(): void;
|
|
|
49
49
|
export declare const CALENDAR_PREFERENCE_KEYS: {
|
|
50
50
|
readonly view: "calendarWorkspace.view";
|
|
51
51
|
readonly display: "calendarWorkspace.display";
|
|
52
|
+
/** The old Show weekends switch. Still READ: a user who has not chosen
|
|
53
|
+
* days yet keeps it as the matching hidden set. Never written. */
|
|
52
54
|
readonly showWeekends: "calendarWorkspace.showWeekends";
|
|
55
|
+
/** The weekdays this user hides, 0 (Sunday) to 6 (Saturday). */
|
|
56
|
+
readonly hiddenDays: "calendarWorkspace.hiddenDays";
|
|
53
57
|
readonly chairIds: "calendarWorkspace.chairIds";
|
|
54
58
|
readonly operatorIds: "calendarWorkspace.operatorIds";
|
|
55
59
|
};
|
|
@@ -28,10 +28,11 @@ import type { CalendarEditorCapabilities } from './calendar.model';
|
|
|
28
28
|
import type { CalendarEditorSeries } from './calendar-editor-hydration';
|
|
29
29
|
import { type CalendarResource } from '../../components/calendar';
|
|
30
30
|
import { type NotesPanelNote, type NotesPanelProps, type NotesPanelSubmission, type AiConsentGate } from '../../components/notes-panel';
|
|
31
|
-
import
|
|
31
|
+
import type { AppointmentConsentItem } from '../../components/appointment-details-panel';
|
|
32
|
+
import { type ColorAssociation, type CalendarCarePlan, type CalendarAnamnesisAnswer, type CalendarOperatorGroup, type CalendarBookingPatientPrefill, type CalendarCreatePatient, type CalendarPatient, type CalendarWaitingEntry, type CalendarHistoryEntry, type CalendarSignChannel, type PatientRef } from './calendar.types';
|
|
32
33
|
import { type CalendarData } from './calendar.data';
|
|
33
34
|
import { type CalendarRow, type DisplaySettings, type EditorPrefill, type EditorDraft, type DraftSlot, type SlotPatch, type BacklogFilter, type BacklogItem, type WaitingEntryDraft, type CalendarFreeSlot, type PrintDaySection, type FindSlotsSeed, type AvailabilityContext } from './calendar.model';
|
|
34
|
-
import { type BacklogGap, type EditorDraftExtras, type DeleteOptions, type WorkspaceDisplaySettings } from './calendar-workspace.model';
|
|
35
|
+
import { type BacklogGap, type RecurringScopeChosen, type EditorDraftExtras, type CareDeviceChoice, type MedicalDeviceQuery, type DeleteOptions, type WorkspaceDisplaySettings } from './calendar-workspace.model';
|
|
35
36
|
import { type BookingCompleteIntent } from './calendar-bookings-panel';
|
|
36
37
|
/** The operators a NEW booking may take — the practice's ACTIVE cast, as
|
|
37
38
|
* on the platform. A disabled operator reaches a list only through
|
|
@@ -198,15 +199,60 @@ export interface EditorPlatformOptions {
|
|
|
198
199
|
}[];
|
|
199
200
|
/** Care id → device names; drives the read-only devices line. */
|
|
200
201
|
devicesByCare?: Readonly<Record<string, readonly string[]>>;
|
|
202
|
+
/** Medical devices (B9): what each chosen care can use at the visit's
|
|
203
|
+
* slot. Asked once per change of cares, date, time, length or
|
|
204
|
+
* appointment, and must be synchronous and pure. Cares that need no
|
|
205
|
+
* device are left out of the answer. Each care shows a choice, already
|
|
206
|
+
* set to `assignedId`; a pick resets when the time or length changes,
|
|
207
|
+
* so the host assigns again for the new slot. The chosen devices reach
|
|
208
|
+
* the host in `EditorDraftExtras.medicalDevices`. When every device is
|
|
209
|
+
* busy the editor says so and the save still goes ahead. Omit it and
|
|
210
|
+
* the editor shows the read-only `devicesByCare` line, or nothing. The
|
|
211
|
+
* kit never masks device names: they are equipment, not patient data,
|
|
212
|
+
* so a host that wants them hidden passes neutral names. */
|
|
213
|
+
medicalDevicesForCares?: (query: MedicalDeviceQuery) => readonly CareDeviceChoice[];
|
|
201
214
|
/** Required documents still unsigned for a patient (sign-mode radios). */
|
|
202
215
|
unsignedRequiredDocs?: (patientId: string) => number;
|
|
216
|
+
/** The treatment consents the chosen cares need for THIS appointment
|
|
217
|
+
* (HTP-3395): `eventId` is set on edit and absent on create. A new
|
|
218
|
+
* consent is made for every visit, so answer per appointment, never per
|
|
219
|
+
* patient. Each `missing` one shows as a tick (ticked on create, unticked on edit), and
|
|
220
|
+
* the ticked ids reach the host in `EditorDraftExtras.consentIds` with
|
|
221
|
+
* the save: the host creates and sends them, and picks in-person or
|
|
222
|
+
* remote signing itself. `requested` and `signed` ones show as text.
|
|
223
|
+
* Absent, or an empty answer: the editor shows nothing. Must be
|
|
224
|
+
* synchronous, pure and cheap: it is asked once per change of cares,
|
|
225
|
+
* appointment or function identity, and has no loading or error state.
|
|
226
|
+
* Resolve the answer first and pass a new function when it changes. */
|
|
227
|
+
consentsForCares?: (careIds: readonly string[], eventId?: string) => readonly AppointmentConsentItem[];
|
|
228
|
+
/** Create a patient from the online booking being processed. The editor
|
|
229
|
+
* offers "Create patient" in the booking card while no patient is
|
|
230
|
+
* chosen; the host opens its own new-patient form filled with the
|
|
231
|
+
* booking name, phone and email and resolves with the new patient, or
|
|
232
|
+
* with `undefined` when the user cancels (nothing changes). Make the
|
|
233
|
+
* record available through `CalendarData.patientById` before resolving,
|
|
234
|
+
* as `searchPatients` asks. Reject with a safe, user-facing `Error` on
|
|
235
|
+
* failure. Omit it and the button is withheld. Never offered to a
|
|
236
|
+
* read-only viewer or when the patient is locked. */
|
|
237
|
+
createPatientFromBooking?: (contact: CalendarBookingPatientPrefill) => Promise<CalendarPatient | undefined>;
|
|
238
|
+
/** "Create patient" under the patient search, for any appointment with
|
|
239
|
+
* no patient chosen: the host opens its own new-patient form and
|
|
240
|
+
* resolves with the new patient, or `null` on cancel (nothing changes).
|
|
241
|
+
* See `CalendarCreatePatient`. Omit it and the action is withheld, as it
|
|
242
|
+
* is for a read-only viewer and a locked patient. An online booking
|
|
243
|
+
* with `createPatientFromBooking` keeps its own button and prefill. */
|
|
244
|
+
createPatient?: CalendarCreatePatient;
|
|
203
245
|
/** The agenda, for the busy chair / busy operator warnings. */
|
|
204
246
|
rows?: readonly CalendarRow[];
|
|
205
247
|
/** Enter in a text field submits (the platform's modal never did). */
|
|
206
248
|
submitOnEnter?: boolean;
|
|
207
|
-
/** The edited appointment belongs to a series
|
|
249
|
+
/** The edited appointment belongs to a series and was not changed on
|
|
250
|
+
* its own — offer the save scope. */
|
|
208
251
|
recurringScope?: boolean;
|
|
209
|
-
/**
|
|
252
|
+
/** Delete offers the scope when the appointment belongs to a series,
|
|
253
|
+
* changed on its own or not. Defaults to `recurringScope`. */
|
|
254
|
+
recurringDeleteScope?: boolean;
|
|
255
|
+
/** Any occurrence of a price-list series — ask about the care-plan lines on delete. */
|
|
210
256
|
carePlanCleanup?: boolean;
|
|
211
257
|
/** Operator options for the select — defaults to the shared active
|
|
212
258
|
* cast. A host whose appointment is held by an operator the practice
|
|
@@ -222,9 +268,9 @@ export interface EditorPlatformOptions {
|
|
|
222
268
|
* Increment 1 narrows this to `['whatsapp']` (audit A2). */
|
|
223
269
|
reminderChannels?: readonly ReminderChannel[];
|
|
224
270
|
/** Offer the Final State's extra recurrence rules — the "Ends: after N
|
|
225
|
-
* / on a date" choice and the skip-closed-days switch.
|
|
226
|
-
*
|
|
227
|
-
*
|
|
271
|
+
* / on a date" choice and the skip-closed-days switch. A host that
|
|
272
|
+
* can persist only a repetition count turns this off and keeps
|
|
273
|
+
* frequency + count alone (audit A3). */
|
|
228
274
|
recurrenceExtras?: boolean;
|
|
229
275
|
/** Offer the Custom rule (HTP-4261) inline: every N days, weeks, months
|
|
230
276
|
* or years, the weekdays of a weekly rule, the day or nth weekday of a
|
|
@@ -237,14 +283,23 @@ export interface EditorPlatformOptions {
|
|
|
237
283
|
* The platform has no closed-day skip, so a platform host that turns
|
|
238
284
|
* `recurrenceExtras` on for the end date turns this off. */
|
|
239
285
|
recurrenceSkipClosedDays?: boolean;
|
|
240
|
-
/**
|
|
241
|
-
|
|
242
|
-
|
|
286
|
+
/** Where the skip switch starts on a new series. Defaults to on. */
|
|
287
|
+
recurrenceSkipClosedDaysDefault?: boolean;
|
|
288
|
+
/** Show the chosen operator's absence as a third sibling of the busy
|
|
289
|
+
* warnings. Off: it keeps the date-side closure banner. Either way it
|
|
290
|
+
* only warns and never holds the save (audit C9, P25). */
|
|
243
291
|
operatorAbsenceWarning?: boolean;
|
|
244
292
|
/** Show the reminder checkboxes only once a patient is chosen, and
|
|
245
293
|
* disable each channel the patient cannot take, with the platform's
|
|
246
294
|
* "(disabled)" suffix on the label (audit C10). */
|
|
247
295
|
reminderCapability?: boolean;
|
|
296
|
+
/** The practice's default reminder channels (Practice settings, patient
|
|
297
|
+
* notices). The reminder boxes start from them: SMS off and email on
|
|
298
|
+
* when absent. A patient who cannot take a channel still disables it. */
|
|
299
|
+
defaultReminders?: {
|
|
300
|
+
sms?: boolean;
|
|
301
|
+
email?: boolean;
|
|
302
|
+
};
|
|
248
303
|
/** Show "First visit" only once a patient is chosen (audit C11). */
|
|
249
304
|
firstVisitRequiresPatient?: boolean;
|
|
250
305
|
/** Give each price-list row its catalogue phases, and lock a row the
|
|
@@ -257,11 +312,15 @@ export interface EditorPlatformOptions {
|
|
|
257
312
|
* reached from a prefill with `simpleSave: false` (audit C13). */
|
|
258
313
|
onSaveAndReturn?: () => void;
|
|
259
314
|
}
|
|
260
|
-
export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDuplicate, panelTitle, headerIcon, identity, after, closeOnSave, returnsOnCancel, onDraftChange, onPatientContextChange, slotPatch,
|
|
315
|
+
export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDeleteInitiated, onDuplicate, panelTitle, headerIcon, identity, after, closeOnSave, returnsOnCancel, onDraftChange, onPatientContextChange, slotPatch, locale, scheduleByEntry, history, noteUnrecordedEdits, onMove, onCopy, onWhatsApp, readOnly, capabilities: hostCapabilities, series, onRecurringScopeChosen, platform, className, }: {
|
|
261
316
|
prefill?: EditorPrefill;
|
|
262
317
|
capabilities?: CalendarEditorCapabilities;
|
|
263
318
|
/** A host-read occurrence: its scope is asked before the form. */
|
|
264
319
|
series?: CalendarEditorSeries;
|
|
320
|
+
/** The user answered the scope question: an accepted save (with the
|
|
321
|
+
* scope it saved under, chosen in the host chooser or the radios) or a
|
|
322
|
+
* confirmed delete. Once per save, never on Cancel or a refused save. */
|
|
323
|
+
onRecurringScopeChosen?: (answer: RecurringScopeChosen) => void;
|
|
265
324
|
/** The editor closes only after acceptance. A rejection leaves the
|
|
266
325
|
* draft intact and displays its safe, user-facing Error message. */
|
|
267
326
|
onSave: (draft: EditorDraft, extras?: EditorDraftExtras) => void | Promise<void>;
|
|
@@ -278,6 +337,9 @@ export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDu
|
|
|
278
337
|
/** Edit mode only — removes the event; confirmed via an alert dialog
|
|
279
338
|
* that also asks the recurring scope and the care-plan cleanup. */
|
|
280
339
|
onDelete?: (eventId: string, options?: DeleteOptions) => void;
|
|
340
|
+
/** Edit only: the Delete button was clicked, before the confirm. Raised
|
|
341
|
+
* once per click, with the appointment's id, whatever the answer. */
|
|
342
|
+
onDeleteInitiated?: (eventId: string) => void;
|
|
281
343
|
/** Edit mode only — re-seeds the CREATE editor from the current form
|
|
282
344
|
* state (everything but the identity). Unset hides the Duplicate icon
|
|
283
345
|
* altogether, leaving Copy… placement as the one copy path. */
|
|
@@ -294,9 +356,9 @@ export declare function AppointmentEditorPanel({ prefill, onSave, onDelete, onDu
|
|
|
294
356
|
/** Cancel returns somewhere (the details panel), so an unchanged edit
|
|
295
357
|
* may cancel too. */
|
|
296
358
|
returnsOnCancel?: boolean;
|
|
297
|
-
/**
|
|
298
|
-
*
|
|
299
|
-
colorAssociation
|
|
359
|
+
/** @deprecated Ignored. "Colour by" is a view choice: it no longer sets
|
|
360
|
+
* the editor's colour. Hosts can stop passing it. */
|
|
361
|
+
colorAssociation?: ColorAssociation;
|
|
300
362
|
/** BCP 47 locale for the checklist's scheduled-date chips and prices. */
|
|
301
363
|
locale?: string;
|
|
302
364
|
/** Plan line id → its booked appointments (`scheduleByEntryId`). */
|
|
@@ -385,8 +447,10 @@ export declare function PatientCarePlanPanel({ plans, linkedPlanId, linkedEntryI
|
|
|
385
447
|
/** Navigate the grid to the appointment and select it. */
|
|
386
448
|
onReveal: (eventId: string) => void;
|
|
387
449
|
}): import("react/jsx-runtime").JSX.Element;
|
|
388
|
-
export declare function BacklogPanel({ items, locale, seed, signRequests, onProcess, onFocusEvent, onConfirm, onRequestSignature, onScheduleWaiting, onRemoveWaiting, onFindSlotsForWaiting, onUpsertWaiting, quickView, onOpenEntryForm, onPlaceWaiting, }: {
|
|
450
|
+
export declare function BacklogPanel({ items, locale, seed, signRequests, onProcess, onFocusEvent, onConfirm, onRequestSignature, onScheduleWaiting, onRemoveWaiting, onFindSlotsForWaiting, onUpsertWaiting, quickView, onOpenEntryForm, onPlaceWaiting, onCreatePatient, }: {
|
|
389
451
|
items: BacklogItem[];
|
|
452
|
+
/** "Create patient" in the waiting-list entry form's patient search. */
|
|
453
|
+
onCreatePatient?: CalendarCreatePatient;
|
|
390
454
|
locale: string;
|
|
391
455
|
/** A fresh tick preselects `type` — how every caller opens the queue
|
|
392
456
|
* on one segment without reaching into panel state. */
|
|
@@ -455,11 +519,13 @@ export declare function BookingsPanel({ bookings, locale, privacy, status, lastS
|
|
|
455
519
|
* order (patient, operator, colour, description) and its one rule:
|
|
456
520
|
* a patient OR a description, checked on submit with an inline error.
|
|
457
521
|
*/
|
|
458
|
-
export declare function WaitingListEntryForm({ entry, onSave, onCancel, chrome, readOnly, }: {
|
|
522
|
+
export declare function WaitingListEntryForm({ entry, onSave, onCancel, chrome, readOnly, onCreatePatient, }: {
|
|
459
523
|
/** Set = edit this entry; unset = add a new one. */
|
|
460
524
|
entry?: CalendarWaitingEntry;
|
|
461
525
|
onSave: (draft: WaitingEntryDraft) => void;
|
|
462
526
|
onCancel: () => void;
|
|
527
|
+
/** "Create patient" under the patient search (not offered when read-only). */
|
|
528
|
+
onCreatePatient?: CalendarCreatePatient;
|
|
463
529
|
/** No edit permission: the fields lock, Save is withheld and `submit`
|
|
464
530
|
* refuses — the same three layers the appointment editor uses, so no
|
|
465
531
|
* path can close this form as if a queue entry had been written. */
|
|
@@ -472,8 +538,10 @@ export declare function WaitingListEntryForm({ entry, onSave, onCancel, chrome,
|
|
|
472
538
|
* The same entry form as a `PanelSubview`: it slides over the queue it was
|
|
473
539
|
* opened from, pins Cancel and Save, and hands focus back to the opener.
|
|
474
540
|
*/
|
|
475
|
-
export declare function WaitingListEntrySubview({ open, entry, onSave, onCancel, onRemove, readOnly, }: {
|
|
541
|
+
export declare function WaitingListEntrySubview({ open, entry, onSave, onCancel, onRemove, readOnly, onCreatePatient, }: {
|
|
476
542
|
open: boolean;
|
|
543
|
+
/** "Create patient" under the patient search (not offered when read-only). */
|
|
544
|
+
onCreatePatient?: CalendarCreatePatient;
|
|
477
545
|
/** Set = edit this entry; unset = add a new one. */
|
|
478
546
|
entry?: CalendarWaitingEntry;
|
|
479
547
|
onSave: (draft: WaitingEntryDraft) => void;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type CalendarView } from '../../components/calendar';
|
|
2
|
+
import { type CalendarPracticeSettingsSeam } from './calendar.types';
|
|
2
3
|
import { type CalendarPreferenceAdapter } from './calendar.preferences';
|
|
3
|
-
import { type CalendarRow, type RailFocus, type EditorPrefill, type HistoryInput, type AvailabilityContext, type CalendarFreeSlot } from './calendar.model';
|
|
4
|
-
import { type
|
|
5
|
-
import type
|
|
6
|
-
|
|
4
|
+
import { type CalendarRow, type RailFocus, type DraftSlot, type EditorPrefill, type HistoryInput, type AvailabilityContext, type CalendarFreeSlot } from './calendar.model';
|
|
5
|
+
import { type CalendarArchive, type CalendarPrompts } from './calendar.types';
|
|
6
|
+
import { type CalendarViewChange, type WorkspaceDisplaySettings, type WorkspaceViewId, type CreateModeRequest, type PlacementRequest, type SaveNotice, type RecurringScopeChosen, type CalendarWorkspaceToolId } from './calendar-workspace.model';
|
|
7
|
+
import type { CalendarSettingsBridge } from './calendar-settings-panel';
|
|
8
|
+
import type { CalendarJourney } from './calendar.journey';
|
|
9
|
+
export declare function CalendarSurface({ rows, setRows, draftSlot, onFocus, locale, onComposeNew, onComposeTask, onOpenWaitingList, onAddWaitingEntry, onOpenOnlineBookings, onlineBookingsCount, waitingBadgeCount, onVisibleRangeChange, onRetryLoad, selectedEventId, gotoRequest, onBookSlot, onBookSlotFromFinder, display, setDisplay, defaultDisplay, onHistory, readOnly, reviewOnlyEventIds, detailsOnEveryClick, gridHeld, placement, onPlacementEnd, createMode, onCreateModeEnd, focusScroll, saveNotice, privacy, onPrivacyChange, availability, availabilityContext, availableTools, schedulerLicenseKey, id, preferences, onMoveOccurrence, onMoveAppointment, onResizeAppointment, onCopyAppointment, onDeleteAppointment, onRecurringScopeChosen, onViewChange, initialView, onNavigate, onPeekOpen, settingsBridge, settingsOpen, onToggleSettings, onSettingChanged, onHoursOpened, practiceSettings, onMoveDropped, onPrintUsed, onJumpToDateUsed, calendarArchive, prompts, }: {
|
|
7
10
|
rows: CalendarRow[];
|
|
8
11
|
setRows: React.Dispatch<React.SetStateAction<CalendarRow[]>>;
|
|
9
12
|
onFocus: (focus: RailFocus) => void;
|
|
@@ -18,6 +21,11 @@ export declare function CalendarSurface({ rows, setRows, onFocus, locale, onComp
|
|
|
18
21
|
availabilityContext: AvailabilityContext | null;
|
|
19
22
|
/** No edit permission: no drag, no slot-click create. */
|
|
20
23
|
readOnly?: boolean;
|
|
24
|
+
/** An archive session (rules 2 to 4 and 6): no chair or operator columns
|
|
25
|
+
* or filters, no drag or resize, a banner with Exit, the view on Week. */
|
|
26
|
+
calendarArchive?: CalendarArchive;
|
|
27
|
+
/** The host's banner, first-appointment alert and Academy link. */
|
|
28
|
+
prompts?: CalendarPrompts;
|
|
21
29
|
/** Host queue rows whose canonical editor data is not available yet. */
|
|
22
30
|
reviewOnlyEventIds?: ReadonlySet<string>;
|
|
23
31
|
/** The host reads its own details: every row click focuses, including
|
|
@@ -67,6 +75,9 @@ export declare function CalendarSurface({ rows, setRows, onFocus, locale, onComp
|
|
|
67
75
|
tick: number;
|
|
68
76
|
date: Date;
|
|
69
77
|
} | null;
|
|
78
|
+
/** The open NEW-appointment form's slot, held on the grid as a dashed
|
|
79
|
+
* draft card until Save or Cancel. `null` when no create form is open. */
|
|
80
|
+
draftSlot?: DraftSlot | null;
|
|
70
81
|
/** Seed the editor prefilled (an empty-slot click, a booking to process). */
|
|
71
82
|
onBookSlot: (prefill: EditorPrefill) => void;
|
|
72
83
|
/** A host tool holds the dock (`hold`): a grid click still selects, but
|
|
@@ -86,6 +97,10 @@ export declare function CalendarSurface({ rows, setRows, onFocus, locale, onComp
|
|
|
86
97
|
start: number;
|
|
87
98
|
end: number;
|
|
88
99
|
}) => void;
|
|
100
|
+
/** Loads the visible range again after a day came back `'error'` in
|
|
101
|
+
* `CalendarData.dayLoadState`. Withheld = the message shows without a
|
|
102
|
+
* Retry button. */
|
|
103
|
+
onRetryLoad?: () => void;
|
|
89
104
|
/** The rail tools this host can back. A toolbar control whose tool is
|
|
90
105
|
* not in the set is not rendered at all — a button that opens a
|
|
91
106
|
* panel the host has no data for is worse than a missing one. */
|
|
@@ -101,11 +116,54 @@ export declare function CalendarSurface({ rows, setRows, onFocus, locale, onComp
|
|
|
101
116
|
* store. Defaults to the session-scoped in-memory adapter. */
|
|
102
117
|
preferences?: CalendarPreferenceAdapter;
|
|
103
118
|
/** The host's series move (S-C8). With it, a recurring parent's move
|
|
104
|
-
* always confirms
|
|
105
|
-
|
|
119
|
+
* always confirms and asks the scope. The notify boxes need
|
|
120
|
+
* `onMoveAppointment` and show for "this" only (P9). */
|
|
121
|
+
onMoveOccurrence?: CalendarJourney['handleMoveOccurrence'];
|
|
122
|
+
/** The host's writes for one appointment's move, resize and copy. Each
|
|
123
|
+
* is optional: without it the change reaches the host through `setRows`
|
|
124
|
+
* only. A copy's Undo calls `onDeleteAppointment` with its id, and is
|
|
125
|
+
* withheld when `onCopyAppointment` is set without it. */
|
|
126
|
+
onMoveAppointment?: CalendarJourney['handleMoveAppointment'];
|
|
127
|
+
onResizeAppointment?: CalendarJourney['handleResizeAppointment'];
|
|
128
|
+
onCopyAppointment?: CalendarJourney['handleCopyAppointment'];
|
|
129
|
+
onDeleteAppointment?: CalendarJourney['handleDeleteAppointment'];
|
|
130
|
+
/** The user answered the scope question in the move confirm. Not raised
|
|
131
|
+
* on Cancel, nor for a row changed on its own (no question is asked). */
|
|
132
|
+
onRecurringScopeChosen?: (answer: RecurringScopeChosen) => void;
|
|
133
|
+
/** A dragged card was dropped (past the read-only refusal): the grid's
|
|
134
|
+
* Move, raised before the confirm. */
|
|
135
|
+
onMoveDropped?: (eventId: string) => void;
|
|
136
|
+
/** The print dialog was confirmed. */
|
|
137
|
+
onPrintUsed?: () => void;
|
|
138
|
+
/** A date was picked in the jump-to-date picker. */
|
|
139
|
+
onJumpToDateUsed?: () => void;
|
|
106
140
|
/** The grid's view, on mount and on every change. Usage reporting only. */
|
|
107
141
|
onViewChange?: (view: CalendarView) => void;
|
|
142
|
+
/** The view the page address names. It beats the remembered view until
|
|
143
|
+
* the user picks another, and the remembered view is not overwritten. */
|
|
144
|
+
initialView?: WorkspaceViewId;
|
|
145
|
+
/** The grid went to another view, day or axis: once per navigation,
|
|
146
|
+
* never for the first render. Hosts keep the page address with it. */
|
|
147
|
+
onNavigate?: (change: CalendarViewChange) => void;
|
|
108
148
|
/** An appointment's preview opened. Usage reporting only. */
|
|
109
149
|
onPeekOpen?: (eventId: string) => void;
|
|
150
|
+
/** Where the toolbar's Settings button and the Settings panel in the rail
|
|
151
|
+
* meet: the surface publishes the panel's props here and takes the
|
|
152
|
+
* button's ref from it. Without it the button is withheld. */
|
|
153
|
+
settingsBridge?: CalendarSettingsBridge;
|
|
154
|
+
/** The Settings panel is the open rail tool: the button's expanded state. */
|
|
155
|
+
settingsOpen?: boolean;
|
|
156
|
+
/** The Settings button was pressed: the workspace opens or closes the
|
|
157
|
+
* panel (and asks about unsaved Practice changes). */
|
|
158
|
+
onToggleSettings?: () => void;
|
|
159
|
+
/** A personal setting changed in the Settings panel. Usage reporting only. */
|
|
160
|
+
onSettingChanged?: (event: {
|
|
161
|
+
setting: string;
|
|
162
|
+
section: 'personal' | 'practice';
|
|
163
|
+
}) => void;
|
|
164
|
+
/** The Practice section's hours link was followed. Usage reporting only. */
|
|
165
|
+
onHoursOpened?: () => void;
|
|
166
|
+
/** The Settings panel's Practice section seam (see `CalendarWorkspaceProps`). */
|
|
167
|
+
practiceSettings?: CalendarPracticeSettingsSeam;
|
|
110
168
|
}): import("react/jsx-runtime").JSX.Element;
|
|
111
169
|
//# sourceMappingURL=calendar.surface.d.ts.map
|