@alfadocs/ui-kit 1.22.0 → 1.25.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.
@@ -68,6 +68,22 @@ export interface CalendarWorkspaceProps {
68
68
  * calendar and the DOM hook anything outside React reaches it by.
69
69
  * Override it only when two workspaces share one page. */
70
70
  id?: string;
71
+ /**
72
+ * The window the free-slot finder is about to search, raised before it runs.
73
+ *
74
+ * The finder projects free time from `journey.rows` and nothing else, so a
75
+ * host whose rows cover only the visible grid would have it report booked
76
+ * time as FREE over a range the user chose and the host never heard about.
77
+ * Load that range on this call: new rows re-render the panel, the search
78
+ * runs again, and the second answer is the correct one.
79
+ *
80
+ * A host that offers the finder without honouring this is showing staff free
81
+ * slots it has not checked.
82
+ */
83
+ onFinderSearchRange?: (range: {
84
+ from: Date;
85
+ to: Date;
86
+ }) => void;
71
87
  }
72
88
  /**
73
89
  * The cog's settings as the workspace opens with them: the remembered
@@ -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 {
@@ -388,7 +388,7 @@ export interface FindSlotsPlatformOptions {
388
388
  * `GetGroupedOperatorService`); absent = one flat list. */
389
389
  operatorGroups?: readonly CalendarOperatorGroup[];
390
390
  }
391
- export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onShowInCalendar, platform, }: {
391
+ export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onShowInCalendar, onSearchRange, platform, }: {
392
392
  rows: CalendarRow[];
393
393
  locale: string;
394
394
  /** Prefill context (the tool keys its panel by seed.tick). */
@@ -400,5 +400,18 @@ export declare function FindFreeSlotsPanel({ rows, locale, seed, onBookSlot, onS
400
400
  * Calendar dims booked cards and glows the free ranges. The context
401
401
  * carries the seeded patient/care into grid-click bookings. */
402
402
  onShowInCalendar: (slots: CalendarFreeSlot[] | null, fromDate?: Date, context?: AvailabilityContext) => void;
403
+ /**
404
+ * The window a search is about to cover, raised BEFORE it runs.
405
+ *
406
+ * The projection's busy set is `rows` and nothing else, so a host whose rows
407
+ * cover only the visible grid would have this report booked time as free
408
+ * over a range it was never told about. A host that loads on this call gets
409
+ * a corrected search for nothing: new rows re-render the panel and the
410
+ * search runs again.
411
+ */
412
+ onSearchRange?: (range: {
413
+ from: Date;
414
+ to: Date;
415
+ }) => void;
403
416
  }): import("react/jsx-runtime").JSX.Element;
404
417
  //# sourceMappingURL=calendar.sheets.d.ts.map
@@ -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-Dy4ZKtW0.js";
2
2
  export {
3
3
  s as CALENDAR_PREFERENCE_KEYS,
4
4
  r as CalendarDataProvider,