@alfadocs/ui-kit 1.23.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.23.0",
3
+ "packageVersion": "1.25.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -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-CI9MINcR.js";
2
2
  export {
3
3
  r as Calendar,
4
4
  l as calendarAgent,
package/dist/index.js CHANGED
@@ -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-CI9MINcR.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-Dy4ZKtW0.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";
@@ -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,