@alfadocs/ui-kit 1.18.0 → 1.20.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.
Files changed (107) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-CRWO8x8g.js → anamnesis-summary-rows-BPSQhxnZ.js} +2 -2
  2. package/dist/_chunks/{balance-badge-cell-DNjHODfP.js → balance-badge-cell-BlvFil5p.js} +2 -2
  3. package/dist/_chunks/{calendar-PFO-NlYw.js → calendar-BQPyUUPP.js} +43 -43
  4. package/dist/_chunks/calendar-workspace-D6kipuvT.js +7474 -0
  5. package/dist/_chunks/{care-plan-card-D-FMfDKH.js → care-plan-card-CQVboTn1.js} +2 -2
  6. package/dist/_chunks/{care-plan-entry-card-Bvw_9T-d.js → care-plan-entry-card-jxHkzez5.js} +2 -2
  7. package/dist/_chunks/{data-table-DC5rO3Ty.js → data-table-D7nA8OGL.js} +2 -2
  8. package/dist/_chunks/{data-table-tabs-D24qj89A.js → data-table-tabs-DVIFkqx_.js} +2 -2
  9. package/dist/_chunks/{field-value-D-vkX9uL.js → field-value-BetdWMA2.js} +2 -2
  10. package/dist/_chunks/{file-manager-spc3_khe.js → file-manager-Bsc8-MQQ.js} +2 -2
  11. package/dist/_chunks/{header-settings-J-ZCAfir.js → header-settings-DvjZNMhD.js} +2 -2
  12. package/dist/_chunks/{icon-picker-ChzpCnZ-.js → icon-picker-DOa89vn3.js} +2 -2
  13. package/dist/_chunks/{info-tip-C119cwQl.js → info-tip-CADik6WN.js} +2 -2
  14. package/dist/_chunks/{locale-picker-BvbVjDQ-.js → locale-picker-CwFtqSkt.js} +2 -2
  15. package/dist/_chunks/{marketplace-app-shell-DDQXQ8hX.js → marketplace-app-shell-C4AjQmvz.js} +2 -2
  16. package/dist/_chunks/{notes-panel-DYAtlq_i.js → notes-panel-CTNpsByN.js} +2 -2
  17. package/dist/_chunks/{patient-details-BfzvFnxQ.js → patient-details-1QDA-XOO.js} +2 -2
  18. package/dist/_chunks/{patient-summary-card-D5Vfa321.js → patient-summary-card-C9WBwct-.js} +2 -2
  19. package/dist/_chunks/{popover-Cqcjx-Ny.js → popover-DP6WCVwm.js} +2 -2
  20. package/dist/_chunks/{rich-text-editor-DtbcA6s1.js → rich-text-editor-lSCiE0Zz.js} +2 -2
  21. package/dist/_chunks/{signature-request-CUe903hj.js → signature-request-CwlAmVLw.js} +2 -2
  22. package/dist/_chunks/{tooth-scheme-2IsmbE6w.js → tooth-scheme-C9jssOmy.js} +2 -2
  23. package/dist/agent-catalog.json +1 -1
  24. package/dist/components/calendar/calendar.d.ts +6 -1
  25. package/dist/components/calendar/index.js +1 -1
  26. package/dist/components/care-plan-card/index.js +1 -1
  27. package/dist/components/care-plan-entry-card/index.js +1 -1
  28. package/dist/components/data-table/index.js +1 -1
  29. package/dist/components/data-table-tabs/index.js +1 -1
  30. package/dist/components/file-manager/index.js +1 -1
  31. package/dist/components/header-settings/index.js +1 -1
  32. package/dist/components/icon-picker/index.js +1 -1
  33. package/dist/components/info-tip/index.js +1 -1
  34. package/dist/components/locale-picker/index.js +1 -1
  35. package/dist/components/notes-panel/index.js +1 -1
  36. package/dist/components/patient-details/index.js +1 -1
  37. package/dist/components/patient-summary-card/index.js +1 -1
  38. package/dist/components/patient-table/index.js +1 -1
  39. package/dist/components/popover/index.js +1 -1
  40. package/dist/components/popover/popover.d.ts +1 -1
  41. package/dist/components/rich-text-editor/index.js +1 -1
  42. package/dist/components/tooth-scheme/index.js +1 -1
  43. package/dist/i18n/locales/ar.d.ts +3 -0
  44. package/dist/i18n/locales/ar.js +4 -1
  45. package/dist/i18n/locales/de.d.ts +3 -0
  46. package/dist/i18n/locales/de.js +4 -1
  47. package/dist/i18n/locales/el.d.ts +3 -0
  48. package/dist/i18n/locales/el.js +4 -1
  49. package/dist/i18n/locales/en.d.ts +3 -0
  50. package/dist/i18n/locales/en.js +4 -1
  51. package/dist/i18n/locales/es.d.ts +3 -0
  52. package/dist/i18n/locales/es.js +4 -1
  53. package/dist/i18n/locales/fr.d.ts +3 -0
  54. package/dist/i18n/locales/fr.js +4 -1
  55. package/dist/i18n/locales/hi.d.ts +3 -0
  56. package/dist/i18n/locales/hi.js +4 -1
  57. package/dist/i18n/locales/it.d.ts +3 -0
  58. package/dist/i18n/locales/it.js +4 -1
  59. package/dist/i18n/locales/ja.d.ts +3 -0
  60. package/dist/i18n/locales/ja.js +4 -1
  61. package/dist/i18n/locales/nl.d.ts +3 -0
  62. package/dist/i18n/locales/nl.js +4 -1
  63. package/dist/i18n/locales/pl.d.ts +3 -0
  64. package/dist/i18n/locales/pl.js +4 -1
  65. package/dist/i18n/locales/pt.d.ts +3 -0
  66. package/dist/i18n/locales/pt.js +4 -1
  67. package/dist/i18n/locales/ro.d.ts +3 -0
  68. package/dist/i18n/locales/ro.js +4 -1
  69. package/dist/i18n/locales/ru.d.ts +3 -0
  70. package/dist/i18n/locales/ru.js +4 -1
  71. package/dist/i18n/locales/sq.d.ts +3 -0
  72. package/dist/i18n/locales/sq.js +4 -1
  73. package/dist/i18n/locales/sv.d.ts +3 -0
  74. package/dist/i18n/locales/sv.js +4 -1
  75. package/dist/i18n/locales/tr.d.ts +3 -0
  76. package/dist/i18n/locales/tr.js +4 -1
  77. package/dist/i18n/locales/zh.d.ts +3 -0
  78. package/dist/i18n/locales/zh.js +4 -1
  79. package/dist/index.js +19 -19
  80. package/dist/locales/ar.json +4 -1
  81. package/dist/locales/de.json +4 -1
  82. package/dist/locales/el.json +4 -1
  83. package/dist/locales/en.json +4 -1
  84. package/dist/locales/es.json +4 -1
  85. package/dist/locales/fr.json +4 -1
  86. package/dist/locales/hi.json +4 -1
  87. package/dist/locales/it.json +4 -1
  88. package/dist/locales/ja.json +4 -1
  89. package/dist/locales/nl.json +4 -1
  90. package/dist/locales/pl.json +4 -1
  91. package/dist/locales/pt.json +4 -1
  92. package/dist/locales/ro.json +4 -1
  93. package/dist/locales/ru.json +4 -1
  94. package/dist/locales/sq.json +4 -1
  95. package/dist/locales/sv.json +4 -1
  96. package/dist/locales/tr.json +4 -1
  97. package/dist/locales/zh.json +4 -1
  98. package/dist/patterns/anamnesis/index.js +1 -1
  99. package/dist/patterns/calendar/calendar.data.d.ts +15 -5
  100. package/dist/patterns/calendar/calendar.model.d.ts +12 -3
  101. package/dist/patterns/calendar/calendar.sheets.d.ts +11 -2
  102. package/dist/patterns/calendar/calendar.types.d.ts +16 -0
  103. package/dist/patterns/calendar/index.js +1 -1
  104. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  105. package/dist/patterns/signature-request/index.js +1 -1
  106. package/package.json +1 -1
  107. package/dist/_chunks/calendar-workspace-Ca0n_r1v.js +0 -7341
@@ -4554,7 +4554,10 @@
4554
4554
  "seriesDeleted_few": "{{count}} randevu silindi"
4555
4555
  },
4556
4556
  "readOnly": {
4557
- "createBlocked": "Randevu oluşturma izniniz yok."
4557
+ "createBlocked": "Randevu oluşturma izniniz yok.",
4558
+ "changeBlocked": "Randevuları değiştirme izniniz yok.",
4559
+ "waitingBlocked": "Bekleme listesini değiştirme izniniz yok.",
4560
+ "waitingLockedBody": "Bekleme listesini değiştirme izniniz yok — klinik sahibinden takvim düzenleme yetkisi isteyin."
4558
4561
  },
4559
4562
  "rail": {
4560
4563
  "appointments": "Randevular",
@@ -4554,7 +4554,10 @@
4554
4554
  "seriesDeleted_few": "已删除 {{count}} 个预约"
4555
4555
  },
4556
4556
  "readOnly": {
4557
- "createBlocked": "您没有创建预约的权限。"
4557
+ "createBlocked": "您没有创建预约的权限。",
4558
+ "changeBlocked": "您没有修改预约的权限。",
4559
+ "waitingBlocked": "您没有修改等候名单的权限。",
4560
+ "waitingLockedBody": "您没有修改等候名单的权限 — 请向诊所所有者申请日历编辑权限。"
4558
4561
  },
4559
4562
  "rail": {
4560
4563
  "appointments": "预约",
@@ -1,4 +1,4 @@
1
- import { A as e, a as i, L as r, P as n, S as o, T as t, b as l, c as d, d as g, e as A, f as m, g as c, h as E, i as P, j as f, k as S, l as h, m as u, n as T, o as I, p as N, r as R, q as _, s as C, t as L, u as b } from "../../_chunks/anamnesis-summary-rows-CRWO8x8g.js";
1
+ import { A as e, a as i, L as r, P as n, S as o, T as t, b as l, c as d, d as g, e as A, f as m, g as c, h as E, i as P, j as f, k as S, l as h, m as u, n as T, o as I, p as N, r as R, q as _, s as C, t as L, u as b } from "../../_chunks/anamnesis-summary-rows-BPSQhxnZ.js";
2
2
  export {
3
3
  e as Anamnesis,
4
4
  i as AnamnesisConfigEditor,
@@ -11,10 +11,14 @@
11
11
  * read it with `useCalendarData()`, pure model functions take it as an
12
12
  * explicit `data` parameter — never a module-level global.
13
13
  *
14
- * Every REQUIRED member is one the shipped runtime actually reads. The
15
- * handful marked optional are read only by the story-only Final State
16
- * demo (`src/patterns/demos/calendar/`), which keeps supplying them; a
17
- * platform host mounting `CalendarWorkspace` can leave them out.
14
+ * Every REQUIRED member is one the shipped runtime actually reads. A
15
+ * member is optional for one of two reasons, and its own doc comment
16
+ * says which: either only the story-only Final State demo
17
+ * (`src/patterns/demos/calendar/`) reads it, so a platform host
18
+ * mounting `CalendarWorkspace` can leave it out; or its ABSENCE is a
19
+ * state the pattern must tell apart from emptiness (`priceLists`), in
20
+ * which case `undefined` means "we were never told" and `[]` means
21
+ * "there is none" — see `catalogueStateOf` in `calendar.types.ts`.
18
22
  */
19
23
  import { type ReactNode } from 'react';
20
24
  import type { CalendarResource } from '../../components/calendar';
@@ -46,7 +50,13 @@ export interface CalendarData {
46
50
  /** The date the calendar opens on. */
47
51
  initialDateIso: string;
48
52
  cares: readonly CalendarCare[];
49
- priceLists: readonly CalendarPriceList[];
53
+ /** The practice's price lists. THREE states, never two — see
54
+ * `catalogueStateOf`. Omit it (`undefined`) when the host has no
55
+ * care/price-list catalogue to hand over, as the platform island
56
+ * does; `[]` says the practice genuinely has none. Either way the
57
+ * "From price list" relation is withheld rather than rendered over
58
+ * nothing, and neither is ever papered over with an invented list. */
59
+ priceLists?: readonly CalendarPriceList[];
50
60
  /** Optional: no shipped code reads the flat list — the panels go
51
61
  * through `carePlanById` / `openCarePlansForPatient`. */
52
62
  carePlans?: readonly CalendarCarePlan[];
@@ -12,7 +12,7 @@ import type { TFunction } from 'i18next';
12
12
  import { ThumbsUp } from 'lucide-react';
13
13
  import { type CalendarEvent, type CalendarEventStatus, type CalendarResource } from '../../components/calendar';
14
14
  import type { CalendarData } from './calendar.data';
15
- 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 PatientRef } from './calendar.types';
15
+ 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';
16
16
  export declare const STATUS_UI_KEY: Record<CalendarEventStatus, string>;
17
17
  export interface CalendarRow {
18
18
  event: CalendarEvent;
@@ -364,8 +364,17 @@ export declare const EMPTY_SCHEDULE: Record<string, Array<{
364
364
  eventId: string;
365
365
  startIso: string;
366
366
  }>>;
367
- /** The patient's price list by name, else the practice default. */
368
- export declare function priceListIdFor(patientId: string | undefined, data: CalendarData): string;
367
+ /** Whether the host gave us a price-list catalogue at all: `ready`,
368
+ * `none` (told, and empty) or `unknown` (never told). Both non-ready
369
+ * states withhold the "From price list" relation — see the CATALOGUE
370
+ * PRESENCE note in `calendar.types.ts`. */
371
+ export declare function priceListState(data: CalendarData): CatalogueState;
372
+ /** The patient's price list by name, else the practice default —
373
+ * `undefined` when there is no catalogue to default into. The absence
374
+ * is RETURNED, never papered over: a fabricated id would name a price
375
+ * list the practice does not have, and `priceLists[0].id` on an empty
376
+ * catalogue threw and took the whole calendar down with it. */
377
+ export declare function priceListIdFor(patientId: string | undefined, data: CalendarData): string | undefined;
369
378
  export declare const STATUS_CHIP: Record<CalendarEventStatus, {
370
379
  variant: 'success' | 'info' | 'warning' | 'error' | 'accentSoft';
371
380
  Icon: typeof ThumbsUp;
@@ -307,11 +307,16 @@ export declare function BookingsPanel({ bookings, locale, privacy, onShowInCalen
307
307
  /** Opens the editor to complete it (platform "Completa appuntamento"). */
308
308
  onComplete: (row: CalendarRow) => void;
309
309
  }): import("react/jsx-runtime").JSX.Element;
310
- export declare function WaitingListPanel({ entries, rows, locale, onPlaceWaiting, onRemoveWaiting, onOpenEntryForm, onOpenPatient, onOpenAppointment, }: {
310
+ export declare function WaitingListPanel({ entries, rows, locale, onPlaceWaiting, onRemoveWaiting, onOpenEntryForm, onOpenPatient, onOpenAppointment, readOnly, }: {
311
311
  entries: CalendarWaitingEntry[];
312
312
  /** Live grid rows — the linked appointment's date, colour and care. */
313
313
  rows: CalendarRow[];
314
314
  locale: string;
315
+ /** No edit permission (`permissions.editAppointment === false`). Add,
316
+ * Edit and Remove are withheld and a lock note says why: each one
317
+ * calls a host seam that a read-only host silently refuses, and the
318
+ * panel would then have announced a change it never made. */
319
+ readOnly?: boolean;
315
320
  /** Schedule / Reschedule → the host's create / move placement mode. */
316
321
  onPlaceWaiting: (entry: CalendarWaitingEntry) => void;
317
322
  /** Delete — immediate, as on the platform (the host toasts an Undo). */
@@ -330,11 +335,15 @@ export declare function WaitingListPanel({ entries, rows, locale, onPlaceWaiting
330
335
  * order (patient, operator, colour, description) and its one rule:
331
336
  * a patient OR a description, checked on submit with an inline error.
332
337
  */
333
- export declare function WaitingListEntryForm({ entry, onSave, onCancel, chrome, }: {
338
+ export declare function WaitingListEntryForm({ entry, onSave, onCancel, chrome, readOnly, }: {
334
339
  /** Set = edit this entry; unset = add a new one. */
335
340
  entry?: CalendarWaitingEntry;
336
341
  onSave: (draft: WaitingEntryDraft) => void;
337
342
  onCancel: () => void;
343
+ /** No edit permission: the fields lock, Save is withheld and `submit`
344
+ * refuses — the same three layers the appointment editor uses, so no
345
+ * path can close this form as if a queue entry had been written. */
346
+ readOnly?: boolean;
338
347
  /** `'dialog'` drops the rail's back arrow — the dialog's own Close and
339
348
  * the form's Cancel already dismiss it. */
340
349
  chrome?: 'panel' | 'dialog';
@@ -458,6 +458,22 @@ export declare function channelReasonKey(state: PatientChannelState, keys: {
458
458
  optedOut: string;
459
459
  none: string;
460
460
  }): string | null;
461
+ /** Whether a host-supplied catalogue can back a control. */
462
+ export type CatalogueState =
463
+ /** At least one entry — a picker can be filled and defaulted. */
464
+ 'ready'
465
+ /** The host handed us the collection and it is empty: the practice
466
+ * really has none. The only state in which "none" may be said. */
467
+ | 'none'
468
+ /** The host never handed us the collection. Says nothing about what
469
+ * the practice holds. */
470
+ | 'unknown';
471
+ /** The state of one host-supplied catalogue. Takes the raw member, so
472
+ * `undefined` reaches it intact — never `?? []` at the call site. */
473
+ export declare function catalogueStateOf(items: readonly unknown[] | undefined): CatalogueState;
474
+ /** A catalogue that can back a picker right now. `unknown` is NOT
475
+ * offerable here — unlike `channelOfferable`, see the note above. */
476
+ export declare function catalogueUsable(state: CatalogueState): boolean;
461
477
  /** Practice-level toggles the platform gates the editor and popover on. */
462
478
  export interface CalendarPracticeFeatures {
463
479
  /** `FIND_FREE_SLOTS_BY_CARE` — devices per care, the device line. */
@@ -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-Ca0n_r1v.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-D6kipuvT.js";
2
2
  export {
3
3
  s as CALENDAR_PREFERENCE_KEYS,
4
4
  r as CalendarDataProvider,
@@ -1,4 +1,4 @@
1
- import { C as l, M as o } from "../../_chunks/marketplace-app-shell-DDQXQ8hX.js";
1
+ import { C as l, M as o } from "../../_chunks/marketplace-app-shell-C4AjQmvz.js";
2
2
  export {
3
3
  l as ConnectWithAlfadocs,
4
4
  o as MarketplaceAppShell
@@ -1,4 +1,4 @@
1
- import { S as o } from "../../_chunks/signature-request-CUe903hj.js";
1
+ import { S as o } from "../../_chunks/signature-request-CwlAmVLw.js";
2
2
  export {
3
3
  o as SignatureRequestModal
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",