@alfadocs/ui-kit 1.23.0 → 1.25.1-calendar.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.23.0",
3
+ "packageVersion": "1.25.1-calendar.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -17373,7 +17373,7 @@
17373
17373
  {
17374
17374
  "name": "triage_online_booking",
17375
17375
  "safety": "phi",
17376
- "description": "Work the online-bookings panel — the platform's bookings page hosted in the rail, badged with the bookings of the last thirty days still missing a patient or an operator. A row can be shown on the grid, which selects it and docks its details, or completed, which docks the editor prefilled with what the person typed on the booking site so the missing patient or operator can be filled in and saved. Completing writes patient-identifiable data.",
17376
+ "description": "Review the online-bookings queue independently of the visible dates. The host owns membership and loading/error state. Show a row on the grid; completion is available only when the host enables it and the user can edit. Review-only rows remain in the queue on selection and cannot be dragged, resized or edited. Unknown last-seen data never marks a booking New. Completing writes patient-identifiable data.",
17377
17377
  "descriptionKey": "ui.agent.calendar.workflows.triageOnlineBooking",
17378
17378
  "uiActions": [
17379
17379
  "calendar.focus_event",
@@ -187,7 +187,7 @@
187
187
  "manageWaitingListEntry": "Add, amend or remove a waiting-list entry. The four-field form opens as a rail SUB-VIEW — from the toolbar split button's plus segment, from Add entry, or from a row's pencil — with a back arrow to the queue. Editing is refused on a row already linked to an appointment, because those fields belong to the appointment; the pencil stays focusable and names that reason. Remove deletes at once with no confirmation, platform parity, and its toast carries an Undo that puts the entry back. Writes patient-identifiable data.",
188
188
  "scheduleWaitingPatient": "Give a waiting patient a slot. \"Schedule\" on an unlinked row hands off to the free-slot finder seeded from the entry — operator, chair, duration, patient, care and colour already filled in — and booking a slot opens the editor carrying the entry, so saving books the appointment and takes the entry off the list. A row already linked to an appointment reads \"Reschedule\" and seeds the same finder, but booking there MOVES the existing appointment rather than creating a second one. Writes patient-identifiable data.",
189
189
  "findFreeSlot": "Search the practice for bookable time in the finder panel. Operator and chair scope are grouped checklists behind a popover per axis — a select-all row first, operators sectioned under their groups, nothing ticked searching every eligible resource — beside the care, the duration, the date range and, for a care that needs one, a medical-device select. The results list groups the slots under a day heading; a click steers the grid to that day and docks the editor prefilled with the date, time, duration, chair, operator and any seeded patient or care. The 185-day range warning is advisory (the search still runs), \"Show more slots\" pushes the To date out by 30 days and re-searches, and an alert names which business hours are missing when the practice or its operators hold none (it links to the scheduler only where the host supplies that navigation, which this workspace does not). Read-only until a slot is booked.",
190
- "triageOnlineBooking": "Work the online-bookings panel — the platform's bookings page hosted in the rail, badged with the bookings of the last thirty days still missing a patient or an operator. A row can be shown on the grid, which selects it and docks its details, or completed, which docks the editor prefilled with what the person typed on the booking site so the missing patient or operator can be filled in and saved. Completing writes patient-identifiable data.",
190
+ "triageOnlineBooking": "Review the online-bookings queue independently of the visible dates. The host owns membership and loading/error state. Show a row on the grid; completion is available only when the host enables it and the user can edit. Review-only rows remain in the queue on selection and cannot be dragged, resized or edited. Unknown last-seen data never marks a booking New. Completing writes patient-identifiable data.",
191
191
  "printDaySheet": "Print the front-desk call sheet. The toolbar's printer icon opens a dialog asking which day — one day, never the visible range — and Print renders that day's appointments through the browser, scoped by the filters in force and masked when privacy mode is on. Nothing is sent to a server, but the sheet itself is a patient-identifiable document."
192
192
  }
193
193
  },
@@ -1,5 +1,5 @@
1
- import { A as p } from "../../_chunks/appointment-card-Dzr3GeVz.js";
2
- import { A as e, a as o, b as r } from "../../_chunks/appointment-tray-4FUu_5NX.js";
1
+ import { A as p } from "../../_chunks/appointment-card-CvUFFEdS.js";
2
+ import { A as e, a as o, b as r } from "../../_chunks/appointment-tray-Z2GaOIYQ.js";
3
3
  import { i } from "../../_chunks/is-safe-url-DkETxeHz.js";
4
4
  export {
5
5
  p as AppointmentCard,
@@ -1,4 +1,4 @@
1
- import { A as i, a as t } from "../../_chunks/appointment-timeline-DhHwmHo1.js";
1
+ import { A as i, a as t } from "../../_chunks/appointment-timeline-DsMZY7U9.js";
2
2
  export {
3
3
  i as AppointmentTimeline,
4
4
  t as appointmentTimelineAgent
@@ -357,6 +357,21 @@ export interface CalendarProps {
357
357
  eventDurationEditable?: boolean;
358
358
  /** Allow click-drag to create. */
359
359
  selectable?: boolean;
360
+ /**
361
+ * Paint a placeholder over the range as it is dragged, so the user sees the
362
+ * appointment they are about to make rather than only the slot they started
363
+ * from. FullCalendar's own default is off; the kit turns it on wherever
364
+ * `selectable` is on, because a selection nobody can see is not a selection.
365
+ */
366
+ selectMirror?: boolean;
367
+ /**
368
+ * Keep the highlight when the pointer goes elsewhere. FullCalendar clears a
369
+ * selection on the next click anywhere, which is wrong when that click is
370
+ * the host opening an editor for the very slot just chosen: the form fills
371
+ * in and the grid forgets which slot it was about. Set false to hold it
372
+ * until the host clears it.
373
+ */
374
+ unselectAuto?: boolean;
360
375
  /** Height of the calendar. */
361
376
  height?: number | string;
362
377
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { C as r, c as l, r as n } from "../../_chunks/calendar-BQPyUUPP.js";
1
+ import { C as r, c as l, r as n } from "../../_chunks/calendar-CBqU-UIR.js";
2
2
  export {
3
3
  r as Calendar,
4
4
  l as calendarAgent,
package/dist/index.js CHANGED
@@ -123,9 +123,9 @@ import { i as ji, i as Qi, i as Ji, i as Zi } from "./_chunks/is-safe-url-DkETxe
123
123
  import { A as ap, a as ep } from "./_chunks/agenda-tray-BweO8pDo.js";
124
124
  import { A as rp, a as op } from "./_chunks/ai-consent-banner-OggpS5hW.js";
125
125
  import { A as np } from "./_chunks/alert-CiJT540z.js";
126
- import { A as pp } from "./_chunks/appointment-card-Dzr3GeVz.js";
127
- import { A as lp, a as dp, b as Ap } from "./_chunks/appointment-tray-4FUu_5NX.js";
128
- import { A as fp, a as gp } from "./_chunks/appointment-timeline-DhHwmHo1.js";
126
+ import { A as pp } from "./_chunks/appointment-card-CvUFFEdS.js";
127
+ import { A as lp, a as dp, b as Ap } from "./_chunks/appointment-tray-Z2GaOIYQ.js";
128
+ import { A as fp, a as gp } from "./_chunks/appointment-timeline-DsMZY7U9.js";
129
129
  import { D as Cp, d as Tp } from "./_chunks/dialog-UbKJCi1X.js";
130
130
  import { D as up, d as Pp } from "./_chunks/dropdown-menu-DU-Hrf33.js";
131
131
  import { E as Ep } from "./_chunks/error-boundary-ayXFCcq4.js";
@@ -184,7 +184,7 @@ import { A as ud } from "./_chunks/anamnesis-card-NTi4LLzI.js";
184
184
  import { D as Id, F as Ed, a as Rd, M as _d, b as bd, e as Nd, f as Dd, g as hd, c as Od, m as Fd, r as Ld, v as Md } from "./_chunks/muscle-scheme-BSJsI4-I.js";
185
185
  import { A as kd, a as Bd, b as Gd, c as Hd, d as vd, e as wd, C as Ud, f as Vd, g as Wd, D as Kd, h as Yd, E as Xd, L as qd, O as zd, P as jd, i as Qd, j as Jd, k as Zd, l as $d, R as aA, S as eA, m as sA, n as rA, o as oA, p as tA, q as nA, r as iA, s as pA, t as mA, u as lA, v as dA, w as AA, x as cA, y as fA, z as gA, B as SA, F as CA } from "./_chunks/optical-prescription-BvwuqTpl.js";
186
186
  import { B as xA, C as uA, O as PA, b as IA } from "./_chunks/booking-WXKbA69C.js";
187
- import { C as RA, c as _A, r as bA } from "./_chunks/calendar-BQPyUUPP.js";
187
+ import { C as RA, c as _A, r as bA } from "./_chunks/calendar-CBqU-UIR.js";
188
188
  import { C as DA } from "./_chunks/calendar-event-card-66CEEWU6.js";
189
189
  import { R as OA } from "./_chunks/resource-chip-DYTG0IQQ.js";
190
190
  import { C as LA, c as MA } from "./_chunks/care-plan-card-CQVboTn1.js";
@@ -223,7 +223,7 @@ import { W as BS, a as GS } from "./_chunks/whatsapp-button-CuFIHJzG.js";
223
223
  import { C as vS, W as wS, a as US, b as VS, c as WS, i as KS, l as YS, m as XS, r as qS, w as zS, d as jS, e as QS, f as JS } from "./_chunks/workflow-map-dNzJjBWG.js";
224
224
  import { A as $S, a as aC, b as eC, c as sC } from "./_chunks/alia-sidebar-BWcWZivN.js";
225
225
  import { A as oC, a as tC, L as nC, P as iC, S as pC, T as mC, b as lC, c as dC, d as AC, e as cC, f as fC, g as gC, h as SC, i as CC, j as TC, k as xC, l as uC, m as PC, n as IC, o as EC, p as RC, r as _C, q as bC, s as NC, t as DC, u as hC } from "./_chunks/anamnesis-summary-rows-DwjqZgR5.js";
226
- import { C as FC, a as LC, b as MC, D as yC, c as kC, S as BC, V as GC, W as HC, d as vC, i as wC, m as UC, r as VC, u as WC, e as KC, f as YC } from "./_chunks/calendar-workspace-ax7xmSAp.js";
226
+ import { C as FC, a as LC, b as MC, D as yC, c as kC, S as BC, V as GC, W as HC, d as vC, i as wC, m as UC, r as VC, u as WC, e as KC, f as YC } from "./_chunks/calendar-workspace-tm_Xrkrn.js";
227
227
  import { C as qC, M as zC, P as jC } from "./_chunks/marketplace-app-shell-C4AjQmvz.js";
228
228
  import { P as JC } from "./_chunks/payment-automation-upsell-DwQW2fRp.js";
229
229
  import { S as $C } from "./_chunks/signature-request-CwlAmVLw.js";
@@ -1,14 +1,28 @@
1
1
  import { type CalendarData } from './calendar.data';
2
2
  import type { CalendarJourney } from './calendar.journey';
3
3
  import { type CalendarPreferenceAdapter } from './calendar.preferences';
4
- import { type EditorPrefill } from './calendar.model';
4
+ import { type CalendarRow, type EditorPrefill } from './calendar.model';
5
5
  import { type CalendarWorkspaceToolId, type WorkspaceDisplaySettings } from './calendar-workspace.model';
6
6
  export { WORKSPACE_TOOL, type CalendarWorkspaceToolId, } from './calendar-workspace.model';
7
+ /** Host-owned queue membership, independent of the visible calendar range. */
8
+ export interface CalendarOnlineBookings {
9
+ rows: readonly CalendarRow[];
10
+ status: 'loading' | 'ready' | 'error';
11
+ /** Opt in only when the host can load and persist canonical editor data. */
12
+ canComplete?: boolean;
13
+ /** Unknown or invalid means no booking receives a New marker. */
14
+ lastSeenIso?: string | null;
15
+ /** Creation timestamps when the booking has no contact payload. */
16
+ createdAtById?: Readonly<Record<string, string>>;
17
+ onRetry?: () => void;
18
+ }
7
19
  export interface CalendarWorkspaceProps {
8
20
  /** The domain state and its handlers — the host implements them. */
9
21
  journey: CalendarJourney;
10
22
  /** The practice's read model, stable for a page load. */
11
23
  data: CalendarData;
24
+ /** Supplied rows are authoritative, including an explicitly empty queue. */
25
+ onlineBookings?: CalendarOnlineBookings;
12
26
  locale?: string;
13
27
  /** Host-level cog overrides. */
14
28
  initialDisplay?: Partial<WorkspaceDisplaySettings>;
@@ -68,6 +82,22 @@ export interface CalendarWorkspaceProps {
68
82
  * calendar and the DOM hook anything outside React reaches it by.
69
83
  * Override it only when two workspaces share one page. */
70
84
  id?: string;
85
+ /**
86
+ * The window the free-slot finder is about to search, raised before it runs.
87
+ *
88
+ * The finder projects free time from `journey.rows` and nothing else, so a
89
+ * host whose rows cover only the visible grid would have it report booked
90
+ * time as FREE over a range the user chose and the host never heard about.
91
+ * Load that range on this call: new rows re-render the panel, the search
92
+ * runs again, and the second answer is the correct one.
93
+ *
94
+ * A host that offers the finder without honouring this is showing staff free
95
+ * slots it has not checked.
96
+ */
97
+ onFinderSearchRange?: (range: {
98
+ from: Date;
99
+ to: Date;
100
+ }) => void;
71
101
  }
72
102
  /**
73
103
  * The cog's settings as the workspace opens with them: the remembered
@@ -362,9 +362,7 @@ export interface BookingRowView {
362
362
  /** Booked after the user last opened the page — the "(Nuovo)" marker. */
363
363
  isNew: boolean;
364
364
  }
365
- /** Bookings made after this instant carry the platform's "(Nuovo)" tag. */
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;
365
+ export declare function bookingRowView(row: CalendarRow, data: CalendarData, lastSeenMs?: number | null, createdAtIso?: string): BookingRowView;
368
366
  /** The nine advanced inputs, all optional. Empty = the input is unset;
369
367
  * `operatorId` also accepts `NONE`, the platform's "no operator". */
370
368
  export interface WaitingListFilters {
@@ -514,6 +514,8 @@ export declare const FREE_SLOT_CAP = 20;
514
514
  export declare const SLOT_STEP_MIN = 30;
515
515
  /** Platform `FreeSlot::MAX_DAYS_TO_LOOK_AHEAD` — the finder warns past it. */
516
516
  export declare const FREE_SLOT_MAX_RANGE_DAYS = 185;
517
+ /** The From→To span the finder opens on — the platform's own default. */
518
+ export declare const FREE_SLOT_DEFAULT_HORIZON_DAYS = 30;
517
519
  /** Whole days between two dates — the finder's range rule. */
518
520
  export declare function rangeDays(from: Date, to: Date): number;
519
521
  export interface CalendarFreeSlot {
@@ -297,15 +297,19 @@ export declare function BacklogPanel({ items, locale, seed, signRequests, onProc
297
297
  * mode (create / move banner) instead of opening the editor at once. */
298
298
  onPlaceWaiting?: (entry: CalendarWaitingEntry) => void;
299
299
  }): import("react/jsx-runtime").JSX.Element;
300
- export declare function BookingsPanel({ bookings, locale, privacy, onShowInCalendar, onComplete, }: {
300
+ export declare function BookingsPanel({ bookings, locale, privacy, status, lastSeenIso, createdAtById, onRetry, onShowInCalendar, onComplete, }: {
301
301
  bookings: readonly CalendarRow[];
302
302
  locale?: string;
303
303
  /** Masks the patient names, in step with the grid. */
304
304
  privacy?: boolean;
305
+ status?: 'loading' | 'ready' | 'error';
306
+ lastSeenIso?: string | null;
307
+ createdAtById?: Readonly<Record<string, string>>;
308
+ onRetry?: () => void;
305
309
  /** Steers the grid to the booking and rings its card. */
306
310
  onShowInCalendar: (eventId: string) => void;
307
311
  /** Opens the editor to complete it (platform "Completa appuntamento"). */
308
- onComplete: (row: CalendarRow) => void;
312
+ onComplete?: (row: CalendarRow) => void;
309
313
  }): import("react/jsx-runtime").JSX.Element;
310
314
  export declare function WaitingListPanel({ entries, rows, locale, onPlaceWaiting, onRemoveWaiting, onOpenEntryForm, onOpenPatient, onOpenAppointment, readOnly, }: {
311
315
  entries: CalendarWaitingEntry[];
@@ -388,7 +392,7 @@ export interface FindSlotsPlatformOptions {
388
392
  * `GetGroupedOperatorService`); absent = one flat list. */
389
393
  operatorGroups?: readonly CalendarOperatorGroup[];
390
394
  }
391
- export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onShowInCalendar, platform, }: {
395
+ export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onShowInCalendar, onSearchRange, platform, }: {
392
396
  rows: CalendarRow[];
393
397
  locale: string;
394
398
  /** Prefill context (the tool keys its panel by seed.tick). */
@@ -400,5 +404,18 @@ export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onS
400
404
  * Calendar dims booked cards and glows the free ranges. The context
401
405
  * carries the seeded patient/care into grid-click bookings. */
402
406
  onShowInCalendar: (slots: CalendarFreeSlot[] | null, fromDate?: Date, context?: AvailabilityContext) => void;
407
+ /**
408
+ * The window a search is about to cover, raised BEFORE it runs.
409
+ *
410
+ * The projection's busy set is `rows` and nothing else, so a host whose rows
411
+ * cover only the visible grid would have this report booked time as free
412
+ * over a range it was never told about. A host that loads on this call gets
413
+ * a corrected search for nothing: new rows re-render the panel and the
414
+ * search runs again.
415
+ */
416
+ onSearchRange?: (range: {
417
+ from: Date;
418
+ to: Date;
419
+ }) => void;
403
420
  }): import("react/jsx-runtime").JSX.Element;
404
421
  //# sourceMappingURL=calendar.sheets.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { type CalendarPreferenceAdapter } from './calendar.preferences';
2
2
  import { type CalendarRow, type RailFocus, type EditorPrefill, type HistoryInput, type AvailabilityContext, type CalendarFreeSlot } from './calendar.model';
3
3
  import { type WorkspaceDisplaySettings, type CreateModeRequest, type PlacementRequest, type SaveNotice, type CalendarWorkspaceToolId } from './calendar-workspace.model';
4
- export declare function CalendarSurface({ rows, setRows, onFocus, locale, onComposeNew, onOpenWaitingList, onAddWaitingEntry, onOpenOnlineBookings, onlineBookingsCount, waitingBadgeCount, onVisibleRangeChange, selectedEventId, gotoRequest, onBookSlot, display, setDisplay, onHistory, readOnly, placement, onPlacementEnd, createMode, onCreateModeEnd, focusScroll, saveNotice, privacy, onPrivacyChange, availability, availabilityContext, availableTools, schedulerLicenseKey, id, preferences, }: {
4
+ export declare function CalendarSurface({ rows, setRows, onFocus, locale, onComposeNew, onOpenWaitingList, onAddWaitingEntry, onOpenOnlineBookings, onlineBookingsCount, waitingBadgeCount, onVisibleRangeChange, selectedEventId, gotoRequest, onBookSlot, display, setDisplay, onHistory, readOnly, reviewOnlyEventIds, placement, onPlacementEnd, createMode, onCreateModeEnd, focusScroll, saveNotice, privacy, onPrivacyChange, availability, availabilityContext, availableTools, schedulerLicenseKey, id, preferences, }: {
5
5
  rows: CalendarRow[];
6
6
  setRows: React.Dispatch<React.SetStateAction<CalendarRow[]>>;
7
7
  onFocus: (focus: RailFocus) => void;
@@ -16,6 +16,8 @@ export declare function CalendarSurface({ rows, setRows, onFocus, locale, onComp
16
16
  availabilityContext: AvailabilityContext | null;
17
17
  /** No edit permission: no drag, no slot-click create. */
18
18
  readOnly?: boolean;
19
+ /** Host queue rows whose canonical editor data is not available yet. */
20
+ reviewOnlyEventIds?: ReadonlySet<string>;
19
21
  /** A Move… / Copy… armed from the details panel — the grid shows the
20
22
  * mode banner and the next empty-slot click places the appointment. */
21
23
  placement?: PlacementRequest | null;
@@ -1,4 +1,4 @@
1
- export { CalendarWorkspace, initialWorkspaceDisplay, WORKSPACE_TOOL, type CalendarWorkspaceProps, type CalendarWorkspaceToolId, } from './calendar-workspace';
1
+ export { CalendarWorkspace, initialWorkspaceDisplay, WORKSPACE_TOOL, type CalendarWorkspaceProps, type CalendarOnlineBookings, type CalendarWorkspaceToolId, } from './calendar-workspace';
2
2
  export { CalendarDataProvider, useCalendarData, type CalendarData, } from './calendar.data';
3
3
  export type { CalendarJourney } from './calendar.journey';
4
4
  export { SheetHostProvider, useSheetHost, type SheetHostContext, type SheetId, } from './calendar.host';
@@ -1,4 +1,4 @@
1
- import { C as s, a as r, b as E, D as P, c as t, S, V as A, W as C, d, i as o, m as D, r as i, u as n, e as W, f as _ } from "../../_chunks/calendar-workspace-ax7xmSAp.js";
1
+ import { C as s, a as r, b as E, D as P, c as t, S, V as A, W as C, d, i as o, m as D, r as i, u as n, e as W, f as _ } from "../../_chunks/calendar-workspace-tm_Xrkrn.js";
2
2
  export {
3
3
  s as CALENDAR_PREFERENCE_KEYS,
4
4
  r as CalendarDataProvider,